home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume26 / archie / part05 < prev    next >
Encoding:
Text File  |  1991-11-23  |  34.5 KB  |  1,230 lines

  1. Newsgroups: comp.sources.misc
  2. From: brendan@cs.widener.edu (Brendan Kehoe)
  3. Subject:  v26i050:  archie - A Prospero client for Archie, v1.2, Part05/05
  4. Message-ID: <1991Nov24.045501.4971@sparky.imd.sterling.com>
  5. X-Md4-Signature: cf680b55964741ba1390bca357edc585
  6. Date: Sun, 24 Nov 1991 04:55:01 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: brendan@cs.widener.edu (Brendan Kehoe)
  10. Posting-number: Volume 26, Issue 50
  11. Archive-name: archie/part05
  12. Environment: UNIX, VMS
  13. Supersedes: archie: Volume 22, Issue 35-39
  14.  
  15. #! /bin/sh
  16. # into a shell via "sh file" or similar.  To overwrite existing files,
  17. # type "sh file -c".
  18. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  19. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  20. # Contents:  ./Prospero ./archie.h ./archie.lnk ./atalloc.c
  21. #   ./copyright.h ./makefile.dos ./makefile.os2 ./patchlevel.h
  22. #   ./pauthent.h ./pcompat.h ./pmachine.h ./pprot.h ./ptalloc.c
  23. #   ./rdgram.h ./regex.h ./vl_comp.c ./vms.h ./vms/in.h
  24. #   ./vms/pseudos.h ./vms/signal.h ./vms/socket.h ./vms/time.h
  25. #   ./vms/types.h ./vms/wall.opt
  26. # Wrapped by kent@sparky on Wed Nov 20 18:23:45 1991
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. echo If this archive is complete, you will see the following message:
  29. echo '          "shar: End of archive 5 (of 5)."'
  30. if test -f './Prospero' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'./Prospero'\"
  32. else
  33.   echo shar: Extracting \"'./Prospero'\" \(1409 characters\)
  34.   sed "s/^X//" >'./Prospero' <<'END_OF_FILE'
  35. XProspero also allows users to access Archie as if it were part of a
  36. Xfile system.  Here is an example of how Prospero can be used to access
  37. XArchie in this manner.
  38. X
  39. X  Script started on Mon Jul  1 22:36:42 1991
  40. X  % source /home/ftp/archie/pfs/bin/vfsetup.source
  41. X  % vfsetup guest
  42. X  % venable
  43. X  % cd /archive-sites/archie/regex
  44. X  % cd prospero (This command specifies the query)
  45. X  % ls -l
  46. X  total 0
  47. X  -r--r--r--   0 -               0 -            info-prospero.arc
  48. X  dr-xr-xr-x   0 -               0 -            prospero
  49. X  dr-xr-xr-x   0 -               0 -            prospero-papers
  50. X  -r--r--r--   0 -               0 -            prospero.arc
  51. X  -r--r--r--   0 -               0 -            prospero.tar.Z
  52. X  (Note that the "vls" command could have been used)
  53. X  (to show where the files were actually stored    )
  54. X  % ls prospero (list a result if it is a directory)
  55. X  prog.tar.Z      prospero.tar.Z
  56. X  % cat info-prospero.arc  (The file is automatically retrieved and displayed)
  57. X  >From bcn@n1dmm  Tue Dec  4 02:33:36 1990
  58. X  Received: from n1dmm.cs.washington.edu by june.cs.washington.edu (5.64/7.0jh)
  59. X          id AA24763; Tue, 4 Dec 90 02:33:36 -0800
  60. X  Received: by n1dmm.cs.washington.edu (5.64/7.0h)
  61. X          id AA08497; Tue, 4 Dec 90 02:33:31 -0800
  62. X  Date: Tue, 4 Dec 90 02:33:31 -0800
  63. X  From: bcn@cs.washington.edu (Clifford Neuman)
  64. X  ...
  65. X  % vdisable
  66. X  % exit
  67. X  script done on Mon Jul  1 22:39:33 1991
  68. END_OF_FILE
  69.   if test 1409 -ne `wc -c <'./Prospero'`; then
  70.     echo shar: \"'./Prospero'\" unpacked with wrong size!
  71.   fi
  72.   # end of './Prospero'
  73. fi
  74. if test -f './archie.h' -a "${1}" != "-c" ; then 
  75.   echo shar: Will not clobber existing file \"'./archie.h'\"
  76. else
  77.   echo shar: Extracting \"'./archie.h'\" \(2199 characters\)
  78.   sed "s/^X//" >'./archie.h' <<'END_OF_FILE'
  79. X/*
  80. X * archie.h : Definitions for the programmatic Prospero interface to Archie
  81. X *
  82. X *     Written by Brendan Kehoe (brendan@cs.widener.edu), 
  83. X *                George Ferguson (ferguson@cs.rochester.edu), and
  84. X *                Clifford Neuman (bcn@isi.edu).
  85. X */
  86. X
  87. X/*
  88. X * Archie server (one of):   archie.sura.net
  89. X *                 archie.mcgill.ca
  90. X *                           archie.funet.fi
  91. X *                           archie.au
  92. X *                 archie.doc.ic.ac.uk
  93. X */
  94. X#define ARCHIE_HOST "ARCHIE.SURA.NET"
  95. X
  96. X/* You don't wanna touch this.  */
  97. X#ifndef XARCHIE
  98. X# define ARCHIES    "archie.sura.net (USA, Mexico, etc)","archie.mcgill.ca (Canada)","archie.funet.fi (Finland/Mainland Europe)","archie.au (Australia/New Zealand)","archie.doc.ic.ac.uk (Great Britain/Ireland)"
  99. X# define NARCHIES    5
  100. X#endif
  101. X
  102. X/*
  103. X * Default value for max hits.  Note that this is normally different
  104. X * for different client implementations.  Doing so makes it easier to
  105. X * collect statistics on the use of the various clients.
  106. X */
  107. X#ifdef VMS
  108. X# define    MAX_HITS    98    /* VMS Client */
  109. X#else
  110. X# ifdef XARCHIE
  111. X#  define    MAX_HITS    99    /* X Client */
  112. X# else
  113. X#  define    MAX_HITS    95    /* Normal client */
  114. X# endif
  115. X#endif
  116. X
  117. X/*
  118. X * CLIENT_VERSION may be used to identify the version of the client if 
  119. X * distributed separately from the Prospero distribution.  The version
  120. X * command should then identify both the client version and the Prospero
  121. X * version identifiers.   
  122. X */
  123. X#ifdef XARCHIE
  124. X# define CLIENT_VERSION    "1.3-X"
  125. X#else
  126. X# define CLIENT_VERSION "1.2"
  127. X#endif
  128. X
  129. X/* Procedures from user/aquery.c */
  130. X
  131. X/* archie_query(host,string,max_hits,offset,query_type,cmp_proc,flags) */
  132. Xextern VLINK archie_query(); 
  133. X
  134. X/* defcmplink(p,q) and invdatecmplink(p,q)                             */
  135. Xextern int defcmplink();    /* Compare by host then by filename    */
  136. Xextern int invdatecmplink();    /* Compare links inverted by date      */
  137. X
  138. X/* Definitions for the comparison procedures                           */
  139. X#define AQ_DEFCMP    defcmplink
  140. X#define AQ_INVDATECMP    invdatecmplink
  141. X
  142. X/* Flags                                                               */
  143. X#define AQ_NOSORT    0x01    /* Don't sort                          */
  144. X#define AQ_NOTRANS    0x02    /* Don't translate Archie responses    */
  145. END_OF_FILE
  146.   if test 2199 -ne `wc -c <'./archie.h'`; then
  147.     echo shar: \"'./archie.h'\" unpacked with wrong size!
  148.   fi
  149.   # end of './archie.h'
  150. fi
  151. if test -f './archie.lnk' -a "${1}" != "-c" ; then 
  152.   echo shar: Will not clobber existing file \"'./archie.lnk'\"
  153. else
  154.   echo shar: Extracting \"'./archie.lnk'\" \(237 characters\)
  155.   sed "s/^X//" >'./archie.lnk' <<'END_OF_FILE'
  156. Xaquery.lo archie.lo atalloc.lo dirsend.lo+
  157. XGet_pauth.lo get_vdir.lo perrmesg.lo procquery.lo+
  158. Xptalloc.lo regex.lo stcopy.lo support.lo+
  159. Xvlalloc.lo vl_comp.lo
  160. Xarchie.unp
  161. Xarchie/map/noi/co/li/stack:45000
  162. Xlsocket lnetlib lconfig lpc llibce
  163. END_OF_FILE
  164.   if test 237 -ne `wc -c <'./archie.lnk'`; then
  165.     echo shar: \"'./archie.lnk'\" unpacked with wrong size!
  166.   fi
  167.   # end of './archie.lnk'
  168. fi
  169. if test -f './atalloc.c' -a "${1}" != "-c" ; then 
  170.   echo shar: Will not clobber existing file \"'./atalloc.c'\"
  171. else
  172.   echo shar: Extracting \"'./atalloc.c'\" \(1819 characters\)
  173.   sed "s/^X//" >'./atalloc.c' <<'END_OF_FILE'
  174. X/*
  175. X * Copyright (c) 1989, 1990 by the University of Washington
  176. X *
  177. X * For copying and distribution information, please see the file
  178. X * <copyright.h>.
  179. X */
  180. X
  181. X#include <copyright.h>
  182. X#include <stdio.h>
  183. X
  184. X#include <pfs.h>
  185. X#include <pmachine.h> /* for correct definition of ZERO */
  186. X
  187. Xstatic PATTRIB    lfree = NULL;
  188. Xint        pattrib_count = 0;
  189. Xint        pattrib_max = 0;
  190. X
  191. X/*
  192. X * atalloc - allocate and initialize vlink structure
  193. X *
  194. X *    ATALLOC returns a pointer to an initialized structure of type
  195. X *    PATTRIB.  If it is unable to allocate such a structure, it
  196. X *    returns NULL.
  197. X */
  198. XPATTRIB
  199. Xatalloc()
  200. X    {
  201. X    PATTRIB    at;
  202. X    if(lfree) {
  203. X        at = lfree;
  204. X        lfree = lfree->next;
  205. X    }
  206. X    else {
  207. X        at = (PATTRIB) malloc(sizeof(PATTRIB_ST));
  208. X        if (!at) return(NULL);
  209. X        pattrib_max++;
  210. X    }
  211. X
  212. X    pattrib_count++;
  213. X
  214. X    ZERO(at);
  215. X    /* Initialize and fill in default values; all items are
  216. X       0 [or NULL] save precedence */
  217. X    at->precedence = ATR_PREC_OBJECT;
  218. X
  219. X    return(at);
  220. X    }
  221. X
  222. X/*
  223. X * atfree - free a PATTRIB structure
  224. X *
  225. X *    ATFREE takes a pointer to a PATTRRIB structure and adds it to
  226. X *    the free list for later reuse.
  227. X */
  228. Xvoid
  229. Xatfree(at)
  230. X    PATTRIB    at;
  231. X    {
  232. X    if(at->aname) stfree(at->aname);
  233. X
  234. X    if((strcmp(at->avtype,"ASCII") == 0) && at->value.ascii) 
  235. X        stfree(at->value.ascii);
  236. X    if((strcmp(at->avtype,"LINK") == 0) && at->value.link) 
  237. X        vlfree(at->value.link);
  238. X    
  239. X    if(at->avtype) stfree(at->avtype);
  240. X
  241. X    at->next = lfree;
  242. X    at->previous = NULL;
  243. X    lfree = at;
  244. X    pattrib_count--;
  245. X    }
  246. X
  247. X/*
  248. X * atlfree - free a PATTRIB structure
  249. X *
  250. X *    ATLFREE takes a pointer to a PATTRIB structure frees it and any linked
  251. X *    PATTRIB structures.  It is used to free an entrie list of PATTRIB
  252. X *    structures.
  253. X */
  254. Xvoid
  255. Xatlfree(at)
  256. X    PATTRIB    at;
  257. X    {
  258. X    PATTRIB    nxt;
  259. X
  260. X    while(at != NULL) {
  261. X        nxt = at->next;
  262. X        atfree(at);
  263. X        at = nxt;
  264. X    }
  265. X    }
  266. X
  267. END_OF_FILE
  268.   if test 1819 -ne `wc -c <'./atalloc.c'`; then
  269.     echo shar: \"'./atalloc.c'\" unpacked with wrong size!
  270.   fi
  271.   # end of './atalloc.c'
  272. fi
  273. if test -f './copyright.h' -a "${1}" != "-c" ; then 
  274.   echo shar: Will not clobber existing file \"'./copyright.h'\"
  275. else
  276.   echo shar: Extracting \"'./copyright.h'\" \(896 characters\)
  277.   sed "s/^X//" >'./copyright.h' <<'END_OF_FILE'
  278. X/* 
  279. X  Copyright (c) 1989, 1990, 1991 by the University of Washington
  280. X
  281. X  Permission to use, copy, modify, and distribute this software and its
  282. X  documentation for non-commercial purposes and without fee is hereby
  283. X  granted, provided that the above copyright notice appear in all copies
  284. X  and that both the copyright notice and this permission notice appear in
  285. X  supporting documentation, and that the name of the University of
  286. X  Washington not be used in advertising or publicity pertaining to
  287. X  distribution of the software without specific, written prior
  288. X  permission.  The University of Washington makes no representations
  289. X  about the suitability of this software for any purpose.  It is
  290. X  provided "as is" without express or implied warranty.
  291. X
  292. X  Prospero was written by Clifford Neuman (bcn@isi.edu).
  293. X
  294. X  Questions concerning this software should be directed to 
  295. X  info-prospero@isi.edu.
  296. X
  297. X  */
  298. END_OF_FILE
  299.   if test 896 -ne `wc -c <'./copyright.h'`; then
  300.     echo shar: \"'./copyright.h'\" unpacked with wrong size!
  301.   fi
  302.   # end of './copyright.h'
  303. fi
  304. if test -f './makefile.dos' -a "${1}" != "-c" ; then 
  305.   echo shar: Will not clobber existing file \"'./makefile.dos'\"
  306. else
  307.   echo shar: Extracting \"'./makefile.dos'\" \(592 characters\)
  308.   sed "s/^X//" >'./makefile.dos' <<'END_OF_FILE'
  309. X#
  310. X# Last changed: 11/20/91, v1.2
  311. X#
  312. X# Makefile for the minimal build for an archie Prospero client.
  313. X#.INCLUDE ../../../builtins
  314. X
  315. XOBJS    = aquery.lo    archie.lo    atalloc.lo    dirsend.lo    \
  316. X      get_pauth.lo    get_vdir.lo    perrmesg.lo    procquery.lo    \
  317. X      ptalloc.lo    regex.lo    stcopy.lo    support.lo    \
  318. X      vlalloc.lo    vl_comp.lo
  319. XHDRS    = archie.h    pmachine.h    pcompat.h
  320. X
  321. XDEFINES    = -DDEBUG -DNOREGEX -DUSG
  322. X
  323. XCFLAGS    = -Oeclgsz -Gs -Zi -W4 -I. $(DEFINES)
  324. X
  325. XEXE    = archie.exe
  326. X
  327. Xall: $(EXE)
  328. X
  329. X$(OBJS): $(HDRS)
  330. X
  331. X$(EXE): $(OBJS) Makefile archie.lnk
  332. X    link @archie.lnk
  333. X    exepack archie.unp archie.exe
  334. X
  335. Xclean:
  336. X    +-del *.lo
  337. X    +-del *.exe
  338. X
  339. END_OF_FILE
  340.   if test 592 -ne `wc -c <'./makefile.dos'`; then
  341.     echo shar: \"'./makefile.dos'\" unpacked with wrong size!
  342.   fi
  343.   # end of './makefile.dos'
  344. fi
  345. if test -f './makefile.os2' -a "${1}" != "-c" ; then 
  346.   echo shar: Will not clobber existing file \"'./makefile.os2'\"
  347. else
  348.   echo shar: Extracting \"'./makefile.os2'\" \(800 characters\)
  349.   sed "s/^X//" >'./makefile.os2' <<'END_OF_FILE'
  350. X#
  351. X# Last changed: 11/20/91, v1.2
  352. X#
  353. X# Makefile for the minimal build for an archie Prospero client.
  354. X.INCLUDE ../../../builtins
  355. X
  356. XOBJS    = aquery.obj    archie.obj    atalloc.obj    dirsend.obj    \
  357. X      get_pauth.obj    get_vdir.obj    perrmesg.obj    procquery.obj    \
  358. X      ptalloc.obj    regex.obj    stcopy.obj    support.obj    \
  359. X      vlalloc.obj    vl_comp.obj
  360. XHDRS    = archie.h    pmachine.h    pcompat.h
  361. X
  362. XDEFINES    = -DDEBUG -DNOREGEX
  363. X
  364. XIFLAGS    = -I. -I../../../include $(DEFINES)
  365. X
  366. XLFLAGS     = /stack:30000/nod/noe/noi/map/CO
  367. XLIBS    = pctcp bsd ftpcrt socket os2
  368. XEXE    = archie.exe
  369. X
  370. Xall: $(EXE)
  371. X
  372. Xinstall: $(EXE)
  373. X    cp $[m,*.exe,$**] ..\..\..\bin
  374. X    @touch install
  375. X
  376. X$(OBJS): $(HDRS)
  377. X
  378. X$(EXE): $(OBJS) Makefile
  379. X    $(LD) $(LFLAGS) $(L_DEBUG) <@<
  380. X$[s,"+ \n",$[m,*.obj,$**]]
  381. X$*
  382. X$*
  383. X$(LIBS)
  384. X
  385. X<
  386. X    +markexe lfns $@
  387. X    +markexe windowcompat $@
  388. X
  389. Xclean:
  390. X    +-del *.obj
  391. X    +-del *.exe
  392. X
  393. END_OF_FILE
  394.   if test 800 -ne `wc -c <'./makefile.os2'`; then
  395.     echo shar: \"'./makefile.os2'\" unpacked with wrong size!
  396.   fi
  397.   # end of './makefile.os2'
  398. fi
  399. if test -f './patchlevel.h' -a "${1}" != "-c" ; then 
  400.   echo shar: Will not clobber existing file \"'./patchlevel.h'\"
  401. else
  402.   echo shar: Extracting \"'./patchlevel.h'\" \(345 characters\)
  403.   sed "s/^X//" >'./patchlevel.h' <<'END_OF_FILE'
  404. X/*
  405. X * Archie v1.2
  406. X *
  407. X * History:
  408. X *
  409. X * 11/20/91 v1.2 - Release.
  410. X * 11/18/91      - ported to DOS & OS/2
  411. X * 11/12/91      - finally got to test under Multinet 3.0
  412. X * 10/03/91      - replaced regex.c for oz
  413. X * 09/25/91     - added Wallongong support
  414. X * 08/30/91      - ported to VMS
  415. X * 08/20/91 v1.1 - Major revisions
  416. X * 07/31/91 v1.0 - Original
  417. X */
  418. END_OF_FILE
  419.   if test 345 -ne `wc -c <'./patchlevel.h'`; then
  420.     echo shar: \"'./patchlevel.h'\" unpacked with wrong size!
  421.   fi
  422.   # end of './patchlevel.h'
  423. fi
  424. if test -f './pauthent.h' -a "${1}" != "-c" ; then 
  425.   echo shar: Will not clobber existing file \"'./pauthent.h'\"
  426. else
  427.   echo shar: Extracting \"'./pauthent.h'\" \(839 characters\)
  428.   sed "s/^X//" >'./pauthent.h' <<'END_OF_FILE'
  429. X/*
  430. X * Copyright (c) 1989, 1990, 1991 by the University of Washington
  431. X *
  432. X * For copying and distribution information, please see the file
  433. X * <copyright.h>.
  434. X */
  435. X
  436. X#include <copyright.h>
  437. X
  438. X#define PFSA_UNAUTHENTICATED        1
  439. X
  440. Xstruct pfs_auth_info {
  441. X    char            auth_type[100];
  442. X    char            authenticator[250];
  443. X};
  444. X
  445. Xtypedef struct pfs_auth_info *PAUTH;
  446. Xtypedef struct pfs_auth_info PAUTH_ST;
  447. X
  448. XPAUTH get_pauth();
  449. X
  450. X#ifndef VMS
  451. X# ifndef IN_H
  452. X#  include <netinet/in.h>
  453. X#  define IN_H
  454. X# endif
  455. X#else
  456. X# ifndef _ARCHIE_VMS
  457. X#  include <vms.h>
  458. X# endif
  459. X#endif
  460. X
  461. Xstruct client_info {
  462. X    int                ainfo_type;
  463. X    char            *auth_type;
  464. X    char            *authenticator;
  465. X    char            *userid;
  466. X    short            port;
  467. X    struct in_addr        haddr;
  468. X    struct pfs_auth_info    *previous;
  469. X    struct pfs_auth_info    *next;
  470. X};
  471. X
  472. Xtypedef struct client_info *CINFO;
  473. Xtypedef struct client_info CINFO_ST;
  474. END_OF_FILE
  475.   if test 839 -ne `wc -c <'./pauthent.h'`; then
  476.     echo shar: \"'./pauthent.h'\" unpacked with wrong size!
  477.   fi
  478.   # end of './pauthent.h'
  479. fi
  480. if test -f './pcompat.h' -a "${1}" != "-c" ; then 
  481.   echo shar: Will not clobber existing file \"'./pcompat.h'\"
  482. else
  483.   echo shar: Extracting \"'./pcompat.h'\" \(1477 characters\)
  484.   sed "s/^X//" >'./pcompat.h' <<'END_OF_FILE'
  485. X/*
  486. X * Copyright (c) 1989, 1990 by the University of Washington
  487. X *
  488. X * For copying and distribution information, please see the file
  489. X * <copyright.h>.
  490. X */
  491. X
  492. X#include <copyright.h>
  493. X
  494. X/* 
  495. X * pcompat.h - Definitions for compatability library
  496. X *
  497. X * This file contains the defintions used by the compatability
  498. X * library.  Among the definitions are the possible values for
  499. X * pfs_disable_flag.  This file also contains the external 
  500. X * declaration of that variable.  Note, however that the 
  501. X * the module pfs_disable_flag.o is included in libpfs.a
  502. X * because some of the routines in that library set it.
  503. X * The only place it is checked, however, is in pfs_access, 
  504. X * found in libpcompat.a
  505. X *
  506. X */
  507. X
  508. Xextern    int        pfs_default;
  509. Xextern    int        pfs_enable;
  510. X
  511. X/* Definitions for values of pfs_enable */
  512. X#define PMAP_DISABLE      0
  513. X#define PMAP_ENABLE       1
  514. X#define PMAP_COLON      2
  515. X#define PMAP_ATSIGN_NF      3
  516. X#define PMAP_ATSIGN      4
  517. X
  518. X#define DISABLE_PFS(stmt) {int DpfStmp; DpfStmp = pfs_enable;\
  519. X               pfs_enable = PMAP_DISABLE; \
  520. X               stmt; \
  521. X               pfs_enable = DpfStmp;}
  522. X
  523. X/* Definitions for PFS_ACCESS */
  524. X#define PFA_MAP           0  /* Map the file name only                       */
  525. X#define PFA_CREATE        1  /* Create file if not found                     */
  526. X#define PFA_CRMAP         2  /* Map file name.  Map to new name if not found */
  527. X#define PFA_RO            4  /* Access to file is read only                  */
  528. X
  529. X#define check_pfs_default() if(pfs_default == -1) get_pfs_default()
  530. END_OF_FILE
  531.   if test 1477 -ne `wc -c <'./pcompat.h'`; then
  532.     echo shar: \"'./pcompat.h'\" unpacked with wrong size!
  533.   fi
  534.   # end of './pcompat.h'
  535. fi
  536. if test -f './pmachine.h' -a "${1}" != "-c" ; then 
  537.   echo shar: Will not clobber existing file \"'./pmachine.h'\"
  538. else
  539.   echo shar: Extracting \"'./pmachine.h'\" \(1454 characters\)
  540.   sed "s/^X//" >'./pmachine.h' <<'END_OF_FILE'
  541. X/*
  542. X * Miscellaneous system dependencies.
  543. X *
  544. X * I kept the name pmachine.h because it was already in all of the files...this
  545. X * barely resembles the pmachine.h that comes with the real Prospero, tho.
  546. X *
  547. X * v1.2.0 - 11/19/91 (mmt) - added MSDOS & OS2 stuff
  548. X */
  549. X
  550. X#ifdef hpux
  551. X# define FUNCS
  552. X# define NOREGEX
  553. X#endif
  554. X
  555. X#if defined(USG) || defined(SYSV)
  556. X# define FUNCS
  557. X#endif
  558. X
  559. X#ifdef OS2
  560. X# include <pctcp.h>
  561. X#endif
  562. X#ifdef MSDOS
  563. X# include <string.h>
  564. X# include <stdlib.h>
  565. X#endif
  566. X
  567. X#ifdef _AIX
  568. X#define _NONSTD_TYPES
  569. X#define _BSD_INCLUDES
  570. X#endif
  571. X
  572. X/* ==== */
  573. X#ifdef FUNCS
  574. X# define index        strchr
  575. X# define rindex        strrchr
  576. X# ifndef AUX
  577. X#  define bcopy(a,b,n)    memcpy(b,a,n)
  578. X#  define bzero(a,n)    memset(a,0,n)
  579. X# endif
  580. X#endif
  581. X
  582. X#if defined(BULL) || defined(_AIX)
  583. X# define NEED_SELECT_H
  584. X#endif
  585. X#if defined(USG) || defined(UTS) || defined(_AIX)
  586. X# define NEED_STRING_H
  587. X#endif
  588. X#if defined(USG) || defined(UTS) || defined(_AIX) || defined(AUX)
  589. X# define NEED_TIME_H
  590. X#endif
  591. X
  592. X#ifdef VMS
  593. X/* Get the system status stuff.  */
  594. X# include <ssdef.h>
  595. X#endif /* VMS */
  596. X
  597. X/*
  598. X * FD_SET: lib/pfs/dirsend.c, user/vget/ftp.c
  599. X */
  600. X#if !defined(FD_SET) && !defined(VMS)
  601. X#define    NFDBITS        32
  602. X#define    FD_SETSIZE    32
  603. X#define    FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
  604. X#define    FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
  605. X#define    FD_ISSET(n, p)    ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
  606. X#define FD_ZERO(p)    bzero((char *)(p), sizeof(*(p)))
  607. X#endif
  608. END_OF_FILE
  609.   if test 1454 -ne `wc -c <'./pmachine.h'`; then
  610.     echo shar: \"'./pmachine.h'\" unpacked with wrong size!
  611.   fi
  612.   # end of './pmachine.h'
  613. fi
  614. if test -f './pprot.h' -a "${1}" != "-c" ; then 
  615.   echo shar: Will not clobber existing file \"'./pprot.h'\"
  616. else
  617.   echo shar: Extracting \"'./pprot.h'\" \(1825 characters\)
  618.   sed "s/^X//" >'./pprot.h' <<'END_OF_FILE'
  619. X/*
  620. X * Copyright (c) 1989, 1990, 1991 by the University of Washington
  621. X *
  622. X * For copying and distribution information, please see the file
  623. X * <copyright.h>.
  624. X *
  625. X * v1.2.0 - 11/19/91 (mmt) - added MSDOS & OS2 stuff
  626. X */
  627. X
  628. X#include <copyright.h>
  629. X
  630. X#ifndef MAXPATHLEN
  631. X# ifdef VMS
  632. X#  define MAXPATHLEN 32
  633. X# else /* not VMS */
  634. X#  if defined(MSDOS) && !defined(OS2)
  635. X#   define MAXPATHLEN 255
  636. X#  else /* not MSDOS */
  637. X#   include <sys/param.h>
  638. X#  endif /* MSDOS && !OS2 */
  639. X# endif /* VMS */
  640. X#endif
  641. X
  642. X/* Protocol Definitions */
  643. X
  644. X#define           VFPROT_VNO    1      /* Protocol Version Number           */
  645. X
  646. X#define           DIRSRV_PORT      1525   /* Server port used if not in srvtab */
  647. X#define        PROSPERO_PORT    191    /* Officially assigned prived port   */
  648. X#define           PROS_FIRST_PRIVP 901    /* First privileged port to try      */
  649. X#define        PROS_NUM_PRIVP   20     /* Number of privileged ports to try */
  650. X
  651. X#define           MAXPKT            1024   /* Max size of response from server  */
  652. X#define           SEQ_SIZE        32     /* Max size of sequence text in resp */ 
  653. X#define           MAX_DIR_LINESIZE 160+MAXPATHLEN /* Max linesize in directory */
  654. X
  655. X#define           MAX_FWD_DEPTH    20     /* Max fwd pointers to follow        */
  656. X
  657. X#define S_AD_SZ        sizeof(struct sockaddr_in)
  658. X
  659. X/* Replacement for strtok that doesn't keep state.  Both the variable  */
  660. X/* S and the variable S_next must be defined.  To initialize, assign   */
  661. X/* the string to be stepped through to S_next, then call get_token on  */
  662. X/* S.  The first token will be in S, and S_next will point to the next */
  663. X/* token.  Like strtok, this macro does modify the string passed to it */
  664. X#define get_token(S,C) \
  665. X    S = S/**/_next; \
  666. X    if(S) { \
  667. X     while(*S == C) S++; \
  668. X     S/**/_next = index(S,C); \
  669. X     if(S/**/_next) *(S/**/_next++) = '\0'; \
  670. X     if(!*S) S = NULL; \
  671. X    }
  672. X
  673. X
  674. END_OF_FILE
  675.   if test 1825 -ne `wc -c <'./pprot.h'`; then
  676.     echo shar: \"'./pprot.h'\" unpacked with wrong size!
  677.   fi
  678.   # end of './pprot.h'
  679. fi
  680. if test -f './ptalloc.c' -a "${1}" != "-c" ; then 
  681.   echo shar: Will not clobber existing file \"'./ptalloc.c'\"
  682. else
  683.   echo shar: Extracting \"'./ptalloc.c'\" \(1680 characters\)
  684.   sed "s/^X//" >'./ptalloc.c' <<'END_OF_FILE'
  685. X/*
  686. X * Copyright (c) 1989, 1990, 1991 by the University of Washington
  687. X *
  688. X * For copying and distribution information, please see the file
  689. X * <copyright.h>.
  690. X *
  691. X * v1.2.0 - 11/19/91 (mmt) - added MSDOS & OS2 stuff
  692. X */
  693. X
  694. X#include <copyright.h>
  695. X#include <stdio.h>
  696. X
  697. X#include <pfs.h>
  698. X#include <pmachine.h> /* for correct definition of ZERO */
  699. X#ifdef MSDOS
  700. X# define free _pfree   /* otherwise we get conflicts with free() */
  701. X#endif
  702. X
  703. Xstatic PTEXT    free = NULL;
  704. Xint         ptext_count = 0;
  705. Xint        ptext_max = 0;
  706. X
  707. X/*
  708. X * ptalloc - allocate and initialize ptext structure
  709. X *
  710. X *    PTALLOC returns a pointer to an initialized structure of type
  711. X *    PTEXT.  If it is unable to allocate such a structure, it
  712. X *    returns NULL.
  713. X */
  714. XPTEXT
  715. Xptalloc()
  716. X    {
  717. X    PTEXT    vt;
  718. X    if(free) {
  719. X        vt = free;
  720. X        free = free->next;
  721. X    }
  722. X    else {
  723. X        vt = (PTEXT) malloc(sizeof(PTEXT_ST));
  724. X        if (!vt) return(NULL);
  725. X        ptext_max++;
  726. X    }
  727. X    ptext_count++;
  728. X
  729. X    /* nearly all parts are 0 [or NULL] */
  730. X    ZERO(vt);
  731. X    /* The offset is to leave room for additional headers */
  732. X    vt->start = vt->dat + MAX_PTXT_HDR;
  733. X
  734. X    return(vt);
  735. X    }
  736. X
  737. X/*
  738. X * ptfree - free a VTEXT structure
  739. X *
  740. X *    VTFREE takes a pointer to a VTEXT structure and adds it to
  741. X *    the free list for later reuse.
  742. X */
  743. Xvoid
  744. Xptfree(vt)
  745. X    PTEXT    vt;
  746. X    {
  747. X    vt->next = free;
  748. X    vt->previous = NULL;
  749. X    free = vt;
  750. X    ptext_count--;
  751. X    }
  752. X
  753. X/*
  754. X * ptlfree - free a VTEXT structure
  755. X *
  756. X *    VTLFREE takes a pointer to a VTEXT structure frees it and any linked
  757. X *    VTEXT structures.  It is used to free an entrie list of VTEXT
  758. X *    structures.
  759. X */
  760. Xvoid
  761. Xptlfree(vt)
  762. X    PTEXT    vt;
  763. X    {
  764. X    PTEXT    nxt;
  765. X
  766. X    while(vt != NULL) {
  767. X        nxt = vt->next;
  768. X        ptfree(vt);
  769. X        vt = nxt;
  770. X    }
  771. X    }
  772. X
  773. END_OF_FILE
  774.   if test 1680 -ne `wc -c <'./ptalloc.c'`; then
  775.     echo shar: \"'./ptalloc.c'\" unpacked with wrong size!
  776.   fi
  777.   # end of './ptalloc.c'
  778. fi
  779. if test -f './rdgram.h' -a "${1}" != "-c" ; then 
  780.   echo shar: Will not clobber existing file \"'./rdgram.h'\"
  781. else
  782.   echo shar: Extracting \"'./rdgram.h'\" \(545 characters\)
  783.   sed "s/^X//" >'./rdgram.h' <<'END_OF_FILE'
  784. X/*
  785. X * Copyright (c) 1991 by the University of Washington
  786. X *
  787. X * For copying and distribution information, please see the file
  788. X * <copyright.h>.
  789. X */
  790. X
  791. X#include <copyright.h>
  792. X
  793. X/* Queuing priorities for datagrams */
  794. X#define           RDGRAM_MAX_PRI   32765  /* Maximum user proiority          */
  795. X#define           RDGRAM_MAX_SPRI  32767  /* Maximum priority for system use */
  796. X#define           RDGRAM_MIN_PRI  -32765  /* Maximum user proiority          */
  797. X#define           RDGRAM_MIN_SPRI -32768  /* Maximum priority for system use */
  798. X
  799. Xint    rdgram_priority = 0;
  800. END_OF_FILE
  801.   if test 545 -ne `wc -c <'./rdgram.h'`; then
  802.     echo shar: \"'./rdgram.h'\" unpacked with wrong size!
  803.   fi
  804.   # end of './rdgram.h'
  805. fi
  806. if test -f './regex.h' -a "${1}" != "-c" ; then 
  807.   echo shar: Will not clobber existing file \"'./regex.h'\"
  808. else
  809.   echo shar: Extracting \"'./regex.h'\" \(616 characters\)
  810.   sed "s/^X//" >'./regex.h' <<'END_OF_FILE'
  811. X/*
  812. X * regex.h : External defs for Ozan Yigit's regex functions, for systems
  813. X *    that don't have them builtin. See regex.c for copyright and other
  814. X *    details.
  815. X *
  816. X * Note that this file can be included even if we're linking against the
  817. X * system routines, since the interface is (deliberately) identical.
  818. X *
  819. X * George Ferguson, ferguson@cs.rochester.edu, 11 Sep 1991.
  820. X */
  821. X
  822. X#if defined(AUX) || defined(USG)
  823. X/* Let them use ours if they wish.  */
  824. X# ifndef NOREGEX
  825. Xextern char *regcmp();
  826. Xextern char *regex();
  827. X#define re_comp regcmp
  828. X#define re_exec regex
  829. X# endif
  830. X#else
  831. Xextern char *re_comp();
  832. Xextern int re_exec();
  833. X#endif
  834. END_OF_FILE
  835.   if test 616 -ne `wc -c <'./regex.h'`; then
  836.     echo shar: \"'./regex.h'\" unpacked with wrong size!
  837.   fi
  838.   # end of './regex.h'
  839. fi
  840. if test -f './vl_comp.c' -a "${1}" != "-c" ; then 
  841.   echo shar: Will not clobber existing file \"'./vl_comp.c'\"
  842. else
  843.   echo shar: Extracting \"'./vl_comp.c'\" \(2137 characters\)
  844.   sed "s/^X//" >'./vl_comp.c' <<'END_OF_FILE'
  845. X/*
  846. X * Copyright (c) 1989, 1990, 1991 by the University of Washington
  847. X *
  848. X * For copying and distribution information, please see the file
  849. X * <copyright.h>.
  850. X */
  851. X
  852. X#include <copyright.h>
  853. X#include <pfs.h>
  854. X
  855. X/*
  856. X * vl_comp - compare the names of two virtual links
  857. X *
  858. X *           VL_COMP compares the names of two links.  It returns
  859. X *           0 if they are equal, negative if vl1 < vl2, and positive if
  860. X *           vl1 > vl2.
  861. X *
  862. X *    ARGS:  vl1,vl2 - Virtual links to be compared
  863. X * 
  864. X * RETURNS:  0 if equal, + is vl1 > vl2, - if vl1 < vl2
  865. X *
  866. X *   NOTES:  Order of significance is as follows.  Existence,
  867. X *           name.  If names do not exist, then hosttype, host,
  868. X *           native filenametype, native filename.  The only time
  869. X *           the name will not exist if if the link is a union link.
  870. X */
  871. Xint
  872. Xvl_comp(vl1,vl2)
  873. X    VLINK    vl1;
  874. X    VLINK    vl2;
  875. X    {
  876. X    int    retval;
  877. X
  878. X    if(vl1->name && !vl2->name) return(1);
  879. X    if(!vl1->name && vl2->name) return(-1);
  880. X    if(vl1->name && vl2->name && (*(vl1->name) || *(vl2->name)))
  881. X        return(strcmp(vl1->name,vl2->name));
  882. X
  883. X    retval = strcmp(vl1->hosttype,vl2->hosttype);
  884. X    if(!retval) retval = strcmp(vl1->host,vl2->host);
  885. X    if(!retval) retval = strcmp(vl1->nametype,vl2->nametype);
  886. X    if(!retval) retval = strcmp(vl1->filename,vl2->filename);
  887. X    return(retval);
  888. X    }
  889. X
  890. X/*
  891. X * vl_equal - compare the values of two virtual links
  892. X *
  893. X *           VL_EQUAL compares the values of two links.  It returns
  894. X *           1 if all important fields are the same, and 0 otherwise.
  895. X *
  896. X *    ARGS:  vl1,vl2 - Virtual links to be compared
  897. X * 
  898. X * RETURNS:  1 if equal, 0 if not equal
  899. X *
  900. X */
  901. Xint
  902. Xvl_equal(vl1,vl2)
  903. X    VLINK    vl1;
  904. X    VLINK    vl2;
  905. X    {
  906. X      return strcmp(vl1->name, vl2->name) == 0         &&
  907. X         vl1->linktype == vl2->linktype            &&
  908. X         strcmp(vl1->type, vl2->type) == 0         &&
  909. X         strcmp(vl1->hosttype, vl2->hosttype) == 0 &&
  910. X         strcmp(vl1->host, vl2->host) == 0         &&
  911. X         strcmp(vl1->nametype, vl2->nametype) == 0 &&
  912. X         strcmp(vl1->filename, vl2->filename) == 0 &&
  913. X         vl1->version == vl2->version              &&
  914. X         vl1->f_magic_no == vl2->f_magic_no        ;
  915. X
  916. X    }
  917. X
  918. END_OF_FILE
  919.   if test 2137 -ne `wc -c <'./vl_comp.c'`; then
  920.     echo shar: \"'./vl_comp.c'\" unpacked with wrong size!
  921.   fi
  922.   # end of './vl_comp.c'
  923. fi
  924. if test -f './vms.h' -a "${1}" != "-c" ; then 
  925.   echo shar: Will not clobber existing file \"'./vms.h'\"
  926. else
  927.   echo shar: Extracting \"'./vms.h'\" \(1009 characters\)
  928.   sed "s/^X//" >'./vms.h' <<'END_OF_FILE'
  929. X#ifndef _ARCHIE_VMS
  930. X#define _ARCHIE_VMS
  931. X#include <pmachine.h>
  932. X
  933. X#if !defined(MULTINET_30) && !defined(WALLONGONG)
  934. X#include "[.vms]pseudos.h"
  935. X#include "[.vms]types.h"
  936. X#include "[.vms]in.h"
  937. X#include "[.vms]signal.h"
  938. X#include "[.vms]socket.h"
  939. X#include "[.vms]time.h"
  940. X
  941. X#else
  942. X
  943. X/* time_t gets multiply defined <ekup> */
  944. X#ifndef __TYPES
  945. X#define __TYPES
  946. X#endif
  947. X#ifdef MULTINET_30
  948. X# include "multinet_root:[multinet.include.sys]types.h"
  949. X# include "multinet_root:[multinet.include.netinet]in.h"
  950. X# include "multinet_root:[multinet.include.sys]socket.h"
  951. X# include "multinet_root:[multinet.include.sys]time.h"
  952. X#endif /* MULTINET_30 */
  953. X
  954. X#ifdef WALLONGONG
  955. X/* We don't want size_t defined.  */
  956. X# ifndef __STDDEF
  957. X#  define __STDDEF
  958. X# endif
  959. X# include "twg$tcp:[netdist.include.sys]types.h"
  960. X# include "twg$tcp:[netdist.include.netinet]in.h"
  961. X# include "twg$tcp:[netdist.include.sys]socket.h"
  962. X# include "twg$tcp:[netdist.include.sys]time.h"
  963. X#endif /* WALLONGONG */
  964. X
  965. X#endif /* !MULTINET and !WALLONGONG */
  966. X
  967. X#endif /* _ARCHIE_VMS */
  968. END_OF_FILE
  969.   if test 1009 -ne `wc -c <'./vms.h'`; then
  970.     echo shar: \"'./vms.h'\" unpacked with wrong size!
  971.   fi
  972.   # end of './vms.h'
  973. fi
  974. if test -f './vms/in.h' -a "${1}" != "-c" ; then 
  975.   echo shar: Will not clobber existing file \"'./vms/in.h'\"
  976. else
  977.   echo shar: Extracting \"'./vms/in.h'\" \(1418 characters\)
  978.   sed "s/^X//" >'./vms/in.h' <<'END_OF_FILE'
  979. X/* netinet/in.h */
  980. Xstruct in_addr
  981. X{
  982. X  union
  983. X  {
  984. X    struct
  985. X    {
  986. X      unsigned char s_b1, s_b2, s_b3, s_b4;
  987. X    } S_un_b;
  988. X    struct
  989. X    {
  990. X      unsigned short s_w1, s_w2;
  991. X    } S_un_w;
  992. X    unsigned long S_addr;
  993. X  } S_un;
  994. X#define   s_addr S_un.S_addr
  995. X#define   s_host S_un.S_un_b.s_b2
  996. X#define   s_net  S_un.S_un_b.s_b1
  997. X#define   s_imp  S_un.S_un_w.s_w2
  998. X#define   s_impno S_un.S_un_b.s_b4
  999. X#define   s_lh   S_un.S_un_b.s_b3
  1000. X};
  1001. X
  1002. X#define INADDR_ANY 0x00000000
  1003. X#define INADDR_BROADCAST 0xffffffff
  1004. X#define INADDR_LOOPBACK 0x7f000001
  1005. X
  1006. Xstruct sockaddr_in
  1007. X{
  1008. X  short sin_family;
  1009. X  unsigned short sin_port;
  1010. X  struct in_addr sin_addr;
  1011. X  char sin_zero[8];
  1012. X};
  1013. X
  1014. X#define ntohl(x) (( (((unsigned long) x) >> 24)& 0x000000ff ) |\
  1015. X                  ( (((unsigned long) x) >> 8) & 0x0000ff00 ) |\
  1016. X                  ( (((unsigned long) x) << 8) & 0x00ff0000 ) |\
  1017. X                  ( (((unsigned long) x) << 24)& 0xff000000 ))
  1018. X#define ntohs(x) (( (((unsigned short) x) >> 8) |\
  1019. X                  ( (((unsigned short) x) << 8)) & 0xffff ))
  1020. X#define htonl(x) (( (((unsigned long) x) >> 24)& 0x000000ff ) |\
  1021. X                  ( (((unsigned long) x) >> 8) & 0x0000ff00 ) |\
  1022. X                  ( (((unsigned long) x) << 8) & 0x00ff0000 ) |\
  1023. X                  ( (((unsigned long) x) << 24)& 0xff000000 ))
  1024. X#define htons(x) (( (((unsigned short) x) >> 8) |\
  1025. X                  ( (((unsigned short) x) << 8)) & 0xffff ))
  1026. X
  1027. X#define IPPORT_RESERVED 1024
  1028. END_OF_FILE
  1029.   if test 1418 -ne `wc -c <'./vms/in.h'`; then
  1030.     echo shar: \"'./vms/in.h'\" unpacked with wrong size!
  1031.   fi
  1032.   # end of './vms/in.h'
  1033. fi
  1034. if test -f './vms/pseudos.h' -a "${1}" != "-c" ; then 
  1035.   echo shar: Will not clobber existing file \"'./vms/pseudos.h'\"
  1036. else
  1037.   echo shar: Extracting \"'./vms/pseudos.h'\" \(439 characters\)
  1038.   sed "s/^X//" >'./vms/pseudos.h' <<'END_OF_FILE'
  1039. X/* These are so we don't end up using the MultiNet versions.  */
  1040. X#define socket    VMSsocket
  1041. X#define bind    VMSbind
  1042. X#define connect    VMSconnect
  1043. X#define listen    VMSlisten
  1044. X#define accept    VMSaccept
  1045. X#define select    VMSselect
  1046. X#define recv    VMSrecv
  1047. X#define recvfrom    VMSrecvfrom
  1048. X#define send    VMSsend
  1049. X#define sendto    VMSsendto
  1050. X#define getsockname    VMSgetsockname
  1051. X#define shutdown    VMSshutdown
  1052. X#define getsockopt    VMSgetsockopt
  1053. X#define setsockopt    VMSsetsockopt
  1054. END_OF_FILE
  1055.   if test 439 -ne `wc -c <'./vms/pseudos.h'`; then
  1056.     echo shar: \"'./vms/pseudos.h'\" unpacked with wrong size!
  1057.   fi
  1058.   # end of './vms/pseudos.h'
  1059. fi
  1060. if test -f './vms/signal.h' -a "${1}" != "-c" ; then 
  1061.   echo shar: Will not clobber existing file \"'./vms/signal.h'\"
  1062. else
  1063.   echo shar: Extracting \"'./vms/signal.h'\" \(261 characters\)
  1064.   sed "s/^X//" >'./vms/signal.h' <<'END_OF_FILE'
  1065. X/* signal.h */
  1066. X#define SIGURG  16
  1067. X#define SIGTSTP 18
  1068. X#define SIGCHLD 20
  1069. X#define SIGIO   23
  1070. X#define sigmask(m) (1 << ((m)-1))
  1071. X
  1072. X#ifndef __GNUC__
  1073. X# include <sys$library:signal.h>
  1074. X#else /* Gnu C */
  1075. X# include <gnu_cc_include:[000000]signal.h>
  1076. X#endif /* not Gnu C */
  1077. END_OF_FILE
  1078.   if test 261 -ne `wc -c <'./vms/signal.h'`; then
  1079.     echo shar: \"'./vms/signal.h'\" unpacked with wrong size!
  1080.   fi
  1081.   # end of './vms/signal.h'
  1082. fi
  1083. if test -f './vms/socket.h' -a "${1}" != "-c" ; then 
  1084.   echo shar: Will not clobber existing file \"'./vms/socket.h'\"
  1085. else
  1086.   echo shar: Extracting \"'./vms/socket.h'\" \(527 characters\)
  1087.   sed "s/^X//" >'./vms/socket.h' <<'END_OF_FILE'
  1088. X/* sys/socket.h */
  1089. X#define SOCK_STREAM     1
  1090. X#define SOCK_DGRAM      2
  1091. X
  1092. X#define SO_DEBUG        0x01
  1093. X#define SO_ACCEPTCONN   0x02
  1094. X#define SO_REUSEADDR    0x04
  1095. X#define SO_KEEPALIVE    0x08
  1096. X#define SO_LINGER       0x80
  1097. X#define SO_DONTLINGER   (~SO_LINGER)
  1098. X
  1099. X#define AF_UNSPEC       0
  1100. X#define AF_ERROR        0
  1101. X#define AF_INET         2
  1102. X#define AF_CCITT        10
  1103. X#define AF_X25          10
  1104. X
  1105. Xstruct sockaddr
  1106. X{
  1107. X  unsigned short sa_family;
  1108. X  char sa_data[14];
  1109. X};
  1110. X
  1111. X#define SOL_SOCKET      0xffff
  1112. X
  1113. X#define MSG_OOB 1
  1114. X#define MSG_PEEK 2
  1115. END_OF_FILE
  1116.   if test 527 -ne `wc -c <'./vms/socket.h'`; then
  1117.     echo shar: \"'./vms/socket.h'\" unpacked with wrong size!
  1118.   fi
  1119.   # end of './vms/socket.h'
  1120. fi
  1121. if test -f './vms/time.h' -a "${1}" != "-c" ; then 
  1122.   echo shar: Will not clobber existing file \"'./vms/time.h'\"
  1123. else
  1124.   echo shar: Extracting \"'./vms/time.h'\" \(459 characters\)
  1125.   sed "s/^X//" >'./vms/time.h' <<'END_OF_FILE'
  1126. X#ifndef __PKTIME
  1127. X#define __PKTIME
  1128. X
  1129. Xstruct timeval
  1130. X{
  1131. X  long tv_sec;
  1132. X  long tv_usec;
  1133. X};
  1134. X
  1135. Xstruct timezone
  1136. X{
  1137. X  int tz_minuteswest;
  1138. X  int tz_dsttime;
  1139. X};
  1140. X
  1141. Xstruct itimerval
  1142. X{
  1143. X  struct timeval it_interval;
  1144. X  struct timeval it_value;
  1145. X};
  1146. X
  1147. X#define ITIMER_REAL 0
  1148. X#define timerclear(x) (x)->tv_sec = (x)->tv_usec = 0
  1149. X
  1150. X#ifndef __GNUC__
  1151. X# include <sys$library:time.h>
  1152. X#else /* not Gnu C */
  1153. X# include <gnu_cc_include:[000000]time.h>
  1154. X#endif /* Gnu C */
  1155. X
  1156. X#endif /* __PKTIME */
  1157. END_OF_FILE
  1158.   if test 459 -ne `wc -c <'./vms/time.h'`; then
  1159.     echo shar: \"'./vms/time.h'\" unpacked with wrong size!
  1160.   fi
  1161.   # end of './vms/time.h'
  1162. fi
  1163. if test -f './vms/types.h' -a "${1}" != "-c" ; then 
  1164.   echo shar: Will not clobber existing file \"'./vms/types.h'\"
  1165. else
  1166.   echo shar: Extracting \"'./vms/types.h'\" \(467 characters\)
  1167.   sed "s/^X//" >'./vms/types.h' <<'END_OF_FILE'
  1168. X/* sys/types.h */
  1169. X#ifndef _types_
  1170. X#define _types_
  1171. X
  1172. X#ifndef __GNUC__
  1173. X# include <sys$library:stddef.h>
  1174. X#endif /* not Gnu C */
  1175. X
  1176. Xtypedef unsigned char u_char;
  1177. Xtypedef unsigned short u_short;
  1178. Xtypedef unsigned int u_int;
  1179. Xtypedef unsigned long u_long;
  1180. X
  1181. Xtypedef long daddr_t;
  1182. Xtypedef char *caddr_t;
  1183. X
  1184. X#include <sys$library:types.h>
  1185. X
  1186. Xtypedef unsigned short ino_t;
  1187. Xtypedef char *dev_t;
  1188. Xtypedef unsigned int off_t;
  1189. Xtypedef long key_t;
  1190. X
  1191. X#include "[.vms]fd.h"
  1192. X
  1193. X#endif /* _types */
  1194. END_OF_FILE
  1195.   if test 467 -ne `wc -c <'./vms/types.h'`; then
  1196.     echo shar: \"'./vms/types.h'\" unpacked with wrong size!
  1197.   fi
  1198.   # end of './vms/types.h'
  1199. fi
  1200. if test -f './vms/wall.opt' -a "${1}" != "-c" ; then 
  1201.   echo shar: Will not clobber existing file \"'./vms/wall.opt'\"
  1202. else
  1203.   echo shar: Extracting \"'./vms/wall.opt'\" \(66 characters\)
  1204.   sed "s/^X//" >'./vms/wall.opt' <<'END_OF_FILE'
  1205. Xsys$library:vaxcrtl.exe/share
  1206. Xtwg$tcp:[netdist.lib]twglib.olb/lib
  1207. END_OF_FILE
  1208.   if test 66 -ne `wc -c <'./vms/wall.opt'`; then
  1209.     echo shar: \"'./vms/wall.opt'\" unpacked with wrong size!
  1210.   fi
  1211.   # end of './vms/wall.opt'
  1212. fi
  1213. echo shar: End of archive 5 \(of 5\).
  1214. cp /dev/null ark5isdone
  1215. MISSING=""
  1216. for I in 1 2 3 4 5 ; do
  1217.     if test ! -f ark${I}isdone ; then
  1218.     MISSING="${MISSING} ${I}"
  1219.     fi
  1220. done
  1221. if test "${MISSING}" = "" ; then
  1222.     echo You have unpacked all 5 archives.
  1223.     rm -f ark[1-9]isdone
  1224. else
  1225.     echo You still must unpack the following archives:
  1226.     echo "        " ${MISSING}
  1227. fi
  1228. exit 0
  1229. exit 0 # Just in case...
  1230.