*/
#include <h/mh.h>
-#include <zotnet/tws/tws.h>
+#include <h/tws.h>
#include <h/picksbr.h>
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# ifdef TM_IN_SYS_TIME
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
static struct swit parswit[] = {
#define PRAND 0
{ "and", 0 },
ebp = ibuf + strlen (ibuf);
}
c = *p2++;
- if (lf && c != '\n')
+ if (lf && c != '\n') {
if (c != ' ' && c != '\t') {
--p2;
break;
}
else
lf = 0;
- if (c == '\n')
+ }
+ if (c == '\n') {
if (body)
break;
else {
lf++;
c = ' ';
}
+ }
if (c && p1 < &linebuf[LBSIZE - 1])
*p1++ = c;
}
if (*p2 == CCHR) {
c = p2[1];
do {
- if (*p1 == c || cc[*p1] == c)
+ if (*p1 == c || cc[(unsigned char)*p1] == c)
if (advance (p1, p2))
return 1;
} while (*p1++);
for (;;)
switch (*ep++) {
case CCHR:
- if (*ep++ == *lp++ || ep[-1] == cc[lp[-1]])
+ if (*ep++ == *lp++ || ep[-1] == cc[(unsigned char)lp[-1]])
continue;
return 0;
case CCHR | STAR:
curlp = lp;
- while (*lp++ == *ep || cc[lp[-1]] == *ep)
+ while (*lp++ == *ep || cc[(unsigned char)lp[-1]] == *ep)
continue;
ep++;
goto star;