Add alt versions to 1994/schnitzi
The first version uses fgets(3). This version will compile (note that it does not compile right away: one has to make other adjustments; it is not a matter of just changing the code to use fgets()!) but when fed its own source code it will not generate code that can be compiled let alone use fgets(3). The second version, schnitzi.alt2.c, has an increased buffer size but it will not generate code with the same buffer size; rather the size will be the original. I explain this in detail (did this quite some time back) in the bugs.md file. I noticed today that the author gives quite some details too which will be something I can look at later on. Right now it's more important to get the website in order so that the next contest can run! I will only look at this later on or else at a time where I am unable to do the more important work but am able to do this (though I don't know about that happening it is still something that theoretically could happen). The alt code already existed but it was changed to the second version as the goal is to get it to use fgets(3) regardless of the buffer size. Note that the other functionality of both alt versions is not affected. More updates to bugs.md for this and the thanks file has had the entry added to it (which should have been done earlier on but was neglected due to the way it came about, the alt code).
This commit is contained in:
1 parent
b49f5b7352
commit
dc34871805
7 files changed
+169
-25
No files matched your search
+13
-1
@@ -130,7 +130,9 @@ all: data ${TARGET}
|
||||
sandwich supernova deep_magic magic charon pluto
|
||||
|
||||
${PROG}: ${PROG}.c
|
||||
@echo "NOTE: the buffer size of this entry is very small at 100."
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
${PROG}2: ${PROG}2.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
# alternative executable
|
||||
@@ -138,6 +140,16 @@ ${PROG}: ${PROG}.c
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
@echo "NOTE: this version has fgets() but will not generate code that can be compiled."
|
||||
@echo "Other functionality is not affected."
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
${PROG}.alt2: ${PROG}.alt2.c
|
||||
@echo "NOTE: this version has an increased buffer size and will generate code that can"
|
||||
@echo "compile but the buffer size is not increased. Other functionality is unaffected."
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
Reference in new issue
Block a user