Merge branch 'lab3' into lab4

This commit is contained in:
2019-04-24 13:57:20 -07:00
16 changed files with 526 additions and 45 deletions

View File

@@ -13,7 +13,8 @@ libmain(int argc, char **argv)
{
// set thisenv to point at our Env structure in envs[].
// LAB 3: Your code here.
thisenv = 0;
envid_t id = sys_getenvid();
thisenv = &envs[ENVX(id)];
// save the name of the program so that panic() can use it
if (argc > 0)

View File

@@ -207,11 +207,9 @@ vprintfmt(void (*putch)(int, void*), void *putdat, const char *fmt, va_list ap)
// (unsigned) octal
case 'o':
// LAB 1: Replace this with your code.
putch('X', putdat);
putch('X', putdat);
putch('X', putdat);
break;
num = getuint(&ap, lflag);
base = 8;
goto number;
// pointer
case 'p':