Updates and improvements to 2000/thadgavin
The alt code now allows one to quit early (in curses mode) and this calls endwin() to restore terminal sanity. Due to the way the code is designed the function which does that has to be defined three times but only one has any code in it, that of the curses one. This means that nodelay() is also called when initialising curses. At least at this time the original entry does not have this feature and so one will have to type 'reset' after they end the program to restore terminal sanity. The alt code has been improved in another way too: now one does not have to specify both macros at the command line when wishing to configure only one of the programs. This is accomplished by #ifndef..#endif blocks at the beginning of the file. That has not been done in other entries but probably should be to help out. The README.md file has been typo/format checked/fixed. The FAQ has been updated as well: a question about how to use entries that require curses has been added. This required some minor reordering of the numbers but I believe that I got everything okay.
This commit is contained in:
1 parent
c7db405f24
commit
ee6f09403a
5 files changed
+164
-67
No files matched your search
@@ -62,7 +62,7 @@ CDEFINE= -DZ=30 -DZS=150000
|
||||
|
||||
# Include files that are needed to compile
|
||||
#
|
||||
CINCLUDE= -include unistd.h
|
||||
CINCLUDE= -include unistd.h -include stdlib.h
|
||||
|
||||
# Optimization
|
||||
#
|
||||
@@ -112,10 +112,10 @@ PROG= ${ENTRY}
|
||||
#
|
||||
OBJ= ${PROG}.o
|
||||
DATA=
|
||||
TARGET= ${PROG}
|
||||
TARGET= ${PROG} ${PROG}_sdl
|
||||
#
|
||||
ALT_OBJ= ${PROG}.alt.o
|
||||
ALT_TARGET= ${PROG}.alt
|
||||
ALT_OBJ= ${PROG}.alt.o ${PROG}.alt_sdl.o
|
||||
ALT_TARGET= ${PROG}.alt ${PROG}.alt_sdl
|
||||
|
||||
|
||||
#################
|
||||
@@ -145,10 +145,10 @@ alt: data ${ALT_TARGET}
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
|
||||
${PROG}.alt_sdl: ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} -DSDL `${SDL1_CONFIG} --cflags` $< -o $@ ${LDFLAGS} `${SDL1_CONFIG} --libs`
|
||||
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
Reference in new issue
Block a user