summaryrefslogtreecommitdiff
path: root/gramscii.c
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2019-07-24 12:34:29 +0100
committerKatolaZ <katolaz@freaknet.org>2019-07-24 12:34:29 +0100
commit1be4c30c5e1526484665c382d784e0de9fe9d8de (patch)
tree551df692508b64c3ebf54435704e948f5fdc0875 /gramscii.c
parent3a8eeffc5b3ef3d23984913d841e3a0aa5f68e16 (diff)
add config.h
Diffstat (limited to 'gramscii.c')
-rw-r--r--gramscii.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/gramscii.c b/gramscii.c
index f7f2ed4..2d8b593 100644
--- a/gramscii.c
+++ b/gramscii.c
@@ -12,6 +12,8 @@
#include <string.h>
#include <sys/ioctl.h>
+#include "config.h"
+
#define MOVE 0x00
#define BOX 0x01
#define ARROW 0x02
@@ -40,7 +42,6 @@
#define ARR_U '^'
#define ARR_D 'v'
-
#define HOME 0x01
#define END 0x02
#define MIDDLE 0x04
@@ -51,7 +52,7 @@
#define MIN(x,y) (x) < (y) ? (x) : (y)
#define MAX(x,y) (x) > (y) ? (x) : (y)
-#define DEBUG 1
+/** #define DEBUG 1 **/
char **screen;
int WIDTH, HEIGHT;
@@ -64,11 +65,6 @@ int step;
int force_new;
char cursor;
char corner;
-char hlines[] = {"-~=#@._ "};
-char vlines[] = {"|H#@:;i "};
-char corners[] = {"+'H#@.\""};
-char st_marks[] = {"+o-|<>^v"};
-char end_marks[] = {">+o-|<^v"};
int hlines_sz= sizeof(hlines) -1;
int vlines_sz= sizeof(vlines) -1;
@@ -308,22 +304,22 @@ void handle_goto(){
int move_around(char c){
switch(c){
- case 'H': step = 5;/** FALLTHROUGH **/
+ case 'H': step = LONG_STEP;/** FALLTHROUGH **/
case 'h':
dir = DIR_L;
x -= step;
break;
- case 'J': step = 5;/** FALLTHROUGH **/
+ case 'J': step = LONG_STEP;/** FALLTHROUGH **/
case 'j':
dir = DIR_D;
y += step;
break;
- case 'K': step = 5;/** FALLTHROUGH **/
+ case 'K': step = LONG_STEP;/** FALLTHROUGH **/
case 'k':
dir = DIR_U;
y -= step;
break;
- case 'L': step = 5;/** FALLTHROUGH **/
+ case 'L': step = LONG_STEP;/** FALLTHROUGH **/
case 'l':
dir = DIR_R;
x += step;
@@ -687,7 +683,7 @@ void load_file(){
void new_file(){
check_modified();
erase_screen();
- go_to(MIDDLE);
+ go_to(HOME);
redraw();
fname[0] = '\0';
modified=0;