home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume36 / hodge-c / part02 < prev    next >
Encoding:
Text File  |  1993-03-23  |  60.1 KB  |  1,939 lines

  1. Newsgroups: comp.sources.misc
  2. From: heitkoet@lusty.informatik.uni-dortmund.de (Joerg Heitkoetter)
  3. Subject: v36i036:  hodge-c - An implementation of Gerhard & Schuster's hodge-podge machine, Part02/33
  4. Message-ID: <1993Mar23.060827.2716@sparky.imd.sterling.com>
  5. X-Md4-Signature: f0c142824826a70445c35c168c481aa4
  6. Date: Tue, 23 Mar 1993 06:08:27 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: heitkoet@lusty.informatik.uni-dortmund.de (Joerg Heitkoetter)
  10. Posting-number: Volume 36, Issue 36
  11. Archive-name: hodge-c/part02
  12. Environment: ImageMagick, KHOROS
  13.  
  14. #!/bin/sh
  15. # this is Part.02 (part 2 of a multipart archive)
  16. # do not concatenate these parts, unpack them in order with /bin/sh
  17. # file hodge-c-0.98j/config/dos.cf continued
  18. #
  19. if test ! -r _shar_seq_.tmp; then
  20.     echo 'Please unpack part 1 first!'
  21.     exit 1
  22. fi
  23. (read Scheck
  24.  if test "$Scheck" != 2; then
  25.     echo Please unpack part "$Scheck" next!
  26.     exit 1
  27.  else
  28.     exit 0
  29.  fi
  30. ) < _shar_seq_.tmp || exit 1
  31. if test ! -f _shar_wnt_.tmp; then
  32.     echo 'x - still skipping hodge-c-0.98j/config/dos.cf'
  33. else
  34. echo 'x - continuing file hodge-c-0.98j/config/dos.cf'
  35. sed 's/^X//' << 'SHAR_EOF' >> 'hodge-c-0.98j/config/dos.cf' &&
  36. X
  37. X   #include <os-specials.h>
  38. X     ...
  39. X   #ifdef __COMPILER_TYPE__
  40. X     #include <compiler-specials.h>
  41. X     ...
  42. X   #endif __COMPILER_TYPE__
  43. X
  44. X   #define RSC_FILE    "<rsc-file-name>"
  45. X   #define RSC_PATH    "<rsc_path>" */
  46. X
  47. #include <stdio.h>
  48. #include <ctype.h>
  49. #include <math.h>
  50. #include <string.h>
  51. X
  52. #ifdef __TURBOC__
  53. #include <stdlib.h>
  54. #include <conio.h>
  55. #include <dos.h>
  56. #define KEYPRESSED    (bioskey(1))
  57. #define GETKEY        (bioskey(0)&0x00ff)
  58. #endif /* __TURBOC__ */
  59. X
  60. #define RSC_FILE    "hodge.ini"
  61. #define RSC_PATH    "c:\\;c:\\lib;."
  62. #endif /* __CONFIG_H__ */
  63. SHAR_EOF
  64. echo 'File hodge-c-0.98j/config/dos.cf is complete' &&
  65. chmod 0640 hodge-c-0.98j/config/dos.cf ||
  66. echo 'restore of hodge-c-0.98j/config/dos.cf failed'
  67. Wc_c="`wc -c < 'hodge-c-0.98j/config/dos.cf'`"
  68. test 1475 -eq "$Wc_c" ||
  69.     echo 'hodge-c-0.98j/config/dos.cf: original size 1475, current size' "$Wc_c"
  70. rm -f _shar_wnt_.tmp
  71. fi
  72. # ============= hodge-c-0.98j/config/sunos.cf ==============
  73. if test -f 'hodge-c-0.98j/config/sunos.cf' -a X"$1" != X"-c"; then
  74.     echo 'x - skipping hodge-c-0.98j/config/sunos.cf (File already exists)'
  75.     rm -f _shar_wnt_.tmp
  76. else
  77. > _shar_wnt_.tmp
  78. echo 'x - extracting hodge-c-0.98j/config/sunos.cf (Text)'
  79. sed 's/^X//' << 'SHAR_EOF' > 'hodge-c-0.98j/config/sunos.cf' &&
  80. X
  81. /* sunos.cf -- generic SunOS/Solaris configurations
  82. X
  83. X   Copyright (C) 1993 Joerg Heitkoetter
  84. X
  85. X   This program is free software; you can redistribute it and/or modify
  86. X   it under the terms of the GNU General Public License as published by
  87. X   the Free Software Foundation; either version 2, or (at your option)
  88. X   any later version.
  89. X
  90. X   This program is distributed in the hope that it will be useful,
  91. X   but WITHOUT ANY WARRANTY; without even the implied warranty of
  92. X   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  93. X   GNU General Public License for more details.
  94. X
  95. X   You should have received a copy of the GNU General Public License
  96. X   along with this program; if not, write to the Free Software
  97. X   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  98. X
  99. /* $Id: sunos.cf,v 1.1 1993/03/16 10:35:58 joke Exp $ */
  100. X
  101. #ifndef __CONFIG_H__
  102. #define __CONFIG_H__
  103. X
  104. #define V_OSTYPE    "SunOS/Solaris 1.1"
  105. X
  106. /*
  107. X   #define V_OSTYPE    "OSTYPE"
  108. X
  109. X   #include <os-specials.h>
  110. X     ...
  111. X   #ifdef __COMPILER_TYPE__
  112. X     #include <compiler-specials.h>
  113. X     ...
  114. X   #endif __COMPILER_TYPE__
  115. X
  116. X   #define RSC_FILE    "<rsc-file-name>"
  117. X   #define RSC_PATH    "<rsc_path>" */
  118. X
  119. #include <stdio.h>
  120. #include <ctype.h>
  121. #include <math.h>
  122. #include <memory.h>
  123. #include <string.h>
  124. X
  125. #ifdef __STDC__
  126. #include <stdlib.h>
  127. #include <unistd.h>
  128. #endif /* __STDC__ */
  129. X
  130. #define KEYPRESSED    (0)
  131. #define GETKEY        (0)    
  132. X
  133. #define RSC_FILE    ".scsrc"
  134. #define RSC_PATH    "/usr/local/lib:~:."
  135. #endif /* __CONFIG_H__ */
  136. SHAR_EOF
  137. chmod 0640 hodge-c-0.98j/config/sunos.cf ||
  138. echo 'restore of hodge-c-0.98j/config/sunos.cf failed'
  139. Wc_c="`wc -c < 'hodge-c-0.98j/config/sunos.cf'`"
  140. test 1474 -eq "$Wc_c" ||
  141.     echo 'hodge-c-0.98j/config/sunos.cf: original size 1474, current size' "$Wc_c"
  142. rm -f _shar_wnt_.tmp
  143. fi
  144. # ============= hodge-c-0.98j/config/sys5.cf ==============
  145. if test -f 'hodge-c-0.98j/config/sys5.cf' -a X"$1" != X"-c"; then
  146.     echo 'x - skipping hodge-c-0.98j/config/sys5.cf (File already exists)'
  147.     rm -f _shar_wnt_.tmp
  148. else
  149. > _shar_wnt_.tmp
  150. echo 'x - extracting hodge-c-0.98j/config/sys5.cf (Text)'
  151. sed 's/^X//' << 'SHAR_EOF' > 'hodge-c-0.98j/config/sys5.cf' &&
  152. X
  153. /* sys5.cf -- generic UN*X System V configurations
  154. X
  155. X   Copyright (C) 1993 Joerg Heitkoetter
  156. X
  157. X   This program is free software; you can redistribute it and/or modify
  158. X   it under the terms of the GNU General Public License as published by
  159. X   the Free Software Foundation; either version 2, or (at your option)
  160. X   any later version.
  161. X
  162. X   This program is distributed in the hope that it will be useful,
  163. X   but WITHOUT ANY WARRANTY; without even the implied warranty of
  164. X   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  165. X   GNU General Public License for more details.
  166. X
  167. X   You should have received a copy of the GNU General Public License
  168. X   along with this program; if not, write to the Free Software
  169. X   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  170. X
  171. /* $Id: sys5.cf,v 1.1 1993/03/16 10:35:58 joke Exp $ */
  172. X
  173. #ifndef __CONFIG_H__
  174. #define __CONFIG_H__
  175. X
  176. #define V_OSTYPE    "generic un*x system V"
  177. X
  178. /*
  179. X   #define V_OSTYPE    "OSTYPE"
  180. X
  181. X   #include <os-specials.h>
  182. X     ...
  183. X   #ifdef __COMPILER_TYPE__
  184. X     #include <compiler-specials.h>
  185. X     ...
  186. X   #endif __COMPILER_TYPE__
  187. X
  188. X   #define RSC_FILE    "<rsc-file-name>"
  189. X   #define RSC_PATH    "<rsc_path>" */
  190. X
  191. #include <stdio.h>
  192. #include <ctype.h>
  193. #include <math.h>
  194. #include <string.h>
  195. X
  196. #ifdef __STDC__
  197. #include <stdlib.h>
  198. #include <unistd.h>
  199. #endif /* __STDC__ */
  200. X
  201. #define KEYPRESSED    (0)
  202. #define GETKEY        (0)    
  203. X
  204. #define RSC_FILE    ".hodge"
  205. #define RSC_PATH    "/usr/local/lib:~:."
  206. #endif /* __CONFIG_H__ */
  207. SHAR_EOF
  208. chmod 0640 hodge-c-0.98j/config/sys5.cf ||
  209. echo 'restore of hodge-c-0.98j/config/sys5.cf failed'
  210. Wc_c="`wc -c < 'hodge-c-0.98j/config/sys5.cf'`"
  211. test 1456 -eq "$Wc_c" ||
  212.     echo 'hodge-c-0.98j/config/sys5.cf: original size 1456, current size' "$Wc_c"
  213. rm -f _shar_wnt_.tmp
  214. fi
  215. # ============= hodge-c-0.98j/config/tos.cf ==============
  216. if test -f 'hodge-c-0.98j/config/tos.cf' -a X"$1" != X"-c"; then
  217.     echo 'x - skipping hodge-c-0.98j/config/tos.cf (File already exists)'
  218.     rm -f _shar_wnt_.tmp
  219. else
  220. > _shar_wnt_.tmp
  221. echo 'x - extracting hodge-c-0.98j/config/tos.cf (Text)'
  222. sed 's/^X//' << 'SHAR_EOF' > 'hodge-c-0.98j/config/tos.cf' &&
  223. X
  224. /* tos.cf -- generic ATARI TOS configurations
  225. X
  226. X   Copyright (C) 1993 Joerg Heitkoetter
  227. X
  228. X   This program is free software; you can redistribute it and/or modify
  229. X   it under the terms of the GNU General Public License as published by
  230. X   the Free Software Foundation; either version 2, or (at your option)
  231. X   any later version.
  232. X
  233. X   This program is distributed in the hope that it will be useful,
  234. X   but WITHOUT ANY WARRANTY; without even the implied warranty of
  235. X   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  236. X   GNU General Public License for more details.
  237. X
  238. X   You should have received a copy of the GNU General Public License
  239. X   along with this program; if not, write to the Free Software
  240. X   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  241. X
  242. /* $Id: tos.cf,v 1.1 1993/03/16 10:35:58 joke Exp $ */
  243. X
  244. #ifndef __CONFIG_H__
  245. #define __CONFIG_H__
  246. X
  247. #define V_OSTYPE    "TOS 2.6"
  248. X
  249. /*
  250. X   #define V_OSTYPE    "OSTYPE"
  251. X
  252. X   #include <os-specials.h>
  253. X     ...
  254. X   #ifdef __COMPILER_TYPE__
  255. X     #include <compiler-specials.h>
  256. X     ...
  257. X   #endif __COMPILER_TYPE__
  258. X
  259. X   #define RSC_FILE    "<rsc-file-name>"
  260. X   #define RSC_PATH    "<rsc_path>" */
  261. X
  262. #include <stdio.h>
  263. #include <ctype.h>
  264. #include <math.h>
  265. #include <string.h>
  266. X
  267. #ifdef __TURBOC__
  268. #include <stdlib.h>
  269. #include <tos.h>
  270. #define KEYPRESSED    (Cconis()&0xff)
  271. #define GETKEY        Cnecin()
  272. #endif /* __TURBOC__ */
  273. X
  274. #define RSC_FILE    "hodge.ini"
  275. #define RSC_PATH    "c:\\;c:\\lib;."
  276. #endif /* __CONFIG_H__ */
  277. SHAR_EOF
  278. chmod 0640 hodge-c-0.98j/config/tos.cf ||
  279. echo 'restore of hodge-c-0.98j/config/tos.cf failed'
  280. Wc_c="`wc -c < 'hodge-c-0.98j/config/tos.cf'`"
  281. test 1451 -eq "$Wc_c" ||
  282.     echo 'hodge-c-0.98j/config/tos.cf: original size 1451, current size' "$Wc_c"
  283. rm -f _shar_wnt_.tmp
  284. fi
  285. # ============= hodge-c-0.98j/configure ==============
  286. if test -f 'hodge-c-0.98j/configure' -a X"$1" != X"-c"; then
  287.     echo 'x - skipping hodge-c-0.98j/configure (File already exists)'
  288.     rm -f _shar_wnt_.tmp
  289. else
  290. > _shar_wnt_.tmp
  291. echo 'x - extracting hodge-c-0.98j/configure (Text)'
  292. sed 's/^X//' << 'SHAR_EOF' > 'hodge-c-0.98j/configure' &&
  293. #! /bin/csh -f
  294. # Script to `configure' HODGE-C
  295. # $Id: configure,v 1.1 1993/03/16 10:35:58 joke Exp $
  296. #
  297. set default=sunos
  298. set ostype=$default
  299. set configdir=./config
  300. set srcdir=.
  301. set package=HODGE-C
  302. #
  303. top:
  304. if ($#argv > 0) then
  305. X    switch ($1:q)
  306. X
  307. X    case --*:
  308. X    set ostype = "$1:q"
  309. X    shift
  310. X    goto top
  311. X
  312. X    default:
  313. X    goto usage
  314. X    endsw
  315. endif
  316. X
  317. rm -f $srcdir/config.h
  318. if ("$ostype" == "--sunos") then
  319. X    ln -s $configdir/sunos.cf $srcdir/config.h
  320. X    echo "$package configured for SunOS."
  321. X    goto done
  322. endif
  323. X
  324. if ("$ostype" == "--solaris") then
  325. X    ln -s $configdir/sunos.cf $srcdir/config.h
  326. X    echo "$package configured for SunOS/Solaris."
  327. X    goto done
  328. endif
  329. X
  330. if ("$ostype" == "--unix") then
  331. X    echo "try either: configure --bsd, or: configure --sys5"
  332. X    goto done
  333. endif
  334. X
  335. if ("$ostype" == "--sys5") then
  336. X    ln -s $configdir/sys5.cf $srcdir/config.h
  337. X    echo "$package configured for generic unix system V."
  338. X    goto done
  339. endif
  340. X
  341. if ("$ostype" == "--bsd") then
  342. X    ln -s $configdir/bsd.cf $srcdir/config.h
  343. X    echo "$package configured for generic BSD unix."
  344. X    goto done
  345. endif
  346. X
  347. usage:
  348. X    echo "usage: configure --<os-type>    (eg. configure --sunos)"
  349. X
  350. done:
  351. SHAR_EOF
  352. chmod 0750 hodge-c-0.98j/configure ||
  353. echo 'restore of hodge-c-0.98j/configure failed'
  354. Wc_c="`wc -c < 'hodge-c-0.98j/configure'`"
  355. test 1157 -eq "$Wc_c" ||
  356.     echo 'hodge-c-0.98j/configure: original size 1157, current size' "$Wc_c"
  357. rm -f _shar_wnt_.tmp
  358. fi
  359. # ============= hodge-c-0.98j/contrib/infekt2.c ==============
  360. if test ! -d 'hodge-c-0.98j/contrib'; then
  361.     echo 'x - creating directory hodge-c-0.98j/contrib'
  362.     mkdir 'hodge-c-0.98j/contrib'
  363. fi
  364. if test -f 'hodge-c-0.98j/contrib/infekt2.c' -a X"$1" != X"-c"; then
  365.     echo 'x - skipping hodge-c-0.98j/contrib/infekt2.c (File already exists)'
  366.     rm -f _shar_wnt_.tmp
  367. else
  368. > _shar_wnt_.tmp
  369. echo 'x - extracting hodge-c-0.98j/contrib/infekt2.c (Text)'
  370. sed 's/^X//' << 'SHAR_EOF' > 'hodge-c-0.98j/contrib/infekt2.c' &&
  371. /****************************************************************/
  372. /*                                                              */
  373. /*             C-Textfile zum  INFEKTIONSMODELL                 */
  374. /*                   von Martin Gerhardt                        */
  375. /*                                                              */
  376. /*  Version 2.0                                   31. 8. 1986   */
  377. /*                                                              */
  378. /*                                                              */
  379. /*  Bemerkungen zur Art der Simulation:                         */
  380. /*                                                              */
  381. /*  - Rand des Feldes nicht geschlossen                         */
  382. /*  - Moore-Nachbarschaft                                       */
  383. /*  - einzulesende Feldgroesse sollte nicht groesser als 179 sein   */
  384. /*  - als Auswertung ist das Spielfeld dargestellt:             */
  385. /*        - Tastaturbelegungen:                                 */
  386. /*             'm' : Darstellung des Spielfeldes                */
  387. /*             'B' : Beendigung der Simulation                  */
  388. /*             'w' : Halt bis neuer Tastendruck erfolgt         */
  389. /*             'E' : Neues Einlesen der Konstanten              */
  390. /*                                                              */
  391. /****************************************************************/
  392. X
  393. /*
  394. X *  $Id: infekt2.c,v 1.1 1993/03/11 12:10:52 joke Exp $
  395. X */
  396. #ifdef __STDC__            /* ATARI ST Turbo-C */
  397. #include <aes.h>
  398. #include <vdi.h>
  399. #include <tos.h>
  400. #include <stdio.h>
  401. #else /* Megamax-C */
  402. #include <osbind.h>
  403. #endif
  404. X
  405. int contrl[12], intin[128], ptsin[128], intout[128], ptsout[128];
  406. X
  407. int handle;
  408. X
  409. int work_out[57], work_in[12];
  410. X
  411. int set_mode, set_perimeter, set_color, set_interior, set_style, set_effect;
  412. X
  413. int Feldgr, Umschlagsgrenze, Infgeschw, k1, k2, Bgrad;
  414. X
  415. X
  416. long Zufallszahl, Zeitpunkt, Umschlaege;
  417. X
  418. int *Feld, *Hfeld, *Krank, *Inf;
  419. X
  420. /*************************************************/
  421. /*    open_work                                  */
  422. /*************************************************/
  423. X
  424. open_work ()
  425. {
  426. X    int i;
  427. X
  428. X    appl_init ();
  429. X    for (i = 0; i < 10; work_in[i++] = 1);
  430. X    work_in[10] = 2;
  431. X    v_opnvwk (work_in, &handle, work_out);
  432. }
  433. X
  434. /*************************************************/
  435. /*    close_work                                 */
  436. /*************************************************/
  437. X
  438. close_work ()
  439. {
  440. X    gemdos (0x1);
  441. X    v_clsvwk (handle);
  442. X    appl_exit ();
  443. }
  444. X
  445. /*************************************************/
  446. /*   hide_mouse                                  */
  447. /*************************************************/
  448. static int hidden;
  449. X
  450. hide_mouse ()
  451. {
  452. X    if (!hidden) {
  453. X    graf_mouse (256, 0x0L);
  454. X    hidden = 1;
  455. X    }
  456. }
  457. X
  458. /**************************************************/
  459. /*   show_mouse                                   */
  460. /**************************************************/
  461. show_mouse ()
  462. {
  463. X    if (hidden) {
  464. X    graf_mouse (257, 0x0L);
  465. X    hidden = 0;
  466. X    }
  467. }
  468. X
  469. /*************************************************/
  470. /*    Speicherplatzreservierung                  */
  471. /*************************************************/
  472. Speicherplatz ()
  473. {
  474. X    if ((Feld = (int *) Malloc (2l * (long) Feldgr * (long) Feldgr)) == 0) {
  475. X    form_alert (1, "[3][Speicherplatzmangel][Abbruch]");
  476. X    return (1);
  477. X    }
  478. X    if ((Hfeld = (int *) Malloc (2l * (long) Feldgr * (long) Feldgr)) == 0) {
  479. X    form_alert (1, "[3][Speicherplatzmangel][Abbruch]");
  480. X    return (1);
  481. X    }
  482. X    if ((Inf = (int *) Malloc (2l * (long) Feldgr * (long) Feldgr)) == 0) {
  483. X    form_alert (1, "[3][Speicherplatzmangel][Abbruch]");
  484. X    return (1);
  485. X    }
  486. X    if ((Krank = (int *) Malloc (2l * (long) Feldgr * (long) Feldgr)) == 0) {
  487. X    form_alert (1, "[3][Speicherplatzmangel][Abbruch]");
  488. X    return (1);
  489. X    }
  490. X    return (0);
  491. }
  492. X
  493. /*************************************************/
  494. /*    Speicherplatzfreigabe                      */
  495. /*************************************************/
  496. Spfrei ()
  497. {
  498. X    Mfree (Feld);
  499. X    Mfree (Hfeld);
  500. X    Mfree (Krank);
  501. X    Mfree (Inf);
  502. }
  503. X
  504. /*************************************************/
  505. /*    Zufallszahl                                */
  506. /*************************************************/
  507. X
  508. #define M 100000000
  509. #define m1  10000L
  510. #define b 31415821
  511. X
  512. long
  513. Multiply (p, q)
  514. X    long p, q;
  515. X
  516. {
  517. X    long p0, p1, q0, q1;
  518. X
  519. X    p1 = p / m1;
  520. X    p0 = p % m1;
  521. X    q1 = q / m1;
  522. X    q0 = q % m1;
  523. X
  524. X    return ((((p0 * q1 + p1 * q0) % m1) * m1 + p0 * q0) % M);
  525. }
  526. X
  527. X
  528. rnd (maxvalue)
  529. X    long maxvalue;
  530. X
  531. {
  532. X    long Multiply ();
  533. X
  534. X    Zufallszahl = (Multiply (Zufallszahl, b) + 1L) % M;
  535. X    return ((((Zufallszahl / m1) * maxvalue) / m1) % 65536);
  536. }
  537. X
  538. X
  539. /*************************************************/
  540. /*  Einlesen                                     */
  541. /*************************************************/
  542. X
  543. Einlesen ()
  544. {
  545. X    do {
  546. X
  547. X    v_clrwk (handle);
  548. X    printf ("\033H\033e");
  549. X    printf ("Feldgroesse = ");
  550. X    scanf ("%d", &Feldgr);
  551. X    Feldgr = Feldgr + 2;
  552. X    printf ("Umschlagsgrenze = ");
  553. X    scanf ("%d", &Umschlagsgrenze);
  554. X    printf ("Infektionsgeschw. = ");
  555. X    scanf ("%d", &Infgeschw);
  556. X    printf ("k1 = ");
  557. X    scanf ("%d", &k1);
  558. X    printf ("k2 = ");
  559. X    scanf ("%d", &k2);
  560. X    printf ("Bedeckungsgrad = ");
  561. X    scanf ("%d", &Bgrad);
  562. X    printf ("Zufallszahl = ");
  563. X    scanf ("%ld", &Zufallszahl);
  564. X    printf ("\033f");
  565. X
  566. X    printf ("\n\n\n    continue   (y/n)\n");
  567. X    }
  568. X    while ((char) evnt_keybd () != 'y');
  569. }
  570. X
  571. /********************************************/
  572. /*   Anfangsbelegung                        */
  573. /********************************************/
  574. X
  575. Anfangsbelegung ()
  576. {
  577. X    register int i, j;
  578. X
  579. X    for (i = 1; i <= Feldgr - 2; i++)
  580. X    for (j = 1; j <= Feldgr - 2; j++) {
  581. X
  582. X        if (rnd (100L) >= Bgrad)
  583. X        *(Feld + i * Feldgr + j) = 0;
  584. X        else
  585. X        *(Feld + i * Feldgr + j) = rnd ((long) Umschlagsgrenze);
  586. X        *(Hfeld + i * Feldgr + j) = 0;
  587. X    }
  588. X
  589. X    for (i = 0; i <= Feldgr - 1; i++) {
  590. X    *(Feld + i) = -1;
  591. X    *(Feld + i * Feldgr) = -1;
  592. X    *(Feld + (i + 1) * Feldgr - 1) = -1;
  593. X    *(Feld + Feldgr * (Feldgr - 1) + i) = -1;
  594. X
  595. X    *(Hfeld + i) = -1;
  596. X    *(Hfeld + i * Feldgr) = -1;
  597. X    *(Hfeld + (i + 1) * Feldgr - 1) = -1;
  598. X    *(Hfeld + Feldgr * (Feldgr - 1) + i) = -1;
  599. X    }
  600. }
  601. X
  602. /*****************************/
  603. /* Hilfsfeldneu              */
  604. /*****************************/
  605. Hfeldneu ()
  606. {
  607. X    register int i, j;
  608. X
  609. X    for (i = 1; i <= Feldgr - 2; i++)
  610. X    for (j = 1; j <= Feldgr - 2; j++)
  611. X        *(Hfeld + i * Feldgr + j) = 0;
  612. }
  613. X
  614. /********************************************/
  615. /*   grafische Auswertung                   */
  616. /********************************************/
  617. X
  618. /*****************************/
  619. /* Grafiktext                */
  620. /*****************************/
  621. Text ()
  622. {
  623. X    char string[50];
  624. X
  625. X    v_gtext (handle, 410, 20, "************************");
  626. X    v_gtext (handle, 410, 40, "*   Infektionsmodell   *");
  627. X    v_gtext (handle, 410, 60, "************************");
  628. X    v_gtext (handle, 410, 80, " - Moore Nachbarschaft ");
  629. X    v_gtext (handle, 410, 100, " - Feld mit Rand        ");
  630. X    set_effect = vst_effects (handle, 8);
  631. X    v_gtext (handle, 410, 130, "Konstanten :");
  632. X    v_gtext (handle, 410, 300, "Berechnung :");
  633. X    set_effect = vst_effects (handle, 0);
  634. X    sprintf (string, "  Feldgroesse       : %d", Feldgr - 2);
  635. X    v_gtext (handle, 410, 150, string);
  636. X    sprintf (string, "  Umschlagsgrenze   : %d", Umschlagsgrenze);
  637. X    v_gtext (handle, 410, 170, string);
  638. X    sprintf (string, "  Infektionsgeschw. : %d", Infgeschw);
  639. X    v_gtext (handle, 410, 190, string);
  640. X    sprintf (string, "  k1 (krank)        : %d", k1);
  641. X    v_gtext (handle, 410, 210, string);
  642. X    sprintf (string, "  k2 (infiziert)    : %d", k2);
  643. X    v_gtext (handle, 410, 230, string);
  644. X    sprintf (string, "  Bedeckungsgrad    : %d", Bgrad);
  645. X    v_gtext (handle, 410, 250, string);
  646. X    sprintf (string, "  Zufallszahl       : %ld", Zufallszahl);
  647. X    v_gtext (handle, 410, 270, string);
  648. X    v_gtext (handle, 410, 320, "  Zeitpunkt  : ");
  649. X    v_gtext (handle, 410, 340, "  Umschlaege : ");
  650. }
  651. X
  652. /*****************************/
  653. /* Setze Attribute           */
  654. /*****************************/
  655. X
  656. Setze_Attribute ()
  657. {
  658. X    set_mode = vswr_mode (handle, 1);
  659. X    set_perimeter = vsf_perimeter (handle, 0);
  660. X    set_color = vsf_color (handle, 1);
  661. }
  662. X
  663. /*****************************/
  664. /* Hintergrund : schwarz     */
  665. /*****************************/
  666. X
  667. Hintergrund ()
  668. {
  669. X    int pxyarray[4];
  670. X
  671. X    pxyarray[0] = 0;
  672. X    pxyarray[1] = 0;
  673. X    pxyarray[2] = (400 / (Feldgr - 2)) * (Feldgr - 2);
  674. X    pxyarray[3] = (400 / (Feldgr - 2)) * (Feldgr - 2);
  675. X
  676. X    set_interior = vsf_interior (handle, 1);
  677. X
  678. X    vr_recfl (handle, pxyarray);
  679. }
  680. X
  681. /*****************************/
  682. /* welcher Farbwert ?        */
  683. /*****************************/
  684. X
  685. Farbe (z)
  686. X    int z;
  687. X
  688. {
  689. X    switch (z) {
  690. X
  691. X     case -1:
  692. X     case 0:
  693. X     return (8);
  694. X     break;
  695. X     default:
  696. X     if (z >= Umschlagsgrenze)
  697. X         return (0);
  698. X     else
  699. X         return (7 - ((7 * z) / Umschlagsgrenze));
  700. X     break;
  701. X    }
  702. }
  703. X
  704. /*****************************/
  705. /* Zeichne Rechteck          */
  706. /*****************************/
  707. X
  708. Fill_Rectangle (x, y, Schritt, style)
  709. X    int x, y, Schritt, style;
  710. X
  711. {
  712. X    int pxyarray[4];
  713. X
  714. X    pxyarray[0] = (y - 1) * Schritt;
  715. X    pxyarray[1] = (x - 1) * Schritt;
  716. X    pxyarray[2] = y * Schritt;
  717. X    pxyarray[3] = x * Schritt;
  718. X
  719. X    switch (style) {
  720. X
  721. X     case 0:
  722. X     set_interior = vsf_interior (handle, 0);
  723. X     vr_recfl (handle, pxyarray);
  724. X     break;
  725. X     default:
  726. X     set_interior = vsf_interior (handle, 2);
  727. X     set_style = vsf_style (handle, style);
  728. X     vr_recfl (handle, pxyarray);
  729. X     break;
  730. X    }
  731. }
  732. X
  733. /************************/
  734. /* Auswertfunktion      */
  735. /************************/
  736. X
  737. Auswertung ()
  738. {
  739. X    register int i, j;
  740. X    int style, Schritt;
  741. X
  742. X    Schritt = 400 / (Feldgr - 2);
  743. X
  744. X    for (i = 1; i <= Feldgr - 2; i++)
  745. X    for (j = 1; j <= Feldgr - 2; j++)
  746. X        if ((style = Farbe (*(Feld + i * Feldgr + j))) != Farbe (*(Hfeld + i * Feldgr + j)))
  747. X        Fill_Rectangle (i, j, Schritt, style);
  748. }
  749. X
  750. /********************************************/
  751. /*    Rekursionsgleichung                   */
  752. /********************************************/
  753. X
  754. Hilfsfelder ()
  755. {
  756. X    register int i, j;
  757. X
  758. X    for (i = 0; i < Feldgr; i++)
  759. X    for (j = 0; j < Feldgr; j++) {
  760. X
  761. X        *(Krank + i * Feldgr + j) = 0;
  762. X        *(Inf + i * Feldgr + j) = 0;
  763. X
  764. X        if (*(Feld + i * Feldgr + j) >= Umschlagsgrenze)
  765. X        *(Krank + i * Feldgr + j) = 1;
  766. X        else if (*(Feld + i * Feldgr + j) > 0)
  767. X        *(Inf + i * Feldgr + j) = 1;
  768. X    }
  769. }
  770. X
  771. Rekursion ()
  772. {
  773. X    register int i, j, ni, nj;
  774. X    int krank, infiziert, infsumme;
  775. X    int *ptr;
  776. X    char string[50];
  777. X
  778. X    Zeitpunkt = Zeitpunkt + 1l;
  779. X    Umschlaege = 0;
  780. X
  781. X    Hilfsfelder ();
  782. X
  783. X    for (i = 1; i <= Feldgr - 2; i++)
  784. X    for (j = 1; j <= Feldgr - 2; j++) {
  785. X
  786. X        switch (*(Feld + i * Feldgr + j)) {
  787. X
  788. X         case 0:
  789. X         krank = 0;
  790. X         infiziert = 0;
  791. X
  792. X         for (ni = -1; ni <= 1; ni++)
  793. X             for (nj = -1; nj <= 1; nj++) {
  794. X             krank = krank + *(Krank + (i + ni) * Feldgr + j + nj);
  795. X             infiziert = infiziert + *(Inf + (i + ni) * Feldgr + j + nj);
  796. X             }
  797. X         *(Hfeld + i * Feldgr + j) = krank / k1 + infiziert / k2;
  798. X         break;
  799. X
  800. X         default:
  801. X         if (*(Feld + i * Feldgr + j) >= Umschlagsgrenze) {
  802. X             *(Hfeld + i * Feldgr + j) = 0;
  803. X             Umschlaege = Umschlaege + 1;
  804. X         } else {
  805. X             infsumme = 0;
  806. X             infiziert = 0;
  807. X
  808. X             for (ni = -1; ni <= 1; ni++)
  809. X             for (nj = -1; nj <= 1; nj++) {
  810. X                 infsumme = infsumme + (*(Inf + (i + ni) * Feldgr + j + nj)
  811. X                            * *(Feld + (i + ni) * Feldgr + j + nj));
  812. X
  813. X                 infiziert = infiziert + *(Inf + (i + ni) * Feldgr + j + nj);
  814. X             }
  815. X             *(Hfeld + i * Feldgr + j) = infsumme / infiziert + Infgeschw;
  816. X         }
  817. X         break;
  818. X        }
  819. X    }                /* rekursive Schleife */
  820. X
  821. X   /* Kopie */
  822. X    ptr = Hfeld;
  823. X    Hfeld = Feld;
  824. X    Feld = ptr;
  825. X
  826. }                    /* Ende */
  827. X
  828. /*******************************************************/
  829. main ()
  830. {
  831. X    char ch;
  832. X    char string[50];
  833. X
  834. X    open_work ();
  835. X    hide_mouse ();
  836. X    Einlesen ();
  837. X    if (Speicherplatz () == 1)
  838. X    goto ENDE;
  839. X    Setze_Attribute ();
  840. X    v_clrwk (handle);
  841. X    Hintergrund ();
  842. X    Text ();
  843. X    Anfangsbelegung ();
  844. X    Auswertung ();
  845. X    ch = (char) evnt_keybd ();
  846. X    Zeitpunkt = 0l;
  847. X
  848. X    while (ch != 'B') {
  849. X    Rekursion ();
  850. X    if (Cconis () != 0) {
  851. X        ch = Crawcin ();
  852. X        if (ch == 'm') {
  853. X        Hintergrund ();
  854. X        Hfeldneu ();
  855. X        }
  856. X    }
  857. X
  858. X    if (ch == 'w')
  859. X        ch = (char) evnt_keybd ();
  860. X
  861. X    sprintf (string, "%ld", Zeitpunkt);
  862. X    v_gtext (handle, 530, 320, string);
  863. X    sprintf (string, "%ld    ", Umschlaege);
  864. X    v_gtext (handle, 530, 340, string);
  865. X
  866. X    if (ch == 'm')
  867. X        Auswertung ();
  868. X
  869. X    if (ch == 'E') {
  870. X        v_clrwk (handle);
  871. X        Einlesen ();
  872. X        Hintergrund ();
  873. X        Text ();
  874. X        Hfeldneu ();
  875. X        ch = 'm';
  876. X        Zeitpunkt = 0;
  877. X    }
  878. X    }
  879. X
  880. X    v_clrwk (handle);
  881. X    Spfrei ();
  882. X    show_mouse ();
  883. X
  884. X  ENDE:
  885. X    close_work ();
  886. X    return 0;
  887. }
  888. SHAR_EOF
  889. chmod 0640 hodge-c-0.98j/contrib/infekt2.c ||
  890. echo 'restore of hodge-c-0.98j/contrib/infekt2.c failed'
  891. Wc_c="`wc -c < 'hodge-c-0.98j/contrib/infekt2.c'`"
  892. test 12637 -eq "$Wc_c" ||
  893.     echo 'hodge-c-0.98j/contrib/infekt2.c: original size 12637, current size' "$Wc_c"
  894. rm -f _shar_wnt_.tmp
  895. fi
  896. # ============= hodge-c-0.98j/contrib/pixmon.1 ==============
  897. if test -f 'hodge-c-0.98j/contrib/pixmon.1' -a X"$1" != X"-c"; then
  898.     echo 'x - skipping hodge-c-0.98j/contrib/pixmon.1 (File already exists)'
  899.     rm -f _shar_wnt_.tmp
  900. else
  901. > _shar_wnt_.tmp
  902. echo 'x - extracting hodge-c-0.98j/contrib/pixmon.1 (Text)'
  903. sed 's/^X//' << 'SHAR_EOF' > 'hodge-c-0.98j/contrib/pixmon.1' &&
  904. .\" $Id$
  905. .TH PIXMON 1 "16 March 1993" "Version 0.3"
  906. .ta 0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i
  907. X
  908. \" this noise gets my name right!
  909. .nr 99 \n(.s
  910. .nr 98 \n(.f
  911. .ds 11 "\fRo
  912. .nr 11 \w'\s10\*(11'
  913. .nr 10 0u
  914. .if \n(ct>1 .nr 10 \n(10+\s10.25m\s0
  915. .nr 13 \s10.1m\s0
  916. .if \n(ct>1 .nr 13 \s10.15m\s0
  917. .ds 12 \s10\v'-.67m'..\v'.67m\s0'
  918. .nr 12 \w'\s10\*(12'
  919. .as 11 \h'-\n(11u-\n(12u/2u+\n(13u'\v'0-\n(10u'\*(12\v'\n(10u'\h'-\n(12u+\n(11u/2u-\n(13u'
  920. .ds o \x'0'\f1\s10\*(11\s\n(99\f\n(98
  921. X
  922. .SH NAME
  923. .B pixmon
  924. \- a simple pixel monitor for X11
  925. X
  926. .SH SYNOPSIS
  927. .LP
  928. .B pixmon
  929. [
  930. .I -Xt-options ...
  931. ]
  932. [
  933. .I -options ...
  934. ]
  935. .TP
  936. X        [\fB-dx \fI<pixel-data-size>\fR]
  937. .TP
  938. X        [\fB-dy \fI<pixel-data-size>\fR]
  939. .TP
  940. X        [\fB-width \fI<window-size>\fR]
  941. .TP
  942. X        [\fB-height \fI<window-size>\fR]
  943. .TP
  944. X        [\fB-scale \fI<float-value>\fR]
  945. .TP
  946. X        [\fB-cmap \fI<filename>[.cmap]\fR]
  947. .TP
  948. X        [\fB-dither\fR]
  949. X
  950. .SH DESCRIPTION
  951. .B pixmon
  952. implements a simple 
  953. .I pixel data monitor
  954. for use with the
  955. .I X11
  956. window system. It comes with the following features:
  957. .TP \w'\(bu'u+2n
  958. \(bu
  959. Auto-rescale when changing the window size
  960. .TP
  961. \(bu
  962. Loadable colormaps, you can display the same data with
  963. different colors
  964. .TP
  965. \(bu
  966. Autodetect mono servers, using dithering
  967. .I (ordered dither)
  968. instead of colors
  969. .TP
  970. \(bu
  971. Run length encoding support.
  972. X
  973. .SH OPTIONS
  974. .TP
  975. .B \-dx \fIpixel-data-size\fR
  976. Set the horizontal size of expected
  977. .I pixel data image.
  978. (Defaults to \fI100\fR.)
  979. .TP
  980. .B \-dy \fIpixel-data-size\fR
  981. Set the vertical size of expected
  982. .I pixel data image.
  983. (Defaults to \fI100\fR.)
  984. .TP
  985. .B \-width \fIwindow-size\fR
  986. Set the horizontal size of
  987. .I pixmon
  988. window in screen coordinates
  989. (Defaults to \fIdx * scale\fR.)
  990. .TP
  991. .B \-height \fIwindow-size\fR
  992. Set the vertical size of
  993. .I pixmon
  994. window in screen coordinates
  995. (Defaults to \fIdy * scale\fR.)
  996. .TP
  997. .B \-scale \fIfloat-value\fR
  998. Scale the window's size to
  999. .I width = dx * float-value
  1000. and
  1001. .I height = dy * float-value
  1002. (Defaults to \fI2\fR.)
  1003. .TP
  1004. .B \-cmap \fIfilename[.cmap]\fR
  1005. Read in \fIfilename[.cmap]\fR on program start, and use the
  1006. colors when generating the pixmaps. The use of the
  1007. suffix `.cmap' is encouraged, but not enforced.
  1008. .TP
  1009. .B \-dither
  1010. Use an
  1011. .I ordered dither
  1012. for pseudo color representation on low bitplane devices,
  1013. eg.
  1014. .I monochrome
  1015. XX servers.
  1016. when used on a color device, a two color dithering generates
  1017. some interesting effects.
  1018. .PP
  1019. The following standard X Toolkit command line arguments are commonly used 
  1020. with
  1021. .BR pixmon :
  1022. .TP
  1023. .B \-bg \fIcolor\fP
  1024. This option specifies the color to use for the background of the window.  
  1025. The default is ``white.''
  1026. .TP
  1027. .B \-bd \fIcolor\fP
  1028. This option specifies the color to use for the border of the window.
  1029. The default is ``black.''
  1030. .TP
  1031. .B \-bw \fInumber\fP
  1032. This option specifies the width in pixels of the border surrounding the window.
  1033. .TP
  1034. .B \-fg \fIcolor\fP
  1035. This option specifies the color to use for displaying pixels.  The default is 
  1036. ``black.''
  1037. .TP
  1038. .B \-name \fIname\fP
  1039. This option specifies the application name under which resources are to be
  1040. obtained, rather than the default executable file name.
  1041. \fIName\fP should not contain ``.'' or ``*'' characters. (Defaults to
  1042. .B ``PixMon.'')
  1043. .TP
  1044. .B \-title \fIstring\fP
  1045. This option specifies the window title string, which may be displayed by
  1046. window managers if the user so chooses.  The default title is `pixmon'.
  1047. .TP
  1048. .B \-rv
  1049. This option indicates that reverse video should be simulated by swapping
  1050. the foreground and background colors.
  1051. .TP
  1052. .B \-geometry \fIgeometry\fP
  1053. This option specifies the preferred size and position of the
  1054. .B pixmon window;
  1055. see \fIX(1)\fP.
  1056. .TP
  1057. .B \-display \fIdisplay\fP
  1058. This option specifies the X server to contact; see \fIX(1)\fP.
  1059. .TP
  1060. .B \-xrm \fIresourcestring\fP
  1061. This option specifies a resource string to be used.  This is especially
  1062. useful for setting resources that do not have separate command line options.
  1063. .TP
  1064. .B \-iconic
  1065. This option indicates that
  1066. .B pixmon
  1067. should ask the window manager to 
  1068. start it as an icon rather than as the normal window.
  1069. X
  1070. .SH OPTION SUMMARY
  1071. To give no option at all is the same as to give the following options:
  1072. .TP
  1073. -dx 100 -dy 100 -scale 2 -cmap default.cmap
  1074. X
  1075. .SH FORMATS
  1076. .TP \w'\(bu'u+2n
  1077. \(bu
  1078. .I Color map file(s), recognised by
  1079. .B pixmon
  1080. have the following
  1081. .SM ASCII
  1082. layout:
  1083. .LP
  1084. .nf
  1085. .DT
  1086. .ft B
  1087. X    #     File:        demo.map
  1088. X    #    Creator:    Joachim Sprave (sprave@gonzo)
  1089. X    # <- this is a comment line: '#' in the 1st column
  1090. X    <red intensity 0>    <green intensity 0>    <blue intensity 0>
  1091. X    <red intensity 1>    <green intensity 1>    <blue intensity 1>
  1092. X    <red intensity 2>    <green intensity 2>    <blue intensity 2>
  1093. X                \&.\&.\&.
  1094. X    <red intensity 255>    <green intensity 255>    <blue intensity 255>
  1095. .ft R
  1096. .fi
  1097. X
  1098. Thus a color map file consist of 256 lines each one containing such a
  1099. color description. Eg. to get a greyscale `color' map, simply
  1100. use the same intensities for all colors (see
  1101. .SM EXAMPLES
  1102. below).
  1103. .TP \w'\(bu'u+2n
  1104. \(bu
  1105. A package header is defined as:
  1106. .LP
  1107. .nf
  1108. .DT
  1109. .ft B
  1110. X    typedef struct {
  1111. X        unsigned short    magic;
  1112. X        unsigned short    type;
  1113. X        short        x;
  1114. X        short        y;
  1115. X        unsigned short    dx;
  1116. X        unsigned short    dy;
  1117. X        unsigned short    sizelo;
  1118. X        unsigned short    sizehi;
  1119. X    } ImgHdr;
  1120. .ft R
  1121. .fi
  1122. X
  1123. With the following semantics:
  1124. .TP
  1125. .I magic
  1126. used to determine byte sex, must
  1127. be initialized to PIX_MAGIC
  1128. .TP
  1129. .I type
  1130. one of:
  1131. .RS
  1132. .TP
  1133. .SM PIX_DATA
  1134. Include the pixel data following 
  1135. the header into the picture 
  1136. (without displaying instantly).
  1137. .TP
  1138. .SM PIX_FLUSH
  1139. Display the internal pixmap.
  1140. .TP
  1141. .SM PIX_DATA | PIX_FLUSH
  1142. Include the pixel data following 
  1143. the header into the picture 
  1144. and display it instantly.
  1145. .TP
  1146. .SM PIX_KILL
  1147. Tells
  1148. .B pixmon
  1149. to exit, when button 1 is pressed.
  1150. .RE
  1151. .TP
  1152. .I x, y
  1153. Position of this package relative to
  1154. the upper-left corner of the window.
  1155. .TP
  1156. .I dx, dy
  1157. Width and height (in dots, not in pixels)
  1158. of this package.
  1159. .TP
  1160. .I sizelo, sizehi            
  1161. Size of the following pixel data. If
  1162. .I sizehi * 0x10000 + sizelo
  1163. .I < dx * dy,
  1164. .B pixmon
  1165. expects run length encoded data.
  1166. X
  1167. .SH ENCODING
  1168. If
  1169. .SM RUN LENGTH ENCODING (RLE)
  1170. is detected (see above), the value
  1171. .BR PIX_RLE (0xFF)
  1172. is treated as an escape value,
  1173. so the number of colors is reduced by one.
  1174. To encode your data, use the function
  1175. .B rle_encode
  1176. from
  1177. .I rle.c.
  1178. X
  1179. .SH EXAMPLES
  1180. .TP \w'\(bu'u+2n
  1181. \(bu
  1182. A
  1183. .I greyscale
  1184. color map looks like:
  1185. .LP
  1186. .nf
  1187. .DT
  1188. .ft R
  1189. X    0    0    0
  1190. X    1    1    1
  1191. X    2    2    2
  1192. X    3    3    3
  1193. X        \&.\&.\&.
  1194. X    255    255    255
  1195. .fi
  1196. .TP \w'\(bu'u+2n
  1197. \(bu
  1198. To use run length encoding of your pixel data, write:
  1199. .LP
  1200. .nf
  1201. .DT
  1202. .ft B
  1203. X    my_encode ()
  1204. X    {
  1205. X        char mybuffer[MBSIZE];
  1206. X        \&.\&.\&.
  1207. X        rle_encode (mybuffer, MBSIZE, PIX_RLE);
  1208. X        \&.\&.\&.
  1209. X    }
  1210. .ft R
  1211. .fi
  1212. X
  1213. .SH FILES
  1214. .LP
  1215. .nf
  1216. .DT
  1217. .ft R
  1218. pixmon/default.cmap        \fIdefault color map\fR
  1219. pixmon/cmaps/*.cmap        \fIexample color maps\fR
  1220. X
  1221. pixmon/examples/README    \fIguiding instructions\fR
  1222. pixmon/examples/mbx        \fIshell script that runs mbs\fR
  1223. pixmon/examples/mbs.c        \fIgenerates a mandelbrot set\fR
  1224. pixmon/examples/showpal.c    \fIgenerates a color palette\fR
  1225. .ft R
  1226. .fi
  1227. X
  1228. .SH ANIMATION
  1229. An animation companion to
  1230. .B pixmon
  1231. called
  1232. .BR playmate (1)
  1233. is also in the making, and will be distributed in near future
  1234. (refer to the
  1235. .SM AVAILABILITY
  1236. section below).
  1237. Its application is rather simple: all there is to do is to
  1238. include a ``tee-log'' in the `pixel generating pipe' eg.:
  1239. .PP
  1240. .RS
  1241. .I example%
  1242. .B mbs ... | tee >pmdata.pix
  1243. .B | pixmon ...
  1244. .RE
  1245. .PP
  1246. to collect
  1247. .B pixmon
  1248. data, that is later turned into animated pixmaps by
  1249. .BR playmate (1).
  1250. (See the
  1251. .B pixmon/examples
  1252. folder for more.)
  1253. X
  1254. .SH BUGS
  1255. The known `bugs' of
  1256. .B pixmon
  1257. are:
  1258. .TP \w'\(bu'u+2n
  1259. \(bu
  1260. `No' interaction
  1261. .TP
  1262. \(bu
  1263. Could be faster
  1264. .TP
  1265. \(bu
  1266. No private color maps
  1267. .TP
  1268. \(bu
  1269. My first
  1270. .I X11
  1271. program, ugly code :-(
  1272. X
  1273. .SH SEE ALSO
  1274. .BR X (1),
  1275. .BR hodge (1),
  1276. .BR imagemagick (1),
  1277. .BR playmate (1)
  1278. X
  1279. .SH AUTHOR
  1280. Copyright 
  1281. .if t \(co 
  1282. .if n (C)
  1283. 1992, 1993 by
  1284. .if n Joachim Sprave
  1285. .if t Joachim Sprave
  1286. .nf
  1287. Systems Analysis Group, University of Dortmund, Germany.
  1288. .nf
  1289. Send bugs, comments, etc., to (sprave@ls11.informatik.uni-dortmund.de).
  1290. .fi
  1291. X
  1292. .SH CREDITS
  1293. .if n Joerg Heitkoetter
  1294. .if t J\*org Heitk\*otter
  1295. (joke@ls11.informatik.uni-dortmund.de) wrote the manual page.
  1296. .fi
  1297. X
  1298. .SH AVAILABILITY
  1299. .LP
  1300. This work is protected by the terms of the
  1301. .SM GNU
  1302. General Public License. Please refer to the
  1303. .SM COPYING
  1304. file accompanying the sources of this software package for a lengthy, boring,
  1305. but absolute complete description.
  1306. X
  1307. .SM PIXMON
  1308. is available via anonymous ftp from the group's server
  1309. .B lumpi.informatik.uni-dortmunde.de
  1310. (129.217.36.140)
  1311. as file `pixmon-0.3.tar.Z' in /pub/CA/src.
  1312. X
  1313. .SH WARRANTY
  1314. .LP
  1315. This program is free software; you can redistribute it and/or modify
  1316. it under the terms of the
  1317. .SM GNU
  1318. General Public License as published by
  1319. the Free Software Foundation; either version 2 of the License, or
  1320. (at your option) any later version.
  1321. X
  1322. This program is distributed in the hope that it will be useful,
  1323. but
  1324. .SM WITHOUT ANY WARRANTY;
  1325. without even the implied warranty of
  1326. .SM MERCHANTABILITY
  1327. or
  1328. .SM FITNESS FOR A PARTICULAR PURPOSE.
  1329. See the
  1330. .SM GNU
  1331. General Public License for more details.
  1332. X
  1333. You should have received a copy of the
  1334. .SM GNU
  1335. General Public License
  1336. along with this program; if not, write to the Free Software
  1337. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1338. SHAR_EOF
  1339. chmod 0640 hodge-c-0.98j/contrib/pixmon.1 ||
  1340. echo 'restore of hodge-c-0.98j/contrib/pixmon.1 failed'
  1341. Wc_c="`wc -c < 'hodge-c-0.98j/contrib/pixmon.1'`"
  1342. test 9181 -eq "$Wc_c" ||
  1343.     echo 'hodge-c-0.98j/contrib/pixmon.1: original size 9181, current size' "$Wc_c"
  1344. rm -f _shar_wnt_.tmp
  1345. fi
  1346. # ============= hodge-c-0.98j/contrib/pixmon.man ==============
  1347. if test -f 'hodge-c-0.98j/contrib/pixmon.man' -a X"$1" != X"-c"; then
  1348.     echo 'x - skipping hodge-c-0.98j/contrib/pixmon.man (File already exists)'
  1349.     rm -f _shar_wnt_.tmp
  1350. else
  1351. > _shar_wnt_.tmp
  1352. echo 'x - extracting hodge-c-0.98j/contrib/pixmon.man (Binary)'
  1353. sed 's/^X//' << 'SHAR_EOF' > _shar_tmp_.tmp &&
  1354. begin 600 hodge-c-0.98j/contrib/pixmon.man
  1355. M"@H*4$E834].*#$I("`@("`@("`@("`@("`@(%5315(@0T]-34%.1%,@("`@
  1356. M("`@("`@("`@("`@("!025A-3TXH,2D*"@H*3D%-10H@("`@('!I>&UO;B`M
  1357. M(&$@<VEM<&QE('!I>&5L(&UO;FET;W(@9F]R(%@Q,0H*"E-93D]04TE3"B`@
  1358. M("`@<&EX;6]N(%L@+5\(6%\(="U?"&]?"'!?"'1?"&E?"&]?"&Y?"',@+BXN
  1359. M(%T@6R`M7PAO7PAP7PAT7PAI7PAO7PAN7PAS("XN+B!="@H@("`@("`@("`@
  1360. M("`@6RUD>"`\7PAP7PAI7PAX7PAE7PAL+5\(9%\(85\(=%\(82U?"'-?"&E?
  1361. M"'I?"&4^70H*("`@("`@("`@("`@(%LM9'D@/%\(<%\(:5\(>%\(95\(;"U?
  1362. M"&1?"&%?"'1?"&$M7PAS7PAI7PAZ7PAE/ET*"B`@("`@("`@("`@("!;+7=I
  1363. M9'1H(#Q?"'=?"&E?"&Y?"&1?"&]?"'<M7PAS7PAI7PAZ7PAE/ET*"B`@("`@
  1364. M("`@("`@("!;+6AE:6=H="`\7PAW7PAI7PAN7PAD7PAO7PAW+5\(<U\(:5\(
  1365. M>E\(93Y="@H@("`@("`@("`@("`@6RUS8V%L92`\7PAF7PAL7PAO7PAA7PAT
  1366. M+5\(=E\(85\(;%\(=5\(93Y="@H@("`@("`@("`@("`@6RUC;6%P(#Q?"&9?
  1367. M"&E?"&Q?"&5?"&Y?"&%?"&U?"&4^6RY?"&-?"&U?"&%?"'!=70H*("`@("`@
  1368. M("`@("`@(%LM9&ET:&5R70H*"D1%4T-225!424]."B`@("`@<&EX;6]N(&EM
  1369. M<&QE;65N=',@82!S:6UP;&4@7PAP7PAI7PAX7PAE7PAL(%\(9%\(85\(=%\(
  1370. M82!?"&U?"&]?"&Y?"&E?"'1?"&]?"'(@9F]R("!U<V4@('=I=&@*("`@("!T
  1371. M:&4@7PA87P@Q7P@Q('=I;F1O=R!S>7-T96TN($ET(&-O;65S('=I=&@@=&AE
  1372. M(&9O;&QO=VEN9R!F96%T=7)E<SH*"B`@("`@;P@K("!!=71O+7)E<V-A;&4@
  1373. M=VAE;B!C:&%N9VEN9R!T:&4@=VEN9&]W('-I>F4*"B`@("`@;P@K("!,;V%D
  1374. M86)L92!C;VQO<FUA<',L('EO=2!C86X@9&ES<&QA>2!T:&4@('-A;64@(&1A
  1375. M=&$@('=I=&@*("`@("`@("!D:69F97)E;G0@8V]L;W)S"@H@("`@(&\(*R`@
  1376. M075T;V1E=&5C="!M;VYO('-E<G9E<G,L('5S:6YG(&1I=&AE<FEN9R`H7PAO
  1377. M7PAR7PAD7PAE7PAR7PAE7PAD(%\(9%\(:5\(=%\(:%\(95\(<BD*("`@("`@
  1378. M("!I;G-T96%D(&]F(&-O;&]R<PH*("`@("!O""L@(%)U;B!L96YG=&@@96YC
  1379. M;V1I;F<@<W5P<&]R="X*"@I/4%1)3TY3"B`@("`@+61X(%\(<%\(:5\(>%\(
  1380. M95\(;"U?"&1?"&%?"'1?"&$M7PAS7PAI7PAZ7PAE"B`@("`@("`@("!3970@
  1381. M=&AE(&AO<FEZ;VYT86P@<VEZ92!O9B!E>'!E8W1E9"!?"'!?"&E?"'A?"&5?
  1382. M"&P@(%\(9%\(85\(=%\(82`@7PAI7PAM7PAA7PAG7PAE+@H@("`@("`@("`@
  1383. M*$1E9F%U;'1S('1O(%\(,5\(,%\(,"XI"@H@("`@("UD>2!?"'!?"&E?"'A?
  1384. M"&5?"&PM7PAD7PAA7PAT7PAA+5\(<U\(:5\(>E\(90H@("`@("`@("`@4V5T
  1385. M('1H92!V97)T:6-A;"!S:7IE(&]F("!E>'!E8W1E9"`@7PAP7PAI7PAX7PAE
  1386. M7PAL("!?"&1?"&%?"'1?"&$@(%\(:5\(;5\(85\(9U\(92X*("`@("`@("`@
  1387. M("A$969A=6QT<R!T;R!?"#%?"#!?"#`N*0H*("`@("`M=VED=&@@7PAW7PAI
  1388. M7PAN7PAD7PAO7PAW+5\(<U\(:5\(>E\(90H@("`@("`@("`@4V5T('1H92!H
  1389. M;W)I>F]N=&%L('-I>F4@(&]F("!?"'!?"&E?"'A?"&U?"&]?"&X@('=I;F1O
  1390. M=R`@:6X@('-C<F5E;@H@("`@("`@("`@8V]O<F1I;F%T97,@*$1E9F%U;'1S
  1391. M('1O(%\(9%\(>"`J(%\(<U\(8U\(85\(;%\(92XI"@H@("`@("UH96EG:'0@
  1392. M7PAW7PAI7PAN7PAD7PAO7PAW+5\(<U\(:5\(>E\(90H@("`@("`@("`@4V5T
  1393. M('1H92`@=F5R=&EC86P@('-I>F4@(&]F("!?"'!?"&E?"'A?"&U?"&]?"&X@
  1394. M('=I;F1O=R`@:6X@('-C<F5E;@H*"@I697)S:6]N(#`N,R`@("`@("`@3&%S
  1395. M="!C:&%N9V4Z(#$V($UA<F-H(#$Y.3,@("`@("`@("`@("`@("`@("`@,0H*
  1396. M"@H*"@I025A-3TXH,2D@("`@("`@("`@("`@("`@55-%4B!#3TU-04Y$4R`@
  1397. M("`@("`@("`@("`@("`@(%!)6$U/3B@Q*0H*"@H@("`@("`@("`@8V]O<F1I
  1398. M;F%T97,@*$1E9F%U;'1S('1O(%\(9%\(>2`J(%\(<U\(8U\(85\(;%\(92XI
  1399. M"@H@("`@("US8V%L92!?"&9?"&Q?"&]?"&%?"'0M7PAV7PAA7PAL7PAU7PAE
  1400. M"B`@("`@("`@("!38V%L92!T:&4@=VEN9&]W)W,@<VEZ92!T;R!?"'=?"&E?
  1401. M"&1?"'1?"&@@/2!?"&1?"'@@*B!?"&9?"&Q?"&]?"&%?"'0M7PAV7PAA7PAL
  1402. M7PAU7PAE(&%N9`H@("`@("`@("`@7PAH7PAE7PAI7PAG7PAH7PAT(#T@7PAD
  1403. M7PAY("H@7PAF7PAL7PAO7PAA7PAT+5\(=E\(85\(;%\(=5\(92`H1&5F875L
  1404. M=',@=&\@7P@R+BD*"B`@("`@+6-M87`@7PAF7PAI7PAL7PAE7PAN7PAA7PAM
  1405. M7PAE6RY?"&-?"&U?"&%?"'!="B`@("`@("`@("!296%D(&EN(%\(9E\(:5\(
  1406. M;%\(95\(;E\(85\(;5\(95LN7PAC7PAM7PAA7PAP72!O;B!P<F]G<F%M('-T
  1407. M87)T+"!A;F0@('5S92`@=&AE"B`@("`@("`@("!C;VQO<G,@=VAE;B!G96YE
  1408. M<F%T:6YG('1H92!P:7AM87!S+B!4:&4@=7-E(&]F('1H92!S=68M"B`@("`@
  1409. M("`@("!F:7@@8"YC;6%P)R!I<R!E;F-O=7)A9V5D+"!B=70@;F]T(&5N9F]R
  1410. M8V5D+@H*("`@("`M9&ET:&5R"B`@("`@("`@("!5<V4@86X@7PAO7PAR7PAD
  1411. M7PAE7PAR7PAE7PAD(%\(9%\(:5\(=%\(:%\(95\(<B!F;W(@<'-E=61O("!C
  1412. M;VQO<B`@<F5P<F5S96YT871I;VX*("`@("`@("`@(&]N("!L;W<@(&)I='!L
  1413. M86YE("!D979I8V5S+"`@96<N("!?"&U?"&]?"&Y?"&]?"&-?"&A?"')?"&]?
  1414. M"&U?"&4@6"!S97)V97)S+@H@("`@("`@("`@=VAE;B!U<V5D(&]N(&$@8V]L
  1415. M;W(@9&5V:6-E+"!A('1W;R!C;VQO<B!D:71H97)I;F<@9V5N+0H@("`@("`@
  1416. M("`@97)A=&5S('-O;64@:6YT97)E<W1I;F<@969F96-T<RX*"B`@("`@5&AE
  1417. M(&9O;&QO=VEN9R!S=&%N9&%R9"!8(%1O;VQK:70@8V]M;6%N9"!L:6YE(&%R
  1418. M9W5M96YT<R`@87)E"B`@("`@8V]M;6]N;'D@=7-E9"!W:71H('!I>&UO;CH*
  1419. M"B`@("`@+6)G(%\(8U\(;U\(;%\(;U\(<@H@("`@("`@("`@5&AI<R!O<'1I
  1420. M;VX@<W!E8VEF:65S('1H92!C;VQO<B!T;R!U<V4@(&9O<B`@=&AE("!B86-K
  1421. M+0H@("`@("`@("`@9W)O=6YD(&]F('1H92!W:6YD;W<N(%1H92!D969A=6QT
  1422. M(&ES(&!@=VAI=&4N)R<*"B`@("`@+6)D(%\(8U\(;U\(;%\(;U\(<@H@("`@
  1423. M("`@("`@5&AI<R!O<'1I;VX@<W!E8VEF:65S('1H92!C;VQO<B!T;R!U<V4@
  1424. M9F]R("!T:&4@(&)O<F1E<@H@("`@("`@("`@;V8@=&AE('=I;F1O=RX@(%1H
  1425. M92!D969A=6QT(&ES(&!@8FQA8VLN)R<*"B`@("`@+6)W(%\(;E\(=5\(;5\(
  1426. M8E\(95\(<@H@("`@("`@("`@5&AI<R!O<'1I;VX@<W!E8VEF:65S('1H92!W
  1427. M:61T:"!I;B!P:7AE;',@;V8@=&AE(&)O<F1E<@H@("`@("`@("`@<W5R<F]U
  1428. M;F1I;F<@=&AE('=I;F1O=RX*"B`@("`@+69G(%\(8U\(;U\(;%\(;U\(<@H@
  1429. M("`@("`@("`@5&AI<R!O<'1I;VX@<W!E8VEF:65S('1H92!C;VQO<B!T;R!U
  1430. M<V4@(&9O<B`@9&ES<&QA>6EN9PH@("`@("`@("`@<&EX96QS+B`@5&AE(&1E
  1431. M9F%U;'0@:7,@8&!B;&%C:RXG)PH*("`@("`M;F%M92!?"&Y?"&%?"&U?"&4*
  1432. M("`@("`@("`@(%1H:7,@;W!T:6]N('-P96-I9FEE<R!T:&4@87!P;&EC871I
  1433. M;VX@;F%M92!U;F1E<B`@=VAI8V@*("`@("`@("`@(')E<V]U<F-E<R`@87)E
  1434. M("!T;R!B92!O8G1A:6YE9"P@<F%T:&5R('1H86X@=&AE(&1E9F%U;'0*("`@
  1435. M("`@("`@(&5X96-U=&%B;&4@9FEL92!N86UE+B`@7PA.7PAA7PAM7PAE('-H
  1436. M;W5L9"!N;W0@8V]N=&%I;B!@8"XG)R!O<@H@("`@("`@("`@8&`J)R<@8VAA
  1437. M<F%C=&5R<RX@*$1E9F%U;'1S('1O(&!@4&EX36]N+B<G*0H*("`@("`M=&ET
  1438. M;&4@7PAS7PAT7PAR7PAI7PAN7PAG"B`@("`@("`@("!4:&ES(&]P=&EO;B!S
  1439. M<&5C:69I97,@=&AE('=I;F1O=R`@=&ET;&4@('-T<FEN9RP@('=H:6-H"B`@
  1440. M("`@("`@("!M87D@(&)E("!D:7-P;&%Y960@(&)Y("!W:6YD;W<@(&UA;F%G
  1441. M97)S(&EF('1H92!U<V5R('-O"B`@("`@("`@("!C:&]O<V5S+B`@5&AE(&1E
  1442. M9F%U;'0@=&ET;&4@:7,@8'!I>&UO;B<N"@H@("`@("UR=B`@5&AI<R!O<'1I
  1443. M;VX@:6YD:6-A=&5S("!T:&%T("!R979E<G-E("!V:61E;R`@<VAO=6QD("!B
  1444. M90H@("`@("`@("`@<VEM=6QA=&5D("!B>2`@<W=A<'!I;F<@('1H92`@9F]R
  1445. M96=R;W5N9"!A;F0@8F%C:V=R;W5N9`H@("`@("`@("`@8V]L;W)S+@H*("`@
  1446. M("`M9V5O;65T<GD@7PAG7PAE7PAO7PAM7PAE7PAT7PAR7PAY"@H*"E9E<G-I
  1447. M;VX@,"XS("`@("`@("!,87-T(&-H86YG93H@,38@36%R8V@@,3DY,R`@("`@
  1448. M("`@("`@("`@("`@("`R"@H*"@H*"E!)6$U/3B@Q*2`@("`@("`@("`@("`@
  1449. M("!54T52($-/34U!3D13("`@("`@("`@("`@("`@("`@4$E834].*#$I"@H*
  1450. M"B`@("`@("`@("!4:&ES(&]P=&EO;B!S<&5C:69I97,@=&AE('!R969E<G)E
  1451. M9"!S:7IE("!A;F0@('!O<VET:6]N"B`@("`@("`@("!O9B!T:&4@<&EX;6]N
  1452. M('=I;F1O=SL@<V5E(%\(6"A?"#$I+@H*("`@("`M9&ES<&QA>2!?"&1?"&E?
  1453. M"'-?"'!?"&Q?"&%?"'D*("`@("`@("`@(%1H:7,@;W!T:6]N('-P96-I9FEE
  1454. M<R!T:&4@(%@@('-E<G9E<B`@=&\@(&-O;G1A8W0[("!S964*("`@("`@("`@
  1455. M(%\(6"A?"#$I+@H*("`@("`M>')M(%\(<E\(95\(<U\(;U\(=5\(<E\(8U\(
  1456. M95\(<U\(=%\(<E\(:5\(;E\(9PH@("`@("`@("`@5&AI<R!O<'1I;VX@<W!E
  1457. M8VEF:65S(&$@<F5S;W5R8V4@('-T<FEN9R`@=&\@(&)E("!U<V5D+@H@("`@
  1458. M("`@("`@5&AI<R!I<R!E<W!E8VEA;&QY('5S969U;"!F;W(@<V5T=&EN9R!R
  1459. M97-O=7)C97,@=&AA="!D;PH@("`@("`@("`@;F]T(&AA=F4@<V5P87)A=&4@
  1460. M8V]M;6%N9"!L:6YE(&]P=&EO;G,N"@H@("`@("UI8V]N:6,*("`@("`@("`@
  1461. M(%1H:7,@;W!T:6]N(&EN9&EC871E<R!T:&%T('!I>&UO;B!S:&]U;&0@87-K
  1462. M('1H92!W:6YD;W<*("`@("`@("`@(&UA;F%G97(@('1O('-T87)T(&ET(&%S
  1463. M(&%N(&EC;VX@<F%T:&5R('1H86X@87,@=&AE(&YO<BT*("`@("`@("`@(&UA
  1464. M;"!W:6YD;W<N"@H*3U!424].(%-534U!4ED*("`@("!4;R!G:79E(&YO(&]P
  1465. M=&EO;B!A="!A;&P@:7,@=&AE('-A;64@87,@=&\@9VEV92!T:&4@(&9O;&QO
  1466. M=RT*("`@("!I;F<@;W!T:6]N<SH*"B`@("`@+61X(#$P,"`M9'D@,3`P("US
  1467. M8V%L92`R("UC;6%P(&1E9F%U;'0N8VUA<`H*"D9/4DU!5%,*("`@("!O""L@
  1468. M(%\(0U\(;U\(;%\(;U\(<B!?"&U?"&%?"'`@7PAF7PAI7PAL7PAE*%\(<RDL
  1469. M(%\(<E\(95\(8U\(;U\(9U\(;E\(:5\(<U\(95\(9"!?"&)?"'D@<&EX;6]N
  1470. M(&AA=F4@=&AE("!F;VQL;W<M"B`@("`@("`@:6YG($%30TE)(&QA>6]U=#H*
  1471. M"B`@("`@("`@("`C("`@($9I;&4Z("`@("`@("`@(&1E;6\N;6%P"B`@("`@
  1472. M("`@("`C("`@($-R96%T;W(Z("!*;V%C:&EM(%-P<F%V92`H<W!R879E0&=O
  1473. M;GIO*0H@("`@("`@("`@(R`\+2!T:&ES(&ES(&$@8V]M;65N="!L:6YE.B`G
  1474. M(R<@:6X@=&AE(#%S="!C;VQU;6X*("`@("`@("`@(#QR960@:6YT96YS:71Y
  1475. M(#`^("`@/&=R965N(&EN=&5N<VET>2`P/B`\8FQU92!I;G1E;G-I='D@,#X*
  1476. M("`@("`@("`@(#QR960@:6YT96YS:71Y(#$^("`@/&=R965N(&EN=&5N<VET
  1477. M>2`Q/B`\8FQU92!I;G1E;G-I='D@,3X*("`@("`@("`@(#QR960@:6YT96YS
  1478. M:71Y(#(^("`@/&=R965N(&EN=&5N<VET>2`R/B`\8FQU92!I;G1E;G-I='D@
  1479. M,CX*("`@("`@("`@("`@("`@("`@("`@("`@("XN+@H@("`@("`@("`@/')E
  1480. M9"!I;G1E;G-I='D@,C4U/B`\9W)E96X@:6YT96YS:71Y(#(U-3X@("`@/&)L
  1481. M=64@:6YT96YS:71Y(#(U-3X*"B`@("`@5&AU<R!A(&-O;&]R(&UA<"!F:6QE
  1482. M(&-O;G-I<W0@;V8@,C4V(&QI;F5S(&5A8V@@;VYE(&-O;G1A:6XM"B`@("`@
  1483. M:6YG('-U8V@@82!C;VQO<B!D97-C<FEP=&EO;BX@16<N('1O(&=E="!A(&=R
  1484. M97ES8V%L92!@8V]L;W(G"B`@("`@;6%P+"!S:6UP;'D@=7-E('1H92!S86UE
  1485. M(&EN=&5N<VET:65S("!F;W(@(&%L;"`@8V]L;W)S("`H<V5E"B`@("`@15A!
  1486. M35!,15,@8F5L;W<I+@H*("`@("!O""L@($$@<&%C:V%G92!H96%D97(@:7,@
  1487. M9&5F:6YE9"!A<SH*"B`@("`@("`@("!T>7!E9&5F('-T<G5C="!["B`@("`@
  1488. M("`@("`@("`@('5N<VEG;F5D('-H;W)T(&UA9VEC.PH@("`@("`@("`@("`@
  1489. M("!U;G-I9VYE9"!S:&]R="!T>7!E.PH@("`@("`@("`@("`@("!S:&]R="`@
  1490. M("`@("`@("!X.PH@("`@("`@("`@("`@("!S:&]R="`@("`@("`@("!Y.PH@
  1491. M("`@("`@("`@("`@("!U;G-I9VYE9"!S:&]R="!D>#L*("`@("`@("`@("`@
  1492. M("`@=6YS:6=N960@<VAO<G0@9'D["@H*"E9E<G-I;VX@,"XS("`@("`@("!,
  1493. M87-T(&-H86YG93H@,38@36%R8V@@,3DY,R`@("`@("`@("`@("`@("`@("`S
  1494. M"@H*"@H*"E!)6$U/3B@Q*2`@("`@("`@("`@("`@("!54T52($-/34U!3D13
  1495. M("`@("`@("`@("`@("`@("`@4$E834].*#$I"@H*"B`@("`@("`@("`@("`@
  1496. M('5N<VEG;F5D('-H;W)T('-I>F5L;SL*("`@("`@("`@("`@("`@=6YS:6=N
  1497. M960@<VAO<G0@<VEZ96AI.PH@("`@("`@("`@?2!);6=(9'(["@H@("`@(%=I
  1498. M=&@@=&AE(&9O;&QO=VEN9R!S96UA;G1I8W,Z"@H@("`@(%\(;5\(85\(9U\(
  1499. M:5\(8PH@("`@("`@("`@=7-E9"!T;R!D971E<FUI;F4@8GET92`@<V5X+"`@
  1500. M;75S="`@8F4@(&EN:71I86QI>F5D("!T;PH@("`@("`@("`@4$E87TU!1TE#
  1501. M"@H@("`@(%\(=%\(>5\(<%\(92!O;F4@;V8Z"@H@("`@("`@("`@4$E87T1!
  1502. M5$$*("`@("`@("`@("`@("`@26YC;'5D92!T:&4@<&EX96P@9&%T82!F;VQL
  1503. M;W=I;F<@=&AE("!H96%D97(@(&EN=&\*("`@("`@("`@("`@("`@=&AE('!I
  1504. M8W1U<F4@*'=I=&AO=70@9&ES<&QA>6EN9R!I;G-T86YT;'DI+@H*("`@("`@
  1505. M("`@(%!)6%]&3%532`H@("`@("`@("`@("`@("!$:7-P;&%Y('1H92!I;G1E
  1506. M<FYA;"!P:7AM87`N"@H@("`@("`@("`@4$E87T1!5$$@?"!025A?1DQ54T@*
  1507. M("`@("`@("`@("`@("`@26YC;'5D92!T:&4@<&EX96P@9&%T82!F;VQL;W=I
  1508. M;F<@=&AE("!H96%D97(@(&EN=&\*("`@("`@("`@("`@("`@=&AE('!I8W1U
  1509. M<F4@86YD(&1I<W!L87D@:70@:6YS=&%N=&QY+@H*("`@("`@("`@(%!)6%]+
  1510. M24Q,"B`@("`@("`@("`@("`@(%1E;&QS('!I>&UO;B!T;R!E>&ET+"!W:&5N
  1511. M(&)U='1O;B`Q(&ES('!R97-S960N"@H@("`@(%\(>"P@7PAY(%!O<VET:6]N
  1512. M(&]F('1H:7,@<&%C:V%G92`@<F5L871I=F4@('1O("!T:&4@('5P<&5R+6QE
  1513. M9G0*("`@("`@("`@(&-O<FYE<B!O9B!T:&4@=VEN9&]W+@H*("`@("!?"&1?
  1514. M"'@L(%\(9%\(>0H@("`@("`@("`@5VED=&@@86YD(&AE:6=H="`H:6X@9&]T
  1515. M<RP@;F]T(&EN('!I>&5L<RD@;V8@=&AI<R!P86-K+0H@("`@("`@("`@86=E
  1516. M+@H*("`@("!?"'-?"&E?"'I?"&5?"&Q?"&\L(%\(<U\(:5\(>E\(95\(:%\(
  1517. M:0H@("`@("`@("`@4VEZ92!O9B!T:&4@9F]L;&]W:6YG('!I>&5L(&1A=&$N
  1518. M($EF(%\(<U\(:5\(>E\(95\(:%\(:2`J(%\(,%\(>%\(,5\(,%\(,%\(,%\(
  1519. M,"`K"B`@("`@("`@("!?"'-?"&E?"'I?"&5?"&Q?"&\@(#P@(%\(9%\(>"`@
  1520. M*B`@7PAD7PAY+"!P:7AM;VX@97AP96-T<R!R=6X@;&5N9W1H(&5N8V]D960*
  1521. M("`@("`@("`@(&1A=&$N"@H*14Y#3T1)3D<*("`@("!)9B!254X@3$5.1U1(
  1522. M($5.0T]$24Y'("A23$4I(&ES(&1E=&5C=&5D("`H<V5E("!A8F]V92DL("!T
  1523. M:&4*("`@("!V86QU92`@4$E87U),12@P>$9&*2`@:7,@('1R96%T960@87,@
  1524. M86X@97-C87!E('9A;'5E+"!S;R!T:&4*("`@("!N=6UB97(@;V8@8V]L;W)S
  1525. M(&ES(')E9'5C960@8GD@;VYE+B`@5&\@(&5N8V]D92`@>6]U<B`@9&%T82P*
  1526. M("`@("!U<V4@=&AE(&9U;F-T:6]N(')L95]E;F-O9&4@9G)O;2!?"')?"&Q?
  1527. M"&4N7PAC+@H*"D5804U03$53"B`@("`@;P@K("!!(%\(9U\(<E\(95\(>5\(
  1528. M<U\(8U\(85\(;%\(92!C;VQO<B!M87`@;&]O:W,@;&EK93H*"B`@("`@("`@
  1529. M("`P("`@(#`@("`@,`H@("`@("`@("`@,2`@("`Q("`@(#$*("`@("`@("`@
  1530. M(#(@("`@,B`@("`R"@H*"E9E<G-I;VX@,"XS("`@("`@("!,87-T(&-H86YG
  1531. M93H@,38@36%R8V@@,3DY,R`@("`@("`@("`@("`@("`@("`T"@H*"@H*"E!)
  1532. M6$U/3B@Q*2`@("`@("`@("`@("`@("!54T52($-/34U!3D13("`@("`@("`@
  1533. M("`@("`@("`@4$E834].*#$I"@H*"B`@("`@("`@("`S("`@(#,@("`@,PH@
  1534. M("`@("`@("`@("`@("`N+BX*("`@("`@("`@(#(U-2`@,C4U("`R-34*"B`@
  1535. M("`@;P@K("!4;R!U<V4@<G5N(&QE;F=T:"!E;F-O9&EN9R!O9B!Y;W5R('!I
  1536. M>&5L(&1A=&$L('=R:71E.@H*("`@("`@("`@(&UY7V5N8V]D92`H*0H@("`@
  1537. M("`@("`@>PH@("`@("`@("`@("`@("!C:&%R(&UY8G5F9F5R6TU"4TE:15T[
  1538. M"B`@("`@("`@("`@("`@("XN+@H@("`@("`@("`@("`@("!R;&5?96YC;V1E
  1539. M("AM>6)U9F9E<BP@34)325I%+"!025A?4DQ%*3L*("`@("`@("`@("`@("`@
  1540. M+BXN"B`@("`@("`@("!]"@H*1DE,15,*("`@("!P:7AM;VXO9&5F875L="YC
  1541. M;6%P("`@("`@7PAD7PAE7PAF7PAA7PAU7PAL7PAT(%\(8U\(;U\(;%\(;U\(
  1542. M<B!?"&U?"&%?"'`*("`@("!P:7AM;VXO8VUA<',O*BYC;6%P("`@("`@7PAE
  1543. M7PAX7PAA7PAM7PAP7PAL7PAE(%\(8U\(;U\(;%\(;U\(<B!?"&U?"&%?"'!?
  1544. M"',*"B`@("`@<&EX;6]N+V5X86UP;&5S+U)%041-12`@(%\(9U\(=5\(:5\(
  1545. M9%\(:5\(;E\(9R!?"&E?"&Y?"'-?"'1?"')?"'5?"&-?"'1?"&E?"&]?"&Y?
  1546. M"',*("`@("!P:7AM;VXO97AA;7!L97,O;6)X("`@("`@7PAS7PAH7PAE7PAL
  1547. M7PAL(%\(<U\(8U\(<E\(:5\(<%\(="!?"'1?"&A?"&%?"'0@7PAR7PAU7PAN
  1548. M7PAS(%\(;5\(8E\(<PH@("`@('!I>&UO;B]E>&%M<&QE<R]M8G,N8R`@("`@
  1549. M("`@(%\(9U\(95\(;E\(95\(<E\(85\(=%\(95\(<R!?"&$@7PAM7PAA7PAN
  1550. M7PAD7PAE7PAL7PAB7PAR7PAO7PAT(%\(<U\(95\(=`H@("`@('!I>&UO;B]E
  1551. M>&%M<&QE<R]S:&]W<&%L+F,@("`@(%\(9U\(95\(;E\(95\(<E\(85\(=%\(
  1552. M95\(<R!?"&$@7PAC7PAO7PAL7PAO7PAR(%\(<%\(85\(;%\(95\(=%\(=%\(
  1553. M90H*"D%.24U!5$E/3@H@("`@($%N(&%N:6UA=&EO;B!C;VUP86YI;VX@=&\@
  1554. M<&EX;6]N(&-A;&QE9"!P;&%Y;6%T92@Q*2!I<R`@86QS;PH@("`@(&EN('1H
  1555. M92!M86MI;F<L(&%N9"!W:6QL(&)E(&1I<W1R:6)U=&5D(&EN(&YE87(@9G5T
  1556. M=7)E("AR969E<@H@("`@('1O('1H92!!5D%)3$%"24Q)5%D@('-E8W1I;VX@
  1557. M(&)E;&]W*2X@("!)=',@(&%P<&QI8V%T:6]N("!I<PH@("`@(')A=&AE<B`@
  1558. M<VEM<&QE.B`@86QL("!T:&5R92`@:7,@=&\@9&\@:7,@=&\@:6YC;'5D92!A
  1559. M(&!@=&5E+0H@("`@(&QO9R<G(&EN('1H92!@<&EX96P@9V5N97)A=&EN9R!P
  1560. M:7!E)R!E9RXZ"@H@("`@("`@("`@7PAE7PAX7PAA7PAM7PAP7PAL7PAE)2!M
  1561. M8G,@+BXN('P@=&5E(#YP;61A=&$N<&EX('P@<&EX;6]N("XN+@H*("`@("!T
  1562. M;R!C;VQL96-T('!I>&UO;B!D871A+"!T:&%T(&ES(&QA=&5R('1U<FYE9"`@
  1563. M:6YT;R`@86YI;6%T960*("`@("!P:7AM87!S(&)Y('!L87EM871E*#$I+B`@
  1564. M*%-E92!T:&4@<&EX;6]N+V5X86UP;&5S(&9O;&1E<B!F;W(*("`@("!M;W)E
  1565. M+BD*"@I"54=3"B`@("`@5&AE(&MN;W=N(&!B=6=S)R!O9B!P:7AM;VX@87)E
  1566. M.@H*("`@("!O""L@(&!.;R<@:6YT97)A8W1I;VX*"B`@("`@;P@K("!#;W5L
  1567. M9"!B92!F87-T97(*"B`@("`@;P@K("!.;R!P<FEV871E(&-O;&]R(&UA<',*
  1568. M"B`@("`@;P@K("!->2!F:7)S="!?"%A?"#%?"#$@<')O9W)A;2P@=6=L>2!C
  1569. M;V1E(#HM*`H*"@H*"@I697)S:6]N(#`N,R`@("`@("`@3&%S="!C:&%N9V4Z
  1570. M(#$V($UA<F-H(#$Y.3,@("`@("`@("`@("`@("`@("`@-0H*"@H*"@I025A-
  1571. M3TXH,2D@("`@("`@("`@("`@("`@55-%4B!#3TU-04Y$4R`@("`@("`@("`@
  1572. M("`@("`@(%!)6$U/3B@Q*0H*"@I3144@04Q33PH@("`@(%@H,2DL(&AO9&=E
  1573. M*#$I+"!I;6%G96UA9VEC:R@Q*2P@<&QA>6UA=&4H,2D*"@I!551(3U(*("`@
  1574. M("!#;W!Y<FEG:'0@*$,I(#$Y.3(L(#$Y.3,@8GD@2F]A8VAI;2!3<')A=F4*
  1575. M("`@("!3>7-T96US($%N86QY<VES($=R;W5P+"!5;FEV97)S:71Y(&]F($1O
  1576. M<G1M=6YD+"!'97)M86YY+@H@("`@(%-E;F0@8G5G<RP@8V]M;65N=',L(&5T
  1577. M8RXL('1O("AS<')A=F5`;',Q,2YI;F9O<FUA=&EK+G5N:2UD;W)T;75N9"YD
  1578. M92DN"@H*0U)%1$E44PH@("`@($IO97)G("`@2&5I=&MO971T97(@("`H:F]K
  1579. M94!L<S$Q+FEN9F]R;6%T:6LN=6YI+61O<G1M=6YD+F1E*0H@("`@('=R;W1E
  1580. M('1H92!M86YU86P@<&%G92X*"@I!5D%)3$%"24Q)5%D*("`@("!4:&ES('=O
  1581. M<FL@:7,@<')O=&5C=&5D(&)Y('1H92!T97)M<R!O9B!T:&4@1TY5($=E;F5R
  1582. M86P@(%!U8BT*("`@("!L:6,@($QI8V5N<V4N("!0;&5A<V4@<F5F97(@=&\@
  1583. M=&AE($-/4%E)3D<@9FEL92!A8V-O;7!A;GEI;F<*("`@("!T:&4@<V]U<F-E
  1584. M<R!O9B!T:&ES('-O9G1W87)E('!A8VMA9V4@9F]R(&$@;&5N9W1H>2P@(&)O
  1585. M<FEN9RP*("`@("!B=70@86)S;VQU=&4@8V]M<&QE=&4@9&5S8W)I<'1I;VXN
  1586. M"@H@("`@(%!)6$U/3B!I<R!A=F%I;&%B;&4@('9I82`@86YO;GEM;W5S("!F
  1587. M='`@(&9R;VT@('1H92`@9W)O=7`G<PH@("`@('-E<G9E<B!L=6UP:2YI;F9O
  1588. M<FUA=&EK+G5N:2UD;W)T;75N9&4N9&4@*#$R.2XR,3<N,S8N,30P*2!A<PH@
  1589. M("`@(&9I;&4@8'!I>&UO;BTP+C,N=&%R+EHG(&EN("]P=6(O0T$O<W)C+@H*
  1590. M"E=!4E)!3E19"B`@("`@5&AI<R!P<F]G<F%M(&ES("!F<F5E("!S;V9T=V%R
  1591. M93L@('EO=2`@8V%N("!R961I<W1R:6)U=&4@(&ET"B`@("`@86YD+V]R("!M
  1592. M;V1I9GD@(&ET('5N9&5R('1H92!T97)M<R!O9B!T:&4@1TY5($=E;F5R86P@
  1593. M4'5B;&EC"B`@("`@3&EC96YS92!A<R!P=6)L:7-H960@8GD@=&AE($9R964@
  1594. M4V]F='=A<F4@1F]U;F1A=&EO;CL@96ET:&5R"B`@("`@=F5R<VEO;B`R(&]F
  1595. M('1H92!,:6-E;G-E+"!O<B`H870@>6]U<B!O<'1I;VXI(&%N>2!L871E<B!V
  1596. M97(M"B`@("`@<VEO;BX*"B`@("`@5&AI<R!P<F]G<F%M(&ES(&1I<W1R:6)U
  1597. M=&5D(&EN('1H92!H;W!E('1H870@:70@=VEL;"!B92!U<V4M"B`@("`@9G5L
  1598. M+"!B=70@5TE42$]55"!!3ED@5T%24D%.5%D[('=I=&AO=70@979E;B!T:&4@
  1599. M:6UP;&EE9"!W87(M"B`@("`@<F%N='D@;V8@34520TA!3E1!0DE,2519(&]R
  1600. M($9)5$Y%4U,@1D]2("!!("!005)424-53$%2("!055(M"B`@("`@4$]312X@
  1601. M4V5E('1H92!'3E4@1V5N97)A;"!0=6)L:6,@3&EC96YS92!F;W(@;6]R92!D
  1602. M971A:6QS+@H*("`@("!9;W4@<VAO=6QD(&AA=F4@<F5C96EV960@82!C;W!Y
  1603. M(&]F('1H92`@1TY5("!'96YE<F%L("!0=6)L:6,*("`@("!,:6-E;G-E("!A
  1604. M;&]N9R`@=VET:"!T:&ES('!R;V=R86T[(&EF(&YO="P@=W)I=&4@=&\@=&AE
  1605. M($9R964*("`@("!3;V9T=V%R92!&;W5N9&%T:6]N+"`@26YC+BP@(#8W-2`@
  1606. M36%S<R`@079E+"`@0V%M8G)I9&=E+"`@34$*("`@("`P,C$S.2P@55-!+@H*
  1607. M"@H*"@H*"@H*"@H*5F5R<VEO;B`P+C,@("`@("`@($QA<W0@8VAA;F=E.B`Q
  1608. D-B!-87)C:"`Q.3DS("`@("`@("`@("`@("`@("`@(#8*"@H*
  1609. `
  1610. end
  1611. SHAR_EOF
  1612. echo 'uudecoding file hodge-c-0.98j/contrib/pixmon.man' &&
  1613. uudecode < _shar_tmp_.tmp && rm -f _shar_tmp_.tmp &&
  1614. chmod 0640 hodge-c-0.98j/contrib/pixmon.man ||
  1615. echo 'restore of hodge-c-0.98j/contrib/pixmon.man failed'
  1616. Wc_c="`wc -c < 'hodge-c-0.98j/contrib/pixmon.man'`"
  1617. test 11421 -eq "$Wc_c" ||
  1618.     echo 'hodge-c-0.98j/contrib/pixmon.man: original size 11421, current size' "$Wc_c"
  1619. rm -f _shar_wnt_.tmp
  1620. fi
  1621. # ============= hodge-c-0.98j/getopt.c ==============
  1622. if test -f 'hodge-c-0.98j/getopt.c' -a X"$1" != X"-c"; then
  1623.     echo 'x - skipping hodge-c-0.98j/getopt.c (File already exists)'
  1624.     rm -f _shar_wnt_.tmp
  1625. else
  1626. > _shar_wnt_.tmp
  1627. echo 'x - extracting hodge-c-0.98j/getopt.c (Text)'
  1628. sed 's/^X//' << 'SHAR_EOF' > 'hodge-c-0.98j/getopt.c' &&
  1629. X
  1630. /* Getopt for GNU.
  1631. X   NOTE: getopt is now part of the C library, so if you don't know what
  1632. X   "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
  1633. X   before changing it!
  1634. X
  1635. X   Copyright (C) 1987, 88, 89, 90, 91, 1992 Free Software Foundation, Inc.
  1636. X
  1637. X   This program is free software; you can redistribute it and/or modify
  1638. X   it under the terms of the GNU General Public License as published by
  1639. X   the Free Software Foundation; either version 2, or (at your option)
  1640. X   any later version.
  1641. X
  1642. X   This program is distributed in the hope that it will be useful,
  1643. X   but WITHOUT ANY WARRANTY; without even the implied warranty of
  1644. X   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1645. X   GNU General Public License for more details.
  1646. X
  1647. X   You should have received a copy of the GNU General Public License
  1648. X   along with this program; if not, write to the Free Software
  1649. X   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  1650. X
  1651. /* AIX requires this to be the first thing in the file. */
  1652. X
  1653. #ifdef __GNUC__
  1654. #define alloca __builtin_alloca
  1655. #else /* not __GNUC__ */
  1656. X
  1657. #if defined(sparc) && !defined(USG) && !defined(SVR4) && !defined(__svr4__)
  1658. #include <alloca.h>
  1659. #else
  1660. X
  1661. #ifdef _AIX
  1662. #pragma alloca
  1663. #else
  1664. char *alloca ();
  1665. #endif
  1666. X
  1667. #endif /* sparc */
  1668. X
  1669. #endif /* not __GNUC__ */
  1670. X
  1671. #ifdef    LIBC
  1672. /* For when compiled as part of the GNU C library.  */
  1673. #include <ansidecl.h>
  1674. #endif
  1675. X
  1676. #include <stdio.h>
  1677. X
  1678. /* This needs to come after some library #include
  1679. X   to get __GNU_LIBRARY__ defined.  */
  1680. X
  1681. #ifdef    __GNU_LIBRARY__
  1682. #undef    alloca
  1683. #include <stdlib.h>
  1684. #include <string.h>
  1685. #else /* Not GNU C library.  */
  1686. #define    __alloca    alloca
  1687. #endif /* GNU C library.  */
  1688. X
  1689. X
  1690. #ifndef __STDC__
  1691. #define const
  1692. #endif
  1693. X
  1694. /* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a
  1695. X   long-named option.  Because this is not POSIX.2 compliant, it is
  1696. X   being phased out. */
  1697. /*
  1698. #define GETOPT_COMPAT
  1699. */
  1700. X
  1701. /* This version of `getopt' appears to the caller like standard Unix `getopt'
  1702. X   but it behaves differently for the user, since it allows the user
  1703. X   to intersperse the options with the other arguments.
  1704. X
  1705. X   As `getopt' works, it permutes the elements of ARGV so that,
  1706. X   when it is done, all the options precede everything else.  Thus
  1707. X   all application programs are extended to handle flexible argument order.
  1708. X
  1709. X   Setting the environment variable POSIXLY_CORRECT disables permutation.
  1710. X   Then the behavior is completely standard.
  1711. X
  1712. X   GNU application programs can use a third alternative mode in which
  1713. X   they can distinguish the relative order of options and other arguments.  */
  1714. X
  1715. #include "getopt.h"
  1716. X
  1717. /* For communication from `getopt' to the caller.
  1718. X   When `getopt' finds an option that takes an argument,
  1719. X   the argument value is returned here.
  1720. X   Also, when `ordering' is RETURN_IN_ORDER,
  1721. X   each non-option ARGV-element is returned here.  */
  1722. X
  1723. char *optarg = 0;
  1724. X
  1725. /* Index in ARGV of the next element to be scanned.
  1726. X   This is used for communication to and from the caller
  1727. X   and for communication between successive calls to `getopt'.
  1728. X
  1729. X   On entry to `getopt', zero means this is the first call; initialize.
  1730. X
  1731. X   When `getopt' returns EOF, this is the index of the first of the
  1732. X   non-option elements that the caller should itself scan.
  1733. X
  1734. X   Otherwise, `optind' communicates from one call to the next
  1735. X   how much of ARGV has been scanned so far.  */
  1736. X
  1737. int optind = 0;
  1738. X
  1739. /* The next char to be scanned in the option-element
  1740. X   in which the last option character we returned was found.
  1741. X   This allows us to pick up the scan where we left off.
  1742. X
  1743. X   If this is zero, or a null string, it means resume the scan
  1744. X   by advancing to the next ARGV-element.  */
  1745. X
  1746. static char *nextchar;
  1747. X
  1748. /* Callers store zero here to inhibit the error message
  1749. X   for unrecognized options.  */
  1750. X
  1751. int opterr = 1;
  1752. X
  1753. /* Describe how to deal with options that follow non-option ARGV-elements.
  1754. X
  1755. X   If the caller did not specify anything,
  1756. X   the default is REQUIRE_ORDER if the environment variable
  1757. X   POSIXLY_CORRECT is defined, PERMUTE otherwise.
  1758. X
  1759. X   REQUIRE_ORDER means don't recognize them as options;
  1760. X   stop option processing when the first non-option is seen.
  1761. X   This is what Unix does.
  1762. X   This mode of operation is selected by either setting the environment
  1763. X   variable POSIXLY_CORRECT, or using `+' as the first character
  1764. X   of the list of option characters.
  1765. X
  1766. X   PERMUTE is the default.  We permute the contents of ARGV as we scan,
  1767. X   so that eventually all the non-options are at the end.  This allows options
  1768. X   to be given in any order, even with programs that were not written to
  1769. X   expect this.
  1770. X
  1771. X   RETURN_IN_ORDER is an option available to programs that were written
  1772. X   to expect options and other ARGV-elements in any order and that care about
  1773. X   the ordering of the two.  We describe each non-option ARGV-element
  1774. X   as if it were the argument of an option with character code 1.
  1775. X   Using `-' as the first character of the list of option characters
  1776. X   selects this mode of operation.
  1777. X
  1778. X   The special argument `--' forces an end of option-scanning regardless
  1779. X   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
  1780. X   `--' can cause `getopt' to return EOF with `optind' != ARGC.  */
  1781. X
  1782. static enum {
  1783. X    REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
  1784. } ordering;
  1785. X
  1786. #ifdef    __GNU_LIBRARY__
  1787. #include <string.h>
  1788. #define    my_index    strchr
  1789. #define    my_bcopy(src, dst, n)    memcpy ((dst), (src), (n))
  1790. #else
  1791. X
  1792. /* Avoid depending on library functions or files
  1793. X   whose names are inconsistent.  */
  1794. X
  1795. char *getenv ();
  1796. X
  1797. static char *
  1798. my_index (string, chr)
  1799. X    char *string;
  1800. X    int chr;
  1801. {
  1802. X    while (*string) {
  1803. X    if (*string == chr)
  1804. X        return string;
  1805. X    string++;
  1806. X    }
  1807. X    return 0;
  1808. }
  1809. X
  1810. static void
  1811. my_bcopy (from, to, size)
  1812. X    char *from, *to;
  1813. X    int size;
  1814. {
  1815. X    int i;
  1816. X    for (i = 0; i < size; i++)
  1817. X    to[i] = from[i];
  1818. }
  1819. X
  1820. #endif /* GNU C library.  */
  1821. X
  1822. /* Handle permutation of arguments.  */
  1823. X
  1824. /* Describe the part of ARGV that contains non-options that have
  1825. X   been skipped.  `first_nonopt' is the index in ARGV of the first of them;
  1826. X   `last_nonopt' is the index after the last of them.  */
  1827. X
  1828. static int first_nonopt;
  1829. static int last_nonopt;
  1830. X
  1831. /* Exchange two adjacent subsequences of ARGV.
  1832. X   One subsequence is elements [first_nonopt,last_nonopt)
  1833. X   which contains all the non-options that have been skipped so far.
  1834. X   The other is elements [last_nonopt,optind), which contains all
  1835. X   the options processed since those non-options were skipped.
  1836. X
  1837. X   `first_nonopt' and `last_nonopt' are relocated so that they describe
  1838. X   the new indices of the non-options in ARGV after they are moved.  */
  1839. X
  1840. static void
  1841. exchange (argv)
  1842. X    char **argv;
  1843. {
  1844. X    int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *);
  1845. X    char **temp = (char **) __alloca (nonopts_size);
  1846. X
  1847. X   /* Interchange the two blocks of data in ARGV.  */
  1848. X
  1849. X    my_bcopy (&argv[first_nonopt], temp, nonopts_size);
  1850. X    my_bcopy (&argv[last_nonopt], &argv[first_nonopt],
  1851. X          (optind - last_nonopt) * sizeof (char *));
  1852. X    my_bcopy (temp, &argv[first_nonopt + optind - last_nonopt], nonopts_size);
  1853. X
  1854. X   /* Update records for the slots the non-options now occupy.  */
  1855. X
  1856. X    first_nonopt += (optind - last_nonopt);
  1857. X    last_nonopt = optind;
  1858. }
  1859. X
  1860. /* Scan elements of ARGV (whose length is ARGC) for option characters
  1861. X   given in OPTSTRING.
  1862. X
  1863. X   If an element of ARGV starts with '-', and is not exactly "-" or "--",
  1864. X   then it is an option element.  The characters of this element
  1865. X   (aside from the initial '-') are option characters.  If `getopt'
  1866. X   is called repeatedly, it returns successively each of the option characters
  1867. X   from each of the option elements.
  1868. X
  1869. X   If `getopt' finds another option character, it returns that character,
  1870. X   updating `optind' and `nextchar' so that the next call to `getopt' can
  1871. X   resume the scan with the following option character or ARGV-element.
  1872. X
  1873. X   If there are no more option characters, `getopt' returns `EOF'.
  1874. X   Then `optind' is the index in ARGV of the first ARGV-element
  1875. X   that is not an option.  (The ARGV-elements have been permuted
  1876. X   so that those that are not options now come last.)
  1877. X
  1878. X   OPTSTRING is a string containing the legitimate option characters.
  1879. X   If an option character is seen that is not listed in OPTSTRING,
  1880. X   return '?' after printing an error message.  If you set `opterr' to
  1881. X   zero, the error message is suppressed but we still return '?'.
  1882. X
  1883. X   If a char in OPTSTRING is followed by a colon, that means it wants an arg,
  1884. X   so the following text in the same ARGV-element, or the text of the following
  1885. X   ARGV-element, is returned in `optarg'.  Two colons mean an option that
  1886. X   wants an optional arg; if there is text in the current ARGV-element,
  1887. X   it is returned in `optarg', otherwise `optarg' is set to zero.
  1888. X
  1889. X   If OPTSTRING starts with `-' or `+', it requests different methods of
  1890. X   handling the non-option ARGV-elements.
  1891. X   See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
  1892. X
  1893. X   Long-named options begin with `--' instead of `-'.
  1894. X   Their names may be abbreviated as long as the abbreviation is unique
  1895. X   or is an exact match for some defined option.  If they have an
  1896. X   argument, it follows the option name in the same ARGV-element, separated
  1897. X   from the option name by a `=', or else the in next ARGV-element.
  1898. X   When `getopt' finds a long-named option, it returns 0 if that option's
  1899. X   `flag' field is nonzero, the value of the option's `val' field
  1900. X   if the `flag' field is zero.
  1901. X
  1902. X   The elements of ARGV aren't really const, because we permute them.
  1903. X   But we pretend they're const in the prototype to be compatible
  1904. X   with other systems.
  1905. X
  1906. X   LONGOPTS is a vector of `struct option' terminated by an
  1907. X   element containing a name which is zero.
  1908. X
  1909. X   LONGIND returns the index in LONGOPT of the long-named option found.
  1910. X   It is only valid when a long-named option has been found by the most
  1911. X   recent call.
  1912. X
  1913. X   If LONG_ONLY is nonzero, '-' as well as '--' can introduce
  1914. X   long-named options.  */
  1915. X
  1916. int
  1917. _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
  1918. X    int argc;
  1919. X    char *const *argv;
  1920. X    const char *optstring;
  1921. X    const struct option *longopts;
  1922. X    int *longind;
  1923. X    int long_only;
  1924. {
  1925. X    int option_index;
  1926. X
  1927. X    optarg = 0;
  1928. X
  1929. X   /* Initialize the internal data when the first call is made.
  1930. SHAR_EOF
  1931. true || echo 'restore of hodge-c-0.98j/getopt.c failed'
  1932. fi
  1933. echo 'End of  part 2'
  1934. echo 'File hodge-c-0.98j/getopt.c is continued in part 3'
  1935. echo 3 > _shar_seq_.tmp
  1936. exit 0
  1937. exit 0 # Just in case...
  1938.