Compare commits

..

No commits in common. "da8bc84c36aa846ae9091016a8128da6bbd2dd36" and "6bc7d0b94e99860c55e83c14320146eaad88282a" have entirely different histories.

3 changed files with 46 additions and 3 deletions

View File

@ -17,7 +17,7 @@ CFLAGS ?= -Wextra -Wall -O2
.PHONY: all install uninstall clean .PHONY: all install uninstall clean
nms: $(OBJ)/input.o $(OBJ)/error.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN) nms: $(OBJ)/input.o $(OBJ)/error.o $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/$@ $^ target/release/libnmsrust.a $(CC) $(CFLAGS) -o $(BIN)/$@ $^ target/release/libnmsrust.a
sneakers: $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN) sneakers: $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)
@ -27,7 +27,7 @@ all: nms sneakers
all-ncurses: nms-ncurses sneakers-ncurses all-ncurses: nms-ncurses sneakers-ncurses
nms-ncurses: $(OBJ)/input.o $(OBJ)/error.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN) nms-ncurses: $(OBJ)/input.o $(OBJ)/error.o $(OBJ)/nmscharset.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN)
$(CC) $(CFLAGS) -o $(BIN)/nms $^ -lncursesw $(CC) $(CFLAGS) -o $(BIN)/nms $^ -lncursesw
sneakers-ncurses: $(OBJ)/nmscharset.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN) sneakers-ncurses: $(OBJ)/nmscharset.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)

View File

@ -4,12 +4,43 @@
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of the GPL License. See LICENSE for more details. * under the terms of the GPL License. See LICENSE for more details.
*/ */
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include "nmseffect.h"
#include "input.h"
#include "error.h"
#define VERSION "1.0.1"
extern void rust_main(); extern void rust_main();
int main(void) int main(int argc, char *argv[])
{ {
rust_main(); rust_main();
/*
unsigned char *input = NULL;
int r = input_get(&input, "Enter input: ");
if (r < 0)
{
error_log("Could not get input.");
error_print();
return EXIT_FAILURE;
}
else if (r == 0)
{
error_log("Input is empty.");
error_print();
return EXIT_FAILURE;
}
r = nmseffect_exec(input, r);
free(input);
*/
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }

12
src/nmscharset.c Normal file
View File

@ -0,0 +1,12 @@
/*
* Copyright (c) 2017 Brian Barto
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GPL License. See LICENSE for more details.
*/
/*
* The nmscharset module defines the character set that is used to
* represent encryption.
*/