diff --git a/README.md b/README.md index d93e82a..b31184a 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,16 @@ so I don't plan on working on it anymore. Probably the most well-developed program I made this summer. -How to use: +##How to use: -F4 quits (no prompt) -F5 saves the current file as save.txt + usage: text [file ] -Current issues: +* F4 quits (no prompt) +* F5 saves the current file (untitled.txt is the default name) +* F6 saves the current file and allows you to specify the filename. +(WARNING: no confirmation screen or error checking yet). + +##Current issues: x-y coordinates in ncurses correspond to rows and columns in the text document. This means tabs are an issue and text @@ -21,4 +25,4 @@ from document logic. Can only save files under the name save.txt. Solution: create a prompt window (from scratch...) that retuns a string to the -caller. +caller. (Done!) diff --git a/makefile b/makefile index e020004..0b27b12 100644 --- a/makefile +++ b/makefile @@ -6,7 +6,7 @@ OBJS=text.o page.o line.o prompt.o LIBS=-lncurses text: $(OBJS) - $(CC) $(CFLAGS) -o text.exe $(OBJS) $(LIBS) + $(CC) $(CFLAGS) -o text $(OBJS) $(LIBS) text.o: text.c text.h page.h line.h prompt.h $(CC) $(CFLAGS) -c text.c diff --git a/text.c b/text.c index bab84fa..cd38dda 100644 --- a/text.c +++ b/text.c @@ -74,6 +74,7 @@ int main(int argc, char *argv[]) prompt_string("Save As:", page.filename); save_file(argc, argv, &page); sprintf(status, "Saved as \'%s\'", page.filename); + print_page(&page, beg, end); update_status(status); break; case KEY_UP: