home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
GLEN
/
IOCCC7.ZIP
/
STIG.HIN
< prev
next >
Wrap
Text File
|
1990-07-20
|
2KB
|
57 lines
Strangest Abuse of the Rules: <stig@solan.unit.no> Stig Hemmer
Stig Hemmer
Norwegian Institute of Technology
N-7034 Trondheim-NTH
Norway
Judges' comments:
We changed the alias that the author's suggested alias from a
C-shell alias to a Korn shell alias because many C-shells
did not allow Stig Hemmer's form of aliasing. (The error
may have also been due to some uucp site corrupting his
entry) Below is the author's 'how to compile' sections as
mailed to us:
---how to ANSI compile---
Xecho alias c cc -E -o o.c shst.c -"\''Dc=main(){printf("\"N%sested E
Ccomments allowed.\\n\",'/*/*/0*/**/'1?\"\":\"o n\"");}'\'';cc -o c o.c'
Xsource shst.c"|csh
---how to common compile---
Xecho alias c cc -E -o o.c shst.c -"\''Dc=main(){printf("\"N%sested E
Ccomments allowed.\\n\",'/*/*/0*/**/'1?\"\":\"o n\"");}'\'';cc -o c o.c'
Xsource shst.c"|csh
Note that shst.c is renamed to stig.c in the distribution.
Producing an equivalent C-shell alias or /bin/sh function
is left as an exercise to the reader.
WARNING: This program's 'how to compile' is too specific to a particular
shell. The obfuscation of this program to more related to
shell obfuscation than C obfuscation. This type of entry will
not be permitted in future contests.
Selected notes from the author:
If you like shell programming you may also admire my
creative quoting. (I use echo to create an alias
which when run calls cc with the -D option to create a
C macro with double quotes in it. ARRRRRGGGHHH!)
The program is totally portable, but the compile
commands are very shell specific so don't be TOO mad
at me if they don't work for you.
If you want to put these commands in a Makefile you
must add 4 - four - backslashes at the end on first
line. (At least that's what works here.)
If everything works correctly it create an executable
named c which checks whether your compiler supports
nested comments. I've stolen the "/*/*/0*/**/1" from
somewhere so don't give me any points for it. Of
course neither ANSI nor K&R support nested comments
when properly implemented, but what the heck.