open uses new command format now

master
bx 2022-04-03 09:35:05 +01:00
parent 03d19d3169
commit 1996e05ff6
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
void
c_open(char *file, char **argv) {
FILE *f = fopen(file + 2, "r");
if(argv[1] == NULL) { puts("usage: O filename"); return;}
FILE *f = fopen(argv[1], "r");
if(f == NULL) { puts("couldnt open file."); return; }
b_truncate(buffer);
Row *row = buffer;
@ -38,3 +39,4 @@ c_save(char *file, char **argv) {