return 1;
}
+int lstrstrcmp(const char *a, int la, const char *b) {
+ int lb= strlen(b);
+ if (la != lb) return 1;
+ return memcmp(a,b,la);
+}
+
+int thiswordstrcmp(ParseState *ps, const char *b) {
+ return lstrstrcmp(ps->thisword, ps->lthisword, b);
+}
+
const CmdInfo *ps_lookup(ParseState *ps, const CmdInfo *inf) {
for (;
inf->name;
inf++)
- if (ps->lthisword == strlen(inf->name) &&
- !memcmp(ps->thisword, inf->name, ps->lthisword))
+ if (!thiswordstrcmp(ps,inf->name))
return inf;
return 0;
}
int xarg;
};
+int lstrstrcmp(const char *a, int la, const char *b);
+int thiswordstrcmp(ParseState *ps, const char *b);
+
int ps_word(ParseState *ps);
int ps_needword(ParseState *ps);
int ps_needhextoend(ParseState *ps, Byte *dbuf, int *len_io);