Readme changes

Also added static function prototypes to prompt.c
This commit is contained in:
Mazar Farran 2015-09-05 12:19:55 -07:00
parent c3f21b2cbc
commit 4e174661ed
3 changed files with 8 additions and 5 deletions

View File

@ -1,11 +1,9 @@
Text Editor Text Editor
=========== ===========
I learned ncurses and figured why not. ![Image of the program in use.](res/text.bmp)
Posting this now (9/30/15) because school is starting
so I don't plan on working on it anymore.
Probably the most well-developed program I made this summer. Functional lightweight text editor written in C using ncurses.
##How to use: ##How to use:
@ -20,4 +18,5 @@ Probably the most well-developed program I made this summer.
* Code could be organized better * Code could be organized better
* Some arguments/variables don't do anything * Some arguments/variables don't do anything
* Tabs are always 4 spaces. This is likely a permanent solution.
* Need to add copy/paste/undo. * Need to add copy/paste/undo.

View File

@ -1,5 +1,10 @@
#include "prompt.h" #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) static int center_x(int width)
{ {
return (COLS - width) / 2; return (COLS - width) / 2;
@ -17,7 +22,6 @@ static WINDOW* create_prompt(const char *message, int height, int width)
werase(prompt); werase(prompt);
mvwprintw(prompt, 1, 1, message); mvwprintw(prompt, 1, 1, message);
wmove(prompt, 2, 0); wmove(prompt, 2, 0);
waddch(prompt, ACS_LTEE);
whline(prompt, ACS_HLINE, 1000); whline(prompt, ACS_HLINE, 1000);
box(prompt, 0, 0); box(prompt, 0, 0);
wmove(prompt, PROMPT_OFFY, PROMPT_OFFX); wmove(prompt, PROMPT_OFFY, PROMPT_OFFX);

BIN
res/text.bmp Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB