-/* $NetBSD: stoc.c,v 1.7 2003/08/07 09:37:18 agc Exp $ */
+/* $NetBSD: stoc.c,v 1.9 2005/04/19 20:17:12 rillig Exp $ */
/*
* Copyright (c) 1994
#if 0
static char sccsid[] = "@(#)stoc.c 8.1 (Berkeley) 7/24/94";
#else
-__RCSID("$NetBSD: stoc.c,v 1.7 2003/08/07 09:37:18 agc Exp $");
+__RCSID("$NetBSD: stoc.c,v 1.9 2005/04/19 20:17:12 rillig Exp $");
#endif
#endif /* not lint */
for (i = 0; mv[i].m_code >= 0; i++)
if (strcmp(mp, mv[i].m_text) == 0)
return(mv[i].m_code);
- if (!isalpha(mp[0]))
+ if (!isalpha((unsigned char)mp[0]))
return(ILLEGAL);
i = atoi(&mp[1]);
if (i < 1 || i > 19)
return(ILLEGAL);
- return(PT(lton(mp[0]), i));
+ return(PT(lton((unsigned char)mp[0]), i));
}
/*