Remove C code for foreground color
This commit is contained in:
parent
b6acbc2484
commit
a1e8fb7aec
@ -6,6 +6,11 @@ use lexopt::prelude::*;
|
|||||||
pub(crate) struct Args {
|
pub(crate) struct Args {
|
||||||
pub(crate) version: bool,
|
pub(crate) version: bool,
|
||||||
pub(crate) clear_screen: 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) foreground: Option<OsString>,
|
||||||
pub(crate) autodecrypt: bool,
|
pub(crate) autodecrypt: bool,
|
||||||
pub(crate) mask_blanks: bool,
|
pub(crate) mask_blanks: bool,
|
||||||
|
@ -290,16 +290,6 @@ char nmseffect_exec(unsigned char *string, int string_len) {
|
|||||||
return ret;
|
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
|
* Set the autoDecrypt flag according to the true/false value of the
|
||||||
* 'setting' argument. When set to true, nmseffect_exec() will not
|
* 'setting' argument. When set to true, nmseffect_exec() will not
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
// Function prototypes
|
// Function prototypes
|
||||||
char nmseffect_exec(unsigned char *, int string_len);
|
char nmseffect_exec(unsigned char *, int string_len);
|
||||||
void nmseffect_set_foregroundcolor(char *);
|
|
||||||
void nmseffect_set_returnopts(char *);
|
void nmseffect_set_returnopts(char *);
|
||||||
void nmseffect_set_autodecrypt(int);
|
void nmseffect_set_autodecrypt(int);
|
||||||
void nmseffect_set_maskblank(int);
|
void nmseffect_set_maskblank(int);
|
||||||
|
@ -224,33 +224,6 @@ void nmstermio_set_clearscr(int s) {
|
|||||||
clearScr = 0;
|
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
|
* Get and returns the current row position of the cursor. This involves
|
||||||
* sending the appropriate ANSI escape code to the terminal and
|
* sending the appropriate ANSI escape code to the terminal and
|
||||||
|
@ -24,7 +24,6 @@ void nmstermio_show_cursor(void);
|
|||||||
void nmstermio_beep(void);
|
void nmstermio_beep(void);
|
||||||
int nmstermio_get_clearscr(void);
|
int nmstermio_get_clearscr(void);
|
||||||
void nmstermio_set_clearscr(int);
|
void nmstermio_set_clearscr(int);
|
||||||
void nmstermio_set_foregroundcolor(char *);
|
|
||||||
int nmstermio_get_cursor_row(void);
|
int nmstermio_get_cursor_row(void);
|
||||||
|
|
||||||
|
|
||||||
|
@ -158,33 +158,6 @@ void nmstermio_set_clearscr(int s) {
|
|||||||
clearScr = 0;
|
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.
|
* Get and returns the current row position of the cursor.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user