# define _ptr _p /* Gag */
# define _cnt _r /* Retch */
# define _filbuf __srget /* Puke */
+# define DEFINED__FILBUF_TO_SOMETHING_SPECIFIC
#endif
#ifdef SCO_5_STDIO
# define _cnt __cnt
# define _base __base
# define _filbuf(fp) ((fp)->__cnt = 0, __filbuf(fp))
+# define DEFINED__FILBUF_TO_SOMETHING_SPECIFIC
+#endif
+
+#ifndef DEFINED__FILBUF_TO_SOMETHING_SPECIFIC
+extern int _filbuf(FILE*);
#endif
*cp++ = j = *(iob->_ptr + c);
c = _filbuf(iob);
#endif
- if (c == EOF || (j == '\0' || j == '\n') && c != ' ' && c != '\t') {
+ if (c == EOF ||
+ ((j == '\0' || j == '\n') && c != ' ' && c != '\t')) {
if (c != EOF) {
#ifdef LINUX_STDIO
--iob->_IO_read_ptr;
pat_map = (unsigned char **) calloc (256, sizeof(unsigned char *));
for (cp = (char *) fdelim + 1; cp < (char *) delimend; cp++ )
- pat_map[*cp] = (unsigned char *) cp;
+ pat_map[(unsigned char)*cp] = (unsigned char *) cp;
if (msg_style == MS_MMDF) {
/* flush extra msg hdrs */
while (pc != *str++)
if (str > es)
return 0;
-
+ if (str > es+1)
+ return 0;
sp = str; pp = pat;
while (pp < ep && *sp++ == *pp)
pp++;