diff --git a/Makefile b/Makefile index 3953217..4465939 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,9 @@ all: nms sneakers nms-ncurses: $(OBJ)/nms-ncurses.o $(OBJ)/main.o | $(BIN) $(CC) $(CFLAGS) -o $(BIN)/nms $^ -lncurses +sneakers-ncurses: $(OBJ)/nms-ncurses.o $(OBJ)/sneakers.o | $(BIN) + $(CC) $(CFLAGS) -o $(BIN)/sneakers $^ -lncurses + $(OBJ)/%.o: $(SRC)/%.c | $(OBJ) $(CC) $(CFLAGS) -o $@ -c $< diff --git a/src/nms-ncurses.c b/src/nms-ncurses.c index 6f6f640..8084893 100644 --- a/src/nms-ncurses.c +++ b/src/nms-ncurses.c @@ -416,6 +416,15 @@ void nms_set_foreground_color(char *color) { foregroundColor = COLOR_BLUE; } +/* + * nms_set_return_opts() takes a character sting and copies it to the + * returnOpts setting used by nms_exec(). + */ +void nms_set_return_opts(char *opts) { + returnOpts = realloc(returnOpts, strlen(opts) + 1); + strcpy(returnOpts, opts); +} + /* * nms_set_auto_decrypt() sets the autoDecrypt flag according to the * true/false value of the 'setting' argument.