Fix 1991/dds for clang

Looking at the author's remarks (which I hadn't checked yet) I was able
to determine how to get the code to disable warnings when compiling the
generated C code. The text

    !.Xop.fssps!.Xop.sfuvso.uzqf!.Xop.jnqmjdju.gvodujpo.efdmbsbujpo

had to be added to the string 'q' and then

    system(q-6);

had to be changed to

    system(q-69);

to disable the warnings that clang (at least in macOS - not sure
elsewhere) ended up being errors due to the forcing of -Wno-error.

An important point is that the placement of that text does matter due to
the code:

    *o=fopen(q-3,"w");

If the file name is not at the end then what will happen is the 'a.c' file
will not be created as the end of the string 's' will not be (when
decrypted) 'a.c'. At that point the compilation would fail as there is
no file to compile that is created. Thus the end of the string has to
be:

    !.Xop.fssps!.Xop.sfuvso.uzqf!.Xop.jnqmjdju.gvodujpo.efdmbsbujpo!b/d

With this the file can be generated and compiled with both gcc and clang
even if -Werror would otherwise cause problems.

The alt code has been removed and the Makefile no longer has alt code
nor does it have the 'a' rule.
This commit is contained in:
Cody Boone Ferguson committed 2023-10-21 10:40:19 -07:00
1 parent 365bd6cba7
commit 7257727dfa
7 files changed
+50 -103

No files matched your search

+2 -5
View File
@@ -114,8 +114,8 @@ OBJ= ${PROG}.o
DATA=
TARGET= ${PROG}
#
ALT_OBJ= ${PROG}.alt.o
ALT_TARGET= ${PROG}.alt
ALT_OBJ=
ALT_TARGET=
#################
@@ -132,9 +132,6 @@ all: data ${TARGET}
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
a: a.c
${CC} ${CFLAGS} -Wno-return-type $< -o a.out ${LDFLAGS}
# alternative executable
#
alt: data ${ALT_TARGET}