* as/hc08/lkaomf51.c (OutputName): made name unsigned char,
[fw/sdcc] / src / pic / pcodepeep.c
index f9ca9d3f89d03af5eaf8d3b1fc8c7c7b0a68f6e3..6c6c47205bbd4629a713997338cb6da3dfcf2482 100644 (file)
@@ -259,7 +259,7 @@ static int cvt_extract_destination(parsedPattern *pp)
                
                // just check first letter for now
                
-               if(toupper(*pp->pct[0].tok.s) == 'F')
+               if(toupper((unsigned char)*pp->pct[0].tok.s) == 'F')
                        return 1;
                
        } else if (pp->pct[0].tt == PCT_NUMBER) {
@@ -290,14 +290,14 @@ static pCodeOp *cvt_extract_status(char *reg, char *bit)
        
        if(len == 1) {
                // check C,Z
-               if(toupper(*bit) == 'C')
+               if(toupper((unsigned char)*bit) == 'C')
                        return PCOP(popCopyGPR2Bit(&pc_status,PIC_C_BIT));
-               if(toupper(*bit) == 'Z')
+               if(toupper((unsigned char)*bit) == 'Z')
                        return PCOP(popCopyGPR2Bit(&pc_status,PIC_Z_BIT));
        }
        
        // Check DC
-       if(len ==2 && toupper(bit[0]) == 'D' && toupper(bit[1]) == 'C')
+       if(len ==2 && toupper((unsigned char)bit[0]) == 'D' && toupper((unsigned char)bit[1]) == 'C')
                return PCOP(popCopyGPR2Bit(&pc_status,PIC_DC_BIT));
        
        return NULL;
@@ -745,15 +745,15 @@ static void tokenizeLineNode(char *ln)
        
        while(*ln) {
                
-               if(isspace(*ln)) {
+               if(isspace((unsigned char)*ln)) {
                        // add a SPACE token and eat the extra spaces.
                        tokArr[tokIdx++].tt = PCT_SPACE;
-                       while (isspace (*ln))
+                       while (isspace ((unsigned char)*ln))
                                ln++;
                        continue;
                }
                
-               if(isdigit(*ln)) {
+               if(isdigit((unsigned char)*ln)) {
                        
                        tokArr[tokIdx].tt = PCT_NUMBER;
                        tokArr[tokIdx++].tok.n = strtol(ln, &ln, 0);
@@ -786,11 +786,11 @@ static void tokenizeLineNode(char *ln)
                        
                        
                default:
-                       if(isalpha(*ln) || (*ln == '_') ) {
+                       if(isalpha((unsigned char)*ln) || (*ln == '_') ) {
                                char buffer[50];
                                int i=0;
                                
-                               while( (isalpha(*ln)  ||  isdigit(*ln) || (*ln == '_')) && i<49)
+                               while( (isalpha((unsigned char)*ln) || isdigit((unsigned char)*ln) || (*ln == '_')) && i<49)
                                        buffer[i++] = *ln++;
                                
                                ln--;