| plan 9 kernel history: overview | file list | diff list |
1991/0703/pc/main.c (diff list | history)
| pc/main.c on 1991/0702 | ||
| 1991/0702 | #include "u.h" #include "lib.h" #include "dat.h" #include "fns.h" | |
| 1991/0629 | ||
| 1991/0702 | main(void) | |
| 1991/0625 | { | |
| 1991/0703 | screeninit(); print("screen inited\n"); trapinit(); print("traps inited\n"); kbdinit(); print("kbd inited\n"); sti(); for(;;); | |
| 1991/0625 | } | |
| 1991/0629 | void | |
| 1991/0702 | delay(int l) | |
| 1991/0625 | { | |
| 1991/0702 | int i; | |
| 1991/0625 | ||
| 1991/0702 | while(--l){ for(i=0; i < 10000; i++) ; } | |
| 1991/0625 | } | |
| 1991/0702 | int sprint(char *s, char *fmt, ...) | |
| 1991/0625 | { | |
| 1991/0702 | return doprint(s, s+PRINTSIZE, fmt, (&fmt+1)) - s; | |
| 1991/0625 | } | |
| 1991/0629 | ||
| 1991/0702 | int print(char *fmt, ...) | |
| 1991/0629 | { | |
| 1991/0702 | char buf[PRINTSIZE]; int n; | |
| 1991/0629 | ||
| 1991/0702 | n = doprint(buf, buf+sizeof(buf), fmt, (&fmt+1)) - buf; screenputs(buf, n); return n; | |
| 1991/0703 | } void panic(char *fmt, ...) { char buf[PRINTSIZE]; int n; screenputs("panic: ", 7); n = doprint(buf, buf+sizeof(buf), fmt, (&fmt+1)) - buf; screenputs(buf, n); for(;;); | |
| 1991/0702 | } | |