diff --git a/README.md b/README.md index 4f889df..8b12e48 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ Text Editor =========== -I learned ncurses and figured why not. -Posting this now (9/30/15) because school is starting -so I don't plan on working on it anymore. +![Image of the program in use.](res/text.bmp) -Probably the most well-developed program I made this summer. +Functional lightweight text editor written in C using ncurses. ##How to use: @@ -20,4 +18,5 @@ Probably the most well-developed program I made this summer. * Code could be organized better * Some arguments/variables don't do anything +* Tabs are always 4 spaces. This is likely a permanent solution. * Need to add copy/paste/undo. diff --git a/prompt.c b/prompt.c index 3885cbe..cae663b 100644 --- a/prompt.c +++ b/prompt.c @@ -1,5 +1,10 @@ #include "prompt.h" +static int center_x(int width); +static int center_y(int height); +static WINDOW* create_prompt(const char *message, int height, int width); +static void dest_prompt(WINDOW *prompt); + static int center_x(int width) { return (COLS - width) / 2; @@ -17,7 +22,6 @@ static WINDOW* create_prompt(const char *message, int height, int width) werase(prompt); mvwprintw(prompt, 1, 1, message); wmove(prompt, 2, 0); - waddch(prompt, ACS_LTEE); whline(prompt, ACS_HLINE, 1000); box(prompt, 0, 0); wmove(prompt, PROMPT_OFFY, PROMPT_OFFX); diff --git a/res/text.bmp b/res/text.bmp new file mode 100755 index 0000000..9f78cf0 Binary files /dev/null and b/res/text.bmp differ