Add unobfuscated code from @SirWumpus

The entries 2004/hibachi and 2005/mynx have unobfuscated code now.

2004/hibachi has a configure script that is used along the lines of the
original entry (with some adjustments and fixes) and the hibachi.alt.c
had to have ctype.h included too. The directory src/localhost was copied
to src-alt/localhost but the rest of src/ was from Anthony. The Makefile
had to be updated to build this version.

2005/mynx does have a configure script but it is, just like the original
entry, unused and so the unobfuscated (in source-alt/) is also unused.
The mynx.alt.c was changed to mynx.alt2.c and the unobfuscated code was
made mynx.alt.c.

Updated manifest, rebuilt .entry.json and index.html files.

After a question is answered and taken care of (in one of 199[1-3]/ant -
not sure which one) issue #2513 can possibly be closed as complete
(though the manifest updates will have to be looked at more when 2004
and 2005 are reviewed).
This commit is contained in:
Cody Boone Ferguson committed 2024-07-08 13:11:00 -07:00
1 parent 60ce3d9155
commit 0d65af1b2b
65 files changed
+15579 -218

No files matched your search

+4227
View File
File diff suppressed because it is too large. Load diff
+77
View File
@@ -0,0 +1,77 @@
#######################################################################
# Thus it begins...
#######################################################################
AC_PREREQ(2.59)
AC_INIT(mynx, 1.0, [Public Domain 2005 by Anthony Howe.])
platform=`uname -s|sed -e 's/^\([[a-zA-Z0-9]]*\)[[^a-zA-Z0-9]].*/\1/'`
echo "platform is... $platform"
my_configure_command="$[]0 $[]@"
AC_CHECK_TOOL(autoconf_tool, autoconf)
if test ${autoconf_tool:-no} != 'no' -a \( aclocal.m4 -nt configure -o configure.in -nt configure \); then
echo 'Rebuilding the configure script first...'
autoconf -f
echo 'Restarting configure script...'
echo $my_configure_command
exec $my_configure_command
fi
AC_SUBST(platform, $platform)
#######################################################################
# Auxliary files to be modified later
#######################################################################
AC_CONFIG_SRCDIR($PACKAGE_NAME.c)
AC_CONFIG_FILES(makefile)
#######################################################################
# Configuration options
#######################################################################
AC_ARG_ENABLE(w32,
[AC_HELP_STRING([--disable-w32],[generate Cygwin binary in Cygwin environment])]
)
#######################################################################
# Setup defaults
#######################################################################
if test $platform = 'CYGWIN' -a ${enable_w32:-yes} != 'no' ; then
CFLAGS="-mno-cygwin ${CFLAGS}"
LIBS="-lws2_32 ${LIBS}"
fi
#######################################################################
# We find things...
#######################################################################
AC_PROG_CC
AC_HEADER_STDC
AC_SEARCH_LIBS(socket, [socket nsl],[AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_SOCKET])])])
AC_CHECK_HEADERS(
[arpa/inet.h netdb.h netinet/in.h sys/socket.h sys/ioctl.h],
[], [AC_MSG_FAILURE([Missing required network I/O header.], 1)]
)
AC_CHECK_HEADERS([windows.h winsock2.h])
#######################################################################
# Generate output.
#######################################################################
AC_OUTPUT()
echo
echo $PACKAGE_STRING
echo
AC_MSG_RESULT([ platform...: $platform])
AC_MSG_RESULT([ prefix.....: $prefix])
AC_MSG_RESULT([ CFLAGS.....: $CFLAGS])
AC_MSG_RESULT([ LDFLAGS....: $LDFLAGS])
AC_MSG_RESULT([ LIBS.......: $LIBS])
echo
+52
View File
@@ -0,0 +1,52 @@
#
# Public Domain 2005 by Anthony Howe.
#
.POSIX :
########################################################################
### No further configuration beyond this point.
########################################################################
top_srcdir = ..
PACKAGE = @PACKAGE_NAME@
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
E = @EXEEXT@
#######################################################################
build: ${PACKAGE}$E
clean:
-rm ${PACKAGE}$E
distclean: clean
-rm config.status configure.lineno config.log makefile
-rm -rf autom4te.cache
-rm ioccc$E right$E
${PACKAGE}$E: ${PACKAGE}.c
${CC} ${CFLAGS} ${LDFLAGS} -o${PACKAGE} ${PACKAGE}.c ${LIBS}
${top_srcdir}/${PACKAGE}.c: ${PACKAGE}.c transform.sed ioccc$E ${top_srcdir}/entities.txt
@echo '***************************************************************'
@sed -f transform.sed ${PACKAGE}.c | ioccc$E | sed -e '/^[ ]*$$/d' >${top_srcdir}/${PACKAGE}.c
@echo '***************************************************************'
${top_srcdir}/${PACKAGE}-alt.c: ${top_srcdir}/${PACKAGE}.c right$E
right <${top_srcdir}/${PACKAGE}.c >${top_srcdir}/${PACKAGE}-alt.c
${top_srcdir}/entities.txt: entities.txt
cp entities.txt ${top_srcdir}/entities.txt
ioccc$E: ioccc.c
$(CC) -oioccc$E ioccc.c
right$E: right.c
$(CC) -oright$E right.c
tar: ${top_srcdir}/entities.txt ${top_srcdir}/${PACKAGE}.c ${top_srcdir}/${PACKAGE}-alt.c
+184
View File
@@ -0,0 +1,184 @@
#
# Keywords & Phrases
#
#/LOG/d
#/NDEBUG/d
/^#if/,/^#else/d
/^#endif/d
/UPDATE_ERRNO/d
#
# Replace macros.
#
/^#define peek/d
s/peek(fp)/ungetc(fgetc(fp), fp)/
/^#.*define closesocket/d
s/closesocket/close/
/^#.*define SOCKET/d
s/SOCKET/int/
#
#
#
s/\<int\>/I/
1i\
#define I int
s/char \*/c /
1i\
#define c char *
s/fscanf(fp,/G/
1i\
#define G fscanf(f,
#s/break;/B/
#1i\
##define B break;
#s/goto/j/
#1i\
##define j goto
s/while (/W /
1i\
#define W while(
s/return/k/
1i\
#define k return
s/if (/Q /
1i\
#define Q if(
#s/ else / E /
#1i\
##define E else
#s/fgetc(stdin)/G/
#1i\
##define G fgetc(stdin)
#
#s/fputc(\(.*\), stdout);/p(\1)/
#1i\
##define p(c) fputc(c, stdout);
#
#s/ungetc(\(.*\), stdin)/u(\1)/
#1i\
##define u(c) ungetc(c, stdin)
#
# Constant expansion
#
s/LENGTH/Z/g
s/BUFSIZ/Z/g
s/NULL/0/g
s/(void)//g
s/'\\0'/0/g
s/bufferLength/B/g
s/buffer/b/g
s/\<host\>/h/g
s/\<port\>/H/g
s/linksLength/L/g
s/links/l/g
#
# Functions & Types
#
s/printc(/P(/
s/prints(/p(/
s/mynx(/M(/
s/head/d/
s/spit/D/
s/link/a/
s/fnext(/X(/
s/entity(/e(/
#
# Labels
#
s/error0/a/
s/error1/b/
s/error2/c/
s/display/d/
s/nextpage/e/
#
# Variables
#
# n, m, *s, *t, x, y are used for parameters and local variables.
#
s/fmtbuf/s/g
s/fmt/t/g
s/args/x/g
s/url/t/g
s/mark/m/g
s/rows/R/g
s/row/r/g
s/cols/C/g
s/fp/f/g
s/fd/m/g
s/table/Y/g
s/text/T/g
s/entities\[/S[/g
s/lastspace/q/g
s/next/N/g
s/argc/V/g
s/argv/v/g
s/winsz/w/g
s/\<addr\>/A/g
s/\([^t]\)ch\([^ar]\)/\1x\2/g
s/\([^t]\)he\([^a]\)/\1y\2/g
#
# Expressions
#
#s/([a-z ]*\*) 0/0/g
#s/0 == /!/g
#s/0 == /!/g
s/\([^ ]*[^)]\) == 0/!\1/g
s/\([a-z]*(.*)\) == 0/!\1/g
#s/\((.*)\) == 0/!\1/g
#s/0 < sscanf/sscanf/
s/(0 < /(/g
s/ != 0//g
s/\([^ ]*[^[]\)\[0\]/*\1/g
#s/0 > //g
#s/ < 0)/)/g
#s/R (\(.*\))/R \1/
#
# Braces
#
#/[ ]{/ {
#h
#s/[ ]{//
#a\
#{
#
#}
#
##s/^[ ]*//
#s/^[ ]*}/}/
#
##/^[ ]*$/d
# Expand tabs...
#s/ /&&&&/g
# Compress tabs...
#s/ / /g