ctype sign fixes (Tom Miller)
This commit is contained in:
parent
b330c942b4
commit
74374cc8a4
10 changed files with 22 additions and 17 deletions
|
|
@ -73,6 +73,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <u.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
|
@ -169,10 +170,10 @@ char *DWBhome(void)
|
|||
if ( (fp = fopen(DWBCONFIG, "r")) != NULL ) {
|
||||
len = strlen(DWBENV);
|
||||
while ( fgets(buf, sizeof(buf), fp) != NULL ) {
|
||||
for ( ptr = buf; isspace(*ptr); ptr++ ) ;
|
||||
for ( ptr = buf; isspace((uchar)*ptr); ptr++ ) ;
|
||||
if ( strncmp(ptr, DWBENV, len) == 0 && *(ptr+len) == '=' ) {
|
||||
path = ptr + len + 1;
|
||||
for ( ptr = path; !isspace(*ptr) && *ptr != ';'; ptr++ ) ;
|
||||
for ( ptr = path; !isspace((uchar)*ptr) && *ptr != ';'; ptr++ ) ;
|
||||
*ptr = '\0';
|
||||
if ( home != NULL )
|
||||
free(home);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* input routines, escape function calling
|
||||
*/
|
||||
|
||||
#include <u.h>
|
||||
#include "tdef.h"
|
||||
#include "fns.h"
|
||||
#include "ext.h"
|
||||
|
|
@ -1091,10 +1092,10 @@ void getpn(char *a)
|
|||
continue;
|
||||
default:
|
||||
n = 0;
|
||||
if (isdigit(*a)) {
|
||||
if (isdigit((uchar)*a)) {
|
||||
do
|
||||
n = 10 * n + *a++ - '0';
|
||||
while (isdigit(*a));
|
||||
while (isdigit((uchar)*a));
|
||||
a--;
|
||||
} else
|
||||
n = 9999;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#include <u.h>
|
||||
#include "tdef.h"
|
||||
#include "fns.h"
|
||||
#include "ext.h"
|
||||
|
|
@ -495,7 +496,7 @@ static void install(char *s) /* map ab4c5de to: 12 abcde \0 00405 \0 */
|
|||
num[0] = '0';
|
||||
*nextpat++ = ' '; /* fill in with count later */
|
||||
for (npat = lastpat = 0; *s != '\n' && *s != '\0'; s++) {
|
||||
if (isdigit(*s)) {
|
||||
if (isdigit((uchar)*s)) {
|
||||
num[npat] = *s;
|
||||
lastpat = npat;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue