diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2013-06-08 23:09:52 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2013-06-08 23:09:52 +0200 |
commit | 4d65fcb9a8b6c7c6fd5a3390c46a96d11b6a80d4 (patch) | |
tree | c193acf64ff2db985f6664f161cf586c3caeb684 /src/user/app/led/main.c | |
parent | eae9997d3c2dbaef53022ddabe61c1800a619499 (diff) | |
download | TCE-4d65fcb9a8b6c7c6fd5a3390c46a96d11b6a80d4.tar.gz TCE-4d65fcb9a8b6c7c6fd5a3390c46a96d11b6a80d4.zip |
All FWIK is deleted. YOSH is now pure C. Not-working KBASIC included.
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); |