diff options
Diffstat (limited to 'src/user/app/led/main.c')
-rw-r--r-- | src/user/app/led/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/user/app/led/main.c b/src/user/app/led/main.c index 5e73c59..dcf830d 100644 --- a/src/user/app/led/main.c +++ b/src/user/app/led/main.c @@ -33,7 +33,7 @@ void parse_range(char *k, int *l1, int *l2) { } } -int main(char **args) { +int main(int argc, char **args) { int linecount; char **lines; int i, j; @@ -53,7 +53,7 @@ int main(char **args) { lines = malloc(1 * sizeof(char*)); lines[0] = 0; } else if (info.type & FT_FILE) { - FILE f = open(args[1], FM_READ); + int f = open(args[1], FM_READ); char* buff = (char*)malloc(info.size); read(f, 0, info.size, buff); close(f); @@ -95,7 +95,7 @@ int main(char **args) { // run while (lines) { printf("[%d lines] ", linecount); - char *s = freadline(term, &hist); + char *s = freadline(stdin, &hist); if (strcmp(s, "q") == 0) { break; } else if (strcmp(s, "l") == 0) { @@ -132,7 +132,7 @@ int main(char **args) { } // write buffer - FILE f = open(args[1], FM_WRITE | FM_TRUNC | FM_CREATE | FT_FILE); + int f = open(args[1], FM_WRITE | FM_TRUNC | FM_CREATE | FT_FILE); if (f > 0) { write(f, 0, buffsz, buff); close(f); |