c 57 console.c int i, c, locking; c 69 console.c for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ c 70 console.c if(c != '%'){ c 71 console.c consputc(c); c 74 console.c c = fmt[++i] & 0xff; c 75 console.c if(c == 0) c 77 console.c switch(c){ c 97 console.c consputc(c); c 132 console.c cgaputc(int c) c 142 console.c if(c == '\n') c 144 console.c else if(c == BACKSPACE){ c 147 console.c crt[pos++] = (c&0xff) | 0x0700; // black on white c 166 console.c consputc(int c) c 174 console.c if(c == BACKSPACE){ c 177 console.c uartputc(c); c 178 console.c cgaputc(c); c 194 console.c int c, doprocdump = 0; c 197 console.c while((c = getc()) >= 0){ c 198 console.c switch(c){ c 217 console.c if(c != 0 && input.e-input.r < INPUT_BUF){ c 218 console.c c = (c == '\r') ? '\n' : c; c 219 console.c input.buf[input.e++ % INPUT_BUF] = c; c 220 console.c consputc(c); c 221 console.c if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){ c 239 console.c int c; c 253 console.c c = input.buf[input.r++ % INPUT_BUF]; c 254 console.c if(c == C('D')){ // EOF c 262 console.c *dst++ = c; c 264 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 68 main.c struct cpu *c; c 77 main.c for(c = cpus; c < cpus+ncpu; c++){ c 78 main.c if(c == mycpu()) // We've started already. c 89 main.c lapicstartap(c->apicid, V2P(code)); c 92 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 59 proc.c struct cpu *c; c 62 proc.c c = mycpu(); c 63 proc.c p = c->proc; c 326 proc.c struct cpu *c = mycpu(); c 327 proc.c c->proc = 0; c 342 proc.c c->proc = p; c 346 proc.c swtch(&(c->scheduler), p->context); c 351 proc.c c->proc = 0; 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 18 vm.c struct cpu *c; c 24 vm.c c = &cpus[cpuid()]; c 25 vm.c c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, 0); c 26 vm.c c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); c 27 vm.c c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER); c 28 vm.c c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER); c 29 vm.c lgdt(c->gdt, sizeof(c->gdt)); 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);