home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / games / volume14 / umoria4 / part33 < prev    next >
Internet Message Format  |  1992-08-31  |  59KB

  1. Path: uunet!zephyr.ens.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v14i065:  umoria4 - single player dungeon simulation (ver. 5.5), Part33/39
  5. Message-ID: <3429@master.CNA.TEK.COM>
  6. Date: 22 Aug 92 22:14:59 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 2070
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: grabiner@math.harvard.edu (David Grabiner)
  12. Posting-number: Volume 14, Issue 65
  13. Archive-name: umoria4/Part33
  14. Supersedes: umoria3: Volume 9, Issue 55-97; Volume 10, Issue 15-17
  15. Environment: Curses, Unix, Mac, MS-DOS, Atari-ST, Amiga, VMS
  16.  
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 33 (of 39)."
  26. # Contents:  doc/ERRORS ibmpc/tcio.c mac/MakeFile.hqx mac/miscrsrc.hqx
  27. #   mac/scrnmgr/ScrnMgr.r source/potions.c unix/unix.c
  28. # Wrapped by billr@saab on Thu Aug 20 09:11:35 1992
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f 'doc/ERRORS' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'doc/ERRORS'\"
  32. else
  33. echo shar: Extracting \"'doc/ERRORS'\" \(746 characters\)
  34. sed "s/^X//" >'doc/ERRORS' <<'END_OF_FILE'
  35. Xmoria.ms should:
  36. X
  37. Xthe backslashes in the direction table don't show up in the output for
  38. Xsome reason
  39. X
  40. Xexplain non obvious spells/prayers, many of the priest spells are confusing,
  41. Xreally should have a general section on spells explaining the 'G' command,
  42. Xhow int/wis and level affects number of spells/prayers, how area effect
  43. Xspells work, centering before casting an area effect spell is very useful
  44. Xand perhaps other stuff about spells/magic
  45. X
  46. Xexplain the special inventory/equipment mode?
  47. X
  48. Xexplain how misc abilities depend on level, give table of class versus
  49. Xability showing the relative gain per level values
  50. X
  51. Xmention too-heavy weapons?
  52. X
  53. Xsays nothing about levels and EXP
  54. Xshould mention that level 40 is the highest level that can be reached
  55. END_OF_FILE
  56. if test 746 -ne `wc -c <'doc/ERRORS'`; then
  57.     echo shar: \"'doc/ERRORS'\" unpacked with wrong size!
  58. fi
  59. # end of 'doc/ERRORS'
  60. fi
  61. if test -f 'ibmpc/tcio.c' -a "${1}" != "-c" ; then 
  62.   echo shar: Will not clobber existing file \"'ibmpc/tcio.c'\"
  63. else
  64. echo shar: Extracting \"'ibmpc/tcio.c'\" \(8922 characters\)
  65. sed "s/^X//" >'ibmpc/tcio.c' <<'END_OF_FILE'
  66. X/* ibmpc/tcio.c: terminal I/O code for Turbo C
  67. X
  68. X   Copyright (c) 1989-92 James E. Wilson, Eric Vaitl
  69. X
  70. X   This software may be copied and distributed for educational, research, and
  71. X   not for profit purposes provided that this copyright and statement are
  72. X   included in all such copies. */
  73. X
  74. X/* This I/O module doesn't need PCcurses.  You may also need to make some
  75. X   changes to ms_misc.c.  */
  76. X
  77. X#include <alloc.h>  /* malloc() */
  78. X#include <ctype.h>
  79. X#include <dos.h>
  80. X#include <stdlib.h>  /* getenv() */
  81. X#include <stdio.h> /* putch */
  82. X#include <process.h> /* spawnl() */
  83. X#include <conio.h> /* window(), gotoxy() */
  84. X
  85. X#ifdef __TURBOC__
  86. X#include    <string.h>
  87. X#endif /* __TURBOC__ */
  88. X
  89. X#include "config.h"
  90. X#include "constant.h"
  91. X#include "types.h"
  92. X#include "externs.h"
  93. X
  94. X#define MSG_LEN  73
  95. X#define LINES 25
  96. X#define COLS 80
  97. X
  98. Xstatic void *savescr; /* pointer to a saved screen */
  99. X
  100. Xvoid init_curses(void){
  101. X  if((savescr=malloc(LINES*COLS*2))==NULL){
  102. X    puts("Out of memory in init_curses()");
  103. X    exit(1);
  104. X  }
  105. X  clrscr();
  106. X  msdos_raw();
  107. X}
  108. X
  109. X
  110. Xint get_string(char *in_str,int row,int column,int slen)
  111. X{
  112. X  register int start_col, end_col, i;
  113. X  char *p;
  114. X  int flag, aborted;
  115. X
  116. X  aborted = FALSE;
  117. X  flag  = FALSE;
  118. X  gotoxy(column+1,row+1);
  119. X  for (i = slen; i > 0; i--)
  120. X    putch(' ');
  121. X  gotoxy(column+1,row+1);
  122. X  start_col = column;
  123. X  end_col = column + slen - 1;
  124. X  if (end_col > 79)
  125. X    {
  126. X      slen = 80 - column;
  127. X      end_col = 79;
  128. X  }
  129. X  p = in_str;
  130. X  do
  131. X    {
  132. X      i = inkey();
  133. X      switch(i)
  134. X        {
  135. X          case ESCAPE:
  136. X          aborted = TRUE;
  137. X          break;
  138. X        case CTRL('J'): case CTRL('M'):
  139. X          flag  = TRUE;
  140. X          break;
  141. X        case DELETE: case CTRL('H'):
  142. X          if (column > start_col)
  143. X            {
  144. X              column--;
  145. X              put_buffer(" ", row, column);
  146. X              move_cursor(row, column);
  147. X              *--p = '\0';
  148. X          }
  149. X          break;
  150. X        default:
  151. X          if (!isprint(i) || column > end_col)
  152. X            bell();
  153. X          else
  154. X            {
  155. X              gotoxy(column+1,row+1);
  156. X              putch((char) i);
  157. X              *p++ = i;
  158. X              column++;
  159. X          }
  160. X          break;
  161. X      }
  162. X  }
  163. X  while ((!flag) && (!aborted));
  164. X  if (aborted)
  165. X    return(FALSE);
  166. X  /* Remove trailing blanks     */
  167. X  while (p > in_str && p[-1] == ' ')
  168. X    p--;
  169. X  *p = '\0';
  170. X  return(TRUE);
  171. X}
  172. X
  173. Xvoid put_buffer(char *out_str,int row,int col){
  174. X  vtype tmp_str;
  175. X  if (col>79) col=79;
  176. X  strncpy(tmp_str,out_str,79-col);
  177. X  tmp_str[79-col]='\0';
  178. X  gotoxy(col+1,row+1);
  179. X  cputs(tmp_str);
  180. X}
  181. X
  182. Xvoid put_qio(void){
  183. X/* nothing to do */
  184. X}
  185. X
  186. Xvoid restore_term(void){
  187. X  fflush(stdout);
  188. X  clear_screen();
  189. X  msdos_noraw();
  190. X}
  191. X
  192. Xvoid shell_out(void){
  193. X  char *comspec;
  194. X#ifndef __TURBOC__
  195. X  char key;
  196. X  int val;
  197. X  char *str;
  198. X#endif /* __TURBOC__ */
  199. X  save_screen();
  200. X  clear_screen();
  201. X  puts("[Entering DOS shell, type exit to return to game.]");
  202. X  msdos_noraw();
  203. X  ignore_signals();
  204. X  if((comspec=getenv("COMSPEC")) ==NULL ||
  205. X    spawnl(P_WAIT,comspec,comspec,(char *)NULL)<0){
  206. X    puts("Sorry, there seems to be a problem with shell_out()");
  207. X    printf("comspec = %s\n",comspec);
  208. X    flush();
  209. X    puts("Hit a key to continue");
  210. X    while(!kbhit())
  211. X      ;
  212. X  }
  213. X  restore_signals();
  214. X  restore_screen();
  215. X}
  216. X
  217. Xvoid save_screen(void){
  218. X  gettext(1,1,COLS,LINES,savescr);
  219. X}
  220. X
  221. Xvoid restore_screen(void){
  222. X  puttext(1,1,COLS,LINES,savescr);
  223. X}
  224. X
  225. Xvoid clear_screen(void){
  226. X  window(1,1,COLS,LINES);
  227. X/*
  228. XI think later I might want to define seperate windows, so the above line
  229. Xis definsive code.
  230. X*/
  231. X  clrscr();
  232. X}
  233. X
  234. Xvoid clear_from(int row){
  235. X  window(1,row+1,COLS,LINES);
  236. X  clrscr();
  237. X  window(1,1,COLS,LINES);
  238. X}
  239. X
  240. Xvoid flush(void){
  241. X  while(kbhit())
  242. X    getch();
  243. X}
  244. X
  245. Xvoid erase_line(int row, int col){
  246. X  if(row==MSG_LINE&&msg_flag)
  247. X    msg_print(NULL);
  248. X  gotoxy(col+1,row+1);
  249. X  clreol();
  250. X}
  251. X
  252. Xchar inkey(void){
  253. X  int i;
  254. X
  255. X  command_count=0;
  256. X  while(TRUE){
  257. X    i=msdos_getch();
  258. X    if(i==EOF){
  259. X      eof_flag++;
  260. X      msg_flag=FALSE;
  261. X      if(!character_generated||character_saved) exit_game();
  262. X      disturb(1,0);
  263. X      if(eof_flag>100){
  264. X        panic_save=1;
  265. X        strcpy(died_from,"(end of input: panic saved)");
  266. X        if(!save_char()){
  267. X          strcpy(died_from,"panic: unexpected eof");
  268. X          death=TRUE;
  269. X        }
  270. X        exit_game();
  271. X      }
  272. X    return ESCAPE;
  273. X  }
  274. X  if(i!=CTRL('R'))
  275. X    return (char) i;
  276. X  msdos_raw();
  277. X    break;
  278. X  }
  279. X  return (CTRL('R'));
  280. X}
  281. X
  282. Xvoid print(char ch, int row, int col){
  283. X  row -= panel_row_prt;
  284. X  col-=panel_col_prt;
  285. X  gotoxy(col+1,row+1);
  286. X  putchar((int)ch);
  287. X}
  288. X
  289. Xvoid move_cursor_relative(int row, int col){
  290. X  row-=panel_row_prt;
  291. X  col-=panel_col_prt;
  292. X  gotoxy(col+1,row+1);
  293. X}
  294. X
  295. Xvoid count_msg_print(char *p){
  296. X  int i;
  297. X  i=command_count;
  298. X  msg_print(p);
  299. X  command_count=i;
  300. X}
  301. X
  302. Xvoid prt(char* str_buff,int row, int col){
  303. X  if (row==MSG_LINE&&msg_flag)
  304. X    msg_print(NULL);
  305. X  gotoxy(col+1,row+1);
  306. X  clreol();
  307. X  put_buffer(str_buff,row,col);
  308. X}
  309. X
  310. Xvoid move_cursor(int row,int col){
  311. X  gotoxy(col+1,row+1);
  312. X}
  313. X
  314. Xvoid msg_print(char* str_buff){
  315. X  register int old_len;
  316. X  char in_char;
  317. X  if(msg_flag){
  318. X    old_len=strlen(old_msg[last_msg])+1;
  319. X    if (old_len>MSG_LEN)
  320. X      old_len=MSG_LEN;
  321. X    put_buffer("-more-",MSG_LINE, old_len);
  322. X    wait_for_more=1;
  323. X    do{
  324. X      in_char=inkey();
  325. X    }while((in_char!=' ')&&(in_char!=ESCAPE)&&(in_char!='\n')&&
  326. X       (in_char!='\r'));
  327. X    wait_for_more=0;
  328. X  }
  329. X  gotoxy(1,MSG_LINE+1);
  330. X  clreol();
  331. X  if(str_buff){
  332. X    put_buffer(str_buff,MSG_LINE,0);
  333. X    command_count=0;
  334. X    if(++last_msg>=MAX_SAVE_MSG) last_msg=0;
  335. X    strncpy(old_msg[last_msg],str_buff,VTYPESIZ);
  336. X    old_msg[last_msg][VTYPESIZ-1]='\0';
  337. X    msg_flag=TRUE;
  338. X  }else
  339. X    msg_flag=FALSE;
  340. X}
  341. X
  342. Xint get_check(char*prompt){
  343. X  int res;
  344. X  prt(prompt,0,0);
  345. X  if(wherex()>MSG_LEN +1) gotoxy(74,1);
  346. X  cputs(" [y/n]");
  347. X  do{
  348. X    res=inkey();
  349. X  }while(res==' ');
  350. X  erase_line(0,0);
  351. X  if(res=='Y'||res=='y')
  352. X    return(TRUE);
  353. X  else
  354. X    return(FALSE);
  355. X}
  356. X
  357. Xint get_com(char *prompt,char *command){
  358. X  int res;
  359. X  if(prompt)
  360. X    prt(prompt,0,0);
  361. X  *command=inkey();
  362. X  if(*command==ESCAPE)
  363. X    res=FALSE;
  364. X  else
  365. X    res=TRUE;
  366. X  erase_line(MSG_LINE,0);
  367. X  return(res);
  368. X}
  369. Xvoid bell(void){
  370. X  if (! sound_beep_flag)
  371. X    return;
  372. X
  373. X  putchar('\007');
  374. X}
  375. X
  376. X/* the rest is just modified -ev- */
  377. X
  378. X/* definitions used by screen_map() */
  379. X/* index into border character array */
  380. X#define TL 0    /* top left */
  381. X#define TR 1
  382. X#define BL 2
  383. X#define BR 3
  384. X#define HE 4    /* horizontal edge */
  385. X#define VE 5
  386. X
  387. X/* character set to use */
  388. X#   define CH(x)        (screen_border[1][x])
  389. X
  390. X  /* Display highest priority object in the RATIO by RATIO area */
  391. X#define RATIO 3
  392. X
  393. Xvoid screen_map()
  394. X{
  395. X    register int  i, j;
  396. X  static int8u screen_border[2][6] = {
  397. X      {'+', '+', '+', '+', '-', '|'},     /* normal chars */
  398. X    {201, 187, 200, 188, 205, 186}      /* graphics chars */
  399. X};
  400. X  int8u map[MAX_WIDTH / RATIO + 1];
  401. X  int8u tmp;
  402. X  int priority[256];
  403. X  int row, orow, col, myrow, mycol = 0;
  404. X  char prntscrnbuf[80];
  405. X
  406. X  for (i = 0; i < 256; i++)
  407. X    priority[i] = 0;
  408. X  priority['<'] = 5;
  409. X  priority['>'] = 5;
  410. X  priority['@'] = 10;
  411. X  priority[wallsym] = -5;
  412. X  priority[floorsym] = -10;
  413. X  priority['\''] = -3;
  414. X  priority[' '] = -15;
  415. X
  416. X  save_screen();
  417. X  clear_screen();
  418. X  gotoxy(1,1);
  419. X  putch(CH(TL));
  420. X  for (i = 0; i < MAX_WIDTH / RATIO; i++)
  421. X    putch(CH(HE));
  422. X  putch(CH(TR));
  423. X  orow = -1;
  424. X  map[MAX_WIDTH / RATIO] = '\0';
  425. X  for (i = 0; i < MAX_HEIGHT; i++)
  426. X    {
  427. X        row = i / RATIO;
  428. X      if (row != orow)
  429. X        {
  430. X            if (orow >= 0)
  431. X            {
  432. X               sprintf(prntscrnbuf,"%c%s%c",CH(VE), map, CH(VE));
  433. X               gotoxy(1,orow+2);
  434. X               cputs(prntscrnbuf);
  435. X          }
  436. X          for (j = 0; j < MAX_WIDTH / RATIO; j++)
  437. X            map[j] = ' ';
  438. X          orow = row;
  439. X      }
  440. X      for (j = 0; j < MAX_WIDTH; j++)
  441. X        {
  442. X            col = j / RATIO;
  443. X          tmp = loc_symbol(i, j);
  444. X          if (priority[map[col]] < priority[tmp])
  445. X            map[col] = tmp;
  446. X          if (map[col] == '@')
  447. X            {
  448. X                mycol = col + 1; /* account for border */
  449. X              myrow = row + 1;
  450. X          }
  451. X      }
  452. X  }
  453. X  if (orow >= 0)
  454. X    {
  455. X      sprintf(prntscrnbuf,"%c%s%c",CH(VE), map, CH(VE));
  456. X      gotoxy(1,orow+2);
  457. X      cputs(prntscrnbuf);
  458. X  }
  459. X  gotoxy(1,orow+3);
  460. X  putch(CH(BL));
  461. X  for (i = 0; i < MAX_WIDTH / RATIO; i++)
  462. X    putch(CH(HE));
  463. X  putch(CH(BR));
  464. X  gotoxy(24,24);
  465. X  cputs("Hit any key to continue");
  466. X  if (mycol > 0)
  467. X    gotoxy(mycol+1, myrow+1);
  468. X  inkey();
  469. X  restore_screen();
  470. X}
  471. X
  472. Xvoid pause_exit(int prt_line, int delay)
  473. X{
  474. X    char dummy;
  475. X
  476. X#ifdef __TURBOC__
  477. X  /* Otherwise, TURBO C complains that delay is never used.  */
  478. X  dummy = (char) delay;
  479. X#endif
  480. X  prt("[Press any key to continue, or Q to exit.]", prt_line, 10);
  481. X  dummy = inkey();
  482. X  if (dummy == 'Q')
  483. X    {
  484. X      erase_line(prt_line, 0);
  485. X      exit_game();
  486. X  }
  487. X  erase_line(prt_line, 0);
  488. X}
  489. X
  490. Xvoid pause_line(int prt_line)
  491. X{
  492. X  prt("[Press any key to continue.]", prt_line, 23);
  493. X  (void) inkey();
  494. X  erase_line(prt_line, 0);
  495. X}
  496. X
  497. END_OF_FILE
  498. if test 8922 -ne `wc -c <'ibmpc/tcio.c'`; then
  499.     echo shar: \"'ibmpc/tcio.c'\" unpacked with wrong size!
  500. fi
  501. # end of 'ibmpc/tcio.c'
  502. fi
  503. if test -f 'mac/MakeFile.hqx' -a "${1}" != "-c" ; then 
  504.   echo shar: Will not clobber existing file \"'mac/MakeFile.hqx'\"
  505. else
  506. echo shar: Extracting \"'mac/MakeFile.hqx'\" \(8517 characters\)
  507. sed "s/^X//" >'mac/MakeFile.hqx' <<'END_OF_FILE'
  508. X(This file must be converted with BinHex 4.0)
  509. X:#%eKDf9'D@aP!&4&@&408&-J!3!!!"E0!!!"IRGE3dp`G'P[ER-J23N*,@)b)#e
  510. Xc)(Y%C@CKG@adI5!YC#"038-J,@eLCb"[EL!YFhPY)'pZ$3e5Fh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3*BfpZFh4KER3
  627. XZD#"MEfjQD@FZD#"dHA"PFbjS$A"XBAPPFLjbFh*M,Qm*#F3*BfpZFh4KER3ZD#"
  628. XMEfjQD@FZD#"dHA"PFbjS$A4KBQaPFbjbFh*M,Qm*#F3*BfpZFh4KER3ZD#"MEfj
  629. XQD@FZD#"dHA"PFbjS$A4bC@&cGA*P,R*cFQ-ZE`N*a!PMEfjcG'&ZG#jS)'0[EQC
  630. XTCbjS)(4jF'9c,QJ0GQ&bD@&LE'8ZFR0bBbj[#3R%#@0[ER0dB@jd,QJJBfpZCQP
  631. XR,QJJG(P`CA-ZD!fU&J!!!3!!!!&-!!!!6!!!!$)!!!!F!%!!3!#D!F3!!3%!!!!
  632. X!!!!!!))(3fpZCQPbE3K0B@YP4QPXC5d#!!!!9%9B9%e38b!"!!!!!%!!!!!!!!"
  633. X849K869"6)!%!!!!!3!!!!!!!!!!!!!!!!!!!!!!!!++&Jjm!!"E0!!!"IJ#$!!!
  634. X!!*3!"`!!!!!!M!%!!*i"4J3$6Q9h!!!!!!!!TJ%!!,J"4J3'3f&ZBf9X!!!!!!#
  635. X0!!i!R3#kL!Y1CAFJ9fPZC'ph1J!!!!!!!"S!h`!Z!9Z!!!!!!!!!0!%!!%B"4J3
  636. X&4@TPBh3!!!!!!!"1!3!!B!&'"!9%FQPfC3!!!!!!!!")!!P0EfjKBfm!!!!!!!!
  637. X!!!!!!!!!!!!!!!!!!!!!!!!!!!!'!!3!2J!2!G-#F`!q!!m"d`*cSS@5q3!!&Xd
  638. X!!"E0!!!6e`%!!!!"!!!!!8`!!!"-!!!!-J!Z#8!)&J!!!"`!-J!!69"68J!!!!S
  639. X$lIrr!!!!!!![$)42eJ:
  640. END_OF_FILE
  641. if test 8517 -ne `wc -c <'mac/MakeFile.hqx'`; then
  642.     echo shar: \"'mac/MakeFile.hqx'\" unpacked with wrong size!
  643. fi
  644. # end of 'mac/MakeFile.hqx'
  645. fi
  646. if test -f 'mac/miscrsrc.hqx' -a "${1}" != "-c" ; then 
  647.   echo shar: Will not clobber existing file \"'mac/miscrsrc.hqx'\"
  648. else
  649. echo shar: Extracting \"'mac/miscrsrc.hqx'\" \(8821 characters\)
  650. sed "s/^X//" >'mac/miscrsrc.hqx' <<'END_OF_FILE'
  651. X(This file must be converted with BinHex 4.0)
  652. X:%NeKBde[FQPK,QeTFf-ZFR0bB`"bFh*M8P0&4!%!!!!!!!!!'5,RM3!!!!!"!!!
  653. X!'0`!!"IF!!!!4J!!#'%(D'9KC'9bF`%!!!!!&3!!#'F!!!!!SkTl%`!!%NeKBde
  654. X[FQPK,QeTFf-ZFR0bBfm#!!!!FR0bBe*6483!!(*cFQ058d9%!3!!!!$!!!!!!!!
  655. X!!!!!!!!!!!!!!!!!T48J)`!!!!!!!"NL!!!"!!!!!!!)D!!!!!!!!!!!!!!!!!!
  656. X!)ai!!#3!S*Q#Ck$H'l8!!!!!33!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  657. X!b98!%J!!!!!!!!!!!!!!!!d!!!!)B3GcEh9bBf9c!3!!!!!V!!!)D3!!!!#MURX
  658. XR!!!!!!"5!"J"*`!!&pK8D'Pc)'Pc)&9YEh*TB5!e,M-Z-5!SEh)JD@BJH@pe)("
  659. XbC@CPFL`J6@&M6@pbD@%J05ic,M%T,Je3E'9KFf8JFf9ZC#"MEfeYC@jdFb"KEQ3
  660. XJBR9R)(*PF'pbG(-JG'mJ$AGTE(0[EN"PFQjTC5j#CA*VC@aPH5j&4&8J+%TTE5"
  661. XAD@acEfiT)'pb$@*c3'0c,Q*bB@jNC@Pc,Q9NG5!S3Q9ZDQ&YD@iJ8f0SFQ9TBQ9
  662. Xb+5i0$99cCA*c)'pQ)("bCACTEh9c)(CPFR0TEfjc)'pQ)%eKBb"0Eh*TB5"cD'p
  663. XeE'3JC'PcBf&bC#"dD'8J$@pXC#"`FQpRFQ&Y,L!J6h4SCA*hDA0P,#"dD'8J4QP
  664. XZC'9b)'eTCfKd)'GPG#"MEfj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JCQPbFh3JBfKKEQGTEQFJG'KP)'CTE'8JG(P`C5"[CL"dD'8J$A"bEfGbB@d
  782. XJCR*[E5!R39"36#FJG'mJ*e4&@&3R)(GTG'JJ8Q9c4@4TG#iJ)&*PE@9YBQ9b)(4
  783. X[)!eMD'&ZCf8JG'KP)'CTE'8JG(P`C5"LB@0V)'&RB@PZ)(GSC@iJH@pe)'&bC5"
  784. XdD(*[G@GS,L!J3Q8J$@0KFQ9QG@`JEQpd)(4[)'4TFh4eFQ)JG'KP)'aTEQ9c)(G
  785. XSD@0S)'*PCfPZ)(GTG'JJB5!R)bFZ$3!!!3!!!"MF!!!Ah!!!!%B!-e*)"B3!!!!
  786. XF!$)!!&4&@&3!!!!+!J!!!#!!!!!!-e&!%deKBb"0Eh*TB5")C@a`)&4PH(5QV!:
  787. END_OF_FILE
  788. if test 8821 -ne `wc -c <'mac/miscrsrc.hqx'`; then
  789.     echo shar: \"'mac/miscrsrc.hqx'\" unpacked with wrong size!
  790. fi
  791. # end of 'mac/miscrsrc.hqx'
  792. fi
  793. if test -f 'mac/scrnmgr/ScrnMgr.r' -a "${1}" != "-c" ; then 
  794.   echo shar: Will not clobber existing file \"'mac/scrnmgr/ScrnMgr.r'\"
  795. else
  796. echo shar: Extracting \"'mac/scrnmgr/ScrnMgr.r'\" \(8279 characters\)
  797. sed "s/^X//" >'mac/scrnmgr/ScrnMgr.r' <<'END_OF_FILE'
  798. X/* mac/scrnmgr/ScrnMgr.r: resources for scrnmgr code
  799. X
  800. X   Copyright (c) 1989-1991 Curtis McCauley, James E. Wilson
  801. X
  802. X   You may copy this subroutine package freely, modify it as you desire,
  803. X   and distribute it at will, as long as the copyright notice in the source
  804. X   material is not disturbed, excepting that no one may use this package or
  805. X   any part of it for commercial purposes of any kind without the express
  806. X   written consent of its author. */
  807. X
  808. X#include "Types.r"
  809. X
  810. Xtype 'INFO'    {
  811. X    rect;
  812. X    integer;
  813. X    longint white, black, red, green, blue, cyan, magenta, yellow;
  814. X    longint white, black, red, green, blue, cyan, magenta, yellow;
  815. X};
  816. X
  817. Xtype 'acur' {
  818. X    integer = $$Countof(cursors);
  819. X    integer = 0;
  820. X    array cursors {
  821. X        integer;
  822. X        integer = 0;
  823. X    };
  824. X};
  825. X
  826. Xresource 'acur' (128, "Rotating Watch") {
  827. X    { 256, 257, 258, 259, 260, 261, 262, 263 }
  828. X};
  829. X
  830. Xresource 'CURS' (256) {
  831. X    $"3F 00 3F 00 3F 00 3F 00 40 80 84 40 84 40 84 60"
  832. X    $"9C 60 80 40 80 40 40 80 3F 00 3F 00 3F 00 3F",
  833. X    $"3F 00 3F 00 3F 00 3F 00 7F 80 FF C0 FF C0 FF C0"
  834. X    $"FF C0 FF C0 FF C0 7F 80 3F 00 3F 00 3F 00 3F",
  835. X    {8, 8}
  836. X};
  837. X
  838. Xresource 'CURS' (257) {
  839. X    $"3F 00 3F 00 3F 00 3F 00 40 80 80 40 81 40 82 60"
  840. X    $"9C 60 80 40 80 40 40 80 3F 00 3F 00 3F 00 3F",
  841. X    $"3F 00 3F 00 3F 00 3F 00 7F 80 FF C0 FF C0 FF C0"
  842. X    $"FF C0 FF C0 FF C0 7F 80 3F 00 3F 00 3F 00 3F",
  843. X    {8, 8}
  844. X};
  845. X
  846. Xresource 'CURS' (258) {
  847. X    $"3F 00 3F 00 3F 00 3F 00 40 80 80 40 80 40 80 60"
  848. X    $"9F 60 80 40 80 40 40 80 3F 00 3F 00 3F 00 3F",
  849. X    $"3F 00 3F 00 3F 00 3F 00 7F 80 FF C0 FF C0 FF C0"
  850. X    $"FF C0 FF C0 FF C0 7F 80 3F 00 3F 00 3F 00 3F",
  851. X    {8, 8}
  852. X};
  853. X
  854. Xresource 'CURS' (259) {
  855. X    $"3F 00 3F 00 3F 00 3F 00 40 80 80 40 80 40 80 60"
  856. X    $"9C 60 82 40 80 40 40 80 3F 00 3F 00 3F 00 3F",
  857. X    $"3F 00 3F 00 3F 00 3F 00 7F 80 FF C0 FF C0 FF C0"
  858. X    $"FF C0 FF C0 FF C0 7F 80 3F 00 3F 00 3F 00 3F",
  859. X    {8, 8}
  860. X};
  861. X
  862. Xresource 'CURS' (260) {
  863. X    $"3F 00 3F 00 3F 00 3F 00 40 80 80 40 80 40 80 60"
  864. X    $"9C 60 84 40 84 40 40 80 3F 00 3F 00 3F 00 3F",
  865. X    $"3F 00 3F 00 3F 00 3F 00 7F 80 FF C0 FF C0 FF C0"
  866. X    $"FF C0 FF C0 FF C0 7F 80 3F 00 3F 00 3F 00 3F",
  867. X    {8, 8}
  868. X};
  869. X
  870. Xresource 'CURS' (261) {
  871. X    $"3F 00 3F 00 3F 00 3F 00 40 80 80 40 80 40 80 60"
  872. X    $"9C 60 88 40 90 40 40 80 3F 00 3F 00 3F 00 3F",
  873. X    $"3F 00 3F 00 3F 00 3F 00 7F 80 FF C0 FF C0 FF C0"
  874. X    $"FF C0 FF C0 FF C0 7F 80 3F 00 3F 00 3F 00 3F",
  875. X    {8, 8}
  876. X};
  877. X
  878. Xresource 'CURS' (262) {
  879. X    $"3F 00 3F 00 3F 00 3F 00 40 80 80 40 80 40 80 60"
  880. X    $"BC 60 80 40 80 40 40 80 3F 00 3F 00 3F 00 3F",
  881. X    $"3F 00 3F 00 3F 00 3F 00 7F 80 FF C0 FF C0 FF C0"
  882. X    $"FF C0 FF C0 FF C0 7F 80 3F 00 3F 00 3F 00 3F",
  883. X    {8, 8}
  884. X};
  885. X
  886. Xresource 'CURS' (263) {
  887. X    $"3F 00 3F 00 3F 00 3F 00 40 80 80 40 90 40 88 60"
  888. X    $"9C 60 80 40 80 40 40 80 3F 00 3F 00 3F 00 3F",
  889. X    $"3F 00 3F 00 3F 00 3F 00 7F 80 FF C0 FF C0 FF C0"
  890. X    $"FF C0 FF C0 FF C0 7F 80 3F 00 3F 00 3F 00 3F",
  891. X    {8, 8}
  892. X};
  893. X
  894. Xresource 'STR ' (128, "About Title", purgeable) {
  895. X    "About ScrnMgr\311"
  896. X};
  897. X
  898. Xresource 'STR ' (129, "Font Name", purgeable) {
  899. X    "Monaco"
  900. X};
  901. X
  902. Xresource 'DLOG' (128, "About", purgeable) {
  903. X    {44, 26, 162, 314},
  904. X    dBoxProc,
  905. X    invisible,
  906. X    noGoAway,
  907. X    0x0,
  908. X    128,
  909. X    ""
  910. X};
  911. X
  912. Xresource 'DLOG' (129, "Colors", purgeable) {
  913. X    {56, 32, 228, 364},
  914. X    dBoxProc,
  915. X    invisible,
  916. X    noGoAway,
  917. X    0x0,
  918. X    129,
  919. X    ""
  920. X};
  921. X
  922. Xresource 'DLOG' (130, "Yes or No", purgeable) {
  923. X    {40, 40, 142, 300},
  924. X    dBoxProc,
  925. X    invisible,
  926. X    noGoAway,
  927. X    0x0,
  928. X    130,
  929. X    ""
  930. X};
  931. X
  932. Xresource 'DITL' (128, "About", purgeable) {
  933. X    { /* array DITLarray: 4 elements */
  934. X        /* [1] */
  935. X        {73, 103, 97, 191},
  936. X        Button {
  937. X            enabled,
  938. X            "OK"
  939. X        },
  940. X        /* [2] */
  941. X        {80, 158, 89, 167},
  942. X        UserItem {
  943. X            disabled
  944. X        },
  945. X        /* [3] */
  946. X        {16, 8, 32, 273},
  947. X        StaticText {
  948. X            enabled,
  949. X            "ScrnMgr: Version 1.0 22 July 1989"
  950. X        },
  951. X        /* [4] */
  952. X        {40, 8, 56, 120},
  953. X        StaticText {
  954. X            enabled,
  955. X            "Curtis McCauley"
  956. X        }
  957. X    }
  958. X};
  959. X
  960. Xresource 'DITL' (129, "Colors", purgeable) {
  961. X    { /* array DITLarray: 23 elements */
  962. X        /* [1] */
  963. X        {40, 256, 60, 316},
  964. X        Button {
  965. X            enabled,
  966. X            "OK"
  967. X        },
  968. X        /* [2] */
  969. X        {88, 256, 108, 316},
  970. X        Button {
  971. X            enabled,
  972. X            "Cancel"
  973. X        },
  974. X        /* [3] */
  975. X        {32, 32, 48, 112},
  976. X        RadioButton {
  977. X            enabled,
  978. X            "White"
  979. X        },
  980. X        /* [4] */
  981. X        {48, 32, 64, 112},
  982. X        RadioButton {
  983. X            enabled,
  984. X            "Black"
  985. X        },
  986. X        /* [5] */
  987. X        {64, 32, 80, 112},
  988. X        RadioButton {
  989. X            enabled,
  990. X            "Red"
  991. X        },
  992. X        /* [6] */
  993. X        {80, 32, 96, 112},
  994. X        RadioButton {
  995. X            enabled,
  996. X            "Green"
  997. X        },
  998. X        /* [7] */
  999. X        {96, 32, 112, 112},
  1000. X        RadioButton {
  1001. X            enabled,
  1002. X            "Blue"
  1003. X        },
  1004. X        /* [8] */
  1005. X        {112, 32, 128, 112},
  1006. X        RadioButton {
  1007. X            enabled,
  1008. X            "Cyan"
  1009. X        },
  1010. X        /* [9] */
  1011. X        {128, 32, 144, 112},
  1012. X        RadioButton {
  1013. X            enabled,
  1014. X            "Magenta"
  1015. X        },
  1016. X        /* [10] */
  1017. X        {144, 32, 160, 112},
  1018. X        RadioButton {
  1019. X            enabled,
  1020. X            "Yellow"
  1021. X        },
  1022. X        /* [11] */
  1023. X        {32, 152, 48, 232},
  1024. X        RadioButton {
  1025. X            enabled,
  1026. X            "White"
  1027. X        },
  1028. X        /* [12] */
  1029. X        {48, 152, 64, 232},
  1030. X        RadioButton {
  1031. X            enabled,
  1032. X            "Black"
  1033. X        },
  1034. X        /* [13] */
  1035. X        {64, 152, 80, 232},
  1036. X        RadioButton {
  1037. X            enabled,
  1038. X            "Red"
  1039. X        },
  1040. X        /* [14] */
  1041. X        {80, 152, 96, 232},
  1042. X        RadioButton {
  1043. X            enabled,
  1044. X            "Green"
  1045. X        },
  1046. X        /* [15] */
  1047. X        {96, 152, 112, 232},
  1048. X        RadioButton {
  1049. X            enabled,
  1050. X            "Blue"
  1051. X        },
  1052. X        /* [16] */
  1053. X        {112, 152, 128, 232},
  1054. X        RadioButton {
  1055. X            enabled,
  1056. X            "Cyan"
  1057. X        },
  1058. X        /* [17] */
  1059. X        {128, 152, 144, 232},
  1060. X        RadioButton {
  1061. X            enabled,
  1062. X            "Magenta"
  1063. X        },
  1064. X        /* [18] */
  1065. X        {144, 152, 160, 232},
  1066. X        RadioButton {
  1067. X            enabled,
  1068. X            "Yellow"
  1069. X        },
  1070. X        /* [19] */
  1071. X        {16, 16, 168, 120},
  1072. X        UserItem {
  1073. X            disabled
  1074. X        },
  1075. X        /* [20] */
  1076. X        {16, 136, 168, 240},
  1077. X        UserItem {
  1078. X            disabled
  1079. X        },
  1080. X        /* [21] */
  1081. X        {8, 24, 24, 104},
  1082. X        StaticText {
  1083. X            disabled,
  1084. X            "Foreground"
  1085. X        },
  1086. X        /* [22] */
  1087. X        {8, 144, 24, 224},
  1088. X        StaticText {
  1089. X            disabled,
  1090. X            "Background"
  1091. X        },
  1092. X        /* [23] */
  1093. X        {48, 296, 56, 304},
  1094. X        UserItem {
  1095. X            disabled
  1096. X        }
  1097. X    }
  1098. X};
  1099. X
  1100. Xresource 'DITL' (130, "Yes or No", purgeable) {
  1101. X    { /* array DITLarray: 5 elements */
  1102. X        /* [1] */
  1103. X        {16, 184, 36, 244},
  1104. X        Button {
  1105. X            enabled,
  1106. X            "Yes"
  1107. X        },
  1108. X        /* [2] */
  1109. X        {64, 184, 84, 244},
  1110. X        Button {
  1111. X            enabled,
  1112. X            "No"
  1113. X        },
  1114. X        /* [3] */
  1115. X        {19, 227, 33, 241},
  1116. X        UserItem {
  1117. X            disabled
  1118. X        },
  1119. X        /* [4] */
  1120. X        {9, 48, 89, 168},
  1121. X        StaticText {
  1122. X            disabled,
  1123. X            "Are you sure?"
  1124. X        },
  1125. X        /* [5] */
  1126. X        {8, 8, 40, 40},
  1127. X        Icon {
  1128. X            disabled,
  1129. X            0
  1130. X        }
  1131. X    }
  1132. X};
  1133. X
  1134. Xresource 'MENU' (128, "Apple") {
  1135. X    128,
  1136. X    textMenuProc,
  1137. X    0x7FFFFFFD,
  1138. X    enabled,
  1139. X    apple,
  1140. X    {    /* array: 2 elements */
  1141. X        /* [1] */
  1142. X        "About ScrnMgr\311", noIcon, "", "", plain,
  1143. X        /* [2] */
  1144. X        "-", noIcon, "", "", plain
  1145. X    }
  1146. X};
  1147. X
  1148. Xresource 'MENU' (129, "File") {
  1149. X    129,
  1150. X    textMenuProc,
  1151. X    0x7FFFFFFB,
  1152. X    enabled,
  1153. X    "File",
  1154. X    {    /* array: 4 elements */
  1155. X        /* [1] */
  1156. X        "Open", noIcon, "O", "", plain,
  1157. X        /* [2] */
  1158. X        "Close", noIcon, "W", "", plain,
  1159. X        /* [3] */
  1160. X        "-", noIcon, "", "", plain,
  1161. X        /* [4] */
  1162. X        "Quit", noIcon, "Q", "", plain
  1163. X    }
  1164. X};
  1165. X
  1166. Xresource 'MENU' (130, "Edit") {
  1167. X    130,
  1168. X    textMenuProc,
  1169. X    0x7FFFFFC0,
  1170. X    enabled,
  1171. X    "Edit",
  1172. X    {    /* array: 6 elements */
  1173. X        /* [1] */
  1174. X        "Undo", noIcon, "Z", "", plain,
  1175. X        /* [2] */
  1176. X        "-", noIcon, "", "", plain,
  1177. X        /* [3] */
  1178. X        "Cut", noIcon, "X", "", plain,
  1179. X        /* [4] */
  1180. X        "Copy", noIcon, "C", "", plain,
  1181. X        /* [5] */
  1182. X        "Paste", noIcon, "V", "", plain,
  1183. X        /* [6] */
  1184. X        "Clear", noIcon, "", "", plain
  1185. X    }
  1186. X};
  1187. X
  1188. Xresource 'MENU' (229, "File (No Keys)") {
  1189. X    129,
  1190. X    textMenuProc,
  1191. X    0x7FFFFFFB,
  1192. X    enabled,
  1193. X    "File",
  1194. X    {    /* array: 4 elements */
  1195. X        /* [1] */
  1196. X        "Open", noIcon, "", "", plain,
  1197. X        /* [2] */
  1198. X        "Close", noIcon, "", "", plain,
  1199. X        /* [3] */
  1200. X        "-", noIcon, "", "", plain,
  1201. X        /* [4] */
  1202. X        "Quit", noIcon, "", "", plain
  1203. X    }
  1204. X};
  1205. X
  1206. Xresource 'MENU' (230, "Edit (No Keys)") {
  1207. X    130,
  1208. X    textMenuProc,
  1209. X    0x7FFFFFC0,
  1210. X    enabled,
  1211. X    "Edit",
  1212. X    {    /* array: 6 elements */
  1213. X        /* [1] */
  1214. X        "Undo", noIcon, "", "", plain,
  1215. X        /* [2] */
  1216. X        "-", noIcon, "", "", plain,
  1217. X        /* [3] */
  1218. X        "Cut", noIcon, "", "", plain,
  1219. X        /* [4] */
  1220. X        "Copy", noIcon, "", "", plain,
  1221. X        /* [5] */
  1222. X        "Paste", noIcon, "", "", plain,
  1223. X        /* [6] */
  1224. X        "Clear", noIcon, "", "", plain
  1225. X    }
  1226. X};
  1227. X
  1228. Xresource 'MENU' (131, "Screen") {
  1229. X    131,
  1230. X    textMenuProc,
  1231. X    0x7FFFFFFD,
  1232. X    enabled,
  1233. X    "Screen",
  1234. X    {    /* array: 2 elements */
  1235. X        /* [1] */
  1236. X        "Colors\311", noIcon, "", "", plain,
  1237. X        /* [2] */
  1238. X        "-", noIcon, "", "", plain,
  1239. X    }
  1240. X};
  1241. X
  1242. Xresource 'MENU' (132, "FontSize") {
  1243. X    132,
  1244. X    textMenuProc,
  1245. X    allEnabled,
  1246. X    enabled,
  1247. X    "FontSize",
  1248. X    {    /* array: 0 elements */
  1249. X    }
  1250. X};
  1251. X
  1252. Xresource 'MBAR' (128, "Main Menu") {
  1253. X    {    /* array MenuArray: 3 elements */
  1254. X        /* [1] */
  1255. X        128,
  1256. X        /* [2] */
  1257. X        129,
  1258. X        /* [3] */
  1259. X        130
  1260. X    }
  1261. X};
  1262. X
  1263. Xresource 'MBAR' (228, "Main Menu (No Keys)") {
  1264. X    {    /* array MenuArray: 3 elements */
  1265. X        /* [1] */
  1266. X        128,
  1267. X        /* [2] */
  1268. X        229,
  1269. X        /* [3] */
  1270. X        230
  1271. X    }
  1272. X};
  1273. X
  1274. Xresource 'INFO' (1, "Screen Info") {
  1275. X    { 50, 10, 250, 310 },
  1276. X    9,
  1277. X    black,
  1278. X    white
  1279. X};
  1280. END_OF_FILE
  1281. if test 8279 -ne `wc -c <'mac/scrnmgr/ScrnMgr.r'`; then
  1282.     echo shar: \"'mac/scrnmgr/ScrnMgr.r'\" unpacked with wrong size!
  1283. fi
  1284. # end of 'mac/scrnmgr/ScrnMgr.r'
  1285. fi
  1286. if test -f 'source/potions.c' -a "${1}" != "-c" ; then 
  1287.   echo shar: Will not clobber existing file \"'source/potions.c'\"
  1288. else
  1289. echo shar: Extracting \"'source/potions.c'\" \(8512 characters\)
  1290. sed "s/^X//" >'source/potions.c' <<'END_OF_FILE'
  1291. X/* source/potions.c: code for potions
  1292. X
  1293. X   Copyright (c) 1989-92 James E. Wilson, Robert A. Koeneke
  1294. X
  1295. X   This software may be copied and distributed for educational, research, and
  1296. X   not for profit purposes provided that this copyright and statement are
  1297. X   included in all such copies. */
  1298. X
  1299. X#include "config.h"
  1300. X#include "constant.h"
  1301. X#include "types.h"
  1302. X#include "externs.h"
  1303. X
  1304. X#ifdef USG
  1305. X#include <string.h>
  1306. X#else
  1307. X#include <strings.h>
  1308. X#endif
  1309. X
  1310. X/* Potions for the quaffing                -RAK-    */
  1311. Xvoid quaff()
  1312. X{
  1313. X  int32u i, l;
  1314. X  int j, k, item_val;
  1315. X  int ident;
  1316. X  register inven_type *i_ptr;
  1317. X  register struct misc *m_ptr;
  1318. X  register struct flags *f_ptr;
  1319. X#if 0
  1320. X  /* used by ifdefed out learn_spell potion */
  1321. X  register class_type *c_ptr;
  1322. X#endif
  1323. X
  1324. X  free_turn_flag = TRUE;
  1325. X  if (inven_ctr == 0)
  1326. X    msg_print("But you are not carrying anything.");
  1327. X  else if (!find_range(TV_POTION1, TV_POTION2, &j, &k))
  1328. X    msg_print("You are not carrying any potions.");
  1329. X  else if (get_item(&item_val, "Quaff which potion?", j, k, CNIL, CNIL))
  1330. X    {
  1331. X      i_ptr = &inventory[item_val];
  1332. X      i = i_ptr->flags;
  1333. X      free_turn_flag = FALSE;
  1334. X      ident = FALSE;
  1335. X      if (i == 0)
  1336. X    {
  1337. X      msg_print ("You feel less thirsty.");
  1338. X      ident = TRUE;
  1339. X    }
  1340. X      else while (i != 0)
  1341. X    {
  1342. X      j = bit_pos(&i) + 1;
  1343. X      if (i_ptr->tval == TV_POTION2)
  1344. X        j += 32;
  1345. X      /* Potions                        */
  1346. X      switch(j)
  1347. X        {
  1348. X        case 1:
  1349. X          if (inc_stat (A_STR))
  1350. X        {
  1351. X          msg_print("Wow!  What bulging muscles!");
  1352. X          ident = TRUE;
  1353. X        }
  1354. X          break;
  1355. X        case 2:
  1356. X          ident = TRUE;
  1357. X          lose_str();
  1358. X          break;
  1359. X        case 3:
  1360. X          if (res_stat (A_STR))
  1361. X        {
  1362. X          msg_print("You feel warm all over.");
  1363. X          ident = TRUE;
  1364. X        }
  1365. X          break;
  1366. X        case 4:
  1367. X          if (inc_stat (A_INT))
  1368. X        {
  1369. X          msg_print("Aren't you brilliant!");
  1370. X          ident = TRUE;
  1371. X        }
  1372. X          break;
  1373. X        case 5:
  1374. X          ident = TRUE;
  1375. X          lose_int();
  1376. X          break;
  1377. X        case 6:
  1378. X          if (res_stat (A_INT))
  1379. X        {
  1380. X          msg_print("You have have a warm feeling.");
  1381. X          ident = TRUE;
  1382. X        }
  1383. X          break;
  1384. X        case 7:
  1385. X          if (inc_stat (A_WIS))
  1386. X        {
  1387. X          msg_print("You suddenly have a profound thought!");
  1388. X          ident = TRUE;
  1389. X        }
  1390. X          break;
  1391. X        case 8:
  1392. X          ident = TRUE;
  1393. X          lose_wis();
  1394. X          break;
  1395. X        case 9:
  1396. X          if (res_stat (A_WIS))
  1397. X        {
  1398. X          msg_print("You feel your wisdom returning.");
  1399. X          ident = TRUE;
  1400. X        }
  1401. X          break;
  1402. X        case 10:
  1403. X          if (inc_stat (A_CHR))
  1404. X        {
  1405. X          msg_print("Gee, ain't you cute!");
  1406. X          ident = TRUE;
  1407. X        }
  1408. X          break;
  1409. X        case 11:
  1410. X          ident = TRUE;
  1411. X          lose_chr();
  1412. X          break;
  1413. X        case 12:
  1414. X          if (res_stat (A_CHR))
  1415. X        {
  1416. X          msg_print("You feel your looks returning.");
  1417. X          ident = TRUE;
  1418. X        }
  1419. X          break;
  1420. X        case 13:
  1421. X          ident = hp_player(damroll(2, 7));
  1422. X          break;
  1423. X        case 14:
  1424. X          ident = hp_player(damroll(4, 7));
  1425. X          break;
  1426. X        case 15:
  1427. X          ident = hp_player(damroll(6, 7));
  1428. X          break;
  1429. X        case 16:
  1430. X          ident = hp_player(1000);
  1431. X          break;
  1432. X        case 17:
  1433. X          if (inc_stat (A_CON))
  1434. X        {
  1435. X          msg_print("You feel tingly for a moment.");
  1436. X          ident = TRUE;
  1437. X        }
  1438. X          break;
  1439. X        case 18:
  1440. X          m_ptr = &py.misc;
  1441. X          if (m_ptr->exp < MAX_EXP)
  1442. X        {
  1443. X          l = (m_ptr->exp / 2) + 10;
  1444. X          if (l > 100000L)  l = 100000L;
  1445. X          m_ptr->exp += l;
  1446. X          msg_print("You feel more experienced.");
  1447. X          prt_experience();
  1448. X          ident = TRUE;
  1449. X        }
  1450. X          break;
  1451. X        case 19:
  1452. X          f_ptr = &py.flags;
  1453. X          if (!f_ptr->free_act)
  1454. X        {
  1455. X          /* paralysis must == 0, otherwise could not drink potion */
  1456. X          msg_print("You fall asleep.");
  1457. X          f_ptr->paralysis += randint(4) + 4;
  1458. X          ident = TRUE;
  1459. X        }
  1460. X          break;
  1461. X        case 20:
  1462. X          f_ptr = &py.flags;
  1463. X          if (f_ptr->blind == 0)
  1464. X        {
  1465. X          msg_print("You are covered by a veil of darkness.");
  1466. X          ident = TRUE;
  1467. X        }
  1468. X          f_ptr->blind += randint(100) + 100;
  1469. X          break;
  1470. X        case 21:
  1471. X          f_ptr = &py.flags;
  1472. X          if (f_ptr->confused == 0)
  1473. X        {
  1474. X          msg_print("Hey!  This is good stuff!  * Hick! *");
  1475. X          ident = TRUE;
  1476. X        }
  1477. X          f_ptr->confused += randint(20) + 12;
  1478. X          break;
  1479. X        case 22:
  1480. X          f_ptr = &py.flags;
  1481. X          if (f_ptr->poisoned == 0)
  1482. X        {
  1483. X          msg_print("You feel very sick.");
  1484. X          ident = TRUE;
  1485. X        }
  1486. X          f_ptr->poisoned += randint(15) + 10;
  1487. X          break;
  1488. X        case 23:
  1489. X          if (py.flags.fast == 0)
  1490. X        ident = TRUE;
  1491. X          py.flags.fast += randint(25) + 15;
  1492. X          break;
  1493. X        case 24:
  1494. X          if (py.flags.slow == 0)
  1495. X        ident = TRUE;
  1496. X          py.flags.slow += randint(25) + 15;
  1497. X          break;
  1498. X        case 26:
  1499. X          if (inc_stat (A_DEX))
  1500. X        {
  1501. X          msg_print("You feel more limber!");
  1502. X          ident = TRUE;
  1503. X        }
  1504. X          break;
  1505. X        case 27:
  1506. X          if (res_stat (A_DEX))
  1507. X        {
  1508. X          msg_print("You feel less clumsy.");
  1509. X          ident = TRUE;
  1510. X        }
  1511. X          break;
  1512. X        case 28:
  1513. X          if (res_stat (A_CON))
  1514. X        {
  1515. X          msg_print("You feel your health returning!");
  1516. X          ident = TRUE;
  1517. X        }
  1518. X          break;
  1519. X        case 29:
  1520. X          ident = cure_blindness();
  1521. X          break;
  1522. X        case 30:
  1523. X          ident = cure_confusion();
  1524. X          break;
  1525. X        case 31:
  1526. X          ident = cure_poison();
  1527. X          break;
  1528. X#if 0
  1529. X        case 33:
  1530. X          /* this is no longer useful, now that there is a 'G'ain magic
  1531. X         spells command */
  1532. X          m_ptr = &py.misc;
  1533. X          c_ptr = &class[m_ptr->pclass];
  1534. X          if (c_ptr->spell == MAGE)
  1535. X        {
  1536. X          calc_spells(A_INT);
  1537. X          calc_mana(A_INT);
  1538. X        }
  1539. X          else if (c_ptr->spell == PRIEST)
  1540. X        {
  1541. X          calc_spells(A_WIS);
  1542. X          calc_mana(A_WIS);
  1543. X        }
  1544. X          else
  1545. X        {
  1546. X          /* A warrior learns something about his equipment. -CJS- */
  1547. X          inven_type *w_ptr;
  1548. X          vtype tmp_str;
  1549. X          extern char *describe_use ();
  1550. X
  1551. X          for (k = 22; k < INVEN_ARRAY_SIZE; k++)
  1552. X            {
  1553. X              w_ptr = &inventory[k];
  1554. X              if (w_ptr->tval != TV_NOTHING && enchanted (w_ptr))
  1555. X            {
  1556. X              (void) sprintf (tmp_str,
  1557. X                  "There's something about what you are %s...",
  1558. X                      describe_use(k));
  1559. X              msg_print (tmp_str);
  1560. X              add_inscribe(w_ptr, ID_MAGIK);
  1561. X              ident = TRUE;
  1562. X            }
  1563. X            }
  1564. X        }
  1565. X          break;
  1566. X#endif
  1567. X        case 34:
  1568. X          if (py.misc.exp > 0)
  1569. X        {
  1570. X          int32 m, scale;
  1571. X          msg_print("You feel your memories fade.");
  1572. X          /* Lose between 1/5 and 2/5 of your experience */
  1573. X          m = py.misc.exp / 5;
  1574. X          if (py.misc.exp > MAX_SHORT)
  1575. X            {
  1576. X              scale = MAX_LONG / py.misc.exp;
  1577. X              m += (randint((int)scale) * py.misc.exp) / (scale * 5);
  1578. X            }
  1579. X          else
  1580. X            m += randint((int)py.misc.exp) / 5;
  1581. X          lose_exp(m);
  1582. X          ident = TRUE;
  1583. X        }
  1584. X          break;
  1585. X        case 35:
  1586. X          f_ptr = &py.flags;
  1587. X          (void) cure_poison();
  1588. X          if (f_ptr->food > 150)  f_ptr->food = 150;
  1589. X          f_ptr->paralysis = 4;
  1590. X          msg_print("The potion makes you vomit!");
  1591. X          ident = TRUE;
  1592. X          break;
  1593. X        case 36:
  1594. X          if (py.flags.invuln == 0)
  1595. X        ident = TRUE;
  1596. X          py.flags.invuln += randint(10) + 10;
  1597. X          break;
  1598. X        case 37:
  1599. X          if (py.flags.hero == 0)
  1600. X        ident = TRUE;
  1601. X          py.flags.hero += randint(25) + 25;
  1602. X          break;
  1603. X        case 38:
  1604. X          if (py.flags.shero == 0)
  1605. X        ident = TRUE;
  1606. X          py.flags.shero += randint(25) + 25;
  1607. X          break;
  1608. X        case 39:
  1609. X          ident = remove_fear();
  1610. X          break;
  1611. X        case 40:
  1612. X          ident = restore_level();
  1613. X          break;
  1614. X        case 41:
  1615. X          f_ptr = &py.flags;
  1616. X          if (f_ptr->resist_heat == 0)
  1617. X        ident = TRUE;
  1618. X          f_ptr->resist_heat += randint(10) + 10;
  1619. X          break;
  1620. X        case 42:
  1621. X          f_ptr = &py.flags;
  1622. X          if (f_ptr->resist_cold == 0)
  1623. X        ident = TRUE;
  1624. X          f_ptr->resist_cold += randint(10) + 10;
  1625. X          break;
  1626. X        case 43:
  1627. X          if (py.flags.detect_inv == 0)
  1628. X        ident = TRUE;
  1629. X          detect_inv2(randint(12)+12);
  1630. X          break;
  1631. X        case 44:
  1632. X          ident = slow_poison();
  1633. X          break;
  1634. X        case 45:
  1635. X          ident = cure_poison();
  1636. X          break;
  1637. X        case 46:
  1638. X          m_ptr = &py.misc;
  1639. X          if (m_ptr->cmana < m_ptr->mana)
  1640. X        {
  1641. X          m_ptr->cmana = m_ptr->mana;
  1642. X          ident = TRUE;
  1643. X          msg_print("Your feel your head clear.");
  1644. X          prt_cmana();
  1645. X        }
  1646. X          break;
  1647. X        case 47:
  1648. X          f_ptr = &py.flags;
  1649. X          if (f_ptr->tim_infra == 0)
  1650. X        {
  1651. X          msg_print("Your eyes begin to tingle.");
  1652. X          ident = TRUE;
  1653. X        }
  1654. X          f_ptr->tim_infra += 100 + randint(100);
  1655. X          break;
  1656. X        default:
  1657. X          msg_print ("Internal error in potion()");
  1658. X          break;
  1659. X        }
  1660. X      /* End of Potions.                    */
  1661. X    }
  1662. X      if (ident)
  1663. X    {
  1664. X      if (!known1_p(i_ptr))
  1665. X        {
  1666. X          m_ptr = &py.misc;
  1667. X          /* round half-way case up */
  1668. X          m_ptr->exp += (i_ptr->level + (m_ptr->lev >> 1)) / m_ptr->lev;
  1669. X          prt_experience();
  1670. X
  1671. X          identify(&item_val);
  1672. X          i_ptr = &inventory[item_val];
  1673. X        }
  1674. X    }
  1675. X      else if (!known1_p(i_ptr))
  1676. X    sample (i_ptr);
  1677. X
  1678. X      add_food(i_ptr->p1);
  1679. X      desc_remain(item_val);
  1680. X      inven_destroy(item_val);
  1681. X    }
  1682. X}
  1683. END_OF_FILE
  1684. if test 8512 -ne `wc -c <'source/potions.c'`; then
  1685.     echo shar: \"'source/potions.c'\" unpacked with wrong size!
  1686. fi
  1687. # end of 'source/potions.c'
  1688. fi
  1689. if test -f 'unix/unix.c' -a "${1}" != "-c" ; then 
  1690.   echo shar: Will not clobber existing file \"'unix/unix.c'\"
  1691. else
  1692. echo shar: Extracting \"'unix/unix.c'\" \(8383 characters\)
  1693. sed "s/^X//" >'unix/unix.c' <<'END_OF_FILE'
  1694. X/* unix/unix.c: UNIX dependent code.                    -CJS-
  1695. X
  1696. X   Copyright (c) 1989-92 James E. Wilson, Christopher J. Stuart
  1697. X
  1698. X   This software may be copied and distributed for educational, research, and
  1699. X   not for profit purposes provided that this copyright and statement are
  1700. X   included in all such copies. */
  1701. X
  1702. X
  1703. X/* defines NULL */
  1704. X#include <stdio.h>
  1705. X/* defines CTRL */
  1706. X#include <sys/ioctl.h>
  1707. X/* defines TRUE and FALSE */
  1708. X#include <curses.h>
  1709. X
  1710. X#include "config.h"
  1711. X#include "constant.h"
  1712. X#include "types.h"
  1713. X
  1714. X#ifdef unix
  1715. X
  1716. X#if defined(SYS_V) && defined(lint)
  1717. X/* for AIX, prevent hundreds of unnecessary lint errors, must define before
  1718. X   signal.h is included */
  1719. X#define _h_IEEETRAP
  1720. Xtypedef struct { int stuff; } fpvmach;
  1721. X#endif
  1722. X
  1723. X#include <signal.h>
  1724. X
  1725. X#ifdef M_XENIX
  1726. X#include <sys/types.h>
  1727. X#include <sys/select.h>
  1728. X/* For various selects from TCP/IP.  */
  1729. X#define bzero(addr,n)    memset((char *)addr, 0, n)
  1730. X#endif
  1731. X
  1732. X#ifndef USG
  1733. X#include <sys/time.h>
  1734. X#include <sys/resource.h>
  1735. X#include <sys/types.h>
  1736. X#include <sys/param.h>
  1737. X#endif
  1738. X
  1739. X#ifdef USG
  1740. X#include <string.h>
  1741. X#if 0
  1742. X/* Used to include termio.h here, but this is unnecessary because it is
  1743. X   included in curses.h, and some systems fail when it gets included
  1744. X   twice.  */
  1745. X#include <termio.h>
  1746. X#endif
  1747. X#include <fcntl.h>
  1748. X#else
  1749. X#include <strings.h>
  1750. X#if defined(atarist) && defined(__GNUC__)
  1751. X/* doesn't have <sys/wait.h> */
  1752. X#else
  1753. X#include <sys/wait.h>
  1754. X#endif
  1755. X#endif
  1756. X
  1757. X/* This must be included after fcntl.h, which has a prototype for `open'
  1758. X   on some systems.  Otherwise, the `open' prototype conflicts with the
  1759. X   `topen' declaration.  */
  1760. X#include "externs.h"
  1761. X
  1762. X#include <pwd.h>
  1763. X#include <sys/errno.h>
  1764. X
  1765. X#ifdef USG
  1766. Xstruct passwd *getpwuid();
  1767. Xstruct passwd *getpwnam();
  1768. X#endif
  1769. X
  1770. X#if defined(SYS_V) && defined(lint)
  1771. Xstruct screen { int dumb; };
  1772. X#endif
  1773. X
  1774. X/* Fooling lint. Unfortunately, c defines all the TIO constants to be long,
  1775. X   and lint expects them to be int. Also, ioctl is sometimes called with just
  1776. X   two arguments. The following definition keeps lint happy. It may need to be
  1777. X   reset for different systems. */
  1778. X#ifdef lint
  1779. X#ifdef Pyramid
  1780. X/* Pyramid makes constants greater than 65535 into long! Gakk! -CJS- */
  1781. X/*ARGSUSED*/
  1782. X/*VARARGS2*/
  1783. Xstatic Ioctl(i, l, p) long l; char *p; { return 0; }
  1784. X#else
  1785. X/*ARGSUSED*/
  1786. X/*VARARGS2*/
  1787. Xstatic Ioctl(i, l, p) char *p; { return 0; }
  1788. X#endif
  1789. X#define ioctl        Ioctl
  1790. X#endif
  1791. X
  1792. X/* Provides for a timeout on input. Does a non-blocking read, consuming the
  1793. X   data if any, and then returns 1 if data was read, zero otherwise.
  1794. X
  1795. X   Porting:
  1796. X
  1797. X   In systems without the select call, but with a sleep for
  1798. X   fractional numbers of seconds, one could sleep for the time
  1799. X   and then check for input.
  1800. X
  1801. X   In systems which can only sleep for whole number of seconds,
  1802. X   you might sleep by writing a lot of nulls to the terminal, and
  1803. X   waiting for them to drain, or you might hack a static
  1804. X   accumulation of times to wait. When the accumulation reaches a
  1805. X   certain point, sleep for a second. There would need to be a
  1806. X   way of resetting the count, with a call made for commands like
  1807. X   run or rest. */
  1808. Xint check_input(microsec)
  1809. Xint microsec;
  1810. X{
  1811. X#if defined(USG) && !defined(M_XENIX)
  1812. X  int arg, result;
  1813. X#else
  1814. X  struct timeval tbuf;
  1815. X  int ch;
  1816. X#if defined(BSD4_3) || defined(M_XENIX)
  1817. X  fd_set smask;
  1818. X#else
  1819. X  int smask;
  1820. X#endif
  1821. X#endif
  1822. X
  1823. X  /* Return true if a read on descriptor 1 will not block. */
  1824. X#if !defined(USG) || defined(M_XENIX)
  1825. X  tbuf.tv_sec = 0;
  1826. X  tbuf.tv_usec = microsec;
  1827. X#if defined(BSD4_3) || defined(M_XENIX)
  1828. X  FD_ZERO(&smask);
  1829. X  FD_SET(fileno(stdin), &smask);
  1830. X  if (select(1, &smask, (fd_set *)0, (fd_set *)0, &tbuf) == 1)
  1831. X#else
  1832. X  smask = 1;  /* i.e. (1 << 0) */
  1833. X  if (select(1, &smask, (int *)0, (int *)0, &tbuf) == 1)
  1834. X#endif
  1835. X    {
  1836. X      ch = getch();
  1837. X      /* check for EOF errors here, select sometimes works even when EOF */
  1838. X      if (ch == -1)
  1839. X    {
  1840. X      eof_flag++;
  1841. X      return 0;
  1842. X    }
  1843. X      return 1;
  1844. X    }
  1845. X  else
  1846. X    return 0;
  1847. X#else /* SYS V code follows */
  1848. X  if (microsec != 0 && (turn & 0x7F) == 0)
  1849. X    (void) sleep (1); /* mod 128, sleep one sec every 128 turns */
  1850. X  /* Can't check for input, but can do non-blocking read, so... */
  1851. X  /* Ugh! */
  1852. X  arg = 0;
  1853. X  arg = fcntl(0, F_GETFL, arg);
  1854. X  arg |= O_NDELAY;
  1855. X  (void) fcntl(0, F_SETFL, arg);
  1856. X
  1857. X  result = getch();
  1858. X
  1859. X  arg = 0;
  1860. X  arg = fcntl(0, F_GETFL, arg);
  1861. X  arg &= ~O_NDELAY;
  1862. X  (void) fcntl(0, F_SETFL, arg);
  1863. X  if (result == -1)
  1864. X    return 0;
  1865. X  else
  1866. X    return 1;
  1867. X#endif
  1868. X}
  1869. X
  1870. X#if 0
  1871. X/* This is not used, however, this should be compared against shell_out
  1872. X   in io.c */
  1873. X
  1874. X/* A command for the operating system. Standard library function
  1875. X   'system' is unsafe, as it leaves various file descriptors
  1876. X   open. This also is very careful with signals and interrupts,
  1877. X   and does rudimentary job control, and puts the terminal back
  1878. X   in a standard mode. */
  1879. Xint system_cmd(p)
  1880. Xchar *p;
  1881. X{
  1882. X  int pgrp, pid, i, mask;
  1883. X  union wait w;
  1884. X  extern char *getenv();
  1885. X
  1886. X  mask = sigsetmask(~0);    /* No interrupts. */
  1887. X  restore_term();        /* Terminal in original state. */
  1888. X  /* Are we in the control terminal group? */
  1889. X  if (ioctl(0, TIOCGPGRP, (char *)&pgrp) < 0 || pgrp != getpgrp(0))
  1890. X    pgrp = -1;
  1891. X  pid = fork();
  1892. X  if (pid < 0)
  1893. X    {
  1894. X      (void) sigsetmask(mask);
  1895. X      moriaterm();
  1896. X      return -1;
  1897. X    }
  1898. X  if (pid == 0)
  1899. X    {
  1900. X      (void) sigsetmask(0);    /* Interrupts on. */
  1901. X      /* Transfer control terminal. */
  1902. X      if (pgrp >= 0)
  1903. X    {
  1904. X      i = getpid();
  1905. X      (void) ioctl(0, TIOCSPGRP, (char *)&i);
  1906. X      (void) setpgrp(i, i);
  1907. X    }
  1908. X      for(i = 2; i < 30; i++)
  1909. X    (void) close(i);    /* Close all but standard in and out.*/
  1910. X      (void) dup2(1, 2);    /* Make standard error as standard out. */
  1911. X      if (p == 0 || *p == 0)
  1912. X    {
  1913. X      p = getenv("SHELL");
  1914. X      if (p)
  1915. X        execl(p, p, 0);
  1916. X      execl("/bin/sh", "sh", 0);
  1917. X    }
  1918. X      else
  1919. X    execl("/bin/sh", "sh", "-c", p, 0);
  1920. X      _exit(1);
  1921. X    }
  1922. X  /* Wait for child termination. */
  1923. X  for(;;)
  1924. X    {
  1925. X      i = wait3(&w, WUNTRACED, (struct rusage *)0);
  1926. X      if (i == pid)
  1927. X    {
  1928. X      if (WIFSTOPPED(w))
  1929. X        {
  1930. X          /* Stop outselves, if child stops. */
  1931. X          (void) kill(getpid(), SIGSTOP);
  1932. X          /* Restore the control terminal, and restart subprocess. */
  1933. X          if (pgrp >= 0)
  1934. X        (void) ioctl(0, TIOCSPGRP, (char *)&pid);
  1935. X          (void) killpg(pid, SIGCONT);
  1936. X        }
  1937. X      else
  1938. X        break;
  1939. X    }
  1940. X    }
  1941. X  /* Get the control terminal back. */
  1942. X  if (pgrp >= 0)
  1943. X    (void) ioctl(0, TIOCSPGRP, (char *)&pgrp);
  1944. X  (void) sigsetmask(mask);    /* Interrupts on. */
  1945. X  moriaterm();            /* Terminal in moria mode. */
  1946. X  return 0;
  1947. X}
  1948. X#endif
  1949. X
  1950. X#ifdef USG
  1951. Xunsigned short getuid();
  1952. X#else
  1953. X#ifndef SECURE
  1954. X#ifdef BSD4_3
  1955. Xuid_t getuid();
  1956. X#else  /* other BSD versions */
  1957. Xint getuid();
  1958. X#endif
  1959. X#endif
  1960. X#endif
  1961. X
  1962. X/* Find a default user name from the system. */
  1963. Xvoid user_name(buf)
  1964. Xchar *buf;
  1965. X{
  1966. X  extern char *getlogin();
  1967. X  char pwline[256];
  1968. X  register char *p;
  1969. X
  1970. X  p = getlogin();
  1971. X  if (p && p[0])
  1972. X    (void) strcpy(buf, p);
  1973. X  else
  1974. X    {
  1975. X      (void) getpw((int)getuid(), pwline);
  1976. X      p = index(pwline, ':');
  1977. X      if (p)
  1978. X    *p = 0;
  1979. X      (void) strcpy(buf, pwline);
  1980. X    }
  1981. X  if (!buf[0])
  1982. X    (void) strcpy(buf, "X");    /* Gotta have some name */
  1983. X}
  1984. X
  1985. X/* expands a tilde at the beginning of a file name to a users home
  1986. X   directory */
  1987. Xint tilde(file, exp)
  1988. Xchar *file, *exp;
  1989. X{
  1990. X  *exp = '\0';
  1991. X  if (file)
  1992. X    {
  1993. X      if (*file == '~')
  1994. X    {
  1995. X      char user[128];
  1996. X      struct passwd *pw = NULL;
  1997. X      int i = 0;
  1998. X
  1999. X      user[0] = '\0';
  2000. X      file++;
  2001. X      while (*file != '/' && i < sizeof(user))
  2002. X        user[i++] = *file++;
  2003. X      user[i] = '\0';
  2004. X      if (i == 0)
  2005. X        {
  2006. X          char *login = (char *) getlogin();
  2007. X
  2008. X          if (login != NULL)
  2009. X        (void) strcpy (user, login);
  2010. X          else if ((pw = getpwuid(getuid())) == NULL)
  2011. X        return 0;
  2012. X        }
  2013. X      if (pw == NULL && (pw = getpwnam(user)) == NULL)
  2014. X        return 0;
  2015. X      (void) strcpy (exp, pw->pw_dir);
  2016. X    }
  2017. X      (void) strcat(exp, file);
  2018. X      return 1;
  2019. X    }
  2020. X  return 0;
  2021. X}
  2022. X
  2023. X/* undefine these so that tfopen and topen will work */
  2024. X#undef fopen
  2025. X#undef open
  2026. X
  2027. X/* open a file just as does fopen, but allow a leading ~ to specify a home
  2028. X   directory */
  2029. XFILE *tfopen(file, mode)
  2030. Xchar *file;
  2031. Xchar *mode;
  2032. X{
  2033. X  char buf[1024];
  2034. X  extern int errno;
  2035. X
  2036. X  if (tilde(file, buf))
  2037. X    return (fopen(buf, mode));
  2038. X  errno = ENOENT;
  2039. X  return NULL;
  2040. X}
  2041. X
  2042. X/* open a file just as does open, but expand a leading ~ into a home directory
  2043. X   name */
  2044. Xint topen(file, flags, mode)
  2045. Xchar *file;
  2046. Xint flags, mode;
  2047. X{
  2048. X  char buf[1024];
  2049. X  extern int errno;
  2050. X
  2051. X  if (tilde(file, buf))
  2052. X    return (open(buf, flags, mode));
  2053. X  errno = ENOENT;
  2054. X  return -1;
  2055. X}
  2056. X#endif
  2057. END_OF_FILE
  2058. if test 8383 -ne `wc -c <'unix/unix.c'`; then
  2059.     echo shar: \"'unix/unix.c'\" unpacked with wrong size!
  2060. fi
  2061. # end of 'unix/unix.c'
  2062. fi
  2063. echo shar: End of archive 33 \(of 39\).
  2064. cp /dev/null ark33isdone
  2065. MISSING=""
  2066. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 ; do
  2067.     if test ! -f ark${I}isdone ; then
  2068.     MISSING="${MISSING} ${I}"
  2069.     fi
  2070. done
  2071. if test "${MISSING}" = "" ; then
  2072.     echo You have unpacked all 39 archives.
  2073.     echo "Now run "bldfiles.sh" to build split files"
  2074.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2075. else
  2076.     echo You still need to unpack the following archives:
  2077.     echo "        " ${MISSING}
  2078. fi
  2079. ##  End of shell archive.
  2080. exit 0
  2081.