home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume19 / shape / part03 < prev    next >
Text File  |  1989-05-31  |  60KB  |  2,019 lines

  1. Subject:  v19i016:  A software configuration management system, Part03/33
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Axel Mahler <unido!coma!axel>
  7. Posting-number: Volume 19, Issue 16
  8. Archive-name: shape/part03
  9.  
  10.  
  11.  
  12. #! /bin/sh
  13. # This is a shell archive.  Remove anything before this line, then unpack
  14. # it by saving it into a file and typing "sh file".  To overwrite existing
  15. # files, type "sh file -c".  You can also feed this as standard input via
  16. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  17. # will see the following message at the end:
  18. #        "End of archive 3 (of 33)."
  19. # Contents:  man/man3/afattrs.3 man/man3/afudattrs.3
  20. #   man/man8/afsrepair.8 src/afs/afsrepair.h src/afs/afstates.c
  21. #   src/afs/typeconv.h src/inc/ParseArgs.h src/inc/afsapp.h
  22. #   src/inc/typeconv.h src/misc/hash.h src/shape/Makefile.bsd43
  23. #   src/shape/Makefile.sunos40 src/shape/Makefile.ultrix20
  24. #   src/shape/string.c src/vc/Shapefile src/vc/afsapp.h
  25. #   src/vc/project.c src/vc/retrv.h src/vc/typeconv.h
  26. # Wrapped by rsalz@papaya.bbn.com on Thu Jun  1 19:26:49 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'man/man3/afattrs.3' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'man/man3/afattrs.3'\"
  30. else
  31. echo shar: Extracting \"'man/man3/afattrs.3'\" \(2369 characters\)
  32. sed "s/^X//" >'man/man3/afattrs.3' <<'END_OF_FILE'
  33. X...
  34. X... Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  35. X...  and U. Pralle
  36. X... 
  37. X... This software is published on an as-is basis. There is ABSOLUTELY NO
  38. X... WARRANTY for any part of this software to work correctly or as described
  39. X... in the manuals. We do not accept any liability for any kind of damage
  40. X... caused by use of this software, such as loss of data, time, money, or 
  41. X... effort.
  42. X... 
  43. X... Permission is granted to use, copy, modify, or distribute any part of
  44. X... this software as long as this is done without asking for charge, and
  45. X... provided that this copyright notice is retained as part of the source
  46. X... files. You may charge a distribution fee for the physical act of
  47. X... transferring a copy, and you may at your option offer warranty
  48. X... protection in exchange for a fee.
  49. X... 
  50. X... Direct questions to: Tech. Univ. Berlin
  51. X...              Wilfried Koch
  52. X...              Sekr. FR 5-6 
  53. X...              Franklinstr. 28/29
  54. X...              D-1000 Berlin 10, West Germany
  55. X... 
  56. X...              Tel: +49-30-314-22972
  57. X...              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  58. X... 
  59. X.TH AF_ATTRS 3 "" \n(dy.\n(mo.\n(yr
  60. X.SH NAME
  61. Xaf_attrs \(em return simple attributes of ASOs
  62. X.SH SYNOPSIS
  63. X\fB#include <afs.h>
  64. X.sp
  65. Xchar *af_rname (key)
  66. X.br
  67. XAf_key    *key;
  68. X.sp
  69. Xchar *af_rtype (key)
  70. X.br
  71. XAf_key    *key;
  72. X.sp
  73. Xchar *af_rsyspath (key)
  74. X.br
  75. XAf_key    *key;
  76. X.sp
  77. Xaf_rgen (key)
  78. X.br
  79. XAf_key    *key;
  80. X.sp
  81. Xaf_rrev (key)
  82. X.br
  83. XAf_key    *key;
  84. X.sp
  85. Xaf_gattrs (key, attrbuf)
  86. X.br
  87. XAf_key       *key;
  88. X.br
  89. XAf_attrs    *attrbuf;
  90. X.SH DESCRIPTION
  91. XThe functions \fIaf_rname, af_rtype\fR and \fIaf_rsyspath\fR
  92. Xare used for reading name, type or system path of the ASO
  93. Xpointed to by key.
  94. XA pointer to a buffer allocated by \fImalloc(3)\fR containing the
  95. Xresult is returned. Use \fIfree(3)\fR to make the space available
  96. Xfor further allocation.
  97. X.PP
  98. X\fIAf_rgen\fR and \fIaf_rrev\fR return generation or revision number of
  99. Xthe identified ASO.
  100. X.PP
  101. X\fIAf_gattrs\fR returns the complete attribute buffer (\fIattrbuf\fR)
  102. Xof the ASO identified by \fIkey\fR.
  103. XThe user defined attributes contained in the attribute buffer reside
  104. Xin memory allocated by \fImalloc(3)\fR.
  105. XUse \fIfree(3)\fR on the pointers \fIattrbuf.af_udattrs[i]\fR (for each
  106. Xoccupied slot) to make the space available for further allocation.
  107. X.SH SEE ALSO
  108. Xfree(3)
  109. X.SH DIAGNOSTICS
  110. XUpon error, \-1 is returned and \fIaf_errno\fR is set to the corresponding
  111. Xerror number
  112. X
  113. X
  114. END_OF_FILE
  115. if test 2369 -ne `wc -c <'man/man3/afattrs.3'`; then
  116.     echo shar: \"'man/man3/afattrs.3'\" unpacked with wrong size!
  117. fi
  118. # end of 'man/man3/afattrs.3'
  119. fi
  120. if test -f 'man/man3/afudattrs.3' -a "${1}" != "-c" ; then 
  121.   echo shar: Will not clobber existing file \"'man/man3/afudattrs.3'\"
  122. else
  123. echo shar: Extracting \"'man/man3/afudattrs.3'\" \(2453 characters\)
  124. sed "s/^X//" >'man/man3/afudattrs.3' <<'END_OF_FILE'
  125. X...
  126. X... Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  127. X...  and U. Pralle
  128. X... 
  129. X... This software is published on an as-is basis. There is ABSOLUTELY NO
  130. X... WARRANTY for any part of this software to work correctly or as described
  131. X... in the manuals. We do not accept any liability for any kind of damage
  132. X... caused by use of this software, such as loss of data, time, money, or 
  133. X... effort.
  134. X... 
  135. X... Permission is granted to use, copy, modify, or distribute any part of
  136. X... this software as long as this is done without asking for charge, and
  137. X... provided that this copyright notice is retained as part of the source
  138. X... files. You may charge a distribution fee for the physical act of
  139. X... transferring a copy, and you may at your option offer warranty
  140. X... protection in exchange for a fee.
  141. X... 
  142. X... Direct questions to: Tech. Univ. Berlin
  143. X...              Wilfried Koch
  144. X...              Sekr. FR 5-6 
  145. X...              Franklinstr. 28/29
  146. X...              D-1000 Berlin 10, West Germany
  147. X... 
  148. X...              Tel: +49-30-314-22972
  149. X...              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  150. X... 
  151. X.TH AF_UDATTRS 3 "" \n(dy.\n(mo.\n(yr
  152. X.SH NAME
  153. Xaf_udattrs \(em read and modify user defined attributes 
  154. X.SH SYNOPSIS
  155. X\fB#include <afs.h>
  156. X.sp
  157. Xaf_sudattr (key, mode, attr)
  158. X.br
  159. XAf_key    *key;
  160. X.br
  161. Xint    mode;
  162. X.br
  163. Xchar    *attr;
  164. X.sp
  165. Xchar *af_rudattr (key, attrname);
  166. X.br
  167. XAf_key    *key;
  168. X.br
  169. Xchar    *attrname;
  170. X.SH DESCRIPTION
  171. X\fIAf_sudattr\fR is used to manipulate the
  172. Xuser defined attributes of ASOs.
  173. XUser defined attributes are strings of the following form:
  174. X.RS
  175. X\fBname\fR[\fB=value\fR] .
  176. X.RE
  177. X.PP
  178. XFor manipulating user defined attributes you have three modes:
  179. X.IP AF_ADD
  180. Xadd value(s) to entry if name is present or add entry otherwise.
  181. X.IP AF_REMOVE
  182. Xremove user defined attribute.
  183. X.IP AF_REPLACE
  184. Xreplace an existing user defined attribute (fails, if no appropriate
  185. Xattribute exists).
  186. X.RE
  187. X.PP
  188. X\fIAf_rudattr\fR returns a pointer to the list of values of a the
  189. Xuser defined attribute identified by \fIattrname\fR.
  190. XMultiple values are separated by a newline ('\\n').
  191. XIf no corresponding entry is found, af_rudattr returns a nil pointer.
  192. X.br
  193. XThe user defined attribute returned by \fIaf_rudattr\fR resides in memory
  194. Xallocated by \fImalloc(3)\fR.
  195. XUse \fIfree(3)\fR to make the space available for further allocation.
  196. X.SH SEE ALSO
  197. Xfree (3)
  198. X.SH DIAGNOSTICS
  199. XUpon error, \-1 or a nil pointer (depending on the return type) is returned
  200. Xand \fIaf_errno\fR is set to the corresponding error number.
  201. END_OF_FILE
  202. if test 2453 -ne `wc -c <'man/man3/afudattrs.3'`; then
  203.     echo shar: \"'man/man3/afudattrs.3'\" unpacked with wrong size!
  204. fi
  205. # end of 'man/man3/afudattrs.3'
  206. fi
  207. if test -f 'man/man8/afsrepair.8' -a "${1}" != "-c" ; then 
  208.   echo shar: Will not clobber existing file \"'man/man8/afsrepair.8'\"
  209. else
  210. echo shar: Extracting \"'man/man8/afsrepair.8'\" \(2797 characters\)
  211. sed "s/^X//" >'man/man8/afsrepair.8' <<'END_OF_FILE'
  212. X...
  213. X... Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  214. X...  and U. Pralle
  215. X... 
  216. X... This software is published on an as-is basis. There is ABSOLUTELY NO
  217. X... WARRANTY for any part of this software to work correctly or as described
  218. X... in the manuals. We do not accept any liability for any kind of damage
  219. X... caused by use of this software, such as loss of data, time, money, or 
  220. X... effort.
  221. X... 
  222. X... Permission is granted to use, copy, modify, or distribute any part of
  223. X... this software as long as this is done without asking for charge, and
  224. X... provided that this copyright notice is retained as part of the source
  225. X... files. You may charge a distribution fee for the physical act of
  226. X... transferring a copy, and you may at your option offer warranty
  227. X... protection in exchange for a fee.
  228. X... 
  229. X... Direct questions to: Tech. Univ. Berlin
  230. X...              Wilfried Koch
  231. X...              Sekr. FR 5-6 
  232. X...              Franklinstr. 28/29
  233. X...              D-1000 Berlin 10, West Germany
  234. X... 
  235. X...              Tel: +49-30-314-22972
  236. X...              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  237. X... 
  238. X.TH AFSREPAIR 8 "" \n(dy.\n(mo.\n(yr
  239. X.SH NAME
  240. Xafsrepair \- repair corrupted AFS archive files
  241. X.SH SYNOPSIS
  242. X.B afsrepair
  243. X.RB [ \-l
  244. X.IR "verbosity level" ]
  245. X.RB [ \-v ]
  246. Xfile1 ...
  247. X.SH DESCRIPTION
  248. X\fIAfsrepair\fR checks the archive files for a given
  249. X.UX
  250. Xfile for inconsistencies.
  251. XIf a corrupted archive file is found, \fIafsrepair\fR tries to
  252. Xrepair it by reconstructing missing parts and eliminating inconsistencies.
  253. X\fIAfsrepair\fR is interactive and (hopefully) self explanatory.
  254. XWhen giving the filename \fIbinary_pool\fR as argument, \fIafsrepair\fR
  255. Xtries it's hand at a binary pool.
  256. X.LP
  257. XThe \f(BI\-l\fR option indicates the level of verbosity.
  258. X.IP 0 0.2i
  259. Xsilent.
  260. X.br
  261. XIn this case, \fIafsrepair\fR tries to repair corrupted archive
  262. Xfiles without human assistance. 
  263. X.IP 1
  264. Xnormal (default).
  265. X.br
  266. XThis level causes \fIafsrepair\fR to consult the caller what to do, when
  267. Xit determines any inconsistencies or missing information
  268. Xwhile scanning an archive file.
  269. X.IP 2
  270. Xverbose.
  271. X.br
  272. XThis level of verbosity serves for manipulating archive files
  273. Xthan for repairing them.
  274. XIt shall be used only by \fIvery experienced\fR users.
  275. XFor nearly every item in the archive file, \fIafsrepair\fR asks the caller
  276. Xfor confirmation or modification. Beware, this level of verbosity can be
  277. Xvery annoying when the archive file is big.
  278. X.RE
  279. X.LP
  280. XThe \f(BI\-v\fR option causes \fIafsrepair\fR to print its current
  281. Xversion number. No file processing is done.
  282. X.SH SEE ALSO
  283. Xafarchive(5)
  284. X.SH BUGS
  285. XDates appear in internal form (seconds from 1970) rather than in human
  286. Xreadable form.
  287. X.LP
  288. XIn Phase 6 (check connectivity), some checks are still missing.
  289. X.SH AUTHOR
  290. XAndreas Lampen, TU Berlin
  291. X.br
  292. X.ta 0.7i 
  293. XUUCP:    unido!coma!andy
  294. X.br
  295. XBITNET:    andy@db0tui62
  296. END_OF_FILE
  297. if test 2797 -ne `wc -c <'man/man8/afsrepair.8'`; then
  298.     echo shar: \"'man/man8/afsrepair.8'\" unpacked with wrong size!
  299. fi
  300. # end of 'man/man8/afsrepair.8'
  301. fi
  302. if test -f 'src/afs/afsrepair.h' -a "${1}" != "-c" ; then 
  303.   echo shar: Will not clobber existing file \"'src/afs/afsrepair.h'\"
  304. else
  305. echo shar: Extracting \"'src/afs/afsrepair.h'\" \(2502 characters\)
  306. sed "s/^X//" >'src/afs/afsrepair.h' <<'END_OF_FILE'
  307. X/*
  308. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  309. X *  and U. Pralle
  310. X * 
  311. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  312. X * WARRANTY for any part of this software to work correctly or as described
  313. X * in the manuals. We do not accept any liability for any kind of damage
  314. X * caused by use of this software, such as loss of data, time, money, or 
  315. X * effort.
  316. X * 
  317. X * Permission is granted to use, copy, modify, or distribute any part of
  318. X * this software as long as this is done without asking for charge, and
  319. X * provided that this copyright notice is retained as part of the source
  320. X * files. You may charge a distribution fee for the physical act of
  321. X * transferring a copy, and you may at your option offer warranty
  322. X * protection in exchange for a fee.
  323. X * 
  324. X * Direct questions to: Tech. Univ. Berlin
  325. X *              Wilfried Koch
  326. X *              Sekr. FR 5-6 
  327. X *              Franklinstr. 28/29
  328. X *              D-1000 Berlin 10, West Germany
  329. X * 
  330. X *              Tel: +49-30-314-22972
  331. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  332. X */
  333. X/*
  334. X * AFS-test -- type definitions for archive repair tool
  335. X *
  336. X *    Author:    Andreas Lampen (andy@coma.UUCP
  337. X *                andy@db0tui62.BITNET)
  338. X *
  339. X *    $Header: afsrepair.h[1.2] Wed Feb 22 16:28:06 1989 andy@coma published $
  340. X */
  341. X
  342. X/*** levels ***/
  343. X#define SILENT     0
  344. X#define NORMAL     1
  345. X#define VERBOSE    2
  346. X#define EVERYTHING 3
  347. X
  348. X#define MAXREVS 256
  349. X#define MAXUDAS 256
  350. X
  351. Xtypedef struct {
  352. X  char    *string;
  353. X  int     curPos;
  354. X  int     length;
  355. X} Input;
  356. X
  357. Xtypedef struct {
  358. X  off_t   datasize;
  359. X  int     noOfRevisions;
  360. X  char    *host;
  361. X  char    *syspath;
  362. X  char    *name;
  363. X  char    *type;
  364. X  char    *ownerName;
  365. X  char    *ownerHost;
  366. X} ConstAttrs;
  367. X
  368. Xtypedef struct {
  369. X  int     generation;
  370. X  int     revision;
  371. X  int     state;
  372. X  u_short mode;
  373. X  char    *variant;
  374. X  char    *authorName;
  375. X  char    *authorHost;
  376. X  char    *lockerName;
  377. X  char    *lockerHost;
  378. X  time_t  lockTime;
  379. X  time_t  modTime;
  380. X  time_t  accessTime;
  381. X  time_t  statChangeTime;
  382. X  time_t  saveTime;
  383. X  int     representation;
  384. X  off_t   fileSize;
  385. X  off_t   deltaSize;
  386. X  int     succGen;
  387. X  int     succRev;
  388. X  int     predGen;
  389. X  int     predRev;
  390. X} Revision;
  391. X
  392. Xtypedef struct {
  393. X  int     generation;
  394. X  int     revision;
  395. X  int     size;
  396. X  char    *uda[MAXUDAS];
  397. X} Udas;
  398. X
  399. Xtypedef struct {
  400. X  int     generation;
  401. X  int     revision;
  402. X  off_t   size;
  403. X  char    *contents;
  404. X} Note;
  405. X
  406. Xtypedef struct {
  407. X  int     generation;
  408. X  int     revision;
  409. X  int     representation;
  410. X  off_t   size;
  411. X  char    *contents;
  412. X} Data;
  413. X
  414. X
  415. END_OF_FILE
  416. if test 2502 -ne `wc -c <'src/afs/afsrepair.h'`; then
  417.     echo shar: \"'src/afs/afsrepair.h'\" unpacked with wrong size!
  418. fi
  419. # end of 'src/afs/afsrepair.h'
  420. fi
  421. if test -f 'src/afs/afstates.c' -a "${1}" != "-c" ; then 
  422.   echo shar: Will not clobber existing file \"'src/afs/afstates.c'\"
  423. else
  424. echo shar: Extracting \"'src/afs/afstates.c'\" \(2730 characters\)
  425. sed "s/^X//" >'src/afs/afstates.c' <<'END_OF_FILE'
  426. X/*
  427. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  428. X *  and U. Pralle
  429. X * 
  430. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  431. X * WARRANTY for any part of this software to work correctly or as described
  432. X * in the manuals. We do not accept any liability for any kind of damage
  433. X * caused by use of this software, such as loss of data, time, money, or 
  434. X * effort.
  435. X * 
  436. X * Permission is granted to use, copy, modify, or distribute any part of
  437. X * this software as long as this is done without asking for charge, and
  438. X * provided that this copyright notice is retained as part of the source
  439. X * files. You may charge a distribution fee for the physical act of
  440. X * transferring a copy, and you may at your option offer warranty
  441. X * protection in exchange for a fee.
  442. X * 
  443. X * Direct questions to: Tech. Univ. Berlin
  444. X *              Wilfried Koch
  445. X *              Sekr. FR 5-6 
  446. X *              Franklinstr. 28/29
  447. X *              D-1000 Berlin 10, West Germany
  448. X * 
  449. X *              Tel: +49-30-314-22972
  450. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  451. X */
  452. X/*LINTLIBRARY*/
  453. X/*
  454. X *    Shape/AFS
  455. X *
  456. X *    afstates.c - operations on version states
  457. X *
  458. X *    Author: Andreas Lampen, TU-Berlin (andy@coma.UUCP
  459. X *                       andy@db0tui62.BITNET)
  460. X *
  461. X *    $Header: afstates.c[1.3] Wed Feb 22 16:28:10 1989 andy@coma published $
  462. X *
  463. X *    EXPORT:
  464. X *    af_rstate -- return version state
  465. X *    af_sstate -- set revision state
  466. X */
  467. X
  468. X#include <stdio.h>
  469. X
  470. X#include "typeconv.h"
  471. X#include "afsys.h"
  472. X#include "afs.h"
  473. X
  474. X/*====================================================================
  475. X *    af_rstate -- return version state
  476. X *
  477. X *====================================================================*/
  478. X
  479. XEXPORT af_rstate (key)
  480. X     Af_key *key;
  481. X{
  482. X  if (af_keytest (key))
  483. X    SFAIL ("rstate", "", AF_EINVKEY, ERROR);
  484. X  if (VATTR(key).af_class & AF_DERIVED)
  485. X    SFAIL ("rstate", "", AF_EDERIVED, ERROR);
  486. X
  487. X  return ((int) VATTR(key).af_state);
  488. X}
  489. X
  490. X/*====================================================================
  491. X *    af_sstate -- set version state
  492. X *
  493. X *====================================================================*/
  494. X
  495. XEXPORT af_sstate (key, state)
  496. X     Af_key     *key;
  497. X     int        state;
  498. X{
  499. X  if (af_keytest (key))
  500. X    SFAIL ("sstate", "", AF_EINVKEY, ERROR);
  501. X  if (VATTR(key).af_class & AF_DERIVED)
  502. X    SFAIL ("sstate", "", AF_EDERIVED, ERROR);
  503. X
  504. X  if (af_checkperm (key, AF_OWNER | AF_AUTHOR | AF_LOCKHOLDER) == ERROR)
  505. X    return (ERROR);
  506. X
  507. X  if ((state < AF_SAVED) || (state > AF_FROZEN) ||
  508. X      (abs(VATTR(key).af_state - state) == 1))
  509. X    {
  510. X      VATTR(key).af_state = state;
  511. X    }
  512. X  else
  513. X    SFAIL ("sstate", "", AF_ESTATE, ERROR);
  514. X  /* save changes */
  515. X  if (af_updtvers (key, AF_CHANGE) == ERROR)
  516. X    return (ERROR);
  517. X  
  518. X  return (AF_OK);
  519. X} /* af_sstate */
  520. END_OF_FILE
  521. if test 2730 -ne `wc -c <'src/afs/afstates.c'`; then
  522.     echo shar: \"'src/afs/afstates.c'\" unpacked with wrong size!
  523. fi
  524. # end of 'src/afs/afstates.c'
  525. fi
  526. if test -f 'src/afs/typeconv.h' -a "${1}" != "-c" ; then 
  527.   echo shar: Will not clobber existing file \"'src/afs/typeconv.h'\"
  528. else
  529. echo shar: Extracting \"'src/afs/typeconv.h'\" \(2337 characters\)
  530. sed "s/^X//" >'src/afs/typeconv.h' <<'END_OF_FILE'
  531. X/*
  532. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  533. X *  and U. Pralle
  534. X * 
  535. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  536. X * WARRANTY for any part of this software to work correctly or as described
  537. X * in the manuals. We do not accept any liability for any kind of damage
  538. X * caused by use of this software, such as loss of data, time, money, or 
  539. X * effort.
  540. X * 
  541. X * Permission is granted to use, copy, modify, or distribute any part of
  542. X * this software as long as this is done without asking for charge, and
  543. X * provided that this copyright notice is retained as part of the source
  544. X * files. You may charge a distribution fee for the physical act of
  545. X * transferring a copy, and you may at your option offer warranty
  546. X * protection in exchange for a fee.
  547. X * 
  548. X * Direct questions to: Tech. Univ. Berlin
  549. X *              Wilfried Koch
  550. X *              Sekr. FR 5-6 
  551. X *              Franklinstr. 28/29
  552. X *              D-1000 Berlin 10, West Germany
  553. X * 
  554. X *              Tel: +49-30-314-22972
  555. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  556. X */
  557. X/*
  558. X * $Header: typeconv.h[1.1] Thu Feb 23 18:13:59 1989 axel@coma published $
  559. X *
  560. X * Log for /u/shape/dist-tape/src/vc/typeconv.h[1.0]
  561. X *     Thu Feb 23 18:13:59 1989 axel@coma published $
  562. X *  --- empty log message ---
  563. X *  typeconv.h[1.1] Thu Feb 23 18:13:59 1989 axel@coma published $
  564. X *  --- empty log message ---
  565. X */
  566. X
  567. X
  568. X#ifndef _TYPECONV_
  569. X#define _TYPECONV_
  570. X#if !(defined (ULTRIX_2_0) | defined (BSD_4_3) | defined (SUNOS_4_0)) 
  571. X#define BSD_4_3
  572. X#endif
  573. X
  574. X#ifdef ULTRIX_2_0
  575. X#ifndef Sfunc_t
  576. X#define Sfunc_t void        /* type of function argument to signal call */
  577. X#endif
  578. X#ifndef Size_t
  579. X#define Size_t unsigned      /* used for args to malloc(), fread() etc. */
  580. X#endif
  581. X#ifndef Uid_t
  582. X#define Uid_t int            /* used for user-id types */
  583. X#endif
  584. X#ifndef Gid_t
  585. X#define Gid_t int            /* used for user-id types */
  586. X#endif
  587. X#endif
  588. X
  589. X#ifdef BSD_4_3
  590. X#ifndef Sfunc_t
  591. X#define Sfunc_t int
  592. X#endif Sfunc_t
  593. X#ifndef Size_t
  594. X#define Size_t int
  595. X#endif Size_t
  596. X#ifndef Uid_t
  597. X#define Uid_t uid_t
  598. X#endif Uid_t
  599. X#ifndef Gid_t
  600. X#define Gid_t gid_t
  601. X#endif Gid_t
  602. X#endif
  603. X
  604. X#ifdef SUNOS_4_0
  605. X#ifndef Sfunc_t
  606. X#define Sfunc_t int
  607. X#endif Sfunc_t
  608. X#ifndef Size_t
  609. X#define Size_t int
  610. X#endif Size_t
  611. X#ifndef Uid_t
  612. X#define Uid_t uid_t
  613. X#endif Uid_t
  614. X#ifndef Gid_t
  615. X#define Gid_t gid_t
  616. X#endif Gid_t
  617. X#endif
  618. X#endif _TYPECONV_
  619. END_OF_FILE
  620. if test 2337 -ne `wc -c <'src/afs/typeconv.h'`; then
  621.     echo shar: \"'src/afs/typeconv.h'\" unpacked with wrong size!
  622. fi
  623. # end of 'src/afs/typeconv.h'
  624. fi
  625. if test -f 'src/inc/ParseArgs.h' -a "${1}" != "-c" ; then 
  626.   echo shar: Will not clobber existing file \"'src/inc/ParseArgs.h'\"
  627. else
  628. echo shar: Extracting \"'src/inc/ParseArgs.h'\" \(2402 characters\)
  629. sed "s/^X//" >'src/inc/ParseArgs.h' <<'END_OF_FILE'
  630. X/*
  631. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  632. X *  and U. Pralle
  633. X * 
  634. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  635. X * WARRANTY for any part of this software to work correctly or as described
  636. X * in the manuals. We do not accept any liability for any kind of damage
  637. X * caused by use of this software, such as loss of data, time, money, or 
  638. X * effort.
  639. X * 
  640. X * Permission is granted to use, copy, modify, or distribute any part of
  641. X * this software as long as this is done without asking for charge, and
  642. X * provided that this copyright notice is retained as part of the source
  643. X * files. You may charge a distribution fee for the physical act of
  644. X * transferring a copy, and you may at your option offer warranty
  645. X * protection in exchange for a fee.
  646. X * 
  647. X * Direct questions to: Tech. Univ. Berlin
  648. X *              Wilfried Koch
  649. X *              Sekr. FR 5-6 
  650. X *              Franklinstr. 28/29
  651. X *              D-1000 Berlin 10, West Germany
  652. X * 
  653. X *              Tel: +49-30-314-22972
  654. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  655. X */
  656. X/*
  657. X * Copyright (C) 1988 Technische Universitaet Berlin
  658. X * 
  659. X * This is a pre-release !
  660. X * 
  661. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  662. X * WARRANTY for any part of this software to work correctly or as described
  663. X * in the manuals. No responsibility or liability for any damage caused
  664. X * by using this software.
  665. X * 
  666. X * No part of this software may be redistributed or used commercially by 
  667. X * any means or in any form.
  668. X * 
  669. X * Direct questions to: Tech. Univ. Berlin
  670. X *             Wilfried Koch
  671. X *             Sekr. FR 5-6 
  672. X *             Franklinstr. 28/29
  673. X *             D-1000 Berlin 10, West Germany
  674. X * 
  675. X *             Tel: +49-30-314-22972
  676. X *             E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  677. X */
  678. X/*
  679. X * $Header: ParseArgs.h,v 2.0 88/06/29 16:14:40 axel Stable $
  680. X *
  681. X * $Log:    ParseArgs.h,v $
  682. X * Revision 2.0  88/06/29  16:14:40  axel
  683. X * New System Generation
  684. X * 
  685. X * Revision 1.1  88/06/07  17:10:03  axel
  686. X * This version is part of a release
  687. X * 
  688. X */
  689. X
  690. X/*  LAST EDIT: Fri Feb 19 15:26:39 1988 by Uli Pralle (coma!uli)  */
  691. X/*
  692. X * ParseArgs.h
  693. X */
  694. X
  695. Xtypedef struct optdesc OptDesc;
  696. X
  697. Xstruct optdesc {
  698. X  char *opt_name;        /* name of option */
  699. X  int opt_kind;            /* kind: SWITCH, HAS_ARG, HAS_OPT_ARG */
  700. X  int (*opt_handler)();        /* Function called if opt is detected */
  701. X};
  702. X
  703. X#define OPT_IS_SWITCH    1
  704. X#define OPT_HAS_ARG    2
  705. X#define OPT_HAS_OPT_ARG 3
  706. X#define OPT_IS_ARG      4
  707. END_OF_FILE
  708. if test 2402 -ne `wc -c <'src/inc/ParseArgs.h'`; then
  709.     echo shar: \"'src/inc/ParseArgs.h'\" unpacked with wrong size!
  710. fi
  711. # end of 'src/inc/ParseArgs.h'
  712. fi
  713. if test -f 'src/inc/afsapp.h' -a "${1}" != "-c" ; then 
  714.   echo shar: Will not clobber existing file \"'src/inc/afsapp.h'\"
  715. else
  716. echo shar: Extracting \"'src/inc/afsapp.h'\" \(2874 characters\)
  717. sed "s/^X//" >'src/inc/afsapp.h' <<'END_OF_FILE'
  718. X/*
  719. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  720. X *  and U. Pralle
  721. X * 
  722. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  723. X * WARRANTY for any part of this software to work correctly or as described
  724. X * in the manuals. We do not accept any liability for any kind of damage
  725. X * caused by use of this software, such as loss of data, time, money, or 
  726. X * effort.
  727. X * 
  728. X * Permission is granted to use, copy, modify, or distribute any part of
  729. X * this software as long as this is done without asking for charge, and
  730. X * provided that this copyright notice is retained as part of the source
  731. X * files. You may charge a distribution fee for the physical act of
  732. X * transferring a copy, and you may at your option offer warranty
  733. X * protection in exchange for a fee.
  734. X * 
  735. X * Direct questions to: Tech. Univ. Berlin
  736. X *              Wilfried Koch
  737. X *              Sekr. FR 5-6 
  738. X *              Franklinstr. 28/29
  739. X *              D-1000 Berlin 10, West Germany
  740. X * 
  741. X *              Tel: +49-30-314-22972
  742. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  743. X */
  744. X/*
  745. X * $Header: afsapp.h[3.10] Thu Feb 23 18:13:25 1989 axel@coma published $
  746. X *
  747. X * Log for /u/shape/dist-tape/src/vc/afsapp.h[3.7]
  748. X *     Thu Feb 23 18:13:25 1989 axel@coma published $
  749. X *  --- empty log message ---
  750. X *  afsapp.h[3.9] Thu Feb 23 18:13:25 1989 axel@coma published $
  751. X *  --- empty log message ---
  752. X *  afsapp.h[3.10] Thu Feb 23 18:13:25 1989 axel@coma published $
  753. X *  --- empty log message ---
  754. X */
  755. X
  756. X
  757. X/*
  758. X *  The following definitions are used by most version control
  759. X *  commands.
  760. X */
  761. X
  762. X#ifndef _TYPES_
  763. X#include <sys/types.h>
  764. X#define _TYPES_
  765. X#endif
  766. X#ifndef _TIME_
  767. X#include <sys/time.h>
  768. X#define _TIME_
  769. X#endif
  770. X#ifndef MAXNAMLEN
  771. X#include <sys/dir.h>
  772. X#endif
  773. X#include <setjmp.h>
  774. X#include "typeconv.h"
  775. X
  776. Xstruct Transaction {
  777. X  char tr_fname[MAXNAMLEN];
  778. X  int tr_done;
  779. X  int tr_seqno;
  780. X  int tr_rc;
  781. X  jmp_buf tr_env;
  782. X};
  783. X
  784. X#ifndef TRUE
  785. X#define TRUE 1
  786. X#endif
  787. X#ifndef FALSE
  788. X#define FALSE 0
  789. X#endif
  790. X
  791. X#define fail(x) ((x) == -1)
  792. X#define min(x,y) (((x) <= (y)) ? (x) : (y)) 
  793. X#define gen(x) (((x) >> 16) & 0x0000FFFF)
  794. X#define rev(x) ((x) & 0x0000FFFF)
  795. X#define vc_testlock_g(k) vc_testlock ((k), AF_GLOBALLOCK)
  796. X#define vc_testlock_v(k) vc_testlock ((k), AF_VERSIONLOCK)
  797. X#define vc_lock_g(k,u) vc_lock ((k), (u), AF_GLOBALLOCK)
  798. X#define vc_lock_v(k,u) vc_lock ((k), (u), AF_VERSIONLOCK)
  799. X#define vc_unlock_g(k) vc_unlock ((k), AF_GLOBALLOCK)
  800. X#define vc_unlock_v(k) vc_unlock ((k), AF_VERSIONLOCK)
  801. X
  802. X#define NOSHELL 127
  803. X
  804. X#define MAXTMPF 5
  805. X#define MAXSETS 64
  806. X#define MAXKEYS 64
  807. X#define MAXATTRBUFS 64
  808. X
  809. X#define TYPEF 1
  810. X#define AFSET 2
  811. X#define AFKEY 3
  812. X#define AFATTRS 4
  813. X#define NEXT 1
  814. X#define REWIND 2
  815. X
  816. X#define SYMNAME  "__SymbolicName__"
  817. X#define CLEAD  "__Clead__"
  818. X#define CLEADMAXLEN 32
  819. X#define INTENT "__Intent__=Intention for change:\n"
  820. X#define EMPTYINTENT "--- no intent expressed ---"
  821. X#define EMPTYNOTE "--- empty log message ---"
  822. X
  823. END_OF_FILE
  824. if test 2874 -ne `wc -c <'src/inc/afsapp.h'`; then
  825.     echo shar: \"'src/inc/afsapp.h'\" unpacked with wrong size!
  826. fi
  827. # end of 'src/inc/afsapp.h'
  828. fi
  829. if test -f 'src/inc/typeconv.h' -a "${1}" != "-c" ; then 
  830.   echo shar: Will not clobber existing file \"'src/inc/typeconv.h'\"
  831. else
  832. echo shar: Extracting \"'src/inc/typeconv.h'\" \(2337 characters\)
  833. sed "s/^X//" >'src/inc/typeconv.h' <<'END_OF_FILE'
  834. X/*
  835. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  836. X *  and U. Pralle
  837. X * 
  838. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  839. X * WARRANTY for any part of this software to work correctly or as described
  840. X * in the manuals. We do not accept any liability for any kind of damage
  841. X * caused by use of this software, such as loss of data, time, money, or 
  842. X * effort.
  843. X * 
  844. X * Permission is granted to use, copy, modify, or distribute any part of
  845. X * this software as long as this is done without asking for charge, and
  846. X * provided that this copyright notice is retained as part of the source
  847. X * files. You may charge a distribution fee for the physical act of
  848. X * transferring a copy, and you may at your option offer warranty
  849. X * protection in exchange for a fee.
  850. X * 
  851. X * Direct questions to: Tech. Univ. Berlin
  852. X *              Wilfried Koch
  853. X *              Sekr. FR 5-6 
  854. X *              Franklinstr. 28/29
  855. X *              D-1000 Berlin 10, West Germany
  856. X * 
  857. X *              Tel: +49-30-314-22972
  858. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  859. X */
  860. X/*
  861. X * $Header: typeconv.h[1.1] Thu Feb 23 18:13:59 1989 axel@coma published $
  862. X *
  863. X * Log for /u/shape/dist-tape/src/vc/typeconv.h[1.0]
  864. X *     Thu Feb 23 18:13:59 1989 axel@coma published $
  865. X *  --- empty log message ---
  866. X *  typeconv.h[1.1] Thu Feb 23 18:13:59 1989 axel@coma published $
  867. X *  --- empty log message ---
  868. X */
  869. X
  870. X
  871. X#ifndef _TYPECONV_
  872. X#define _TYPECONV_
  873. X#if !(defined (ULTRIX_2_0) | defined (BSD_4_3) | defined (SUNOS_4_0)) 
  874. X#define BSD_4_3
  875. X#endif
  876. X
  877. X#ifdef ULTRIX_2_0
  878. X#ifndef Sfunc_t
  879. X#define Sfunc_t void        /* type of function argument to signal call */
  880. X#endif
  881. X#ifndef Size_t
  882. X#define Size_t unsigned      /* used for args to malloc(), fread() etc. */
  883. X#endif
  884. X#ifndef Uid_t
  885. X#define Uid_t int            /* used for user-id types */
  886. X#endif
  887. X#ifndef Gid_t
  888. X#define Gid_t int            /* used for user-id types */
  889. X#endif
  890. X#endif
  891. X
  892. X#ifdef BSD_4_3
  893. X#ifndef Sfunc_t
  894. X#define Sfunc_t int
  895. X#endif Sfunc_t
  896. X#ifndef Size_t
  897. X#define Size_t int
  898. X#endif Size_t
  899. X#ifndef Uid_t
  900. X#define Uid_t uid_t
  901. X#endif Uid_t
  902. X#ifndef Gid_t
  903. X#define Gid_t gid_t
  904. X#endif Gid_t
  905. X#endif
  906. X
  907. X#ifdef SUNOS_4_0
  908. X#ifndef Sfunc_t
  909. X#define Sfunc_t int
  910. X#endif Sfunc_t
  911. X#ifndef Size_t
  912. X#define Size_t int
  913. X#endif Size_t
  914. X#ifndef Uid_t
  915. X#define Uid_t uid_t
  916. X#endif Uid_t
  917. X#ifndef Gid_t
  918. X#define Gid_t gid_t
  919. X#endif Gid_t
  920. X#endif
  921. X#endif _TYPECONV_
  922. END_OF_FILE
  923. if test 2337 -ne `wc -c <'src/inc/typeconv.h'`; then
  924.     echo shar: \"'src/inc/typeconv.h'\" unpacked with wrong size!
  925. fi
  926. # end of 'src/inc/typeconv.h'
  927. fi
  928. if test -f 'src/misc/hash.h' -a "${1}" != "-c" ; then 
  929.   echo shar: Will not clobber existing file \"'src/misc/hash.h'\"
  930. else
  931. echo shar: Extracting \"'src/misc/hash.h'\" \(2315 characters\)
  932. sed "s/^X//" >'src/misc/hash.h' <<'END_OF_FILE'
  933. X/*
  934. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  935. X *  and U. Pralle
  936. X * 
  937. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  938. X * WARRANTY for any part of this software to work correctly or as described
  939. X * in the manuals. We do not accept any liability for any kind of damage
  940. X * caused by use of this software, such as loss of data, time, money, or 
  941. X * effort.
  942. X * 
  943. X * Permission is granted to use, copy, modify, or distribute any part of
  944. X * this software as long as this is done without asking for charge, and
  945. X * provided that this copyright notice is retained as part of the source
  946. X * files. You may charge a distribution fee for the physical act of
  947. X * transferring a copy, and you may at your option offer warranty
  948. X * protection in exchange for a fee.
  949. X * 
  950. X * Direct questions to: Tech. Univ. Berlin
  951. X *              Wilfried Koch
  952. X *              Sekr. FR 5-6 
  953. X *              Franklinstr. 28/29
  954. X *              D-1000 Berlin 10, West Germany
  955. X * 
  956. X *              Tel: +49-30-314-22972
  957. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  958. X */
  959. X/*
  960. X * $Header: hash.h[2.1] Thu Feb 23 21:24:22 1989 axel@coma published $
  961. X *
  962. X * Log for /u/shape/dist-tape/src/misc/hash.h[1.1]
  963. X *     Thu Feb 23 21:24:22 1989 axel@coma save $
  964. X *  --- empty log message ---
  965. X *  hash.h[2.0] Thu Feb 23 21:24:22 1989 axel@coma published $
  966. X *  --- empty log message ---
  967. X *  hash.h[2.1] Thu Feb 23 21:24:22 1989 axel@coma published $
  968. X *  --- empty log message ---
  969. X */
  970. X
  971. X/*
  972. X * $Header: hash.h,v 2.0 88/06/29 16:14:46 axel Stable $
  973. X *
  974. X * $Log:    hash.h,v $
  975. X * Revision 2.0  88/06/29  16:14:46  axel
  976. X * New System Generation
  977. X * 
  978. X * Revision 1.1  88/06/07  17:10:11  axel
  979. X * This version is part of a release
  980. X * 
  981. X */
  982. X
  983. X#define NAMSZ 64   /* estimated max-size of names */
  984. X#define DEFHSIZE 521 /* default size of hashtable */
  985. X
  986. X#define TRUE 1
  987. X#define FALSE 0
  988. X
  989. Xtypedef struct hashent Hashent;         
  990. X
  991. Xtypedef struct hash Hash;
  992. X
  993. Xstruct hashent { char    symbol[NAMSZ],
  994. X                 symval[NAMSZ];
  995. X         Hashent *next;
  996. X           };
  997. X
  998. Xstruct hash { int     hsize,       /* No. of slots in hashtable */
  999. X              (*fhash)();  /* Pointer to hash-function */
  1000. X          char    *cur_symval; /* Pointer to value of last retrvd. sym */
  1001. X#ifdef CCOL
  1002. X          int     collcnt;
  1003. X#endif
  1004. X          int     symcount;
  1005. X          Hashent *hashtb;     /* Anchor of hashtable */
  1006. X           };
  1007. X
  1008. END_OF_FILE
  1009. if test 2315 -ne `wc -c <'src/misc/hash.h'`; then
  1010.     echo shar: \"'src/misc/hash.h'\" unpacked with wrong size!
  1011. fi
  1012. # end of 'src/misc/hash.h'
  1013. fi
  1014. if test -f 'src/shape/Makefile.bsd43' -a "${1}" != "-c" ; then 
  1015.   echo shar: Will not clobber existing file \"'src/shape/Makefile.bsd43'\"
  1016. else
  1017. echo shar: Extracting \"'src/shape/Makefile.bsd43'\" \(2367 characters\)
  1018. sed "s/^X//" >'src/shape/Makefile.bsd43' <<'END_OF_FILE'
  1019. X#
  1020. X# Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1021. X#  and U. Pralle
  1022. X# 
  1023. X# This software is published on an as-is basis. There is ABSOLUTELY NO
  1024. X# WARRANTY for any part of this software to work correctly or as described
  1025. X# in the manuals. We do not accept any liability for any kind of damage
  1026. X# caused by use of this software, such as loss of data, time, money, or effort.
  1027. X# 
  1028. X# Permission is granted to use, copy, modify, or distribute any part of
  1029. X# this software as long as this is done without asking for charge, and
  1030. X# provided that this copyright notice is retained as part of the source
  1031. X# files. You may charge a distribution fee for the physical act of
  1032. X# transferring a copy, and you may at your option offer warranty
  1033. X# protection in exchange for a fee.
  1034. X# 
  1035. X# Direct questions to: Tech. Univ. Berlin
  1036. X#              Wilfried Koch
  1037. X#              Sekr. FR 5-6 
  1038. X#              Franklinstr. 28/29
  1039. X#              D-1000 Berlin 10, West Germany
  1040. X# 
  1041. X#              Tel: +49-30-314-22972
  1042. X#              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1043. X# 
  1044. X#  Configuration definition part
  1045. X
  1046. XCC = cc -DCFFLGS='"$$Flags: $(CFLAGS) $$"'
  1047. XCFLAGS = -g -I$(INCLUDEDIR) -D$(SYSTEM) -D(OLDDBM)
  1048. X
  1049. X#  Product definition part
  1050. X
  1051. XHEADER = shape.h $(INCLUDEDIR)/afs.h 
  1052. X
  1053. XCOMPONENTS = \
  1054. X    README \
  1055. X    Makefile \
  1056. X    attr.c \
  1057. X    attr.h \
  1058. X    error.c \
  1059. X    files.c \
  1060. X    files.h \
  1061. X    hash.c \
  1062. X    hash.h \
  1063. X    inherit.c \
  1064. X    shape.l \
  1065. X    macro.c \
  1066. X    macro.h \
  1067. X    main.c \
  1068. X    shape.h \
  1069. X    misc.c \
  1070. X    produce.c \
  1071. X    rule.c \
  1072. X    rule.h \
  1073. X    select.c \
  1074. X    selrule.c \
  1075. X    selrule.h \
  1076. X    shape.1 \
  1077. X    shapeopt.c \
  1078. X    sighand.c \
  1079. X    std.c \
  1080. X    std.h \
  1081. X    string.c \
  1082. X    varsec.c \
  1083. X    varsec.h \
  1084. X    vpath.c
  1085. X
  1086. XPRODUCT = shape
  1087. XPROGS = shape
  1088. X
  1089. XSHAPOBJS = main.o shape.o hash.o macro.o rule.o files.o error.o produce.o std.o selrule.o attr.o varsec.o select.o vpath.o misc.o sighand.o shapeopt.o inherit.o string.o version.o
  1090. X
  1091. X#  Product dependencies
  1092. X
  1093. Xall: shape
  1094. X
  1095. Xshape: $(SHAPOBJS) $(LIBDIR)/libafs.s $(LIBDIR)/libutil.a
  1096. X    cc -g -o $@ $(SHAPOBJS) $(LIBDIR)/libafs.s $(LIBDIR)/libutil.a -ll
  1097. X$(SHAPOBJS):    $(HEADER)
  1098. Xmacro.o:    $(HEADER) macro.h
  1099. Xhash.o:        $(HEADER) hash.h
  1100. Xrule.o:     $(HEADER) rule.h
  1101. Xselrule.o:    $(HEADER) selrule.h
  1102. Xstd.o:        $(HEADER) std.h
  1103. Xvarsec.o:    $(HEADER) varsec.h
  1104. Xattr.o:        $(HEADER) attr.h
  1105. Xfiles.o:    $(HEADER) files.h
  1106. Xversion.o:    version.c
  1107. X
  1108. XClean:
  1109. X    rm shape *.o core
  1110. X
  1111. Xinstall: all
  1112. X    @-for i in $(PROGS); \
  1113. X    do \
  1114. X    echo installing $$i in $(INSTALDIR); \
  1115. X    install -c $$i $(INSTALDIR);\
  1116. X    done;
  1117. END_OF_FILE
  1118. if test 2367 -ne `wc -c <'src/shape/Makefile.bsd43'`; then
  1119.     echo shar: \"'src/shape/Makefile.bsd43'\" unpacked with wrong size!
  1120. fi
  1121. # end of 'src/shape/Makefile.bsd43'
  1122. fi
  1123. if test -f 'src/shape/Makefile.sunos40' -a "${1}" != "-c" ; then 
  1124.   echo shar: Will not clobber existing file \"'src/shape/Makefile.sunos40'\"
  1125. else
  1126. echo shar: Extracting \"'src/shape/Makefile.sunos40'\" \(2583 characters\)
  1127. sed "s/^X//" >'src/shape/Makefile.sunos40' <<'END_OF_FILE'
  1128. X#
  1129. X# Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1130. X#  and U. Pralle
  1131. X# 
  1132. X# This software is published on an as-is basis. There is ABSOLUTELY NO
  1133. X# WARRANTY for any part of this software to work correctly or as described
  1134. X# in the manuals. We do not accept any liability for any kind of damage
  1135. X# caused by use of this software, such as loss of data, time, money, or effort.
  1136. X# 
  1137. X# Permission is granted to use, copy, modify, or distribute any part of
  1138. X# this software as long as this is done without asking for charge, and
  1139. X# provided that this copyright notice is retained as part of the source
  1140. X# files. You may charge a distribution fee for the physical act of
  1141. X# transferring a copy, and you may at your option offer warranty
  1142. X# protection in exchange for a fee.
  1143. X# 
  1144. X# Direct questions to: Tech. Univ. Berlin
  1145. X#              Wilfried Koch
  1146. X#              Sekr. FR 5-6 
  1147. X#              Franklinstr. 28/29
  1148. X#              D-1000 Berlin 10, West Germany
  1149. X# 
  1150. X#              Tel: +49-30-314-22972
  1151. X#              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1152. X# 
  1153. XAFSLIB = /u/shape/lib/libafs.a
  1154. XUTILLIB = /u/shape/lib/libutil.a
  1155. XAFSINC = /u/shape/src/inc
  1156. XINSTALDIR = /u/shape/bin
  1157. X
  1158. X# OS sould be one of the following ULTRIX_2_0 SUNOS_4_0 BSD_4_3
  1159. X
  1160. XOS = SUNOS_4_0
  1161. X
  1162. X#  Configuration definition part
  1163. X
  1164. XCC = cc -DCFFLGS='"$$Flags: $(CFLAGS) $$"'
  1165. XCFLAGS = -g -I$(AFSINC) -D$(OS)
  1166. XLDFLAGS =  -Bstatic
  1167. X
  1168. X#  Product definition part
  1169. X
  1170. XHEADER = shape.h $(AFSINC)/afs.h 
  1171. X
  1172. XCOMPONENTS = \
  1173. X    README \
  1174. X    Makefile.bsd43 \
  1175. X    Makefile.sunos40 \
  1176. X    Makefile.ultrix20 \
  1177. X    attr.c \
  1178. X    attr.h \
  1179. X    error.c \
  1180. X    files.c \
  1181. X    files.h \
  1182. X    hash.c \
  1183. X    hash.h \
  1184. X    inherit.c \
  1185. X    shape.l \
  1186. X    macro.c \
  1187. X    macro.h \
  1188. X    main.c \
  1189. X    shape.h \
  1190. X    misc.c \
  1191. X    produce.c \
  1192. X    rule.c \
  1193. X    rule.h \
  1194. X    select.c \
  1195. X    selrule.c \
  1196. X    selrule.h \
  1197. X    shape.1 \
  1198. X    shapeopt.c \
  1199. X    sighand.c \
  1200. X    std.c \
  1201. X    std.h \
  1202. X    string.c \
  1203. X    varsec.c \
  1204. X    varsec.h \
  1205. X    vpath.c
  1206. X
  1207. XPRODUCT = shape
  1208. XPROGS = shape
  1209. X
  1210. XSHAPOBJS = main.o shape.o hash.o macro.o rule.o files.o error.o produce.o std.o selrule.o attr.o varsec.o select.o vpath.o misc.o sighand.o shapeopt.o inherit.o string.o version.o
  1211. X
  1212. X#  Product dependencies
  1213. X
  1214. Xall: shape
  1215. X
  1216. Xshape: $(SHAPOBJS) $(AFSLIB) $(UTILLIB)
  1217. X    cc -g $(LDFLAGS) -o $@ $(SHAPOBJS) $(UTILLIB) $(AFSLIB) -ll
  1218. X$(SHAPOBJS):    $(HEADER)
  1219. Xmacro.o:    $(HEADER) macro.h
  1220. Xhash.o:        $(HEADER) hash.h
  1221. Xrule.o:     $(HEADER) rule.h
  1222. Xselrule.o:    $(HEADER) selrule.h
  1223. Xstd.o:        $(HEADER) std.h
  1224. Xvarsec.o:    $(HEADER) varsec.h
  1225. Xattr.o:        $(HEADER) attr.h
  1226. Xfiles.o:    $(HEADER) files.h
  1227. Xversion.o:    version.c
  1228. X
  1229. XClean:
  1230. X    rm shape *.o core
  1231. X
  1232. Xinstall: all
  1233. X    @-for i in $(PROGS); \
  1234. X    do \
  1235. X    echo installing $$i in $(INSTALDIR); \
  1236. X    install -c $$i $(INSTALDIR);\
  1237. X    done;
  1238. END_OF_FILE
  1239. if test 2583 -ne `wc -c <'src/shape/Makefile.sunos40'`; then
  1240.     echo shar: \"'src/shape/Makefile.sunos40'\" unpacked with wrong size!
  1241. fi
  1242. # end of 'src/shape/Makefile.sunos40'
  1243. fi
  1244. if test -f 'src/shape/Makefile.ultrix20' -a "${1}" != "-c" ; then 
  1245.   echo shar: Will not clobber existing file \"'src/shape/Makefile.ultrix20'\"
  1246. else
  1247. echo shar: Extracting \"'src/shape/Makefile.ultrix20'\" \(2568 characters\)
  1248. sed "s/^X//" >'src/shape/Makefile.ultrix20' <<'END_OF_FILE'
  1249. X#
  1250. X# Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1251. X#  and U. Pralle
  1252. X# 
  1253. X# This software is published on an as-is basis. There is ABSOLUTELY NO
  1254. X# WARRANTY for any part of this software to work correctly or as described
  1255. X# in the manuals. We do not accept any liability for any kind of damage
  1256. X# caused by use of this software, such as loss of data, time, money, or effort.
  1257. X# 
  1258. X# Permission is granted to use, copy, modify, or distribute any part of
  1259. X# this software as long as this is done without asking for charge, and
  1260. X# provided that this copyright notice is retained as part of the source
  1261. X# files. You may charge a distribution fee for the physical act of
  1262. X# transferring a copy, and you may at your option offer warranty
  1263. X# protection in exchange for a fee.
  1264. X# 
  1265. X# Direct questions to: Tech. Univ. Berlin
  1266. X#              Wilfried Koch
  1267. X#              Sekr. FR 5-6 
  1268. X#              Franklinstr. 28/29
  1269. X#              D-1000 Berlin 10, West Germany
  1270. X# 
  1271. X#              Tel: +49-30-314-22972
  1272. X#              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1273. X# 
  1274. XAFSLIB = /u/shape/lib/libafs.a
  1275. XUTILLIB = /u/shape/lib/libutil.a
  1276. XAFSINC = /u/shape/src/inc
  1277. XINSTALDIR = /u/shape/bin
  1278. X
  1279. X# OS sould be one of the following ULTRIX_2_0 SUNOS_4_0 BSD_4_3
  1280. X
  1281. XOS = ULTRIX_2_0
  1282. X
  1283. X#  Configuration definition part
  1284. X
  1285. XCC = cc -DCFFLGS='"$$Flags: $(CFLAGS) $$"'
  1286. XCFLAGS = -g -I$(AFSINC) -D$(OS) -DOLDDBM
  1287. X
  1288. X#  Product definition part
  1289. X
  1290. XHEADER = shape.h $(AFSINC)/afs.h 
  1291. X
  1292. XCOMPONENTS = \
  1293. X    README \
  1294. X    Makefile.bsd43 \
  1295. X    Makefile.sunos40 \
  1296. X    Makefile.ultrix20 \
  1297. X    attr.c \
  1298. X    attr.h \
  1299. X    error.c \
  1300. X    files.c \
  1301. X    files.h \
  1302. X    hash.c \
  1303. X    hash.h \
  1304. X    inherit.c \
  1305. X    shape.l \
  1306. X    macro.c \
  1307. X    macro.h \
  1308. X    main.c \
  1309. X    shape.h \
  1310. X    misc.c \
  1311. X    produce.c \
  1312. X    rule.c \
  1313. X    rule.h \
  1314. X    select.c \
  1315. X    selrule.c \
  1316. X    selrule.h \
  1317. X    shape.1 \
  1318. X    shapeopt.c \
  1319. X    sighand.c \
  1320. X    std.c \
  1321. X    std.h \
  1322. X    string.c \
  1323. X    varsec.c \
  1324. X    varsec.h \
  1325. X    vpath.c
  1326. X
  1327. XPRODUCT = shape
  1328. XPROGS = shape
  1329. X
  1330. XSHAPOBJS = main.o shape.o hash.o macro.o rule.o files.o error.o produce.o std.o selrule.o attr.o varsec.o select.o vpath.o misc.o sighand.o shapeopt.o inherit.o string.o version.o
  1331. X
  1332. X#  Product dependencies
  1333. X
  1334. Xall: shape
  1335. X
  1336. Xshape: $(SHAPOBJS) $(AFSLIB) $(UTILLIB)
  1337. X    cc -g -o $@ $(SHAPOBJS) $(UTILLIB) $(AFSLIB) -ldbm -ll
  1338. X$(SHAPOBJS):    $(HEADER)
  1339. Xmacro.o:    $(HEADER) macro.h
  1340. Xhash.o:        $(HEADER) hash.h
  1341. Xrule.o:     $(HEADER) rule.h
  1342. Xselrule.o:    $(HEADER) selrule.h
  1343. Xstd.o:        $(HEADER) std.h
  1344. Xvarsec.o:    $(HEADER) varsec.h
  1345. Xattr.o:        $(HEADER) attr.h
  1346. Xfiles.o:    $(HEADER) files.h
  1347. Xversion.o:    version.c
  1348. X
  1349. XClean:
  1350. X    rm shape *.o core
  1351. X
  1352. Xinstall: all
  1353. X    @-for i in $(PROGS); \
  1354. X    do \
  1355. X    echo installing $$i in $(INSTALDIR); \
  1356. X    install -c $$i $(INSTALDIR);\
  1357. X    done;
  1358. END_OF_FILE
  1359. if test 2568 -ne `wc -c <'src/shape/Makefile.ultrix20'`; then
  1360.     echo shar: \"'src/shape/Makefile.ultrix20'\" unpacked with wrong size!
  1361. fi
  1362. # end of 'src/shape/Makefile.ultrix20'
  1363. fi
  1364. if test -f 'src/shape/string.c' -a "${1}" != "-c" ; then 
  1365.   echo shar: Will not clobber existing file \"'src/shape/string.c'\"
  1366. else
  1367. echo shar: Extracting \"'src/shape/string.c'\" \(2833 characters\)
  1368. sed "s/^X//" >'src/shape/string.c' <<'END_OF_FILE'
  1369. X/*
  1370. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1371. X *  and U. Pralle
  1372. X * 
  1373. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  1374. X * WARRANTY for any part of this software to work correctly or as described
  1375. X * in the manuals. We do not accept any liability for any kind of damage
  1376. X * caused by use of this software, such as loss of data, time, money, or 
  1377. X * effort.
  1378. X * 
  1379. X * Permission is granted to use, copy, modify, or distribute any part of
  1380. X * this software as long as this is done without asking for charge, and
  1381. X * provided that this copyright notice is retained as part of the source
  1382. X * files. You may charge a distribution fee for the physical act of
  1383. X * transferring a copy, and you may at your option offer warranty
  1384. X * protection in exchange for a fee.
  1385. X * 
  1386. X * Direct questions to: Tech. Univ. Berlin
  1387. X *              Wilfried Koch
  1388. X *              Sekr. FR 5-6 
  1389. X *              Franklinstr. 28/29
  1390. X *              D-1000 Berlin 10, West Germany
  1391. X * 
  1392. X *              Tel: +49-30-314-22972
  1393. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1394. X */
  1395. X#ifndef lint
  1396. Xstatic char *RCSid = "$Header: string.c,v 3.1 89/02/14 21:20:31 wolfgang Exp $";
  1397. X#endif
  1398. X#ifndef lint
  1399. Xstatic char *ConfFlg = CFFLGS;    /* should be defined from within Makefile */
  1400. X#endif
  1401. X/*
  1402. X * $Log:    string.c,v $
  1403. X * Revision 3.1  89/02/14  21:20:31  wolfgang
  1404. X * bug fixed in repl_string
  1405. X * 
  1406. X * Revision 3.0  89/01/24  11:37:12  wolfgang
  1407. X * New System Generation
  1408. X * 
  1409. X * Revision 1.4  89/01/03  13:14:09  wolfgang
  1410. X * changes done for lint
  1411. X * 
  1412. X * Revision 1.3  88/11/18  15:04:02  wolfgang
  1413. X * modul names are only expanded if dir is a vpath dir
  1414. X * 
  1415. X * Revision 1.2  88/08/12  08:58:29  wolfgang
  1416. X * This version is part of a release
  1417. X * 
  1418. X */
  1419. X
  1420. X#include "shape.h"
  1421. X
  1422. Xextern Bool is_vpath_dir();
  1423. X
  1424. Xchar *pathlist[MAXPATHLIST][2];
  1425. Xint lastpath;
  1426. X
  1427. X
  1428. Xchar *repl_string(inpstring)
  1429. X     char *inpstring;
  1430. X{
  1431. X  /* replaces "[ \t]<file>[ \t\0" with "[ \t]<dir/file>[ \t\0] */
  1432. X
  1433. X  int i;
  1434. X  int j;
  1435. X  int k;
  1436. X  int l;
  1437. X  int xx;
  1438. X  char *l1;
  1439. X  char l2[2048];
  1440. X
  1441. X  if ((l1 = malloc(2048)) == NIL)
  1442. X    errexit(10,"malloc");
  1443. X
  1444. X  l1[0] = '\0';
  1445. X  l2[0] = '\0';
  1446. X
  1447. X  if (lastpath == 0)
  1448. X    return(inpstring);
  1449. X
  1450. X  k = strlen(inpstring);
  1451. X
  1452. X  (void) strcpy(l1,inpstring);
  1453. X
  1454. X  for ( i = lastpath-1; i >= 0; i--)
  1455. X    {
  1456. X      if (strcmp(pathlist[i][1],"&$"))
  1457. X    {
  1458. X      l = strlen(pathlist[i][0]);
  1459. X      for(j = 0; j <= k; j++)
  1460. X        {
  1461. X          if(((l1[j - 1] == ' ') || (l1[j - 1] == '\t')) &&
  1462. X         ((l1[j + l]) == ' '|| (l1[j + l] == '\t') ||
  1463. X          (l1[j + l] == '\0')))
  1464. X        {
  1465. X          if(!strncmp(&l1[j],pathlist[i][0],l))
  1466. X            {
  1467. X              for (xx = 0; xx < j; xx++)
  1468. X            l2[xx] = l1[xx];
  1469. X              l2[j] = '\0';
  1470. X              (void) strcat(l2,pathlist[i][1]);
  1471. X              (void) strcat(l2,&l1[j+l]);
  1472. X              l2[strlen(l2)] = '\0';
  1473. X              (void) strcpy(l1,l2);
  1474. X              l2[0] = '\0';
  1475. X            }
  1476. X        }
  1477. X          k = strlen(l1);
  1478. X        }
  1479. X    }
  1480. X    }
  1481. X  return(l1);
  1482. X}
  1483. END_OF_FILE
  1484. if test 2833 -ne `wc -c <'src/shape/string.c'`; then
  1485.     echo shar: \"'src/shape/string.c'\" unpacked with wrong size!
  1486. fi
  1487. # end of 'src/shape/string.c'
  1488. fi
  1489. if test -f 'src/vc/Shapefile' -a "${1}" != "-c" ; then 
  1490.   echo shar: Will not clobber existing file \"'src/vc/Shapefile'\"
  1491. else
  1492. echo shar: Extracting \"'src/vc/Shapefile'\" \(2953 characters\)
  1493. sed "s/^X//" >'src/vc/Shapefile' <<'END_OF_FILE'
  1494. X#
  1495. X# Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1496. X#  and U. Pralle
  1497. X# 
  1498. X# This software is published on an as-is basis. There is ABSOLUTELY NO
  1499. X# WARRANTY for any part of this software to work correctly or as described
  1500. X# in the manuals. We do not accept any liability for any kind of damage
  1501. X# caused by use of this software, such as loss of data, time, money, or effort.
  1502. X# 
  1503. X# Permission is granted to use, copy, modify, or distribute any part of
  1504. X# this software as long as this is done without asking for charge, and
  1505. X# provided that this copyright notice is retained as part of the source
  1506. X# files. You may charge a distribution fee for the physical act of
  1507. X# transferring a copy, and you may at your option offer warranty
  1508. X# protection in exchange for a fee.
  1509. X# 
  1510. X# Direct questions to: Tech. Univ. Berlin
  1511. X#              Wilfried Koch
  1512. X#              Sekr. FR 5-6 
  1513. X#              Franklinstr. 28/29
  1514. X#              D-1000 Berlin 10, West Germany
  1515. X# 
  1516. X#              Tel: +49-30-314-22972
  1517. X#              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1518. X# 
  1519. X#  $Header: Makefile,v 1.15 88/04/06 15:00:18 axel Exp $
  1520. X#
  1521. X# Shapefile for AFS
  1522. X#
  1523. X# $__Header$
  1524. X#
  1525. X# $__Log$
  1526. X#
  1527. X
  1528. Xinclude ../config/rules.sh
  1529. Xinclude product-definition.sh
  1530. X
  1531. X#
  1532. X#  Product dependencies
  1533. X#
  1534. X
  1535. Xall: $(RULE) +$(SYSTEM) +$(QUALITY) +$(COMPILER) save retrv vl vadm
  1536. X
  1537. Xone: $(RULE) +$(SYSTEM) +$(QUALITY) +$(COMPILER) $(TN)
  1538. X
  1539. Xrelease: rel +$(SYSTEM) +final +$(COMPILER) @newrel @publish \
  1540. X    save retrv vl vadm
  1541. X
  1542. Xtrelease: rel +$(SYSTEM) +final +$(COMPILER) \
  1543. X    save retrv vl vadm
  1544. X
  1545. Xsave: $(SAVEOBJS) $(COMMON) $(AFSLIB) $(UTLIB)
  1546. X    cc $(LDFLAGS) -o $@ $(SAVEOBJS) $(COMMON) $(UTLIB) $(AFSLIB) 
  1547. X
  1548. Xretrv: $(RETROBJS) $(COMMON) $(AFSLIB) $(UTLIB)
  1549. X    cc $(LDFLAGS) -o $@ $(RETROBJS) $(COMMON) $(UTLIB) $(AFSLIB)
  1550. X
  1551. Xvl: $(VLOBJS) $(AFSLIB) $(UTLIB)
  1552. X    cc $(LDFLAGS) -o $@ $(VLOBJS) $(VERSION).o $(UTLIB) $(AFSLIB)
  1553. X
  1554. Xvadm: $(VADMOBJS) $(AFSLIB) $(UTLIB)
  1555. X    cc $(LDFLAGS) -o $@ $(VADMOBJS) $(VERSION).o $(UTLIB) $(AFSLIB)
  1556. X
  1557. X#
  1558. X# Metatargets
  1559. X#
  1560. X
  1561. X@save:
  1562. X    save -q $(COMPONENTS)
  1563. X
  1564. X@publish:
  1565. X    sbmt -q $(COMPONENTS) -n $(RELNAME)
  1566. X
  1567. X@sunset: vsave $(COMPONENTS)
  1568. X    rsh troll -l shape '(cd src/vc; rm -f $(COMPONENTS) )';
  1569. X    rcp $(COMPONENTS) shape@troll:src/vc
  1570. X
  1571. X@vaxset: vsave $(COMPONENTS)
  1572. X    rsh chaos -l shape '(cd src/vc; rm -f $(COMPONENTS) )';
  1573. X    rcp $(COMPONENTS) shape@chaos:src/vc
  1574. X
  1575. X@newrel:
  1576. X    cp $(VERSIONPROTO) $(VERSION).c ; \
  1577. X    sbmt -fq $(VERSION).c -n $(RELNAME)
  1578. X
  1579. X@bclean:
  1580. X    rm -f AFS/?B*
  1581. X
  1582. X@echocomp:
  1583. X    @echo $(COMPONENTS)
  1584. X
  1585. Xlint: +$(SYSTEM) +$(QUALITY) lintsave lintretrv lintvadm lintvl
  1586. X
  1587. Xlintsave: $(SAVESRC)
  1588. X    @echo checking '"save"'; \
  1589. X    lint $(SWITCHES) $(SAVESRC)
  1590. X
  1591. Xlintretrv: $(RETRSRC)
  1592. X    @echo checking '"retrv"'; \
  1593. X    lint $(SWITCHES) $(RETRSRC)
  1594. X
  1595. Xlintvadm: $(VADMSRC)
  1596. X    @echo checking '"vadm"'; \
  1597. X    lint $(SWITCHES) $(VADMSRC)
  1598. X
  1599. Xlintvl: $(VLSRC)
  1600. X    @echo checking '"vl"'; \
  1601. X    lint $(SWITCHES) $(VLSRC)
  1602. X
  1603. Xdepend: $(RULE) +$(SYSTEM)
  1604. X    $(CC) -M $(CFLAGS) $(MODULES) | grep -v /usr/include | \
  1605. X    sort | uniq | sed -e 's, ./, ,g' -e 's.$(BASE).$$(BASE).g' > deps
  1606. X
  1607. Xinclude deps
  1608. END_OF_FILE
  1609. if test 2953 -ne `wc -c <'src/vc/Shapefile'`; then
  1610.     echo shar: \"'src/vc/Shapefile'\" unpacked with wrong size!
  1611. fi
  1612. # end of 'src/vc/Shapefile'
  1613. fi
  1614. if test -f 'src/vc/afsapp.h' -a "${1}" != "-c" ; then 
  1615.   echo shar: Will not clobber existing file \"'src/vc/afsapp.h'\"
  1616. else
  1617. echo shar: Extracting \"'src/vc/afsapp.h'\" \(2874 characters\)
  1618. sed "s/^X//" >'src/vc/afsapp.h' <<'END_OF_FILE'
  1619. X/*
  1620. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1621. X *  and U. Pralle
  1622. X * 
  1623. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  1624. X * WARRANTY for any part of this software to work correctly or as described
  1625. X * in the manuals. We do not accept any liability for any kind of damage
  1626. X * caused by use of this software, such as loss of data, time, money, or 
  1627. X * effort.
  1628. X * 
  1629. X * Permission is granted to use, copy, modify, or distribute any part of
  1630. X * this software as long as this is done without asking for charge, and
  1631. X * provided that this copyright notice is retained as part of the source
  1632. X * files. You may charge a distribution fee for the physical act of
  1633. X * transferring a copy, and you may at your option offer warranty
  1634. X * protection in exchange for a fee.
  1635. X * 
  1636. X * Direct questions to: Tech. Univ. Berlin
  1637. X *              Wilfried Koch
  1638. X *              Sekr. FR 5-6 
  1639. X *              Franklinstr. 28/29
  1640. X *              D-1000 Berlin 10, West Germany
  1641. X * 
  1642. X *              Tel: +49-30-314-22972
  1643. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1644. X */
  1645. X/*
  1646. X * $Header: afsapp.h[3.10] Thu Feb 23 18:13:25 1989 axel@coma published $
  1647. X *
  1648. X * Log for /u/shape/dist-tape/src/vc/afsapp.h[3.7]
  1649. X *     Thu Feb 23 18:13:25 1989 axel@coma published $
  1650. X *  --- empty log message ---
  1651. X *  afsapp.h[3.9] Thu Feb 23 18:13:25 1989 axel@coma published $
  1652. X *  --- empty log message ---
  1653. X *  afsapp.h[3.10] Thu Feb 23 18:13:25 1989 axel@coma published $
  1654. X *  --- empty log message ---
  1655. X */
  1656. X
  1657. X
  1658. X/*
  1659. X *  The following definitions are used by most version control
  1660. X *  commands.
  1661. X */
  1662. X
  1663. X#ifndef _TYPES_
  1664. X#include <sys/types.h>
  1665. X#define _TYPES_
  1666. X#endif
  1667. X#ifndef _TIME_
  1668. X#include <sys/time.h>
  1669. X#define _TIME_
  1670. X#endif
  1671. X#ifndef MAXNAMLEN
  1672. X#include <sys/dir.h>
  1673. X#endif
  1674. X#include <setjmp.h>
  1675. X#include "typeconv.h"
  1676. X
  1677. Xstruct Transaction {
  1678. X  char tr_fname[MAXNAMLEN];
  1679. X  int tr_done;
  1680. X  int tr_seqno;
  1681. X  int tr_rc;
  1682. X  jmp_buf tr_env;
  1683. X};
  1684. X
  1685. X#ifndef TRUE
  1686. X#define TRUE 1
  1687. X#endif
  1688. X#ifndef FALSE
  1689. X#define FALSE 0
  1690. X#endif
  1691. X
  1692. X#define fail(x) ((x) == -1)
  1693. X#define min(x,y) (((x) <= (y)) ? (x) : (y)) 
  1694. X#define gen(x) (((x) >> 16) & 0x0000FFFF)
  1695. X#define rev(x) ((x) & 0x0000FFFF)
  1696. X#define vc_testlock_g(k) vc_testlock ((k), AF_GLOBALLOCK)
  1697. X#define vc_testlock_v(k) vc_testlock ((k), AF_VERSIONLOCK)
  1698. X#define vc_lock_g(k,u) vc_lock ((k), (u), AF_GLOBALLOCK)
  1699. X#define vc_lock_v(k,u) vc_lock ((k), (u), AF_VERSIONLOCK)
  1700. X#define vc_unlock_g(k) vc_unlock ((k), AF_GLOBALLOCK)
  1701. X#define vc_unlock_v(k) vc_unlock ((k), AF_VERSIONLOCK)
  1702. X
  1703. X#define NOSHELL 127
  1704. X
  1705. X#define MAXTMPF 5
  1706. X#define MAXSETS 64
  1707. X#define MAXKEYS 64
  1708. X#define MAXATTRBUFS 64
  1709. X
  1710. X#define TYPEF 1
  1711. X#define AFSET 2
  1712. X#define AFKEY 3
  1713. X#define AFATTRS 4
  1714. X#define NEXT 1
  1715. X#define REWIND 2
  1716. X
  1717. X#define SYMNAME  "__SymbolicName__"
  1718. X#define CLEAD  "__Clead__"
  1719. X#define CLEADMAXLEN 32
  1720. X#define INTENT "__Intent__=Intention for change:\n"
  1721. X#define EMPTYINTENT "--- no intent expressed ---"
  1722. X#define EMPTYNOTE "--- empty log message ---"
  1723. X
  1724. END_OF_FILE
  1725. if test 2874 -ne `wc -c <'src/vc/afsapp.h'`; then
  1726.     echo shar: \"'src/vc/afsapp.h'\" unpacked with wrong size!
  1727. fi
  1728. # end of 'src/vc/afsapp.h'
  1729. fi
  1730. if test -f 'src/vc/project.c' -a "${1}" != "-c" ; then 
  1731.   echo shar: Will not clobber existing file \"'src/vc/project.c'\"
  1732. else
  1733. echo shar: Extracting \"'src/vc/project.c'\" \(2333 characters\)
  1734. sed "s/^X//" >'src/vc/project.c' <<'END_OF_FILE'
  1735. X/*
  1736. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1737. X *  and U. Pralle
  1738. X * 
  1739. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  1740. X * WARRANTY for any part of this software to work correctly or as described
  1741. X * in the manuals. We do not accept any liability for any kind of damage
  1742. X * caused by use of this software, such as loss of data, time, money, or 
  1743. X * effort.
  1744. X * 
  1745. X * Permission is granted to use, copy, modify, or distribute any part of
  1746. X * this software as long as this is done without asking for charge, and
  1747. X * provided that this copyright notice is retained as part of the source
  1748. X * files. You may charge a distribution fee for the physical act of
  1749. X * transferring a copy, and you may at your option offer warranty
  1750. X * protection in exchange for a fee.
  1751. X * 
  1752. X * Direct questions to: Tech. Univ. Berlin
  1753. X *              Wilfried Koch
  1754. X *              Sekr. FR 5-6 
  1755. X *              Franklinstr. 28/29
  1756. X *              D-1000 Berlin 10, West Germany
  1757. X * 
  1758. X *              Tel: +49-30-314-22972
  1759. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1760. X */
  1761. X#ifndef lint
  1762. Xstatic char *AFSid = "$Header: project.c[1.4] Thu Feb 23 18:13:39 1989 axel@coma published $";
  1763. X#ifdef CFFLGS
  1764. Xstatic char *ConfFlg = CFFLGS;
  1765. X    /* should be defined from within Makefile */
  1766. X#endif
  1767. X#endif
  1768. X/*
  1769. X * Log for /u/shape/dist-tape/src/vc/project.c[1.2]
  1770. X *     Thu Feb 23 18:13:39 1989 axel@coma published $
  1771. X *  --- empty log message ---
  1772. X *  project.c[1.3] Thu Feb 23 18:13:39 1989 axel@coma published $
  1773. X *  --- empty log message ---
  1774. X *  project.c[1.4] Thu Feb 23 18:13:39 1989 axel@coma published $
  1775. X *  --- empty log message ---
  1776. X */
  1777. X
  1778. X/*LINTLIBRARY*/
  1779. X
  1780. X#include "project.h"
  1781. X
  1782. X/*ARGSUSED*/
  1783. XGetProject (pname, pstruct) Project *pstruct; char *pname; {
  1784. X/*
  1785. X * Try to find information about a project. If pname is anything but 
  1786. X * a NULL pointer, try to find information about a project of this name.
  1787. X * If pname is NULL, search the environment for variable "SHAPEPRJ"
  1788. X * (specified in project.h). If there isn't such a variable, look for
  1789. X * a ".Project"-file in the user's home directory.
  1790. X * GetProject returns an error indication, if pname was given but no
  1791. X * project data can be found. A NULL pointer is returned if no project
  1792. X * information could be found in the remaining cases (indicating local
  1793. X * or small operation).
  1794. X */
  1795. X  return NULL;   /* This is yet a stub */
  1796. X}
  1797. END_OF_FILE
  1798. if test 2333 -ne `wc -c <'src/vc/project.c'`; then
  1799.     echo shar: \"'src/vc/project.c'\" unpacked with wrong size!
  1800. fi
  1801. # end of 'src/vc/project.c'
  1802. fi
  1803. if test -f 'src/vc/retrv.h' -a "${1}" != "-c" ; then 
  1804.   echo shar: Will not clobber existing file \"'src/vc/retrv.h'\"
  1805. else
  1806. echo shar: Extracting \"'src/vc/retrv.h'\" \(2436 characters\)
  1807. sed "s/^X//" >'src/vc/retrv.h' <<'END_OF_FILE'
  1808. X/*
  1809. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1810. X *  and U. Pralle
  1811. X * 
  1812. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  1813. X * WARRANTY for any part of this software to work correctly or as described
  1814. X * in the manuals. We do not accept any liability for any kind of damage
  1815. X * caused by use of this software, such as loss of data, time, money, or 
  1816. X * effort.
  1817. X * 
  1818. X * Permission is granted to use, copy, modify, or distribute any part of
  1819. X * this software as long as this is done without asking for charge, and
  1820. X * provided that this copyright notice is retained as part of the source
  1821. X * files. You may charge a distribution fee for the physical act of
  1822. X * transferring a copy, and you may at your option offer warranty
  1823. X * protection in exchange for a fee.
  1824. X * 
  1825. X * Direct questions to: Tech. Univ. Berlin
  1826. X *              Wilfried Koch
  1827. X *              Sekr. FR 5-6 
  1828. X *              Franklinstr. 28/29
  1829. X *              D-1000 Berlin 10, West Germany
  1830. X * 
  1831. X *              Tel: +49-30-314-22972
  1832. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1833. X */
  1834. X/*
  1835. X * $Header: retrv.h[3.2] Thu Feb 23 18:13:50 1989 axel@coma published $
  1836. X *
  1837. X * Log for /u/shape/dist-tape/src/vc/retrv.h[3.0]
  1838. X *     Thu Feb 23 18:13:50 1989 axel@coma published $
  1839. X *  --- empty log message ---
  1840. X *  retrv.h[3.1] Thu Feb 23 18:13:50 1989 axel@coma published $
  1841. X *  --- empty log message ---
  1842. X *  retrv.h[3.2] Thu Feb 23 18:13:50 1989 axel@coma published $
  1843. X *  --- empty log message ---
  1844. X */
  1845. X
  1846. X
  1847. X#ifndef _TYPES_
  1848. X#include <sys/types.h>
  1849. X#define _TYPES_
  1850. X#endif
  1851. X#ifndef _TIME_
  1852. X#include <sys/time.h>
  1853. X#define _TIME_
  1854. X#endif
  1855. X#ifndef MAXNAMLEN
  1856. X#include <sys/dir.h>
  1857. X#endif
  1858. X#include "afsapp.h"
  1859. X
  1860. Xstruct Vdesc {
  1861. X  int  v_genno,
  1862. X       v_state,
  1863. X       v_vno;
  1864. X  time_t v_time;
  1865. X  char v_attrf[MAXNAMLEN], 
  1866. X       v_spec[80], 
  1867. X       v_pname[80],
  1868. X       v_aunam[MAXNAMLEN],
  1869. X       v_auhost[MAXHOSTNAMELEN];
  1870. X};
  1871. X
  1872. X#define ATTRDEF 01
  1873. X#define QUIETPLEASE 02
  1874. X#define FORCE 04
  1875. X#define TYPEOUT 010
  1876. X#define TONAME "vcat"
  1877. X#define PROJCSET 020
  1878. X#define VSPECSET 040
  1879. X#define GENSET 0100
  1880. X#define AUNSET 0200
  1881. X#define STATSET 0400
  1882. X#define XACT 01000
  1883. X#define DATESET 02000
  1884. X#define KEEPMODE 04000
  1885. X#define LOCKIT 010000
  1886. X#define COPY 020000
  1887. X
  1888. X#define WDOVRBS "Date spec. disables selection of busy version. (warning)"
  1889. X#define EINVALPROJ "No such project:"
  1890. X#define NORESTORE "%s not restored"
  1891. X#define RTRATTR "RTRATTRS"
  1892. X
  1893. X/* permission statuus for doretrv */
  1894. X#define DOIT 01
  1895. X#define DENIED 02
  1896. X#define RECREATE 04
  1897. END_OF_FILE
  1898. if test 2436 -ne `wc -c <'src/vc/retrv.h'`; then
  1899.     echo shar: \"'src/vc/retrv.h'\" unpacked with wrong size!
  1900. fi
  1901. # end of 'src/vc/retrv.h'
  1902. fi
  1903. if test -f 'src/vc/typeconv.h' -a "${1}" != "-c" ; then 
  1904.   echo shar: Will not clobber existing file \"'src/vc/typeconv.h'\"
  1905. else
  1906. echo shar: Extracting \"'src/vc/typeconv.h'\" \(2337 characters\)
  1907. sed "s/^X//" >'src/vc/typeconv.h' <<'END_OF_FILE'
  1908. X/*
  1909. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1910. X *  and U. Pralle
  1911. X * 
  1912. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  1913. X * WARRANTY for any part of this software to work correctly or as described
  1914. X * in the manuals. We do not accept any liability for any kind of damage
  1915. X * caused by use of this software, such as loss of data, time, money, or 
  1916. X * effort.
  1917. X * 
  1918. X * Permission is granted to use, copy, modify, or distribute any part of
  1919. X * this software as long as this is done without asking for charge, and
  1920. X * provided that this copyright notice is retained as part of the source
  1921. X * files. You may charge a distribution fee for the physical act of
  1922. X * transferring a copy, and you may at your option offer warranty
  1923. X * protection in exchange for a fee.
  1924. X * 
  1925. X * Direct questions to: Tech. Univ. Berlin
  1926. X *              Wilfried Koch
  1927. X *              Sekr. FR 5-6 
  1928. X *              Franklinstr. 28/29
  1929. X *              D-1000 Berlin 10, West Germany
  1930. X * 
  1931. X *              Tel: +49-30-314-22972
  1932. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1933. X */
  1934. X/*
  1935. X * $Header: typeconv.h[1.1] Thu Feb 23 18:13:59 1989 axel@coma published $
  1936. X *
  1937. X * Log for /u/shape/dist-tape/src/vc/typeconv.h[1.0]
  1938. X *     Thu Feb 23 18:13:59 1989 axel@coma published $
  1939. X *  --- empty log message ---
  1940. X *  typeconv.h[1.1] Thu Feb 23 18:13:59 1989 axel@coma published $
  1941. X *  --- empty log message ---
  1942. X */
  1943. X
  1944. X
  1945. X#ifndef _TYPECONV_
  1946. X#define _TYPECONV_
  1947. X#if !(defined (ULTRIX_2_0) | defined (BSD_4_3) | defined (SUNOS_4_0)) 
  1948. X#define BSD_4_3
  1949. X#endif
  1950. X
  1951. X#ifdef ULTRIX_2_0
  1952. X#ifndef Sfunc_t
  1953. X#define Sfunc_t void        /* type of function argument to signal call */
  1954. X#endif
  1955. X#ifndef Size_t
  1956. X#define Size_t unsigned      /* used for args to malloc(), fread() etc. */
  1957. X#endif
  1958. X#ifndef Uid_t
  1959. X#define Uid_t int            /* used for user-id types */
  1960. X#endif
  1961. X#ifndef Gid_t
  1962. X#define Gid_t int            /* used for user-id types */
  1963. X#endif
  1964. X#endif
  1965. X
  1966. X#ifdef BSD_4_3
  1967. X#ifndef Sfunc_t
  1968. X#define Sfunc_t int
  1969. X#endif Sfunc_t
  1970. X#ifndef Size_t
  1971. X#define Size_t int
  1972. X#endif Size_t
  1973. X#ifndef Uid_t
  1974. X#define Uid_t uid_t
  1975. X#endif Uid_t
  1976. X#ifndef Gid_t
  1977. X#define Gid_t gid_t
  1978. X#endif Gid_t
  1979. X#endif
  1980. X
  1981. X#ifdef SUNOS_4_0
  1982. X#ifndef Sfunc_t
  1983. X#define Sfunc_t int
  1984. X#endif Sfunc_t
  1985. X#ifndef Size_t
  1986. X#define Size_t int
  1987. X#endif Size_t
  1988. X#ifndef Uid_t
  1989. X#define Uid_t uid_t
  1990. X#endif Uid_t
  1991. X#ifndef Gid_t
  1992. X#define Gid_t gid_t
  1993. X#endif Gid_t
  1994. X#endif
  1995. X#endif _TYPECONV_
  1996. END_OF_FILE
  1997. if test 2337 -ne `wc -c <'src/vc/typeconv.h'`; then
  1998.     echo shar: \"'src/vc/typeconv.h'\" unpacked with wrong size!
  1999. fi
  2000. # end of 'src/vc/typeconv.h'
  2001. fi
  2002. echo shar: End of archive 3 \(of 33\).
  2003. cp /dev/null ark3isdone
  2004. MISSING=""
  2005. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ; do
  2006.     if test ! -f ark${I}isdone ; then
  2007.     MISSING="${MISSING} ${I}"
  2008.     fi
  2009. done
  2010. if test "${MISSING}" = "" ; then
  2011.     echo You have unpacked all 33 archives.
  2012.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2013. else
  2014.     echo You still need to unpack the following archives:
  2015.     echo "        " ${MISSING}
  2016. fi
  2017. ##  End of shell archive.
  2018. exit 0
  2019.