ctype sign fixes (Tom Miller)

This commit is contained in:
rsc 2005-10-31 16:42:32 +00:00
parent b330c942b4
commit 74374cc8a4
10 changed files with 22 additions and 17 deletions

View file

@ -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);