From 908c535277c1b86a6a510dd5aae247dfbd2aa312 Mon Sep 17 00:00:00 2001 From: Brian Barto Date: Mon, 25 Apr 2016 17:40:09 -0400 Subject: [PATCH] Endlessly documenting... modified: README.md modified: src/nms.h --- README.md | 30 +++++++++++++++++++++++++++--- src/nms.h | 1 + 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1a5c349..1f7c65b 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,30 @@ you press a key, at which point the program will terminate. Using the Modules in Your Program --------------------------------- +##### Synopsis + +File: synopsis.c +``` +#include "nms.h" + +int main() { + NmsArgs args = INIT_NMSARGS; + + args.src = "This is a simple test"; + + nms_exec(&args); + + return 0; +} + +``` +Compile synopsis.c (must include `nms.c` and `-lncurses`): +``` +gcc nms.c synopsis.c -o synopsis -lncurses +``` + +##### The Details + You will need to copy two files to your project: ``` @@ -92,9 +116,9 @@ typedef struct { } NmsArgs; ``` * `char *src` should contain a pointer to the string of character you wish to perform the effect on. This is the only member that you need to set prior to calling `nms_exec()`. -* `char *return_opts` shuold contain a string of characters, of which one is required by the user to press before nms_exec will return execution back to the calling function. Only use this if the user must choose an option from a menu that is presented after the text "descrypts". See the included program 'sneakers' as an example. -* int input_cursor_x and int input_cursor_y - These should contain the x/y coordinates for the cursor if you wish it to be places at a specific location on screen after the text "decrypts". -* bool show_cursor - set to `true` if you want the cursor to be visible during the text decryption effect. +* `char *return_opts` shuold contain a string of characters, of which one is required by the user to press before nms_exec will return execution back to the calling function. Only use this if the user must choose an option from a menu that is presented after the text "decrypts". See the included program 'sneakers' as an example. +* `int input_cursor_x` and `int input_cursor_y` - These should contain the x/y coordinates for the cursor if you wish it to be placed at a specific location on screen after the text "decrypts". +* `bool show_cursor` - Set to `true` if you want the cursor to be visible during the text decryption effect. License ------- diff --git a/src/nms.h b/src/nms.h index bed17f2..c7d63e2 100644 --- a/src/nms.h +++ b/src/nms.h @@ -1,6 +1,7 @@ #ifndef NMS_H #define NMS_H 1 +#include #include // Default arguments for nms_exec()