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

  1. Subject:  v19i018:  A software configuration management system, Part05/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 18
  8. Archive-name: shape/part05
  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 5 (of 33)."
  19. # Contents:  man/man3/afmisc.3 src/afs/Makefile.distribution
  20. #   src/afs/afkeys.c src/afs/lcs.gedc.c src/shape/Shapefile
  21. #   src/shape/select.c src/shape/vpath.c src/vc/deps
  22. #   src/vc/vadm_delete.c src/vc/vc_keyboardIo.c src/vfind/Shapefile
  23. #   tutorial/tutorial.ms
  24. # Wrapped by rsalz@papaya.bbn.com on Thu Jun  1 19:26:52 1989
  25. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  26. if test -f 'man/man3/afmisc.3' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'man/man3/afmisc.3'\"
  28. else
  29. echo shar: Extracting \"'man/man3/afmisc.3'\" \(4025 characters\)
  30. sed "s/^X//" >'man/man3/afmisc.3' <<'END_OF_FILE'
  31. X...
  32. X... Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  33. X...  and U. Pralle
  34. X... 
  35. X... This software is published on an as-is basis. There is ABSOLUTELY NO
  36. X... WARRANTY for any part of this software to work correctly or as described
  37. X... in the manuals. We do not accept any liability for any kind of damage
  38. X... caused by use of this software, such as loss of data, time, money, or 
  39. X... effort.
  40. X... 
  41. X... Permission is granted to use, copy, modify, or distribute any part of
  42. X... this software as long as this is done without asking for charge, and
  43. X... provided that this copyright notice is retained as part of the source
  44. X... files. You may charge a distribution fee for the physical act of
  45. X... transferring a copy, and you may at your option offer warranty
  46. X... protection in exchange for a fee.
  47. X... 
  48. X... Direct questions to: Tech. Univ. Berlin
  49. X...              Wilfried Koch
  50. X...              Sekr. FR 5-6 
  51. X...              Franklinstr. 28/29
  52. X...              D-1000 Berlin 10, West Germany
  53. X... 
  54. X...              Tel: +49-30-314-22972
  55. X...              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  56. X... 
  57. X.TH AF_MISC 3 "" \n(dy.\n(mo.\n(yr
  58. X.SH NAME
  59. Xaf_misc \(em miscellaneous AFS-functions
  60. X.SH SYNOPSIS
  61. X\fBchar *af_afname (path)
  62. X.br
  63. Xchar    *path;
  64. X.sp
  65. Xchar *af_afpath (path)
  66. X.br
  67. Xchar    *path;
  68. X.sp
  69. Xchar *af_aftype (path)
  70. X.br
  71. Xchar    *path;
  72. X.sp
  73. Xchar *af_access (path, name, type, mode)
  74. X.br
  75. Xchar    *path, *name, *type;
  76. X.br
  77. Xint    mode;
  78. X.sp
  79. Xaf_setarchpath (path)
  80. X.br
  81. Xchar    *path;
  82. X.sp
  83. Xaf_cleanup ()
  84. X.sp
  85. Xaf_perror (string)
  86. X.br
  87. Xchar    *string;
  88. X.sp
  89. Xchar *af_version()
  90. X.SH DESCRIPTION
  91. XThe functions \fIaf_afname, af_afpath\fR and \fIaf_aftype\fR
  92. Xextract name, syspath or type from a given (operating
  93. Xsystem dependent) file identification.
  94. XIn an \s-1UNIX\s+1 environment, a given pathname of the form
  95. X\fC/usr/lib/libafs.a\fR
  96. Xleads to the afname \fClibafs\fR, afpath \fC/usr/lib\fR and aftype \fCa\fR.
  97. XIf no path (eg. \fCotto.c\fR), or no type
  98. X(eg. \fC/usr/hugo/Makefile\fR) is given, the corresponding routine returns an
  99. Xempty string.
  100. XA period as first character in a filename is always
  101. Xconsidered to be part of the name (e.g. \fC.cshrc\fR has the name
  102. X\fC.cshrc\fR and an empty type string).
  103. X\(lq\fC.\fR\(rq and \(lq\fC..\fR\(rq are recognized as names.
  104. XArchive file extensions and AFS-specific path extensions are stripped from
  105. Xthe resulting name resp. pathname.
  106. X.br
  107. X\fBNote:\fR \fIaf_afname, af_afpath\fR and \fIaf_aftype\fR use static
  108. Xmemory for the returned results.
  109. XSubsequent calls of the same function overwrite former results.
  110. X.PP
  111. X\fIAf_access\fR determines the existence of an line of development.
  112. XIf any ASO (any version) with the given \fIpath\fR, \fIname\fR
  113. Xand \fItype\fR attributes exists, af_access returns zero, otherwise \-1.
  114. XThe \fImode\fR argument can either be \fIAF_SOURCE\fR indicating that
  115. Xonly source objects shall be searched or \fIAF_DERIVED\fR which means that
  116. Xonly the derived object pool shall be searched for existence
  117. Xof a matching ASO.
  118. X.PP
  119. X\fIAf_setarchpath\fR is used to define the location of the AFS 
  120. Xarchive files. If no path is set, the archive files are stored
  121. Xin a subdirectory called \fCAFS\fR, relative to the directory
  122. Xwhere corresponding busy version resides.
  123. XIf a nil-pointer is given as \fIpath\fR-argument, the former setting
  124. Xof the global archive path is cleared.
  125. X.PP
  126. X\fIAf_cleanup\fR serves as cleanup routine upon premature termination
  127. Xof an AFS application. It removes temporary files and frees all allocated
  128. Xmemory.
  129. X.PP
  130. X\fIAf_perror\fR produces a short error message on the standard error file
  131. Xof the form described in \fIperror(3)\fR.
  132. XIf the last error encountered during an AFS-application was an AFS-specific
  133. Xerror, a corresponding message is generated, otherwise \fIaf_perror\fR
  134. Xcalls \fIperror(3)\fR.
  135. X.PP
  136. X\fIAf_version\fR returns a string that names the version and the
  137. Xcreator of the currently used AFS library.
  138. X.SH SEE ALSO
  139. Xintro(2), af_intro(3), perror(3), free(3)
  140. X.SH DIAGNOSTICS
  141. XUpon error, af_afname, af_afpath and af_aftype returned a nil pointer
  142. Xand \fIaf_errno\fR is set to the corresponding error number.
  143. X
  144. X
  145. END_OF_FILE
  146. if test 4025 -ne `wc -c <'man/man3/afmisc.3'`; then
  147.     echo shar: \"'man/man3/afmisc.3'\" unpacked with wrong size!
  148. fi
  149. # end of 'man/man3/afmisc.3'
  150. fi
  151. if test -f 'src/afs/Makefile.distribution' -a "${1}" != "-c" ; then 
  152.   echo shar: Will not clobber existing file \"'src/afs/Makefile.distribution'\"
  153. else
  154. echo shar: Extracting \"'src/afs/Makefile.distribution'\" \(4290 characters\)
  155. sed "s/^X//" >'src/afs/Makefile.distribution' <<'END_OF_FILE'
  156. X#
  157. X# Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  158. X#  and U. Pralle
  159. X# 
  160. X# This software is published on an as-is basis. There is ABSOLUTELY NO
  161. X# WARRANTY for any part of this software to work correctly or as described
  162. X# in the manuals. We do not accept any liability for any kind of damage
  163. X# caused by use of this software, such as loss of data, time, money, or effort.
  164. X# 
  165. X# Permission is granted to use, copy, modify, or distribute any part of
  166. X# this software as long as this is done without asking for charge, and
  167. X# provided that this copyright notice is retained as part of the source
  168. X# files. You may charge a distribution fee for the physical act of
  169. X# transferring a copy, and you may at your option offer warranty
  170. X# protection in exchange for a fee.
  171. X# 
  172. X# Direct questions to: Tech. Univ. Berlin
  173. X#              Wilfried Koch
  174. X#              Sekr. FR 5-6 
  175. X#              Franklinstr. 28/29
  176. X#              D-1000 Berlin 10, West Germany
  177. X# 
  178. X#              Tel: +49-30-314-22972
  179. X#              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  180. X# 
  181. X#
  182. X#  Makefile.distribution for AFS
  183. X#
  184. X
  185. XSOURCE = \
  186. X    afarchive.c afenviron.c aflib.c afvers.c afdelta.c afkeys.c\
  187. X    afstates.c afsattrs.c afretr.c afsysc.c affiles.c afcattrs.c\
  188. X    afsets.c afhash.c afcompar.c afbpool.c afsymtab.c afstore.c\
  189. X    aflock.c afsrepair.c
  190. X
  191. XDELTASOURCE = \
  192. X    bsfd.c lcs.main.c lcs.cdlt.c lcs.gedc.c edcmd.h suffix.h predef.h
  193. X
  194. XINCLUDE = $(INCLUDEDIR)/afs.h $(INCLUDEDIR)/afsys.h afarchive.h typeconv.h
  195. X
  196. XCOMPONENTS = $(SOURCE) $(INCLUDE) afsrepair.h
  197. X
  198. XVERSION = af_version
  199. X
  200. XAFSOBJS = \
  201. X    afarchive.o afenviron.o aflib.o afvers.o afdelta.o afkeys.o\
  202. X    afstates.o afsattrs.o afretr.o afsysc.o affiles.o afcattrs.o\
  203. X    afsets.o afhash.o afcompar.o afbpool.o afsymtab.o afstore.o\
  204. X    aflock.o $(VERSION).o
  205. X
  206. XDELTALIB = bsfd.o lcs.cdlt.o lcs.gedc.o lcs.main.o
  207. X
  208. XTESTSOURCE = \
  209. X    testmain.c testcall.c testfdes.c testkey.c testabuf.c testset.c\
  210. X    testvar.c testshow.c test.h
  211. X
  212. XTESTOBJS = testmain.o testcall.o testshow.o testvar.o testkey.o testset.o\
  213. X    testabuf.o testfdes.o
  214. X
  215. X#
  216. X#  Product dependencies
  217. X#
  218. X
  219. Xall: $(LIBDIR)/libafs.a afsrepair $(AFSDB) # macro AFSDB only set on coma
  220. X
  221. X$(LIBDIR)/libafs.a: $(AFSOBJS) $(DELTALIB) $(VERSION).o
  222. X    @ar ruv $(LIBDIR)/libafs.a $(AFSOBJS) $(DELTALIB); \
  223. X    ranlib $(LIBDIR)/libafs.a
  224. X
  225. X#
  226. X# installation stuff
  227. X#
  228. X
  229. Xinstallall: install installtest
  230. X
  231. Xinstall: $(LIBDIR)/libafs.a afsrepair\
  232. X         $(INSTALINCDIR)/afs.h $(INSTALINCDIR)/afsys.h
  233. X    @-if [ "$(INSTALLIBDIR)" != "$(LIBDIR)" ]; then \
  234. X    echo installing libafs.a in $(INSTALLIBDIR) ...; \
  235. X    install -c -m 644 -o $(INSTALOWNER) -g $(INSTALGROUP)\
  236. X        $(LIBDIR)/libafs.a $(INSTALLIBDIR); \
  237. X    ranlib $(INSTALLIBDIR)/libafs.a; \
  238. X    fi; \
  239. X    echo installing afsrepair in $(INSTALDIR)/bin ...; \
  240. X    install -c -m 755 -o $(INSTALOWNER) -g $(INSTALGROUP) afsrepair $(INSTALDIR)/bin
  241. X    
  242. X$(INSTALINCDIR)/afs.h: $(INCLUDEDIR)/afs.h
  243. X    @-if [ "$(INSTALINCDIR)" != "$(INCLUDEDIR)" ]; then \
  244. X    echo installing afs.h in $(INSTALINCDIR) ...; \
  245. X    install -c -m 644 -o $(INSTALOWNER) -g $(INSTALGROUP) $(INCLUDEDIR)/afs.h $(INSTALINCDIR); \
  246. X    fi
  247. X
  248. X$(INSTALINCDIR)/afsys.h: $(INCLUDEDIR)/afsys.h
  249. X    @-if [ "$(INSTALINCDIR)" != "$(INCLUDEDIR)" ]; then \
  250. X    echo installing afsys.h in $(INSTALINCDIR) ...; \
  251. X    install -c -m 644 -o $(INSTALOWNER) -g $(INSTALGROUP) $(INCLUDEDIR)/afsys.h $(INSTALINCDIR); \
  252. X    touch $(INSTALINCDIR)/afs.h; \
  253. X    fi
  254. X
  255. X#
  256. X# archive repair tool
  257. X#
  258. X
  259. X$(AFSOBJS) $(TESTOBJS) afsrepair.o: $(INCLUDE)
  260. X
  261. Xafsrepair.o: afsrepair.h
  262. X
  263. Xafsrepair: afsrepair.o afsysc.o afsymtab.o afenviron.o afhash.o aflib.o\
  264. X        af_version.o
  265. X    $(CC) -o afsrepair $(LDFLAGS) afsrepair.o afsysc.o afsymtab.o\
  266. X        afenviron.o afhash.o aflib.o af_version.o
  267. X
  268. X#
  269. X# Test-environment for libafs.a (only on coma)
  270. X#
  271. X
  272. Xinstalltest: $(TESTOBJS) afsdb
  273. X    install -c -m 755 -o $(INSTALOWNER) -g $(INSTALGROUP) afsdb $(INSTALDIR)/bin
  274. X
  275. Xafsdb: $(TESTOBJS) $(AFSOBJS) $(DELTALIB)
  276. X    $(CC) -o afsdb $(LDFLAGS) $(TESTOBJS) $(AFSOBJS) $(DELTALIB) $(CLIBS)
  277. X
  278. X$(TESTOBJS): test.h
  279. X
  280. X#
  281. X# Miscellaneous stuff
  282. X#
  283. X
  284. Xobjects : $(AFSOBJS) afsrepair.o
  285. X
  286. Xlint:
  287. X    lint -DLINT -D$(SYSTEM) -I$(INCLUDEDIR) $(SOURCE)  
  288. X
  289. Xtags: $(SOURCE)
  290. X    /usr/local/etags $(SOURCE)
  291. X
  292. Xxref: $(SOURCE)
  293. X    /usr/ucb/ctags -w -x $(SOURCE) > xref
  294. X
  295. Xclean :
  296. X    rm $(AFSOBJS)
  297. X
  298. Xtar:
  299. X    retrv -fq $(VERSION).c; \
  300. X    tar cvhf /tmp/afs.tar $(COMPONENTS) $(TESTSOURCE) Makefile\
  301. X             $(VERSION).c $(DELTASOURCE); \
  302. X    rm -f $(VERSION).c
  303. END_OF_FILE
  304. if test 4290 -ne `wc -c <'src/afs/Makefile.distribution'`; then
  305.     echo shar: \"'src/afs/Makefile.distribution'\" unpacked with wrong size!
  306. fi
  307. # end of 'src/afs/Makefile.distribution'
  308. fi
  309. if test -f 'src/afs/afkeys.c' -a "${1}" != "-c" ; then 
  310.   echo shar: Will not clobber existing file \"'src/afs/afkeys.c'\"
  311. else
  312. echo shar: Extracting \"'src/afs/afkeys.c'\" \(4153 characters\)
  313. sed "s/^X//" >'src/afs/afkeys.c' <<'END_OF_FILE'
  314. X/*
  315. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  316. X *  and U. Pralle
  317. X * 
  318. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  319. X * WARRANTY for any part of this software to work correctly or as described
  320. X * in the manuals. We do not accept any liability for any kind of damage
  321. X * caused by use of this software, such as loss of data, time, money, or 
  322. X * effort.
  323. X * 
  324. X * Permission is granted to use, copy, modify, or distribute any part of
  325. X * this software as long as this is done without asking for charge, and
  326. X * provided that this copyright notice is retained as part of the source
  327. X * files. You may charge a distribution fee for the physical act of
  328. X * transferring a copy, and you may at your option offer warranty
  329. X * protection in exchange for a fee.
  330. X * 
  331. X * Direct questions to: Tech. Univ. Berlin
  332. X *              Wilfried Koch
  333. X *              Sekr. FR 5-6 
  334. X *              Franklinstr. 28/29
  335. X *              D-1000 Berlin 10, West Germany
  336. X * 
  337. X *              Tel: +49-30-314-22972
  338. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  339. X */
  340. X/*
  341. X *    Shape/AFS
  342. X *
  343. X *    afkeys.c -- handle revision keys
  344. X *
  345. X *    Author: Andreas Lampen, TU-Berlin (andy@coma.UUCP)
  346. X *                      (andy@db0tui62.BITNET)
  347. X *
  348. X *    $Header: afkeys.c[1.3] Wed Feb 22 16:27:39 1989 andy@coma published $
  349. X *
  350. X *    EXPORT:
  351. X *    af_buildkey -- build key from generation and revision
  352. X *      af_gbuskey -- get key of busy version
  353. X *      af_glastkey -- get key of last saved version
  354. X *      af_gfreepos -- search free position in revlist
  355. X *    af_keytest -- check plausibility of key
  356. X */
  357. X
  358. X#include <stdio.h>
  359. X
  360. X#include "typeconv.h"
  361. X#include "afsys.h"
  362. X#include "afs.h"
  363. X
  364. X/*================================================================
  365. X *    af_buildkey
  366. X *
  367. X *================================================================*/
  368. X
  369. XEXPORT af_buildkey (list, gen, rev, key)
  370. X     Af_revlist *list;
  371. X     int     gen;
  372. X     int    rev;
  373. X     Af_key    *key; /* out */
  374. X{
  375. X  int i;
  376. X  
  377. X  key->af_ldes = list;
  378. X  if (list->af_list[0].af_class & AF_VALID)
  379. X    i = list->af_nrevs-1;
  380. X  else
  381. X    i = list->af_nrevs;
  382. X
  383. X  while (!((list->af_list[i].af_gen == gen) && (list->af_list[i].af_rev == rev)
  384. X     && (list->af_list[i].af_class & AF_VALID)))
  385. X    {
  386. X      if (i == 0)
  387. X    SFAIL ("buildkey", "", AF_ENOREV, ERROR);
  388. X      i--;
  389. X    }
  390. X  key->af_lpos = i;
  391. X  return (AF_OK);
  392. X}
  393. X
  394. X/*================================================================
  395. X *    af_gbuskey
  396. X *
  397. X *================================================================*/
  398. X
  399. XEXPORT Af_key *af_gbuskey (list)
  400. X     Af_revlist *list;
  401. X{
  402. X  static Af_key busykey;
  403. X
  404. X  busykey.af_ldes = list;
  405. X  busykey.af_lpos = 0;
  406. X  return (&busykey);
  407. X}
  408. X
  409. X
  410. X/*================================================================
  411. X *    af_glastkey
  412. X *
  413. X *================================================================*/
  414. X
  415. XEXPORT Af_key *af_glastkey (list)
  416. X     Af_revlist *list;
  417. X{
  418. X  int i;
  419. X  static Af_key lastkey;
  420. X
  421. X  lastkey.af_ldes = list;
  422. X  i = list->af_listlen-1;
  423. X  while (!(list->af_list[i].af_class & AF_VALID))
  424. X    {
  425. X      if (i-- == 1)
  426. X    return ((Af_key *)0);
  427. X    }
  428. X  lastkey.af_lpos = i;
  429. X  return (&lastkey);
  430. X}
  431. X
  432. X/*================================================================
  433. X * af_gfreepos -- search space for new list entry
  434. X *                preserve increasing order
  435. X *
  436. X *================================================================*/
  437. X
  438. XEXPORT af_gfreepos (list)
  439. X     Af_revlist *list;
  440. X{
  441. X  int i;
  442. X
  443. X  i = list->af_listlen-1;
  444. X  while (!(list->af_list[i].af_class & AF_VALID) && (i >= 0))
  445. X    i--;
  446. X
  447. X  if (i == list->af_listlen-1)
  448. X    return (ERROR);
  449. X
  450. X  if (!(list->af_list[i].af_class & AF_VALID) && (i == 0))
  451. X    return (0);
  452. X
  453. X  return (i+1);
  454. X}
  455. X
  456. X/*================================================================
  457. X *    af_keytest -- test plausibility of filekey
  458. X *                    returnes TRUE (ERROR) if key is invalid,
  459. X *                    otherwise FALSE (AF_OK).
  460. X *
  461. X *================================================================*/
  462. X
  463. XEXPORT af_keytest (key)
  464. X     Af_key *key;
  465. X{
  466. X  if (key == (Af_key *)0)
  467. X    return (ERROR);
  468. X  if ((key->af_lpos < 0) || (key->af_lpos >= key->af_ldes->af_listlen))
  469. X    return (ERROR);
  470. X  if (VATTR(key).af_nlinks < 1)
  471. X    return (ERROR);
  472. X
  473. X  return (AF_OK);
  474. X}
  475. X
  476. END_OF_FILE
  477. if test 4153 -ne `wc -c <'src/afs/afkeys.c'`; then
  478.     echo shar: \"'src/afs/afkeys.c'\" unpacked with wrong size!
  479. fi
  480. # end of 'src/afs/afkeys.c'
  481. fi
  482. if test -f 'src/afs/lcs.gedc.c' -a "${1}" != "-c" ; then 
  483.   echo shar: Will not clobber existing file \"'src/afs/lcs.gedc.c'\"
  484. else
  485. echo shar: Extracting \"'src/afs/lcs.gedc.c'\" \(4012 characters\)
  486. sed "s/^X//" >'src/afs/lcs.gedc.c' <<'END_OF_FILE'
  487. X/*
  488. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  489. X *  and U. Pralle
  490. X * 
  491. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  492. X * WARRANTY for any part of this software to work correctly or as described
  493. X * in the manuals. We do not accept any liability for any kind of damage
  494. X * caused by use of this software, such as loss of data, time, money, or 
  495. X * effort.
  496. X * 
  497. X * Permission is granted to use, copy, modify, or distribute any part of
  498. X * this software as long as this is done without asking for charge, and
  499. X * provided that this copyright notice is retained as part of the source
  500. X * files. You may charge a distribution fee for the physical act of
  501. X * transferring a copy, and you may at your option offer warranty
  502. X * protection in exchange for a fee.
  503. X * 
  504. X * Direct questions to: Tech. Univ. Berlin
  505. X *              Wilfried Koch
  506. X *              Sekr. FR 5-6 
  507. X *              Franklinstr. 28/29
  508. X *              D-1000 Berlin 10, West Germany
  509. X * 
  510. X *              Tel: +49-30-314-22972
  511. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  512. X */
  513. X
  514. X/* ================================================== */
  515. X/* ================================================== */
  516. X/*                                                    */
  517. X/* MODULE-NAME: gedc        KEY : ge                  */
  518. X/*              = generate editor commands            */
  519. X/* ORIGINAL                                           */
  520. X/* AUTHOR : sibylle         DATE: 28/07/87            */
  521. X/*                                                    */
  522. X/* LAST UPDATE                                        */
  523. X/* AUTHOR :                 DATE:                     */
  524. X/*                                                    */
  525. X/* VERSION: 1.6.2                                     */
  526. X/*                                                    */
  527. X/* ================================================== */
  528. X/*                                                    */
  529. X/* PURPOSE:                                           */
  530. X/*                generation of editor commands;      */
  531. X/*                writing them into the delta file    */
  532. X/*                                                    */
  533. X/* SPECIALITIES:                                      */
  534. X/*                targetsize gets written into        */
  535. X/*                deltafile                           */                       
  536. X/*                                                    */
  537. X/* EXCEPTIONS, ERRORS:                                */
  538. X/*                none                                */
  539. X/*                                                    */
  540. X/* ================================================== */
  541. X/*                                                    */
  542. X/*
  543. X * $Header: lcs.gedc.c[1.0] Wed Feb 22 16:14:22 1989 shape@coma save $
  544. X */
  545. X
  546. X# include "predef.h"
  547. X# include "typeconv.h"
  548. X# include <stdio.h>
  549. X# include "edcmd.h"
  550. X
  551. X
  552. Xextern int fwrite();
  553. Xextern int fclose();
  554. Xextern FILE *fopen();
  555. X
  556. X
  557. XLOCAL char *trg_str = NIL;
  558. XLOCAL FILE *fdelta = (FILE *) NIL;
  559. X
  560. X
  561. XLOCAL void write_cmd (ecmd, indx)
  562. X     struct ed_cmd *ecmd;
  563. X     long indx;
  564. X{
  565. X  long cmd_ind;
  566. X  char *t_str = trg_str;
  567. X  
  568. X  cmd_ind = indx;
  569. X  if (ecmd->cmd == MV)
  570. X    {
  571. X      (void) fwrite ((char *)ecmd, sizeof (*ecmd), 1, fdelta);
  572. X      (void) fwrite ((char *)&cmd_ind, sizeof(cmd_ind), 1, fdelta);
  573. X    }
  574. X  else
  575. X    {
  576. X      (void) fwrite ((char *)ecmd, sizeof (*ecmd), 1, fdelta);
  577. X      (void) fwrite ((t_str = (t_str + cmd_ind)), sizeof(char), (Size_t)ecmd->length, fdelta);
  578. X    }
  579. X
  580. X  return;
  581. X}
  582. X
  583. X
  584. X
  585. XEXPORT void ge_init (deltafile, targetstr)
  586. X     char *deltafile, *targetstr;
  587. X{
  588. X  trg_str = targetstr;
  589. X  fdelta  = fopen (deltafile, "w");
  590. X  return;
  591. X}
  592. X
  593. X
  594. XEXPORT void ge_finit()
  595. X{
  596. X  (void) fclose (fdelta);
  597. X  return;
  598. X}
  599. X
  600. X
  601. XEXPORT void ge_move (indx, length)
  602. X     long indx, length;
  603. X{
  604. X  struct ed_cmd cmd;
  605. X
  606. X  cmd.cmd = MV;
  607. X  cmd.length = length;
  608. X  write_cmd (&cmd, indx);
  609. X
  610. X  return;
  611. X}
  612. X
  613. X
  614. XEXPORT void ge_add (indx, length)
  615. X     long indx, length;
  616. X{
  617. X  struct ed_cmd cmd;
  618. X
  619. X  cmd.cmd = AD;
  620. X  cmd.length = length;
  621. X  write_cmd (&cmd, indx);
  622. X  return;
  623. X}
  624. X
  625. X
  626. X
  627. END_OF_FILE
  628. if test 4012 -ne `wc -c <'src/afs/lcs.gedc.c'`; then
  629.     echo shar: \"'src/afs/lcs.gedc.c'\" unpacked with wrong size!
  630. fi
  631. # end of 'src/afs/lcs.gedc.c'
  632. fi
  633. if test -f 'src/shape/Shapefile' -a "${1}" != "-c" ; then 
  634.   echo shar: Will not clobber existing file \"'src/shape/Shapefile'\"
  635. else
  636. echo shar: Extracting \"'src/shape/Shapefile'\" \(3789 characters\)
  637. sed "s/^X//" >'src/shape/Shapefile' <<'END_OF_FILE'
  638. X#
  639. X# Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  640. X#  and U. Pralle
  641. X# 
  642. X# This software is published on an as-is basis. There is ABSOLUTELY NO
  643. X# WARRANTY for any part of this software to work correctly or as described
  644. X# in the manuals. We do not accept any liability for any kind of damage
  645. X# caused by use of this software, such as loss of data, time, money, or effort.
  646. X# 
  647. X# Permission is granted to use, copy, modify, or distribute any part of
  648. X# this software as long as this is done without asking for charge, and
  649. X# provided that this copyright notice is retained as part of the source
  650. X# files. You may charge a distribution fee for the physical act of
  651. X# transferring a copy, and you may at your option offer warranty
  652. X# protection in exchange for a fee.
  653. X# 
  654. X# Direct questions to: Tech. Univ. Berlin
  655. X#              Wilfried Koch
  656. X#              Sekr. FR 5-6 
  657. X#              Franklinstr. 28/29
  658. X#              D-1000 Berlin 10, West Germany
  659. X# 
  660. X#              Tel: +49-30-314-22972
  661. X#              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  662. X# 
  663. X#
  664. X#    $__Log$
  665. X#
  666. X###############################################################################
  667. X#                                          #
  668. X#                  Shapefile for SHAPE                        #
  669. X#                                          #
  670. X###############################################################################
  671. X
  672. X
  673. XCOMPONENTS =     README Shapefile attr.c attr.h error.c files.c files.h \
  674. X        hash.c     hash.h inherit.c shape.l macro.c macro.h main.c \
  675. X        shape.h misc.c     produce.c rule.c rule.h select.c selrule.c \
  676. X        selrule.h shape.1 shapeopt.c sighand.c std.c std.h string.c \
  677. X        varsec.c varsec.h vpath.c version.c
  678. X
  679. XSRCDIR =    /u/wolf/src/shape
  680. X
  681. XINSTALDIR =    /u/shape/bin
  682. X
  683. XPROGS =        shapex
  684. XINSTALLPROGS =    shape
  685. X
  686. XSHAPESRC =      main.c hash.c macro.c rule.c files.c error.c produce.c \
  687. X         std.c selrule.c attr.c varsec.c select.c vpath.c misc.c \
  688. X         sighand.c inherit.c string.c version.c
  689. X
  690. XSHAPOBJS =    main.o shape.o hash.o macro.o rule.o files.o error.o \
  691. Xproduce.o std.o selrule.o attr.o varsec.o select.o vpath.o \
  692. Xmisc.o sighand.o shapeopt.o inherit.o string.o version.o
  693. X
  694. XHFILES =    shape.h macro.h hash.h rule.h selrule.h std.h varsec.h \
  695. Xattr.h file.h
  696. X
  697. XAFSLIB =    /u/shape/lib/libafs.a
  698. X
  699. XCLIBS =
  700. X
  701. XUTILLIB =    /u/shape/lib/libutil.a
  702. X
  703. XAFSINC =    /u/shape/src/inc
  704. X
  705. XHEADER =    shape.h $(AFSINC)/afs.h 
  706. X
  707. XSYSTEM =     bsd_4_3
  708. X
  709. XQUALITY =     test
  710. X
  711. XCC = cc -DCFFLGS='"$$Flags: $(CFLAGS) $$"'
  712. X
  713. XRULE = test
  714. XSYSTEM = bsd_4_3
  715. XQUALITY = test 
  716. X
  717. Xall: $(PROGS)
  718. X
  719. Xshapex: $(RULE) +$(SYSTEM) +$(QUALITY) $(SHAPOBJS) $(AFSLIB) $(UTILLIB)
  720. X    cc -g -pg -o $@ $(SHAPOBJS) $(UTILLIB) $(AFSLIB) $(CLIBS) -ll
  721. X
  722. X$(SHAPOBJS):    $(HEADER)
  723. Xmacro.o:    $(HEADER) macro.h
  724. Xhash.o:        $(HEADER) hash.h
  725. Xrule.o:     $(HEADER) rule.h
  726. Xselrule.o:    $(HEADER) selrule.h
  727. Xstd.o:        $(HEADER) std.h
  728. Xvarsec.o:    $(HEADER) varsec.h
  729. Xattr.o:        $(HEADER) attr.h
  730. Xfiles.o:    $(HEADER) files.h
  731. Xversion.o:    version.c
  732. X
  733. XClean:
  734. X    rm shape *.o core
  735. X
  736. Xsave:
  737. X    save $(COMPONENTS)
  738. X
  739. Xlint:
  740. X    lint  -I/u/shape/src/inc $(SHAPESRC) shape.c
  741. X
  742. Xshar:
  743. X    shar Shapefile Makefile $(COMPONENTS) version.c /u/shape/src/inc/ParseArgs.h > shape.sh 
  744. X
  745. Xinstall: all
  746. X    @-for i in $(INSTALLPROGS); \
  747. X    do \
  748. X    echo installing $$i in $(INSTALDIR); \
  749. X    install -c -g unib shapex $(INSTALDIR)/$$i;\
  750. X    done;
  751. X
  752. X
  753. X#% RULE-SECTION
  754. X
  755. Xrelease:
  756. X    *, attr (state, published), attrmax (version);
  757. X    *, attr (state, busy).
  758. X
  759. Xtest:    *, attr(state, busy);
  760. X    *, attrmax(version).
  761. X
  762. X#% END-RULE-SECTION
  763. X
  764. X#% VARIANT-SECTION
  765. X
  766. Xvclass system ::= (bsd_4_3, ultrix_2_0)
  767. Xvclass quality ::= (test, release)
  768. X
  769. Xbsd_4_3:
  770. X
  771. Xultrix_2_0:
  772. X    vflags = -DULTRIX_2_0 -DOLDDBM
  773. X    CFLAGS = -g -I$(AFSINC)
  774. X    CLIBS = -ldbm
  775. X
  776. Xtest:
  777. X    CFLAGS = -pg -g -I$(AFSINC)
  778. X    LDFLAGS = -pg -g
  779. X
  780. Xrelease:
  781. X    CFLAGS = -O -I$(AFSINC)
  782. X    LDFLAGS = -s
  783. X
  784. Xgnu:
  785. X    CC = gcc -I/u/shape/src/inc
  786. X    CFLAGS = -O -g -finline-functions -fkeep-inline-functions \
  787. X        -fcombine-regs -DCFFLGS=\"HALLO\"
  788. X# '"$$Flags: $(CFLAGS) $$"'
  789. X
  790. X#% END-VARIANT-SECTION
  791. END_OF_FILE
  792. if test 3789 -ne `wc -c <'src/shape/Shapefile'`; then
  793.     echo shar: \"'src/shape/Shapefile'\" unpacked with wrong size!
  794. fi
  795. # end of 'src/shape/Shapefile'
  796. fi
  797. if test -f 'src/shape/select.c' -a "${1}" != "-c" ; then 
  798.   echo shar: Will not clobber existing file \"'src/shape/select.c'\"
  799. else
  800. echo shar: Extracting \"'src/shape/select.c'\" \(4466 characters\)
  801. sed "s/^X//" >'src/shape/select.c' <<'END_OF_FILE'
  802. X/*
  803. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  804. X *  and U. Pralle
  805. X * 
  806. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  807. X * WARRANTY for any part of this software to work correctly or as described
  808. X * in the manuals. We do not accept any liability for any kind of damage
  809. X * caused by use of this software, such as loss of data, time, money, or 
  810. X * effort.
  811. X * 
  812. X * Permission is granted to use, copy, modify, or distribute any part of
  813. X * this software as long as this is done without asking for charge, and
  814. X * provided that this copyright notice is retained as part of the source
  815. X * files. You may charge a distribution fee for the physical act of
  816. X * transferring a copy, and you may at your option offer warranty
  817. X * protection in exchange for a fee.
  818. X * 
  819. X * Direct questions to: Tech. Univ. Berlin
  820. X *              Wilfried Koch
  821. X *              Sekr. FR 5-6 
  822. X *              Franklinstr. 28/29
  823. X *              D-1000 Berlin 10, West Germany
  824. X * 
  825. X *              Tel: +49-30-314-22972
  826. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  827. X */
  828. X#ifndef lint
  829. Xstatic char *RCSid = "$Header: select.c,v 3.1 89/02/20 16:26:38 wolfgang Exp $";
  830. X#endif
  831. X#ifndef lint
  832. Xstatic char *ConfFlg = CFFLGS;    /* should be defined from within Makefile */
  833. X#endif
  834. X/*
  835. X * $Log:    select.c,v $
  836. X * Revision 3.1  89/02/20  16:26:38  wolfgang
  837. X * NET-RELEASE
  838. X * 
  839. X * Revision 3.0  89/01/24  11:36:45  wolfgang
  840. X * New System Generation
  841. X * 
  842. X * Revision 2.5  89/01/03  13:13:21  wolfgang
  843. X * changes done for lint
  844. X * 
  845. X * Revision 2.4  88/12/21  15:12:33  wolfgang
  846. X * changes done for lint
  847. X * 
  848. X * Revision 2.3  88/11/22  17:37:42  wolfgang
  849. X * This version is part of a release
  850. X * 
  851. X * Revision 2.2  88/08/31  12:12:53  wolfgang
  852. X * Bugs fixed.
  853. X * 
  854. X * Revision 2.1  88/08/19  10:17:57  wolfgang
  855. X * This version is part of a release
  856. X * 
  857. X */
  858. X
  859. X#include <pwd.h>
  860. X
  861. X#include "shape.h"
  862. X
  863. Xextern struct passwd *getpwnam();
  864. Xextern char *mktemp();
  865. X
  866. Xextern int get_set();
  867. Xextern int af_setgkey();
  868. Xextern int af_gattrs();
  869. X
  870. Xextern char current_dep[];
  871. Xextern Af_attrs buft;
  872. Xextern int depth;
  873. Xextern char actpath[];
  874. X
  875. Xchar cursr[64]; /* name of active selection rule */
  876. Xstruct selection_rules *currule; /* active selection rule */
  877. X
  878. XBool Sselect(targ, path, ttt, fdep, dep)
  879. X     char *targ;
  880. X     char *path;
  881. X     Bool ttt;
  882. X     /*ARGSUSED*/
  883. X     char *fdep;
  884. X     char *dep;
  885. X{
  886. X
  887. XAf_attrs buf1;
  888. X/* Af_attrs buft; */
  889. X
  890. XAf_key key1;
  891. XAf_key key2;
  892. X
  893. XAf_set set1;
  894. XAf_set set2;
  895. XBool t1;
  896. XBool t2;
  897. Xchar path1[MAXNAMLEN];
  898. Xchar path2[MAXNAMLEN];
  899. XBool appflg = TRUE;
  900. Xchar apptest[MAXNAMLEN];
  901. X
  902. X/* if (strcmp(cursr,"-STD-"))
  903. X return(TRUE); */
  904. X
  905. Xif (buft.af_name[0] == targ[0])
  906. X  {
  907. X    (void) strcpy(apptest,buft.af_name);
  908. X    (void) strcat(apptest,".");
  909. X    (void) strcat(apptest,buft.af_type);
  910. X    if (!strcmp(apptest,targ))
  911. X      appflg = FALSE;
  912. X  }
  913. X
  914. Xpath1[0] = '\0';
  915. Xpath2[0] = '\0';
  916. X
  917. Xaf_initattrs(&buf1);
  918. Xaf_initattrs(&buft);
  919. X
  920. X/* no selection rule is active or dep didn't match */
  921. Xt1 = ttt; /* exists_file(targ,0);  */
  922. X(void) strcpy(path1,path); /* actpath); */
  923. Xt2 = exists_file(dep,0);
  924. X(void) strcpy(path2,actpath);
  925. X(void) strcpy(actpath,"");
  926. Xif ((t1) && (t2))
  927. X  {
  928. X
  929. X    get_date_of(targ,&set1,path1);
  930. X    if (set1.af_setlen == 0)
  931. X      return(TRUE);   /* targ only in bpool */
  932. X
  933. X    get_date_of(dep,&set2,path2);
  934. X    
  935. X    if (af_setgkey(&set1,0,&key1) == -1)
  936. X      errexit(10,"af_setgkey");
  937. X    if (af_setgkey(&set2,0,&key2) == -1)
  938. X      errexit(10,"af_setgkey");
  939. X    
  940. X    if (af_gattrs(&key1,&buf1) == -1)
  941. X      errexit(10,"af_gattrs");
  942. X    if (af_gattrs(&key2,&buft) == -1)
  943. X      errexit(10,"af_gattrs");
  944. X    
  945. X    if (af_dropset(&set1) == -1)
  946. X      errexit(10, "af_dropset");
  947. X
  948. X    if (af_dropset(&set2) == -1)
  949. X      errexit(10, "af_dropset");
  950. X    
  951. X
  952. X    if ((buf1.af_mtime < buft.af_mtime) || ((buf1.af_mtime == -1) && (buft.af_mtime == -1)))
  953. X      {
  954. X    if(appflg)
  955. X      append_attrs(&buft,depth);
  956. X    (void) strcpy(current_dep,dep);
  957. X    return(TRUE);
  958. X      }
  959. X    else
  960. X      return(FALSE);
  961. X  }
  962. Xelse
  963. X  {
  964. X    (void) strcpy(current_dep,dep);
  965. X    if ((!t1) && (t2))
  966. X      {
  967. X    if (appflg)
  968. X      {
  969. X        /* get attrs for inheritage */
  970. X        get_date_of(dep,&set2,path2);
  971. X        if (af_setgkey(&set2,0,&key2) == -1)
  972. X          errexit(10,"af_setgkey");
  973. X        if (af_gattrs(&key2,&buft) == -1)
  974. X          errexit(10,"af_gattrs");
  975. X        if (af_dropset(&set2) == -1)
  976. X          errexit(10, "af_dropset");
  977. X        append_attrs(&buft,depth);
  978. X      }
  979. X    return(TRUE);
  980. X      }
  981. X    if ((!t1) && (!t2))
  982. X      return(TRUE);
  983. X    if ((t1) && (!t2))
  984. X      return(TRUE);
  985. X  }
  986. X/*NOTREACHED*/
  987. X}
  988. X
  989. END_OF_FILE
  990. if test 4466 -ne `wc -c <'src/shape/select.c'`; then
  991.     echo shar: \"'src/shape/select.c'\" unpacked with wrong size!
  992. fi
  993. # end of 'src/shape/select.c'
  994. fi
  995. if test -f 'src/shape/vpath.c' -a "${1}" != "-c" ; then 
  996.   echo shar: Will not clobber existing file \"'src/shape/vpath.c'\"
  997. else
  998. echo shar: Extracting \"'src/shape/vpath.c'\" \(3595 characters\)
  999. sed "s/^X//" >'src/shape/vpath.c' <<'END_OF_FILE'
  1000. X/*
  1001. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1002. X *  and U. Pralle
  1003. X * 
  1004. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  1005. X * WARRANTY for any part of this software to work correctly or as described
  1006. X * in the manuals. We do not accept any liability for any kind of damage
  1007. X * caused by use of this software, such as loss of data, time, money, or 
  1008. X * effort.
  1009. X * 
  1010. X * Permission is granted to use, copy, modify, or distribute any part of
  1011. X * this software as long as this is done without asking for charge, and
  1012. X * provided that this copyright notice is retained as part of the source
  1013. X * files. You may charge a distribution fee for the physical act of
  1014. X * transferring a copy, and you may at your option offer warranty
  1015. X * protection in exchange for a fee.
  1016. X * 
  1017. X * Direct questions to: Tech. Univ. Berlin
  1018. X *              Wilfried Koch
  1019. X *              Sekr. FR 5-6 
  1020. X *              Franklinstr. 28/29
  1021. X *              D-1000 Berlin 10, West Germany
  1022. X * 
  1023. X *              Tel: +49-30-314-22972
  1024. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1025. X */
  1026. X#ifndef lint
  1027. Xstatic char *RCSid = "$Header: vpath.c,v 3.2 89/02/20 16:26:55 wolfgang Exp $";
  1028. X#endif
  1029. X#ifndef lint
  1030. Xstatic char *ConfFlg = CFFLGS;    /* should be defined from within Makefile */
  1031. X#endif
  1032. X/*
  1033. X * $Log:    vpath.c,v $
  1034. X * Revision 3.2  89/02/20  16:26:55  wolfgang
  1035. X * NET-RELEASE
  1036. X * 
  1037. X * Revision 3.1  89/02/08  12:44:58  wolfgang
  1038. X * performance improved.
  1039. X * 
  1040. X * Revision 3.0  89/01/24  11:37:26  wolfgang
  1041. X * New System Generation
  1042. X * 
  1043. X * Revision 2.6  89/01/03  13:14:30  wolfgang
  1044. X * changes done for lint
  1045. X * 
  1046. X * Revision 2.5  88/12/21  15:13:37  wolfgang
  1047. X * changes done for lint
  1048. X * 
  1049. X * Revision 2.4  88/11/21  20:54:15  wolfgang
  1050. X * changes done for sun
  1051. X * 
  1052. X * Revision 2.3  88/11/21  15:49:32  wolfgang
  1053. X * return code of all malloc's checked
  1054. X * 
  1055. X * Revision 2.2  88/11/18  15:03:21  wolfgang
  1056. X * is_vpath_dir added.
  1057. X * 
  1058. X * Revision 2.1  88/08/19  10:18:19  wolfgang
  1059. X * This version is part of a release
  1060. X * 
  1061. X */
  1062. X
  1063. X#include "shape.h"
  1064. X
  1065. Xinsertvpath(string)
  1066. X     char *string;
  1067. X{
  1068. X  char *p;
  1069. X  int i;
  1070. X  for(i = 1; (p = index(string,':')) != NIL; i++)
  1071. X    {
  1072. X      *p = '\0';
  1073. X      if(*string != '/')
  1074. X    {
  1075. X      if ((curvpath[i] = malloc((unsigned) (strlen(string) + strlen(curvpath[0])
  1076. X                 + 3 * sizeof(char)))) == NIL)
  1077. X        errexit(10,"malloc");
  1078. X      (void) strcpy(curvpath[i],curvpath[0]);
  1079. X      (void) strcat(curvpath[i],"/");
  1080. X      if ((*string == '.') && (*string+1 == '/'))
  1081. X        {
  1082. X          string++;
  1083. X          string++;
  1084. X        }
  1085. X      else
  1086. X        {
  1087. X          if ((*string == '.') && (*string+1 == '.') && (*string+2 == '/'))
  1088. X        {
  1089. X          *string++;
  1090. X          *string++;
  1091. X          *string++;
  1092. X        }
  1093. X        }
  1094. X      (void) strcat(curvpath[i],string);
  1095. X    }
  1096. X      else
  1097. X    {
  1098. X      if ((curvpath[i] = malloc((unsigned) (strlen(string) + sizeof(char)))) == NIL)
  1099. X        errexit(10,"malloc");
  1100. X      (void) strcpy(curvpath[i],string);
  1101. X      p++;
  1102. X      string = p;
  1103. X    }
  1104. X    }
  1105. X  if((p == NIL) && (string != NIL))
  1106. X    {
  1107. X      if(*string != '/')
  1108. X    {
  1109. X      if((curvpath[i] = malloc((unsigned) (strlen(string) + strlen(curvpath[0])
  1110. X                 + 2 * sizeof(char)))) == NIL)
  1111. X        errexit(10,"malloc");
  1112. X      (void) strcpy(curvpath[i],curvpath[0]);
  1113. X      (void) strcat(curvpath[i],"/");
  1114. X      if ((*string == '.') && (*string+1 == '/'))
  1115. X        {
  1116. X          string++;
  1117. X          string++;
  1118. X        }
  1119. X      else
  1120. X        {
  1121. X          if ((*string == '.') && (*string+1 == '.') && (*string+2 == '/'))
  1122. X        {
  1123. X          *string++;
  1124. X          *string++;
  1125. X          *string++;
  1126. X        }
  1127. X        }
  1128. X      (void) strcat(curvpath[i],string);
  1129. X    }
  1130. X      else
  1131. X    {
  1132. X      if((curvpath[i] = malloc((unsigned) (strlen(string) + sizeof(char)))) == NIL)
  1133. X        errexit(10,"malloc");
  1134. X      (void) strcpy(curvpath[i],string);
  1135. X    }
  1136. X    }
  1137. X}
  1138. X
  1139. END_OF_FILE
  1140. if test 3595 -ne `wc -c <'src/shape/vpath.c'`; then
  1141.     echo shar: \"'src/shape/vpath.c'\" unpacked with wrong size!
  1142. fi
  1143. # end of 'src/shape/vpath.c'
  1144. fi
  1145. if test -f 'src/vc/deps' -a "${1}" != "-c" ; then 
  1146.   echo shar: Will not clobber existing file \"'src/vc/deps'\"
  1147. else
  1148. echo shar: Extracting \"'src/vc/deps'\" \(3686 characters\)
  1149. sed "s/^X//" >'src/vc/deps' <<'END_OF_FILE'
  1150. Xdoretrv.o: afsapp.h
  1151. Xdoretrv.o: locks.h
  1152. Xdoretrv.o: project.h
  1153. Xdoretrv.o: retrv.h
  1154. Xdoretrv.o: typeconv.h
  1155. Xdoretrv.o: /u/shape/src/inc/afs.h
  1156. Xdoretrv.o: /u/shape/src/inc/afsys.h
  1157. Xdoretrv.o: doretrv.c
  1158. Xdosave.o: afsapp.h
  1159. Xdosave.o: locks.h
  1160. Xdosave.o: project.h
  1161. Xdosave.o: save.h
  1162. Xdosave.o: typeconv.h
  1163. Xdosave.o: /u/shape/src/inc/afs.h
  1164. Xdosave.o: /u/shape/src/inc/afsys.h
  1165. Xdosave.o: dosave.c
  1166. Xmkattr.o: afsapp.h
  1167. Xmkattr.o: retrv.h
  1168. Xmkattr.o: typeconv.h
  1169. Xmkattr.o: /u/shape/src/inc/afs.h
  1170. Xmkattr.o: /u/shape/src/inc/afsys.h
  1171. Xmkattr.o: mkattr.c
  1172. Xproject.o: project.h
  1173. Xproject.o: project.c
  1174. Xretrv.o: afsapp.h
  1175. Xretrv.o: project.h
  1176. Xretrv.o: retrv.h
  1177. Xretrv.o: typeconv.h
  1178. Xretrv.o: /u/shape/src/inc/ParseArgs.h
  1179. Xretrv.o: /u/shape/src/inc/afs.h
  1180. Xretrv.o: /u/shape/src/inc/afsys.h
  1181. Xretrv.o: retrv.c
  1182. Xsave.o: afsapp.h
  1183. Xsave.o: project.h
  1184. Xsave.o: save.h
  1185. Xsave.o: typeconv.h
  1186. Xsave.o: /u/shape/src/inc/ParseArgs.h
  1187. Xsave.o: save.c
  1188. Xsighand.o: afsapp.h
  1189. Xsighand.o: typeconv.h
  1190. Xsighand.o: /u/shape/src/inc/afs.h
  1191. Xsighand.o: /u/shape/src/inc/afsys.h
  1192. Xsighand.o: sighand.c
  1193. Xutil.o: afsapp.h
  1194. Xutil.o: locks.h
  1195. Xutil.o: project.h
  1196. Xutil.o: typeconv.h
  1197. Xutil.o: /u/shape/src/inc/afs.h
  1198. Xutil.o: /u/shape/src/inc/afsys.h
  1199. Xutil.o: util.c
  1200. Xvadm.o: afsapp.h
  1201. Xvadm.o: typeconv.h
  1202. Xvadm.o: vadm.h
  1203. Xvadm.o: /u/shape/src/inc/ParseArgs.h
  1204. Xvadm.o: /u/shape/src/inc/afs.h
  1205. Xvadm.o: /u/shape/src/inc/afsys.h
  1206. Xvadm.o: vadm.c
  1207. Xvadm_delete.o: afsapp.h
  1208. Xvadm_delete.o: locks.h
  1209. Xvadm_delete.o: typeconv.h
  1210. Xvadm_delete.o: vadm.h
  1211. Xvadm_delete.o: /u/shape/src/inc/afs.h
  1212. Xvadm_delete.o: /u/shape/src/inc/afsys.h
  1213. Xvadm_delete.o: vadm_delete.c
  1214. Xvadm_gkeys.o: afsapp.h
  1215. Xvadm_gkeys.o: typeconv.h
  1216. Xvadm_gkeys.o: vadm.h
  1217. Xvadm_gkeys.o: /u/shape/src/inc/afs.h
  1218. Xvadm_gkeys.o: /u/shape/src/inc/afsys.h
  1219. Xvadm_gkeys.o: vadm_gkeys.c
  1220. Xvadm_note.o: afsapp.h
  1221. Xvadm_note.o: locks.h
  1222. Xvadm_note.o: typeconv.h
  1223. Xvadm_note.o: vadm.h
  1224. Xvadm_note.o: vc_sysdep.h
  1225. Xvadm_note.o: /u/shape/src/inc/afs.h
  1226. Xvadm_note.o: /u/shape/src/inc/afsys.h
  1227. Xvadm_note.o: vadm_note.c
  1228. Xvadm_promote.o: afsapp.h
  1229. Xvadm_promote.o: locks.h
  1230. Xvadm_promote.o: typeconv.h
  1231. Xvadm_promote.o: vadm.h
  1232. Xvadm_promote.o: /u/shape/src/inc/afs.h
  1233. Xvadm_promote.o: /u/shape/src/inc/afsys.h
  1234. Xvadm_promote.o: vadm_promote.c
  1235. Xvadm_reserve.o: afsapp.h
  1236. Xvadm_reserve.o: locks.h
  1237. Xvadm_reserve.o: typeconv.h
  1238. Xvadm_reserve.o: vadm.h
  1239. Xvadm_reserve.o: /u/shape/src/inc/afs.h
  1240. Xvadm_reserve.o: /u/shape/src/inc/afsys.h
  1241. Xvadm_reserve.o: vadm_reserve.c
  1242. Xvadm_symname.o: afsapp.h
  1243. Xvadm_symname.o: project.h
  1244. Xvadm_symname.o: typeconv.h
  1245. Xvadm_symname.o: vadm.h
  1246. Xvadm_symname.o: /u/shape/src/inc/afs.h
  1247. Xvadm_symname.o: /u/shape/src/inc/afsys.h
  1248. Xvadm_symname.o: vadm_symname.c
  1249. Xvadm_utils.o: afsapp.h
  1250. Xvadm_utils.o: typeconv.h
  1251. Xvadm_utils.o: vadm.h
  1252. Xvadm_utils.o: vadmdefs.h
  1253. Xvadm_utils.o: /u/shape/src/inc/afs.h
  1254. Xvadm_utils.o: /u/shape/src/inc/afsys.h
  1255. Xvadm_utils.o: vadm_utils.c
  1256. Xvc_call.o: afsapp.h
  1257. Xvc_call.o: typeconv.h
  1258. Xvc_call.o: vc_call.c
  1259. Xvc_files.o: afsapp.h
  1260. Xvc_files.o: locks.h
  1261. Xvc_files.o: typeconv.h
  1262. Xvc_files.o: vc_sysdep.h
  1263. Xvc_files.o: /u/shape/src/inc/afs.h
  1264. Xvc_files.o: /u/shape/src/inc/afsys.h
  1265. Xvc_files.o: vc_files.c
  1266. Xvc_keyboardIo.o: afsapp.h
  1267. Xvc_keyboardIo.o: typeconv.h
  1268. Xvc_keyboardIo.o: vc_keyboardIo.c
  1269. Xvc_lock.o: afsapp.h
  1270. Xvc_lock.o: typeconv.h
  1271. Xvc_lock.o: /u/shape/src/inc/afs.h
  1272. Xvc_lock.o: /u/shape/src/inc/afsys.h
  1273. Xvc_lock.o: vc_lock.c
  1274. Xvl.o: afsapp.h
  1275. Xvl.o: typeconv.h
  1276. Xvl.o: vl.h
  1277. Xvl.o: /u/shape/src/inc/ParseArgs.h
  1278. Xvl.o: vl.c
  1279. Xvldovl.o: afsapp.h
  1280. Xvldovl.o: typeconv.h
  1281. Xvldovl.o: vl.h
  1282. Xvldovl.o: /u/shape/src/inc/afs.h
  1283. Xvldovl.o: /u/shape/src/inc/afsys.h
  1284. Xvldovl.o: vldovl.c
  1285. Xvlmisc.o: afsapp.h
  1286. Xvlmisc.o: typeconv.h
  1287. Xvlmisc.o: vl.h
  1288. Xvlmisc.o: /u/shape/src/inc/afs.h
  1289. Xvlmisc.o: /u/shape/src/inc/afsys.h
  1290. Xvlmisc.o: vlmisc.c
  1291. Xvlopt.o: afsapp.h
  1292. Xvlopt.o: typeconv.h
  1293. Xvlopt.o: vl.h
  1294. Xvlopt.o: /u/shape/src/inc/ParseArgs.h
  1295. Xvlopt.o: vlopt.c
  1296. END_OF_FILE
  1297. if test 3686 -ne `wc -c <'src/vc/deps'`; then
  1298.     echo shar: \"'src/vc/deps'\" unpacked with wrong size!
  1299. fi
  1300. # end of 'src/vc/deps'
  1301. fi
  1302. if test -f 'src/vc/vadm_delete.c' -a "${1}" != "-c" ; then 
  1303.   echo shar: Will not clobber existing file \"'src/vc/vadm_delete.c'\"
  1304. else
  1305. echo shar: Extracting \"'src/vc/vadm_delete.c'\" \(4539 characters\)
  1306. sed "s/^X//" >'src/vc/vadm_delete.c' <<'END_OF_FILE'
  1307. X/*
  1308. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1309. X *  and U. Pralle
  1310. X * 
  1311. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  1312. X * WARRANTY for any part of this software to work correctly or as described
  1313. X * in the manuals. We do not accept any liability for any kind of damage
  1314. X * caused by use of this software, such as loss of data, time, money, or 
  1315. X * effort.
  1316. X * 
  1317. X * Permission is granted to use, copy, modify, or distribute any part of
  1318. X * this software as long as this is done without asking for charge, and
  1319. X * provided that this copyright notice is retained as part of the source
  1320. X * files. You may charge a distribution fee for the physical act of
  1321. X * transferring a copy, and you may at your option offer warranty
  1322. X * protection in exchange for a fee.
  1323. X * 
  1324. X * Direct questions to: Tech. Univ. Berlin
  1325. X *              Wilfried Koch
  1326. X *              Sekr. FR 5-6 
  1327. X *              Franklinstr. 28/29
  1328. X *              D-1000 Berlin 10, West Germany
  1329. X * 
  1330. X *              Tel: +49-30-314-22972
  1331. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1332. X */
  1333. X#ifndef lint
  1334. Xstatic char *AFSid = "$Header: vadm_delete.c[3.7] Thu Feb 23 18:14:09 1989 axel@coma published $";
  1335. X#ifdef CFFLGS
  1336. Xstatic char *ConfFlg = CFFLGS;
  1337. X    /* should be defined from within Makefile */
  1338. X#endif
  1339. X#endif
  1340. X/*
  1341. X * Log for /u/shape/dist-tape/src/vc/vadm_delete.c[3.4]
  1342. X *     Thu Feb 23 18:14:09 1989 axel@coma published $
  1343. X *  --- empty log message ---
  1344. X *  vadm_delete.c[3.5] Thu Feb 23 18:14:09 1989 axel@coma published $
  1345. X *  --- empty log message ---
  1346. X *  vadm_delete.c[3.6] Thu Feb 23 18:14:09 1989 axel@coma save $
  1347. X *  --- empty log message ---
  1348. X *  vadm_delete.c[3.7] Thu Feb 23 18:14:09 1989 axel@coma published $
  1349. X *  --- empty log message ---
  1350. X */
  1351. X
  1352. X#include <stdio.h>
  1353. X#include <strings.h>
  1354. X
  1355. X#include "afs.h"
  1356. X#include "afsapp.h"
  1357. X#include "vadm.h"
  1358. X#include "locks.h"
  1359. X
  1360. X/* external */
  1361. Xextern char *malloc();
  1362. Xextern unsigned int options;
  1363. Xextern struct Transaction ThisTransaction;
  1364. X
  1365. X/* locals */
  1366. Xstatic char buf[2048];
  1367. X
  1368. X/**/
  1369. Xint DoDelete (vlist, ac, av)
  1370. X     struct vc_vlist *vlist;
  1371. X     int ac;
  1372. X     char **av;
  1373. X{
  1374. X  Af_set set;
  1375. X  Af_key *key;
  1376. X  Af_user *vc_testlock(), *vc_lock();
  1377. X  Uid_t lockeruid();
  1378. X  char **erroneous, *lockerid();
  1379. X  char version[1024];
  1380. X  int state;
  1381. X  int i;
  1382. X  int errs = 0;
  1383. X
  1384. X  errs = GetKeysByName (ac, av, vlist, &set, &erroneous);
  1385. X
  1386. X  if (errs)
  1387. X    print_erroneous (erroneous, errs);
  1388. X
  1389. X  if (!set.af_nkeys) {
  1390. X    logmsg ("Nothing appropriate found."); 
  1391. X    return 1;
  1392. X  }
  1393. X
  1394. X  if (errs)
  1395. X    if (IsOptionSet(Vopt_no_confirm) || IsOptionSet(Vopt_quiet) 
  1396. X    || !ask_confirm ("Continue", "yes"))
  1397. X      return 1;
  1398. X
  1399. X  ThisTransaction.tr_rc = 0;
  1400. X  for (i = 0 ; i < set.af_nkeys; i++) {
  1401. X    Af_user *thislock;
  1402. X    ThisTransaction.tr_seqno = i;
  1403. X    key = &set.af_klist[i];
  1404. X    mkvstring (version, key);
  1405. X    (void)strcpy (ThisTransaction.tr_fname, version);
  1406. X    if (setjmp (ThisTransaction.tr_env)) continue;
  1407. X    if ((state = af_rstate (key)) == -1) {
  1408. X      (void) sprintf (buf, "DoDelete (%s): af_rstate", 
  1409. X              ThisTransaction.tr_fname);
  1410. X      af_perror (buf);
  1411. X      ThisTransaction.tr_rc++;
  1412. X      continue;
  1413. X    }
  1414. X
  1415. X    if (state > AF_SAVED) {
  1416. X      (void)sprintf (buf, "%s cannot be deleted. Version state must be \"saved\".",
  1417. X           version);
  1418. X      logmsg (buf);
  1419. X      ThisTransaction.tr_rc++;
  1420. X      continue;
  1421. X    }
  1422. X
  1423. X    (void)sprintf (buf, "Delete %s ?", version);
  1424. X    thislock = vc_testlock_v(key);
  1425. X    if (locked(thislock)) {
  1426. X      if (lockeruid (thislock) != (Uid_t)getuid ()) {
  1427. X    /* locked ! ... but by somebody else */
  1428. X    (void)sprintf (buf, "No permission to delete %s (locked by %s).",
  1429. X         version, lockerid (thislock));
  1430. X    logmsg (buf); free ((char *)thislock);
  1431. X    continue;
  1432. X      }
  1433. X    }
  1434. X    else { /* the version is not locked. We must lock it to delete it. */
  1435. X      Af_user *mylock = vc_lock_v(key, (Uid_t)getuid ());
  1436. X      if (lockeruid (mylock) != (Uid_t)getuid ()) {
  1437. X    (void)sprintf (buf, "can't lock %s. Not deleted.", version);
  1438. X    logmsg (buf);
  1439. X    free ((char *)mylock); free ((char *)thislock);
  1440. X    continue;
  1441. X      }
  1442. X      free ((char *)mylock);
  1443. X    }
  1444. X    free ((char *)thislock);
  1445. X
  1446. X    if (!(IsOptionSet(Vopt_no_confirm) || IsOptionSet(Vopt_quiet)))
  1447. X      if (!ask_confirm (buf, "yes")) {
  1448. X    (void)sprintf (buf, "%s not deleted.", version);
  1449. X    logmsg (buf); free ((char *)thislock);
  1450. X    continue;
  1451. X      }
  1452. X    if (af_rm (key) == -1) {
  1453. X      (void)sprintf (buf, "DoDelete(): During deletion of %s.", version);
  1454. X      af_perror (buf);
  1455. X      return 1;
  1456. X    }
  1457. X    (void)sprintf (buf, "%s deleted.", version);
  1458. X    logmsg (buf);
  1459. X  }
  1460. X
  1461. X  if (errs)
  1462. X    return 1;
  1463. X  else
  1464. X    return 0;
  1465. X}
  1466. X
  1467. END_OF_FILE
  1468. if test 4539 -ne `wc -c <'src/vc/vadm_delete.c'`; then
  1469.     echo shar: \"'src/vc/vadm_delete.c'\" unpacked with wrong size!
  1470. fi
  1471. # end of 'src/vc/vadm_delete.c'
  1472. fi
  1473. if test -f 'src/vc/vc_keyboardIo.c' -a "${1}" != "-c" ; then 
  1474.   echo shar: Will not clobber existing file \"'src/vc/vc_keyboardIo.c'\"
  1475. else
  1476. echo shar: Extracting \"'src/vc/vc_keyboardIo.c'\" \(4259 characters\)
  1477. sed "s/^X//" >'src/vc/vc_keyboardIo.c' <<'END_OF_FILE'
  1478. X/*
  1479. X * Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1480. X *  and U. Pralle
  1481. X * 
  1482. X * This software is published on an as-is basis. There is ABSOLUTELY NO
  1483. X * WARRANTY for any part of this software to work correctly or as described
  1484. X * in the manuals. We do not accept any liability for any kind of damage
  1485. X * caused by use of this software, such as loss of data, time, money, or 
  1486. X * effort.
  1487. X * 
  1488. X * Permission is granted to use, copy, modify, or distribute any part of
  1489. X * this software as long as this is done without asking for charge, and
  1490. X * provided that this copyright notice is retained as part of the source
  1491. X * files. You may charge a distribution fee for the physical act of
  1492. X * transferring a copy, and you may at your option offer warranty
  1493. X * protection in exchange for a fee.
  1494. X * 
  1495. X * Direct questions to: Tech. Univ. Berlin
  1496. X *              Wilfried Koch
  1497. X *              Sekr. FR 5-6 
  1498. X *              Franklinstr. 28/29
  1499. X *              D-1000 Berlin 10, West Germany
  1500. X * 
  1501. X *              Tel: +49-30-314-22972
  1502. X *              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1503. X */
  1504. X#ifndef lint
  1505. Xstatic char *AFSid = "$Header: vc_keyboardIo.c[1.5] Thu Feb 23 18:14:31 1989 axel@coma published $";
  1506. X#ifdef CFFLGS
  1507. Xstatic char *ConfFlg = CFFLGS;
  1508. X    /* should be defined from within Makefile */
  1509. X#endif
  1510. X#endif
  1511. X/*
  1512. X * Log for /u/shape/dist-tape/src/vc/vc_keyboardIo.c[1.3]
  1513. X *     Thu Feb 23 18:14:31 1989 axel@coma published $
  1514. X *  --- empty log message ---
  1515. X *  vc_keyboardIo.c[1.4] Thu Feb 23 18:14:31 1989 axel@coma published $
  1516. X *  --- empty log message ---
  1517. X *  vc_keyboardIo.c[1.5] Thu Feb 23 18:14:31 1989 axel@coma published $
  1518. X *  --- empty log message ---
  1519. X */
  1520. X
  1521. X#include <stdio.h>
  1522. X#include "afsapp.h"
  1523. X
  1524. Xextern char *malloc();
  1525. X
  1526. X#define INPUTQUEUE 4000
  1527. X#define PROMPT "> "
  1528. X
  1529. X/*ARGSUSED*/
  1530. Xstatic
  1531. Xchar *read_unbuffered (term_char)
  1532. X     int term_char;
  1533. X{
  1534. X  char *frame, *nextframe;
  1535. X  int this_char, last_char, last_last_char, curlen, maxlen;
  1536. X
  1537. X  if ((frame = 
  1538. X       malloc ((unsigned)(sizeof (char) * (INPUTQUEUE + 1)))) == NULL) {
  1539. X    fprintf (stderr, "read_unbuffered: can't malloc frame");
  1540. X    exit (1);
  1541. X  }
  1542. X
  1543. X  curlen = 0;
  1544. X  maxlen = INPUTQUEUE;
  1545. X  nextframe = NULL;
  1546. X  last_char = last_last_char = -1;
  1547. X  
  1548. X  (void)fflush(stdin);
  1549. X  printf (PROMPT);
  1550. X
  1551. X  while ((this_char = getchar()) != EOF) {
  1552. X    if (curlen == maxlen) {
  1553. X     /* we need a new frame */
  1554. X      nextframe = 
  1555. X    malloc ((unsigned)(sizeof (char) * (maxlen + INPUTQUEUE + 1)));
  1556. X      if (nextframe == NULL) {
  1557. X    fprintf (stderr, "read_unbuffer: can't malloc new frame,2");
  1558. X    exit (1);
  1559. X      }
  1560. X
  1561. X      bzero (nextframe, maxlen + INPUTQUEUE + 1);
  1562. X      bcopy (frame, nextframe, maxlen);
  1563. X      free (frame);
  1564. X      maxlen += INPUTQUEUE;
  1565. X      frame = nextframe;
  1566. X    }
  1567. X    
  1568. X    frame[curlen++] = this_char;
  1569. X
  1570. X    if (this_char == '\n') {
  1571. X      if ((last_char == '.')
  1572. X      && ((last_last_char == '\n') || (last_last_char == -1))) {
  1573. X    /* input is done */
  1574. X    curlen -= 2;        /* forget "<term_char>\n"  */
  1575. X    break;
  1576. X      }
  1577. X      else
  1578. X    printf (PROMPT);        /* print prompt */
  1579. X    }
  1580. X    
  1581. X    last_last_char = last_char;
  1582. X    last_char = this_char;
  1583. X  }
  1584. X  frame[curlen] = NULL;
  1585. X  return frame;
  1586. X}
  1587. X
  1588. Xstatic
  1589. Xchar *read_buffered ()
  1590. X{
  1591. X  /* hmmm, muss ich erstmal ueber eine geniale
  1592. X   * Implementierung nachdenken. Also erstmal
  1593. X   * read_unbuffered ().
  1594. X   */
  1595. X
  1596. X  return read_unbuffered (-1);    /* no special term_char */
  1597. X}
  1598. X
  1599. Xchar *get_from_stdin (contents, term_char)
  1600. X     char *contents;
  1601. X     int term_char;        /* char that indicates input termination */
  1602. X{
  1603. X  /*
  1604. X   * Reads from stdin a text terminated by ^D or by a specified
  1605. X   * single charcter "term_char" at the beginning of a new line.
  1606. X   * If term_char is -1 text is terminated  by ^D.
  1607. X   *
  1608. X   * The text is appended to "contents", if "contents" is given.
  1609. X   */
  1610. X  char *tmp, *new;
  1611. X  int ltmp, lcontents;        /* length of tmp and contents */
  1612. X  
  1613. X  if (!isatty (0))        /* 0 == stdin */
  1614. X    tmp = read_buffered ();    /* ignore term_char */
  1615. X  else
  1616. X    tmp = read_unbuffered (term_char);
  1617. X
  1618. X  if (contents && *contents) {
  1619. X    ltmp = strlen (tmp);
  1620. X    lcontents = strlen (contents);
  1621. X    if ((new = 
  1622. X     malloc ((unsigned)(sizeof (char) * (ltmp+lcontents+1)))) == NULL) {
  1623. X      fprintf (stderr, "Get_from_stdin: Can't malloc");
  1624. X      exit (1);
  1625. X    }
  1626. X
  1627. X    (void)sprintf (new, "%s%s", contents, tmp);
  1628. X    free (tmp);
  1629. X    return new;
  1630. X  }
  1631. X
  1632. X  return tmp;
  1633. X}
  1634. END_OF_FILE
  1635. if test 4259 -ne `wc -c <'src/vc/vc_keyboardIo.c'`; then
  1636.     echo shar: \"'src/vc/vc_keyboardIo.c'\" unpacked with wrong size!
  1637. fi
  1638. # end of 'src/vc/vc_keyboardIo.c'
  1639. fi
  1640. if test -f 'src/vfind/Shapefile' -a "${1}" != "-c" ; then 
  1641.   echo shar: Will not clobber existing file \"'src/vfind/Shapefile'\"
  1642. else
  1643. echo shar: Extracting \"'src/vfind/Shapefile'\" \(4217 characters\)
  1644. sed "s/^X//" >'src/vfind/Shapefile' <<'END_OF_FILE'
  1645. X#
  1646. X# Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1647. X#  and U. Pralle
  1648. X# 
  1649. X# This software is published on an as-is basis. There is ABSOLUTELY NO
  1650. X# WARRANTY for any part of this software to work correctly or as described
  1651. X# in the manuals. We do not accept any liability for any kind of damage
  1652. X# caused by use of this software, such as loss of data, time, money, or effort.
  1653. X# 
  1654. X# Permission is granted to use, copy, modify, or distribute any part of
  1655. X# this software as long as this is done without asking for charge, and
  1656. X# provided that this copyright notice is retained as part of the source
  1657. X# files. You may charge a distribution fee for the physical act of
  1658. X# transferring a copy, and you may at your option offer warranty
  1659. X# protection in exchange for a fee.
  1660. X# 
  1661. X# Direct questions to: Tech. Univ. Berlin
  1662. X#              Wilfried Koch
  1663. X#              Sekr. FR 5-6 
  1664. X#              Franklinstr. 28/29
  1665. X#              D-1000 Berlin 10, West Germany
  1666. X# 
  1667. X#              Tel: +49-30-314-22972
  1668. X#              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1669. X# 
  1670. X# Shapefile for vfind
  1671. X# $Header: Shapefile[1.6] Tue Feb 21 20:23:03 1989 uli@coma published $
  1672. X#
  1673. X# Log for /u/shape/dist-tape/src/vfind/Shapefile[1.6]
  1674. X#     Tue Feb 21 20:23:03 1989 uli@coma published $
  1675. X#      * This is the Shapefile for vfind. It works on BSD 4.3, SunOS
  1676. X#      4.0, and Ultrix 2.0.
  1677. X#  
  1678. X#  
  1679. X#
  1680. X# This is the directory where the AFS header files reside.
  1681. XAFSINC = /u/shape/src/inc
  1682. X# This is the directory where the AFS libraries reside.
  1683. XAFSLIBPATH = /u/shape/lib
  1684. X#
  1685. X# You are ready, if you don't want to install vfind via shape.
  1686. XINSTALDIR = /u/shape/bin
  1687. X#
  1688. X# Ok, that's it. Don't change other macros settings.
  1689. XRULE=
  1690. XSYSTEM=bsd_4_3
  1691. XCOMPILER=pcc
  1692. XQUALITY=debug
  1693. XAFSLIBS = $(AFSLIBPATH)/libutil.a $(AFSLIBPATH)/libafs.a
  1694. X
  1695. X#% RULE-SECTION
  1696. Xrel:
  1697. X    $(AFSINC)/*, attr (state, busy);
  1698. X    *.a, attr (state, busy);
  1699. X    *, attrge (state, published), attrmax (version).
  1700. X
  1701. Xvsave:
  1702. X    *, attrmax (version);
  1703. X    *.a, attr (state, busy).
  1704. X
  1705. X
  1706. X#% END-RULE-SECTION
  1707. X
  1708. X#% VARIANT-SECTION
  1709. X
  1710. Xvclass system ::= (bsd_4_3, sunos_4_0, ultrix_2_0)
  1711. Xvclass compiler ::= (pcc, gcc)
  1712. X#
  1713. X#
  1714. Xcfflags:
  1715. X    vflags = -DCFFLGS='"$$Flags: <$<> $(CFLAGS) $$"'
  1716. X#
  1717. X# vclass system
  1718. Xbsd_4_3:
  1719. X    CFLAGS = -DBSD_4_3
  1720. X    LIBS = $(AFSLIBS)
  1721. Xsunos_4_0:
  1722. X    CFLAGS = -DSUNOS_4_0
  1723. X    LIBS = $(AFSLIBS)
  1724. Xultrix_2_0:
  1725. X    CFLAGS = -DULTRIX_2_0
  1726. X    LIBS = $(AFSLIBS) -ldbm
  1727. X#
  1728. X# vclass compiler
  1729. X#
  1730. Xpcc:
  1731. X    CC=cc $(INCLUDES)
  1732. Xgnu:
  1733. X    CC=gcc -traditional 
  1734. X    CFLAGS=-g -fwritable-strings $(INCLUDES)
  1735. X#
  1736. X# vclass quality
  1737. X#
  1738. Xdebug:
  1739. X    CFLAGS=-g
  1740. X
  1741. Xas:
  1742. X    CFLAGS=-S
  1743. X
  1744. Xprofile:
  1745. X    CFLAGS=-pg
  1746. X    LDFLAGS=-pg
  1747. X
  1748. Xoptimize:
  1749. X    CFLAGS=-O
  1750. X
  1751. Xmaxoptimize:
  1752. X    CFLAGS=-O -finline-functions -fcombine-regs -fstrength-reduce
  1753. X
  1754. Xpreprocess:
  1755. X    CFLAGS=-E
  1756. X
  1757. X#% END-VARIANT-SECTION
  1758. X
  1759. XCOMPONENTS = $(SOURCES) $(HEADERS) $(MANUALS) Shapefile README
  1760. XSOURCES = vfind.c vfversion.c at_misc.c
  1761. XOBJECTS = vfind.o vfversion.o at_misc.o
  1762. XHEADERS = atk.h
  1763. XMANUALS = vfind.1
  1764. XINCLUDES = -I$(AFSINC)
  1765. X
  1766. X.BPOOL:
  1767. X#.NOBPOOL:
  1768. X
  1769. Xvfind: $(RULE) +cfflags +$(SYSTEM) +$(COMPILER) +$(QUALITY) $(LIBS) $(OBJECTS)
  1770. X    $(CC) $(LDFLAGS) -o vfind $(OBJECTS) $(LIBS)
  1771. X
  1772. Xpreprel: rel @newrel @publish
  1773. X
  1774. Xcomprel: rel vfind
  1775. X
  1776. X
  1777. Xlint: +$(SYSTEM) +$(COMPILER) +$(QUALITY) +$(PURITY) $(COMPONENTS)
  1778. X    lint $(CFLAGS) $(INCLUDES) $(COMPONENTS)
  1779. X
  1780. XVERSIONPROTO = /u/shape/lib/version.c
  1781. Xvfversion.o: $(VERSIONPROTO)
  1782. Xvfind.o: atk.h
  1783. X
  1784. X#
  1785. X# Metatargets
  1786. X#
  1787. X@save:
  1788. X    save -q $(COMPONENTS)
  1789. X
  1790. X@publish:
  1791. X    sbmt -q $(COMPONENTS) -n $(RELNAME)
  1792. X
  1793. X@newrel:
  1794. X    cp $(VERSIONPROTO) vfversion.c ; \
  1795. X    sbmt -fq vfversion.c
  1796. X
  1797. X@sunset: $(COMPONENTS)
  1798. X    rsh troll '(cd vfind; rm -f $(COMPONENTS) )';
  1799. X    rcp $(COMPONENTS) troll:vfind;
  1800. X    rsh troll '(set path = ($$path /usr/gnu/bin) ;cd vfind; /u/shape/bin/shape SYSTEM=sunos_4_0)'
  1801. X
  1802. X@suninstall: vsave $(COMPONENTS)
  1803. X    rsh troll '(cd vfind; rm -f $(COMPONENTS) )';
  1804. X    rcp $(COMPONENTS) troll:vfind;
  1805. X    rsh troll '(set path = ($$path /usr/gnu/bin) ;cd vfind; /u/shape/bin/shape SYSTEM=sunos_4_0)'
  1806. X
  1807. X@vaxset: $(COMPONENTS)
  1808. X    rsh chaos '(cd vfind; rm -f $(COMPONENTS) )';
  1809. X    rcp $(COMPONENTS) chaos:vfind;
  1810. X    rsh chaos '(set path = ($$path /usr/local) ;cd vfind; /u/shape/bin/shape SYSTEM=ultrix_2_0)'
  1811. X
  1812. X@bclean:
  1813. X    rm -f AFS/?B*
  1814. X
  1815. Xinstall: rel vfind
  1816. X    @echo installing vfind in $(INSTALDIR); \
  1817. X    install -c -m 755 vfind $(INSTALDIR)
  1818. X
  1819. X@nothing:
  1820. X
  1821. X@echocomp:
  1822. X    @echo $(COMPONENTS)
  1823. X
  1824. Xtags:
  1825. X    etags $(SOURCES) $(HEADERS)
  1826. END_OF_FILE
  1827. if test 4217 -ne `wc -c <'src/vfind/Shapefile'`; then
  1828.     echo shar: \"'src/vfind/Shapefile'\" unpacked with wrong size!
  1829. fi
  1830. # end of 'src/vfind/Shapefile'
  1831. fi
  1832. if test -f 'tutorial/tutorial.ms' -a "${1}" != "-c" ; then 
  1833.   echo shar: Will not clobber existing file \"'tutorial/tutorial.ms'\"
  1834. else
  1835. echo shar: Extracting \"'tutorial/tutorial.ms'\" \(4195 characters\)
  1836. sed "s/^X//" >'tutorial/tutorial.ms' <<'END_OF_FILE'
  1837. X.\"
  1838. X.\" Copyright (C) 1989, 1990 W. Koch, A. Lampen, A. Mahler, W. Obst,
  1839. X.\"  and U. Pralle
  1840. X.\" 
  1841. X.\" This software is published on an as-is basis. There is ABSOLUTELY NO
  1842. X.\" WARRANTY for any part of this software to work correctly or as described
  1843. X.\" in the manuals. We do not accept any liability for any kind of damage
  1844. X.\" caused by use of this software, such as loss of data, time, money, or 
  1845. X.\" effort.
  1846. X.\" 
  1847. X.\" Permission is granted to use, copy, modify, or distribute any part of
  1848. X.\" this software as long as this is done without asking for charge, and
  1849. X.\" provided that this copyright notice is retained as part of the source
  1850. X.\" files. You may charge a distribution fee for the physical act of
  1851. X.\" transferring a copy, and you may at your option offer warranty
  1852. X.\" protection in exchange for a fee.
  1853. X.\" 
  1854. X.\" Direct questions to: Tech. Univ. Berlin
  1855. X.\"              Wilfried Koch
  1856. X.\"              Sekr. FR 5-6 
  1857. X.\"              Franklinstr. 28/29
  1858. X.\"              D-1000 Berlin 10, West Germany
  1859. X.\" 
  1860. X.\"              Tel: +49-30-314-22972
  1861. X.\"              E-mail: shape@coma.uucp or shape@db0tui62.bitnet
  1862. X.\" 
  1863. X.IZ
  1864. X.sp 1i
  1865. X.nr PS 30
  1866. X.ps \n(PS
  1867. X.nr VS 33
  1868. X.vs \n(VS
  1869. X.ce 2
  1870. XA tutorial introduction to the
  1871. X\f(HB\s-1shape\s+1\fR-toolkit
  1872. X.sp 1i
  1873. X.nr PS 12
  1874. X.ps \n(PS
  1875. X.nr VS 14
  1876. X.vs \n(VS
  1877. X.ce 3
  1878. X\fIWilfried Koch, Andreas Lampen, Axel Mahler, Wolfgang Obst, Uli Pralle\fR
  1879. XTechnische Universit\*:at Berlin
  1880. X.sp 4i
  1881. X.ce
  1882. XPreliminary Draft (\n(dy.\n(mo.\n(yr)
  1883. X.bp
  1884. X.NH 1
  1885. XAbout the status of this release
  1886. X.PP
  1887. XAs you will see when going on reading, this tutorial is still very raw
  1888. Xand incomplete. Properly spoken it is just a small fragment of the
  1889. Xtutorial we plan to write. We put this on the distribution tape because
  1890. Xwe think that a fragment of a tutorial is better than no
  1891. Xtutorial at all.
  1892. X.NH 1
  1893. XIntroduction
  1894. X.PP
  1895. XThe \*(sh-toolkit is a collection of programs to support
  1896. Xsoftware configuration management in an
  1897. X.UX
  1898. Xenvironment. It consists of a set of version control
  1899. Xcommands and \*(sh, a significantly enhanced \fIMake-oid\fR. \*(sh and
  1900. Xthe version control commands are integrated on top of AFS (Attributed
  1901. XFile System), a dedicated version object base. The system features
  1902. XRCS-style version control and a configuration identification and
  1903. X-build process that has full access to all revisions in the object
  1904. Xbase (other than make which only knows about plain files).  AFS also
  1905. Xsupports derived object management, i.e. it maintains a cache of
  1906. Xmultiple versions of compiled object-files (e.g. compiled c-files with
  1907. Xdifferent compile switches).
  1908. X.PP
  1909. XThe \*(sh program itself is upward compatible to Make in that it can
  1910. Xproperly handle conventional Makefiles. The \fIShapefile\fR however, uses
  1911. XMakefile-style dependencies as (versionless) \fIabstract system model\fR
  1912. Xand employs \fIconfiguration selection rules\fR to dynamically bind
  1913. Xparticular version objects in the object base to the names listed in
  1914. Xthe system model. The version selection mechanism exploits AFS'
  1915. Xability to maintain any number of arbitrary attributes for objects in
  1916. Xthe object base.
  1917. XOn special request, \*(sh records an identified configuration in a
  1918. X\fIconfiguration identification document\fR (CID) which has the form of
  1919. Xa completely bound Shapefile (all object-instances are explicit). This
  1920. Xmakes it particularly easy to rebuild recorded configurations. As 
  1921. XCID's are themselves documents, they can be placed under version control,
  1922. Xmaking it easy to maintain histories of entire software systems. 
  1923. X.PP
  1924. XThe object base abstraction presented by AFS provides uniform access to
  1925. Ximmutable revisions of data entities (files) stored in special
  1926. Xarchives, and mutable regular
  1927. X.UX
  1928. Xfiles. Consequently, the AFS based
  1929. Xtoolkit lives peacefully (and meaningfully!) together with standard
  1930. Xfilesystem applications (editors, compilers, formatters etc.).
  1931. XCooperative work within projects is supported by a build-in status
  1932. Xmodel, controlling visibility of version objects, and locking, a
  1933. Xprimitive form of \fIlong transactions\fR. The general concept of object
  1934. Xattributes provides for passing information between individual tools
  1935. Xthat would otherwise be lost. This mechanism is useful for building
  1936. Xintegrated environments from a set of unrelated tools.
  1937. X.bp
  1938. X.so make2shape.ms
  1939. X.bp
  1940. X.so trouble.ms
  1941. END_OF_FILE
  1942. if test 4195 -ne `wc -c <'tutorial/tutorial.ms'`; then
  1943.     echo shar: \"'tutorial/tutorial.ms'\" unpacked with wrong size!
  1944. fi
  1945. # end of 'tutorial/tutorial.ms'
  1946. fi
  1947. echo shar: End of archive 5 \(of 33\).
  1948. cp /dev/null ark5isdone
  1949. MISSING=""
  1950. 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
  1951.     if test ! -f ark${I}isdone ; then
  1952.     MISSING="${MISSING} ${I}"
  1953.     fi
  1954. done
  1955. if test "${MISSING}" = "" ; then
  1956.     echo You have unpacked all 33 archives.
  1957.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1958. else
  1959.     echo You still need to unpack the following archives:
  1960.     echo "        " ${MISSING}
  1961. fi
  1962. ##  End of shell archive.
  1963. exit 0
  1964.