/* -*-c-*-
*
- * $Id: hashsum.c,v 1.3 2000/07/29 17:02:43 mdw Exp $
+ * $Id: hashsum.c,v 1.4 2000/08/04 23:23:44 mdw Exp $
*
* Hash files using some secure hash function
*
/*----- Revision history --------------------------------------------------*
*
* $Log: hashsum.c,v $
+ * Revision 1.4 2000/08/04 23:23:44 mdw
+ * Various <ctype.h> fixes.
+ *
* Revision 1.3 2000/07/29 17:02:43 mdw
* (checkhash): Be pettier about spaces between the hash and filename, for
* compatiblity with `md5sum'.
/* --- Raw: just read exactly what's written up to a null byte --- */
-#define NEXTCH (fp ? getc(fp) : *p++)
+#define NEXTCH (fp ? getc(fp) : (unsigned char)*p++)
#define EOFCH (fp ? EOF : 0)
if (raw) {
again:
ch = NEXTCH;
- while (isspace((unsigned char)ch))
+ while (isspace(ch))
ch = NEXTCH;
if (ch == '#') {
do ch = NEXTCH; while (ch != '\n' && ch != EOFCH);
if (ch == q)
break;
- if (!q && isspace((unsigned char)ch))
+ if (!q && isspace(ch))
break;
/* --- Otherwise contribute and continue --- */