Merge branch 'dev' of ssh://xnopyt.com:222/xnoe/xnoe-os into dev
This commit is contained in:
commit
28138a54e2
@ -14,9 +14,9 @@ void readline(char* buf, uint32_t lim) {
|
||||
break;
|
||||
} else if (c == '\b') {
|
||||
if (idx > 0) {
|
||||
buf[--idx] = 0;
|
||||
write(1, 0, &c);
|
||||
}
|
||||
buf[--idx] = 0;
|
||||
write(1, 0, &c);
|
||||
}
|
||||
} else if (c == 0) {
|
||||
continue;
|
||||
} else {
|
||||
@ -53,7 +53,7 @@ int main(int argc, char** argv, char** envp) {
|
||||
// Parse the input
|
||||
char* result[32];
|
||||
uint32_t ridx=0;
|
||||
memset(result, 0, 128);
|
||||
memset(result, 0, 32 * sizeof(char));
|
||||
char c;
|
||||
uint32_t idx=0;
|
||||
char* lp = input;
|
||||
@ -98,7 +98,7 @@ int main(int argc, char** argv, char** envp) {
|
||||
uint32_t e = execv(program, argv);
|
||||
printf("\nExit code: %d\n\n", e);
|
||||
} else if (strcmp(result[0], "set")) {
|
||||
setenv(result[1], result[2]);
|
||||
if (result[1] && result[2]) setenv(result[1], result[2]);
|
||||
} else {
|
||||
printf("No such executable file: `%s`\n\n", programName);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user