diff --git a/Makefile b/Makefile index d721405..28a6bb6 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ OBJ = $(SRC:.c=.o) CC = gcc INCLUDE = . DEFINE = _GNU_SOURCE -CFLAGS = -DNDEBUG -g3 -Wextra -Wstrict-prototypes -Wall -ansi -pedantic -I$(INCLUDE) +CFLAGS = -g3 -Wextra -Wstrict-prototypes -Wall -ansi -pedantic -I$(INCLUDE) LIB = -lutil RM = rm -f diff --git a/test.c b/test.c index 29b3d82..ac2ab48 100644 --- a/test.c +++ b/test.c @@ -13,6 +13,7 @@ void disp(struct vt100_headless *vt100) const char **lines; lines = vt100_dump(vt100->term); + write(1, "\n", 1); for (y = 0; y < vt100->term->height; ++y) { write(1, lines[y], vt100->term->width); diff --git a/vt100_headless.c b/vt100_headless.c index eca0513..d899b0f 100644 --- a/vt100_headless.c +++ b/vt100_headless.c @@ -45,6 +45,7 @@ static void restore_termios(struct vt100_headless *this, int fd) /* fprintf(stderr, "\n"); */ /* } */ +#ifndef NDEBUG static void strdump(char *str) { while (*str != '\0') @@ -57,6 +58,7 @@ static void strdump(char *str) } fprintf(stderr, "\n"); } +#endif static int main_loop(struct vt100_headless *this) { @@ -95,7 +97,9 @@ static int main_loop(struct vt100_headless *this) return EXIT_FAILURE; } buffer[read_size] = '\0'; +#ifndef NDEBUG strdump(buffer); +#endif terminal_read_str(this->term->terminal, buffer); this->changed(this); }