Files
sics/tecs/lsc.h
2000-03-15 11:29:50 +00:00

33 lines
930 B
C

#include "serutil.h"
#define LSC_MAX_CMDS 5
int LscCmdChk(SerChannel *ser, char *cmds);
int LscCmdChkC(SerChannel *ser, const char *cmds);
/*
send one or several commands and check it's parameters
a colon must separate the parameters
attention:
in LscCmdChk, *cmds will be modified (more efficient)
in LscCmdChkC, *cmds must not be longer than 127 chars
*/
int LscEqPar(char *par, char *res);
/*
compare if parameters are equal (numbers as numbers, spaces ignored)
*/
struct { struct LscElem *next; char *cmnd; } LscElem;
typedef struct { struct LscElem *head, *tail; } LscList;
int LscPushCmd(LscList clist, char *cmnd);
/*
push a command on th command list. If cmnd points to a temporary buffer,
strdup() must be used.
*/
int LscNextCmd(SerChannel *ser, LscList clist);
/*
strip one line from LscList, and send it through LscCmdChk
the list and the command buffers are freed when no longer used
*/