c 56 console.c int i, c, locking; c 68 console.c for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ c 69 console.c if(c != '%'){ c 70 console.c consputc(c); c 73 console.c c = fmt[++i] & 0xff; c 74 console.c if(c == 0) c 76 console.c switch(c){ c 96 console.c consputc(c); c 130 console.c cgaputc(int c) c 140 console.c if(c == '\n') c 142 console.c else if(c == BACKSPACE){ c 145 console.c crt[pos++] = (c&0xff) | 0x0700; // black on white c 161 console.c consputc(int c) c 169 console.c if(c == BACKSPACE){ c 172 console.c uartputc(c); c 173 console.c cgaputc(c); c 190 console.c int c; c 193 console.c while((c = getc()) >= 0){ c 194 console.c switch(c){ c 212 console.c if(c != 0 && input.e-input.r < INPUT_BUF){ c 213 console.c c = (c == '\r') ? '\n' : c; c 214 console.c input.buf[input.e++ % INPUT_BUF] = c; c 215 console.c consputc(c); c 216 console.c if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){ c 231 console.c int c; c 245 console.c c = input.buf[input.r++ % INPUT_BUF]; c 246 console.c if(c == C('D')){ // EOF c 254 console.c *dst++ = c; c 256 console.c if(c == '\n') c 99 grep.c int matchstar(int c, char *re, char *text) c 104 grep.c }while(*text!='\0' && (*text++==c || c=='.')); c 13 kbd.c uint st, data, c; c 36 kbd.c c = charcode[shift & (CTL | SHIFT)][data]; c 38 kbd.c if('a' <= c && c <= 'z') c 39 kbd.c c += 'A' - 'a'; c 40 kbd.c else if('A' <= c && c <= 'Z') c 41 kbd.c c += 'a' - 'A'; c 43 kbd.c return c; c 72 main.c struct cpu *c; c 81 main.c for(c = cpus; c < cpus+ncpu; c++){ c 82 main.c if(c == cpus+cpunum()) // We've started already. c 93 main.c lapicstartap(c->id, v2p(code)); c 96 main.c while(c->started == 0) c 6 printf.c putc(int fd, char c) c 8 printf.c write(fd, &c, 1); c 43 printf.c int c, i, state; c 49 printf.c c = fmt[i] & 0xff; c 51 printf.c if(c == '%'){ c 54 printf.c putc(fd, c); c 57 printf.c if(c == 'd'){ c 60 printf.c } else if(c == 'x' || c == 'p'){ c 63 printf.c } else if(c == 's'){ c 72 printf.c } else if(c == 'c'){ c 75 printf.c } else if(c == '%'){ c 76 printf.c putc(fd, c); c 80 printf.c putc(fd, c); c 5 string.c memset(void *dst, int c, uint n) c 8 string.c c &= 0xFF; c 9 string.c stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4); c 11 string.c stosb(dst, c, n); c 52 uart.c uartputc(int c) c 60 uart.c outb(COM1+0, c); c 37 ulib.c memset(void *dst, int c, uint n) c 39 ulib.c stosb(dst, c, n); c 44 ulib.c strchr(const char *s, char c) c 47 ulib.c if(*s == c) c 56 ulib.c char c; c 59 ulib.c cc = read(0, &c, 1); c 62 ulib.c buf[i++] = c; c 63 ulib.c if(c == '\n' || c == '\r') c 31 user.h char* strchr(const char*, char c); c 1418 usertests.c char *a, *b, *c, *lastaddr, *oldbrk, *p, scratch; c 1441 usertests.c c = sbrk(1); c 1442 usertests.c c = sbrk(1); c 1443 usertests.c if(c != a + 1){ c 1465 usertests.c c = sbrk(-4096); c 1466 usertests.c if(c == (char*)0xffffffff){ c 1470 usertests.c c = sbrk(0); c 1471 usertests.c if(c != a - 4096){ c 1472 usertests.c printf(stdout, "sbrk deallocation produced wrong address, a %x c %x\n", a, c); c 1478 usertests.c c = sbrk(4096); c 1479 usertests.c if(c != a || sbrk(0) != a + 4096){ c 1480 usertests.c printf(stdout, "sbrk re-allocation failed, a %x c %x\n", a, c); c 1490 usertests.c c = sbrk(-(sbrk(0) - oldbrk)); c 1491 usertests.c if(c != a){ c 1492 usertests.c printf(stdout, "sbrk downsize failed, a %x c %x\n", a, c); c 1531 usertests.c c = sbrk(4096); c 1538 usertests.c if(c == (char*)0xffffffff){ c 19 vm.c struct cpu *c; c 25 vm.c c = &cpus[cpunum()]; c 26 vm.c c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); c 27 vm.c c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); c 28 vm.c c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); c 29 vm.c c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); c 32 vm.c c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0); c 34 vm.c lgdt(c->gdt, sizeof(c->gdt)); c 38 vm.c cpu = c; c 11 wc.c int l, w, c, inword; c 13 wc.c l = w = c = 0; c 17 wc.c c++; c 32 wc.c printf(1, "%d %d %d %s\n", l, w, c, name);