home *** CD-ROM | disk | FTP | other *** search
/ Carousel / CAROUSEL.cdr / mactosh / unix / unix_cap.sit / UNIX-CAP next >
Text File  |  1989-07-03  |  80KB  |  3,072 lines

  1.  
  2.  
  3. CAP is a set of UNIX programs from Columbia University that allow UNIX machines
  4. to act as AppleShare file servers and LaserWriter spoolers.  It also provides
  5. a set of libraries for programmer to write their own AppleTalk applications.
  6. CAP requires a Kinetic FastPath running the KIP code from Stanford or the
  7. K-Star code from Kinetics, which both encapsulate the AppleTalk packets in
  8. UDP before putting them on the ethernet.
  9.  
  10. Here are a bunch of useful patches to the CAP 5.0 software.  Here is what the
  11. included README says:
  12.  
  13. 1) In AUFS, #ifdef SIZESERVER lines that allow 4.3BSD systems to show volume
  14. info (previously distributed as sizeserver.shar; needs additional code to
  15. use this).
  16.  
  17. 2) In AUFS, #ifdef NOCASEMATCH lines that fixes the case sensitivity of UNIX
  18. (Mac filesystems are case-insensitive).  There is some performance degradation,
  19. especially when the filename to search for has modified case, like the way
  20. HyperCard 1.2.1 changes the case of letters in a stack name.
  21.  
  22. 3) CAP now compilies under GCC.  Various changes were made to fix incompatibil-
  23. ities with the preprocessors, as well as to silence various warning messages.
  24. The -DGNUCC flags needs to be given to the compiler.
  25.  
  26. 4) On NeXT machines (with GCC), Configure has been modified so that "next" can
  27. be given as an OS type.  It automatically adds -DGNUCC to the C compilier
  28. flags.  (I don't know how to detect a NeXT machine in the Configure script,
  29. especially since the entire filesystem may change between 0.8 and 0.9.)
  30.  
  31. 5) Various minor code enhancements, with no change in functionality.
  32.  
  33. Edward Moy                Principal Programmer - Macintosh & Unix
  34. Workstation Support Services        Workstation Software Support Group
  35. University of California
  36. Berkeley, CA  94720
  37.  
  38. edmoy@violet.Berkeley.EDU
  39. ucbvax!violet!edmoy
  40. ----------- cut --------------------- cut ------------------ cut ------------
  41. #! /bin/sh
  42. # This is a shell archive, meaning:
  43. # 1. Remove everything above the #! /bin/sh line.
  44. # 2. Save the resulting text in a file.
  45. # 3. Execute the file with /bin/sh (not csh) to create the files:
  46. #    README
  47. #    Configure.diff
  48. #    abasp.c.diff
  49. #    abatp.c.diff
  50. #    abkip.c.diff
  51. #    afpc.c.diff
  52. #    afpcmd.h.diff
  53. #    afpdid.c.diff
  54. #    afpdir.c.diff
  55. #    afpdt.c.diff
  56. #    afpos.c.diff
  57. #    afposenum.c.diff
  58. #    afposfi.c.diff
  59. #    afps.h.diff
  60. #    afpserver.c.diff
  61. #    atalkdbm.c.diff
  62. #    atis.c.diff
  63. #    papof.c.diff
  64. # CAP patches - archive created: Thu Feb  9 21:21:27 PST 1989
  65. if test -f README
  66. then
  67.     echo shar: will not overwrite existing file "'README'"
  68. else
  69. echo 'x - README'
  70. cat << \RAZZLE!DAZZLE > README
  71. The patches included in this distribution contain the following:
  72.  
  73. 1) In AUFS, #ifdef SIZESERVER lines that allow 4.3BSD systems to show volume
  74. info (previously distributed as sizeserver.shar; needs additional code to
  75. use this).
  76.  
  77. 2) In AUFS, #ifdef NOCASEMATCH lines that fixes the case sensitivity of UNIX
  78. (Mac filesystems are case-insensitive).  There is some performance degradation,
  79. especially when the filename to search for has modified case, like the way
  80. HyperCard 1.2.1 changes the case of letters in a stack name.
  81.  
  82. 3) CAP now compilies under GCC.  Various changes were made to fix incompatibil-
  83. ities with the preprocessors, as well as to silence various warning messages.
  84. The -DGNUCC flags needs to be given to the compiler.
  85.  
  86. 4) On NeXT machines (with GCC), Configure has been modified so that "next" can
  87. be given as an OS type.  It automatically adds -DGNUCC to the C compilier
  88. flags.  (I don't know how to detect a NeXT machine in the Configure script,
  89. especially since the entire filesystem may change between 0.8 and 0.9.)
  90.  
  91. 5) Various minor code enhancements, with no change in functionality.
  92.  
  93. Edward Moy                Principal Programmer - Macintosh & Unix
  94. Workstation Support Services        Workstation Software Support Group
  95. University of California
  96. Berkeley, CA  94720
  97.  
  98. edmoy@violet.Berkeley.EDU
  99. ucbvax!violet!edmoy
  100. RAZZLE!DAZZLE
  101. fi    # End README
  102. if test -f Configure.diff
  103. then
  104.     echo shar: will not overwrite existing file "'Configure.diff'"
  105. else
  106. echo 'x - Configure.diff'
  107. cat << \RAZZLE!DAZZLE > Configure.diff
  108. *** Configure.orig    Thu Feb  9 21:01:00 1989
  109. --- Configure    Thu Feb  9 21:01:50 1989
  110. ***************
  111. *** 141,146
  112.       "aux") valid=1;;
  113.       "pyr") valid=1;;
  114.       "sunos") valid=1;;
  115.       "?"|*)
  116.           if [ "${os}" != "?" ]; then
  117.               echo "unknown type ${os}, valid are:"
  118.  
  119. --- 141,147 -----
  120.       "aux") valid=1;;
  121.       "pyr") valid=1;;
  122.       "sunos") valid=1;;
  123. +     "next") valid=1;;
  124.       "?"|*)
  125.           if [ "${os}" != "?" ]; then
  126.               echo "unknown type ${os}, valid are:"
  127. ***************
  128. *** 152,157
  129.           echo "    aux - A/UX";
  130.           echo "    pyr - pyramid";
  131.           echo "    sunos - suns";
  132.        ;;
  133.     esac
  134.   done
  135.  
  136. --- 153,159 -----
  137.           echo "    aux - A/UX";
  138.           echo "    pyr - pyramid";
  139.           echo "    sunos - suns";
  140. +         echo "    next - NeXT/MACH";
  141.        ;;
  142.     esac
  143.   done
  144. ***************
  145. *** 299,304
  146.   #   "aux" - A/UX
  147.   #   "pyr" - pyramid (in BSD universe)
  148.   #   "sunos" - SunOS
  149.   # Warning: hpux, pyr are hardcoded in some of the makefiles (sorry)
  150.   
  151.   # MAJOR CONFIGURATION
  152.  
  153. --- 301,307 -----
  154.   #   "aux" - A/UX
  155.   #   "pyr" - pyramid (in BSD universe)
  156.   #   "sunos" - SunOS
  157. + #   "next" - NeXT/MACH
  158.   # Warning: hpux, pyr are hardcoded in some of the makefiles (sorry)
  159.   
  160.   # MAJOR CONFIGURATION
  161. ***************
  162. *** 448,453
  163.           os,[hpux],[HP-UX (for 9000 series)],
  164.           os,[bsd],[Standard BSD],
  165.           os,[pyr],[Pyramid in BSD universe],
  166.           [Unknown]))
  167.   define([cflags],ifdef([selfdefinetypes],[-O -D_TYPES],[-O]))
  168.   define([bigcflags],ifelse(os,[hpux],[+Nd2000 +Ns2000]))
  169.  
  170. --- 451,457 -----
  171.           os,[hpux],[HP-UX (for 9000 series)],
  172.           os,[bsd],[Standard BSD],
  173.           os,[pyr],[Pyramid in BSD universe],
  174. +         os,[next],[NeXT/MACH],
  175.           [Unknown]))
  176.   define([cflags],ifdef([selfdefinetypes],[-O -D_TYPES],[-O]))
  177.   define([bigcflags],ifelse(os,[hpux],[+Nd2000 +Ns2000]))
  178. ***************
  179. *** 453,458
  180.   define([bigcflags],ifelse(os,[hpux],[+Nd2000 +Ns2000]))
  181.   ifelse(os,[pyr],[
  182.       define([cflags],concat(cflags,[ -q]))])
  183.   # was used for nbp, but found we needed more... leave in case
  184.   define([nbpflags],[])
  185.   
  186.  
  187. --- 457,464 -----
  188.   define([bigcflags],ifelse(os,[hpux],[+Nd2000 +Ns2000]))
  189.   ifelse(os,[pyr],[
  190.       define([cflags],concat(cflags,[ -q]))])
  191. + ifelse(os,[next],[
  192. +     define([cflags],concat(cflags,[ -DGNUCC]))])
  193.   # was used for nbp, but found we needed more... leave in case
  194.   define([nbpflags],[])
  195.   
  196. RAZZLE!DAZZLE
  197. fi    # End Configure.diff
  198. if test -f abasp.c.diff
  199. then
  200.     echo shar: will not overwrite existing file "'abasp.c.diff'"
  201. else
  202. echo 'x - abasp.c.diff'
  203. cat << \RAZZLE!DAZZLE > abasp.c.diff
  204. *** lib/cap/abasp.c.orig    Thu May 19 12:16:31 1988
  205. --- lib/cap/abasp.c    Fri Jan 27 14:50:59 1989
  206. ***************
  207. *** 25,33
  208.   #include "abasp.h"
  209.   
  210.   int aspInit();
  211. ! SPGetParms();
  212. ! SPInit();
  213. ! SPGetNetworkInfo();
  214.   private void handle_aspserver();
  215.   private void asp_doopensess();
  216.   private void sessopenreply();
  217.  
  218. --- 25,33 -----
  219.   #include "abasp.h"
  220.   
  221.   int aspInit();
  222. ! int SPGetParms();
  223. ! int SPInit();
  224. ! int SPGetNetworkInfo();
  225.   private void handle_aspserver();
  226.   private void asp_doopensess();
  227.   private void sessopenreply();
  228. ***************
  229. *** 31,41
  230.   private void handle_aspserver();
  231.   private void asp_doopensess();
  232.   private void sessopenreply();
  233. ! SPGetSession();
  234. ! SPCloseSession();
  235. ! SPGetRequest();
  236. ! SPCmdReply();
  237. ! SPWrtReply();
  238.   private int spreply();
  239.   SPWrtContinue();
  240.   SPNewStatus();
  241.  
  242. --- 31,41 -----
  243.   private void handle_aspserver();
  244.   private void asp_doopensess();
  245.   private void sessopenreply();
  246. ! int SPGetSession();
  247. ! int SPCloseSession();
  248. ! int SPGetRequest();
  249. ! int SPCmdReply();
  250. ! int SPWrtReply();
  251.   private int spreply();
  252.   int SPWrtContinue();
  253.   int SPNewStatus();
  254. ***************
  255. *** 37,45
  256.   SPCmdReply();
  257.   SPWrtReply();
  258.   private int spreply();
  259. ! SPWrtContinue();
  260. ! SPNewStatus();
  261. ! SPAttention();
  262.   
  263.   SPGetStatus();
  264.   SPOpenSession();
  265.  
  266. --- 37,45 -----
  267.   int SPCmdReply();
  268.   int SPWrtReply();
  269.   private int spreply();
  270. ! int SPWrtContinue();
  271. ! int SPNewStatus();
  272. ! int SPAttention();
  273.   
  274.   int SPGetStatus();
  275.   int SPOpenSession();
  276. ***************
  277. *** 41,48
  278.   SPNewStatus();
  279.   SPAttention();
  280.   
  281. ! SPGetStatus();
  282. ! SPOpenSession();
  283.   private void handle_aspclient();
  284.   SPCommand();
  285.   SPWrite();
  286.  
  287. --- 41,48 -----
  288.   int SPNewStatus();
  289.   int SPAttention();
  290.   
  291. ! int SPGetStatus();
  292. ! int SPOpenSession();
  293.   private void handle_aspclient();
  294.   int SPCommand();
  295.   int SPWrite();
  296. ***************
  297. *** 44,51
  298.   SPGetStatus();
  299.   SPOpenSession();
  300.   private void handle_aspclient();
  301. ! SPCommand();
  302. ! SPWrite();
  303.   private void asp_do_write();
  304.   
  305.   private void handle_asp_sndreq();
  306.  
  307. --- 44,51 -----
  308.   int SPGetStatus();
  309.   int SPOpenSession();
  310.   private void handle_aspclient();
  311. ! int SPCommand();
  312. ! int SPWrite();
  313.   private void asp_do_write();
  314.   
  315.   private void handle_asp_sndreq();
  316. RAZZLE!DAZZLE
  317. fi    # End abasp.c.diff
  318. if test -f abatp.c.diff
  319. then
  320.     echo shar: will not overwrite existing file "'abatp.c.diff'"
  321. else
  322. echo 'x - abatp.c.diff'
  323. cat << \RAZZLE!DAZZLE > abatp.c.diff
  324. *** lib/cap/abatp.c.orig    Thu May 19 12:16:35 1988
  325. --- lib/cap/abatp.c    Fri Jan 27 14:49:11 1989
  326. ***************
  327. *** 83,88
  328.     {(caddr_t)&atph, atpSize},    /* atp */
  329.     {(caddr_t)atpdata, atpMaxData} /* atp user data */
  330.   };
  331.   
  332.   /*
  333.    * ATPSndRequest
  334.  
  335. --- 83,90 -----
  336.     {(caddr_t)&atph, atpSize},    /* atp */
  337.     {(caddr_t)atpdata, atpMaxData} /* atp user data */
  338.   };
  339. + private delete_tcb_skt();
  340. + private int ATPWrite();
  341.   
  342.   /*
  343.    * ATPSndRequest
  344. RAZZLE!DAZZLE
  345. fi    # End abatp.c.diff
  346. if test -f abkip.c.diff
  347. then
  348.     echo shar: will not overwrite existing file "'abkip.c.diff'"
  349. else
  350. echo 'x - abkip.c.diff'
  351. cat << \RAZZLE!DAZZLE > abkip.c.diff
  352. *** lib/cap/abkip.c.orig    Thu May 19 12:16:50 1988
  353. --- lib/cap/abkip.c    Fri Jan 27 14:55:42 1989
  354. ***************
  355. *** 278,284
  356.       return(ddpSktErr);
  357.     for (i=0; i < 128; i++,ipskt++,(*skt)++) {
  358.       lsin.sin_port = htons(ipskt);
  359. !     if ((err = bind(fd, (caddr_t)&lsin, sizeof(lsin))) == 0)
  360.         break;
  361.       if (rskt != 0)        /* bind failed and wanted exact? */
  362.         return(err);        /* yes... */
  363.  
  364. --- 278,284 -----
  365.       return(ddpSktErr);
  366.     for (i=0; i < 128; i++,ipskt++,(*skt)++) {
  367.       lsin.sin_port = htons(ipskt);
  368. !     if ((err = bind(fd, (struct sockaddr *)&lsin, sizeof(lsin))) == 0)
  369.         break;
  370.       if (rskt != 0)        /* bind failed and wanted exact? */
  371.         return(err);        /* yes... */
  372. RAZZLE!DAZZLE
  373. fi    # End abkip.c.diff
  374. if test -f afpc.c.diff
  375. then
  376.     echo shar: will not overwrite existing file "'afpc.c.diff'"
  377. else
  378. echo 'x - afpc.c.diff'
  379. cat << \RAZZLE!DAZZLE > afpc.c.diff
  380. *** lib/afpc/afpc.c.orig    Thu May 19 12:17:22 1988
  381. --- lib/afpc/afpc.c    Thu Jan 26 15:36:31 1989
  382. ***************
  383. *** 286,292
  384.   {
  385.     char lbuf[sizeof(FlushPkt)+1];
  386.     int len;
  387. !   extern PackEntry ProtoFVP[];
  388.   
  389.     len = htonPackX(ProtoCFP, fv, lbuf);
  390.   
  391.  
  392. --- 286,292 -----
  393.   {
  394.     char lbuf[sizeof(FlushPkt)+1];
  395.     int len;
  396. !   extern PackEntry ProtoCFP[];
  397.   
  398.     len = htonPackX(ProtoCFP, fv, lbuf);
  399.   
  400. ***************
  401. *** 319,325
  402.     char lbuf[sizeof(GetAPPLPkt)+1];
  403.     char buf[sizeof(GetAPPLReplyPkt)+1];
  404.     int rlen, comp, len;
  405. !   extern PackEntry ProtoGAP[], ProtoGAPR[];
  406.   
  407.     len = htonPackX(ProtoGAP, gap, lbuf);
  408.     SPCommand(srn,lbuf,len,buf,sizeof(GetAPPLReplyPkt),cr,&rlen,-1,&comp);
  409.  
  410. --- 319,325 -----
  411.     char lbuf[sizeof(GetAPPLPkt)+1];
  412.     char buf[sizeof(GetAPPLReplyPkt)+1];
  413.     int rlen, comp, len;
  414. !   extern PackEntry ProtoGAP[], ProtoGAPR[], ProtoFileAttr[];
  415.   
  416.     len = htonPackX(ProtoGAP, gap, lbuf);
  417.     SPCommand(srn,lbuf,len,buf,sizeof(GetAPPLReplyPkt),cr,&rlen,-1,&comp);
  418. ***************
  419. *** 714,720
  420.   word *refnum;
  421.   dword *cr;
  422.   {
  423. !   extern PackEntry ProtoOFkP[];
  424.     byte lbuf[sizeof(OpenForkPkt)], buf[sizeof(FileDirParm)+20], *p;
  425.     int rlen, comp, len;
  426.     word bitmap;
  427.  
  428. --- 714,720 -----
  429.   word *refnum;
  430.   dword *cr;
  431.   {
  432. !   extern PackEntry ProtoOFkP[], ProtoFileAttr[];
  433.     byte lbuf[sizeof(OpenForkPkt)], buf[sizeof(FileDirParm)+20], *p;
  434.     int rlen, comp, len;
  435.     word bitmap;
  436. RAZZLE!DAZZLE
  437. fi    # End afpc.c.diff
  438. if test -f afpcmd.h.diff
  439. then
  440.     echo shar: will not overwrite existing file "'afpcmd.h.diff'"
  441. else
  442. echo 'x - afpcmd.h.diff'
  443. cat << \RAZZLE!DAZZLE > afpcmd.h.diff
  444. *** netat/afpcmd.h.orig    Thu May 19 12:16:16 1988
  445. --- netat/afpcmd.h    Fri Jan 27 12:52:44 1989
  446. ***************
  447. *** 624,629
  448.   /* Pack(pointer, type of data, scalar result field) */
  449.   #define PACK(pt,t,s)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),0}
  450.   /* Paks(pointer, type of data, array result field) */
  451.   #define PAKS(pt,t,s)       {t,(int) ((pt) 0)->s,sizeof(((pt) 0)->s),0}
  452.   /* Both require that a "type of data" field type P_BMAP be set first */
  453.   /* pakb(pointer, type of data, scalar result field, bit of bitmap */
  454.  
  455. --- 624,632 -----
  456.   /* Pack(pointer, type of data, scalar result field) */
  457.   #define PACK(pt,t,s)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),0}
  458.   /* Paks(pointer, type of data, array result field) */
  459. + #ifdef GNUCC
  460. + #define PAKS(pt,t,s)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),0}
  461. + #else GNUCC
  462.   #define PAKS(pt,t,s)       {t,(int) ((pt) 0)->s,sizeof(((pt) 0)->s),0}
  463.   #endif GNUCC
  464.   /* Both require that a "type of data" field type P_BMAP be set first */
  465. ***************
  466. *** 625,630
  467.   #define PACK(pt,t,s)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),0}
  468.   /* Paks(pointer, type of data, array result field) */
  469.   #define PAKS(pt,t,s)       {t,(int) ((pt) 0)->s,sizeof(((pt) 0)->s),0}
  470.   /* Both require that a "type of data" field type P_BMAP be set first */
  471.   /* pakb(pointer, type of data, scalar result field, bit of bitmap */
  472.   #define PAKB(pt,t,s,b)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),b}
  473.  
  474. --- 628,634 -----
  475.   #define PAKS(pt,t,s)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),0}
  476.   #else GNUCC
  477.   #define PAKS(pt,t,s)       {t,(int) ((pt) 0)->s,sizeof(((pt) 0)->s),0}
  478. + #endif GNUCC
  479.   /* Both require that a "type of data" field type P_BMAP be set first */
  480.   /* pakb(pointer, type of data, scalar result field, bit of bitmap */
  481.   #define PAKB(pt,t,s,b)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),b}
  482. ***************
  483. *** 629,634
  484.   /* pakb(pointer, type of data, scalar result field, bit of bitmap */
  485.   #define PAKB(pt,t,s,b)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),b}
  486.   /* pksb(pointer, type of data, array result field, bit of bitmap */
  487.   #define PKSB(pt,t,s,b)    {t,(int) ((pt) 0)->s,sizeof(((pt) 0)->s),b}
  488.   
  489.   /* Pack even - to mark that we should be on even boundary */
  490.  
  491. --- 633,641 -----
  492.   /* pakb(pointer, type of data, scalar result field, bit of bitmap */
  493.   #define PAKB(pt,t,s,b)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),b}
  494.   /* pksb(pointer, type of data, array result field, bit of bitmap */
  495. + #ifdef GNUCC
  496. + #define PKSB(pt,t,s,b)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),b}
  497. + #else GNUCC
  498.   #define PKSB(pt,t,s,b)    {t,(int) ((pt) 0)->s,sizeof(((pt) 0)->s),b}
  499.   #endif GNUCC
  500.   
  501. ***************
  502. *** 630,635
  503.   #define PAKB(pt,t,s,b)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),b}
  504.   /* pksb(pointer, type of data, array result field, bit of bitmap */
  505.   #define PKSB(pt,t,s,b)    {t,(int) ((pt) 0)->s,sizeof(((pt) 0)->s),b}
  506.   
  507.   /* Pack even - to mark that we should be on even boundary */
  508.   #define PACKEVEN() {P_EVEN, 0, 0, 0}
  509.  
  510. --- 637,643 -----
  511.   #define PKSB(pt,t,s,b)    {t,(int) &((pt) 0)->s,sizeof(((pt) 0)->s),b}
  512.   #else GNUCC
  513.   #define PKSB(pt,t,s,b)    {t,(int) ((pt) 0)->s,sizeof(((pt) 0)->s),b}
  514. + #endif GNUCC
  515.   
  516.   /* Pack even - to mark that we should be on even boundary */
  517.   #define PACKEVEN() {P_EVEN, 0, 0, 0}
  518. RAZZLE!DAZZLE
  519. fi    # End afpcmd.h.diff
  520. if test -f afpdid.c.diff
  521. then
  522.     echo shar: will not overwrite existing file "'afpdid.c.diff'"
  523. else
  524. echo 'x - afpdid.c.diff'
  525. cat << \RAZZLE!DAZZLE > afpdid.c.diff
  526. *** applications/aufs/afpdid.c.orig    Thu May 19 12:19:31 1988
  527. --- applications/aufs/afpdid.c    Thu Jan 26 18:19:33 1989
  528. ***************
  529. *** 85,90
  530.     int xd_idsize;            /* size of idirs array */
  531.   } ExtDir;
  532.   
  533.   /*
  534.    * nfind scans and finds whether a particular directory "dir" has a
  535.    * subdirectory by the name "nam"
  536.  
  537. --- 85,93 -----
  538.     int xd_idsize;            /* size of idirs array */
  539.   } ExtDir;
  540.   
  541. + private char *ipathstr();
  542. + private sdword NewEDirid();
  543.   /*
  544.    * nfind scans and finds whether a particular directory "dir" has a
  545.    * subdirectory by the name "nam"
  546. ***************
  547. *** 112,118
  548.   char *name;
  549.   {
  550.     IDirP dir;
  551. -   sdword NewEDirid();
  552.   
  553.     dir = (IDirP) malloc(sizeof(IDir));
  554.     dir->name = (char *) malloc((unsigned) strlen(name)+1);
  555.  
  556. --- 115,120 -----
  557.   char *name;
  558.   {
  559.     IDirP dir;
  560.   
  561.     dir = (IDirP) malloc(sizeof(IDir));
  562.     dir->name = (char *) malloc((unsigned) strlen(name)+1);
  563. ***************
  564. *** 162,168
  565.   IDirP cd;
  566.   {
  567.     static char paths[MAXPATHLEN];
  568. -   char *ipathstr();
  569.   
  570.     if (lastcd == cd)            /* same as last request? */
  571.       return(paths);            /* yes.. just return old paths */
  572.  
  573. --- 164,169 -----
  574.   IDirP cd;
  575.   {
  576.     static char paths[MAXPATHLEN];
  577.   
  578.     if (lastcd == cd)            /* same as last request? */
  579.       return(paths);            /* yes.. just return old paths */
  580. RAZZLE!DAZZLE
  581. fi    # End afpdid.c.diff
  582. if test -f afpdir.c.diff
  583. then
  584.     echo shar: will not overwrite existing file "'afpdir.c.diff'"
  585. else
  586. echo 'x - afpdir.c.diff'
  587. cat << \RAZZLE!DAZZLE > afpdir.c.diff
  588. *** applications/aufs/afpdir.c.orig    Thu May 19 12:19:33 1988
  589. --- applications/aufs/afpdir.c    Thu Jan 26 18:17:19 1989
  590. ***************
  591. *** 43,48
  592.   #include "afpntoh.h"
  593.   #include "afps.h"            /* common server header */
  594.   
  595.   /*
  596.    * OSErr FPGetDirParms(byte *p,byte *r,int *rl)
  597.    *
  598.  
  599. --- 43,50 -----
  600.   #include "afpntoh.h"
  601.   #include "afps.h"            /* common server header */
  602.   
  603. + private int EnumPack();
  604.   /*
  605.    * OSErr FPGetDirParms(byte *p,byte *r,int *rl)
  606.    *
  607. RAZZLE!DAZZLE
  608. fi    # End afpdir.c.diff
  609. if test -f afpdt.c.diff
  610. then
  611.     echo shar: will not overwrite existing file "'afpdt.c.diff'"
  612. else
  613. echo 'x - afpdt.c.diff'
  614. cat << \RAZZLE!DAZZLE > afpdt.c.diff
  615. *** applications/aufs/afpdt.c.orig    Thu May 19 12:19:36 1988
  616. --- applications/aufs/afpdt.c    Thu Jan 26 18:15:43 1989
  617. ***************
  618. *** 81,86
  619.   #define REMOVEAPPLIDB 0
  620.   #define REMOVEICONIDB 1
  621.   
  622.   /*
  623.    * PrintINode(AVLUData *node)
  624.    *
  625.  
  626. --- 81,88 -----
  627.   #define REMOVEAPPLIDB 0
  628.   #define REMOVEICONIDB 1
  629.   
  630. + private ReadIDesk(), ReadADesk();
  631.   /*
  632.    * PrintINode(AVLUData *node)
  633.    *
  634. RAZZLE!DAZZLE
  635. fi    # End afpdt.c.diff
  636. if test -f afpos.c.diff
  637. then
  638.     echo shar: will not overwrite existing file "'afpos.c.diff'"
  639. else
  640. echo 'x - afpos.c.diff'
  641. cat << \RAZZLE!DAZZLE > afpos.c.diff
  642. *** applications/aufs/afpos.c.orig    Mon Jun 27 12:26:51 1988
  643. --- applications/aufs/afpos.c    Thu Jan 26 18:10:22 1989
  644. ***************
  645. *** 112,118
  646.   #  ifdef Q_GETQUOTA
  647.   #   define Q_GETDLIM Q_GETQUOTA
  648.   #  else
  649. !     You have turned on quotas and aren't using the bsd or sun quota system
  650.   #  endif /*Q_GETQUOTA*/
  651.   # endif /* Q_GETDLIM */
  652.   #endif /* USEQUOTA */
  653.  
  654. --- 112,118 -----
  655.   #  ifdef Q_GETQUOTA
  656.   #   define Q_GETDLIM Q_GETQUOTA
  657.   #  else
  658. !     /* You have turned on quotas and aren't using the bsd or sun quota system */
  659.   #  endif /*Q_GETQUOTA*/
  660.   # endif /* Q_GETDLIM */
  661.   #endif /* USEQUOTA */
  662. ***************
  663. *** 135,140
  664.   #include "afppasswd.h"            /* in case we are using privates */
  665.   #include "afposncs.h"
  666.   #include "afpgc.h"
  667.   
  668.   #ifdef MAXBSIZE
  669.   # define IOBSIZE MAXBSIZE    /* set to max buf entry size by if there */
  670.  
  671. --- 135,146 -----
  672.   #include "afppasswd.h"            /* in case we are using privates */
  673.   #include "afposncs.h"
  674.   #include "afpgc.h"
  675. + #ifdef SIZESERVER
  676. + #include <setjmp.h>
  677. + #include <signal.h>
  678. + #include <sys/socket.h>
  679. + #include "sizeserver.h"
  680. + #endif SIZESERVER
  681.   
  682.   #ifdef MAXBSIZE
  683.   # define IOBSIZE MAXBSIZE    /* set to max buf entry size by if there */
  684. ***************
  685. *** 282,287
  686.   private OSErr ItoEErr();
  687.   private int filemode();
  688.   private char *syserr();
  689.   
  690.   /*
  691.    * Enable OS Dependent functions
  692.  
  693. --- 288,296 -----
  694.   private OSErr ItoEErr();
  695.   private int filemode();
  696.   private char *syserr();
  697. + #ifdef SIZESERVER
  698. + private void getvolsize();
  699. + #endif SIZESERVER
  700.   
  701.   /*
  702.    * Enable OS Dependent functions
  703. ***************
  704. *** 545,550
  705.     char path[MAXPATHLEN];
  706.   
  707.     OSfname(path,ipdir,file,F_DATA);    /* create data fork name */
  708.   
  709.     if (DBOSI)
  710.       printf("OSDelete file=%s\n",path);
  711.  
  712. --- 554,562 -----
  713.     char path[MAXPATHLEN];
  714.   
  715.     OSfname(path,ipdir,file,F_DATA);    /* create data fork name */
  716. + #ifdef NOCASEMATCH
  717. +   noCaseMatch(path);
  718. + #endif NOCASEMATCH
  719.   
  720.     if (DBOSI)
  721.       printf("OSDelete file=%s\n",path);
  722. ***************
  723. *** 667,672
  724.   int typ;
  725.   {
  726.     char path[MAXPATHLEN];
  727.   
  728.     OSfname(path,pdir,file,typ);        /* build unix file name */
  729.     return(unix_unlink(path));        /* do the work... */
  730.  
  731. --- 679,687 -----
  732.   int typ;
  733.   {
  734.     char path[MAXPATHLEN];
  735. + #ifdef NOCASEMATCH
  736. +   register int i;
  737. + #endif NOCASEMATCH
  738.   
  739.     OSfname(path,pdir,file,typ);        /* build unix file name */
  740.   #ifdef NOCASEMATCH
  741. ***************
  742. *** 669,674
  743.     char path[MAXPATHLEN];
  744.   
  745.     OSfname(path,pdir,file,typ);        /* build unix file name */
  746.     return(unix_unlink(path));        /* do the work... */
  747.   }
  748.   
  749.  
  750. --- 684,696 -----
  751.   #endif NOCASEMATCH
  752.   
  753.     OSfname(path,pdir,file,typ);        /* build unix file name */
  754. + #ifdef NOCASEMATCH
  755. +   if((i = unix_unlink(path)) != noErr) {
  756. +     noCaseMatch(path);
  757. +     i = unix_unlink(path);
  758. +   }
  759. +   return(i);                /* do the work... */
  760. + #else NOCASEMATCH
  761.     return(unix_unlink(path));        /* do the work... */
  762.   #endif NOCASEMATCH
  763.   }
  764. ***************
  765. *** 670,675
  766.   
  767.     OSfname(path,pdir,file,typ);        /* build unix file name */
  768.     return(unix_unlink(path));        /* do the work... */
  769.   }
  770.   
  771.   
  772.  
  773. --- 692,698 -----
  774.     return(i);                /* do the work... */
  775.   #else NOCASEMATCH
  776.     return(unix_unlink(path));        /* do the work... */
  777. + #endif NOCASEMATCH
  778.   }
  779.   
  780.   
  781. ***************
  782. *** 743,748
  783.   IDirP fpdir,tpdir;            /* from and to parent dirs  */
  784.   char *from,*to;                /* from and to file names */
  785.   {
  786.     char fpath[MAXPATHLEN];
  787.     char tpath[MAXPATHLEN];
  788.     struct stat stb;
  789.  
  790. --- 766,773 -----
  791.   IDirP fpdir,tpdir;            /* from and to parent dirs  */
  792.   char *from,*to;                /* from and to file names */
  793.   {
  794. +   char f_path[MAXPATHLEN];
  795. +   char t_path[MAXPATHLEN];
  796.     char fpath[MAXPATHLEN];
  797.     char tpath[MAXPATHLEN];
  798.     struct stat stb;
  799. ***************
  800. *** 748,753
  801.     struct stat stb;
  802.     int err,cerr;
  803.     int mo;
  804.   
  805.     OSfname(fpath,fpdir,from,F_DATA);    /* build data file name */
  806.     OSfname(tpath,tpdir,to,F_DATA);    /* for from and to files */
  807.  
  808. --- 773,781 -----
  809.     struct stat stb;
  810.     int err,cerr;
  811.     int mo;
  812. + #ifdef NOCASEMATCH
  813. +   register char *pp;
  814. + #endif NOCASEMATCH
  815.   
  816.     OSfname(f_path,fpdir,from,F_DATA);    /* build data file name */
  817.     OSfname(t_path,tpdir,to,F_DATA);    /* for from and to files */
  818. ***************
  819. *** 749,756
  820.     int err,cerr;
  821.     int mo;
  822.   
  823. !   OSfname(fpath,fpdir,from,F_DATA);    /* build data file name */
  824. !   OSfname(tpath,tpdir,to,F_DATA);    /* for from and to files */
  825.   
  826.     if (DBOSI)
  827.       printf("OSRename from=%s, to=%s\n",fpath,tpath);
  828.  
  829. --- 777,784 -----
  830.     register char *pp;
  831.   #endif NOCASEMATCH
  832.   
  833. !   OSfname(f_path,fpdir,from,F_DATA);    /* build data file name */
  834. !   OSfname(t_path,tpdir,to,F_DATA);    /* for from and to files */
  835.   
  836.     if (DBOSI)
  837.       printf("OSRename from=%s, to=%s\n",f_path,t_path);
  838. ***************
  839. *** 753,759
  840.     OSfname(tpath,tpdir,to,F_DATA);    /* for from and to files */
  841.   
  842.     if (DBOSI)
  843. !     printf("OSRename from=%s, to=%s\n",fpath,tpath);
  844.   
  845.     if ((fpdir->flags & DID_FINDERINFO) && (tpdir->flags & DID_FINDERINFO) == 0)
  846.       return(aeCantMove);
  847.  
  848. --- 781,787 -----
  849.     OSfname(t_path,tpdir,to,F_DATA);    /* for from and to files */
  850.   
  851.     if (DBOSI)
  852. !     printf("OSRename from=%s, to=%s\n",f_path,t_path);
  853.   
  854.     if ((fpdir->flags & DID_FINDERINFO) && (tpdir->flags & DID_FINDERINFO) == 0)
  855.       return(aeCantMove);
  856. ***************
  857. *** 761,766
  858.       return(aeCantMove);
  859.   
  860.     /* must be able to stat destination */
  861.     if ((err = unix_stat(pathstr(tpdir), &stb)) != noErr)
  862.       return(err);
  863.     mo = filemode(stb.st_mode, stb.st_uid, stb.st_gid);
  864.  
  865. --- 789,801 -----
  866.       return(aeCantMove);
  867.   
  868.     /* must be able to stat destination */
  869. + #ifdef NOCASEMATCH
  870. +   if ((err = unix_stat(pp = pathstr(tpdir), &stb)) != noErr) {
  871. +     noCaseFind(pp);
  872. +     if ((err = unix_stat(pp, &stb)) != noErr)
  873. +       return(err);
  874. +   }
  875. + #else NOCASEMATCH
  876.     if ((err = unix_stat(pathstr(tpdir), &stb)) != noErr)
  877.       return(err);
  878.   #endif NOCASEMATCH
  879. ***************
  880. *** 763,768
  881.     /* must be able to stat destination */
  882.     if ((err = unix_stat(pathstr(tpdir), &stb)) != noErr)
  883.       return(err);
  884.     mo = filemode(stb.st_mode, stb.st_uid, stb.st_gid);
  885.   
  886.     if ((err = unix_stat(fpath,&stb)) != noErr)
  887.  
  888. --- 798,804 -----
  889.   #else NOCASEMATCH
  890.     if ((err = unix_stat(pathstr(tpdir), &stb)) != noErr)
  891.       return(err);
  892. + #endif NOCASEMATCH
  893.     mo = filemode(stb.st_mode, stb.st_uid, stb.st_gid);
  894.   
  895.   #ifdef NOCASEMATCH
  896. ***************
  897. *** 765,771
  898.       return(err);
  899.     mo = filemode(stb.st_mode, stb.st_uid, stb.st_gid);
  900.   
  901. !   if ((err = unix_stat(fpath,&stb)) != noErr)
  902.       return(err);
  903.   
  904.     err = unix_rename(fpath,tpath);    /* give unix the args */
  905.  
  906. --- 801,815 -----
  907.   #endif NOCASEMATCH
  908.     mo = filemode(stb.st_mode, stb.st_uid, stb.st_gid);
  909.   
  910. ! #ifdef NOCASEMATCH
  911. !   if ((err = unix_stat(f_path,&stb)) != noErr) {
  912. !     noCaseFind(f_path);
  913. !     if ((err = unix_stat(f_path,&stb)) != noErr)
  914. !       return(err);
  915. !   }
  916. !   noCaseMatch(t_path);
  917. ! #else NOCASEMATCH
  918. !   if ((err = unix_stat(f_path,&stb)) != noErr)
  919.       return(err);
  920.   #endif NOCASEMATCH
  921.   
  922. ***************
  923. *** 767,772
  924.   
  925.     if ((err = unix_stat(fpath,&stb)) != noErr)
  926.       return(err);
  927.   
  928.     err = unix_rename(fpath,tpath);    /* give unix the args */
  929.     if (err != noErr)            /* if an error on data files */
  930.  
  931. --- 811,817 -----
  932.   #else NOCASEMATCH
  933.     if ((err = unix_stat(f_path,&stb)) != noErr)
  934.       return(err);
  935. + #endif NOCASEMATCH
  936.   
  937.     err = unix_rename(f_path,t_path);    /* give unix the args */
  938.     if (err != noErr)            /* if an error on data files */
  939. ***************
  940. *** 768,774
  941.     if ((err = unix_stat(fpath,&stb)) != noErr)
  942.       return(err);
  943.   
  944. !   err = unix_rename(fpath,tpath);    /* give unix the args */
  945.     if (err != noErr)            /* if an error on data files */
  946.       return(err);            /*  then give up */
  947.   
  948.  
  949. --- 813,819 -----
  950.       return(err);
  951.   #endif NOCASEMATCH
  952.   
  953. !   err = unix_rename(f_path,t_path);    /* give unix the args */
  954.     if (err != noErr)            /* if an error on data files */
  955.       return(err);            /*  then give up */
  956.   
  957. ***************
  958. *** 775,782
  959.     if (!S_ISDIR(stb.st_mode)) {        /* directories have no rsrc fork */
  960.       unix_chmod(tpath, mo);        /* file: try to reset protection */
  961.       if (fpdir->flags & DID_RESOURCE) {
  962. !       OSfname(fpath,fpdir,from,F_RSRC);    /* build resource file names */
  963. !       OSfname(tpath,tpdir,to,F_RSRC);
  964.         err = unix_rename(fpath,tpath);    /* give unix a shot at it */
  965.         /* allow non-existant resource */
  966.         if (err != noErr && err != aeObjectNotFound) { /* error on rename? */
  967.  
  968. --- 820,829 -----
  969.     if (!S_ISDIR(stb.st_mode)) {        /* directories have no rsrc fork */
  970.       unix_chmod(tpath, mo);        /* file: try to reset protection */
  971.       if (fpdir->flags & DID_RESOURCE) {
  972. !       strcpy(fpath, f_path);
  973. !       strcpy(tpath, t_path);
  974. !       toResFork(fpath,from);            /* build resource file names */
  975. !       toResFork(tpath,to);
  976.         err = unix_rename(fpath,tpath);    /* give unix a shot at it */
  977.         /* allow non-existant resource */
  978.         if (err != noErr && err != aeObjectNotFound) { /* error on rename? */
  979. ***************
  980. *** 783,791
  981.       if (DBOSI)
  982.         printf("os_rename: failed %s for %s -> %s\n",
  983.            afperr(err),fpath,tpath);
  984. !     OSfname(fpath,fpdir,from,F_DATA); /* try to rebuild */
  985. !     OSfname(tpath,tpdir,to,F_DATA);
  986. !     cerr = unix_rename(tpath,fpath);    /* rename back to orignal */
  987.       if (cerr != noErr && DBOSI)
  988.         printf("os_rename: cleanup failed\n");
  989.       unix_chmod(tpath, stb.st_mode&0777); /* file:try to reset protection */
  990.  
  991. --- 830,836 -----
  992.       if (DBOSI)
  993.         printf("os_rename: failed %s for %s -> %s\n",
  994.            afperr(err),fpath,tpath);
  995. !     cerr = unix_rename(t_path,f_path);    /* rename back to orignal */
  996.       if (cerr != noErr && DBOSI)
  997.         printf("os_rename: cleanup failed\n");
  998.       unix_chmod(t_path, stb.st_mode&0777); /* file:try to reset protection */
  999. ***************
  1000. *** 788,794
  1001.       cerr = unix_rename(tpath,fpath);    /* rename back to orignal */
  1002.       if (cerr != noErr && DBOSI)
  1003.         printf("os_rename: cleanup failed\n");
  1004. !     unix_chmod(tpath, stb.st_mode&0777); /* file:try to reset protection */
  1005.       return(err);
  1006.         }
  1007.       }
  1008.  
  1009. --- 833,839 -----
  1010.       cerr = unix_rename(t_path,f_path);    /* rename back to orignal */
  1011.       if (cerr != noErr && DBOSI)
  1012.         printf("os_rename: cleanup failed\n");
  1013. !     unix_chmod(t_path, stb.st_mode&0777); /* file:try to reset protection */
  1014.       return(err);
  1015.         }
  1016.       }
  1017. ***************
  1018. *** 795,802
  1019.     }  
  1020.   
  1021.     if (fpdir->flags & DID_FINDERINFO) {
  1022. !     OSfname(fpath,fpdir,from,F_FNDR);    /* build finder info file names */
  1023. !     OSfname(tpath,tpdir,to,F_FNDR);
  1024.       err = unix_rename(fpath,tpath);    /* give unix a shot at it */
  1025.       if (err != noErr && DBOSI) {
  1026.         printf("os_rename: failed %s for %s -> %s\n", afperr(err),fpath,tpath);
  1027.  
  1028. --- 840,849 -----
  1029.     }  
  1030.   
  1031.     if (fpdir->flags & DID_FINDERINFO) {
  1032. !     strcpy(fpath, f_path);
  1033. !     strcpy(tpath, t_path);
  1034. !     toFinderInfo(fpath,from);        /* build finder info file names */
  1035. !     toFinderInfo(tpath,to);
  1036.       err = unix_rename(fpath,tpath);    /* give unix a shot at it */
  1037.       if (err != noErr && DBOSI) {
  1038.         printf("os_rename: failed %s for %s -> %s\n", afperr(err),fpath,tpath);
  1039. ***************
  1040. *** 1047,1052
  1041.                       /* want path/name */
  1042.   
  1043.     OSfname(path, pdir, name, F_DATA);    /* get path/name */
  1044.     switch (typ) {
  1045.     case F_RSRC:
  1046.       strcat(path, "/");
  1047.  
  1048. --- 1094,1102 -----
  1049.                       /* want path/name */
  1050.   
  1051.     OSfname(path, pdir, name, F_DATA);    /* get path/name */
  1052. + #ifdef NOCASEMATCH
  1053. +   noCaseMatch(path);
  1054. + #endif NOCASEMATCH
  1055.     switch (typ) {
  1056.     case F_RSRC:
  1057.       strcat(path, RFDIR);
  1058. ***************
  1059. *** 1049,1056
  1060.     OSfname(path, pdir, name, F_DATA);    /* get path/name */
  1061.     switch (typ) {
  1062.     case F_RSRC:
  1063. !     strcat(path, "/");
  1064. !     strcat(path, RFDIRFN);
  1065.       break;
  1066.     case F_FNDR:
  1067.       strcat(path, "/");
  1068.  
  1069. --- 1099,1105 -----
  1070.   #endif NOCASEMATCH
  1071.     switch (typ) {
  1072.     case F_RSRC:
  1073. !     strcat(path, RFDIR);
  1074.       break;
  1075.     case F_FNDR:
  1076.       strcat(path, FIDIR);
  1077. ***************
  1078. *** 1053,1060
  1079.       strcat(path, RFDIRFN);
  1080.       break;
  1081.     case F_FNDR:
  1082. !     strcat(path, "/");
  1083. !     strcat(path, FIDIRFN);
  1084.       break;
  1085.     }
  1086.     if (DBOSI)
  1087.  
  1088. --- 1102,1108 -----
  1089.       strcat(path, RFDIR);
  1090.       break;
  1091.     case F_FNDR:
  1092. !     strcat(path, FIDIR);
  1093.       break;
  1094.     }
  1095.     if (DBOSI)
  1096. ***************
  1097. *** 1090,1095
  1098.   
  1099.     if (pdir->flags  & DID_FINDERINFO) {
  1100.       OSfname(path,pdir,name,F_FNDR);    /* create finderinfo for folder */
  1101.       err = unix_create(path,TRUE,mo);    /*  do delete if exists... */
  1102.       os_mkdir(pdir,name,mo,F_FNDR);    /* create the finderinfo directory */
  1103.     }
  1104.  
  1105. --- 1138,1146 -----
  1106.   
  1107.     if (pdir->flags  & DID_FINDERINFO) {
  1108.       OSfname(path,pdir,name,F_FNDR);    /* create finderinfo for folder */
  1109. + #ifdef NOCASEMATCH
  1110. +     noCaseMatch(path);
  1111. + #endif NOCASEMATCH
  1112.       err = unix_create(path,TRUE,mo);    /*  do delete if exists... */
  1113.       os_mkdir(pdir,name,mo,F_FNDR);    /* create the finderinfo directory */
  1114.     }
  1115. ***************
  1116. *** 1130,1135
  1117.       printf("OSFileDirInfo on %s\n",path);
  1118.   
  1119.     if (stat(path,&buf) != 0) {        /* file exists? */
  1120.       if (idir)                /* was in directory tree? */
  1121.         Idrdirid(ipdir, idir);        /* invalidate the entry then */
  1122.       return(aeObjectNotFound);        /* no... */
  1123.  
  1124. --- 1181,1194 -----
  1125.       printf("OSFileDirInfo on %s\n",path);
  1126.   
  1127.     if (stat(path,&buf) != 0) {        /* file exists? */
  1128. + #ifdef NOCASEMATCH
  1129. +     noCaseFind(path);            /* case-insensitive */
  1130. +     if (stat(path,&buf) != 0) {        /* file exists? */
  1131. +       if (idir)                /* was in directory tree? */
  1132. +         Idrdirid(ipdir, idir);        /* invalidate the entry then */
  1133. +       return(aeObjectNotFound);        /* no... */
  1134. +     }
  1135. + #else NOCASEMATCH
  1136.       if (idir)                /* was in directory tree? */
  1137.         Idrdirid(ipdir, idir);        /* invalidate the entry then */
  1138.       return(aeObjectNotFound);        /* no... */
  1139. ***************
  1140. *** 1133,1138
  1141.       if (idir)                /* was in directory tree? */
  1142.         Idrdirid(ipdir, idir);        /* invalidate the entry then */
  1143.       return(aeObjectNotFound);        /* no... */
  1144.     }
  1145.   
  1146.     /* pick out the earliest date for mac creation time */
  1147.  
  1148. --- 1192,1198 -----
  1149.       if (idir)                /* was in directory tree? */
  1150.         Idrdirid(ipdir, idir);        /* invalidate the entry then */
  1151.       return(aeObjectNotFound);        /* no... */
  1152. + #endif NOCASEMATCH
  1153.     }
  1154.   
  1155.     /* pick out the earliest date for mac creation time */
  1156. ***************
  1157. *** 1155,1161
  1158.       return(OSDirInfo(ipdir,fn,fdp,&buf,volid));    /* fill in */
  1159.     }
  1160.     fdp->fdp_flg = 0;            /* otherwise a file */
  1161. !   return(OSFileInfo(ipdir,fn,fdp,&buf)); /* fill in */
  1162.   }
  1163.   
  1164.     
  1165.  
  1166. --- 1215,1221 -----
  1167.       return(OSDirInfo(ipdir,fn,fdp,&buf,volid));    /* fill in */
  1168.     }
  1169.     fdp->fdp_flg = 0;            /* otherwise a file */
  1170. !   return(OSFileInfo(ipdir,fn,fdp,&buf,path)); /* fill in */
  1171.   }
  1172.   
  1173.     
  1174. ***************
  1175. *** 1222,1227
  1176.   IDirP idirid;
  1177.   {
  1178.     char path[MAXPATHLEN];
  1179.     struct stat stb;
  1180.     IDirP pdir;
  1181.     int i;
  1182.  
  1183. --- 1282,1288 -----
  1184.   IDirP idirid;
  1185.   {
  1186.     char path[MAXPATHLEN];
  1187. +   char p_ath[MAXPATHLEN];
  1188.     struct stat stb;
  1189.     IDirP pdir;
  1190.     int i;
  1191. ***************
  1192. *** 1226,1233
  1193.     IDirP pdir;
  1194.     int i;
  1195.   
  1196. !   OSfname(path,idirid,"",F_DATA);
  1197. !   if (stat(path, &stb) == 0) {
  1198.       if (S_ISDIR(stb.st_mode))
  1199.         idirid->flags |= DID_DATA;
  1200.   #ifndef NOLSTAT
  1201.  
  1202. --- 1287,1301 -----
  1203.     IDirP pdir;
  1204.     int i;
  1205.   
  1206. !   OSfname(p_ath,idirid,"",F_DATA);
  1207. !   i = stat(p_ath, &stb);
  1208. ! #ifdef NOCASEMATCH
  1209. !   if(i != 0) {
  1210. !     noCaseFind(p_ath);
  1211. !     i = stat(p_ath, &stb);
  1212. !   }
  1213. ! #endif NOCASEMATCH
  1214. !   if (i == 0) {
  1215.       if (S_ISDIR(stb.st_mode))
  1216.         idirid->flags |= DID_DATA;
  1217.   #ifndef NOLSTAT
  1218. ***************
  1219. *** 1231,1237
  1220.       if (S_ISDIR(stb.st_mode))
  1221.         idirid->flags |= DID_DATA;
  1222.   #ifndef NOLSTAT
  1223. !     if (lstat(path, &stb) != 0) { /* shouldn't fail! */
  1224.         idirid->flags = DID_VALID;
  1225.         return;
  1226.       }
  1227.  
  1228. --- 1299,1305 -----
  1229.       if (S_ISDIR(stb.st_mode))
  1230.         idirid->flags |= DID_DATA;
  1231.   #ifndef NOLSTAT
  1232. !     if (lstat(p_ath, &stb) != 0) { /* shouldn't fail! */
  1233.         idirid->flags = DID_VALID;
  1234.         return;
  1235.       }
  1236. ***************
  1237. *** 1249,1256
  1238.         idirid->flags |= ((i << DID_SYMLINKS_SHIFT) & DID_SYMLINKS);
  1239.       }
  1240.       /* don't follow symbolic links here! */
  1241. !     OSfname(path,idirid,"",F_FNDR);
  1242. !     if (lstat(path, &stb) == 0) 
  1243.         if (S_ISDIR(stb.st_mode))
  1244.       idirid->flags |= DID_FINDERINFO;
  1245.       OSfname(path,idirid,"",F_RSRC);
  1246.  
  1247. --- 1317,1325 -----
  1248.         idirid->flags |= ((i << DID_SYMLINKS_SHIFT) & DID_SYMLINKS);
  1249.       }
  1250.       /* don't follow symbolic links here! */
  1251. !     strcpy(path,p_ath);
  1252. !     toFinderInfo(path,"");
  1253. !     if (lstat(path, &stb) == 0)
  1254.         if (S_ISDIR(stb.st_mode))
  1255.       idirid->flags |= DID_FINDERINFO;
  1256.       strcpy(path,p_ath);
  1257. ***************
  1258. *** 1253,1260
  1259.       if (lstat(path, &stb) == 0) 
  1260.         if (S_ISDIR(stb.st_mode))
  1261.       idirid->flags |= DID_FINDERINFO;
  1262. !     OSfname(path,idirid,"",F_RSRC);
  1263. !     if (lstat(path, &stb) == 0)  
  1264.         if (S_ISDIR(stb.st_mode))
  1265.       idirid->flags |= DID_RESOURCE;
  1266.   #else
  1267.  
  1268. --- 1322,1330 -----
  1269.       if (lstat(path, &stb) == 0)
  1270.         if (S_ISDIR(stb.st_mode))
  1271.       idirid->flags |= DID_FINDERINFO;
  1272. !     strcpy(path,p_ath);
  1273. !     toResFork(path,"");
  1274. !     if (lstat(path, &stb) == 0)
  1275.         if (S_ISDIR(stb.st_mode))
  1276.       idirid->flags |= DID_RESOURCE;
  1277.   #else
  1278. ***************
  1279. *** 1259,1266
  1280.       idirid->flags |= DID_RESOURCE;
  1281.   #else
  1282.       /* no symolic links then */
  1283. !     OSfname(path,idirid,"",F_FNDR);
  1284. !     if (stat(path, &stb) == 0) 
  1285.         if (S_ISDIR(stb.st_mode))
  1286.       idirid->flags |= DID_FINDERINFO;
  1287.       OSfname(path,idirid,"",F_RSRC);
  1288.  
  1289. --- 1329,1337 -----
  1290.       idirid->flags |= DID_RESOURCE;
  1291.   #else
  1292.       /* no symolic links then */
  1293. !     strcpy(path,p_ath);
  1294. !     toFinderInfo(path,"");
  1295. !     if (stat(path, &stb) == 0)
  1296.         if (S_ISDIR(stb.st_mode))
  1297.       idirid->flags |= DID_FINDERINFO;
  1298.       strcpy(path,p_ath);
  1299. ***************
  1300. *** 1263,1270
  1301.       if (stat(path, &stb) == 0) 
  1302.         if (S_ISDIR(stb.st_mode))
  1303.       idirid->flags |= DID_FINDERINFO;
  1304. !     OSfname(path,idirid,"",F_RSRC);
  1305. !     if (stat(path, &stb) == 0)  
  1306.         if (S_ISDIR(stb.st_mode))
  1307.       idirid->flags |= DID_RESOURCE;
  1308.   #endif
  1309.  
  1310. --- 1334,1342 -----
  1311.       if (stat(path, &stb) == 0)
  1312.         if (S_ISDIR(stb.st_mode))
  1313.       idirid->flags |= DID_FINDERINFO;
  1314. !     strcpy(path,p_ath);
  1315. !     toResFork(path,"");
  1316. !     if (stat(path, &stb) == 0)
  1317.         if (S_ISDIR(stb.st_mode))
  1318.       idirid->flags |= DID_RESOURCE;
  1319.   #endif
  1320. ***************
  1321. *** 1273,1279
  1322.   }
  1323.   
  1324.   export OSErr
  1325. ! OSFileInfo(ipdir,fn,fdp,buf)
  1326.   IDirP ipdir;
  1327.   char *fn;
  1328.   FileDirParm *fdp;
  1329.  
  1330. --- 1345,1351 -----
  1331.   }
  1332.   
  1333.   export OSErr
  1334. ! OSFileInfo(ipdir,fn,fdp,buf,rpath)
  1335.   IDirP ipdir;
  1336.   char *fn,*rpath;
  1337.   FileDirParm *fdp;
  1338. ***************
  1339. *** 1275,1281
  1340.   export OSErr
  1341.   OSFileInfo(ipdir,fn,fdp,buf)
  1342.   IDirP ipdir;
  1343. ! char *fn;
  1344.   FileDirParm *fdp;
  1345.   struct stat *buf;
  1346.   {
  1347.  
  1348. --- 1347,1353 -----
  1349.   export OSErr
  1350.   OSFileInfo(ipdir,fn,fdp,buf,rpath)
  1351.   IDirP ipdir;
  1352. ! char *fn,*rpath;
  1353.   FileDirParm *fdp;
  1354.   struct stat *buf;
  1355.   {
  1356. ***************
  1357. *** 1280,1286
  1358.   struct stat *buf;
  1359.   {
  1360.     struct stat stb;
  1361. -   char rpath[MAXPATHLEN];
  1362.     word bm;
  1363.   
  1364.     fdp->fdp_fbitmap &= FP_AUFS_VALID; /* truncate to aufs supported */
  1365.  
  1366. --- 1352,1357 -----
  1367.   struct stat *buf;
  1368.   {
  1369.     struct stat stb;
  1370.     word bm;
  1371.   
  1372.     fdp->fdp_fbitmap &= FP_AUFS_VALID; /* truncate to aufs supported */
  1373. ***************
  1374. *** 1300,1306
  1375.     fdp->fdp_parms.fp_parms.fp_rflen = 0;
  1376.   
  1377.     if (bm & FP_RFLEN) {
  1378. !     OSfname(rpath,ipdir,fn,F_RSRC);    /* convert to rsrc name */
  1379.       if (stat(rpath,&stb) != 0)        /* to figure size of resource fork */
  1380.         return(noErr);
  1381.       if (DBFIL)
  1382.  
  1383. --- 1371,1377 -----
  1384.     fdp->fdp_parms.fp_parms.fp_rflen = 0;
  1385.   
  1386.     if (bm & FP_RFLEN) {
  1387. !     toResFork(rpath,fn);        /* convert to rsrc name */
  1388.       if (stat(rpath,&stb) != 0)        /* to figure size of resource fork */
  1389.         return(noErr);
  1390.       if (DBFIL)
  1391. ***************
  1392. *** 1322,1327
  1393.   {
  1394.     char path[MAXPATHLEN];  
  1395.     struct stat stb;
  1396.   
  1397.     OSfname(path, ipdir, fn, type);
  1398.     return(unix_stat(path, &stb));
  1399.  
  1400. --- 1393,1401 -----
  1401.   {
  1402.     char path[MAXPATHLEN];  
  1403.     struct stat stb;
  1404. + #ifdef NOCASEMATCH
  1405. +   register int i;
  1406. + #endif NOCASEMATCH
  1407.   
  1408.     OSfname(path, ipdir, fn, type);
  1409.   #ifdef NOCASEMATCH
  1410. ***************
  1411. *** 1324,1329
  1412.     struct stat stb;
  1413.   
  1414.     OSfname(path, ipdir, fn, type);
  1415.     return(unix_stat(path, &stb));
  1416.   }
  1417.   
  1418.  
  1419. --- 1398,1410 -----
  1420.   #endif NOCASEMATCH
  1421.   
  1422.     OSfname(path, ipdir, fn, type);
  1423. + #ifdef NOCASEMATCH
  1424. +   if((i = unix_stat(path, &stb)) != noErr) {
  1425. +     noCaseFind(path);
  1426. +     i = unix_stat(path, &stb);
  1427. +   }
  1428. +   return(i);
  1429. + #else NOCASEMATCH
  1430.     return(unix_stat(path, &stb));
  1431.   #endif NOCASEMATCH
  1432.   }
  1433. ***************
  1434. *** 1325,1330
  1435.   
  1436.     OSfname(path, ipdir, fn, type);
  1437.     return(unix_stat(path, &stb));
  1438.   }
  1439.   
  1440.   export OSErr
  1441.  
  1442. --- 1406,1412 -----
  1443.     return(i);
  1444.   #else NOCASEMATCH
  1445.     return(unix_stat(path, &stb));
  1446. + #endif NOCASEMATCH
  1447.   }
  1448.   
  1449.   export OSErr
  1450. ***************
  1451. *** 1340,1345
  1452.   
  1453.     OSfname(path,ipdir,fn,F_DATA);    /* unix file name */
  1454.     if ((err = unix_stat(path,&stb)) != noErr) {
  1455.       /* can't find it !!! */
  1456.       if (idir)
  1457.         Idrdirid(ipdir, idir);        /* remove from tree */
  1458.  
  1459. --- 1422,1436 -----
  1460.   
  1461.     OSfname(path,ipdir,fn,F_DATA);    /* unix file name */
  1462.     if ((err = unix_stat(path,&stb)) != noErr) {
  1463. + #ifdef NOCASEMATCH
  1464. +     noCaseFind(path);
  1465. +     if ((err = unix_stat(path,&stb)) != noErr) {
  1466. +       /* can't find it !!! */
  1467. +       if (idir)
  1468. +         Idrdirid(ipdir, idir);        /* remove from tree */
  1469. +       return(err);
  1470. +     }
  1471. + #else NOCASEMATCH
  1472.       /* can't find it !!! */
  1473.       if (idir)
  1474.         Idrdirid(ipdir, idir);        /* remove from tree */
  1475. ***************
  1476. *** 1344,1349
  1477.       if (idir)
  1478.         Idrdirid(ipdir, idir);        /* remove from tree */
  1479.       return(err);
  1480.     }
  1481.   
  1482.     if (S_ISDIR(stb.st_mode))        /* if a directory */
  1483.  
  1484. --- 1435,1441 -----
  1485.       if (idir)
  1486.         Idrdirid(ipdir, idir);        /* remove from tree */
  1487.       return(err);
  1488. + #endif NOCASEMATCH
  1489.     }
  1490.   
  1491.     if (S_ISDIR(stb.st_mode))        /* if a directory */
  1492. ***************
  1493. *** 1378,1383
  1494.   FileDirParm *fdp;
  1495.   {
  1496.     u_short EtoIAccess();
  1497.     char path[MAXPATHLEN];
  1498.     int own,grp,err;            /* owner and group ids */
  1499.     DirParm *dp = &fdp->fdp_parms.dp_parms;
  1500.  
  1501. --- 1470,1476 -----
  1502.   FileDirParm *fdp;
  1503.   {
  1504.     u_short EtoIAccess();
  1505. +   char p_ath[MAXPATHLEN];
  1506.     char path[MAXPATHLEN];
  1507.     int own,grp,err;            /* owner and group ids */
  1508.     DirParm *dp = &fdp->fdp_parms.dp_parms;
  1509. ***************
  1510. *** 1395,1402
  1511.     flags = ipdir->flags;        /* should use to prevent overworking */
  1512.     if (own != -1 || grp != -1) {
  1513.       /* error recovery? do all just in case */
  1514. !     OSfname(path,ipdir,fn,F_DATA);    /* change unix name */
  1515. !     if ((err = unix_chown(path,own,grp)) != noErr)
  1516.         return(err);
  1517.       OSfname(path,ipdir,fn,F_RSRC);    /* change unix name */
  1518.       if ((err = unix_chown(path,own,grp)) != noErr && err != aeObjectNotFound)
  1519.  
  1520. --- 1488,1502 -----
  1521.     flags = ipdir->flags;        /* should use to prevent overworking */
  1522.     if (own != -1 || grp != -1) {
  1523.       /* error recovery? do all just in case */
  1524. !     OSfname(p_ath,ipdir,fn,F_DATA);    /* change unix name */
  1525. ! #ifdef NOCASEMATCH
  1526. !     if ((err = unix_chown(p_ath,own,grp)) != noErr) {
  1527. !       noCaseFind(p_ath);
  1528. !       if ((err = unix_chown(p_ath,own,grp)) != noErr)
  1529. !         return(err);
  1530. !     }
  1531. ! #else NOCASEMATCH
  1532. !     if ((err = unix_chown(p_ath,own,grp)) != noErr)
  1533.         return(err);
  1534.   #endif NOCASEMATCH
  1535.       strcpy(path,p_ath);
  1536. ***************
  1537. *** 1398,1404
  1538.       OSfname(path,ipdir,fn,F_DATA);    /* change unix name */
  1539.       if ((err = unix_chown(path,own,grp)) != noErr)
  1540.         return(err);
  1541. !     OSfname(path,ipdir,fn,F_RSRC);    /* change unix name */
  1542.       if ((err = unix_chown(path,own,grp)) != noErr && err != aeObjectNotFound)
  1543.         return(err);
  1544.       OSfname(path,ipdir,fn,F_FNDR);    /* create unix name */
  1545.  
  1546. --- 1498,1506 -----
  1547.   #else NOCASEMATCH
  1548.       if ((err = unix_chown(p_ath,own,grp)) != noErr)
  1549.         return(err);
  1550. ! #endif NOCASEMATCH
  1551. !     strcpy(path,p_ath);
  1552. !     toResFork(path,fn);
  1553.       if ((err = unix_chown(path,own,grp)) != noErr && err != aeObjectNotFound)
  1554.         return(err);
  1555.       strcpy(path,p_ath);
  1556. ***************
  1557. *** 1401,1407
  1558.       OSfname(path,ipdir,fn,F_RSRC);    /* change unix name */
  1559.       if ((err = unix_chown(path,own,grp)) != noErr && err != aeObjectNotFound)
  1560.         return(err);
  1561. !     OSfname(path,ipdir,fn,F_FNDR);    /* create unix name */
  1562.       if ((err = unix_chown(path,own,grp)) != noErr && err != aeObjectNotFound)
  1563.         return(err);
  1564.       EModified(ipdir);
  1565.  
  1566. --- 1503,1510 -----
  1567.       toResFork(path,fn);
  1568.       if ((err = unix_chown(path,own,grp)) != noErr && err != aeObjectNotFound)
  1569.         return(err);
  1570. !     strcpy(path,p_ath);
  1571. !     toFinderInfo(path,fn);
  1572.       if ((err = unix_chown(path,own,grp)) != noErr && err != aeObjectNotFound)
  1573.         return(err);
  1574.       EModified(ipdir);
  1575. ***************
  1576. *** 1473,1478
  1577.       printf("os_chmod: setting %o for %s\n",mode,path);
  1578.   
  1579.     err = unix_chmod(path,mode);        /* and set for the directory */
  1580.     if (err != noErr)
  1581.       return(err);
  1582.   
  1583.  
  1584. --- 1576,1588 -----
  1585.       printf("os_chmod: setting %o for %s\n",mode,path);
  1586.   
  1587.     err = unix_chmod(path,mode);        /* and set for the directory */
  1588. + #ifdef NOCASEMATCH
  1589. +   if (err != noErr) {
  1590. +     noCaseFind(path);
  1591. +     if((err = unix_chmod(path,mode)) != noErr)
  1592. +       return(err);
  1593. +   }
  1594. + #else NOCASEMATCH
  1595.     if (err != noErr)
  1596.       return(err);
  1597.   #endif NOCASEMATCH
  1598. ***************
  1599. *** 1475,1480
  1600.     err = unix_chmod(path,mode);        /* and set for the directory */
  1601.     if (err != noErr)
  1602.       return(err);
  1603.   
  1604.     EModified(idir);
  1605.     return(noErr);
  1606.  
  1607. --- 1585,1591 -----
  1608.   #else NOCASEMATCH
  1609.     if (err != noErr)
  1610.       return(err);
  1611. + #endif NOCASEMATCH
  1612.   
  1613.     EModified(idir);
  1614.     return(noErr);
  1615. ***************
  1616. *** 1510,1517
  1617.     case F_DATA:
  1618.       break;
  1619.     case F_RSRC:
  1620. !     path[pl] = '/';
  1621. !     strcpy(path+pl+1, RFDIRFN);
  1622.       break;
  1623.     case F_FNDR:
  1624.       path[pl] = '/';
  1625.  
  1626. --- 1621,1627 -----
  1627.     case F_DATA:
  1628.       break;
  1629.     case F_RSRC:
  1630. !     strcpy(path+pl, RFDIR);
  1631.       break;
  1632.     case F_FNDR:
  1633.       strcpy(path+pl, FIDIR);
  1634. ***************
  1635. *** 1514,1521
  1636.       strcpy(path+pl+1, RFDIRFN);
  1637.       break;
  1638.     case F_FNDR:
  1639. !     path[pl] = '/';
  1640. !     strcpy(path+pl+1, FIDIRFN);
  1641.       break;
  1642.     }
  1643.     if (DBOSI)
  1644.  
  1645. --- 1624,1630 -----
  1646.       strcpy(path+pl, RFDIR);
  1647.       break;
  1648.     case F_FNDR:
  1649. !     strcpy(path+pl, FIDIR);
  1650.       break;
  1651.     }
  1652.     if (DBOSI)
  1653. ***************
  1654. *** 1522,1527
  1655.       printf("os_chmod: setting %o for %s\n",mode,path);
  1656.   
  1657.     dirp = opendir(path);
  1658.     if (dirp == NULL) {
  1659.       if (DBOSI)
  1660.         printf("os_chmod: opendir failed on %s\n",path);
  1661.  
  1662. --- 1631,1637 -----
  1663.       printf("os_chmod: setting %o for %s\n",mode,path);
  1664.   
  1665.     dirp = opendir(path);
  1666. + #ifdef NOCASEMATCH
  1667.     if (dirp == NULL) {
  1668.       noCaseFind(path);
  1669.       if((dirp = opendir(path)) == NULL) {
  1670. ***************
  1671. *** 1523,1528
  1672.   
  1673.     dirp = opendir(path);
  1674.     if (dirp == NULL) {
  1675.       if (DBOSI)
  1676.         printf("os_chmod: opendir failed on %s\n",path);
  1677.       return;
  1678.  
  1679. --- 1633,1647 -----
  1680.     dirp = opendir(path);
  1681.   #ifdef NOCASEMATCH
  1682.     if (dirp == NULL) {
  1683. +     noCaseFind(path);
  1684. +     if((dirp = opendir(path)) == NULL) {
  1685. +       if (DBOSI)
  1686. +         printf("os_chmod: opendir failed on %s\n",path);
  1687. +       return;
  1688. +     }
  1689. +   }
  1690. + #else NOCASEMATCH
  1691. +   if (dirp == NULL) {
  1692.       if (DBOSI)
  1693.         printf("os_chmod: opendir failed on %s\n",path);
  1694.       return;
  1695. ***************
  1696. *** 1527,1532
  1697.         printf("os_chmod: opendir failed on %s\n",path);
  1698.       return;
  1699.     }
  1700.   
  1701.     pl = strlen(path);            /* length of the path */
  1702.     path[pl++] = '/';            /* add component terminator */
  1703.  
  1704. --- 1646,1652 -----
  1705.         printf("os_chmod: opendir failed on %s\n",path);
  1706.       return;
  1707.     }
  1708. + #endif NOCASEMATCH
  1709.   
  1710.     pl = strlen(path);            /* length of the path */
  1711.     path[pl++] = '/';            /* add component terminator */
  1712. ***************
  1713. *** 1706,1711
  1714.     err = access(path,imode);
  1715.     if (err == 0)
  1716.       return(noErr);
  1717.     switch (errno) {
  1718.     case ENOTDIR:
  1719.       return(aeDirNotFound);
  1720.  
  1721. --- 1826,1836 -----
  1722.     err = access(path,imode);
  1723.     if (err == 0)
  1724.       return(noErr);
  1725. + #ifdef NOCASEMATCH
  1726. +   noCaseFind(path);
  1727. +   if(access(path,imode) == 0)
  1728. +     return(noErr);
  1729. + #endif NOCASEMATCH
  1730.     switch (errno) {
  1731.     case ENOTDIR:
  1732.       return(aeDirNotFound);
  1733. ***************
  1734. *** 1834,1839
  1735.       return(noErr);
  1736.     }
  1737.   #endif
  1738.     v->v_size = 0x1000000;        /* some random number */
  1739.     v->v_free = 0x1000000;        /* same random number */
  1740.     return(noErr);            /* all ok */
  1741.  
  1742. --- 1959,1967 -----
  1743.       return(noErr);
  1744.     }
  1745.   #endif
  1746. + #ifdef SIZESERVER
  1747. +   getvolsize(path, &v->v_size, &v->v_free);
  1748. + #else SIZESERVER
  1749.     v->v_size = 0x1000000;        /* some random number */
  1750.     v->v_free = 0x1000000;        /* same random number */
  1751.   #endif SIZESERVER
  1752. ***************
  1753. *** 1836,1841
  1754.   #endif
  1755.     v->v_size = 0x1000000;        /* some random number */
  1756.     v->v_free = 0x1000000;        /* same random number */
  1757.     return(noErr);            /* all ok */
  1758.   }
  1759.   
  1760.  
  1761. --- 1964,1970 -----
  1762.   #else SIZESERVER
  1763.     v->v_size = 0x1000000;        /* some random number */
  1764.     v->v_free = 0x1000000;        /* same random number */
  1765. + #endif SIZESERVER
  1766.     return(noErr);            /* all ok */
  1767.   }
  1768.   
  1769. ***************
  1770. *** 1839,1844
  1771.     return(noErr);            /* all ok */
  1772.   }
  1773.   
  1774.   #ifdef USEGETMNT
  1775.   /* get info on path using buf when there is ambiguity (ultrix 2.0 or before) */
  1776.   /* fill in info on v */
  1777.  
  1778. --- 1968,2043 -----
  1779.     return(noErr);            /* all ok */
  1780.   }
  1781.   
  1782. + #ifdef SIZESERVER
  1783. + static jmp_buf gotpipe;
  1784. + private void
  1785. + getvolsize(path, ntot, nfree)
  1786. + char *path;
  1787. + sdword *ntot, *nfree;
  1788. + {
  1789. +     register int i;
  1790. +     int mask, socket[2];
  1791. +     struct volsize vs;
  1792. +     static int server = -1, server1, servmask;
  1793. +     static struct timeval servtimeout = {0, 500000L};
  1794. +     if(setjmp(gotpipe)) {
  1795. +         if(server >= 0)
  1796. +             close(server);
  1797. +         server = -1;
  1798. + unknown:
  1799. +         *ntot = 0x1000000;
  1800. +         *nfree = 0x1000000;
  1801. +         return;
  1802. +     }
  1803. +     if(server < 0) {
  1804. +         register int pid;
  1805. +         int catchsigpipe();
  1806. +         if(socketpair(AF_UNIX, SOCK_STREAM, 0, socket) < 0)
  1807. +             goto unknown;
  1808. +         if((pid = fork()) < 0) {
  1809. +             close(socket[0]);
  1810. +             close(socket[1]);
  1811. +             goto unknown;
  1812. +         }
  1813. +         if(pid == 0) {    /* the child */
  1814. +             close(socket[0]);
  1815. +             if(socket[1] != 0) {
  1816. +                 dup2(socket[1], 0);
  1817. +                 close(socket[1]);
  1818. +             }
  1819. +             execl(SIZESERVER, SIZESERVER, 0);
  1820. +             _exit(1);
  1821. +         }
  1822. +         close(socket[1]);
  1823. +         server = socket[0];
  1824. +         server1 = server + 1;
  1825. +         servmask = 1 << server;
  1826. +         signal(SIGPIPE, catchsigpipe);
  1827. +     }
  1828. +     for(i = 3 ; ; ) {
  1829. +         if(i-- <= 0)
  1830. +             goto unknown;
  1831. +         lseek(server, 0L, 2);
  1832. +         write(server, path, strlen(path) + 1);
  1833. +         mask = servmask;
  1834. +         if(select(server1, &mask, NULL, NULL, &servtimeout) < 1)
  1835. +             goto unknown;
  1836. +         if(read(server, (char *)&vs, sizeof(vs)) == sizeof(vs))
  1837. +             break;
  1838. +     }
  1839. +     *ntot = vs.total;
  1840. +     *nfree = vs.free;
  1841. + }
  1842. + catchsigpipe()
  1843. + {
  1844. +     longjmp(gotpipe, 1);
  1845. + }
  1846. + #endif SIZESERVER
  1847.   #ifdef USEGETMNT
  1848.   /* get info on path using buf when there is ambiguity (ultrix 2.0 or before) */
  1849.   /* fill in info on v */
  1850. ***************
  1851. *** 2064,2069
  1852.   IDirP spdir,dpdir;            /* source and destination parents */
  1853.   char *sfile,*dfile;            /* source and destination file names */
  1854.   {
  1855.     char spath[MAXPATHLEN];
  1856.     char dpath[MAXPATHLEN];
  1857.     struct stat stb;
  1858.  
  1859. --- 2263,2270 -----
  1860.   IDirP spdir,dpdir;            /* source and destination parents */
  1861.   char *sfile,*dfile;            /* source and destination file names */
  1862.   {
  1863. +   char s_path[MAXPATHLEN];
  1864. +   char d_path[MAXPATHLEN];
  1865.     char spath[MAXPATHLEN];
  1866.     char dpath[MAXPATHLEN];
  1867.     struct stat stb;
  1868. ***************
  1869. *** 2070,2077
  1870.     int mo;
  1871.     int err;
  1872.   
  1873. !   OSfname(spath,spdir,sfile,F_DATA);    /* create unix style name for data */
  1874. !   OSfname(dpath,dpdir,dfile,F_DATA);    /*  same for destination */
  1875.   
  1876.     if (DBOSI)
  1877.       printf("OSCopyFile: %s -> %s\n",spath,dpath);
  1878.  
  1879. --- 2271,2284 -----
  1880.     int mo;
  1881.     int err;
  1882.   
  1883. !   OSfname(s_path,spdir,sfile,F_DATA);    /* create unix style name for data */
  1884. ! #ifdef NOCASEMATCH
  1885. !   noCaseMatch(s_path);
  1886. ! #endif NOCASEMATCH
  1887. !   OSfname(d_path,dpdir,dfile,F_DATA);    /*  same for destination */
  1888. ! #ifdef NOCASEMATCH
  1889. !   noCaseMatch(d_path);
  1890. ! #endif NOCASEMATCH
  1891.   
  1892.     if (DBOSI)
  1893.       printf("OSCopyFile: %s -> %s\n",s_path,d_path);
  1894. ***************
  1895. *** 2074,2080
  1896.     OSfname(dpath,dpdir,dfile,F_DATA);    /*  same for destination */
  1897.   
  1898.     if (DBOSI)
  1899. !     printf("OSCopyFile: %s -> %s\n",spath,dpath);
  1900.   
  1901.     err = unix_stat(dpath,&stb);        /* see if destination exists... */
  1902.     if (err == noErr)            /* yes... it does */
  1903.  
  1904. --- 2281,2287 -----
  1905.   #endif NOCASEMATCH
  1906.   
  1907.     if (DBOSI)
  1908. !     printf("OSCopyFile: %s -> %s\n",s_path,d_path);
  1909.   
  1910.     err = unix_stat(d_path,&stb);        /* see if destination exists... */
  1911.     if (err == noErr)            /* yes... it does */
  1912. ***************
  1913. *** 2076,2082
  1914.     if (DBOSI)
  1915.       printf("OSCopyFile: %s -> %s\n",spath,dpath);
  1916.   
  1917. !   err = unix_stat(dpath,&stb);        /* see if destination exists... */
  1918.     if (err == noErr)            /* yes... it does */
  1919.       return(aeObjectExists);        /* return error... */
  1920.   
  1921.  
  1922. --- 2283,2289 -----
  1923.     if (DBOSI)
  1924.       printf("OSCopyFile: %s -> %s\n",s_path,d_path);
  1925.   
  1926. !   err = unix_stat(d_path,&stb);        /* see if destination exists... */
  1927.     if (err == noErr)            /* yes... it does */
  1928.       return(aeObjectExists);        /* return error... */
  1929.   
  1930. ***************
  1931. *** 2084,2090
  1932.     if ((err = unix_stat(pathstr(dpdir), &stb)) != noErr)
  1933.       return(err);
  1934.     mo = filemode(stb.st_mode, stb.st_uid, stb.st_gid);
  1935. !   err = os_copy(spath,dpath, mo);
  1936.   
  1937.     if (err != noErr && DBOSI)
  1938.       printf("OSCopyFile: DATA copy failed %s\n",afperr(err));
  1939.  
  1940. --- 2291,2297 -----
  1941.     if ((err = unix_stat(pathstr(dpdir), &stb)) != noErr)
  1942.       return(err);
  1943.     mo = filemode(stb.st_mode, stb.st_uid, stb.st_gid);
  1944. !   err = os_copy(s_path,d_path, mo);
  1945.   
  1946.     if (err != noErr && DBOSI)
  1947.       printf("OSCopyFile: DATA copy failed %s\n",afperr(err));
  1948. ***************
  1949. *** 2092,2099
  1950.     if (err != noErr)
  1951.       return(err);
  1952.   
  1953. !   OSfname(spath,spdir,sfile,F_RSRC);    /* create unix style name for rsrc */
  1954. !   OSfname(dpath,dpdir,dfile,F_RSRC);    /*  same for destination */
  1955.     err = os_copy(spath,dpath,mo); /* do the copy... */
  1956.     /* allow object not found */
  1957.     if (err != noErr && err != aeObjectNotFound) { /* if failure.... */
  1958.  
  1959. --- 2299,2308 -----
  1960.     if (err != noErr)
  1961.       return(err);
  1962.   
  1963. !   strcpy(spath,s_path);
  1964. !   toResFork(spath,sfile);        /* create unix style name for rsrc */
  1965. !   strcpy(dpath,d_path);
  1966. !   toResFork(dpath,dfile);        /*  same for destination */
  1967.     err = os_copy(spath,dpath,mo); /* do the copy... */
  1968.     /* allow object not found */
  1969.     if (err != noErr && err != aeObjectNotFound) { /* if failure.... */
  1970. ***************
  1971. *** 2103,2110
  1972.       return(err);
  1973.     }
  1974.   
  1975. !   OSfname(spath,spdir,sfile,F_FNDR);    /* create unix style name for fndr */
  1976. !   OSfname(dpath,dpdir,dfile,F_FNDR);    /*  same for destination */
  1977.     err = os_copy(spath,dpath,mo); /* do the copy... */
  1978.     /* allow object not found */
  1979.     if (err != noErr && err != aeObjectNotFound) {
  1980.  
  1981. --- 2312,2321 -----
  1982.       return(err);
  1983.     }
  1984.   
  1985. !   strcpy(spath,s_path);
  1986. !   toFinderInfo(spath,sfile);        /* create unix style name for fndr */
  1987. !   strcpy(dpath,d_path);
  1988. !   toFinderInfo(dpath,dfile);        /*  same for destination */
  1989.     err = os_copy(spath,dpath,mo); /* do the copy... */
  1990.     /* allow object not found */
  1991.     if (err != noErr && err != aeObjectNotFound) {
  1992. ***************
  1993. *** 2210,2215
  1994.   char *file;
  1995.   int delf;            /* if want to delete existing file */
  1996.   {
  1997.     char path[MAXPATHLEN];
  1998.     int err,derr,rerr,cerr,mo;
  1999.     struct stat stb;
  2000.  
  2001. --- 2421,2427 -----
  2002.   char *file;
  2003.   int delf;            /* if want to delete existing file */
  2004.   {
  2005. +   char p_ath[MAXPATHLEN];
  2006.     char path[MAXPATHLEN];
  2007.     int err,derr,rerr,cerr,mo;
  2008.     struct stat stb;
  2009. ***************
  2010. *** 2214,2220
  2011.     int err,derr,rerr,cerr,mo;
  2012.     struct stat stb;
  2013.   
  2014. !   OSfname(path,pdir,file,F_DATA);    /* create data file name */
  2015.   
  2016.     if (DBOSI)
  2017.       printf("OSCreateFile: creating %s with %s\n",path,
  2018.  
  2019. --- 2426,2435 -----
  2020.     int err,derr,rerr,cerr,mo;
  2021.     struct stat stb;
  2022.   
  2023. !   OSfname(p_ath,pdir,file,F_DATA);    /* create data file name */
  2024. ! #ifdef NOCASEMATCH
  2025. !   noCaseMatch(p_ath);
  2026. ! #endif NOCASEMATCH
  2027.   
  2028.     if (DBOSI)
  2029.       printf("OSCreateFile: creating %s with %s\n",p_ath,
  2030. ***************
  2031. *** 2217,2223
  2032.     OSfname(path,pdir,file,F_DATA);    /* create data file name */
  2033.   
  2034.     if (DBOSI)
  2035. !     printf("OSCreateFile: creating %s with %s\n",path,
  2036.          (delf) ? "OverWrite" : "No OverWrite");
  2037.     
  2038.     err = unix_stat(pathstr(pdir),&stb);
  2039.  
  2040. --- 2432,2438 -----
  2041.   #endif NOCASEMATCH
  2042.   
  2043.     if (DBOSI)
  2044. !     printf("OSCreateFile: creating %s with %s\n",p_ath,
  2045.          (delf) ? "OverWrite" : "No OverWrite");
  2046.     
  2047.     err = unix_stat(pathstr(pdir),&stb);
  2048. ***************
  2049. *** 2226,2233
  2050.     mo = filemode(stb.st_mode, stb.st_uid, stb.st_gid);
  2051.   
  2052.     /* should never get aeObjectExists if delf was true */
  2053. !   OSfname(path,pdir,file,F_DATA);    /* create data fork */
  2054. !   derr = unix_create(path,delf,mo);    /* using user delete flag */
  2055.     if (derr != noErr && derr != aeObjectExists) {
  2056.       if (DBOSI)
  2057.         printf("OSCreateFile: DATA fork create failed\n");
  2058.  
  2059. --- 2441,2447 -----
  2060.     mo = filemode(stb.st_mode, stb.st_uid, stb.st_gid);
  2061.   
  2062.     /* should never get aeObjectExists if delf was true */
  2063. !   derr = unix_create(p_ath,delf,mo);    /* using user delete flag */
  2064.     if (derr != noErr && derr != aeObjectExists) {
  2065.       if (DBOSI)
  2066.         printf("OSCreateFile: DATA fork create failed\n");
  2067. ***************
  2068. *** 2233,2240
  2069.         printf("OSCreateFile: DATA fork create failed\n");
  2070.       /* previously under a conditional on delf, but not necessary */
  2071.       /* anymore because we don't get here if the object was already there */
  2072. !     OSfname(path,pdir,file,F_DATA);
  2073. !     cerr = unix_unlink(path);        /* clean up... */
  2074.       if (cerr != noErr && DBOSI)
  2075.         printf("OSCreateFile: cleanup failed\n");
  2076.       return(derr);
  2077.  
  2078. --- 2447,2453 -----
  2079.         printf("OSCreateFile: DATA fork create failed\n");
  2080.       /* previously under a conditional on delf, but not necessary */
  2081.       /* anymore because we don't get here if the object was already there */
  2082. !     cerr = unix_unlink(p_ath);        /* clean up... */
  2083.       if (cerr != noErr && DBOSI)
  2084.         printf("OSCreateFile: cleanup failed\n");
  2085.       return(derr);
  2086. ***************
  2087. *** 2240,2246
  2088.       return(derr);
  2089.     }
  2090.   
  2091. !   OSfname(path,pdir,file,F_RSRC);    /* try creating resource fork */
  2092.     rerr = unix_create(path,delf,mo);    /* ... */
  2093.     if (rerr != noErr && rerr != aeObjectExists && rerr != aeObjectNotFound) {
  2094.       if (DBOSI)
  2095.  
  2096. --- 2453,2460 -----
  2097.       return(derr);
  2098.     }
  2099.   
  2100. !   strcpy(path,p_ath);
  2101. !   toResFork(path,file);            /* try creating resource fork */
  2102.     rerr = unix_create(path,delf,mo);    /* ... */
  2103.     if (rerr != noErr && rerr != aeObjectExists && rerr != aeObjectNotFound) {
  2104.       if (DBOSI)
  2105. ***************
  2106. *** 2247,2253
  2107.         printf("OSCreateFile: RSRC create failed\n");
  2108.       /* previously under a conditional on delf, but not necessary */
  2109.       /* anymore because we don't get here if the object was already there */
  2110. -     OSfname(path,pdir,file,F_RSRC);
  2111.       cerr = unix_unlink(path);        /* clean up... */
  2112.       if (cerr != noErr && DBOSI)
  2113.         printf("OSCreateFile: cleanup failed\n");
  2114.  
  2115. --- 2461,2466 -----
  2116.         printf("OSCreateFile: RSRC create failed\n");
  2117.       /* previously under a conditional on delf, but not necessary */
  2118.       /* anymore because we don't get here if the object was already there */
  2119.       cerr = unix_unlink(path);        /* clean up... */
  2120.       if (cerr != noErr && DBOSI)
  2121.         printf("OSCreateFile: cleanup failed\n");
  2122. ***************
  2123. *** 2255,2261
  2124.       return(rerr);
  2125.     }
  2126.   
  2127. !   OSfname(path,pdir,file,F_FNDR);    /* create finder fork */
  2128.     err = unix_create(path,TRUE,mo);
  2129.     /* ignore error here - exactly what should be done? */
  2130.   
  2131.  
  2132. --- 2468,2475 -----
  2133.       return(rerr);
  2134.     }
  2135.   
  2136. !   strcpy(path,p_ath);
  2137. !   toFinderInfo(path,file);        /* create finder fork */
  2138.     err = unix_create(path,TRUE,mo);
  2139.     /* ignore error here - exactly what should be done? */
  2140.   
  2141. ***************
  2142. *** 2277,2282
  2143.     char path[MAXPATHLEN];
  2144.     char *ms;
  2145.     int mo;
  2146.   
  2147.     OSfname(path,pdir,file,typ);        /* expand name */
  2148.   
  2149.  
  2150. --- 2491,2499 -----
  2151.     char path[MAXPATHLEN];
  2152.     char *ms;
  2153.     int mo;
  2154. + #ifdef NOCASEMATCH
  2155. +   register int i;
  2156. + #endif NOCASEMATCH
  2157.   
  2158.     OSfname(path,pdir,file,typ);        /* expand name */
  2159.   
  2160. ***************
  2161. *** 2298,2303
  2162.     if (DBOSI) 
  2163.       printf("OSOpenFork: Opening %s for %s\n",path,ms);
  2164.   
  2165.     return(unix_open(path,mo,fhdl));
  2166.   }
  2167.   
  2168.  
  2169. --- 2515,2527 -----
  2170.     if (DBOSI) 
  2171.       printf("OSOpenFork: Opening %s for %s\n",path,ms);
  2172.   
  2173. + #ifdef NOCASEMATCH
  2174. +   if((i = unix_open(path,mo,fhdl)) != noErr) {
  2175. +     noCaseFind(path);
  2176. +     i = unix_open(path,mo,fhdl);
  2177. +   }
  2178. +   return(i);
  2179. + #else NOCASEMATCH
  2180.     return(unix_open(path,mo,fhdl));
  2181.   #endif NOCASEMATCH
  2182.   }
  2183. ***************
  2184. *** 2299,2304
  2185.       printf("OSOpenFork: Opening %s for %s\n",path,ms);
  2186.   
  2187.     return(unix_open(path,mo,fhdl));
  2188.   }
  2189.   
  2190.   
  2191.  
  2192. --- 2523,2529 -----
  2193.     return(i);
  2194.   #else NOCASEMATCH
  2195.     return(unix_open(path,mo,fhdl));
  2196. + #endif NOCASEMATCH
  2197.   }
  2198.   
  2199.   
  2200. RAZZLE!DAZZLE
  2201. fi    # End afpos.c.diff
  2202. if test -f afposenum.c.diff
  2203. then
  2204.     echo shar: will not overwrite existing file "'afposenum.c.diff'"
  2205. else
  2206. echo 'x - afposenum.c.diff'
  2207. cat << \RAZZLE!DAZZLE > afposenum.c.diff
  2208. *** applications/aufs/afposenum.c.orig    Thu May 19 12:19:54 1988
  2209. --- applications/aufs/afposenum.c    Fri Dec  9 11:13:30 1988
  2210. ***************
  2211. *** 29,34
  2212.   #include <sys/time.h>
  2213.   #include <netat/appletalk.h>
  2214.   #include <netat/afp.h>
  2215.   #include "afps.h"
  2216.   #include "afpdt.h"
  2217.   #include "afpgc.h"
  2218.  
  2219. --- 29,35 -----
  2220.   #include <sys/time.h>
  2221.   #include <netat/appletalk.h>
  2222.   #include <netat/afp.h>
  2223. + #include <strings.h>
  2224.   #include "afps.h"
  2225.   #include "afpdt.h"
  2226.   #include "afpgc.h"
  2227. ***************
  2228. *** 57,62
  2229.   private void EC_Free();
  2230.   private iselect();
  2231.   
  2232.   /*
  2233.    * int iselect(struct direct *d)
  2234.    * 
  2235.  
  2236. --- 58,68 -----
  2237.   private void EC_Free();
  2238.   private iselect();
  2239.   
  2240. + #ifdef NOCASEMATCH
  2241. + private noCaseDir();
  2242. + private searchDirectory();
  2243. + #endif NOCASEMATCH
  2244.   /*
  2245.    * int iselect(struct direct *d)
  2246.    * 
  2247. ***************
  2248. *** 426,433
  2249.   
  2250.   OSfname(r,idir,fn,typ)
  2251.   IDirP idir;
  2252. ! char *fn,*r;
  2253. ! int typ;
  2254.   {
  2255.     char *p;
  2256.   
  2257.  
  2258. --- 432,439 -----
  2259.   
  2260.   OSfname(r,idir,fn,typ)
  2261.   IDirP idir;
  2262. ! register char *fn,*r;
  2263. ! register int typ;
  2264.   {
  2265.     register char *p;
  2266.   
  2267. ***************
  2268. *** 429,435
  2269.   char *fn,*r;
  2270.   int typ;
  2271.   {
  2272. !   char *p;
  2273.   
  2274.     for (p = pathstr(idir); *p != '\0';)        /* copy the directory */
  2275.       *r++ = *p++;
  2276.  
  2277. --- 435,441 -----
  2278.   register char *fn,*r;
  2279.   register int typ;
  2280.   {
  2281. !   register char *p;
  2282.   
  2283.     for (p = pathstr(idir); *p != '\0';)        /* copy the directory */
  2284.       *r++ = *p++;
  2285. ***************
  2286. *** 434,442
  2287.     for (p = pathstr(idir); *p != '\0';)        /* copy the directory */
  2288.       *r++ = *p++;
  2289.   
  2290. -   if (typ != F_DATA) 
  2291. -     *r++ = '/';
  2292.     if (typ == F_RSRC || typ == F_FNDR) /* append directory names */
  2293.       for (p = ((typ == F_RSRC) ? RFDIRFN : FIDIRFN); *p != '\0'; )
  2294.         *r++ = *p++;
  2295.  
  2296. --- 440,445 -----
  2297.     for (p = pathstr(idir); *p != '\0';)        /* copy the directory */
  2298.       *r++ = *p++;
  2299.   
  2300.     if (typ == F_RSRC || typ == F_FNDR) /* append directory names */
  2301.       for (p = ((typ == F_RSRC) ? RFDIR : FIDIR); *p != '\0'; )
  2302.         *r++ = *p++;
  2303. ***************
  2304. *** 438,444
  2305.       *r++ = '/';
  2306.   
  2307.     if (typ == F_RSRC || typ == F_FNDR) /* append directory names */
  2308. !     for (p = ((typ == F_RSRC) ? RFDIRFN : FIDIRFN); *p != '\0'; )
  2309.         *r++ = *p++;
  2310.   
  2311.     if (*fn != '\0')        /* add slash */
  2312.  
  2313. --- 441,447 -----
  2314.       *r++ = *p++;
  2315.   
  2316.     if (typ == F_RSRC || typ == F_FNDR) /* append directory names */
  2317. !     for (p = ((typ == F_RSRC) ? RFDIR : FIDIR); *p != '\0'; )
  2318.         *r++ = *p++;
  2319.   
  2320.     if (*fn != '\0') {        /* add slash */
  2321. ***************
  2322. *** 441,447
  2323.       for (p = ((typ == F_RSRC) ? RFDIRFN : FIDIRFN); *p != '\0'; )
  2324.         *r++ = *p++;
  2325.   
  2326. !   if (*fn != '\0')        /* add slash */
  2327.       *r++ = '/';            /*  if not null file */
  2328.     while (*fn != '\0')
  2329.       *r++ = *fn++;
  2330.  
  2331. --- 444,450 -----
  2332.       for (p = ((typ == F_RSRC) ? RFDIR : FIDIR); *p != '\0'; )
  2333.         *r++ = *p++;
  2334.   
  2335. !   if (*fn != '\0') {        /* add slash */
  2336.       *r++ = '/';            /*  if not null file */
  2337.       while (*fn != '\0')
  2338.         *r++ = *fn++;
  2339. ***************
  2340. *** 443,450
  2341.   
  2342.     if (*fn != '\0')        /* add slash */
  2343.       *r++ = '/';            /*  if not null file */
  2344. !   while (*fn != '\0')
  2345. !     *r++ = *fn++;
  2346.     *r = '\0';
  2347.   }
  2348.     
  2349.  
  2350. --- 446,454 -----
  2351.   
  2352.     if (*fn != '\0') {        /* add slash */
  2353.       *r++ = '/';            /*  if not null file */
  2354. !     while (*fn != '\0')
  2355. !       *r++ = *fn++;
  2356. !   }
  2357.     *r = '\0';
  2358.   }
  2359.   
  2360. ***************
  2361. *** 447,452
  2362.       *r++ = *fn++;
  2363.     *r = '\0';
  2364.   }
  2365. -   
  2366.   
  2367.   
  2368.  
  2369. --- 451,456 -----
  2370.     }
  2371.     *r = '\0';
  2372.   }
  2373.   
  2374.   toResFork(str, fn)
  2375.   register char *str;
  2376. ***************
  2377. *** 449,452
  2378.   }
  2379.     
  2380.   
  2381.   
  2382.  
  2383. --- 452,462 -----
  2384.     *r = '\0';
  2385.   }
  2386.   
  2387. + toResFork(str, fn)
  2388. + register char *str;
  2389. + char *fn;
  2390. + {
  2391. +   register char *fp, *tp;
  2392.   
  2393.     if(*fn) {            /* a real file */
  2394.       if(fp = rindex(str, '/'))    /* skip over last slash */
  2395. ***************
  2396. *** 450,452
  2397.     
  2398.   
  2399.   
  2400.  
  2401. --- 458,617 -----
  2402.   {
  2403.     register char *fp, *tp;
  2404.   
  2405. +   if(*fn) {            /* a real file */
  2406. +     if(fp = rindex(str, '/'))    /* skip over last slash */
  2407. +       fp++;
  2408. +     else
  2409. +       fp = str;
  2410. +     str = fp;
  2411. +     fp = str + strlen(str);
  2412. +     tp = fp + DIRRFLEN;
  2413. +     *tp = 0;
  2414. +     while(fp > str)    /* move filename, leaving space for .resource */
  2415. +       *--tp = *--fp;
  2416. +     fp = DIRRF;
  2417. +     while(*fp)
  2418. +       *str++ = *fp++;
  2419. +   } else            /* a directory */
  2420. +     strcat(str,RFDIR);        /* just append .resource */
  2421. + }
  2422. + toFinderInfo(str, fn)
  2423. + register char *str;
  2424. + char *fn;
  2425. + {
  2426. +   register char *fp, *tp;
  2427. +   if(*fn) {            /* a real file */
  2428. +     if(fp = rindex(str,'/'))    /* skip over last slash */
  2429. +       fp++;
  2430. +     else
  2431. +       fp = str;
  2432. +     str = fp;
  2433. +     fp = str + strlen(str);
  2434. +     tp = fp + DIRFILEN;
  2435. +     *tp = 0;
  2436. +     while(fp > str)    /* move filename, leaving space for .finderinfo */
  2437. +       *--tp = *--fp;
  2438. +     fp = DIRFI;
  2439. +     while(*fp)
  2440. +       *str++ = *fp++;
  2441. +   } else            /* a directory */
  2442. +     strcat(str,FIDIR);        /* just append .finderinfo */
  2443. + }
  2444. + #ifdef NOCASEMATCH
  2445. + #include <sys/file.h>
  2446. + #include <ctype.h>
  2447. + /*
  2448. +  * searchDirectory(dir, name)
  2449. +  *    Do a case insensitive search for name in dir, and write the true name
  2450. +  *    of the file in name.
  2451. +  */
  2452. + private
  2453. + searchDirectory(dir, name)
  2454. + char *dir, *name;
  2455. + {
  2456. +     register char *fp, *tp;
  2457. +     register DIR *dp;
  2458. +     register struct direct *d;
  2459. +     register int len;
  2460. +     char lname[BUFSIZ], dname[BUFSIZ];
  2461. +     if((dp = opendir(dir)) == NULL)
  2462. +         return(0);
  2463. +     len = 0;
  2464. +     for(fp = name, tp = lname ; *fp ; fp++) {
  2465. +         *tp++ = isupper(*fp) ? tolower(*fp) : *fp;
  2466. +         len++;
  2467. +     }
  2468. +     *tp = 0;
  2469. +     while(d = readdir(dp)) {
  2470. +         if(d->d_namlen != len)
  2471. +             continue;
  2472. +         for(fp = d->d_name, tp = dname ; *fp ; fp++)
  2473. +             *tp++ = isupper(*fp) ? tolower(*fp) : *fp;
  2474. +         *tp = 0;
  2475. +         if(strcmp(dname, lname) == 0) {
  2476. +             strcpy(name, d->d_name);
  2477. +             closedir(dp);
  2478. +             return(1);
  2479. +         }
  2480. +     }
  2481. +     closedir(dp);
  2482. +     return(0);
  2483. + }
  2484. + /*
  2485. +  * noCaseDir(path)
  2486. +  *    Recursively verify the components of path.
  2487. +  */
  2488. + private
  2489. + noCaseDir(path)
  2490. + register char *path;
  2491. + {
  2492. +     register char *last;
  2493. +     register int status;
  2494. +     if(access(path, F_OK) >= 0)
  2495. +         return(1);
  2496. +     if(last = rindex(path, '/')) {
  2497. +         if(last == path)
  2498. +             return(searchDirectory("/", last + 1));
  2499. +         else {
  2500. +             *last++ = 0;
  2501. +             status = 0;
  2502. +             if(noCaseDir(path))
  2503. +                 status = searchDirectory(path, last);
  2504. +             *--last = '/';
  2505. +             return(status);
  2506. +         }
  2507. +     }
  2508. +     return(searchDirectory(".", path));
  2509. + }
  2510. + /*
  2511. +  * noCaseFind(path)
  2512. +  *    noCaseFind() calls noCaseDir() and searchDirectory() recursively to
  2513. +  *    take path (case insensitive) and converts it to (case sensitive) newpath
  2514. +  *    corresponding to the true Unix filename.  This is mainly to fix
  2515. +  *    HyperCard doing funny things to stack names.
  2516. +  */
  2517. + void
  2518. + noCaseFind(path)
  2519. + register char *path;
  2520. + {
  2521. +     register char *last;
  2522. +     if(last = rindex(path, '/')) {
  2523. +         if(last == path)
  2524. +             searchDirectory("/", last + 1);
  2525. +         else {
  2526. +             *last++ = 0;
  2527. +             if(noCaseDir(path))
  2528. +                 searchDirectory(path, last);
  2529. +             *--last = '/';
  2530. +         }
  2531. +     } else
  2532. +         searchDirectory(".", path);
  2533. + }
  2534. + /*
  2535. +  * noCaseMatch(path)
  2536. +  *    noCaseMatch() tests path first and will call noCaseFind() is path
  2537. +  *    doesn't exist.
  2538. +  */
  2539. + void
  2540. + noCaseMatch(path)
  2541. + register char *path;
  2542. + {
  2543. +     if(access(path, F_OK) >= 0)
  2544. +         return;
  2545. +     noCaseFind(path);
  2546. + }
  2547. + #endif NOCASEMATCH
  2548. RAZZLE!DAZZLE
  2549. fi    # End afposenum.c.diff
  2550. if test -f afposfi.c.diff
  2551. then
  2552.     echo shar: will not overwrite existing file "'afposfi.c.diff'"
  2553. else
  2554. echo 'x - afposfi.c.diff'
  2555. cat << \RAZZLE!DAZZLE > afposfi.c.diff
  2556. *** applications/aufs/afposfi.c.orig    Thu May 19 12:19:56 1988
  2557. --- applications/aufs/afposfi.c    Thu Jan 26 18:22:52 1989
  2558. ***************
  2559. *** 63,68
  2560.   private void fc_flush_start();
  2561.   private void fc_flush_end();
  2562.   private FileInfo *os_getfi();
  2563.   
  2564.   #define FICacheSize 128
  2565.   /* Each cache entry has a lifetime that it goes through before it must */
  2566.  
  2567. --- 63,69 -----
  2568.   private void fc_flush_start();
  2569.   private void fc_flush_end();
  2570.   private FileInfo *os_getfi();
  2571. + private fc_readent();
  2572.   
  2573.   #define FICacheSize 128
  2574.   /* Each cache entry has a lifetime that it goes through before it must */
  2575. ***************
  2576. *** 104,109
  2577.   
  2578.     OSfname(path, pdir, "", F_FNDR); /* get directory */
  2579.     if (stat(path, &stb) < 0) {
  2580.       fcf_val_dir = NILDIR;
  2581.       fcf_val_time = 0;
  2582.       return;            /* nothing else we can do */
  2583.  
  2584. --- 105,118 -----
  2585.   
  2586.     OSfname(path, pdir, "", F_FNDR); /* get directory */
  2587.     if (stat(path, &stb) < 0) {
  2588. + #ifdef NOCASEMATCH
  2589. +     noCaseFind(path);
  2590. +     if (stat(path, &stb) < 0) {
  2591. +       fcf_val_dir = NILDIR;
  2592. +       fcf_val_time = 0;
  2593. +       return;            /* nothing else we can do */
  2594. +     }
  2595. + #else NOCASEMATCH
  2596.       fcf_val_dir = NILDIR;
  2597.       fcf_val_time = 0;
  2598.       return;            /* nothing else we can do */
  2599. ***************
  2600. *** 107,112
  2601.       fcf_val_dir = NILDIR;
  2602.       fcf_val_time = 0;
  2603.       return;            /* nothing else we can do */
  2604.     }
  2605.     fcf_val_dir = pdir;
  2606.     fcf_val_time = stb.st_mtime;    /* remember */
  2607.  
  2608. --- 116,122 -----
  2609.       fcf_val_dir = NILDIR;
  2610.       fcf_val_time = 0;
  2611.       return;            /* nothing else we can do */
  2612. + #endif NOCASEMATCH
  2613.     }
  2614.     fcf_val_dir = pdir;
  2615.     fcf_val_time = stb.st_mtime;    /* remember */
  2616. ***************
  2617. *** 142,147
  2618.       if (fcf_val_dir == fe->fe_pdir &&
  2619.       (fcf_val_time > fe->fe_mtime) &&
  2620.       (fcf_val_time > fe->fe_vtime)) {
  2621.         if (stat(path, &stb) < 0)
  2622.       return;                /* nothing else we can do */
  2623.         if (stb.st_mtime != fe->fe_mtime)    /* reload entry */
  2624.  
  2625. --- 152,164 -----
  2626.       if (fcf_val_dir == fe->fe_pdir &&
  2627.       (fcf_val_time > fe->fe_mtime) &&
  2628.       (fcf_val_time > fe->fe_vtime)) {
  2629. + #ifdef NOCASEMATCH
  2630. +       if (stat(path, &stb) < 0) {
  2631. +     noCaseFind(path);
  2632. +         if (stat(path, &stb) < 0)
  2633. +       return;            /* nothing else we can do */
  2634. +       }
  2635. + #else NOCASEMATCH
  2636.         if (stat(path, &stb) < 0)
  2637.       return;                /* nothing else we can do */
  2638.   #endif NOCASEMATCH
  2639. ***************
  2640. *** 144,149
  2641.       (fcf_val_time > fe->fe_vtime)) {
  2642.         if (stat(path, &stb) < 0)
  2643.       return;                /* nothing else we can do */
  2644.         if (stb.st_mtime != fe->fe_mtime)    /* reload entry */
  2645.       fe->fe_okay = FALSE;        /* make entry as bad */
  2646.       }
  2647.  
  2648. --- 161,167 -----
  2649.   #else NOCASEMATCH
  2650.         if (stat(path, &stb) < 0)
  2651.       return;                /* nothing else we can do */
  2652. + #endif NOCASEMATCH
  2653.         if (stb.st_mtime != fe->fe_mtime)    /* reload entry */
  2654.       fe->fe_okay = FALSE;        /* make entry as bad */
  2655.       }
  2656. ***************
  2657. *** 167,172
  2658.       if ((fe->fe_pdir->flags & DID_FINDERINFO) == 0) /* always okay */
  2659.         return(fe->fe_okay);
  2660.       OSfname(path, fe->fe_pdir, fe->fe_fnam, F_FNDR);
  2661.       if (stat(path, &stb) < 0)
  2662.         return(fe->fe_okay);        /* nothing else we can do */
  2663.       if (stb.st_mtime != fe->fe_mtime)    /* reload entry */
  2664.  
  2665. --- 185,197 -----
  2666.       if ((fe->fe_pdir->flags & DID_FINDERINFO) == 0) /* always okay */
  2667.         return(fe->fe_okay);
  2668.       OSfname(path, fe->fe_pdir, fe->fe_fnam, F_FNDR);
  2669. + #ifdef NOCASEMATCH
  2670. +     if (stat(path, &stb) < 0) {
  2671. +       noCaseFind(path);
  2672. +       if (stat(path, &stb) < 0)
  2673. +         return(fe->fe_okay);        /* nothing else we can do */
  2674. +     }
  2675. + #else NOCASEMATCH
  2676.       if (stat(path, &stb) < 0)
  2677.         return(fe->fe_okay);        /* nothing else we can do */
  2678.   #endif NOCASEMATCH
  2679. ***************
  2680. *** 169,174
  2681.       OSfname(path, fe->fe_pdir, fe->fe_fnam, F_FNDR);
  2682.       if (stat(path, &stb) < 0)
  2683.         return(fe->fe_okay);        /* nothing else we can do */
  2684.       if (stb.st_mtime != fe->fe_mtime)    /* reload entry */
  2685.         return(FALSE);            /* bad entry */
  2686.     }
  2687.  
  2688. --- 194,200 -----
  2689.   #else NOCASEMATCH
  2690.       if (stat(path, &stb) < 0)
  2691.         return(fe->fe_okay);        /* nothing else we can do */
  2692. + #endif NOCASEMATCH
  2693.       if (stb.st_mtime != fe->fe_mtime)    /* reload entry */
  2694.         return(FALSE);            /* bad entry */
  2695.     }
  2696. ***************
  2697. *** 253,258
  2698.         printf("fc_readent: reading %s\n",path);
  2699.   
  2700.       fd = open(path,O_RDONLY);
  2701.       if (fd >= 0) {
  2702.         OSLockFileforRead(fd);
  2703.         err = fstat(fd, &stb);
  2704.  
  2705. --- 279,290 -----
  2706.         printf("fc_readent: reading %s\n",path);
  2707.   
  2708.       fd = open(path,O_RDONLY);
  2709. + #ifdef NOCASEMATCH
  2710. +     if(fd < 0) {
  2711. +       noCaseFind(path);
  2712. +       fd = open(path,O_RDONLY);
  2713. +     }
  2714. + #endif NOCASEMATCH
  2715.       if (fd >= 0) {
  2716.         OSLockFileforRead(fd);
  2717.         err = fstat(fd, &stb);
  2718. ***************
  2719. *** 309,314
  2720.   
  2721.     /* convert name to internal name */
  2722.     OSfname(path,fe->fe_pdir,fe->fe_fnam,F_DATA); /* create plain name */
  2723.     if (stat(path,&stb) != 0)        /* check if it exists */
  2724.       return(aeObjectNotFound);        /* no... */
  2725.     if (S_ISDIR(stb.st_mode)) {
  2726.  
  2727. --- 341,353 -----
  2728.   
  2729.     /* convert name to internal name */
  2730.     OSfname(path,fe->fe_pdir,fe->fe_fnam,F_DATA); /* create plain name */
  2731. + #ifdef NOCASEMATCH
  2732. +   if (stat(path,&stb) != 0) {        /* check if it exists */
  2733. +     noCaseFind(path);
  2734. +     if (stat(path,&stb) != 0)        /* check if it exists */
  2735. +       return(aeObjectNotFound);        /* no... */
  2736. +   }
  2737. + #else NOCASEMATCH
  2738.     if (stat(path,&stb) != 0)        /* check if it exists */
  2739.       return(aeObjectNotFound);        /* no... */
  2740.   #endif NOCASEMATCH
  2741. ***************
  2742. *** 311,316
  2743.     OSfname(path,fe->fe_pdir,fe->fe_fnam,F_DATA); /* create plain name */
  2744.     if (stat(path,&stb) != 0)        /* check if it exists */
  2745.       return(aeObjectNotFound);        /* no... */
  2746.     if (S_ISDIR(stb.st_mode)) {
  2747.       fi->fi_comln = 0;
  2748.     } else {
  2749.  
  2750. --- 350,356 -----
  2751.   #else NOCASEMATCH
  2752.     if (stat(path,&stb) != 0)        /* check if it exists */
  2753.       return(aeObjectNotFound);        /* no... */
  2754. + #endif NOCASEMATCH
  2755.     if (S_ISDIR(stb.st_mode)) {
  2756.       fi->fi_comln = 0;
  2757.     } else {
  2758. ***************
  2759. *** 352,358
  2760.       printf("WriteFA: writing %s\n",path);
  2761.   
  2762.     needu++;
  2763. !   if ((fd = open(path,O_WRONLY)) < 0) {        /* open for write */
  2764.       if (errno != ENOENT) {
  2765.         printf("WriteFA: error openning %s errno=%d\n",path,errno);
  2766.         return;
  2767.  
  2768. --- 392,405 -----
  2769.       printf("WriteFA: writing %s\n",path);
  2770.   
  2771.     needu++;
  2772. !   fd = open(path,O_WRONLY);
  2773. ! #ifdef NOCASEMATCH
  2774. !   if(fd < 0) {
  2775. !     noCaseFind(path);
  2776. !     fd = open(path,O_WRONLY);
  2777. !   }
  2778. ! #endif NOCASEMATCH
  2779. !   if (fd < 0) {                /* open for write */
  2780.       if (errno != ENOENT) {
  2781.         printf("WriteFA: error openning %s errno=%d\n",path,errno);
  2782.         return;
  2783. RAZZLE!DAZZLE
  2784. fi    # End afposfi.c.diff
  2785. if test -f afps.h.diff
  2786. then
  2787.     echo shar: will not overwrite existing file "'afps.h.diff'"
  2788. else
  2789. echo 'x - afps.h.diff'
  2790. cat << \RAZZLE!DAZZLE > afps.h.diff
  2791. *** applications/aufs/afps.h.orig    Thu May 19 12:20:07 1988
  2792. --- applications/aufs/afps.h    Thu Dec  1 11:08:02 1988
  2793. ***************
  2794. *** 182,187
  2795.   char *OSEnumGet();
  2796.   int  OSEnumInit();
  2797.   void OSEnumDone();
  2798.   
  2799.   /* Portable library functions */
  2800.   
  2801.  
  2802. --- 182,191 -----
  2803.   char *OSEnumGet();
  2804.   int  OSEnumInit();
  2805.   void OSEnumDone();
  2806. + #ifdef NOCASEMATCH
  2807. + void noCaseFind();
  2808. + void noCaseMatch();
  2809. + #endif NOCASEMATCH
  2810.   
  2811.   /* Portable library functions */
  2812.   
  2813. ***************
  2814. *** 197,202
  2815.   
  2816.   #define RFDIR "/.resource"
  2817.   #define FIDIR "/.finderinfo"
  2818.   
  2819.   /* Finder info bits */
  2820.   #define DEFCMNT "This is a Unix\252 created file."
  2821.  
  2822. --- 201,211 -----
  2823.   
  2824.   #define RFDIR "/.resource"
  2825.   #define FIDIR "/.finderinfo"
  2826. + #define DIRRF ".resource/"
  2827. + #define DIRFI ".finderinfo/"
  2828. + #define DIRRFLEN 10
  2829. + #define DIRFILEN 12
  2830.   
  2831.   /* Finder info bits */
  2832.   #define DEFCMNT "This is a Unix\252 created file."
  2833. RAZZLE!DAZZLE
  2834. fi    # End afps.h.diff
  2835. if test -f afpserver.c.diff
  2836. then
  2837.     echo shar: will not overwrite existing file "'afpserver.c.diff'"
  2838. else
  2839. echo 'x - afpserver.c.diff'
  2840. cat << \RAZZLE!DAZZLE > afpserver.c.diff
  2841. *** applications/aufs/afpserver.c.orig    Thu May 19 12:20:09 1988
  2842. --- applications/aufs/afpserver.c    Thu Jan 26 18:13:56 1989
  2843. ***************
  2844. *** 167,172
  2845.   
  2846.   #define NumEntries (sizeof(Entries)/sizeof(AFPDispEntry))
  2847.   
  2848.   IniServer()            /* ini disp entries */
  2849.   {
  2850.     int i;
  2851.  
  2852. --- 167,174 -----
  2853.   
  2854.   #define NumEntries (sizeof(Entries)/sizeof(AFPDispEntry))
  2855.   
  2856. + private DumpBuf(), clockstart(), clockend();
  2857.   IniServer()            /* ini disp entries */
  2858.   {
  2859.     int i;
  2860. RAZZLE!DAZZLE
  2861. fi    # End afpserver.c.diff
  2862. if test -f atalkdbm.c.diff
  2863. then
  2864.     echo shar: will not overwrite existing file "'atalkdbm.c.diff'"
  2865. else
  2866. echo 'x - atalkdbm.c.diff'
  2867. cat << \RAZZLE!DAZZLE > atalkdbm.c.diff
  2868. *** lib/cap/atalkdbm.c.orig    Thu May 19 12:17:05 1988
  2869. --- lib/cap/atalkdbm.c    Fri Jan 27 14:52:15 1989
  2870. ***************
  2871. *** 37,42
  2872.   #define HAVE_ZONE -1        /* our zone was set */
  2873.   #define CONFIGURED 1        /* set when configured */
  2874.   
  2875.   /*
  2876.    * Set zone name - sets alternate atalk configuration file: atalk.<zonename>
  2877.    * 
  2878.  
  2879. --- 37,44 -----
  2880.   #define HAVE_ZONE -1        /* our zone was set */
  2881.   #define CONFIGURED 1        /* set when configured */
  2882.   
  2883. + static int name_toipaddr();
  2884.   /*
  2885.    * Set zone name - sets alternate atalk configuration file: atalk.<zonename>
  2886.    * 
  2887. RAZZLE!DAZZLE
  2888. fi    # End atalkdbm.c.diff
  2889. if test -f atis.c.diff
  2890. then
  2891.     echo shar: will not overwrite existing file "'atis.c.diff'"
  2892. else
  2893. echo 'x - atis.c.diff'
  2894. cat << \RAZZLE!DAZZLE > atis.c.diff
  2895. *** etc/atis.c.orig    Thu May 19 12:17:32 1988
  2896. --- etc/atis.c    Fri Jan 27 12:27:46 1989
  2897. ***************
  2898. *** 103,108
  2899.   void atis_end();
  2900.   void atis_debuginc();
  2901.   void atis_undebug();
  2902.   
  2903.   void
  2904.   nbp_reload()
  2905.  
  2906. --- 103,109 -----
  2907.   void atis_end();
  2908.   void atis_debuginc();
  2909.   void atis_undebug();
  2910. + private int nbpcpy(), c2pkt_ename(), pkt2c_ename();
  2911.   
  2912.   void
  2913.   nbp_reload()
  2914. ***************
  2915. *** 121,127
  2916.     } else log(L_UERR|1, "dump file open failed");
  2917.     log(1, "loaded %d entries",cnt);
  2918.     sigsetmask(mask);
  2919. !   (void)signal(SIGHUP, nbp_reload);
  2920.   }
  2921.   
  2922.   void
  2923.  
  2924. --- 122,128 -----
  2925.     } else log(L_UERR|1, "dump file open failed");
  2926.     log(1, "loaded %d entries",cnt);
  2927.     sigsetmask(mask);
  2928. !   (void)signal(SIGHUP, (int (*)())nbp_reload);
  2929.   }
  2930.   
  2931.   void
  2932. ***************
  2933. *** 142,148
  2934.     } else log(L_UERR|1, "dump file (write) open failed");
  2935.     log(1, "Dumped %d entries",cnt);
  2936.     sigsetmask(mask);
  2937. !   (void)signal(SIGQUIT, nbp_dump);
  2938.   }
  2939.   
  2940.   void
  2941.  
  2942. --- 143,149 -----
  2943.     } else log(L_UERR|1, "dump file (write) open failed");
  2944.     log(1, "Dumped %d entries",cnt);
  2945.     sigsetmask(mask);
  2946. !   (void)signal(SIGQUIT, (int (*)())nbp_dump);
  2947.   }
  2948.   
  2949.   void
  2950. ***************
  2951. *** 161,167
  2952.     log(0, "DEBUGGING OFF");
  2953.     if (tempdebugfile)
  2954.       nologfile();
  2955. !   signal(SIGEMT, atis_debuginc);
  2956.     sigsetmask(mask);
  2957.   }
  2958.   
  2959.  
  2960. --- 162,168 -----
  2961.     log(0, "DEBUGGING OFF");
  2962.     if (tempdebugfile)
  2963.       nologfile();
  2964. !   signal(SIGEMT, (int (*)())atis_debuginc);
  2965.     sigsetmask(mask);
  2966.   }
  2967.   
  2968. ***************
  2969. *** 176,182
  2970.     if (dlevel < L_LVLMAX)
  2971.       dlevel++;
  2972.     log(0, "DEBUG LEVEL %d", dlevel);
  2973. !   signal(SIGIOT, atis_debuginc);
  2974.     sigsetmask(mask);
  2975.   }
  2976.   
  2977.  
  2978. --- 177,183 -----
  2979.     if (dlevel < L_LVLMAX)
  2980.       dlevel++;
  2981.     log(0, "DEBUG LEVEL %d", dlevel);
  2982. !   signal(SIGIOT, (int (*)())atis_debuginc);
  2983.     sigsetmask(mask);
  2984.   }
  2985.   
  2986. ***************
  2987. *** 354,364
  2988.     abInit(TRUE);            /* init driver */
  2989.     nbpInit();            /* init NBP */
  2990.     nbptab_init();
  2991. !   (void)signal(SIGHUP, nbp_reload);
  2992. !   (void)signal(SIGQUIT, nbp_dump);
  2993. !   (void)signal(SIGTERM, atis_end);
  2994. !   (void)signal(SIGIOT, atis_debuginc);
  2995. !   (void)signal(SIGEMT, atis_undebug);
  2996.   
  2997.     log(0, "Reply num max for lkup reply is %d (based on %d)",
  2998.         NUMREPLYMAX, NBPTUPSIZE);
  2999.  
  3000. --- 355,365 -----
  3001.     abInit(TRUE);            /* init driver */
  3002.     nbpInit();            /* init NBP */
  3003.     nbptab_init();
  3004. !   (void)signal(SIGHUP, (int (*)())nbp_reload);
  3005. !   (void)signal(SIGQUIT, (int (*)())nbp_dump);
  3006. !   (void)signal(SIGTERM, (int (*)())atis_end);
  3007. !   (void)signal(SIGIOT, (int (*)())atis_debuginc);
  3008. !   (void)signal(SIGEMT, (int (*)())atis_undebug);
  3009.   
  3010.     log(0, "Reply num max for lkup reply is %d (based on %d)",
  3011.         NUMREPLYMAX, NBPTUPSIZE);
  3012. RAZZLE!DAZZLE
  3013. fi    # End atis.c.diff
  3014. if test -f papof.c.diff
  3015. then
  3016.     echo shar: will not overwrite existing file "'papof.c.diff'"
  3017. else
  3018. echo 'x - papof.c.diff'
  3019. cat << \RAZZLE!DAZZLE > papof.c.diff
  3020. *** applications/papif/papof.c.orig    Thu May 19 12:18:50 1988
  3021. --- applications/papif/papof.c    Fri Jan 27 12:05:02 1989
  3022. ***************
  3023. *** 54,60
  3024.   
  3025.     while (1) {
  3026.   #ifdef BANNER
  3027. !     if ((bannerfile = fopen(BANNERFILE, "w")) < 0) {
  3028.         perror("Can't open .banner");
  3029.         exit(8);
  3030.       }
  3031.  
  3032. --- 54,60 -----
  3033.   
  3034.     while (1) {
  3035.   #ifdef BANNER
  3036. !     if ((bannerfile = fopen(BANNERFILE, "w")) == NULL) {
  3037.         perror("Can't open .banner");
  3038.         exit(8);
  3039.       }
  3040. RAZZLE!DAZZLE
  3041. fi    # End papof.c.diff
  3042. echo '***** End of' CAP patches '*****'
  3043. exit
  3044.  
  3045.