home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / languages / C / ioccc / 1990-Obfuscated-C-Code-Contest.2.1 next >
Encoding:
Internet Message Format  |  1992-10-18  |  46.2 KB

  1. Path: usage.csd.unsw.oz.au!metro!munnari.oz.au!samsung!dali.cs.montana.edu!ogicse!ucsd!pacbell.com!pacbell!rtech!cpsc6a!hoptoad!chongo
  2. From: chongo@hoptoad.uucp (Landon C. Noll)
  3. Newsgroups: comp.lang.c,comp.sources.d,comp.unix.internals,alt.sources,misc.misc
  4. Subject: 1990 International Obfuscated C Code Contest winners 1 of 2
  5. Message-ID: <15947@hoptoad.uucp>
  6. Date: 8 Mar 91 14:13:01 GMT
  7. Expires: 15 May 91 00:00:00 GMT
  8. Reply-To: chongo@hoptoad.UUCP (Landon C. Noll)
  9. Organization: Nebula Consultants in San Francisco
  10. Lines: 1504
  11. Xref: usage.csd.unsw.oz.au comp.lang.c:14680 comp.sources.d:4248 comp.unix.internals:2392 alt.sources:1446 misc.misc:1610
  12.  
  13. I was unable to find the 1990 IOCCC winners on uunet, so here is a reposting
  14. of them.  Sorry for the repeat, but there is normally a collection of people
  15. who want to see last year when the rules are posted.
  16.  
  17. Submitted-by: chongo@toad.com (Landon Curt Noll)
  18. #
  19. # Send comments, questions, bugs to: 
  20. #
  21. #    judges@toad.com   -or-   ...!{sun,uunet,utzoo,pyramid}!hoptoad!judges
  22. #
  23. # You are strongly encouraged to read the new contest rules before
  24. # sending any entries.  The rules, and sometimes the contest Email
  25. # address itself, change over time.  A valid entry one year may
  26. # be rejected in a later year due to changes in the rules.  The typical
  27. # start date for a contest is early March.  The typical end date for a
  28. # contest is late May.
  29. #
  30. # The contest rules are posted to comp.unix.wizards, comp.lang.c,
  31. # misc.misc, alt.sources and comp.sources.d.  If you do not have access 
  32. # to these groups, or if you missed the early March posting, you may 
  33. # request a copy from the judges, via Email, at the address above.
  34. #
  35. Archive-name: ioccc.1990/part01
  36.  
  37. ---- Cut Here and unpack ----
  38. #!/bin/sh
  39. # This is ioccc.1990, a shell archive (shar 3.32)
  40. # made 09/23/1990 00:16 UTC by chongo@toad.com (Landon Curt Noll)
  41. #
  42. # Send comments, questions, bugs to: 
  43. #
  44. #    judges@toad.com   -or-   ...!{sun,uunet,utzoo,pyramid}!hoptoad!judges
  45. #
  46. # You are strongly encouraged to read the new contest rules before
  47. # sending any entries.  The rules, and sometimes the contest Email
  48. # address itself, change over time.  A valid entry one year may
  49. # be rejected in a later year due to changes in the rules.  The typical
  50. # start date for a contest is early March.  The typical end date for a
  51. # contest is late May.
  52. #
  53. # The contest rules are posted to comp.unix.wizards, comp.lang.c,
  54. # misc.misc, alt.sources and comp.sources.d.  If you do not have access 
  55. # to these groups, or if you missed the early March posting, you may 
  56. # request a copy from the judges, via Email, at the address above.
  57. #
  58. # Source directory /usr4/chongo/bench/contest
  59. #
  60. # existing files WILL be overwritten
  61. #
  62. # This shar contains:
  63. # length  mode       name
  64. # ------ ---------- ------------------------------------------
  65. #   1265 -r--r--r-- 1990/README
  66. #   8876 -r--r--r-- 1990/rules
  67. #   1622 -r--r--r-- 1990/Makefile
  68. #   1711 -r--r--r-- 1990/ansi.mk
  69. #   2327 -r--r--r-- 1990/common.mk
  70. #    231 -r--r--r-- 1990/baruch.c
  71. #   1512 -r--r--r-- 1990/cmills.c
  72. #   1536 -r--r--r-- 1990/dds.c
  73. #   1526 -r--r--r-- 1990/dg.c
  74. #    999 -r--r--r-- 1990/jaw.c
  75. #    879 -r--r--r-- 1990/pjr.c
  76. #   1474 -r--r--r-- 1990/scjones.c
  77. #      2 -r--r--r-- 1990/stig.c
  78. #    886 -r--r--r-- 1990/tbr.c
  79. #   1511 -r--r--r-- 1990/theorem.c
  80. #   1529 -r--r--r-- 1990/westley.c
  81. #   1908 -r--r--r-- 1990/baruch.hint
  82. #   1054 -r--r--r-- 1990/cmills.hint
  83. #   2315 -r--r--r-- 1990/dds.hint
  84. #   1733 -r--r--r-- 1990/dg.hint
  85. #   7401 -r--r--r-- 1990/jaw.hint
  86. #   1479 -r--r--r-- 1990/pjr.hint
  87. #   2466 -r--r--r-- 1990/scjones.hint
  88. #   2213 -r--r--r-- 1990/stig.hint
  89. #   3890 -r--r--r-- 1990/tbr.hint
  90. #   2585 -r--r--r-- 1990/theorem.hint
  91. #   1489 -r--r--r-- 1990/westley.hint
  92. #   1624 -r--r--r-- 1990/LANDER.BAS
  93. #    136 -r--r--r-- 1990/stig.ksh
  94. #   1522 -r--r--r-- 1990/shark.sh
  95. #
  96. if touch 2>&1 | fgrep 'amc' > /dev/null
  97.  then TOUCH=touch
  98.  else TOUCH=true
  99. fi
  100. # ============= 1990/README ==============
  101. if test ! -d '1990'; then
  102.     echo "x - creating directory 1990"
  103.     mkdir '1990'
  104. fi
  105. echo "x - extracting 1990/README (Text)"
  106. sed 's/^X//' << 'SHAR_EOF' > 1990/README &&
  107. X1990 marked the "The Seventh International Obfuscated C Code Contest"
  108. X
  109. XInstructions for use: Run make to compile entries (it is possible that
  110. Xon System V or non-unix systems the makefile needs to be changed). The
  111. Xansi.mk may need to be changed if your ANSI C compiler is not gcc.
  112. X
  113. XLook at the source and try to figure out what the programs do, and run
  114. Xthem with various inputs.  If you want to, look at the hints files for
  115. X(minor) spoilers.
  116. X
  117. XThis year, the Grand Prize won a standing ovation at USENIX.
  118. X
  119. XThe "Strangest abuse of the rules" award was given this year to stress
  120. Xthe fact that starting in 1991, entries should be shell-specific.
  121. X
  122. XThis year was the first year that we accepted ANSI C entries.  It was
  123. Xinteresting to note that the ANSI C entries were as a whole less
  124. Xportable than the K&R C entries.  We hope that in future contests
  125. Xpeople will enter more obfuscated and challenging ANSI C programs.
  126. X
  127. XWe would like to thank Barbara Frezza (loving wife of Larry Bassel) for
  128. Xher role as official chef of the contest.  Her opinions regarding
  129. Xsome of the contest entries were appreciated.
  130. X
  131. XRules and results were posted to comp.lang.c, comp.sources.unix, and
  132. Xalt.sources.  They have been made available on a wide number of Usenet
  133. Xarchive sites such as uunet.
  134. SHAR_EOF
  135. $TOUCH -am 0922163990 1990/README &&
  136. chmod 0444 1990/README ||
  137. echo "restore of 1990/README failed"
  138. set `wc -c 1990/README`;Wc_c=$1
  139. if test "$Wc_c" != "1265"; then
  140.     echo original size 1265, current size $Wc_c
  141. fi
  142. # ============= 1990/rules ==============
  143. echo "x - extracting 1990/rules (Text)"
  144. sed 's/^X//' << 'SHAR_EOF' > 1990/rules &&
  145. X7th International Obfuscated C Code Contest Rules
  146. X
  147. X    Obfuscate:  tr.v.  -cated, -cating, -cates.  1. a.  To render obscure.
  148. X        b.  To darken.  2. To confuse:  his emotions obfuscated his
  149. X        judgment.  [LLat. obfuscare, to darken : ob(intensive) +
  150. X        Lat. fuscare, to darken < fuscus, dark.] -obfuscation n.
  151. X        obfuscatory adj.
  152. X
  153. XGOALS OF THE CONTEST:
  154. X
  155. X    * To write the most Obscure/Obfuscated C program under the rules below.
  156. X    * To show what should NOT be done in C programs.
  157. X    * To provide a safe forum for poor C code.  :-)
  158. X
  159. XDEDICATION:
  160. X
  161. X    The 1990 International Obfuscated C Code Contest is dedicated to ANSI C.
  162. X
  163. XRULES:
  164. X
  165. X    To help us handle the vast volume of entries, we ask that you
  166. X    follow the rules below.  Sorry for the length, but we need all
  167. X    the help we can get!
  168. X
  169. X    1) Your source MUST be 1536 bytes or less, and it must be a complete
  170. X       program, not just a subroutine.
  171. X
  172. X    2) To help us process your entries, we ask that you submit entries
  173. X       in the following format.  Please be sure to include ALL --- lines,
  174. X       otherwise our extraction program may skip your entry!
  175. X
  176. X---header items---
  177. Xname:        Your name, of course!
  178. Xorg:        School/Company/Organization
  179. Xemail address:    Email address from a well known site, or in a registered domain
  180. Xpostal address:    Postal address
  181. X        include your country as well
  182. Xenvironment:    Indicate the Hardware 
  183. X        and OS under which your program was tested
  184. Xentry:        5    <number of entries sent so far including this one>
  185. Xremarks:    Remarks may be continued with leading whitespace until the
  186. X        line ---how to compile-- is encountered.  (see #3 below)
  187. X---how to ANSI compile---
  188. XX Give the command(s) needed to compile your program using an ANSI C
  189. XX compiler.  If you program should not be compiled under an ANSI C compiler, 
  190. XX leave this section blank.  Follow the format rules for the program 
  191. XX section below, except that command size must be 160 characters or less.
  192. X---how to common compile---
  193. XX Give the command(s) needed to compile your program using an K&R/traditional
  194. XX C compiler.  If you program should not be compiled under a K&R style C, 
  195. XX leave this section blank.  Follow the format rules for the program section
  196. XX below, except that command size must be 160 characters or less.
  197. X---program---
  198. XX Place obfuscated source of 1536 characters or less in this section.
  199. XX Add a leading X to each line to avoid problems with mailers.
  200. XX Some mailers don't like files with very long lines.  If your entry contains E
  201. XC    lines longer 80 chars we ask you to form continuation line sets.  To form E
  202. XC    a continuation line set, place an 'E' character at the point of a split E
  203. XC    and place a C (instead of an X) at the beginning of the next line. E
  204. XC    Finally, end the continuation line set as normal.
  205. XX The E\nC's and leading X's will be removed prior to extraction and thus E
  206. XC    they don't contribute toward the source character count.  All other E
  207. XC    characters are considered to be source.  Whitespace after 'X' or 'C' E
  208. XC    and before the 'E' is significant, we added it here for readability.
  209. XX Newlines and tabs each count as 1 character.  Assume 8 character tab stops.
  210. XX If your entry does not end in a newline, leave a final 'E' on the end. E
  211. X---end---
  212. X
  213. X    3) Regarding the header items:
  214. X
  215. X    * Any text outside of the above format will be kept confidential.
  216. X
  217. X    * All header lines are required, but you may use 'anonymous'
  218. X      for any header line other than 'remarks' or 'entry'.
  219. X
  220. X    * In the 'remarks' please include:
  221. X        - what this program does
  222. X        - why you think the program is obfuscated
  223. X        - any other remarks (humorous or otherwise)
  224. X    
  225. X    4) Your entry should be written in common C (K&R + common extensions)
  226. X       or ANSI C.  If your program will NOT compile under an ANSI C or 
  227. X       K&R C compiler, leave the particular 'how to' section blank.
  228. X
  229. X       You do not have to fill in both 'how to' sections, though you must
  230. X       fill in at least one 'how to' section.
  231. X
  232. X       If you leave a 'how to' section blank, include the '---' line, but
  233. X       but having no command lines after it.
  234. X
  235. X    5) The program must be of original work.  All programs must be
  236. X       in the public domain.  All copyrighted programs will be rejected.
  237. X
  238. X    6) Entries must be received between 16-Mar-90 0:00 GMT and 
  239. X       26-May-90 0:00 GMT.  Email your entries to:
  240. X       
  241. X        ...!{sun,pacbell,uunet,utzoo,pyramid,amdahl}!hoptoad!obfuscate
  242. X
  243. X       We will attempt to Email a confirmation of receipt of contest
  244. X       entries, however since Email is not reliable you may not receive it.
  245. X       We regret that we can no longer accept entries via postal mail.
  246. X
  247. X    7) Each person may submit up to 8 entries.  Multiple entries must
  248. X       be sent in separate Email letters.
  249. X    
  250. X    8) Entries that can not be built automatically in a portable makefile 
  251. X       are not allowed.  (e.g., don't use #include "/dev/tty")
  252. X
  253. X    9) Starting this year, compiling entries must result an regular file
  254. X       which can be executed. (No -o /dev/tty or similar compile lines)
  255. X
  256. X
  257. XANNOUNCEMENT OF WINNERS:
  258. X
  259. X    * First announcement will likely be at the Summer 90 Usenix BOF.
  260. X
  261. X    * Winning entries will be posted in mid June 1990 to 
  262. X      comp.sources.unix as well as news groups where these rules 
  263. X      were posted.  (depending on the judges work load)
  264. X    
  265. X    * Winning entries will be deposited into the uunet archives.
  266. X
  267. X    * An article containing the winning entries will be published
  268. X      in a future issue of the "Micro/Systems Journal".
  269. X
  270. X    * Winners receive international fame and flames!  :-)
  271. X
  272. X
  273. XJUDGING:
  274. X
  275. X    Awards will be given to the best entry in a number of categories.
  276. X    The actual category list will vary depending on the types of entries
  277. X    we receive.  As a guide, consider using the following:
  278. X
  279. X    * The best small one line program
  280. X    * The strangest source layout
  281. X    * The most useful obfuscated program
  282. X    * The most creatively obfuscated program
  283. X    * Best obfuscated entry smaller than 256 bytes
  284. X    * Best obfuscated entry smaller than 1024 bytes
  285. X    * Best abuse of ANSI
  286. X    * Worse abuse of the rules (no abuse of entry format please!)
  287. X    * <anything else so strange that it deserves an award>
  288. X
  289. XPOINTS TO PONDER:
  290. X
  291. X    People are encouraged to examine winners of the previous
  292. X    contests.  A copy of these entries was posted to
  293. X    comp.sources.unix.  Contact the comp.sources.unix moderator, or
  294. X    some archive site (such as uunet).  Keep in mind that rules
  295. X    change from year to year, so some winning entries may not be
  296. X    valid entries this year.  What was unique and novel one year
  297. X    might be 'old' the next year.  In short, use your best judgment.
  298. X
  299. X    We examine each entry on several levels of confusion.  For example
  300. X    each entry is judged when we:
  301. X
  302. X    * look at the original source
  303. X    * run it through:  sed -e ',^#[     ]*define,d' | /lib/cpp
  304. X    * run it through:  sed -e ',^#[     ]*include,d' | /lib/cpp
  305. X    * run it through a C beautifier
  306. X    * examine the algorithm
  307. X    * compile and lint it
  308. X    * execute it
  309. X    
  310. X    One line programs are best when they are short, obscure and concise.
  311. X
  312. X    We tend to dislike programs that:
  313. X
  314. X    * are very hardware specific
  315. X    * are very OS or Un*x version specific
  316. X         (index/strchr differences are ok, but socket/streams specific 
  317. X          code is likely not to be)
  318. X    * dump core or have compiler warnings
  319. X         (it is ok only if you warn us in the 'remark' header item)
  320. X    * won't compile under both BSD or SYS V Un*x
  321. X    * use an excessively long compile line to get around the size limit
  322. X    * are longer than they need to be
  323. X    * are similar to previous winners
  324. X    * are similar to previous losers  :-)
  325. X
  326. X    Simply abusing #defines or -Dfoo=bar won't go as far as a program
  327. X    that is more well rounded in confusion.
  328. X
  329. X    Unless you are cramped for space, or unless you are entering the 
  330. X    'best one liner' category, we suggest that you format your program 
  331. X    in a more creative way than simply forming excessively long lines.
  332. X
  333. X    We like programs that:
  334. X
  335. X    * are as concise and small as they need to be
  336. X    * do something quasi-interesting
  337. X    * pass lint without complaint (particularly strict ANSI ones)
  338. X    * are portable
  339. X    * are unique or novel in their obfuscation style
  340. X    * MAKE USE OF A NUMBER OF DIFFERENT TYPES OF OBFUSCATION
  341. X    * make us laugh and/or throw up  :-)
  342. X
  343. X    Some types of programs can't excel in some areas.  Of course, your 
  344. X    program doesn't have to excel in all areas, but doing well in several 
  345. X    areas really does help.
  346. X
  347. X    Be creative!
  348. X
  349. X    The Judging will be done by Landon Noll and Larry Bassel.  If you have
  350. X    any QUESTIONS or COMMENTS, please feel free to send them to:
  351. X
  352. X    ...!{sun,pacbell,uunet,pyramid,amdahl}!hoptoad!judges
  353. X    judges@toad.com
  354. X
  355. X    however contest entries should be sent to: 
  356. X    
  357. X    ...!{sun,pacbell,uunet,pyramid,amdahl}!hoptoad!obfuscate
  358. X    obfuscate@toad.com
  359. X
  360. X
  361. Xchongo <Landon Curt Noll> /\cc/\      hoptoad!chongo
  362. XLarry Bassel                  {amdahl,ucbvax,cbosgd}|sun!lab
  363. SHAR_EOF
  364. $TOUCH -am 0922163990 1990/rules &&
  365. chmod 0444 1990/rules ||
  366. echo "restore of 1990/rules failed"
  367. set `wc -c 1990/rules`;Wc_c=$1
  368. if test "$Wc_c" != "8876"; then
  369.     echo original size 8876, current size $Wc_c
  370. fi
  371. # ============= 1990/Makefile ==============
  372. echo "x - extracting 1990/Makefile (Text)"
  373. sed 's/^X//' << 'SHAR_EOF' > 1990/Makefile &&
  374. X# %W% %G% %U%
  375. X#
  376. X# 1990 makefile
  377. X
  378. XSHELL=/bin/sh
  379. XMAKE=make
  380. XMAKEFLAGS=e
  381. X
  382. X# uncomment the line to select the preferred type of compile
  383. X#
  384. X# You should also check the ansi.mk or common.mk for the
  385. X# proper compiler name and flags.
  386. X#
  387. X# NOTE ==> USE=ansi     compile with an ANSI compiler by default
  388. X#USE=ansi
  389. X# NOTE ==> USE=common   compile with a common K&R compiler by default
  390. X#USE=common
  391. X
  392. XWINNERS=cmills pjr westley stig tbr db dds theorem baruch jaw scjones
  393. X
  394. Xall:
  395. X    -@if [ "${USE}" = "common" ]; then \
  396. X        echo ${MAKE} -k -f common.mk all; \
  397. X        ${MAKE} -k -f common.mk all; \
  398. X    elif [ "${USE}" = "ansi" ]; then \
  399. X        echo ${MAKE} -k -f ansi.mk all; \
  400. X        ${MAKE} -k -f ansi.mk all; \
  401. X    else \
  402. X        echo "set USE= in Makefile to be ansi or common as desired"; \
  403. X        echo "or type: make -f ansi.mk for ansi makes"; \
  404. X        echo "or type: make -f common.mk for common K&R makes"; \
  405. X        exit 1; \
  406. X    fi
  407. X
  408. Xansi:
  409. X    ${MAKE} -f ansi.mk all
  410. X
  411. Xcommon:
  412. X    ${MAKE} -f common.mk all
  413. X
  414. X${WINNERS}:
  415. X    -@if [ "${USE}" = "common" ]; then \
  416. X        echo ${MAKE} -k -f common.mk $@; \
  417. X        ${MAKE} -k -f common.mk $@; \
  418. X    elif [ "${USE}" = "ansi" ]; then \
  419. X        echo ${MAKE} -k -f ansi.mk $@; \
  420. X        ${MAKE} -k -f ansi.mk $@; \
  421. X    else \
  422. X        echo "set USE= in Makefile to be ansi or common as desired"; \
  423. X        echo "or type: make -f ansi.mk for ansi makes"; \
  424. X        echo "or type: make -f common.mk for common K&R makes"; \
  425. X        exit 1;\
  426. X    fi
  427. X
  428. Xclean:
  429. X    ${MAKE} -f ansi.mk clean
  430. X    ${MAKE} -f common.mk clean
  431. Xclobber:
  432. X    ${MAKE} -f ansi.mk clobber
  433. X    ${MAKE} -f common.mk clobber
  434. Xnuke: clobber
  435. X    ${MAKE} -f ansi.mk nuke
  436. X    ${MAKE} -f common.mk nuke
  437. Xinstall:
  438. X    ${MAKE} -f ansi.mk install
  439. X    ${MAKE} -f common.mk install
  440. SHAR_EOF
  441. $TOUCH -am 0922165290 1990/Makefile &&
  442. chmod 0444 1990/Makefile ||
  443. echo "restore of 1990/Makefile failed"
  444. set `wc -c 1990/Makefile`;Wc_c=$1
  445. if test "$Wc_c" != "1622"; then
  446.     echo original size 1622, current size $Wc_c
  447. fi
  448. # ============= 1990/ansi.mk ==============
  449. echo "x - extracting 1990/ansi.mk (Text)"
  450. sed 's/^X//' << 'SHAR_EOF' > 1990/ansi.mk &&
  451. X# %W% %G% %U%
  452. X#
  453. X# 1990 makefile
  454. X
  455. XSHELL=/bin/sh
  456. X
  457. X# flags for ANSI compiles
  458. X#
  459. X# These flags are setup for gcc, change as/if needed
  460. X#
  461. XPEDANTIC=-pedantic
  462. XCFLAGS=-O -ansi 
  463. XCHMOD=chmod
  464. XCC=gcc
  465. XCP=cp
  466. XRM=rm
  467. XLN=ln
  468. X
  469. X# winners that may be ok to compile with ANSI
  470. X#
  471. XWINNERS=cmills pjr westley stig tbr dg baruch jaw scjones
  472. X
  473. Xall: ${WINNERS}
  474. X
  475. Xansi: all
  476. X
  477. Xcommon:
  478. X    @echo "wrong makefile, use common.mk"
  479. X    exit 1
  480. X
  481. Xcmills: cmills.c
  482. X    ${CC} ${CFLAGS} -DM=500 -DN=52 -DX="srand((int)time(0L))" -DV=void \
  483. X        -o cmills cmills.c
  484. X
  485. Xpjr: pjr.c
  486. X    ${CC} ${CFLAGS} pjr.c -o pjr
  487. X
  488. Xwestley: westley.c
  489. X    ${CC} ${CFLAGS} westley.c -o westley
  490. X
  491. Xstig: stig.c stig.ksh
  492. X    @echo "run the Korn shell, and source stig.ksh"
  493. X    @echo "or read stig.hint and create your own aliases"
  494. X
  495. Xscjones: scjones.c
  496. X    ${CC} ${CFLAGS} scjones.c -o scjones
  497. X
  498. Xtbr: tbr.c
  499. X    ${CC} ${CFLAGS} tbr.c -o tbr
  500. X
  501. Xdg: dg.c
  502. X    ${CC} ${CFLAGS} dg.c -Dindex=strchr -o dg
  503. X    # compile with the following if you don't have strchr()
  504. X    #${CC} ${CFLAGS} dg.c -o dg
  505. X
  506. Xdds: dds.c LANDER.BAS
  507. X    ${CC} ${CFLAGS} dds.c -o dds
  508. X
  509. Xtheorem: theorem.c
  510. X    ${CC} ${CFLAGS} theorem.c -o theorem
  511. X    ${RM} -f sorter.c
  512. X    -./theorem -r 0 0 0 0 < theorem.c > sorter.c
  513. X    ${CC} ${CFLAGS} sorter.c -o sorter
  514. X    ${RM} -f fibonacci.c
  515. X    -./sorter 0 0 0 0 < theorem.c > fibonacci.c
  516. X    ${CC} ${CFLAGS} fibonacci.c -o fibonacci
  517. X
  518. Xbaruch: baruch.c
  519. X    ${CC} ${CFLAGS} baruch.c -o baruch
  520. X
  521. Xjaw: jaw.c shark.sh
  522. X    ${RM} -f ./zcat ./atob ./jaw
  523. X    ${CC} ${CFLAGS} ${PEDANTIC} jaw.c -o zcat
  524. X    ${LN} zcat atob
  525. X    echo 'PATH=;export PATH;atob|zcat' > jaw
  526. X    ${CHMOD} 0555 ./jaw
  527. X
  528. Xclean:
  529. X    ${RM} -f *.o a.out core
  530. Xclobber: clean
  531. X    ${RM} -f ${WINNERS} sorter.c sorter
  532. X    ${RM} -f fibonacci.c fibonacci atob zcat
  533. Xnuke: clobber
  534. X    @true
  535. Xinstall: all
  536. X    cat ${WINNERS} > /dev/null
  537. SHAR_EOF
  538. $TOUCH -am 0922164990 1990/ansi.mk &&
  539. chmod 0444 1990/ansi.mk ||
  540. echo "restore of 1990/ansi.mk failed"
  541. set `wc -c 1990/ansi.mk`;Wc_c=$1
  542. if test "$Wc_c" != "1711"; then
  543.     echo original size 1711, current size $Wc_c
  544. fi
  545. # ============= 1990/common.mk ==============
  546. echo "x - extracting 1990/common.mk (Text)"
  547. sed 's/^X//' << 'SHAR_EOF' > 1990/common.mk &&
  548. X# %W% %G% %U%
  549. X#
  550. X# 1990 makefile
  551. X
  552. XSHELL=/bin/sh
  553. XCHMOD=chmod
  554. XCC=gcc
  555. XCP=cp
  556. XRM=rm
  557. XSED=sed
  558. XLN=ln
  559. X
  560. X# flags for common K&R compiles
  561. X#
  562. XCFLAGS=-O
  563. XCC=cc
  564. X
  565. X# winners that may be ok to compile with common K&R
  566. X#
  567. XWINNERS=cmills pjr westley tbr dg dds theorem baruch jaw scjones
  568. X
  569. Xall: ${WINNERS}
  570. X
  571. Xansi:
  572. X    @echo "wrong makefile, use ansi.mk"
  573. X    exit 1
  574. X
  575. Xcommon: all
  576. X
  577. Xcmills: cmills.c
  578. X    ${CC} ${CFLAGS} -DM=500 -DN=52 -DX="srand((int)time(0L))" -DV=int \
  579. X        -o cmills cmills.c
  580. X
  581. Xpjr: pjr.c
  582. X    ${CC} ${CFLAGS} pjr.c -o pjr
  583. X
  584. Xwestley: westley.alt.c
  585. X    ${CC} ${CFLAGS} westley.alt.c -o westley
  586. X
  587. Xwestley.alt.c: westley.c
  588. X    ${RM} -f westley.alt.c
  589. X    -${SED} -e 's/signed//' -e 's/1s/1/g' -e 's/^    #/#/' \
  590. X        westley.c > westley.alt.c
  591. X
  592. Xstig: stig.c stig.ksh
  593. X    @echo "run the Korn shell, and source stig.ksh"
  594. X    @echo "or read stig.hint and create your own aliases"
  595. X
  596. Xtbr: tbr.c
  597. X    ${CC} ${CFLAGS} tbr.c -o tbr
  598. X
  599. Xdg: dg.c
  600. X    ${CC} ${CFLAGS} dg.c -Dindex=strchr -o dg
  601. X    # compile with the following if you don't have strchr()
  602. X    #${CC} ${CFLAGS} dg.c -o dg
  603. X
  604. Xdds: dds.c LANDER.BAS
  605. X    ${CC} ${CFLAGS} dds.c -o dds
  606. X
  607. Xtheorem: theorem.c
  608. X    ${CC} ${CFLAGS} theorem.c -o theorem
  609. X    ${RM} -f sorter.c
  610. X    -./theorem -r 0 0 0 0 < theorem.c > sorter.c
  611. X    ${CC} ${CFLAGS} sorter.c -o sorter
  612. X    ${RM} -f fibonacci.c
  613. X    -./sorter 0 0 0 0 < theorem.c > fibonacci.c
  614. X    ${CC} ${CFLAGS} fibonacci.c -o fibonacci
  615. X
  616. Xbaruch: baruch.c
  617. X    ${CC} ${CFLAGS} baruch.c -o baruch
  618. X
  619. Xjaw: jaw.c
  620. X    ${RM} -f ./zcat ./atob ./jaw
  621. X    ${CC} ${CFLAGS} jaw.c -o zcat
  622. X    ${LN} zcat atob
  623. X    echo 'PATH=;export PATH;atob|zcat' > jaw
  624. X    ${CHMOD} 0555 ./jaw
  625. X
  626. Xscjones: scjones.alt.c stdlib.h
  627. X    ${CC} ${CFLAGS} -I. scjones.alt.c -o scjones
  628. X
  629. X# NOTE: scjones.alt.c is just a de-ANSI-fied scjones.c for example only
  630. X#
  631. Xscjones.alt.c: scjones.c
  632. X    ${RM} -f scjones.alt.c
  633. X    -${SED} -e 's#??/#\\#g' -e 's/??=/#/g' -e 's/??(/[/g' -e 's/??)/]/g' \
  634. X        -e "s/??'/^/g" -e 's/??</{/g' -e 's/??!/|/g' -e 's/??>/}/g' \
  635. X        -e 's/??-/~/g' scjones.c > scjones.alt.c
  636. X
  637. Xstdlib.h:
  638. X    ${RM} -f stdlib.h
  639. X    echo "#define EXIT_SUCCESS 0" >stdlib.h
  640. X    echo "#define EXIT_FAILURE 1" >>stdlib.h
  641. X    echo "void exit(); /* may need to be int on some systems */" >>stdlib.h
  642. X
  643. Xclean:
  644. X    rm -f *.o a.out core
  645. Xclobber: clean
  646. X    ${RM} -f ${WINNERS} sorter.c sorter westley.alt.c stdlib.h
  647. X    ${RM} -f fibonacci.c fibonacci atob zcat scjonds.alt.c
  648. Xnuke: clobber
  649. X    @true
  650. Xinstall: all
  651. X    cat ${WINNERS} > /dev/null
  652. SHAR_EOF
  653. $TOUCH -am 0922164990 1990/common.mk &&
  654. chmod 0444 1990/common.mk ||
  655. echo "restore of 1990/common.mk failed"
  656. set `wc -c 1990/common.mk`;Wc_c=$1
  657. if test "$Wc_c" != "2327"; then
  658.     echo original size 2327, current size $Wc_c
  659. fi
  660. # ============= 1990/baruch.c ==============
  661. echo "x - extracting 1990/baruch.c (Text)"
  662. sed 's/^X//' << 'SHAR_EOF' > 1990/baruch.c &&
  663. Xv,i,j,k,l,s,a[99];
  664. Xmain()
  665. X{
  666. X    for(scanf("%d",&s);*a-s;v=a[j*=v]-a[i],k=i<s,j+=(v=j<s&&(!k&&!!printf(2+"\n\n%c"-(!l<<!j)," #Q"[l^v?(l^j)&1:2])&&++l||a[i]<s&&v&&v-i+j&&v+i-j))&&!(l%=s),v||(i==j?a[i+=k]=0:++a[i])>=s*k&&++a[--i])
  667. X        ;
  668. X}
  669. SHAR_EOF
  670. $TOUCH -am 0922163990 1990/baruch.c &&
  671. chmod 0444 1990/baruch.c ||
  672. echo "restore of 1990/baruch.c failed"
  673. set `wc -c 1990/baruch.c`;Wc_c=$1
  674. if test "$Wc_c" != "231"; then
  675.     echo original size 231, current size $Wc_c
  676. fi
  677. # ============= 1990/cmills.c ==============
  678. echo "x - extracting 1990/cmills.c (Text)"
  679. sed 's/^X//' << 'SHAR_EOF' > 1990/cmills.c &&
  680. X#include<stdio.h>
  681. X#include<time.h>
  682. X#define S(q)B(*e=0),q,p);
  683. X#define W(w)if((w)<22)v= -v;else v-=10;else
  684. X#define F for(r=d;r<d+N;
  685. X#define H(v,g)v=h(v,*g++= *r++),*g=0;
  686. X#define B(n)b(l,n),(V)printf(l
  687. XV
  688. Xexit();char*g,c[M],d[N],q[N],p[N],*e,*r=d+N,l[M],*t="??",*k,*m="DEATHISDSev2oinpohae3ttsluuln4a?uibfe 5l\0rtlfrb6 ?a?el:e7$!n\0?e t8%ccp\0.%s9deelc.s T.@?-t.\t<J /\0=a\nP=Q Sex \0l KW Sin a$\0ane-lay% ge#-slediefuk ar  r$via-:o ?+}:r? n \0:) ee%lone 1-esy666!-~v\n.!^`'~@#\0\np~===:=q";b(o,n)char*o;{for(k=n+m;*o++=*k;k+=9);}int
  689. Xy=M*2,v,x,s,f,j,o;u(s){B(s));if(!gets(l))exit(0);return(o=
  690. X*l)=='y'||o=='Y'||o!='n'&&o!='N'&&u(s);}h(v,m){for(k=c;*k!='J';)if(m==*k++)break;m=k-c;if(v<0)W(v=m-v)
  691. Xif(m==1)W(v+=11)
  692. Xv+=m;return
  693. Xv;}main(w,z)char**z;{b(c,2)*X;for(--w&&(y=atoi(1[z]));y>1;){if(r-d>N*3/4){B(8));F++r)*r=c[(r-d)%13];F)w=
  694. X*(g=d+rand()%N),*g=
  695. X*r,*r++=w;r=d;}for(;;){B(3),y);if(!gets(l)||(w=atoi(l))<1)exit(0);if(w&1||w>M||w>y)B(1),y<M?y:M);else
  696. Xbreak;}y-=w,s=f=j=x=v=0,g=q,e=p;H(x,g)H(x,g)H(v,e)H(v,e)*t=
  697. X*q;S(t)*q=='A'&&y>=w/2&&u(5)&&(y+=(3*(h(0,1[q])==10)-1)*w/2);if(x==-21)goto
  698. X_;if(v==-21){y+=w/2;goto
  699. X_;}while(x>-17&&x<17)H(x,g)while((v==20||*p==-1[e])&&y>=w&&u(6)){y-=w;++s;for(g=e++;2[g]=
  700. X*g,g!=p;)--g;*g++=
  701. X*e;*g=' ';i:v=h(h(0,*p),*e++=
  702. X*r++);S(t)if(*p=='A'&&-1[e]!=
  703. X*p)goto
  704. X_;}if(f=y>=w&&u(7))y-=w,H(v,e)while(!f&&v<22&&u(4)){H(v,e)if(v<22)S(t)}_:x<0&&(x=
  705. X-x);v<0&&(v=
  706. X-v);if(v<22)if(v==x)j+=w*++f;else
  707. Xif(x>21||v>x)j+=w*2*++f;if(s--){*e++=' ';*e++=
  708. X*p;*e=0;for(e=p;*e=2[e];)e++;goto
  709. Xi;}y+=j;S(q)};}
  710. SHAR_EOF
  711. $TOUCH -am 0922163990 1990/cmills.c &&
  712. chmod 0444 1990/cmills.c ||
  713. echo "restore of 1990/cmills.c failed"
  714. set `wc -c 1990/cmills.c`;Wc_c=$1
  715. if test "$Wc_c" != "1512"; then
  716.     echo original size 1512, current size $Wc_c
  717. fi
  718. # ============= 1990/dds.c ==============
  719. echo "x - extracting 1990/dds.c (Text)"
  720. sed 's/^X//' << 'SHAR_EOF' > 1990/dds.c &&
  721. X#define O(b,f,u,s,c,a)b(){int o=f();switch(*p++){X u:_ o s b();X c:_ o a b();default:p--;_ o;}}
  722. X#define t(e,d,_,C)X e:f=fopen(B+d,_);C;fclose(f)
  723. X#define U(y,z)while(p=Q(s,y))*p++=z,*p=' '
  724. X#define N for(i=0;i<11*R;i++)m[i]&&
  725. X#define I "%d %s\n",i,m[i]
  726. X#define X ;break;case
  727. X#define _ return
  728. X#define R 999
  729. Xtypedef char*A;int*C,E[R],L[R],M[R],P[R],l,i,j;char B[R],F[2];A m[12*R],malloc
  730. X(),p,q,x,y,z,s,d,f,fopen();A Q(s,o)A s,o;{for(x=s;*x;x++){for(y=x,z=o;*z&&*y==
  731. X*z;y++)z++;if(z>o&&!*z)_ x;}_    0;}main(){m[11*R]="E";while(puts("Ok"),gets(B)
  732. X)switch(*B){X'R':C=E;l=1;for(i=0;i<R;P[i++]=0);while(l){while(!(s=m[l]))l++;if
  733. X(!Q(s,"\"")){U("<>",'#');U("<=",'$');U(">=",'!');}d=B;while(*F=*s){*s=='"'&&j
  734. X++;if(j&1||!Q(" \t",F))*d++=*s;s++;}*d--=j=0;if(B[1]!='=')switch(*B){X'E':l=-1
  735. XX'R':B[2]!='M'&&(l=*--C)X'I':B[1]=='N'?gets(p=B),P[*d]=S():(*(q=Q(B,"TH"))=0,p
  736. X=B+2,S()&&(p=q+4,l=S()-1))X'P':B[5]=='"'?*d=0,puts(B+6):(p=B+5,printf("%d\n",S
  737. X()))X'G':p=B+4,B[2]=='S'&&(*C++=l,p++),l=S()-1 X'F':*(q=Q(B,"TO"))=0;p=B+5;P[i
  738. X=B[3]]=S();p=q+2;M[i]=S();L[i]=l X'N':++P[*d]<=M[*d]&&(l=L[*d]);}else p=B+2,P[
  739. X*B]=S();l++;}X'L':N printf(I)X'N':N free(m[i]),m[i]=0    X'B':_ 0 t('S',5,"w",N
  740. Xfprintf(f,I))t('O',4,"r",while(fgets(B,R,f))(*Q(B,"\n")=0,G()))X 0:default:G()
  741. X;}_ 0;}G(){l=atoi(B);m[l]&&free(m[l]);(p=Q(B," "))?strcpy(m[l]=malloc(strlen(p
  742. X)),p+1):(m[l]=0,0);}O(S,J,'=',==,'#',!=)O(J,K,'<',<,'>',>)O(K,V,'$',<=,'!',>=)
  743. XO(V,W,'+',+,'-',-)O(W,Y,'*',*,'/',/)Y(){int o;_*p=='-'?p++,-Y():*p>='0'&&*p<=
  744. X'9'?strtol(p,&p,0):*p=='('?p++,o=S(),p++,o:P[*p++];}
  745. SHAR_EOF
  746. $TOUCH -am 0922163990 1990/dds.c &&
  747. chmod 0444 1990/dds.c ||
  748. echo "restore of 1990/dds.c failed"
  749. set `wc -c 1990/dds.c`;Wc_c=$1
  750. if test "$Wc_c" != "1536"; then
  751.     echo original size 1536, current size $Wc_c
  752. fi
  753. # ============= 1990/dg.c ==============
  754. echo "x - extracting 1990/dg.c (Text)"
  755. sed 's/^X//' << 'SHAR_EOF' > 1990/dg.c &&
  756. X#include <stdio.h>
  757. X
  758. X#define d define
  759. X
  760. X#d b12(x) 12 x
  761. X#d a13(x) x 13
  762. X#d a16(x) x 16
  763. X#d a32(x) x 32
  764. X#d acb(x) x]
  765. X#d acc(x) x}
  766. X#d aco(x) x:
  767. X#d bco(x) :x
  768. X#d acp(x) x)
  769. X#d bef(x) EOF x
  770. X#d aeq(x) x=
  771. X#d afo(x) x for
  772. X#d age(x) x fgetc
  773. X#d asi(x) x stdin
  774. X#d aso(x) x stdout
  775. X#d bgt(x) >x
  776. X#d ai(x) x i
  777. X#d aj(x) x j
  778. X#d al(x) x l
  779. X#d ami(x) x-
  780. X#d bne(x) !=x
  781. X#d aob(x) x[
  782. X#d aop(x) x(
  783. X#d apl(x) x+
  784. X#d bpu(x) fputc x
  785. X#d bqm(x) ?x
  786. X#d aqm(x) x?
  787. X#d aqu(x) x'
  788. X#d ase(x) x;
  789. X#d awh(x) x while
  790. X#d axo(x) x^
  791. X#d a0(x) x 0
  792. X#d b13(x) 13 x
  793. X#d b16(x) 16 x
  794. X#d b19(x) 19 x
  795. X#d b48(x) 48 x
  796. X#d a64(x) x 64
  797. X#d b66(x) 66 x
  798. X#d bcb(x) ]x
  799. X#d bch(x) char x
  800. X#d bcm(x) ,x
  801. X#d acm(x) x,
  802. X#d bcp(x) )x
  803. X#d beq(x) =x
  804. X#d bex(x) extern x
  805. X#d bi(x) i x
  806. X#d bin(x) int x
  807. X#d bix(x) index x
  808. X#d bj(x) j x
  809. X#d bl(x) l x
  810. X#d alt(x) x<
  811. X#d bma(x) main x
  812. X#d bob(x) [x
  813. X#d boc(x) {x
  814. X#d bop(x) (x
  815. X#d bpl(x) +x
  816. X#d app(x) x++
  817. X#d bqu(x) 'x
  818. X#d bse(x) ;x
  819. X#d bst(x) *x
  820. Xbma(acp(bop(app(bcp(ai(boc(ase(bch(a16(bl(alt(bob(ai(b66(ase(bcb(a0(bcm(aeq(bst(acb(bj(a64(bse(aob(bin(al(bi(aeq(bse(ai(bex(aop(bch(afo(bst(ase(bix(())))))))))))))))))))))))))))))))))))))))
  821. Xbl(ai(bob(aob(bi(al(bcb(aop(beq(apl(b13(a13(bpl(aeq(bop(acb(bl(bob(a32(bi(bpl(apl(b16(bcb(ai(beq(b19(aob(bpl(bop(l))))))))))))))))))))))))))))))
  822. Xbpl(acp(b48(acp(asi(bcb(aop(beq(age(bop(aeq(bi(ai(bgt(aop(b12(aop(bqm(awh(b12(ase(bco(acp(bi(acp(bcp(acp(bpl(aqu(bqu(A))))))))))))))))))))))))))))))
  823. Xbne(acc(bef(ase(bcp(acp(aso(bpu(acm(ai(bop(aco(bop(acb(bj(al(beq(ami(bix(aj(axo(bop(a16(aob(bl(al(aqm(bcm(acp(acp(i))))))))))))))))))))))))))))))
  824. SHAR_EOF
  825. $TOUCH -am 0922163990 1990/dg.c &&
  826. chmod 0444 1990/dg.c ||
  827. echo "restore of 1990/dg.c failed"
  828. set `wc -c 1990/dg.c`;Wc_c=$1
  829. if test "$Wc_c" != "1526"; then
  830.     echo original size 1526, current size $Wc_c
  831. fi
  832. # ============= 1990/jaw.c ==============
  833. echo "x - extracting 1990/jaw.c (Text)"
  834. sed 's/^X//' << 'SHAR_EOF' > 1990/jaw.c &&
  835. X#define C char
  836. X#define F X,perror("oops"),1
  837. X#define G getchar()
  838. X#define I ;if(
  839. X#define P putchar
  840. X#define Q 256
  841. X#define W ;while(
  842. X#define X return 0
  843. X#include<stdio.h>
  844. Xlong M,N,c,f,m,o,r,s,w;y(l){o^=l;m+=l+1;f=f*2+l+(f>>31&1);}int
  845. XO,S,e,i,k,n,q,t[69001];b(g){k=4 W g<k)y(P((C)(w>>--k*8)&255));w=0;}C D[Q*Q],h
  846. X[Q*Q];main(g,V)C**V;{I**V-97)X,a()W G-10)W(g=G)+1&&g-'x')if(g-10){I
  847. X4<k)b(0)I g>32&g<'v')w=w*85+g-33,++k;else{I
  848. Xg-'z'|k)F;w=0;k=5;}}W G-78)I scanf("%ld%lx E%lx S%lx R%lx ",&M,&N,&c,&s,&r)-5)F
  849. XI M){b(g=3-(M-1&3))W g--)y(0);}I(M-N|c-o|s-m|r-f)&4294967295)F;X;}long
  850. Xg(){C*p I m<f&n<k&&(m=(1L<<++n)-1)||O>=S){O=0;S=fread(D,1,n,stdin)*8 I
  851. XS<8)X-1;S-=n-1;}p=D+O/8;q=O&7;O+=n;X,(1<<8-q)-1&*p>>q|m&((15<n+q)*p[2]*Q|p[1]&
  852. X255)<<8-q;}a(){C*p=D+Q;G;G;k=G;e=k>>7&1;k&=31 I k>16)F;w=Q
  853. XW w--)t[w]=0,h[w]=w;n=8;f=Q+e;i=o=w=g()I o<0)X,1;P(i)W(w=g())+1){I
  854. Xw==Q&e){W w--)t[w]=0;m=n=8;f=Q I(w=g())<0)X;}c=w
  855. XI w>=f)*p++=i,w=o W w>=Q)*p++=h[w],w=t[w];P(i=h[w])W
  856. Xp>D+Q)P(*--p)I(w=f)<1L<<k)t[w]=o,h[f++]=i;o=c;}X;}
  857. SHAR_EOF
  858. $TOUCH -am 0922163990 1990/jaw.c &&
  859. chmod 0444 1990/jaw.c ||
  860. echo "restore of 1990/jaw.c failed"
  861. set `wc -c 1990/jaw.c`;Wc_c=$1
  862. if test "$Wc_c" != "999"; then
  863.     echo original size 999, current size $Wc_c
  864. fi
  865. # ============= 1990/pjr.c ==============
  866. echo "x - extracting 1990/pjr.c (Text)"
  867. sed 's/^X//' << 'SHAR_EOF' > 1990/pjr.c &&
  868. X#include <stdio.h>
  869. X#define A(a) G a();
  870. X#define B(a) G (*a)();
  871. X#define C(a,b) G a() { printf(b); return X; }
  872. Xtypedef struct F G;A(a)A(b)A(c)A(d)A(e)A(f)A(g)A(h)A(i)A(j)A(k)A(l)A(m)A(n)A(
  873. Xo)A(p)A(q)A(r)A(s)A(t)A(u)A(v)A(w)A(x)A(y)A(z)A(S)A(N)void Q();struct F{B(a)B
  874. X(b)B(c)B(d)B(e)B(f)B(g)B(h)B(i)B(j)B(k)B(l)B(m)B(n)B(o)B(p)B(q)B(r)B(s)B(t)B(
  875. Xu)B(v)B(w)B(x)B(y)B(z)B(S)B(N)void(*Q)();}X={a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,
  876. Xq,r,s,t,u,v,w,x,y,z,S,N,Q};C(a,"z")C(b,"y")C(c,"x")C(d,"w")C(e,"v")C(f,"u")C(
  877. Xg,"t")C(h,"s")C(i,"r")C(j,"q")C(k,"p")C(l,"o")C(m,"n")C(n,"m")C(o,"l")C(p,"k"
  878. X)C(q,"j")C(r,"i")C(s,"h")C(t,"g")C(u,"f")C(v,"e")C(w,"d")C(x,"c")C(y,"b")C(z,
  879. X"a")C(S," ")C(N,"\n") void Q(){}main(){X=g().s().v().S().j().f().r().x().p().
  880. XS().y().i().l().d().m().S().u().l().c().S().q().f().n().k().v().w().S().l().e
  881. X().v().i().S().g().s().v().S().o().z().a().b().S().w().l().t().N();}
  882. SHAR_EOF
  883. $TOUCH -am 0922163990 1990/pjr.c &&
  884. chmod 0444 1990/pjr.c ||
  885. echo "restore of 1990/pjr.c failed"
  886. set `wc -c 1990/pjr.c`;Wc_c=$1
  887. if test "$Wc_c" != "879"; then
  888.     echo original size 879, current size $Wc_c
  889. fi
  890. # ============= 1990/scjones.c ==============
  891. echo "x - extracting 1990/scjones.c (Text)"
  892. sed 's/^X//' << 'SHAR_EOF' > 1990/scjones.c &&
  893. Xchar*a??(??)=??<
  894. X"??=include<stdio.h>",
  895. X"??=include<stdlib.h>",
  896. X"??=define o stdout",
  897. X"??=define b break;case",
  898. X"??=define s(p)fputs(p,o);",
  899. X"??=define c(p)fputc(p,o);",
  900. X"void t(p,f)char*p;??<f&&c('??/"')",
  901. X"for(;;p++)??<switch(*p)??<case 0:f&&",
  902. X"s(??/"??/??/??/",??/")c('??/??/n')return;case",
  903. X"'??=':s(??/"???/??/?=??/")b'??<':s(??/"???/??/?<??/")",
  904. X"b'??>':s(??/"???/??/?>??/")b'??(':s(??/"???/??/?(??/")b'??)'",
  905. X":s(??/"???/??/?)??/")b'??/??/??/??/':f&&s(??/"???/??/?/??/")",
  906. X"s(??/"???/??/?/??/")b'??/??/n':if(f)s(??/"???/??/?/n??/")",
  907. X"else case'??/"':if(f)s(??/"???/??/?/??/??/??/"??/")",
  908. X"else default:c(*p)??>??>??>main()??<char**p",
  909. X";t(??/"char*a??(??)=??<??/",0);for(p=a;*p",
  910. X";p++)t(*p,1);t(??/"0??>;??/",0);for(p=a",
  911. X";*p;p++)t(*p,0);exit(!ferror(o)&&",
  912. X"!fclose(o)?EXIT_SUCCESS",
  913. X":EXIT_FAILURE);",
  914. X"/*NOTREACHED*/",
  915. X"??>",
  916. X0??>;
  917. X??=include<stdio.h>
  918. X??=include<stdlib.h>
  919. X??=define o stdout
  920. X??=define b break;case
  921. X??=define s(p)fputs(p,o);
  922. X??=define c(p)fputc(p,o);
  923. Xvoid t(p,f)char*p;??<f&&c('"')
  924. Xfor(;;p++)??<switch(*p)??<case 0:f&&
  925. Xs("??/",")c('??/n')return;case
  926. X'??=':s("???/?=")b'??<':s("???/?<")
  927. Xb'??>':s("???/?>")b'??(':s("???/?(")b'??)'
  928. X:s("???/?)")b'??/??/':f&&s("???/?/")
  929. Xs("???/?/")b'??/n':if(f)s("???/?/n")
  930. Xelse case'"':if(f)s("???/?/??/"")
  931. Xelse default:c(*p)??>??>??>main()??<char**p
  932. X;t("char*a??(??)=??<",0);for(p=a;*p
  933. X;p++)t(*p,1);t("0??>;",0);for(p=a
  934. X;*p;p++)t(*p,0);exit(!ferror(o)&&
  935. X!fclose(o)?EXIT_SUCCESS
  936. X:EXIT_FAILURE);
  937. X/*NOTREACHED*/
  938. X??>
  939. SHAR_EOF
  940. $TOUCH -am 0922163990 1990/scjones.c &&
  941. chmod 0444 1990/scjones.c ||
  942. echo "restore of 1990/scjones.c failed"
  943. set `wc -c 1990/scjones.c`;Wc_c=$1
  944. if test "$Wc_c" != "1474"; then
  945.     echo original size 1474, current size $Wc_c
  946. fi
  947. # ============= 1990/stig.c ==============
  948. echo "x - extracting 1990/stig.c (Text)"
  949. sed 's/^X//' << 'SHAR_EOF' > 1990/stig.c &&
  950. Xc
  951. SHAR_EOF
  952. $TOUCH -am 0922163990 1990/stig.c &&
  953. chmod 0444 1990/stig.c ||
  954. echo "restore of 1990/stig.c failed"
  955. set `wc -c 1990/stig.c`;Wc_c=$1
  956. if test "$Wc_c" != "2"; then
  957.     echo original size 2, current size $Wc_c
  958. fi
  959. # ============= 1990/tbr.c ==============
  960. echo "x - extracting 1990/tbr.c (Text)"
  961. sed 's/^X//' << 'SHAR_EOF' > 1990/tbr.c &&
  962. X
  963. X#define D ,close(
  964. X
  965. Xchar              *c,q              [512              ],m[              256
  966. X],*v[           99], **u,        *i[3];int         f[2],p;main       (){for
  967. X (m[m        [60]=   m[62      ]=32   ]=m[*      m=124   [m]=       9]=6;
  968. X  e(-8)     ,gets      (1+(    c=q)     )||      exit      (0);     r(0,0)
  969. X   )for(    ;*++        c;);  }r(t,      o){    *i=i        [2]=    0;for
  970. X     (u=v  +98           ;m[*--c]         ^9;m [*c]          &32  ?i[*c
  971. X       &2]=                *u,u-             v^98              &&++u:
  972. X
  973. X    3    )if(!m[*c]){for(*++c=0;!m[*--c];);
  974. X    *    --u= ++c;}u-v^98?strcmp(*u,"cd")?*c?pipe(f),o=f[
  975. X    1    ]:
  976. X    4    ,(p=fork())?e(p),o?r(o,0)D o)D*f):
  977. X    1    ,wait(0):(o?dup2(*f,0)D*f)D o):*i?
  978. X    5    D 0),e(open(*i,0)):
  979. X    9    ,t?dup2(t,1)D t):i[
  980. X    2    ]?
  981. X    6    D 1),e(creat(i[2],438)):
  982. X    5    ,e(execvp(*u,u))):e(chdir(u[1])*2):
  983. X    3    ;}e(x){x<0?write(2,"?\n$ "-x/4,2),x+1||exit(1):
  984. X    5    ;}
  985. SHAR_EOF
  986. $TOUCH -am 0922163990 1990/tbr.c &&
  987. chmod 0444 1990/tbr.c ||
  988. echo "restore of 1990/tbr.c failed"
  989. set `wc -c 1990/tbr.c`;Wc_c=$1
  990. if test "$Wc_c" != "886"; then
  991.     echo original size 886, current size $Wc_c
  992. fi
  993. # ============= 1990/theorem.c ==============
  994. echo "x - extracting 1990/theorem.c (Text)"
  995. sed 's/^X//' << 'SHAR_EOF' > 1990/theorem.c &&
  996. X#include <stdio.h>
  997. X#include <math.h>
  998. X#define X
  999. X#define Y {}
  1000. X#define C  }
  1001. X#define o {
  1002. X#undef main
  1003. Xchar m[500][99],v[99],R;
  1004. Xint*a,b,n,i,j,W,A;
  1005. Xfloat Q,G,D,M,T,B,O,U,V,N,y,e();
  1006. XP(g,R,u)float*g,R,u;{int c;for(*g=1,c=u;c--;*g*=R);}
  1007. XX
  1008. XK(g,R,u)float*g,u;char R;
  1009. Xo
  1010. Xif(R=='+')*g+=u;
  1011. Xif(R=='-')*g-=u;
  1012. Xif(R=='*')*g*=u;
  1013. Xif(R=='/')*g/=u;
  1014. Xif(R=='^')P(g,*g,u);
  1015. XC
  1016. Xw(g,R,u)float*g,u;char R;
  1017. X/**/{int b,f;A=atoi(*++a);b=atoi(*++a);while((f=A+b)<15000){printf("%d\n",f);A=b;b=f;}}
  1018. Xmain(A,a)int A;char*a[];
  1019. Xo o
  1020. Xif(!strcmp(*++a,"-r"))S();
  1021. XD=atof(*++a);
  1022. XT=atof(*++a);
  1023. XB=atof(*++a);
  1024. XM=atof(*(4+(a-=3)));
  1025. XC
  1026. Xwhile(D<T)
  1027. Xo
  1028. XU=e((G=B/2,*a),D,M,a);
  1029. XV=e(*a,Q=D+G,M+G*U,a);
  1030. X/*/
  1031. Xz;/*/
  1032. XN=2*e(*a,Q,M+G*V,a);
  1033. XM+=B*V/3+B*N/6+B*e(*a,D+=B,M+G*N,a)/6+G*U/3;
  1034. Xprintf("%f %f\n",D,M);
  1035. XC
  1036. Xwhile(T=0)
  1037. X;
  1038. XW=D=1;
  1039. X;
  1040. Xwhile(W!=1)
  1041. Xo o
  1042. Xstrcpy(j+m,v);
  1043. Xo 
  1044. Xif((j-=W)<=W)break;
  1045. Xstrcpy(j+m,m+j-W);
  1046. XC
  1047. Xwhile(strcmp(m+j-W,v)>0)
  1048. Xj=i;
  1049. Xstrcpy(v,i+m);
  1050. XC
  1051. Xfor(i=(W/=3)-1;++i<n;)
  1052. X;
  1053. XC
  1054. Xdo
  1055. X;
  1056. Xwhile(0);
  1057. Xfor(W=1;(W=W*3+1)<n;);
  1058. XC
  1059. Xfloat e(f,D,M,a)char*f,*a[];float D,M;
  1060. Xo
  1061. X#define main L
  1062. XO=0;
  1063. XR='+';
  1064. Xfor(;*f;f++)
  1065. Xif(*f=='y')K(&O,R,M);
  1066. Xelse if((*f>='0')&&(*f<='9'))K(&O,R,(float)*f-'0');
  1067. Xelse if(*f=='x')K(&O,R,D);
  1068. Xelse if(1)R=*f;
  1069. Xif(1);
  1070. Xreturn O;
  1071. Xfor(j=0;j<n;puts(j++[m]));
  1072. Xe("",O,&O,a);
  1073. Xn=j-(O=1);
  1074. Xwhile(gets(j++[m]));
  1075. Xif(!strcmp(*++a,"-r"))S();
  1076. XC
  1077. X/**/main(A,a)int A;char*a[];
  1078. XY
  1079. XS(){while(gets(b++[m]));for(b--;b--;puts(b[m]));}
  1080. Xchar*f,m[500][99],R,v[99];
  1081. Xint b,W,n,i,j,z;
  1082. Xfloat Q,G,D,M,T,O,B,U,V,N,e();
  1083. X#define Y
  1084. X#define X {}
  1085. X#define o }
  1086. X#define C {
  1087. X#include <stdio.h>
  1088. X#include <math.h>
  1089. SHAR_EOF
  1090. $TOUCH -am 0922163990 1990/theorem.c &&
  1091. chmod 0444 1990/theorem.c ||
  1092. echo "restore of 1990/theorem.c failed"
  1093. set `wc -c 1990/theorem.c`;Wc_c=$1
  1094. if test "$Wc_c" != "1511"; then
  1095.     echo original size 1511, current size $Wc_c
  1096. fi
  1097. # ============= 1990/westley.c ==============
  1098. echo "x - extracting 1990/westley.c (Text)"
  1099. sed 's/^X//' << 'SHAR_EOF' > 1990/westley.c &&
  1100. Xchar*lie;
  1101. X
  1102. X    double time, me= !0XFACE,
  1103. X
  1104. X    not; int rested,   get, out;
  1105. X
  1106. X    main(ly, die) char ly, **die ;{
  1107. X
  1108. X        signed char lotte,
  1109. X
  1110. X
  1111. Xdear; (char)lotte--;
  1112. X
  1113. X    for(get= !me;; not){
  1114. X
  1115. X    1 -  out & out ;lie;{
  1116. X
  1117. X    char lotte, my= dear,
  1118. X
  1119. X    **let= !!me *!not+ ++die;
  1120. X
  1121. X        (char*)(lie=
  1122. X
  1123. X
  1124. X"The gloves are OFF this time, I detest you, snot\n\0sed GEEK!");
  1125. X
  1126. X    do {not= *lie++ & 0xF00L* !me;
  1127. X
  1128. X    #define love (char*)lie -
  1129. X
  1130. X    love 1s *!(not= atoi(let
  1131. X
  1132. X    [get -me?
  1133. X
  1134. X        (char)lotte-
  1135. X
  1136. X
  1137. X(char)lotte: my- *love -
  1138. X    
  1139. X    'I'  -  *love -  'U' -
  1140. X
  1141. X    'I'  -  (long)  - 4 - 'U' ])- !!
  1142. X    
  1143. X    (time  =out=  'a'));} while( my - dear
  1144. X
  1145. X    && 'I'-1l  -get-  'a'); break;}}
  1146. X
  1147. X        (char)*lie++;
  1148. X
  1149. X
  1150. X(char)*lie++, (char)*lie++; hell:0, (char)*lie;
  1151. X
  1152. X    get *out* (short)ly   -0-'R'-  get- 'a'^rested;
  1153. X
  1154. X    do {auto*eroticism,
  1155. X
  1156. X    that; puts(*( out
  1157. X
  1158. X        - 'c'
  1159. X    
  1160. X-('P'-'S') +die+ -2 ));}while(!"you're at it");
  1161. X
  1162. X
  1163. Xfor (*((char*)&lotte)^=
  1164. X
  1165. X    (char)lotte; (love ly) [(char)++lotte+
  1166. X
  1167. X    !!0xBABE];){ if ('I' -lie[ 2 +(char)lotte]){ 'I'-1l ***die; }
  1168. X
  1169. X    else{ if ('I' * get *out* ('I'-1l **die[ 2 ])) *((char*)&lotte) -=
  1170. X
  1171. X    '4' - ('I'-1l); not; for(get=!
  1172. X
  1173. X
  1174. Xget; !out; (char)*lie  &  0xD0- !not) return!!
  1175. X
  1176. X    (char)lotte;}
  1177. X
  1178. X
  1179. X(char)lotte;
  1180. X
  1181. X    do{ not* putchar(lie [out
  1182. X
  1183. X    *!not* !!me +(char)lotte]);
  1184. X
  1185. X    not; for(;!'a';);}while(
  1186. X
  1187. X        love (char*)lie);{
  1188. X
  1189. X
  1190. Xregister this; switch( (char)lie
  1191. X
  1192. X    [(char)lotte] -1s *!out) {
  1193. X
  1194. X    char*les, get= 0xFF, my; case' ':
  1195. X
  1196. X    *((char*)&lotte) += 15; !not +(char)*lie*'s';
  1197. X
  1198. X    this +1s+ not; default: 0xF +(char*)lie;}}}
  1199. X
  1200. X    get - !out;
  1201. X
  1202. X    if (not--)
  1203. X
  1204. X    goto hell;
  1205. X
  1206. X        exit( (char)lotte);}
  1207. SHAR_EOF
  1208. $TOUCH -am 0922163990 1990/westley.c &&
  1209. chmod 0444 1990/westley.c ||
  1210. echo "restore of 1990/westley.c failed"
  1211. set `wc -c 1990/westley.c`;Wc_c=$1
  1212. if test "$Wc_c" != "1529"; then
  1213.     echo original size 1529, current size $Wc_c
  1214. fi
  1215. # ============= 1990/baruch.hint ==============
  1216. echo "x - extracting 1990/baruch.hint (Text)"
  1217. sed 's/^X//' << 'SHAR_EOF' > 1990/baruch.hint &&
  1218. XBest Small Program: <baruch@genius.tau.ac.il> Osovlanski & Nissenbaum
  1219. X
  1220. X    Doron Osovlanski
  1221. X    CADTECH - CAD/CAM Systems Ltd
  1222. X        24 Ben-Yosef st.
  1223. X        Givat-Shmuel   51905
  1224. X    Israel
  1225. X
  1226. X    Baruch Nissenbaum                  BARUCH@TAUNIVM.TAU.AC.IL
  1227. X    Tel-Aviv University
  1228. X    The Faculty of Engineering
  1229. X    Tel-Aviv
  1230. X    Israel
  1231. X
  1232. X
  1233. XJudges' comments:
  1234. X
  1235. X    Compile.  Try:
  1236. X
  1237. X    echo 4 | baruch
  1238. X    echo 7 | baruch
  1239. X
  1240. X    This program reads an integer between 4 and 99 from the stdin.
  1241. X
  1242. X    NOTE: The original program did not have a newline at the end of
  1243. X      the file.  We added a final newline to the file to make
  1244. X      unpacking easy.
  1245. X
  1246. X
  1247. XSelected notes from the author:
  1248. X
  1249. X    The goal of this work was to write a program that solves the
  1250. X    classic n-queen problem, with a board size of up to 99x99, while
  1251. X    keeping the program as short as possible.
  1252. X
  1253. X    The program finds all possibilities to place N chess queens on
  1254. X    a NxN chess board so that no queen is in range of any other queen
  1255. X    (not in the same column row or diagonal).  For each solution the
  1256. X    chess board and the place of the queens is printed to stdout.
  1257. X
  1258. X
  1259. X    This program is about as simple and as readable as possible.
  1260. X    To make things even more simple we used a very limited subset of C:
  1261. X
  1262. X         No pre-processor statements
  1263. X         Only one, harmless, 'for' statement
  1264. X         No ifs
  1265. X         No breaks
  1266. X         No cases
  1267. X         No functions
  1268. X         No gotos
  1269. X         No structures
  1270. X
  1271. X    In short, it contains no C language that might confuse the
  1272. X    innocent reader.  :-)
  1273. X
  1274. X
  1275. X    This program demonstrates the claim that in C, any program
  1276. X    can be written using a single 'for' statement, as long as it is
  1277. X    long enough..
  1278. X
  1279. XThe authors further note:
  1280. X
  1281. X    For PC users:
  1282. X    In order to compile the program under Turbo-C or MSC, 'int '
  1283. X    should be inserted at the beginning of the program.
  1284. X    For better looking results it is recommended to replace the " #Q"
  1285. X    string with " \261\2".
  1286. SHAR_EOF
  1287. $TOUCH -am 0922163990 1990/baruch.hint &&
  1288. chmod 0444 1990/baruch.hint ||
  1289. echo "restore of 1990/baruch.hint failed"
  1290. set `wc -c 1990/baruch.hint`;Wc_c=$1
  1291. if test "$Wc_c" != "1908"; then
  1292.     echo original size 1908, current size $Wc_c
  1293. fi
  1294. # ============= 1990/cmills.hint ==============
  1295. echo "x - extracting 1990/cmills.hint (Text)"
  1296. sed 's/^X//' << 'SHAR_EOF' > 1990/cmills.hint &&
  1297. XBest Game: <cmills@wyse.com> Chris Mills
  1298. X
  1299. X    Chris Mills
  1300. X    Wyse Technology
  1301. X    3471 N. 1st St.
  1302. X    San Jose CA 95134
  1303. X    USA
  1304. X
  1305. X
  1306. XJudges notes:
  1307. X
  1308. X    Compile notes:
  1309. X
  1310. X       cc -DM=500 -DN=52 -DX="srand((int)time(0L))" -DV=void -o cmills cmills.c
  1311. X
  1312. X    -DM=<max bet allowed>
  1313. X    -DN=<52 * number of decks used>
  1314. X    -DX=<how to seed the rand() generator>
  1315. X    -DV=<void ot int>
  1316. X
  1317. X    Usage: cmills [starting_cash]
  1318. X
  1319. X
  1320. XSelected notes from the author:
  1321. X
  1322. X    This is a blackjack program.  It does splits, doubling down,
  1323. X    insurance, etc.  
  1324. X
  1325. X    As best I can figure, it should be ANSI-compliant, as well as
  1326. X    portable to BSD & sysV (as well as the irritating compiler I
  1327. X    was using which assumes x=*p++ means x*=p++!).  It is
  1328. X    reasonably robust in its error handling---it won't let you
  1329. X    split, double, etc. unless you actually have the cash, etc.  To
  1330. X    terminate the program, hit EOF or type 0 or a negative number
  1331. X    for you wager.
  1332. X
  1333. X    The way it deals with splits is particularly cool (IMHO).  You
  1334. X    can split many times, and it will show all hands as they are
  1335. X    played.
  1336. SHAR_EOF
  1337. $TOUCH -am 0922163990 1990/cmills.hint &&
  1338. chmod 0444 1990/cmills.hint ||
  1339. echo "restore of 1990/cmills.hint failed"
  1340. set `wc -c 1990/cmills.hint`;Wc_c=$1
  1341. if test "$Wc_c" != "1054"; then
  1342.     echo original size 1054, current size $Wc_c
  1343. fi
  1344. # ============= 1990/dds.hint ==============
  1345. echo "x - extracting 1990/dds.hint (Text)"
  1346. sed 's/^X//' << 'SHAR_EOF' > 1990/dds.hint &&
  1347. XBest Language Tool: <dds@cc.ic.ac.uk> Diomidis Spinellis
  1348. X
  1349. X    Diomidis Spinellis
  1350. X    Imperial College, University of London
  1351. X    Myrsinis 1
  1352. X    GR-145 62 Kifissia
  1353. X    Greece
  1354. X
  1355. X
  1356. XJudges' comments:
  1357. X
  1358. X    Compile and run.  Give the following lines as input:
  1359. X    
  1360. X    OLD LANDER.BAS
  1361. X    RUN
  1362. X
  1363. X    Be sure not to run out of fuel!
  1364. X
  1365. X
  1366. XSelected notes from the author:
  1367. X
  1368. X    This is the DDS-BASIC Interpreter (Version 1.00). 
  1369. X
  1370. X    Immediate commands:
  1371. X
  1372. X    RUN    LIST    NEW    OLD filename
  1373. X    BYE    SAVE filename
  1374. X
  1375. X    Program commands:
  1376. X
  1377. X    variable names a to z        variables initialized to 0 on RUN
  1378. X    FOR var = exp TO exp        NEXT variable
  1379. X    GOSUB exp            RETURN
  1380. X    GOTO exp            IF exp THEN exp
  1381. X    INPUT variable            PRINT string
  1382. X    PRINT exp            var = exp
  1383. X    REM any text            END
  1384. X
  1385. X    Expressions (ranked by precedence):
  1386. X
  1387. X    Bracketed expressions
  1388. X    number (leading 0 for octal, 0x for hex, else decimal), variable
  1389. X    Unary -
  1390. X    * / 
  1391. X    + - 
  1392. X    = <> 
  1393. X    > < 
  1394. X    <= >=
  1395. X    (* and + are also used for boolean AND and boolean OR)
  1396. X    Boolean expressions evaluate to 0 for false and 1 for true
  1397. X
  1398. X    Editing:
  1399. X
  1400. X    - Line editor using line re-entry.
  1401. X    - A line number with nothing following it, deletes the line.
  1402. X
  1403. X    Input format:
  1404. X
  1405. X    - Free format positioning of tokens on the line.
  1406. X    - No space is allowed before the line number.
  1407. X    - Exactly one space is needed between the OLD or SAVE command and 
  1408. X      the filename.
  1409. X    - ALL INPUT MUST BE UPPERCASE.
  1410. X
  1411. X    Limits:
  1412. X
  1413. X    Line numbers        1-10000
  1414. X    Line length        999 characters
  1415. X    FOR nesting        26
  1416. X    GOSUB            999 levels
  1417. X    Program            Dynamically allocated
  1418. X    Expressions        -32768 - 32767 for 16 bit machines, 
  1419. X                -2147483648 - 2147483647 for 32 bit machines
  1420. X
  1421. X    Error checking / error reports:
  1422. X
  1423. X    No error checking is performed.
  1424. X    The message `core dumped' signifies a syntax or semantic error.
  1425. X
  1426. X    Hosting Environment:
  1427. X
  1428. X    ANSI C, traditional K&R C or OSF ANDF
  1429. X    ASCII or EBCIDIC character set
  1430. X    48K bytes memory
  1431. X
  1432. X    The Speed of DDS-BASIC Interpreter (Version 1.00). relative to
  1433. X    Microsoft Advanced BASIC 3.31 is Approximately 60%.
  1434. X
  1435. X    The code size could be further reduced by doing ugly things like
  1436. X    not declaring the return type of functions, not freeing memory,
  1437. X    #defining define, and joining lines.  In its present 1536 character
  1438. X    form the program is reasonably portable (it may fail to run in a
  1439. X    tagged object architecture) and nicely formatted (it fits in an
  1440. X    80*25 screen).
  1441. SHAR_EOF
  1442. $TOUCH -am 0922163990 1990/dds.hint &&
  1443. chmod 0444 1990/dds.hint ||
  1444. echo "restore of 1990/dds.hint failed"
  1445. set `wc -c 1990/dds.hint`;Wc_c=$1
  1446. if test "$Wc_c" != "2315"; then
  1447.     echo original size 2315, current size $Wc_c
  1448. fi
  1449. # ============= 1990/dg.hint ==============
  1450. echo "x - extracting 1990/dg.hint (Text)"
  1451. sed 's/^X//' << 'SHAR_EOF' > 1990/dg.hint &&
  1452. XBest Abuse of the C Preprocessor: <harvard!xait!pallio!dg> David Goodenough
  1453. X
  1454. X    David Goodenough
  1455. X    anonymous organization
  1456. X    541 Commonwealth Ave,
  1457. X    Newton, MA 02159
  1458. X    USA
  1459. X
  1460. XJudges' comments:
  1461. X
  1462. X    Compile and run.  Try:
  1463. X
  1464. X    echo "to C or not to C" | dg
  1465. X
  1466. X    Some C preprocessors get confused about single quotes in certain cases.
  1467. X    In particular, the following source line:
  1468. X
  1469. X   Cb12(ase(bco(acp(bi(acp(bcp(acp(bpl(aqu(bqu(A))))))))))))))))))))))))))))))
  1470. X
  1471. X    may need to be changed to:
  1472. X
  1473. X   Cb12(ase(bco(acp(bi(acp(bcp(acp(bpl('A'))))))))))))))))))))))))))))
  1474. X
  1475. X    if your C preprocessor botches single quotes in cpp expansions.
  1476. X
  1477. X    Systems that have index() and don't strchr() (e.g., BSD) should
  1478. X    compile with without -Dindex=strchr.
  1479. X
  1480. XSelected notes from the author:
  1481. X
  1482. X    If my preprocessor could hack it, I could write this as one single
  1483. X    line rather than 4, but when I do that I get a complaint "defines
  1484. X    nested too deeply".
  1485. X
  1486. X    Spoiler: (rot13 to read)
  1487. X
  1488. X    Guvf vf nabgure ebg13 wbo (oryvrir vg be abg) - gur #qrsvarf ner n
  1489. X    abiry jnl bs nqqvat gbxraf: '#qrsvar o12(k) 12 k' zrnaf gung ng
  1490. X    fbzr cbvag va gur fbhepr n 12 vf sbyybjrq ol gur pbzcerffrq arfgrq
  1491. X    qrsvarf. Gur o12 trgf gur cerivbhf pbzcerffvba nf na nethzrag, naq
  1492. X    cercraqf gur 12, guhf znxvat nabgure fgrc va gur erperngvba bs gur
  1493. X    fbhepr. Gur nkk() qrsvarf qb gur fnzr, ohg nqq gbxraf nsgre.
  1494. X
  1495. X    Nf sbe gur ebg13 nytbevguz, vg eryvrf ba vaqrk() gb svaq vs gur
  1496. X    punenpgre vf va gur frg N-Mn-m. y[] vf na neenl gung trgf svyyrq
  1497. X    jvgu:
  1498. X
  1499. X    "abcdefghijklmmmmnopqrstuvwxyzzzzABCDEFGHIJKLMMMMNOPQRSTUVWXYZZZZ"
  1500. X
  1501. X    Vs vaqrk() fnlf gur pune vf va gur nycunorg, gura kbe gur bssfrg
  1502. X    jvgu 16 gb genafyngr, naq bhgchg, bgurejvfr cnff vg hapunatrq.
  1503. SHAR_EOF
  1504. $TOUCH -am 0922165090 1990/dg.hint &&
  1505. chmod 0444 1990/dg.hint ||
  1506. echo "restore of 1990/dg.hint failed"
  1507. set `wc -c 1990/dg.hint`;Wc_c=$1
  1508. if test "$Wc_c" != "1733"; then
  1509.     echo original size 1733, current size $Wc_c
  1510. fi
  1511. echo "End of part 1, continue with part 2"
  1512. exit 0
  1513.  
  1514. -- 
  1515. For a good prime, call:  391581 * 2^216193 - 1
  1516.