diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/9660/jchar.c | 2 | ||||
-rw-r--r-- | src/cmd/acme/ecmd.c | 4 | ||||
-rw-r--r-- | src/cmd/deroff.c | 8 | ||||
-rw-r--r-- | src/cmd/dict/dict.c | 4 | ||||
-rw-r--r-- | src/cmd/ed.c | 16 | ||||
-rw-r--r-- | src/cmd/look.c | 12 |
6 files changed, 23 insertions, 23 deletions
diff --git a/src/cmd/9660/jchar.c b/src/cmd/9660/jchar.c index c49da635..ccd3b6db 100644 --- a/src/cmd/9660/jchar.c +++ b/src/cmd/9660/jchar.c @@ -34,7 +34,7 @@ jolietstring(uchar *buf, int len) int isjolietfrog(Rune r) { - return r==L'*' || r==L'/' || r==L':' + return r=='*' || r=='/' || r==':' || r==';' || r=='?' || r=='\\'; } diff --git a/src/cmd/acme/ecmd.c b/src/cmd/acme/ecmd.c index eed45503..6fef0698 100644 --- a/src/cmd/acme/ecmd.c +++ b/src/cmd/acme/ecmd.c @@ -479,7 +479,7 @@ s_cmd(Text *t, Cmd *cp) buf = allocstring(0); for(m=0; m<nrp; m++){ buf->n = 0; - buf->r[0] = L'\0'; + buf->r[0] = '\0'; sel = rp[m]; for(i = 0; i<cp->u.text->n; i++) if((c = cp->u.text->r[i])=='\\' && i<cp->u.text->n-1){ @@ -761,7 +761,7 @@ pdisplay(File *f) if(np>RBUFSIZE-1) np = RBUFSIZE-1; bufread(&f->b, p1, buf, np); - buf[np] = L'\0'; + buf[np] = '\0'; warning(nil, "%S", buf); p1 += np; } diff --git a/src/cmd/deroff.c b/src/cmd/deroff.c index 914c5a3f..1b758efe 100644 --- a/src/cmd/deroff.c +++ b/src/cmd/deroff.c @@ -847,11 +847,11 @@ sce(void) { int n = 1; - while (C != L'\n' && !(L'0' <= c && c <= L'9')) + while (C != '\n' && !('0' <= c && c <= '9')) ; - if (c != L'\n') { - for (n = c-L'0';'0' <= C && c <= L'9';) - n = n*10 + c-L'0'; + if (c != '\n') { + for (n = c-'0';'0' <= C && c <= '9';) + n = n*10 + c-'0'; } while(n) { if(C == '.') { diff --git a/src/cmd/dict/dict.c b/src/cmd/dict/dict.c index 4526648e..6704775a 100644 --- a/src/cmd/dict/dict.c +++ b/src/cmd/dict/dict.c @@ -502,7 +502,7 @@ getpref(char *pat, Rune *pre) case 0x7c: case 0x5e: case 0x24: *pre = 0; return p-pat; - case L'\\': + case '\\': p += n; p += chartorune(++pre, p); pre++; @@ -542,7 +542,7 @@ getfield(Rune *rp) if ((c = Bgetrune(bindex)) < 0) return 0; if(c == '\t' || c == '\n') { - *rp = L'\0'; + *rp = '\0'; return 1; } *rp++ = c; diff --git a/src/cmd/ed.c b/src/cmd/ed.c index 0b4be590..f44acb06 100644 --- a/src/cmd/ed.c +++ b/src/cmd/ed.c @@ -393,7 +393,7 @@ commands(void) newline(); count = addr2 - zero; putd(); - putchr(L'\n'); + putchr('\n'); continue; case '!': @@ -419,7 +419,7 @@ printcom(void) if(listn) { count = a1-zero; putd(); - putchr(L'\t'); + putchr('\t'); } putshst(getline(*a1++)); } while(a1 <= addr2); @@ -624,7 +624,7 @@ exfile(int om) io = -1; if(vflag) { putd(); - putchr(L'\n'); + putchr('\n'); } } @@ -653,7 +653,7 @@ error1(char *s) close(io); io = -1; } - putchr(L'?'); + putchr('?'); putst(s); } @@ -687,7 +687,7 @@ notifyf(void *a, char *s) if(strcmp(s, "interrupt") == 0){ if(rescuing || waiting) noted(NCONT); - putchr(L'\n'); + putchr('\n'); lastc = '\n'; error1(Q); notejmp(a, savej, 0); @@ -1496,7 +1496,7 @@ putd(void) count /= 10; if(count) putd(); - putchr(r + L'0'); + putchr(r + '0'); } void @@ -1511,7 +1511,7 @@ putst(char *sp) break; putchr(r); } - putchr(L'\n'); + putchr('\n'); } void @@ -1520,7 +1520,7 @@ putshst(Rune *sp) col = 0; while(*sp) putchr(*sp++); - putchr(L'\n'); + putchr('\n'); } void diff --git a/src/cmd/look.c b/src/cmd/look.c index f447b8db..369afe1b 100644 --- a/src/cmd/look.c +++ b/src/cmd/look.c @@ -10,16 +10,16 @@ #undef isalnum #undef isspace #undef tolower -#define isupper(r) (L'A' <= (r) && (r) <= L'Z') -#define islower(r) (L'a' <= (r) && (r) <= L'z') +#define isupper(r) ('A' <= (r) && (r) <= 'Z') +#define islower(r) ('a' <= (r) && (r) <= 'z') #define isalpha(r) (isupper(r) || islower(r)) #define islatin1(r) (0xC0 <= (r) && (r) <= 0xFF) -#define isdigit(r) (L'0' <= (r) && (r) <= L'9') +#define isdigit(r) ('0' <= (r) && (r) <= '9') #define isalnum(r) (isalpha(r) || isdigit(r)) -#define isspace(r) ((r) == L' ' || (r) == L'\t' \ +#define isspace(r) ((r) == ' ' || (r) == '\t' \ || (0x0A <= (r) && (r) <= 0x0D)) #define tolower(r) ((r)-'A'+'a') @@ -263,7 +263,7 @@ rcanon(Rune *old, Rune *new) if (islatin1(r) && latin_fold_tab[r-0xc0]) r = latin_fold_tab[r-0xc0]; if(direc) - if(!(isalnum(r) || r == L' ' || r == L'\t')) + if(!(isalnum(r) || r == ' ' || r == '\t')) continue; if(fold) if(isupper(r)) @@ -339,7 +339,7 @@ getword(Biobuf *f, Rune *rp, int n) if(c < 0) return 0; if(c == '\n') { - *rp = L'\0'; + *rp = '\0'; return 1; } *rp++ = c; |