Remove C code for foreground color

This commit is contained in:
Greg Shuflin 2023-07-23 20:00:52 -07:00
parent b6acbc2484
commit a1e8fb7aec
6 changed files with 5 additions and 66 deletions

View File

@ -6,6 +6,11 @@ use lexopt::prelude::*;
pub(crate) struct Args {
pub(crate) version: bool,
pub(crate) clear_screen: bool,
///Pass the 'color' argument to the nmstermio module where it will set the
///foreground color of the unencrypted characters as they are
///revealed. Valid arguments are "white", "yellow", "magenta", "blue",
///"green", "red", and "cyan".
pub(crate) foreground: Option<OsString>,
pub(crate) autodecrypt: bool,
pub(crate) mask_blanks: bool,

View File

@ -290,16 +290,6 @@ char nmseffect_exec(unsigned char *string, int string_len) {
return ret;
}
/*
* Pass the 'color' argument to the nmstermio module where it will set the
* foreground color of the unencrypted characters as they are
* revealed. Valid arguments are "white", "yellow", "magenta", "blue",
* "green", "red", and "cyan".
*/
void nmseffect_set_foregroundcolor(char *color) {
nmstermio_set_foregroundcolor(color);
}
/*
* Set the autoDecrypt flag according to the true/false value of the
* 'setting' argument. When set to true, nmseffect_exec() will not

View File

@ -10,7 +10,6 @@
// Function prototypes
char nmseffect_exec(unsigned char *, int string_len);
void nmseffect_set_foregroundcolor(char *);
void nmseffect_set_returnopts(char *);
void nmseffect_set_autodecrypt(int);
void nmseffect_set_maskblank(int);

View File

@ -224,33 +224,6 @@ void nmstermio_set_clearscr(int s) {
clearScr = 0;
}
/*
* Set the desired foreground color of the unencrypted characters as they
* are revealed by nmstermio_print_reveal_string(). Valid arguments are
* "white", "yellow", "magenta", "blue", "green", "red", and "cyan".
*/
void nmstermio_set_foregroundcolor(char *c) {
if(strcmp("white", c) == 0)
foregroundColor = COLOR_WHITE;
else if(strcmp("yellow", c) == 0)
foregroundColor = COLOR_YELLOW;
else if(strcmp("black", c) == 0)
foregroundColor = COLOR_BLACK;
else if(strcmp("magenta", c) == 0)
foregroundColor = COLOR_MAGENTA;
else if(strcmp("blue", c) == 0)
foregroundColor = COLOR_BLUE;
else if(strcmp("green", c) == 0)
foregroundColor = COLOR_GREEN;
else if(strcmp("red", c) == 0)
foregroundColor = COLOR_RED;
else if(strcmp("cyan", c) == 0)
foregroundColor = COLOR_CYAN;
else
foregroundColor = COLOR_BLUE;
}
/*
* Get and returns the current row position of the cursor. This involves
* sending the appropriate ANSI escape code to the terminal and

View File

@ -24,7 +24,6 @@ void nmstermio_show_cursor(void);
void nmstermio_beep(void);
int nmstermio_get_clearscr(void);
void nmstermio_set_clearscr(int);
void nmstermio_set_foregroundcolor(char *);
int nmstermio_get_cursor_row(void);

View File

@ -158,33 +158,6 @@ void nmstermio_set_clearscr(int s) {
clearScr = 0;
}
/*
* Set the desired foreground color of the unencrypted characters as they
* are revealed by nmstermio_print_reveal_string(). Valid arguments are
* "white", "yellow", "magenta", "blue", "green", "red", and "cyan".
*/
void nmstermio_set_foregroundcolor(char *c) {
if(strcmp("white", c) == 0)
foregroundColor = COLOR_WHITE;
else if(strcmp("yellow", c) == 0)
foregroundColor = COLOR_YELLOW;
else if(strcmp("black", c) == 0)
foregroundColor = COLOR_BLACK;
else if(strcmp("magenta", c) == 0)
foregroundColor = COLOR_MAGENTA;
else if(strcmp("blue", c) == 0)
foregroundColor = COLOR_BLUE;
else if(strcmp("green", c) == 0)
foregroundColor = COLOR_GREEN;
else if(strcmp("red", c) == 0)
foregroundColor = COLOR_RED;
else if(strcmp("cyan", c) == 0)
foregroundColor = COLOR_CYAN;
else
foregroundColor = COLOR_BLUE;
}
/*
* Get and returns the current row position of the cursor.
*/