This commit is contained in:
cvs
2000-04-07 07:09:42 +00:00
parent ff5e8cf0b2
commit b713ae4a93
15 changed files with 310 additions and 145 deletions

View File

@@ -3,7 +3,6 @@
#include <stdarg.h>
#include <string.h>
#include <assert.h>
#include <fortify.h>
#include "err_handling.h"
#include "coc_logfile.h"
#include "coc_util.h"
@@ -32,7 +31,7 @@ int LscEqPar(char *par, char *res) {
i1=sscanf(pbuf, "%f", &f1);
i2=sscanf(rbuf, "%f", &f2);
if (i1!=1 || i2!=1 || abs(f1-f2)>1e-4+abs(f1)*5e-6) {
logfileOut(LOG_WARN, "%s#%s\n", pbuf, rbuf);
logfileOut(LOG_INFO, "%s#%s\n", pbuf, rbuf);
return(0);
}
}
@@ -71,7 +70,7 @@ char *LscCmd(SerChannel *ser, const char *cmds) {
ERR_I(str_put_str(&sbuf, seg));
while (p!=NULL) { /* substitute variables */
p=str_split(varname, p, ']');
if (p==NULL) ERR_MSG("missing '\'");
if (p==NULL) ERR_MSG("missing ']'");
ERR_I(CocPutVar(serverVarList, &sbuf, varname, 0));
p=str_split(seg, p, '[');
ERR_I(str_put_str(&sbuf, seg));
@@ -116,7 +115,7 @@ char *LscCmd(SerChannel *ser, const char *cmds) {
buf[sbuf.wrpos-1]='\0'; /* strip off trailing ";" */
}
ERR_P(res=SerCmd(ser, buf));
if (0==strcmp("?TMO", res)) ERR_MSG("timeout");
if (0==strncmp("?TMO", res, 4)) ERR_MSG("timeout");
/*
list[0..nres-1] contains a now:
for a command with return request: