summaryrefslogtreecommitdiff
path: root/files.c
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2019-07-30 12:15:54 +0100
committerKatolaZ <katolaz@freaknet.org>2019-07-30 12:15:54 +0100
commiteebc645dee0d15871d6cc46f156d424cd916b191 (patch)
tree82bb51d04d05a3cf1b4937e2cefb70cc282e9993 /files.c
parenta99759398841d86928c7ad4d8248f907765cbeb2 (diff)
yank buffer and initial copy/cut/paste support
Diffstat (limited to 'files.c')
-rw-r--r--files.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/files.c b/files.c
index c007eac..245b29b 100644
--- a/files.c
+++ b/files.c
@@ -24,7 +24,7 @@ void write_file(FILE *fc){
return;
}
for (i=0; i<HEIGHT; i++){
- fprintf(fout, "%s\n", screen[i].s);
+ fprintf(fout, "%s\n", screen.l[i].s);
}
fclose(fout);
modified = 0;
@@ -50,8 +50,8 @@ void load_file(FILE *fc){
get_string(fc, "Load file: ", newfname, 255);
if ((fin=fopen(newfname, "r")) != NULL){
i = 0;
- while((fgets(screen[i].s, WIDTH+2, fin)) != NULL && i<HEIGHT)
- screen[i++].s[WIDTH-1]='\0';
+ while((fgets(screen.l[i].s, WIDTH+2, fin)) != NULL && i<HEIGHT)
+ screen.l[i++].s[WIDTH-1]='\0';
for(;i<HEIGHT; i++){
erase_line(i);
}