home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume27 / aegis-2.1 / part05 < prev    next >
Text File  |  1993-09-24  |  158KB  |  6,366 lines

  1. Newsgroups: comp.sources.unix
  2. From: pmiller@bmr.gov.au (Peter Miller)
  3. Subject: v27i040: aegis - project change supervisor (V2.1), Part05/19
  4. References: <1.748951883.12788@gw.home.vix.com>
  5. Sender: unix-sources-moderator@gw.home.vix.com
  6. Approved: vixie@gw.home.vix.com
  7.  
  8. Submitted-By: pmiller@bmr.gov.au (Peter Miller)
  9. Posting-Number: Volume 27, Issue 40
  10. Archive-Name: aegis-2.1/part05
  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 19)."
  19. # Contents:  aegis/cstate.def aegis/help.c aegis/parse.c aegis/undo.c
  20. #   common/option.c common/word.c doc/c2.2.so doc/c2.3.so doc/c4.1.so
  21. #   doc/c7.4.so doc/cB.0.so doc/cC.0.so fmtgen/main.c
  22. #   fmtgen/type_enum.c man5/aecstate.5 man5/aepattr.so man5/aepconf.5
  23. #   man5/aesub.5 script/xaegis.tcl test/00/t0004a.sh test/00/t0007a.sh
  24. #   test/00/t0016a.sh test/00/t0018a.sh
  25. # Wrapped by vixie@gw.home.vix.com on Sat Sep 25 03:00:33 1993
  26. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  27. if test -f 'aegis/cstate.def' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'aegis/cstate.def'\"
  29. else
  30. echo shar: Extracting \"'aegis/cstate.def'\" \(5498 characters\)
  31. sed "s/^X//" >'aegis/cstate.def' <<'END_OF_FILE'
  32. X/*
  33. X *    aegis - project change supervisor
  34. X *    Copyright (C) 1991, 1992, 1993 Peter Miller.
  35. X *    All rights reserved.
  36. X *
  37. X *    This program is free software; you can redistribute it and/or modify
  38. X *    it under the terms of the GNU General Public License as published by
  39. X *    the Free Software Foundation; either version 2 of the License, or
  40. X *    (at your option) any later version.
  41. X *
  42. X *    This program is distributed in the hope that it will be useful,
  43. X *    but WITHOUT ANY WARRANTY; without even the implied warranty of
  44. X *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  45. X *    GNU General Public License for more details.
  46. X *
  47. X *    You should have received a copy of the GNU General Public License
  48. X *    along with this program; if not, write to the Free Software
  49. X *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  50. X *
  51. X * MANIFEST: change state file contents definition
  52. X *
  53. X * if you cange this file, don't forget to change
  54. X *    man5/aecstate.5
  55. X */
  56. X
  57. X#include <cattr.def>
  58. X
  59. Xstate =
  60. X(
  61. X    /*
  62. X     * The change has been created,
  63. X     * but has yet to be worked on.
  64. X     */
  65. X    awaiting_development,
  66. X
  67. X    /*
  68. X     * The change is being developed.
  69. X     */
  70. X    being_developed,
  71. X
  72. X    /*
  73. X     * The change has been developed,
  74. X     * and is being reviewed.
  75. X     * (There is no 'awaiting_review' state.)
  76. X     */
  77. X    being_reviewed,
  78. X
  79. X    /*
  80. X     * The change has passed review,
  81. X     * and is queued ready for integration.
  82. X     */
  83. X    awaiting_integration,
  84. X
  85. X    /*
  86. X     * The change is being integrated.
  87. X     */
  88. X    being_integrated,
  89. X
  90. X    /*
  91. X     * The change has been completed and is now
  92. X     * part of the baseline.
  93. X     * Changes in this state can not be reversed.
  94. X     */
  95. X    completed
  96. X);
  97. X
  98. X/*
  99. X * This field records the delta number for this change.
  100. X * It is only present if the change is in one of
  101. X * the 'being_integrated' or 'completed' states.
  102. X */
  103. Xdelta_number = integer;
  104. X
  105. X/*
  106. X * This field records the last change integrated into the project.
  107. X * If it disagrees with the project, a 'project_file_command' (from pconf)
  108. X * needs to be executed at the next build.
  109. X */
  110. Xproject_file_command_sync = integer;
  111. X
  112. X/*
  113. X * This field records the time the last successful
  114. X * 'aegis -Test' command was run.
  115. X * It is only present in the 'being_developed' and 'being_integrated' states.
  116. X */
  117. Xtest_time = integer;
  118. X
  119. X/*
  120. X * This field records the time the last successful
  121. X * 'aegis -Test -BaseLine' command was run.
  122. X * It is only present in the 'being_developed' and 'being_integrated' states.
  123. X */
  124. Xtest_baseline_time = integer;
  125. X
  126. X/*
  127. X * This field records the time the last successful
  128. X * 'aegis -Test -Regression' command was run.
  129. X * It is only present in the 'being_developed' and 'being_integrated' states.
  130. X */
  131. Xregression_test_time = integer;
  132. X
  133. X/*
  134. X * This field records the time the last successful
  135. X * 'aegis -Build' command was run.
  136. X * It is only present in the 'being_developed' and 'being_integrated' states.
  137. X */
  138. Xbuild_time = integer; /* time() */
  139. X
  140. X/*
  141. X * This field is the absolute path of the change's development directory.
  142. X * It is only present of the change is in a state
  143. X * between 'being_developed' and 'being_integrated' inclusive.
  144. X */
  145. Xdevelopment_directory = string;
  146. X
  147. X/*
  148. X * This field is the absolute path of the change's integration directory.
  149. X * It is only present of the change is in the 'being_integrated' state.
  150. X */
  151. Xintegration_directory = string;
  152. X
  153. X/*
  154. X * This field records the history of the change,
  155. X * in the form of state transitions.
  156. X */
  157. Xhistory = 
  158. X[
  159. X    {
  160. X        /*
  161. X         * This field records the time the state transition occured.
  162. X         */
  163. X        when = integer;
  164. X
  165. X        /*
  166. X         * This field records what happened.
  167. X         * Valid value names echo the various aegis functions.
  168. X         */
  169. X        what =
  170. X        (
  171. X            new_change,
  172. X            develop_begin,
  173. X            develop_begin_undo,
  174. X            develop_end,
  175. X            develop_end_undo,
  176. X            review_pass,
  177. X            review_pass_undo,
  178. X            review_fail,
  179. X            integrate_begin,
  180. X            integrate_begin_undo,
  181. X            integrate_pass,
  182. X            integrate_fail
  183. X        );
  184. X
  185. X        /*
  186. X         * This field records the user name of the user who
  187. X         * caused the state transition.
  188. X         */
  189. X        who = string; /* the user name */
  190. X
  191. X        /*
  192. X         * This field is optional.
  193. X         * It is a comment of some sort.
  194. X         * In the cause of review_file and integrate_fail,
  195. X         * this field will contain why the change failed.
  196. X         */
  197. X        why = string;
  198. X    }
  199. X];
  200. X
  201. X/*
  202. X * This field is a list of all the files in the change.
  203. X */
  204. Xsrc =
  205. X[
  206. X    {
  207. X        /*
  208. X         * This file names the file.
  209. X         * The name is relative to the root of the
  210. X         * baseline directory tree.
  211. X         */
  212. X        file_name = string;
  213. X
  214. X        /*
  215. X         * This field describes what is being done with the file.
  216. X         */
  217. X        action = file_action;
  218. X
  219. X        /*
  220. X         * This field records the edit number of the file
  221. X         * when it was added to the change (or updated using the
  222. X         * 'aegis -DIFFerence' command).
  223. X         * This field is not present for new files.
  224. X         */
  225. X        edit_number = string;
  226. X
  227. X        /*
  228. X         * This field describes what function the file serves.
  229. X         */
  230. X        usage = file_usage;
  231. X
  232. X        /*
  233. X         * These fields are set by a successful
  234. X         * 'aegis -DIFFerence' command to the last-time-modified
  235. X         * of the source file and the difference listing.
  236. X         * It is only present between the 'being_developed' and
  237. X         * 'being_integrated' states, inclusive.
  238. X         * This allows checking that the files have not been modified
  239. X         * at the develop_end, review_pass and integrate_begin
  240. X         * state transitions.
  241. X         */
  242. X        diff_time = integer; /* time() */
  243. X        diff_file_time = integer; /* time() */
  244. X
  245. X        /*
  246. X         * To change the name of a file,
  247. X         * a combination of aerm and aenf are used.
  248. X         * With deleted files, this field is used to say where it went.
  249. X         * With new files, this field is used to say where it came from.
  250. X         */
  251. X        move = string;
  252. X    }
  253. X];
  254. END_OF_FILE
  255. if test 5498 -ne `wc -c <'aegis/cstate.def'`; then
  256.     echo shar: \"'aegis/cstate.def'\" unpacked with wrong size!
  257. fi
  258. # end of 'aegis/cstate.def'
  259. fi
  260. if test -f 'aegis/help.c' -a "${1}" != "-c" ; then 
  261.   echo shar: Will not clobber existing file \"'aegis/help.c'\"
  262. else
  263. echo shar: Extracting \"'aegis/help.c'\" \(5412 characters\)
  264. sed "s/^X//" >'aegis/help.c' <<'END_OF_FILE'
  265. X/*
  266. X *    aegis - project change supervisor
  267. X *    Copyright (C) 1991, 1992, 1993 Peter Miller.
  268. X *    All rights reserved.
  269. X *
  270. X *    This program is free software; you can redistribute it and/or modify
  271. X *    it under the terms of the GNU General Public License as published by
  272. X *    the Free Software Foundation; either version 2 of the License, or
  273. X *    (at your option) any later version.
  274. X *
  275. X *    This program is distributed in the hope that it will be useful,
  276. X *    but WITHOUT ANY WARRANTY; without even the implied warranty of
  277. X *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  278. X *    GNU General Public License for more details.
  279. X *
  280. X *    You should have received a copy of the GNU General Public License
  281. X *    along with this program; if not, write to the Free Software
  282. X *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  283. X *
  284. X * MANIFEST: functions to provide consistent treatment of -Help options
  285. X */
  286. X
  287. X#include <ctype.h>
  288. X#include <stdio.h>
  289. X#include <string.h>
  290. X#include <stdlib.h>
  291. X#include <unistd.h>
  292. X
  293. X#include <arglex2.h>
  294. X#include <error.h>
  295. X#include <gonzo.h>
  296. X#include <help.h>
  297. X#include <option.h>
  298. X#include <pager.h>
  299. X#include <patchlevel.h>
  300. X#include <trace.h>
  301. X#include <undo.h>
  302. X
  303. X
  304. Xstatic char *cr[] =
  305. X{
  306. X    "%s version %v",
  307. X    "Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.",
  308. X    "All rights reserved.",
  309. X    "",
  310. X    "The %s program comes with ABSOLUTELY NO WARRANTY;",
  311. X    "for details use the '%s -VERSion Warranty' command.",
  312. X    "The %s program is free software, and you are welcome to",
  313. X    "redistribute it under certain conditions;",
  314. X    "for details use the '%s -VERSion Redistribution' command.",
  315. X};
  316. X
  317. Xstatic char *au[] =
  318. X{
  319. X    "Peter Miller   UUCP     uunet!munnari!bmr.gov.au!pmiller",
  320. X    "/\\/\\*          Internet pmiller@bmr.gov.au",
  321. X};
  322. X
  323. X
  324. Xstatic void interpret _((FILE *, char **, int, char *));
  325. X
  326. Xstatic void
  327. Xinterpret(fp, text, text_len, prefix)
  328. X    FILE    *fp;
  329. X    char    **text;
  330. X    int    text_len;
  331. X    char    *prefix;
  332. X{
  333. X    char    *progname;
  334. X    int    j;
  335. X
  336. X    trace(("interpret()\n{\n"/*}*/));
  337. X    progname = option_progname_get();
  338. X    for (j = 0; j < text_len; ++j)
  339. X    {
  340. X        char    indent[10];
  341. X        char    *ip1;
  342. X        char    *ip2;
  343. X        char    *s;
  344. X
  345. X        s = text[j];
  346. X        strcpy(indent, prefix);
  347. X        ip2 = indent + strlen(indent);
  348. X        ip1 = s;
  349. X        while (isspace(*ip1))
  350. X            *ip2++ = *ip1++;
  351. X        *ip2 = 0;
  352. X        if (ip1[0] == '%' && isupper(ip1[1]) && !ip1[2])
  353. X        {
  354. X            switch (ip1[1])
  355. X            {
  356. X            default:
  357. X                assert(0);
  358. X                break;
  359. X
  360. X            case 'C':
  361. X                interpret(fp, cr, SIZEOF(cr), indent);
  362. X                break;
  363. X
  364. X            case 'A':
  365. X                interpret(fp, au, SIZEOF(au), indent);
  366. X                break;
  367. X            }
  368. X            continue;
  369. X        }
  370. X        if (*prefix)
  371. X            fputs(prefix, fp);
  372. X        while (*s)
  373. X        {
  374. X            if (*s != '%')
  375. X                putc(*s, fp);
  376. X            else
  377. X            {
  378. X                switch (*++s)
  379. X                {
  380. X                default:
  381. X                    assert(0);
  382. X                    break;
  383. X
  384. X                case '%':
  385. X                    putc(*s, fp);
  386. X                    break;
  387. X
  388. X                case 's':
  389. X                    fputs(progname, fp);
  390. X                    break;
  391. X
  392. X                case 'v':
  393. X                    fputs(PATCHLEVEL, fp);
  394. X                    break;
  395. X                }
  396. X            }
  397. X            ++s;
  398. X        }
  399. X        fputc('\n', fp);
  400. X        if (ferror(fp))
  401. X            pager_error(fp);
  402. X    }
  403. X    trace((/*{*/"}\n"));
  404. X}
  405. X
  406. X
  407. Xvoid
  408. Xhelp(text, text_len, usage)
  409. X    char    **text;
  410. X    int    text_len;
  411. X    void    (*usage)_((void));
  412. X{
  413. X    FILE    *fp;
  414. X
  415. X    /*
  416. X     * collect the rest of thge command line,
  417. X     * if necessary
  418. X     */
  419. X    trace(("help(text = %08lX, text_len = %d, usage = %08lX)\n{\n"/*}*/,
  420. X        text, text_len, usage));
  421. X    if (usage)
  422. X    {
  423. X        arglex();
  424. X        while (arglex_token != arglex_token_eoln)
  425. X            generic_argument(usage);
  426. X    }
  427. X
  428. X    /*
  429. X     * paginate output if appropriate
  430. X     */
  431. X    fp = pager_open();
  432. X
  433. X    /*
  434. X     * do what they asked
  435. X     */
  436. X    interpret(fp, text, text_len, "");
  437. X
  438. X    /*
  439. X     * close the paginator
  440. X     */
  441. X    pager_close(fp);
  442. X    trace((/*{*/"}\n"));
  443. X}
  444. X
  445. X
  446. Xvoid
  447. Xgeneric_argument(usage)
  448. X    void    (*usage)_((void));
  449. X{
  450. X    trace(("generic_argument()\n{\n"/*}*/));
  451. X    switch (arglex_token)
  452. X    {
  453. X    default:
  454. X        bad_argument(usage);
  455. X        /* NOTREACHED */
  456. X
  457. X    case arglex_token_library:
  458. X        if (arglex() != arglex_token_string)
  459. X            usage();
  460. X        gonzo_library_append(arglex_value.alv_string);
  461. X        arglex();
  462. X        break;
  463. X
  464. X    case arglex_token_page_length:
  465. X        if (arglex() != arglex_token_number)
  466. X            usage();
  467. X        option_page_length_set(arglex_value.alv_number);
  468. X        arglex();
  469. X        break;
  470. X
  471. X    case arglex_token_page_width:
  472. X        if (arglex() != arglex_token_number)
  473. X            usage();
  474. X        option_page_width_set(arglex_value.alv_number);
  475. X        arglex();
  476. X        break;
  477. X
  478. X    case arglex_token_terse:
  479. X        option_terse_set();
  480. X        arglex();
  481. X        break;
  482. X
  483. X    case arglex_token_trace:
  484. X        if (arglex() != arglex_token_string)
  485. X            usage();
  486. X        for (;;)
  487. X        {
  488. X            trace_enable(arglex_value.alv_string);
  489. X            if (arglex() != arglex_token_string)
  490. X                break;
  491. X        }
  492. X#ifndef DEBUG
  493. X        error
  494. X        (
  495. X"Warning: the -TRace option is only effective when the %s program \
  496. Xis compiled using the DEBUG define in the conf/main.h include file.",
  497. X            option_progname_get()
  498. X        );
  499. X#endif
  500. X        break;
  501. X
  502. X    case arglex_token_unformatted:
  503. X        option_unformatted_set();
  504. X        arglex();
  505. X        break;
  506. X
  507. X    case arglex_token_verbose:
  508. X        option_verbose_set();
  509. X        arglex();
  510. X        break;
  511. X    }
  512. X    trace((/*{*/"}\n"));
  513. X}
  514. X
  515. X
  516. Xvoid
  517. Xbad_argument(usage)
  518. X    void    (*usage)_((void));
  519. X{
  520. X    trace(("bad_argument()\n{\n"/*}*/));
  521. X    switch (arglex_token)
  522. X    {
  523. X    case arglex_token_string:
  524. X        error("misplaced file name (\"%s\")", arglex_value.alv_string);
  525. X        break;
  526. X
  527. X    case arglex_token_number:
  528. X        error("misplaced number (%s)", arglex_value.alv_string);
  529. X        break;
  530. X
  531. X    case arglex_token_option:
  532. X        error("unknown \"%s\" option", arglex_value.alv_string);
  533. X        break;
  534. X
  535. X    case arglex_token_eoln:
  536. X        error("command line too short");
  537. X        break;
  538. X
  539. X    default:
  540. X        error("misplaced \"%s\" option", arglex_value.alv_string);
  541. X        break;
  542. X    }
  543. X    usage();
  544. X    trace((/*{*/"}\n"));
  545. X    quit(1);
  546. X    /* NOTREACHED */
  547. X}
  548. END_OF_FILE
  549. if test 5412 -ne `wc -c <'aegis/help.c'`; then
  550.     echo shar: \"'aegis/help.c'\" unpacked with wrong size!
  551. fi
  552. # end of 'aegis/help.c'
  553. fi
  554. if test -f 'aegis/parse.c' -a "${1}" != "-c" ; then 
  555.   echo shar: Will not clobber existing file \"'aegis/parse.c'\"
  556. else
  557. echo shar: Extracting \"'aegis/parse.c'\" \(5220 characters\)
  558. sed "s/^X//" >'aegis/parse.c' <<'END_OF_FILE'
  559. X/*
  560. X *    aegis - project change supervisor
  561. X *    Copyright (C) 1991, 1992, 1993 Peter Miller.
  562. X *    All rights reserved.
  563. X *
  564. X *    This program is free software; you can redistribute it and/or modify
  565. X *    it under the terms of the GNU General Public License as published by
  566. X *    the Free Software Foundation; either version 2 of the License, or
  567. X *    (at your option) any later version.
  568. X *
  569. X *    This program is distributed in the hope that it will be useful,
  570. X *    but WITHOUT ANY WARRANTY; without even the implied warranty of
  571. X *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  572. X *    GNU General Public License for more details.
  573. X *
  574. X *    You should have received a copy of the GNU General Public License
  575. X *    along with this program; if not, write to the Free Software
  576. X *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  577. X *
  578. X * MANIFEST: functions to parse aegis' data files
  579. X */
  580. X
  581. X#include <error.h>
  582. X#include <gram.h>
  583. X#include <lex.h>
  584. X#include <mem.h>
  585. X#include <parse.h>
  586. X#include <trace.h>
  587. X
  588. Xstatic sem_ty *sem_root;
  589. X
  590. X
  591. Xvoid *
  592. Xparse(filename, type)
  593. X    char    *filename;
  594. X    type_ty    *type;
  595. X{
  596. X    void    *addr;
  597. X
  598. X    trace(("parse(filename = \"%s\", type = %08lx)\n{\n"/*}*/,
  599. X        filename, type));
  600. X    lex_open(filename);
  601. X    sem_push(type, &addr);
  602. X
  603. X    trace(("gram_parse()\n{\n"/*}*/));
  604. X    gram_parse();
  605. X    trace((/*{*/"}\n"));
  606. X
  607. X    while (sem_root)
  608. X        sem_pop();
  609. X    lex_close();
  610. X    trace(("return %08lX;\n", addr));
  611. X    trace((/*{*/"}\n"));
  612. X    return addr;
  613. X}
  614. X
  615. X
  616. Xvoid
  617. Xsem_push(type, addr)
  618. X    type_ty        *type;
  619. X    void        *addr;
  620. X{
  621. X    sem_ty        *sp;
  622. X
  623. X    trace(("sem_push(type = %08lX, addr = %08lX)\n{\n"/*}*/, type, addr));
  624. X    trace(("type->class == %s;\n", type ? type_class_name(type) : "void"));
  625. X    sp = (sem_ty *)mem_alloc_clear(sizeof(sem_ty));
  626. X    sp->type = type;
  627. X    sp->addr = addr;
  628. X    sp->next = sem_root;
  629. X    sem_root = sp;
  630. X    if (type && type->alloc)
  631. X    {
  632. X        *(void **)sp->addr = type->alloc();
  633. X        trace
  634. X        ((
  635. X            "sp->addr = %08lX->%08lX\n",
  636. X            sp->addr,
  637. X            *(void **)sp->addr
  638. X        ));
  639. X    }
  640. X    trace((/*{*/"}\n"));
  641. X}
  642. X
  643. X
  644. Xvoid
  645. Xsem_pop()
  646. X{
  647. X    sem_ty *x;
  648. X
  649. X    trace(("sem_pop()\n{\n"/*}*/));
  650. X    x = sem_root;
  651. X    sem_root = x->next;
  652. X    mem_free((char *)x);
  653. X    trace((/*{*/"}\n"));
  654. X}
  655. X
  656. X
  657. Xvoid
  658. Xsem_integer(n)
  659. X    long    n;
  660. X{
  661. X    trace(("sem_integer(n = %ld)\n{\n"/*}*/, n));
  662. X    if (!sem_root->type)
  663. X        goto done;
  664. X    if (sem_root->type->class != type_class_integer)
  665. X    {
  666. X        gram_error
  667. X        (
  668. X            "value of type %s required",
  669. X            type_class_name(sem_root->type)
  670. X        );
  671. X    }
  672. X    else
  673. X        *(long *)sem_root->addr = n;
  674. X
  675. X    /*
  676. X     * here for all exits
  677. X     */
  678. X    done:
  679. X    trace((/*{*/"}\n"));
  680. X}
  681. X
  682. X
  683. Xvoid
  684. Xsem_string(s)
  685. X    string_ty *s;
  686. X{
  687. X    trace(("sem_string(s = %08lX)\n{\n"/*}*/, s));
  688. X    trace_string(s->str_text);
  689. X    if (!sem_root->type)
  690. X        goto done;
  691. X    if (sem_root->type->class != type_class_string)
  692. X    {
  693. X        gram_error
  694. X        (
  695. X            "value of type %s required",
  696. X            type_class_name(sem_root->type)
  697. X        );
  698. X    }
  699. X    else
  700. X    {
  701. X        trace
  702. X        ((
  703. X            "addr = %08lX->%08lX",
  704. X            sem_root->addr,
  705. X            *(void **)sem_root->addr
  706. X        ));
  707. X        *(string_ty **)sem_root->addr = s;
  708. X    }
  709. X    
  710. X    /*
  711. X     * here for all exits
  712. X     */
  713. X    done:
  714. X    trace((/*{*/"}\n"));
  715. X}
  716. X
  717. X
  718. Xvoid
  719. Xsem_enum(s)
  720. X    string_ty *s;
  721. X{
  722. X    trace(("sem_enum(s = %08lX)\n{\n"/*}*/, s));
  723. X    trace_string(s->str_text);
  724. X    if (!sem_root->type)
  725. X        goto done;
  726. X    if (sem_root->type->class != type_class_enum)
  727. X    {
  728. X        gram_error
  729. X        (
  730. X            "value of type %s required",
  731. X            type_class_name(sem_root->type)
  732. X        );
  733. X    }
  734. X    else
  735. X    {
  736. X        if (sem_root->type->enum_parse(s, sem_root->addr))
  737. X        {
  738. X            gram_error
  739. X            (
  740. X                "the name \"%s\" is not a valid enumerator",
  741. X                s->str_text
  742. X            );
  743. X        }
  744. X    }
  745. X
  746. X    /*
  747. X     * here for all exits
  748. X     */
  749. X    done:
  750. X    trace((/*{*/"}\n"));
  751. X}
  752. X
  753. X
  754. Xvoid
  755. Xsem_list()
  756. X{
  757. X    trace(("sem_list()\n{\n"/*}*/));
  758. X    if (!sem_root->type)
  759. X    {
  760. X        sem_push(0, 0);
  761. X        goto done;
  762. X    }
  763. X    if (sem_root->type->class != type_class_list)
  764. X    {
  765. X        gram_error
  766. X        (
  767. X            "value of type %s required",
  768. X            type_class_name(sem_root->type)
  769. X        );
  770. X        sem_push(0, 0);
  771. X    }
  772. X    else
  773. X    {
  774. X        type_ty    *type;
  775. X        void    *addr;
  776. X
  777. X        sem_root->type->list_parse
  778. X        (
  779. X            *(void **)sem_root->addr,
  780. X            &type,
  781. X            &addr
  782. X        );
  783. X        sem_push(type, addr);
  784. X    }
  785. X
  786. X    /*
  787. X     * here for all exits
  788. X     */
  789. X    done:
  790. X    trace((/*{*/"}\n"));
  791. X}
  792. X
  793. X
  794. Xvoid
  795. Xsem_field(name)
  796. X    string_ty    *name;
  797. X{
  798. X    trace(("sem_field(name = %08lX)\n{\n"/*}*/, name));
  799. X    trace_string(name->str_text);
  800. X    trace(("sem_root == %08lX;\n", sem_root));
  801. X    trace(("sem_root->type == %08lX;\n", sem_root->type));
  802. X    if (!sem_root->type)
  803. X    {
  804. X        sem_push(0, 0);
  805. X        goto done;
  806. X    }
  807. X    if (sem_root->type->class != type_class_struct)
  808. X    {
  809. X        gram_error
  810. X        (
  811. X            "value of type %s required",
  812. X            type_class_name(sem_root->type)
  813. X        );
  814. X        sem_push(0, 0);
  815. X    }
  816. X    else
  817. X    {
  818. X        type_ty        *type;
  819. X        void        *addr;
  820. X        unsigned long    mask;
  821. X
  822. X        if (!sem_root->type->struct_parse)
  823. X            error("no struct parse");
  824. X        if
  825. X        (
  826. X            sem_root->type->struct_parse
  827. X            (
  828. X                *(void **)sem_root->addr,
  829. X                name,
  830. X                &type,
  831. X                &addr,
  832. X                &mask
  833. X            )
  834. X        )
  835. X        {
  836. X            gram_error("field name \"%s\" not valid", name->str_text);
  837. X            sem_push(0, 0);
  838. X        }
  839. X        else
  840. X        {
  841. X            unsigned long    *rmask;
  842. X
  843. X            /*
  844. X             * The first element of all the generated
  845. X             * structures is the mask field.
  846. X             */
  847. X            trace(("mask = 0x%08lX;\n", mask));
  848. X            rmask = *(unsigned long **)sem_root->addr;
  849. X            if (*rmask & mask)
  850. X            {
  851. X                gram_error
  852. X                (
  853. X                    "field \"%s\" redefined",
  854. X                    name->str_text
  855. X                );
  856. X            }
  857. X            *rmask |= mask;
  858. X            trace(("*rmask == 0x%08lX;\n", *rmask));
  859. X            sem_push(type, addr);
  860. X        }
  861. X    }
  862. X
  863. X    /*
  864. X     * here for all exits
  865. X     */
  866. X    done:
  867. X    trace((/*{*/"}\n"));
  868. X}
  869. END_OF_FILE
  870. if test 5220 -ne `wc -c <'aegis/parse.c'`; then
  871.     echo shar: \"'aegis/parse.c'\" unpacked with wrong size!
  872. fi
  873. # end of 'aegis/parse.c'
  874. fi
  875. if test -f 'aegis/undo.c' -a "${1}" != "-c" ; then 
  876.   echo shar: Will not clobber existing file \"'aegis/undo.c'\"
  877. else
  878. echo shar: Extracting \"'aegis/undo.c'\" \(5742 characters\)
  879. sed "s/^X//" >'aegis/undo.c' <<'END_OF_FILE'
  880. X/*
  881. X *    aegis - project change supervisor
  882. X *    Copyright (C) 1991, 1992, 1993 Peter Miller.
  883. X *    All rights reserved.
  884. X *
  885. X *    This program is free software; you can redistribute it and/or modify
  886. X *    it under the terms of the GNU General Public License as published by
  887. X *    the Free Software Foundation; either version 2 of the License, or
  888. X *    (at your option) any later version.
  889. X *
  890. X *    This program is distributed in the hope that it will be useful,
  891. X *    but WITHOUT ANY WARRANTY; without even the implied warranty of
  892. X *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  893. X *    GNU General Public License for more details.
  894. X *
  895. X *    You should have received a copy of the GNU General Public License
  896. X *    along with this program; if not, write to the Free Software
  897. X *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  898. X *
  899. X * MANIFEST: functions to store and enact file operations on transation abort
  900. X */
  901. X
  902. X#include <error.h>
  903. X#include <mem.h>
  904. X#include <option.h>
  905. X#include <os.h>
  906. X#include <trace.h>
  907. X#include <undo.h>
  908. X
  909. X
  910. Xenum what_ty
  911. X{
  912. X    what_rename,
  913. X    what_chmod,
  914. X    what_chmod_errok,
  915. X    what_unlink_errok,
  916. X    what_rmdir_errok
  917. X};
  918. Xtypedef enum what_ty what_ty;
  919. X
  920. Xtypedef struct action_ty action_ty;
  921. Xstruct action_ty
  922. X{
  923. X    what_ty        what;
  924. X    string_ty    *path1;
  925. X    string_ty    *path2;
  926. X    int        arg1;
  927. X    int        arg2;
  928. X    action_ty    *next;
  929. X    int        uid;
  930. X    int        gid;
  931. X    int        umask;
  932. X};
  933. X
  934. Xstatic    action_ty    *head;
  935. X
  936. X
  937. Xstatic action_ty *newlink _((what_ty));
  938. X
  939. Xstatic action_ty *
  940. Xnewlink(what)
  941. X    what_ty        what;
  942. X{
  943. X    action_ty    *new;
  944. X
  945. X    trace(("undo::newlink(what = %d)\n{\n"/*}*/, what));
  946. X    new = (action_ty *)mem_alloc(sizeof(action_ty));
  947. X    new->what = what;
  948. X    new->next = head;
  949. X    new->path1 = 0;
  950. X    new->path2 = 0;
  951. X    new->arg1 = 0;
  952. X    new->arg2 = 0;
  953. X    os_become_query(&new->uid, &new->gid, &new->umask);
  954. X    head = new;
  955. X    trace(("return %08lX;\n", new));
  956. X    trace((/*{*/"}\n"));
  957. X    return new;
  958. X}
  959. X
  960. X
  961. Xvoid
  962. Xundo_rename(from, to)
  963. X    string_ty    *from;
  964. X    string_ty    *to;
  965. X{
  966. X    action_ty    *new;
  967. X
  968. X    trace(("undo_rename(from = %08lX, to = %08lX)\n{\n"/*}*/, from, to));
  969. X    trace_string(from->str_text);
  970. X    trace_string(to->str_text);
  971. X    new = newlink(what_rename);
  972. X    new->path1 = str_copy(from);
  973. X    new->path2 = str_copy(to);
  974. X    trace((/*{*/"}\n"));
  975. X}
  976. X
  977. X
  978. Xvoid
  979. Xundo_chmod(path, mode)
  980. X    string_ty    *path;
  981. X    int        mode;
  982. X{
  983. X    action_ty    *new;
  984. X
  985. X    mode &= 07777;
  986. X    trace(("undo_chmod(path = %08lX, mode = %05o)\n{\n"/*}*/, path, mode));
  987. X    trace_string(path->str_text);
  988. X    new = newlink(what_chmod);
  989. X    new->path1 = str_copy(path);
  990. X    new->arg1 = mode;
  991. X    trace((/*{*/"}\n"));
  992. X}
  993. X
  994. X
  995. Xvoid
  996. Xundo_chmod_errok(path, mode)
  997. X    string_ty    *path;
  998. X    int        mode;
  999. X{
  1000. X    action_ty    *new;
  1001. X
  1002. X    mode &= 07777;
  1003. X    trace(("undo_chmod_errok(path = %08lX, mode = %05o)\n{\n"/*}*/, path, mode));
  1004. X    trace_string(path->str_text);
  1005. X    new = newlink(what_chmod_errok);
  1006. X    new->path1 = str_copy(path);
  1007. X    new->arg1 = mode;
  1008. X    trace((/*{*/"}\n"));
  1009. X}
  1010. X
  1011. X
  1012. Xvoid
  1013. Xundo_unlink_errok(path)
  1014. X    string_ty    *path;
  1015. X{
  1016. X    action_ty    *new;
  1017. X
  1018. X    trace(("undo_unlink_errok(path = %08lX)\n{\n"/*}*/, path));
  1019. X    trace_string(path->str_text);
  1020. X    new = newlink(what_unlink_errok);
  1021. X    new->path1 = str_copy(path);
  1022. X    trace((/*{*/"}\n"));
  1023. X}
  1024. X
  1025. Xvoid
  1026. Xundo_rmdir_errok(path)
  1027. X    string_ty    *path;
  1028. X{
  1029. X    action_ty    *new;
  1030. X
  1031. X    trace(("undo_rmdir_errok(path = %08lX)\n{\n"/*}*/, path));
  1032. X    trace_string(path->str_text);
  1033. X    new = newlink(what_rmdir_errok);
  1034. X    new->path1 = str_copy(path);
  1035. X    trace((/*{*/"}\n"));
  1036. X}
  1037. X
  1038. X
  1039. Xvoid
  1040. Xundo()
  1041. X{
  1042. X    static int    count;
  1043. X    action_ty    *ap;
  1044. X    char        *progname;
  1045. X
  1046. X    trace(("undo()\n{\n"/*}*/));
  1047. X    ++count;
  1048. X    switch (count)
  1049. X    {
  1050. X    case 1:
  1051. X        while (os_become_active())
  1052. X            os_become_undo();
  1053. X        while (head)
  1054. X        {
  1055. X            /*
  1056. X             * Take the first item off the list.
  1057. X             */
  1058. X            ap = head;
  1059. X            head = ap->next;
  1060. X    
  1061. X            /*
  1062. X             * Do the action
  1063. X             */
  1064. X            trace(("ap = %08lX;\n", ap));
  1065. X            os_become(ap->uid, ap->gid, ap->umask);
  1066. X            switch (ap->what)
  1067. X            {
  1068. X            case what_rename:
  1069. X                os_rename(ap->path1, ap->path2);
  1070. X                break;
  1071. X
  1072. X            case what_chmod:
  1073. X                os_chmod(ap->path1, ap->arg1);
  1074. X                break;
  1075. X
  1076. X            case what_chmod_errok:
  1077. X                os_chmod_errok(ap->path1, ap->arg1);
  1078. X                break;
  1079. X
  1080. X            case what_unlink_errok:
  1081. X                os_unlink_errok(ap->path1);
  1082. X                break;
  1083. X    
  1084. X            case what_rmdir_errok:
  1085. X                os_rmdir_errok(ap->path1);
  1086. X                break;
  1087. X            }
  1088. X            os_become_undo();
  1089. X    
  1090. X            /*
  1091. X             * Free the list element.
  1092. X             */
  1093. X            str_free(ap->path1);
  1094. X            if (ap->path2)
  1095. X                str_free(ap->path2);
  1096. X            mem_free((char *)ap);
  1097. X        }
  1098. X        break;
  1099. X
  1100. X    case 2:
  1101. X        progname = option_progname_get();
  1102. X        error
  1103. X        (
  1104. X"A fatal error occurred while attempting to recover \
  1105. Xfrom an earlier fatal error.  \
  1106. XSome %s data may have been corrupted.  \
  1107. XInform the nearest %s guru immediately.",
  1108. X            progname,
  1109. X            progname
  1110. X        );
  1111. X        while (head)
  1112. X        {
  1113. X            ap = head;
  1114. X            head = ap->next;
  1115. X            switch (ap->what)
  1116. X            {
  1117. X            case what_rename:
  1118. X                error
  1119. X                (
  1120. X                    "unfinished recovery: mv %s %s",
  1121. X                    ap->path1->str_text,
  1122. X                    ap->path2->str_text
  1123. X                );
  1124. X                break;
  1125. X
  1126. X            case what_chmod:
  1127. X            case what_chmod_errok:
  1128. X                error
  1129. X                (
  1130. X                    "unfinished recovery: chmod %04o %s",
  1131. X                    ap->arg1,
  1132. X                    ap->path1->str_text
  1133. X                );
  1134. X                break;
  1135. X
  1136. X            case what_unlink_errok:
  1137. X                error
  1138. X                (
  1139. X                    "unfinished recovery: rm %s",
  1140. X                    ap->path1->str_text
  1141. X                );
  1142. X                break;
  1143. X
  1144. X            case what_rmdir_errok:
  1145. X                error
  1146. X                (
  1147. X                    "unfinished recovery: rmdir %s",
  1148. X                    ap->path1->str_text
  1149. X                );
  1150. X                break;
  1151. X            }
  1152. X    
  1153. X            /*
  1154. X             * Free the list element.
  1155. X             */
  1156. X            str_free(ap->path1);
  1157. X            if (ap->path2)
  1158. X                str_free(ap->path2);
  1159. X            mem_free((char *)ap);
  1160. X        }
  1161. X        break;
  1162. X
  1163. X    default:
  1164. X        /* probably an error writing stderr */
  1165. X        break;
  1166. X    }
  1167. X    --count;
  1168. X    trace((/*{*/"}\n"));
  1169. X}
  1170. X
  1171. X
  1172. Xvoid
  1173. Xundo_quitter(n)
  1174. X    int    n;
  1175. X{
  1176. X    if (n)
  1177. X        undo();
  1178. X}
  1179. X
  1180. X
  1181. Xvoid
  1182. Xundo_cancel()
  1183. X{
  1184. X    action_ty    *ap;
  1185. X
  1186. X    trace(("undo_cancel()\n{\n"/*}*/));
  1187. X    while (head)
  1188. X    {
  1189. X        /*
  1190. X         * Take the first item off the list.
  1191. X         */
  1192. X        ap = head;
  1193. X        head = ap->next;
  1194. X
  1195. X        /*
  1196. X         * Free the list element.
  1197. X         */
  1198. X        str_free(ap->path1);
  1199. X        if (ap->path2)
  1200. X            str_free(ap->path2);
  1201. X        mem_free((char *)ap);
  1202. X    }
  1203. X    trace((/*{*/"}\n"));
  1204. X}
  1205. END_OF_FILE
  1206. if test 5742 -ne `wc -c <'aegis/undo.c'`; then
  1207.     echo shar: \"'aegis/undo.c'\" unpacked with wrong size!
  1208. fi
  1209. # end of 'aegis/undo.c'
  1210. fi
  1211. if test -f 'common/option.c' -a "${1}" != "-c" ; then 
  1212.   echo shar: Will not clobber existing file \"'common/option.c'\"
  1213. else
  1214. echo shar: Extracting \"'common/option.c'\" \(5384 characters\)
  1215. sed "s/^X//" >'common/option.c' <<'END_OF_FILE'
  1216. X/*
  1217. X *    aegis - project change supervisor
  1218. X *    Copyright (C) 1991, 1992, 1993 Peter Miller.
  1219. X *    All rights reserved.
  1220. X *
  1221. X *    This program is free software; you can redistribute it and/or modify
  1222. X *    it under the terms of the GNU General Public License as published by
  1223. X *    the Free Software Foundation; either version 2 of the License, or
  1224. X *    (at your option) any later version.
  1225. X *
  1226. X *    This program is distributed in the hope that it will be useful,
  1227. X *    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1228. X *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1229. X *    GNU General Public License for more details.
  1230. X *
  1231. X *    You should have received a copy of the GNU General Public License
  1232. X *    along with this program; if not, write to the Free Software
  1233. X *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1234. X *
  1235. X * MANIFEST: functions to manipulate command line options
  1236. X */
  1237. X
  1238. X#include <string.h>
  1239. X#include <stdio.h>
  1240. X#include <stdlib.h>
  1241. X#include <sys/ioctl.h>
  1242. X
  1243. X#include <error.h>
  1244. X#include <option.h>
  1245. X#include <trace.h>
  1246. X
  1247. X
  1248. X#define MIN_PAGE_WIDTH 40
  1249. X/* #define MAX_PAGE_WIDTH in option.h */
  1250. X#define DEFAULT_PAGE_WIDTH 80
  1251. X#define MIN_PAGE_LENGTH 10
  1252. X#define MAX_PAGE_LENGTH 30000
  1253. X#define DEFAULT_PAGE_LENGTH 24
  1254. X
  1255. X#define LEVEL_TERSE 1
  1256. X#define LEVEL_UNFORMATTED 2
  1257. X#define LEVEL_UNSET 3
  1258. X#define LEVEL_VERBOSE 4
  1259. X
  1260. Xstatic    int    page_length;
  1261. Xstatic    char    *progname;
  1262. Xstatic    int    verbose_flag = LEVEL_UNSET;
  1263. Xstatic    int    page_width;
  1264. X
  1265. X
  1266. Xvoid
  1267. Xoption_progname_set(s)
  1268. X    char        *s;
  1269. X{
  1270. X    /* do NOT put tracing in this function */
  1271. X    assert(s);
  1272. X    assert(!progname);
  1273. X    for (;;)
  1274. X    {
  1275. X        progname = strrchr(s, '/');
  1276. X
  1277. X        /*
  1278. X         * we were invoked as
  1279. X         *    progname -args
  1280. X         */
  1281. X        if (!progname)
  1282. X        {
  1283. X            progname = s;
  1284. X            break;
  1285. X        }
  1286. X
  1287. X        /*
  1288. X         * we were invoked as
  1289. X         *    /usr/local/progname -args
  1290. X         */
  1291. X        if (progname[1])
  1292. X        {
  1293. X            ++progname;
  1294. X            break;
  1295. X        }
  1296. X
  1297. X        /*
  1298. X         * this is real nasty:
  1299. X         * it is possible to invoke us as
  1300. X         *    /usr//local///bin////progname///// -args
  1301. X         * and it is legal!!
  1302. X         */
  1303. X        *progname = 0;
  1304. X    }
  1305. X}
  1306. X
  1307. X
  1308. Xchar *
  1309. Xoption_progname_get()
  1310. X{
  1311. X    /* do NOT put tracing in this function */
  1312. X    assert(progname);
  1313. X    return progname;
  1314. X}
  1315. X
  1316. X
  1317. Xstatic void too_many _((void));
  1318. X
  1319. Xstatic void
  1320. Xtoo_many()
  1321. X{
  1322. X    fatal
  1323. X    (
  1324. X         "only one of -TERse and -UNFormatted and -Verbose may be specified"
  1325. X    );
  1326. X}
  1327. X
  1328. X
  1329. Xvoid
  1330. Xoption_verbose_set()
  1331. X{
  1332. X    trace(("option_set_verbose()\n{\n"/*}*/));
  1333. X    if (verbose_flag == LEVEL_VERBOSE)
  1334. X        fatal("duplicate -Verbose option");
  1335. X    if (verbose_flag != LEVEL_UNSET)
  1336. X        too_many();
  1337. X    verbose_flag = LEVEL_VERBOSE;
  1338. X    trace((/*{*/"}\n"));
  1339. X}
  1340. X
  1341. X
  1342. Xint
  1343. Xoption_verbose_get()
  1344. X{
  1345. X    return (verbose_flag == LEVEL_VERBOSE);
  1346. X}
  1347. X
  1348. X
  1349. Xvoid
  1350. Xoption_terse_set()
  1351. X{
  1352. X    trace(("option_set_terse()\n{\n"/*}*/));
  1353. X    if (verbose_flag == LEVEL_TERSE)
  1354. X        fatal("duplicate -TERse option");
  1355. X    if (verbose_flag != LEVEL_UNSET)
  1356. X        too_many();
  1357. X    verbose_flag = LEVEL_TERSE;
  1358. X    trace((/*{*/"}\n"));
  1359. X}
  1360. X
  1361. X
  1362. Xint
  1363. Xoption_terse_get()
  1364. X{
  1365. X    return (verbose_flag == LEVEL_TERSE);
  1366. X}
  1367. X
  1368. X
  1369. Xvoid
  1370. Xoption_unformatted_set()
  1371. X{
  1372. X    trace(("option_set_unformatted()\n{\n"/*}*/));
  1373. X    if (verbose_flag == LEVEL_UNFORMATTED)
  1374. X        fatal("duplicate -UNFormatted option");
  1375. X    if (verbose_flag != LEVEL_UNSET)
  1376. X        too_many();
  1377. X    verbose_flag = LEVEL_UNFORMATTED;
  1378. X    trace((/*{*/"}\n"));
  1379. X}
  1380. X
  1381. X
  1382. Xint
  1383. Xoption_unformatted_get()
  1384. X{
  1385. X    return
  1386. X    (
  1387. X        verbose_flag == LEVEL_TERSE
  1388. X    ||
  1389. X        verbose_flag == LEVEL_UNFORMATTED
  1390. X    );
  1391. X}
  1392. X
  1393. X
  1394. Xstatic void default_page_sizes _((void));
  1395. X
  1396. Xstatic void
  1397. Xdefault_page_sizes()
  1398. X{
  1399. X    if (!page_width)
  1400. X    {
  1401. X        char    *cp;
  1402. X
  1403. X        cp = getenv("COLS");
  1404. X        if (cp)
  1405. X        {
  1406. X            int    n;
  1407. X
  1408. X            n = atoi(cp);
  1409. X            if (n > 0)
  1410. X            {
  1411. X                if (n < MIN_PAGE_WIDTH)
  1412. X                    n = MIN_PAGE_WIDTH;
  1413. X                if (n > MAX_PAGE_WIDTH)
  1414. X                    n = MAX_PAGE_WIDTH;
  1415. X                page_width = n;
  1416. X            }
  1417. X        }
  1418. X    }
  1419. X    if (!page_length)
  1420. X    {
  1421. X        char    *cp;
  1422. X
  1423. X        cp = getenv("LINES");
  1424. X        if (cp)
  1425. X        {
  1426. X            int    n;
  1427. X
  1428. X            n = atoi(cp);
  1429. X            if (n > 0)
  1430. X            {
  1431. X                if (n < MIN_PAGE_LENGTH)
  1432. X                    n = MIN_PAGE_LENGTH;
  1433. X                if (n > MAX_PAGE_LENGTH)
  1434. X                    n = MAX_PAGE_LENGTH;
  1435. X                page_length = n;
  1436. X            }
  1437. X        }
  1438. X    }
  1439. X
  1440. X#ifdef TIOCGWINSZ
  1441. X    if (!page_width || !page_length)
  1442. X    {
  1443. X        struct winsize    ws;
  1444. X
  1445. X        if (ioctl(0, TIOCGWINSZ, &ws) == 0)
  1446. X        {
  1447. X            if (!page_width && ws.ws_col > 0)
  1448. X            {
  1449. X                page_width = ws.ws_col;
  1450. X                if (page_width < MIN_PAGE_WIDTH)
  1451. X                    page_width = MIN_PAGE_WIDTH;
  1452. X                if (page_width > MAX_PAGE_WIDTH)
  1453. X                    page_width = MAX_PAGE_WIDTH;
  1454. X            }
  1455. X            if (!page_length && ws.ws_row > 0)
  1456. X            {
  1457. X                page_length = ws.ws_row;
  1458. X                if (page_length < MIN_PAGE_LENGTH)
  1459. X                    page_length = MIN_PAGE_LENGTH;
  1460. X                if (page_length > MAX_PAGE_LENGTH)
  1461. X                    page_length = MAX_PAGE_LENGTH;
  1462. X            }
  1463. X        }
  1464. X    }
  1465. X#endif
  1466. X
  1467. X    if (!page_width)
  1468. X        page_width = DEFAULT_PAGE_WIDTH;
  1469. X    if (!page_length)
  1470. X        page_length = DEFAULT_PAGE_LENGTH;
  1471. X}
  1472. X
  1473. X
  1474. Xvoid
  1475. Xoption_page_width_set(n)
  1476. X    int    n;
  1477. X{
  1478. X    if (page_width)
  1479. X        fatal("duplicate -Page_Width option");
  1480. X    if (n < MIN_PAGE_WIDTH || n > MAX_PAGE_WIDTH)
  1481. X        fatal("page width %d out of range", n);
  1482. X    page_width = n;
  1483. X}
  1484. X
  1485. X
  1486. Xint
  1487. Xoption_page_width_get()
  1488. X{
  1489. X    /*
  1490. X     * must not generate a fatal error in this function,
  1491. X     * as it is used by 'error.c' when reporting fatal errors.
  1492. X     *
  1493. X     * must not put tracing in this function,
  1494. X     * because 'trace.c' uses it to determine the width.
  1495. X     */
  1496. X    if (!page_width)
  1497. X        default_page_sizes();
  1498. X    return page_width;
  1499. X}
  1500. X
  1501. X
  1502. Xvoid
  1503. Xoption_page_length_set(n)
  1504. X    int    n;
  1505. X{
  1506. X    if (page_length)
  1507. X        fatal("duplicate -Page_Length option");
  1508. X    if (n < MIN_PAGE_LENGTH || n > MAX_PAGE_LENGTH)
  1509. X        fatal("page length %d out of range", n);
  1510. X    page_length = n;
  1511. X}
  1512. X
  1513. X
  1514. Xint
  1515. Xoption_page_length_get()
  1516. X{
  1517. X    if (!page_length)
  1518. X        default_page_sizes();
  1519. X    return page_length;
  1520. X}
  1521. END_OF_FILE
  1522. if test 5384 -ne `wc -c <'common/option.c'`; then
  1523.     echo shar: \"'common/option.c'\" unpacked with wrong size!
  1524. fi
  1525. # end of 'common/option.c'
  1526. fi
  1527. if test -f 'common/word.c' -a "${1}" != "-c" ; then 
  1528.   echo shar: Will not clobber existing file \"'common/word.c'\"
  1529. else
  1530. echo shar: Extracting \"'common/word.c'\" \(6331 characters\)
  1531. sed "s/^X//" >'common/word.c' <<'END_OF_FILE'
  1532. X/*
  1533. X *    aegis - project change supervisor
  1534. X *    Copyright (C) 1991, 1992, 1993 Peter Miller.
  1535. X *    All rights reserved.
  1536. X *
  1537. X *    This program is free software; you can redistribute it and/or modify
  1538. X *    it under the terms of the GNU General Public License as published by
  1539. X *    the Free Software Foundation; either version 2 of the License, or
  1540. X *    (at your option) any later version.
  1541. X *
  1542. X *    This program is distributed in the hope that it will be useful,
  1543. X *    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1544. X *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1545. X *    GNU General Public License for more details.
  1546. X *
  1547. X *    You should have received a copy of the GNU General Public License
  1548. X *    along with this program; if not, write to the Free Software
  1549. X *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1550. X *
  1551. X * MANIFEST: functions to manipulate lists of strings
  1552. X */
  1553. X
  1554. X#include <ctype.h>
  1555. X#include <stddef.h>
  1556. X#include <string.h>
  1557. X#include <stdlib.h>
  1558. X#include <time.h>
  1559. X
  1560. X#include <main.h>
  1561. X#include <string.h>
  1562. X#include <word.h>
  1563. X#include <error.h>
  1564. X#include <mem.h>
  1565. X
  1566. X
  1567. X/*
  1568. X * NAME
  1569. X *    wl_append - append to a word list
  1570. X *
  1571. X * SYNOPSIS
  1572. X *    void wl_append(wlist *wlp, string_ty *wp);
  1573. X *
  1574. X * DESCRIPTION
  1575. X *    Wl_append is used to append to a word list.
  1576. X *
  1577. X * CAVEAT
  1578. X *    The word being appended IS copied.
  1579. X */
  1580. X
  1581. Xvoid
  1582. Xwl_append(wlp, w)
  1583. X    wlist        *wlp;
  1584. X    string_ty    *w;
  1585. X{
  1586. X    *(string_ty **)
  1587. X    enlarge
  1588. X    (
  1589. X        &wlp->wl_nwords,
  1590. X        (char **)&wlp->wl_word, sizeof(string_ty *)
  1591. X    ) =
  1592. X        str_copy(w);
  1593. X}
  1594. X
  1595. X
  1596. X/*
  1597. X * NAME
  1598. X *    wl_free - free a word list
  1599. X *
  1600. X * SYNOPSIS
  1601. X *    void wl_free(wlist *wlp);
  1602. X *
  1603. X * DESCRIPTION
  1604. X *    Wl_free is used to free the contents of a word list
  1605. X *    when it is finished with.
  1606. X *
  1607. X * CAVEAT
  1608. X *    It is assumed that the contents of the word list were all
  1609. X *    created using strdup() or similar, and grown using wl_append().
  1610. X */
  1611. X
  1612. Xvoid
  1613. Xwl_free(wlp)
  1614. X    wlist        *wlp;
  1615. X{
  1616. X    int        j;
  1617. X
  1618. X    for (j = 0; j < wlp->wl_nwords; j++)
  1619. X        str_free(wlp->wl_word[j]);
  1620. X    if (wlp->wl_nwords)
  1621. X        free(wlp->wl_word);
  1622. X    wlp->wl_nwords = 0;
  1623. X    wlp->wl_word = 0;
  1624. X}
  1625. X
  1626. X
  1627. X/*
  1628. X * NAME
  1629. X *    wl_member - word list membership
  1630. X *
  1631. X * SYNOPSIS
  1632. X *    int wl_member(wlist *wlp, string_ty *wp);
  1633. X *
  1634. X * DESCRIPTION
  1635. X *    Wl_member is used to determine if the given word is
  1636. X *    contained in the given word list.
  1637. X *
  1638. X * RETURNS
  1639. X *    A zero if the word is not in the list,
  1640. X *    and a non-zero if it is.
  1641. X */
  1642. X
  1643. Xint
  1644. Xwl_member(wlp, w)
  1645. X    wlist        *wlp;
  1646. X    string_ty    *w;
  1647. X{
  1648. X    int        j;
  1649. X
  1650. X    for (j = 0; j < wlp->wl_nwords; j++)
  1651. X        if (str_equal(wlp->wl_word[j], w))
  1652. X            return 1;
  1653. X    return 0;
  1654. X}
  1655. X
  1656. X
  1657. X/*
  1658. X * NAME
  1659. X *    wl_copy - copy a word list
  1660. X *
  1661. X * SYNOPSIS
  1662. X *    void wl_copy(wlist *to, wlist *from);
  1663. X *
  1664. X * DESCRIPTION
  1665. X *    Wl_copy is used to copy word lists.
  1666. X *
  1667. X * RETURNS
  1668. X *    A copy of the 'to' word list is placed in 'from'.
  1669. X *
  1670. X * CAVEAT
  1671. X *    It is the responsibility of the caller to ensure that the
  1672. X *    new word list is freed when finished with, by a call to wl_free().
  1673. X */
  1674. X
  1675. Xvoid
  1676. Xwl_copy(to, from)
  1677. X    wlist        *to;
  1678. X    wlist        *from;
  1679. X{
  1680. X    int        j;
  1681. X
  1682. X    wl_zero(to);
  1683. X    for (j = 0; j < from->wl_nwords; j++)
  1684. X        wl_append(to, str_copy(from->wl_word[j]));
  1685. X}
  1686. X
  1687. X
  1688. X/*
  1689. X * NAME
  1690. X *    wl2str - form a string from a word list
  1691. X *
  1692. X * SYNOPSIS
  1693. X *    string_ty *wl2str(wlist *wlp, int start, int stop);
  1694. X *
  1695. X * DESCRIPTION
  1696. X *    Wl2str is used to form a string from a word list.
  1697. X *
  1698. X * RETURNS
  1699. X *    A pointer to the newly formed string in dynamic memory.
  1700. X *
  1701. X * CAVEAT
  1702. X *    It is the responsibility of the caller to ensure that the
  1703. X *    new string is freed when finished with, by a call to free().
  1704. X */
  1705. X
  1706. Xstring_ty *
  1707. Xwl2str(wl, start, stop)
  1708. X    wlist        *wl;
  1709. X    int        start;
  1710. X    int        stop;
  1711. X{
  1712. X    int        j;
  1713. X    static char    *tmp;
  1714. X    static size_t    tmplen;
  1715. X    size_t        length;
  1716. X    char        *pos;
  1717. X    string_ty    *s;
  1718. X
  1719. X    length = 0;
  1720. X    for (j = start; j <= stop && j < wl->wl_nwords; j++)
  1721. X    {
  1722. X        s = wl->wl_word[j];
  1723. X        if (s->str_length)
  1724. X        {
  1725. X            if (length)
  1726. X                ++length;
  1727. X            length += s->str_length;
  1728. X        }
  1729. X    }
  1730. X
  1731. X    if (!tmp)
  1732. X    {
  1733. X        tmplen = length;
  1734. X        if (tmplen < 16)
  1735. X            tmplen = 16;
  1736. X        tmp = mem_alloc(tmplen);
  1737. X    }
  1738. X    else
  1739. X    {
  1740. X        if (tmplen < length)
  1741. X        {
  1742. X            tmplen = length;
  1743. X            mem_change_size(&tmp, tmplen);
  1744. X        }
  1745. X    }
  1746. X
  1747. X    pos = tmp;
  1748. X    for (j = start; j <= stop && j < wl->wl_nwords; j++)
  1749. X    {
  1750. X        s = wl->wl_word[j];
  1751. X        if (s->str_length)
  1752. X        {
  1753. X            if (pos != tmp)
  1754. X                *pos++ = ' ';
  1755. X            memcpy(pos, s->str_text, s->str_length);
  1756. X            pos += s->str_length;
  1757. X        }
  1758. X    }
  1759. X
  1760. X    s = str_n_from_c(tmp, length);
  1761. X    return s;
  1762. X}
  1763. X
  1764. X
  1765. X/*
  1766. X * NAME
  1767. X *    str2wl - string to word list
  1768. X *
  1769. X * SYNOPSIS
  1770. X *    void str2wl(wlist *wlp, string_ty *s);
  1771. X *
  1772. X * DESCRIPTION
  1773. X *    Str2wl is used to form a word list from a string.
  1774. X *
  1775. X * RETURNS
  1776. X *    The string is broken on spaces into words,
  1777. X *    using strndup() and wl_append().
  1778. X *
  1779. X * CAVEAT
  1780. X *    Quoting is not understood.
  1781. X */
  1782. X
  1783. Xvoid
  1784. Xstr2wl(slp, s, sep)
  1785. X    wlist        *slp;
  1786. X    string_ty    *s;
  1787. X    char        *sep;
  1788. X{
  1789. X    char        *cp;
  1790. X    int        more;
  1791. X
  1792. X    wl_zero(slp);
  1793. X    cp = s->str_text;
  1794. X    more = 0;
  1795. X    while (*cp || more)
  1796. X    {
  1797. X        string_ty    *w;
  1798. X        char        *cp1;
  1799. X        char        *cp2;
  1800. X
  1801. X        while (isspace(*cp))
  1802. X            cp++;
  1803. X        if (!*cp && !more)
  1804. X            break;
  1805. X        more = 0;
  1806. X        cp1 = cp;
  1807. X        if (sep)
  1808. X        {
  1809. X            while (*cp && !strchr(sep, *cp))
  1810. X                cp++;
  1811. X            if (*cp)
  1812. X            {
  1813. X                cp2 = cp + 1;
  1814. X                more = 1;
  1815. X            }
  1816. X            else
  1817. X                cp2 = cp;
  1818. X            while (cp > cp1 && isspace(cp[-1]))
  1819. X                cp--;
  1820. X        }
  1821. X        else
  1822. X        {
  1823. X            while (*cp && !isspace(*cp))
  1824. X                cp++;
  1825. X            if (*cp)
  1826. X                cp2 = cp + 1;
  1827. X            else
  1828. X                cp2 = cp;
  1829. X        }
  1830. X        w = str_n_from_c(cp1, cp - cp1);
  1831. X        wl_append(slp, w);
  1832. X        str_free(w);
  1833. X        cp = cp2;
  1834. X    }
  1835. X}
  1836. X
  1837. X
  1838. X/*
  1839. X * NAME
  1840. X *    wl_insert - a insert a word into a list
  1841. X *
  1842. X * SYNOPSIS
  1843. X *    void wl_insert(wlist *wlp, string_ty *wp);
  1844. X *
  1845. X * DESCRIPTION
  1846. X *    Wl_insert is similar to wl_append, however it does not
  1847. X *    append the word unless it is not already in the list.
  1848. X *
  1849. X * CAVEAT
  1850. X *    If the word is inserted it is copied.
  1851. X */
  1852. X
  1853. Xvoid
  1854. Xwl_append_unique(wlp, wp)
  1855. X    wlist        *wlp;
  1856. X    string_ty    *wp;
  1857. X{
  1858. X    int        j;
  1859. X
  1860. X    for (j = 0; j < wlp->wl_nwords; j++)
  1861. X        if (str_equal(wlp->wl_word[j], wp))
  1862. X            return;
  1863. X    wl_append(wlp, wp);
  1864. X}
  1865. X
  1866. X
  1867. X/*
  1868. X * NAME
  1869. X *    wl_delete - remove list member
  1870. X *
  1871. X * SYNOPSIS
  1872. X *    void wl_delete(wlist *wlp, string_ty *wp);
  1873. X *
  1874. X * DESCRIPTION
  1875. X *    The wl_delete function is used to delete a member of a word list.
  1876. X *
  1877. X * RETURNS
  1878. X *    void
  1879. X */
  1880. X
  1881. Xvoid
  1882. Xwl_delete(wlp, wp)
  1883. X    wlist        *wlp;
  1884. X    string_ty    *wp;
  1885. X{
  1886. X    int        j;
  1887. X    int        k;
  1888. X
  1889. X    for (j = 0; j < wlp->wl_nwords; ++j)
  1890. X    {
  1891. X        if (str_equal(wlp->wl_word[j], wp))
  1892. X        {
  1893. X            wlp->wl_nwords--;
  1894. X            for (k = j; k < wlp->wl_nwords; ++k)
  1895. X                wlp->wl_word[k] = wlp->wl_word[k + 1];
  1896. X            str_free(wp);
  1897. X            break;
  1898. X        }
  1899. X    }
  1900. X}
  1901. X
  1902. Xvoid
  1903. Xwl_zero(wlp)
  1904. X    wlist        *wlp;
  1905. X{
  1906. X    wlp->wl_nwords = 0;
  1907. X    wlp->wl_word = 0;
  1908. X}
  1909. END_OF_FILE
  1910. if test 6331 -ne `wc -c <'common/word.c'`; then
  1911.     echo shar: \"'common/word.c'\" unpacked with wrong size!
  1912. fi
  1913. # end of 'common/word.c'
  1914. fi
  1915. if test -f 'doc/c2.2.so' -a "${1}" != "-c" ; then 
  1916.   echo shar: Will not clobber existing file \"'doc/c2.2.so'\"
  1917. else
  1918. echo shar: Extracting \"'doc/c2.2.so'\" \(5756 characters\)
  1919. sed "s/^X//" >'doc/c2.2.so' <<'END_OF_FILE'
  1920. X.\"
  1921. X.\"    aegis - project change supervisor
  1922. X.\"    Copyright (C) 1991, 1992, 1993 Peter Miller.
  1923. X.\"    All rights reserved.
  1924. X.\"
  1925. X.\"    This program is free software; you can redistribute it and/or modify
  1926. X.\"    it under the terms of the GNU General Public License as published by
  1927. X.\"    the Free Software Foundation; either version 2 of the License, or
  1928. X.\"    (at your option) any later version.
  1929. X.\"
  1930. X.\"    This program is distributed in the hope that it will be useful,
  1931. X.\"    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1932. X.\"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1933. X.\"    GNU General Public License for more details.
  1934. X.\"
  1935. X.\"    You should have received a copy of the GNU General Public License
  1936. X.\"    along with this program; if not, write to the Free Software
  1937. X.\"    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1938. X.\"
  1939. X.\" MANIFEST: User Guide, The Change Development Cycle, The Reviewer
  1940. X.\"
  1941. X.bp
  1942. X.nh 2 "The Reviewer"
  1943. X.LP
  1944. XThe role of a reviewer is to check another user's work.
  1945. XYou are helped in this by aegis,
  1946. Xbecause changes can never reach the
  1947. X.I "being reviewed"
  1948. Xstate without several preconditions:
  1949. X.LP
  1950. X\(bu The change is know to build.
  1951. XYou know that it compiled successfully,
  1952. Xso there is no need to search for syntax errors.
  1953. X.LP
  1954. X\(bu The change has tests,
  1955. Xand those tests have been run,
  1956. Xand have passed.
  1957. X.LP
  1958. XThis information allows you to concentrate on implementation issues,
  1959. Xcompleteness issues,
  1960. Xand local standards issues.
  1961. X.LP
  1962. XTo help the reviewer,
  1963. Xa set of "command D" files is available
  1964. Xin the change development directory.
  1965. XEvery files which is to be added to the baseline, 
  1966. Xremoved from the baseline,
  1967. Xor changed in some way,
  1968. Xhas a corresponding "comma D" file.
  1969. X.nh 3 "The First Change"
  1970. X.LP
  1971. XRobyn finds out what changes are available for review
  1972. Xby asking aegis:
  1973. X.E(
  1974. Xrobyn% \f(CBaerpass -l -p example\fP
  1975. X
  1976. XProject "example"
  1977. XList of Changes
  1978. X
  1979. XChange  State           Description
  1980. X------- -------         -------------
  1981. X   1    being_reviewed  Place under aegis
  1982. Xrobyn%
  1983. X.E)
  1984. XAny of the above changes could be reviewed,
  1985. XRobyn chooses the first.
  1986. X.E(
  1987. Xrobyn% \f(CBaecd -p example -c 1\fP
  1988. Xaegis: project "example": change 1: /u/pat/example.001
  1989. Xrobyn% \f(CBaedmore\fP
  1990. X\fI\&.\&.\&.examines each file.\&.\&.\fP
  1991. Xrobyn%
  1992. X.E)
  1993. XThe
  1994. X.I aedmore
  1995. Xcommand walks the development directory tree to find all of
  1996. Xthe "comma D" files, and displays them using
  1997. X.IR more (1)
  1998. XThere is a corresponding
  1999. X.I aedless
  2000. Xfor those who prefer the
  2001. X.IR less (1)
  2002. Xcommand.
  2003. X.LP
  2004. XOnce the change has been reviewed and found acceptable,
  2005. Xit is passed:
  2006. X.E(
  2007. Xrobyn% \f(CBaerpass example 1\fP
  2008. Xaegis: sh /usr/local/lib/aegis/rp.sh example 1 pat robyn
  2009. Xaegis: project "example": change 1: passed review
  2010. Xrobyn%
  2011. X.E)
  2012. XSome time soon Isa will notice the email
  2013. Xnotification and commence integration of the change.
  2014. X.nh 3 "The Second Change"
  2015. X.LP
  2016. XMost reviews have the same pattern as the first.
  2017. X.E(
  2018. Xrobyn% \f(CBaerpass -l -p example\fP
  2019. X
  2020. XProject "example"
  2021. XList of Changes
  2022. X
  2023. XChange  State           Description
  2024. X------- -------         -------------
  2025. X   2    being_reviewed  file names on command line
  2026. Xrobyn%
  2027. X.E)
  2028. X.LP
  2029. XAlways change directory to the change's development directory,
  2030. Xotherwise you will not be able to review the files.
  2031. X.E(
  2032. Xrobyn% \f(CBaecd -p example -c 2\fP
  2033. Xaegis: project "example": change 2: /u/jan/example.002
  2034. Xrobyn%
  2035. X.E)
  2036. X.LP
  2037. XAnother useful way of finding out about a change
  2038. Xis the "list change details" command, viz:
  2039. X.E(
  2040. Xrobyn% \f(CBael cd -p example -c 2\fP
  2041. XProject "example", Change 2
  2042. XChange Details
  2043. X.E)
  2044. X.E(
  2045. XNAME
  2046. X        Project "example", Change 2.
  2047. X.E)
  2048. X.E(
  2049. XSUMMARY
  2050. X        file names on command line
  2051. X.E)
  2052. X.E(
  2053. XDESCRIPTION
  2054. X        Optional input and output files may be specified on
  2055. X        the command line.
  2056. X.E)
  2057. X.E(
  2058. XCAUSE
  2059. X        This change was caused by internal_bug.
  2060. X.E)
  2061. X.E(
  2062. XSTATE
  2063. X        This change is in 'being_integrated' state.
  2064. X.E)
  2065. X.E(
  2066. XFILES
  2067. X        Type    Action  Edit    File Name
  2068. X        ------- ------- ------- -----------
  2069. X        source  modify  1.1     main.c
  2070. X        test    create          test/00/t0002a.sh
  2071. X.E)
  2072. X.E(
  2073. XHISTORY
  2074. X        What            When            Who     Comment
  2075. X        ------          ------          -----   ---------
  2076. X        new_change      Fri Dec 11      alex
  2077. X                        14:55:06 1992
  2078. X        develop_begin   Mon Dec 14      jan
  2079. X                        09:07:08 1992
  2080. X        develop_end     Mon Dec 14      jan
  2081. X                        11:43:23 1992
  2082. Xrobyn%
  2083. X.E)
  2084. X.LP
  2085. XOnce Robyn knows what the change is meant to be doing,
  2086. Xthe files are then examined:
  2087. X.E(
  2088. Xrobyn% \f(CBaedmore\fP
  2089. X\fI\&.\&.\&.examines each file.\&.\&.\fP
  2090. Xrobyn%
  2091. X.E)
  2092. X.LP
  2093. XOnce the change is found to be acceptable,
  2094. Xit is passed:
  2095. X.E(
  2096. Xrobyn% \f(CBaerpass example 2\fP
  2097. Xaegis: sh /usr/local/lib/aegis/rp.sh example 2 jan robyn
  2098. Xaegis: project "example": change 2: passed review
  2099. Xrobyn%
  2100. X.E)
  2101. X.LP
  2102. XSome time soon Isa will notice the email
  2103. Xnotification and commence integration of the change.
  2104. X.LP
  2105. XThe reviews of the third and fourth changes will
  2106. Xnot be given here,
  2107. Xbecause they are almost identical to the other changes.
  2108. XIf you want to know how to fail a review,
  2109. Xsee the
  2110. X.IR aerfail (1)
  2111. Xmanual entry.
  2112. X.nh 3 "Reviewer Command Summary"
  2113. X.LP
  2114. XOnly a few of the aegis commands available to reviewers have
  2115. Xbeen used in this example.
  2116. XThe following table (very tersely) describes the aegis commands
  2117. Xmost useful to reviewers.
  2118. X.sp
  2119. X.TS
  2120. Xcenter,tab(;);
  2121. Xl l.
  2122. XCommand;Description
  2123. X_
  2124. Xaecd;Change Directory
  2125. Xaerpass;Review Pass
  2126. Xaerpu;Review Pass Undo
  2127. Xaerfail;Review Fail
  2128. Xael;List Stuff
  2129. X.TE
  2130. X.LP
  2131. XYou will want to read the manual entries for all of these commands.
  2132. XNote that all aegis commands have a
  2133. X.I \-Help
  2134. Xoption,
  2135. Xwhich will give a result very similar to the
  2136. Xcorresponding
  2137. X.I man (1)
  2138. Xoutput.
  2139. XMost aegis commands also have a
  2140. X.I \-List
  2141. Xoption,
  2142. Xwhich usually lists interesting context sensitive information.
  2143. END_OF_FILE
  2144. if test 5756 -ne `wc -c <'doc/c2.2.so'`; then
  2145.     echo shar: \"'doc/c2.2.so'\" unpacked with wrong size!
  2146. fi
  2147. # end of 'doc/c2.2.so'
  2148. fi
  2149. if test -f 'doc/c2.3.so' -a "${1}" != "-c" ; then 
  2150.   echo shar: Will not clobber existing file \"'doc/c2.3.so'\"
  2151. else
  2152. echo shar: Extracting \"'doc/c2.3.so'\" \(6349 characters\)
  2153. sed "s/^X//" >'doc/c2.3.so' <<'END_OF_FILE'
  2154. X.\"
  2155. X.\"    aegis - project change supervisor
  2156. X.\"    Copyright (C) 1991, 1992, 1993 Peter Miller.
  2157. X.\"    All rights reserved.
  2158. X.\"
  2159. X.\"    This program is free software; you can redistribute it and/or modify
  2160. X.\"    it under the terms of the GNU General Public License as published by
  2161. X.\"    the Free Software Foundation; either version 2 of the License, or
  2162. X.\"    (at your option) any later version.
  2163. X.\"
  2164. X.\"    This program is distributed in the hope that it will be useful,
  2165. X.\"    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2166. X.\"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2167. X.\"    GNU General Public License for more details.
  2168. X.\"
  2169. X.\"    You should have received a copy of the GNU General Public License
  2170. X.\"    along with this program; if not, write to the Free Software
  2171. X.\"    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2172. X.\"
  2173. X.\" MANIFEST: User Guide, The Change Development Cycle, The Integrator
  2174. X.\"
  2175. X.bp
  2176. X.nh 2 "The Integrator"
  2177. X.LP
  2178. XThis section shows what the integrator must do for each of the
  2179. Xchanges shown to date.
  2180. XThe integrator does not have the ability to alter anything in the change;
  2181. Xif a change being integrated is defective,
  2182. Xit is simply failed back to the developer.
  2183. XThis documented example has no such failures,
  2184. Xin order to keep it manageably small.
  2185. X.nh 3 "The First Change"
  2186. X.LP
  2187. XThe first change of a project is often the trickiest,
  2188. Xand the integrator is the last to know.
  2189. XThis example goes smoothly,
  2190. Xand you may want to consider using the example project
  2191. Xas a template.
  2192. X.LP
  2193. XThe integrator for this example project is Isa.
  2194. XIsa knows there is a change ready for integration
  2195. Xfrom the notification which arrived by email.
  2196. X.E(
  2197. Xisa% \f(CBaeib -l -p example\fP
  2198. X
  2199. XProject "example"
  2200. XList of Changes
  2201. X
  2202. XChange  State           Description
  2203. X------- -------         -------------
  2204. X   1    awaiting_       Place under aegis
  2205. X        integration
  2206. Xisa% \f(CBaeib example 1\fP
  2207. Xaegis: project "example": change 1: link baseline to integration
  2208. X        directory
  2209. Xaegis: project "example": change 1: apply change to integration
  2210. X        directory
  2211. Xaegis: project "example": change 1: integration has begun
  2212. Xisa%
  2213. X.E)
  2214. X.LP
  2215. XThe integrator must rebuild and retest each change.
  2216. XThis ensures that it was no quirk of the developer's
  2217. Xenvironment which resulted in the success at the development stage.
  2218. X.E(
  2219. Xisa% \f(CBaeb\fP
  2220. Xaegis: logging to "/projects/example/delta.001/aegis.log"
  2221. Xaegis: project "example": change 1: integration build started
  2222. Xaegis: cook -b Howto.cook project=example change=1
  2223. X        version=1.0.D001 -nl
  2224. Xcook: yacc -d gram.y
  2225. Xcook: mv y.tab.c gram.c
  2226. Xcook: mv y.tab.h gram.h
  2227. Xcook: cc -I. -O -c gram.c
  2228. Xcook: lex lex.l
  2229. Xcook: mv lex.yy.c lex.c
  2230. Xcook: cc -I. -O -c lex.c
  2231. Xcook: cc -I. -O -c main.c
  2232. Xcook: cc -o example gram.o lex.o main.o -ll -ly
  2233. Xaegis: project "example": change 1: integration build complete
  2234. Xisa%
  2235. X.E)
  2236. X.LP
  2237. XNotice how the above build differed from the builds that were done
  2238. Xwhile in the
  2239. X.I "being developed"
  2240. Xstate;
  2241. Xthe extra baseline include is gone.
  2242. XThis is because the integration directory will shortly be the new baseline,
  2243. Xand must be entirely internally consistent and self-sufficient.
  2244. X.LP
  2245. XYou are probably wondering why this isn't all rolled into the
  2246. Xone aegis command.
  2247. XIt is not because there may be some manual process to be
  2248. Xperformed after the build and before the test.
  2249. XThis may be making a command set-uid-root (as in the case of aegis)
  2250. Xor it may require some tinkering with the local oracle or ingress database.
  2251. XInstructions for the integrator may be placed in the
  2252. Xdescription field of the change attributes.
  2253. X.LP
  2254. XThe change is now re-tested:
  2255. X.E(
  2256. Xisa% \f(CBaet\fP
  2257. Xaegis: logging to "/projects/example/delta.001/aegis.log"
  2258. Xaegis: sh /project/example/delta.001/test/00/t0001a.sh
  2259. Xaegis: project "example": change 1: test "test/00/t0001a.sh"
  2260. X        passed
  2261. Xaegis: project "example": change 1: passed 1 test
  2262. Xisa%
  2263. X.E)
  2264. XThe change builds and tests.
  2265. XOnce Isa is happy with the change,
  2266. Xperhaps after browsing the files,
  2267. XIsa then passes the integration,
  2268. Xcausing the history files to be updated
  2269. Xand the integration directory becomes the baseline.
  2270. X.E(
  2271. Xisa% \f(CBaeipass\fP
  2272. Xaegis: logging to "/projects/example/delta.001/aegis.log"
  2273. Xaegis: ci -u -m/dev/null -t/dev/null /projects/example/delta.001/
  2274. X        Howto.cook /projects/example/history/Howto.cook,v;
  2275. X        rcs -U /projects/example/history/Howto.cook,v
  2276. X/projects/example/history/Howto.cook,v  <--
  2277. X        /projects/example/delta.001/Howto.cook
  2278. Xinitial revision: 1.1
  2279. Xdone
  2280. XRCS file: /projects/example/history/Howto.cook,v
  2281. Xdone
  2282. Xaegis: rlog -r /projects/example/history/Howto.cook,v | awk
  2283. X        '/^head:/ {print $2}' > /tmp/aegis.15309
  2284. X\fI\&...lots of similar RCS output...\fP
  2285. Xaegis: sh /usr/local/lib/aegis/ip.sh example 1 pat robyn isa
  2286. Xaegis: project "example": change 1: integrate pass
  2287. Xisa%
  2288. X.E)
  2289. X.LP
  2290. XAll of the staff involved,
  2291. Xwill receive email to say that the change has been integrated.
  2292. XThis notification is a shell script,
  2293. Xso USENET could be usefully used instead.
  2294. X.nh 3 "The Other Changes"
  2295. X.LP
  2296. XThere is no difference to integrating any of the later changes.
  2297. XThe integration process is very simple,
  2298. Xas it is a cut-down version of what the developer does,
  2299. Xwithout all the complexity.
  2300. X.LP
  2301. XYour project may elect to have the integrator also monitor
  2302. Xthe quality of the reviews.
  2303. XAn answer to "who will watch the watchers" if you like.
  2304. X.LP
  2305. XIt is also a good idea to rotate people out of the integrator
  2306. Xposition after a few weeks in a busy project,
  2307. Xthis is a very stressful position.
  2308. XThe position of integrator gives a unique perspective to software quality,
  2309. Xbut the person also needs to be able to say "NO!" when a cruddy
  2310. Xchange comes along.
  2311. X.bp
  2312. X.nh 3 "Integrator Command Summary"
  2313. X.LP
  2314. XOnly a few of the aegis commands available to integrators have
  2315. Xbeen used in this example.
  2316. XThe following table (very tersely) describes the aegis commands
  2317. Xmost useful to integrators.
  2318. X.sp
  2319. X.TS
  2320. Xcenter,tab(;);
  2321. Xl l.
  2322. XCommand;Description
  2323. X_
  2324. Xaeb;Build
  2325. Xaecd;Change Directory
  2326. Xaeib;Integrate Begin
  2327. Xaeibu;Integrate Begin Undo
  2328. Xaeifail;Integrate Fail
  2329. Xael;List Stuff
  2330. Xaet;Test
  2331. Xaeupass;Integrate Pass
  2332. X.TE
  2333. X.LP
  2334. XYou will want to read the manual entries for all of these commands.
  2335. XNote that all aegis commands have a
  2336. X.I \-Help
  2337. Xoption,
  2338. Xwhich will give a result very similar to the
  2339. Xcorresponding
  2340. X.I man (1)
  2341. Xoutput.
  2342. XMost aegis commands also have a
  2343. X.I \-List
  2344. Xoption,
  2345. Xwhich usually lists interesting context sensitive information.
  2346. END_OF_FILE
  2347. if test 6349 -ne `wc -c <'doc/c2.3.so'`; then
  2348.     echo shar: \"'doc/c2.3.so'\" unpacked with wrong size!
  2349. fi
  2350. # end of 'doc/c2.3.so'
  2351. fi
  2352. if test -f 'doc/c4.1.so' -a "${1}" != "-c" ; then 
  2353.   echo shar: Will not clobber existing file \"'doc/c4.1.so'\"
  2354. else
  2355. echo shar: Extracting \"'doc/c4.1.so'\" \(5556 characters\)
  2356. sed "s/^X//" >'doc/c4.1.so' <<'END_OF_FILE'
  2357. X.\"
  2358. X.\"    aegis - project change supervisor
  2359. X.\"    Copyright (C) 1993 Peter Miller.
  2360. X.\"    All rights reserved.
  2361. X.\"
  2362. X.\"    This program is free software; you can redistribute it and/or modify
  2363. X.\"    it under the terms of the GNU General Public License as published by
  2364. X.\"    the Free Software Foundation; either version 2 of the License, or
  2365. X.\"    (at your option) any later version.
  2366. X.\"
  2367. X.\"    This program is distributed in the hope that it will be useful,
  2368. X.\"    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2369. X.\"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2370. X.\"    GNU General Public License for more details.
  2371. X.\"
  2372. X.\"    You should have received a copy of the GNU General Public License
  2373. X.\"    along with this program; if not, write to the Free Software
  2374. X.\"    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2375. X.\"
  2376. X.\" MANIFEST: User Guide, The Dependency Maintenance Tool, Requirements
  2377. X.nh 2 "Required Features"
  2378. X.LP
  2379. XWhen selecting a Dependency Maintenance Tool
  2380. Xit is important to keep in mind that it must be able to
  2381. Xcope with a hierarchy of parallel source directory trees.
  2382. X.LP
  2383. XThe heart of any DMT is an \fIinference engine\fP.
  2384. XThis inference engine accepts a \fIgoal\fP of what you want it to construct
  2385. Xand a set of \fIrules\fP for how to construct things,
  2386. Xand attempts to construct what you asked for given the rules you specified.
  2387. XThis is exactly a description of an expert system,
  2388. Xand the DMT needs to be an expert system for constructing files.
  2389. X.LP
  2390. XThis perspective on what the aegis program needs from a DMT
  2391. Xreveals that the old-faithful \fImake\fP(1) distributed
  2392. Xwith so many flavours of 
  2393. X.UX
  2394. Xsimply isn't good enough,
  2395. Xand that something like PROLOG is probably ideal.
  2396. X.nh 3 "Search Lists"
  2397. X.LP
  2398. XFor the union of all files in a project and all files in a change
  2399. X(remembering that a change only copies those files it is modifying,
  2400. Xplus it may add or remove files)
  2401. Xfor all files you must be able to say to the dependency maintenance
  2402. Xtool,
  2403. X.QP
  2404. X"If and only if the file is up-to-date in the baseline,
  2405. Xuse the baseline copy of the file,
  2406. Xotherwise construct the file in the development directory".
  2407. X.LP
  2408. XThe presence of a source file in the change makes the copy
  2409. Xin the baseline out-of-date.
  2410. X.LP
  2411. XMost DMTs with this capability implement it by using
  2412. Xsome sort of search path,
  2413. Xallowing a hierarchy of directories to be scanned with little or
  2414. Xno modification to the rules.
  2415. X.nh 3 "Dynamic Include File Dependencies"
  2416. X.LP
  2417. XInclude file dependencies are very important,
  2418. Xbecause a change may alter an include file,
  2419. Xand all of the sources in the baseline which use that include file
  2420. Xmust be recompiled.
  2421. X.LP
  2422. XConsider the example given earlier:
  2423. Xthe include file describing the interface definition of a function is
  2424. Xcopied into a change and edited,
  2425. Xand so is the source file defining the function.
  2426. XIt is essential that all source files in the baseline which
  2427. Xinclude that file re recompiled,
  2428. Xwhich will usually result in suitable diagnostic errors if any of the
  2429. Xclients of the altered function have yet to be included in the change.
  2430. X.LP
  2431. XThere are two ways of handling include file dependencies:
  2432. X.LP
  2433. X\(bu They can be kept in a file,
  2434. Xand the file can be maintained but suitable programs
  2435. X(maintaining it manually never works, that's just human nature).
  2436. X.LP
  2437. X\(bu They can be determined by the DMT when it is scanning the rules
  2438. Xto determine what needs updating.
  2439. X.nh 4 "Static File"
  2440. X.LP
  2441. XKeeping include dependencies in a file has a number of advantages:
  2442. X.LP
  2443. X\(bu Most existing DMTs have the ability to include another rules file,
  2444. Xso that when performing a development build
  2445. Xfrom a baseline rules file,
  2446. Xit could include a
  2447. Xdependencies file in the development directory.
  2448. X.LP
  2449. X\(bu Reading a file is much faster than scanning all of the source files.
  2450. X.LP
  2451. XKeeping include dependencies in a file has a number of disadvantages:
  2452. X.LP
  2453. X\(bu The file is independent of the DMT,
  2454. Xit is either generated before the DMT is invoked,
  2455. Xin which case it may do more work than is necessary,
  2456. Xor it may be invoked after the DMT (or after the DMT has scanned its rules),
  2457. Xin which case it may well be out-of-date when the DMT needs it.
  2458. X.LP
  2459. XFor example,
  2460. Xthe use of
  2461. X.I "gcc -M"
  2462. Xproduces "dot d" files,
  2463. Xwhich may be merged to 
  2464. Xconstruct such an includable dependency file.
  2465. XThis happens after the DMT has read and applied the rules,
  2466. Xbut possibly before the DMT has finished executing.
  2467. X.LP
  2468. X\(bu Many tools which can generate this information,
  2469. Xsuch as the
  2470. X.I "gcc -M"
  2471. Xoption,
  2472. Xare triggered by source files,
  2473. Xand are unable to manage a case where it is an include file which is changing,
  2474. Xto include a different set of other include files.
  2475. XIn this case,
  2476. Xthe inaccurate dependencies file may contain references to 
  2477. Xthe old set of nested include files,
  2478. Xsome of which may no longer exist,
  2479. XThis causes
  2480. Xthe DMT to incorrectly generate an error stating that the
  2481. Xold include file is missing,
  2482. Xwhen it is actually no longer required.
  2483. X.LP
  2484. XIf a DMT can only support this kind of include file dependencies,
  2485. Xit is not suitable for use with aegis.
  2486. X.nh 4 "Dynamic"
  2487. X.LP
  2488. XIn order for a DMT to be suitable for use with aegis,
  2489. Xit is essential that rules for the DMT may be specified in such a way that
  2490. Xinclude file dependencies are determined "on the fly"
  2491. Xwhen the DMT is determining if a given rule is applicable,
  2492. Xand before the rule is applied.
  2493. X.LP
  2494. XThis method suffers from the problem being rather slow;
  2495. Xbut this is amenable to some caching and the losses of performance
  2496. Xare not as bad as could be imagined.
  2497. X.LP
  2498. XThis method has the advantage of correctness in all cases,
  2499. Xwhere a static file may at times be out-of-date.
  2500. END_OF_FILE
  2501. if test 5556 -ne `wc -c <'doc/c4.1.so'`; then
  2502.     echo shar: \"'doc/c4.1.so'\" unpacked with wrong size!
  2503. fi
  2504. # end of 'doc/c4.1.so'
  2505. fi
  2506. if test -f 'doc/c7.4.so' -a "${1}" != "-c" ; then 
  2507.   echo shar: Will not clobber existing file \"'doc/c7.4.so'\"
  2508. else
  2509. echo shar: Extracting \"'doc/c7.4.so'\" \(5680 characters\)
  2510. sed "s/^X//" >'doc/c7.4.so' <<'END_OF_FILE'
  2511. X.\"
  2512. X.\"    aegis - project change supervisor
  2513. X.\"    Copyright (C) 1992, 1993 Peter Miller.
  2514. X.\"    All rights reserved.
  2515. X.\"
  2516. X.\"    This program is free software; you can redistribute it and/or modify
  2517. X.\"    it under the terms of the GNU General Public License as published by
  2518. X.\"    the Free Software Foundation; either version 2 of the License, or
  2519. X.\"    (at your option) any later version.
  2520. X.\"
  2521. X.\"    This program is distributed in the hope that it will be useful,
  2522. X.\"    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2523. X.\"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2524. X.\"    GNU General Public License for more details.
  2525. X.\"
  2526. X.\"    You should have received a copy of the GNU General Public License
  2527. X.\"    along with this program; if not, write to the Free Software
  2528. X.\"    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2529. X.\"
  2530. X.\" MANIFEST: User Guide, How Aegis Works, Further Work
  2531. X.\"
  2532. X.bp
  2533. X.nh 2 "Further Work"
  2534. X.LP
  2535. XThe aegis program is far from finished.
  2536. XA number of features are known to lacking,
  2537. Xand several interesting (but as yet unformed) ideas are lurking.
  2538. X.nh 3 "Heterogeneous Environments"
  2539. X.LP
  2540. XThere is no support at the current time for
  2541. Xtracking aspects of development in an heterogeneous environment.
  2542. XThis is in the list of tasks,
  2543. Xbut has a low priority,
  2544. Xfirst all the other stuff has to work!
  2545. XIn time,
  2546. Xattributes will be added to projects to indicate a set of environments,
  2547. Xand each change will have to be built and tested in each.
  2548. X.LP
  2549. XThe configuration file the user supplies to the dependency maintenance tool
  2550. Xwill be responsible for figuring out which environment it
  2551. Xis in and building accordingly.
  2552. XIt is an operating system requirement
  2553. Xthat the baseline and development directories
  2554. Xare accessible in each environment (facilities such as RFS or NFS are assumed).
  2555. XNote that the baseline will expect to be self-consistent in all
  2556. Xof the environments simultaneously.
  2557. X.LP
  2558. XThere is no intention of ever providing the facility
  2559. Xwhere a given file may have different versions depending on
  2560. Xthe environment,
  2561. Xbut all have the same name\**.
  2562. X.FS
  2563. XSome other SCM tools provide a repository with this ability.
  2564. X.FE
  2565. X.nh 3 "Hierarchy of Projects"
  2566. X.LP
  2567. XIt would be nice if there was some way to use 
  2568. Xone projects as a sort of "super change" to a "super project",
  2569. Xso that large teams (say 1000 people)
  2570. Xcould work as lots of small teams (say 100 people).
  2571. XAs a small team gets their chunk ready,
  2572. Xusing the facilities provided to-date by aegis,
  2573. Xthe small team's baseline is treated as a change to be made to the
  2574. Xlarge team baseline.
  2575. X.LP
  2576. XThis idea can be extended quite naturally to any depth of layering.
  2577. X.LP
  2578. XThe desired semantics,
  2579. Xlet alone the implementation details,
  2580. Xcan not begin without  more experience to show (and fix) the warts
  2581. Xon the existing functionality.
  2582. X.nh 3 "Code Coverage Tool"
  2583. X.LP
  2584. XIt would be very helpful if a code coverage tool could be used
  2585. Xto analyze tests included with changes to ensure that the tests
  2586. Xactually exercised the lines of code changed in the change.
  2587. X.LP
  2588. XAnother use of the code coverage tool would be to select regression tests
  2589. Xbased on the object files recompiled by a change,
  2590. Xand those regression tests which exercise those files.
  2591. X.LP
  2592. XWhile there is freeware C code coverage tool available,
  2593. Xbased on GNU C,
  2594. Xthe interfacing and semantics still need more thought.
  2595. X.nh 3 "Branching"
  2596. X.LP
  2597. XThe aegis program does not provide support for branching
  2598. Xin the history files.
  2599. XThe semantics of the baseline,
  2600. Xthe source files and their closure,
  2601. Xwould appear to imply that a baseline is required for every leaf
  2602. Xin the history tree.
  2603. X.LP
  2604. XBranching is provided in this way with the
  2605. X.I "new release"
  2606. Xfunctionality.
  2607. XAn entire new project is derived from an existing project,
  2608. Xincluding another baseline.
  2609. XThe history,
  2610. Xhowever,
  2611. Xis severed from the original project,
  2612. Xprecluding automatic merging by aegis at a later date.
  2613. XIt also precludes having a single change to be applied
  2614. Xto more than one branch.
  2615. X.LP
  2616. XShould better semantics become available,
  2617. Xor a better algorithmic approach,
  2618. Xthis is certainly one area of aegis which could be improved.
  2619. X.nh 3 "Virtual File System"
  2620. X.LP
  2621. XThere is almost sufficient information in the aegis data base to create a virtual file system,
  2622. Xoverlaying the development directory atop the baseline\**.
  2623. X.FS
  2624. XReminiscent of Sun's TFS,
  2625. Xbut not the same.
  2626. X.FE
  2627. XThis could be implemented similarly to automounters,
  2628. Xintercepting file system operations by pretending to be an NFS server.
  2629. XMany commercial CASE products provide such a facility.
  2630. X.LP
  2631. XSuch a virtual file system has a number of advantages:
  2632. Xyou don't need such a capable DMT, for starters;
  2633. Xit only needs the dynamic include dependencies,
  2634. Xand does not need a search path\**.
  2635. X.FS
  2636. XDiscussed in the
  2637. X.I "Dependency Maintenance Tool"
  2638. Xchapter.
  2639. X.FE
  2640. XSecond,
  2641. Xmany horrible and dumb compilers,
  2642. Xnotably FORTRAN and "fourth" GLs,
  2643. Xdon't have adequate include semantics;
  2644. Xoverlaying the two directories make this much easier to deal with\**.
  2645. X.FS
  2646. XThere are other ways,
  2647. Xdiscussed in the
  2648. X.I "Tips and Traps"
  2649. Xchapter.
  2650. X.FE
  2651. XMany graphical tools,
  2652. Xsuch as bubble chart drawers, etc,
  2653. Xwhen they do actually have include files,
  2654. Xhave no command line specifiable search path.
  2655. X.LP
  2656. XThe disadvantage is that this adds significant complexity
  2657. Xto an already large program.
  2658. XAlso,
  2659. Ximplementation is limited to NFS capable systems,
  2660. Xor would have to be rewritten for a variety of other systems.
  2661. XThe semantics of interactions between the daemon and other aegis
  2662. Xcommands, while clearly specifiable, are challenging to implement.
  2663. XPerformance could also be a significant factor.
  2664. X.LP
  2665. XThe question is "is it really necessary?"
  2666. XIf the job can be done without it,
  2667. Xdoes the effort of writing such a beast result
  2668. Xin significant productivity gains?
  2669. END_OF_FILE
  2670. if test 5680 -ne `wc -c <'doc/c7.4.so'`; then
  2671.     echo shar: \"'doc/c7.4.so'\" unpacked with wrong size!
  2672. fi
  2673. # end of 'doc/c7.4.so'
  2674. fi
  2675. if test -f 'doc/cB.0.so' -a "${1}" != "-c" ; then 
  2676.   echo shar: Will not clobber existing file \"'doc/cB.0.so'\"
  2677. else
  2678. echo shar: Extracting \"'doc/cB.0.so'\" \(5480 characters\)
  2679. sed "s/^X//" >'doc/cB.0.so' <<'END_OF_FILE'
  2680. X.\"
  2681. X.\"    aegis - project change supervisor
  2682. X.\"    Copyright (C) 1992, 1993 Peter Miller.
  2683. X.\"    All rights reserved.
  2684. X.\"
  2685. X.\"    This program is free software; you can redistribute it and/or modify
  2686. X.\"    it under the terms of the GNU General Public License as published by
  2687. X.\"    the Free Software Foundation; either version 2 of the License, or
  2688. X.\"    (at your option) any later version.
  2689. X.\"
  2690. X.\"    This program is distributed in the hope that it will be useful,
  2691. X.\"    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2692. X.\"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2693. X.\"    GNU General Public License for more details.
  2694. X.\"
  2695. X.\"    You should have received a copy of the GNU General Public License
  2696. X.\"    along with this program; if not, write to the Free Software
  2697. X.\"    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2698. X.\"
  2699. X.\" MANIFEST: User Guide, Appendix B: Glossary
  2700. X.\"
  2701. X.bp
  2702. X.2C
  2703. X.nh 1 "Appendix B: Glossary"
  2704. X.LP
  2705. XThe following is an alphabetical list of terms used in this document.
  2706. X.IP "administrator"
  2707. X.br
  2708. XPerson responsible for administering a
  2709. X.I project .
  2710. X.IP "awaiting_development"
  2711. X.br
  2712. XThe state a change is in immediately after creation.
  2713. X.IP "awaiting_integration"
  2714. X.br
  2715. XThe state a change is in
  2716. Xafter it has passed review and before it is integrated.
  2717. X.IP "baseline"
  2718. X.br
  2719. XThe repository;
  2720. Xwhere the project master source is kept.
  2721. X.IP "being developed"
  2722. X.br
  2723. XThe state a change is in
  2724. Xwhen it is being worked on.
  2725. X.IP "being integrated"
  2726. X.br
  2727. XThe state a change is in
  2728. Xwhen it is being integrated with the baseline.
  2729. X.IP "being reviewed"
  2730. X.br
  2731. XThe state a change is in
  2732. Xafter it is developed.
  2733. X.IP "change"
  2734. X.br
  2735. XA collection of files to be applied as a single
  2736. Xatomic alteration of the baseline.
  2737. X.IP "change number"
  2738. X.br
  2739. XEach
  2740. X.I change
  2741. Xhas a unique number identifying it.
  2742. X.IP "completed"
  2743. X.br
  2744. XThe state a change is in
  2745. Xafter it has been integrated with the baseline.
  2746. X.IP "delta number"
  2747. X.br
  2748. XEach time the
  2749. X.I aeib (1)
  2750. Xcommand is used to start integrating a
  2751. X.I change
  2752. Xinto the
  2753. X.I baseline
  2754. Xa unique number is assigned.
  2755. XThis number is the delta number.
  2756. XThis allows ascending version numbers to be generated for the baseline,
  2757. Xindependent of change numbers, which are inevitably
  2758. Xintegrated in a different order to their creation.
  2759. X.IP "dependency maintenance tool"
  2760. X.br
  2761. XA program or programs external to aegis which may be given a set of rules
  2762. Xfor how to efficiently take a set of source files and
  2763. Xprocess them to produce the final product.
  2764. X.IP "DMT"
  2765. X.br
  2766. XAbbreviation of Dependency Maintenance Tool.
  2767. X.IP "develop_begin"
  2768. X.br
  2769. XThe command issued to take a change from the
  2770. X.I "awaiting development"
  2771. Xstate to the
  2772. X.I "being developed"
  2773. Xstate.
  2774. XThe change will be assigned to the user who executed the command.
  2775. X.IP "develop_begin_undo"
  2776. X.br
  2777. XThe command issued to take a change from the
  2778. X.I "being developed"
  2779. Xstate to the
  2780. X.I "awaiting development"
  2781. Xstate.
  2782. XThe change must have no files associated with it.
  2783. X.IP "develop_end"
  2784. X.br
  2785. XThe command issued to take a change from the
  2786. X.I "being developed"
  2787. Xstate to the
  2788. X.I "being reviewed"
  2789. Xstate.
  2790. XThe change must be known to build and test successfully.
  2791. X.IP "develop_end_undo"
  2792. X.br
  2793. XThe command issued to take a change from the
  2794. X.I "being reviewed"
  2795. Xstate back to the
  2796. X.I "being developed"
  2797. Xstate.
  2798. XThe command must be executed by the original developer.
  2799. X.IP "developer"
  2800. X.br
  2801. XA member of staff allowed to develop changes.
  2802. X.IP "development directory"
  2803. X.br
  2804. XEach change is given a unique development directory
  2805. Xin which to edit files and build and test.
  2806. X.IP "history tool"
  2807. X.br
  2808. XA program to save and restore previous versions of a file,
  2809. Xusually by storing edits between the versions for efficiency.
  2810. X.IP "integrate_pass"
  2811. X.br
  2812. XThe command used to take a change from the
  2813. X.I "being integrated"
  2814. Xstate to the
  2815. X.I "completed"
  2816. Xstate.
  2817. XThe change must be known to build and test successfully.
  2818. X.IP "integrate_begin"
  2819. X.br
  2820. XThe command used to take a change from the
  2821. X.I "awaiting integration"
  2822. Xstate to the
  2823. X.I "being integrated"
  2824. Xstate.
  2825. X.IP "integrate_begin_undo"
  2826. X.br
  2827. XThe command used to take a change from the
  2828. X.I "being integrated"
  2829. Xstate to the
  2830. X.I "awaiting integration"
  2831. Xstate.
  2832. X.IP "integrate_fail"
  2833. X.br
  2834. XThe command used to take a change from the
  2835. X.I "being integrated"
  2836. Xstate back to the
  2837. X.I "being developed"
  2838. Xstate.
  2839. X.IP "integration"
  2840. X.br
  2841. XThe process of merging the
  2842. X.I baseline
  2843. Xwith the
  2844. X.I "development directory"
  2845. Xto form a new baseline.
  2846. XThis includes building and testing the merged directory,
  2847. Xbefore replacing the original
  2848. X.I baseline
  2849. Xwith the new merged version.
  2850. X.IP "integration directory"
  2851. X.br
  2852. XThe directory used during
  2853. X.I integration
  2854. Xto merge the existing
  2855. X.I baseline
  2856. Xwith a change's
  2857. X.I "development directory" .
  2858. X.IP "integrator"
  2859. X.br
  2860. XA staff member who performs
  2861. X.I integration s.
  2862. X.IP "new_change"
  2863. X.br
  2864. XThe command used to create new changes.
  2865. X.IP "new_change_undo"
  2866. X.br
  2867. XThe command used to destroy changes.
  2868. X.IP "review_fail"
  2869. X.br
  2870. XThe command used to take a change from the
  2871. X.I "being reviewed"
  2872. Xstate back to the
  2873. X.I "being developed"
  2874. Xstate.
  2875. X.IP "review_pass"
  2876. X.br
  2877. XThe command used to take a change from the
  2878. X.I "being reviewed"
  2879. Xstate to the
  2880. X.I "awaiting integration"
  2881. Xstate.
  2882. X.IP "reviewer"
  2883. X.br
  2884. XA person who may review
  2885. X.I changes
  2886. Xand either pass or fail them (\fIreview_pass\fP
  2887. Xor \fIreview_fail\fP respectively).
  2888. X.IP "state"
  2889. X.br
  2890. XEach
  2891. X.I change
  2892. Xis in one of six states:
  2893. X.I "awaiting development" ,
  2894. X.I "being developed" ,
  2895. X.I "being reviewed" ,
  2896. X.I "awaiting integration" ,
  2897. X.I "being integrated"
  2898. Xor
  2899. X.I "completed" .
  2900. X.IP "state transition"
  2901. X.br
  2902. XThe event resulting in a
  2903. X.I change
  2904. Xchanging from one state to another.
  2905. X.1C
  2906. END_OF_FILE
  2907. if test 5480 -ne `wc -c <'doc/cB.0.so'`; then
  2908.     echo shar: \"'doc/cB.0.so'\" unpacked with wrong size!
  2909. fi
  2910. # end of 'doc/cB.0.so'
  2911. fi
  2912. if test -f 'doc/cC.0.so' -a "${1}" != "-c" ; then 
  2913.   echo shar: Will not clobber existing file \"'doc/cC.0.so'\"
  2914. else
  2915. echo shar: Extracting \"'doc/cC.0.so'\" \(5749 characters\)
  2916. sed "s/^X//" >'doc/cC.0.so' <<'END_OF_FILE'
  2917. X.\"
  2918. X.\"    aegis - project change supervisor
  2919. X.\"    Copyright (C) 1993 Peter Miller.
  2920. X.\"    All rights reserved.
  2921. X.\"
  2922. X.\"    This program is free software; you can redistribute it and/or modify
  2923. X.\"    it under the terms of the GNU General Public License as published by
  2924. X.\"    the Free Software Foundation; either version 2 of the License, or
  2925. X.\"    (at your option) any later version.
  2926. X.\"
  2927. X.\"    This program is distributed in the hope that it will be useful,
  2928. X.\"    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2929. X.\"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2930. X.\"    GNU General Public License for more details.
  2931. X.\"
  2932. X.\"    You should have received a copy of the GNU General Public License
  2933. X.\"    along with this program; if not, write to the Free Software
  2934. X.\"    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  2935. X.\"
  2936. X.\" MANIFEST: User Guide, Appendix C, Product Comparisons
  2937. X.\"
  2938. X.bp
  2939. X.2C
  2940. X.nh 1 "Appendix C: Product Comparisons"
  2941. X.LP
  2942. XThis appendix compares the aegis program with other pieces of software.
  2943. XOnly a few work in the same area as the aegis program,
  2944. Xor a commonly compared to the aegis program.
  2945. X.nh 2 "CVS"
  2946. X.LP
  2947. XA comparison with CVS (Concurrent Version System) is frequently requested.
  2948. X.LP
  2949. XA fast comparison can be made by saying that
  2950. X.I "CVS is over RCS"
  2951. Xand that
  2952. X.I "aegis is over RCS and make."
  2953. XThis is a very simplistic view,
  2954. Xbut it illustrates the fact that aegis has a wider scope than make.
  2955. XWhile CVS covers a subset of the functionality covered by aegis,
  2956. Xit naturally does that subset better.
  2957. X.LP
  2958. XThe model used by aegis has a baseline
  2959. X.I and
  2960. Xa repository.
  2961. XThe baseline is all of the most up to date source file
  2962. X.B plus
  2963. Xall the implications flowing from those source files,
  2964. Xsuch as object files and executable programs or libraries.
  2965. XThis means there is always an "official" executable present,
  2966. Xrepresenting the progress made by the project at that very instant.
  2967. XThese source files are available for linking or inclusion,
  2968. Xthe object files available for linking,
  2969. Xat no extra effort for the developers.
  2970. X.LP
  2971. XThe repository is only for history,
  2972. Xusing the aegis model.  It is used to store everything that has happened,
  2973. Xso that developers may recreate earlier version when fixing bugs,
  2974. Xand aegis may use it for some other purposes.
  2975. X.LP
  2976. XCVS provides the repository functionality well.
  2977. XIt provides branching nicely,
  2978. Xand it has symbolic file sets.
  2979. XWhile is does not provide a baseline,
  2980. Xit does not prevent a project implementing it in some other fashion.
  2981. X.LP
  2982. XThe existence of the baseline for aegis is what limits branching.
  2983. XThe semantics of branching in the repository would appear to imply
  2984. Xthat a (logically) separate baseline is required for each leaf in
  2985. Xthe history tree.
  2986. XThis is why aegis only provides branching without the possibility of merging,
  2987. Xby deriving a whole new project from an existing one;
  2988. Xthus creating a whole new baseline as well.
  2989. XShould a better set of semantics be made apparent,
  2990. Xthis is certainly an area for improvement.
  2991. X.LP
  2992. XAnother aspect of Software Configuration Management (SCM) is
  2993. Xconsistency checking.
  2994. XFor example,
  2995. Xif two developers are working on two (logically) separate changes,
  2996. Xwhich both need to alter the same file,
  2997. Xone of them will inevitably return it to the baseline first,
  2998. Xand the other will then be working on an out of date copy.
  2999. XBoth aegis is CVS provide a conflict resolution mechanism to handle this;
  3000. Xthe same algorithm is used by both,
  3001. Xalthough implemented a little differently in each case.
  3002. X.LP
  3003. XThere is a second aspect to consistency checking required by SCM;
  3004. Xit is important that a change does not "break" the project,
  3005. Xand it is thus important that all the source files in the project
  3006. Xagree with each other.
  3007. XFor example,
  3008. Xif a developer alters an include file as part of a change,
  3009. Xand the portion of this include file describing a function
  3010. Xprototype is changed,
  3011. Xit is essential that all of the clients of that function be recompiled,
  3012. Xto ensure that they are still compatible with that prototype,
  3013. Xand may need to be included with the change to update their use of
  3014. Xthe function.
  3015. XSimilarly,
  3016. Xthe definition of the function needs to be recompiled,
  3017. Xto ensure that it, too, agrees with the prototype,
  3018. Xand have the interface and 9implementation changed to agree with it.
  3019. XThis type of consistency checking is provided by aegis,
  3020. Xbut not by CVS;
  3021. Xalthough CVS does not prevent a project implementing this in a different way.
  3022. X.LP
  3023. XAnother aspect of SCM provided by aegis is validation.
  3024. XThe aegis program insists that changes be accompanied by tests.
  3025. XThis allows greater confidence that a change actually works,
  3026. Xand the accumulation of such tests provides a regression test suite to verify
  3027. Xthat later changes do not "break" the functionality provided by this one.
  3028. XThe aegis program also insists that each change be reviewed;
  3029. Xby whom is configurable.
  3030. XWhile testing is not a silver bullet,
  3031. Xand neither is peer review,
  3032. Xboth are vital components producing quality software.
  3033. XCVS does not provide validation functionality;
  3034. Xalthough it does not prevent a project from implementing this in some other way.
  3035. X.LP
  3036. XThe CVS program aims to provide the repository function for SCM,
  3037. Xand it does this well.
  3038. XThe
  3039. Xaegis program aims to provide a baseline,
  3040. Xto provide a repository,
  3041. Xto provide baseline consistency, and
  3042. Xto provide baseline change validation.
  3043. XThere are situations where one is more suited,
  3044. Xand the other less, and vice versa.
  3045. XThe tools selected for a project,
  3046. Xfrom Gandt charts to assemblers,
  3047. Xmust be chosen for their "fit" with each individual project.
  3048. X.PP
  3049. XAnother point to note is that CVS requires RCS;
  3050. Xwhereas aegis may be configured to use almost any history tool.
  3051. XIf SCCS is bundled with your operating system,
  3052. Xor your company has its own history tool,
  3053. Xaegis can be configured to use that, instead.
  3054. X.1C
  3055. END_OF_FILE
  3056. if test 5749 -ne `wc -c <'doc/cC.0.so'`; then
  3057.     echo shar: \"'doc/cC.0.so'\" unpacked with wrong size!
  3058. fi
  3059. # end of 'doc/cC.0.so'
  3060. fi
  3061. if test -f 'fmtgen/main.c' -a "${1}" != "-c" ; then 
  3062.   echo shar: Will not clobber existing file \"'fmtgen/main.c'\"
  3063. else
  3064. echo shar: Extracting \"'fmtgen/main.c'\" \(5236 characters\)
  3065. sed "s/^X//" >'fmtgen/main.c' <<'END_OF_FILE'
  3066. X/*
  3067. X *    aegis - project change supervisor
  3068. X *    Copyright (C) 1991, 1992, 1993 Peter Miller.
  3069. X *    All rights reserved.
  3070. X *
  3071. X *    This program is free software; you can redistribute it and/or modify
  3072. X *    it under the terms of the GNU General Public License as published by
  3073. X *    the Free Software Foundation; either version 2 of the License, or
  3074. X *    (at your option) any later version.
  3075. X *
  3076. X *    This program is distributed in the hope that it will be useful,
  3077. X *    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3078. X *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3079. X *    GNU General Public License for more details.
  3080. X *
  3081. X *    You should have received a copy of the GNU General Public License
  3082. X *    along with this program; if not, write to the Free Software
  3083. X *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  3084. X *
  3085. X * MANIFEST: operating system start-up point
  3086. X */
  3087. X
  3088. X#include <stdio.h>
  3089. X#include <stdlib.h>
  3090. X
  3091. X#include <arglex.h>
  3092. X#include <error.h>
  3093. X#include <id.h>
  3094. X#include <lex.h>
  3095. X#include <option.h>
  3096. X#include <parse.h>
  3097. X#include <str.h>
  3098. X#include <trace.h>
  3099. X
  3100. X
  3101. Xstatic void usage _((void));
  3102. X
  3103. Xstatic void
  3104. Xusage()
  3105. X{
  3106. X    char    *progname;
  3107. X
  3108. X    progname = option_progname_get();
  3109. X    fprintf(stderr, "usage: %s [ <option>... ] <file.def> <file.c> <file.h>\n", progname);
  3110. X    fprintf(stderr, "       %s -Help\n", progname);
  3111. X    exit(1);
  3112. X}
  3113. X
  3114. X
  3115. Xstatic void help _((void));
  3116. X
  3117. Xstatic void
  3118. Xhelp()
  3119. X{
  3120. X    static char *text[] =
  3121. X    {
  3122. X"NAME",
  3123. X"    %s - file format read/write generator",
  3124. X"",
  3125. X"SYNOPSIS",
  3126. X"    %s [ <option>... ] file.def file.c file.h",
  3127. X"    %s -Help",
  3128. X"",
  3129. X"DESCRIPTION",
  3130. X"    The %s program is used to process the .def files",
  3131. X"    describing a file format into the .c and .h files which",
  3132. X"    implement that format (with the help of gram.y and",
  3133. X"    indent.c).",
  3134. X"",
  3135. X"OPTIONS",
  3136. X"    The following options are understood:",
  3137. X"",
  3138. X"    -Help",
  3139. X"        Give this help message.",
  3140. X"",
  3141. X"    -I<path>",
  3142. X"        Specify and include search path.",
  3143. X"",
  3144. X"    All options may be abbreviated; the abbreviation is",
  3145. X"    documented as the upper case letters, all lower case",
  3146. X"    letters and underscores (_) are optional.  You must use",
  3147. X"    consecutive sequences of optional letters.",
  3148. X"",
  3149. X"    All options are case insensitive, you may type them in",
  3150. X"    upper case or lower case or a combination of both, case",
  3151. X"    is not important.",
  3152. X"",
  3153. X"    For example: the arguments \"-project, \"-PROJ\" and \"-p\"",
  3154. X"    are all interpreted to mean the -Project option.  The",
  3155. X"    argument \"-prj\" will not be understood, because",
  3156. X"    consecutive optional characters were not supplied.",
  3157. X"",
  3158. X"    Options and other command line arguments may be mixed",
  3159. X"    arbitrarily on the command line, after the function",
  3160. X"    selectors.",
  3161. X"",
  3162. X"    The GNU long option names are understood.  Since all",
  3163. X"    option names for aegis are long, this means ignoring the",
  3164. X"    extra leading '-'.  The \"--option=value\" convention is",
  3165. X"    also understood.",
  3166. X"",
  3167. X"EXIT STATUS",
  3168. X"    The %s program will exit with a status of 1 on any",
  3169. X"    error.    The %s program will only exit with a status",
  3170. X"    of 0 if there are no errors.",
  3171. X"",
  3172. X"COPYRIGHT",
  3173. X"    The %s program is Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.",
  3174. X"    All rights reserved.",
  3175. X"",
  3176. X"    The %s program comes with ABSOLUTELY NO WARRANTY; for",
  3177. X"    details use the 'aegis -VERSion Warranty' command.  This",
  3178. X"    is free software and you are welcome to redistribute it",
  3179. X"    under certain conditions; for details use the 'aegis",
  3180. X"    -VERSion Redistribution' command.",
  3181. X"",
  3182. X"AUTHOR",
  3183. X"    Peter Miller   UUCP     uunet!munnari!bmr.gov.au!pmiller",
  3184. X"    /\\/\\*          Internet pmiller@bmr.gov.au",
  3185. X        0
  3186. X    };
  3187. X
  3188. X    char    **cpp;
  3189. X    char    *progname;
  3190. X
  3191. X    progname = option_progname_get();
  3192. X    for (cpp = text; *cpp; ++cpp)
  3193. X    {
  3194. X        printf(*cpp, progname);
  3195. X        printf("\n");
  3196. X    }
  3197. X}
  3198. X
  3199. X
  3200. Xenum
  3201. X{
  3202. X    arglex_token_include_short,
  3203. X    arglex_token_include_long
  3204. X};
  3205. X
  3206. Xstatic arglex_table_ty argtab[] =
  3207. X{
  3208. X    { "-\\I*",    (arglex_token_ty)arglex_token_include_short,    },
  3209. X    { "-Include",    (arglex_token_ty)arglex_token_include_long,    },
  3210. X    { 0, (arglex_token_ty)0, }, /* end marker */
  3211. X};
  3212. X
  3213. X
  3214. Xint main _((int, char **));
  3215. X
  3216. Xint
  3217. Xmain(argc, argv)
  3218. X    int    argc;
  3219. X    char    **argv;
  3220. X{
  3221. X    char    *filename[3];
  3222. X    int    j;
  3223. X
  3224. X    str_initialize();
  3225. X    arglex_init(argc, argv, argtab);
  3226. X    id_initialize();
  3227. X    for (j = 0; j < SIZEOF(filename); ++j)
  3228. X        filename[j] = 0;
  3229. X    if (arglex() == arglex_token_help)
  3230. X    {
  3231. X        if (arglex() != arglex_token_eoln)
  3232. X            usage();
  3233. X        help();
  3234. X        exit(0);
  3235. X    }
  3236. X
  3237. X    while (arglex_token != arglex_token_eoln)
  3238. X    {
  3239. X        switch (arglex_token)
  3240. X        {
  3241. X        default:
  3242. X            error
  3243. X            (
  3244. X                "misplaced \"%s\" command line argument",
  3245. X                arglex_value.alv_string
  3246. X            );
  3247. X            usage();
  3248. X
  3249. X        case arglex_token_include_long:
  3250. X            if (arglex() != arglex_token_string)
  3251. X                usage();
  3252. X            /* fall through... */
  3253. X
  3254. X        case arglex_token_include_short:
  3255. X            lex_include_path(arglex_value.alv_string);
  3256. X            break;
  3257. X
  3258. X        case arglex_token_string:
  3259. X            for (j = 0; j < SIZEOF(filename); ++j)
  3260. X                if (!filename[j])
  3261. X                    break;
  3262. X            if (j >= SIZEOF(filename))
  3263. X                fatal("too many file names specified");
  3264. X            filename[j] = arglex_value.alv_string;
  3265. X            break;
  3266. X#ifdef DEBUG
  3267. X        case arglex_token_trace:
  3268. X            while (arglex() == arglex_token_string)
  3269. X                trace_enable(arglex_value.alv_string);
  3270. X            continue;
  3271. X#endif
  3272. X        }
  3273. X        arglex();
  3274. X    }
  3275. X    for (j = 0; j < SIZEOF(filename); ++j)
  3276. X        if (!filename[j])
  3277. X            fatal("too few file names specified");
  3278. X
  3279. X    parse(filename[0], filename[1], filename[2]);
  3280. X    exit(0);
  3281. X    return 0;
  3282. X}
  3283. END_OF_FILE
  3284. if test 5236 -ne `wc -c <'fmtgen/main.c'`; then
  3285.     echo shar: \"'fmtgen/main.c'\" unpacked with wrong size!
  3286. fi
  3287. # end of 'fmtgen/main.c'
  3288. fi
  3289. if test -f 'fmtgen/type_enum.c' -a "${1}" != "-c" ; then 
  3290.   echo shar: Will not clobber existing file \"'fmtgen/type_enum.c'\"
  3291. else
  3292. echo shar: Extracting \"'fmtgen/type_enum.c'\" \(6560 characters\)
  3293. sed "s/^X//" >'fmtgen/type_enum.c' <<'END_OF_FILE'
  3294. X/*
  3295. X *    aegis - project change supervisor
  3296. X *    Copyright (C) 1991, 1992, 1993 Peter Miller.
  3297. X *    All rights reserved.
  3298. X *
  3299. X *    This program is free software; you can redistribute it and/or modify
  3300. X *    it under the terms of the GNU General Public License as published by
  3301. X *    the Free Software Foundation; either version 2 of the License, or
  3302. X *    (at your option) any later version.
  3303. X *
  3304. X *    This program is distributed in the hope that it will be useful,
  3305. X *    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3306. X *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3307. X *    GNU General Public License for more details.
  3308. X *
  3309. X *    You should have received a copy of the GNU General Public License
  3310. X *    along with this program; if not, write to the Free Software
  3311. X *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  3312. X *
  3313. X * MANIFEST: enumerated types functions gereation
  3314. X */
  3315. X
  3316. X#include <type.h>
  3317. X#include <indent.h>
  3318. X#include <id.h>
  3319. X#include <mem.h>
  3320. X
  3321. X
  3322. Xtypedef struct type_enum_ty type_enum_ty;
  3323. Xstruct type_enum_ty
  3324. X{
  3325. X    /* inherited */
  3326. X    TYPE_T
  3327. X
  3328. X    /* instance variables */
  3329. X    parse_list_ty *list;
  3330. X};
  3331. X
  3332. X
  3333. Xstatic void gen_include _((type_ty *, string_ty *));
  3334. X
  3335. Xstatic void
  3336. Xgen_include(type, name)
  3337. X    type_ty        *type;
  3338. X    string_ty    *name;
  3339. X{
  3340. X    type_enum_ty    *type2;
  3341. X    parse_list_ty    *np;
  3342. X
  3343. X    type2 = (type_enum_ty *)type;
  3344. X    indent_putchar('\n');
  3345. X    indent_printf("#ifndef %s_DEF\n", name->str_text);
  3346. X    indent_printf("#define %s_DEF\n", name->str_text);
  3347. X    indent_printf("enum %s_ty\n", name->str_text);
  3348. X    indent_printf("{\n"/*}*/);
  3349. X    for (np = type2->list; np; np = np->next)
  3350. X    {
  3351. X        indent_printf("%s", np->name->str_text);
  3352. X        if (np->next)
  3353. X            indent_putchar(',');
  3354. X        indent_putchar('\n');
  3355. X    }
  3356. X    indent_printf(/*{*/"};\n");
  3357. X    indent_printf
  3358. X    (
  3359. X        "typedef enum %s_ty %s_ty;\n",
  3360. X        name->str_text,
  3361. X        name->str_text
  3362. X    );
  3363. X    indent_printf("#endif /* %s_DEF */\n", name->str_text);
  3364. X
  3365. X    indent_putchar('\n');
  3366. X    indent_printf("extern type_ty %s_type;\n", name->str_text);
  3367. X
  3368. X    indent_putchar('\n');
  3369. X    indent_printf
  3370. X    (
  3371. X        "void %s_write _((char *, %s_ty));\n",
  3372. X        name->str_text,
  3373. X        name->str_text
  3374. X    );
  3375. X    indent_printf
  3376. X    (
  3377. X        "char *%s_ename _((%s_ty));\n",
  3378. X        name->str_text,
  3379. X        name->str_text
  3380. X    );
  3381. X}
  3382. X
  3383. X
  3384. Xstatic void gen_include_declarator _((type_ty *, string_ty *, int));
  3385. X
  3386. Xstatic void
  3387. Xgen_include_declarator(type, name, is_a_list)
  3388. X    type_ty        *type;
  3389. X    string_ty    *name;
  3390. X    int        is_a_list;
  3391. X{
  3392. X    indent_printf
  3393. X    (
  3394. X        "%s_ty\1%s%s;\n",
  3395. X        type->name->str_text,
  3396. X        (is_a_list ? "*" : ""),
  3397. X        name->str_text
  3398. X    );
  3399. X}
  3400. X
  3401. X
  3402. Xstatic void gen_code _((type_ty *, string_ty *));
  3403. X
  3404. Xstatic void
  3405. Xgen_code(type, name)
  3406. X    type_ty        *type;
  3407. X    string_ty    *name;
  3408. X{
  3409. X    parse_list_ty    *np;
  3410. X    type_enum_ty    *type2;
  3411. X    int        n;
  3412. X
  3413. X    type2 = (type_enum_ty *)type;
  3414. X    indent_putchar('\n');
  3415. X    indent_printf("static char *%s_s[] =\n", name->str_text);
  3416. X    indent_printf("{\n"/*}*/);
  3417. X    for (np = type2->list, n = 0; np; np = np->next, ++n)
  3418. X    {
  3419. X        string_ty *s;
  3420. X
  3421. X        id_search(np->name, ID_CLASS_ENUMEL, (long *)&s);
  3422. X        indent_printf("\"%s\",\n", s->str_text);
  3423. X    }
  3424. X    indent_printf(/*{*/"};\n");
  3425. X
  3426. X    indent_putchar('\n');
  3427. X    indent_printf("char *\n");
  3428. X    indent_printf("%s_ename(this)\n", name->str_text);
  3429. X    indent_more();
  3430. X    indent_printf("%s_ty\1this;\n", name->str_text);
  3431. X    indent_less();
  3432. X    indent_printf("{\n"/*}*/);
  3433. X    indent_printf("static char\1buffer[20];\n\n");
  3434. X    indent_printf("if (this >= 0 && this < %d)\n", n);
  3435. X    indent_more();
  3436. X    indent_printf("return %s_s[this];\n", name->str_text);
  3437. X    indent_less();
  3438. X    indent_printf("sprintf(buffer, \"%%d\", this);\n");
  3439. X    indent_printf("return buffer;\n");
  3440. X    indent_printf(/*{*/"}\n");
  3441. X
  3442. X    indent_putchar('\n');
  3443. X    indent_printf("void\n");
  3444. X    indent_printf("%s_write(name, this)\n", name->str_text);
  3445. X    indent_more();
  3446. X    indent_printf("%s\1*name;\n", "char");
  3447. X    indent_printf("%s_ty\1this;\n", name->str_text);
  3448. X    indent_less();
  3449. X    indent_printf("{\n"/*}*/);
  3450. X    indent_printf("if (name)\n");
  3451. X    indent_more();
  3452. X    indent_printf("indent_printf(\"%%s = \", name);\n");
  3453. X    indent_less();
  3454. X    indent_printf("indent_printf(\"%%s\", %s_s[this]);\n", name->str_text);
  3455. X    indent_printf("if (name)\n");
  3456. X    indent_more();
  3457. X    indent_printf("indent_printf(\";\\n\");\n");
  3458. X    indent_less();
  3459. X    indent_printf(/*{*/"}\n");
  3460. X
  3461. X    indent_putchar('\n');
  3462. X    indent_printf
  3463. X    (
  3464. X        "static int %s_parse _((string_ty *, void *));\n",
  3465. X        name->str_text
  3466. X    );
  3467. X
  3468. X    indent_putchar('\n');
  3469. X    indent_printf("static int\n");
  3470. X    indent_printf("%s_parse(name, addr)\n", name->str_text);
  3471. X    indent_more();
  3472. X    indent_printf("%s\1*name;\n", "string_ty");
  3473. X    indent_printf("%s\1*addr;\n", "void");
  3474. X    indent_less();
  3475. X    indent_printf("{\n"/*}*/);
  3476. X    indent_printf("%s\1*%s_f[SIZEOF(%s_s)];\n", "static string_ty", name->str_text, name->str_text);
  3477. X    indent_printf("%s\1j;\n", "int");
  3478. X    indent_putchar('\n');
  3479. X    indent_printf("slow_to_fast(%s_s, %s_f, SIZEOF(%s_s));\n", name->str_text, name->str_text, name->str_text);
  3480. X    indent_printf("for (j = 0; j < SIZEOF(%s_f); ++j)\n", name->str_text);
  3481. X    indent_printf("{\n");
  3482. X    indent_printf("if (str_equal(name, %s_f[j]))\n", name->str_text);
  3483. X    indent_printf("{\n");
  3484. X    indent_printf("*(%s_ty *)addr = j;\n", name->str_text);
  3485. X    indent_printf("return 0;\n");
  3486. X    indent_printf("}\n");
  3487. X    indent_printf("}\n");
  3488. X    indent_printf("return -1;\n");
  3489. X    indent_printf(/*{*/"}\n");
  3490. X
  3491. X    indent_putchar('\n');
  3492. X    indent_printf("type_ty %s_type =\n", name->str_text);
  3493. X    indent_printf("{\n"/*}*/);
  3494. X    indent_printf("type_class_enum,\n");
  3495. X    indent_printf("\"%s\",\n", name->str_text);
  3496. X    indent_printf("0, /* alloc */\n");
  3497. X    indent_printf("0, /* free */\n");
  3498. X    indent_printf("%s_parse,\n", name->str_text);
  3499. X    indent_printf("0, /* list_parse */\n");
  3500. X    indent_printf("0, /* struct_parse */\n");
  3501. X    indent_printf(/*{*/"};\n");
  3502. X}
  3503. X
  3504. X
  3505. Xstatic void gen_code_declarator _((type_ty *, string_ty *, int));
  3506. X
  3507. Xstatic void
  3508. Xgen_code_declarator(type, name, is_a_list)
  3509. X    type_ty        *type;
  3510. X    string_ty    *name;
  3511. X    int        is_a_list;
  3512. X{
  3513. X    indent_printf("%s_write("/*)*/, type->name->str_text);
  3514. X    if (is_a_list)
  3515. X        indent_printf("(char *)0");
  3516. X    else
  3517. X        indent_printf("\"%s\"", name->str_text);
  3518. X    indent_printf(/*(*/", this->%s);\n", name->str_text);
  3519. X}
  3520. X
  3521. X
  3522. Xstatic void gen_free_declarator _((type_ty *, string_ty *, int));
  3523. X
  3524. Xstatic void
  3525. Xgen_free_declarator(type, name, is_a_list)
  3526. X    type_ty        *type;
  3527. X    string_ty    *name;
  3528. X    int        is_a_list;
  3529. X{
  3530. X    if (is_a_list)
  3531. X        indent_printf(";\n");
  3532. X}
  3533. X
  3534. X
  3535. Xstatic type_method_ty method =
  3536. X{
  3537. X    gen_include,
  3538. X    gen_include_declarator,
  3539. X    gen_code,
  3540. X    gen_code_declarator,
  3541. X    gen_free_declarator,
  3542. X};
  3543. X
  3544. X
  3545. Xtype_ty *
  3546. Xtype_create_enum(name, list)
  3547. X    string_ty    *name;
  3548. X    parse_list_ty    *list;
  3549. X{
  3550. X    type_enum_ty    *type;
  3551. X
  3552. X    type = (type_enum_ty *)mem_alloc(sizeof(type_enum_ty));
  3553. X    type->class = type_class_enum;
  3554. X    type->method = &method;
  3555. X    type->name = str_copy(name);
  3556. X    type->list = list;
  3557. X    id_assign(name, ID_CLASS_TYPE, (long)type);
  3558. X    return (type_ty *)type;
  3559. X}
  3560. END_OF_FILE
  3561. if test 6560 -ne `wc -c <'fmtgen/type_enum.c'`; then
  3562.     echo shar: \"'fmtgen/type_enum.c'\" unpacked with wrong size!
  3563. fi
  3564. # end of 'fmtgen/type_enum.c'
  3565. fi
  3566. if test -f 'man5/aecstate.5' -a "${1}" != "-c" ; then 
  3567.   echo shar: Will not clobber existing file \"'man5/aecstate.5'\"
  3568. else
  3569. echo shar: Extracting \"'man5/aecstate.5'\" \(6187 characters\)
  3570. sed "s/^X//" >'man5/aecstate.5' <<'END_OF_FILE'
  3571. X'\" t
  3572. X.\"    aegis - project change supervisor
  3573. X.\"    Copyright (C) 1991, 1992, 1993 Peter Miller.
  3574. X.\"    All rights reserved.
  3575. X.\"
  3576. X.\"    This program is free software; you can redistribute it and/or modify
  3577. X.\"    it under the terms of the GNU General Public License as published by
  3578. X.\"    the Free Software Foundation; either version 2 of the License, or
  3579. X.\"    (at your option) any later version.
  3580. X.\"
  3581. X.\"    This program is distributed in the hope that it will be useful,
  3582. X.\"    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3583. X.\"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3584. X.\"    GNU General Public License for more details.
  3585. X.\"
  3586. X.\"    You should have received a copy of the GNU General Public License
  3587. X.\"    along with this program; if not, write to the Free Software
  3588. X.\"    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  3589. X.\"
  3590. X.\" MANIFEST: description of aegis change state file format
  3591. X.\"
  3592. X.so z_name.so
  3593. X.TH aecstate 5 \*(N)
  3594. X.SH NAME
  3595. Xaecstate \- \*(n) change state file
  3596. X.SH SYNOPSIS
  3597. X\fIproject\fP\f(CW/info/change/\fP\fI[0-9]\fP\f(CW/\fP\fI[0-9][0-9][0-9]\fP
  3598. X.SH DESCRIPTION
  3599. XA change state file is used to store information about a change.
  3600. XThese files are created and maintained by \*(n).
  3601. XThese files should not be edited by humans.
  3602. XThese files is owned by the project owner and group.
  3603. X.PP
  3604. XThe change number is at least 3 digits, zero padded if necessary.
  3605. X(More digits will be used if a project has a 
  3606. Xthousand or more changes in any one release,
  3607. Xalthough this is rare.)
  3608. XThe files are spread across a directory tree,
  3609. X100 per subdirectory,
  3610. Xto improve the directory search times,
  3611. Xand to avoid various systems' directory length limitations.
  3612. X.SH CONTENTS
  3613. X.so aecattr.so
  3614. X.TP 8n
  3615. Xstate = ( ... );
  3616. X.br
  3617. XThis field is used to describe what state the change is in.
  3618. XThe state determines what operations may be performed on the change.
  3619. X.RS 8n
  3620. X.TP 8n
  3621. Xawaiting_development
  3622. X.br
  3623. XThe change has been created,
  3624. Xbut has yet to be worked on.
  3625. X.TP 8n
  3626. Xbeing_developed
  3627. X.br
  3628. XThe change is being developed.
  3629. X.TP 8n
  3630. Xbeing_reviewed
  3631. X.br
  3632. XThe change has been developed,
  3633. Xand is being reviewed.
  3634. X(There is no 'awaiting_review' state.)
  3635. X.TP 8n
  3636. Xawaiting_integration
  3637. X.br
  3638. XThe change has passed review,
  3639. Xand is queued ready for integration.
  3640. X.TP 8n
  3641. Xbeing_integrated
  3642. X.br
  3643. XThe change is being integrated.
  3644. X.TP 8n
  3645. Xcompleted
  3646. X.br
  3647. XThe change has been completed and is now
  3648. Xpart of the baseline.
  3649. XChanges in this state can not be reversed.
  3650. X.RE
  3651. X.TP 8n
  3652. Xdelta_number = integer;
  3653. X.br
  3654. XThis field records the delta number for this change.
  3655. XIt is only present if the change is in one of
  3656. Xthe
  3657. X.I being_integrated
  3658. Xor
  3659. X.I completed
  3660. Xstates.
  3661. X.TP 8n
  3662. Xproject_file_command_sync = integer;
  3663. X.br
  3664. XThis field records the last change integrated into the project.
  3665. XIf it disagrees with the project, a 'project_file_command' (from pconf)
  3666. Xneeds to be executed at the next build.
  3667. X.TP 8n
  3668. Xtest_time = integer;
  3669. X.br
  3670. XThis field records the time the last successful
  3671. X.I "\*(n) -Test"
  3672. Xcommand was run.
  3673. XIt is only present in the
  3674. X.I being_developed
  3675. Xand
  3676. X.I being_integrated
  3677. Xstates.
  3678. X.TP 8n
  3679. Xtest_baseline_time = integer;
  3680. X.br
  3681. XThis field records the time the last successful
  3682. X.I "\*(n) -Test -BaseLine"
  3683. Xcommand was run.
  3684. XIt is only present in the
  3685. X.I being_developed
  3686. Xand
  3687. X.I being_integrated
  3688. Xstates.
  3689. X.TP 8n
  3690. Xbuild_time = integer;
  3691. X.br
  3692. XThis field records the last time the last successful
  3693. X.I "\*(n) -Build"
  3694. Xcommand was run.
  3695. XIt is only present in the
  3696. X.I being_developed
  3697. Xand
  3698. X.I being_integrated
  3699. Xstates.
  3700. X.TP 8n
  3701. Xdevelopment_directory = string;
  3702. X.br
  3703. XThis field is the absolute path of the change's development directory.
  3704. XIt is only present of the change is in a state
  3705. Xbetween
  3706. X.I being_developed
  3707. Xand
  3708. X.I being_integrated
  3709. Xinclusive.
  3710. X.TP 8n
  3711. Xintegration_directory = string;
  3712. X.br
  3713. XThis field is the absolute path of the change's integration directory.
  3714. XIt is only present of the change is in the
  3715. X.I being_integrated
  3716. Xstate.
  3717. X.TP 8n
  3718. Xhistory = [ { ... }, ... ];
  3719. X.br
  3720. XThis field records the history of the change,
  3721. Xin the form of state transitions.
  3722. XThe history records have the form
  3723. X.RS 8n
  3724. X.TP 8n
  3725. Xwhen = integer;
  3726. X.br
  3727. XThis field records the time the state transition occurred.
  3728. X.TP 8n
  3729. Xwhat = ( ... );
  3730. X.br
  3731. XThis field records what happened.
  3732. XValid value names echo the various \*(n) functions.
  3733. X.TP 8n
  3734. Xwho = string;
  3735. X.br
  3736. XThis field records the user name of the user who caused the state transition.
  3737. X.TP 8n
  3738. Xwhy = string;
  3739. X.br
  3740. XThis field is optional.
  3741. XIt is a comment of some sort.
  3742. XIn the cases of
  3743. X.I review_fail
  3744. Xand
  3745. X.IR integrate_fail ,
  3746. Xthis field will contain why the change failed.
  3747. X.RE
  3748. X.TP 8n
  3749. Xsrc = [ { ... }, ... ];
  3750. X.br
  3751. XThis field is a list of all the files in the change.
  3752. XThe records have the form
  3753. X.RS 8n
  3754. X.TP 8n
  3755. Xfile_name = string;
  3756. X.br
  3757. XThis file names the file.
  3758. XThe name is relative to the root of the baseline directory tree.
  3759. X.TP 8n
  3760. Xaction = (create, modify, remove);
  3761. X.br
  3762. XThis field describes what is being done with the file.
  3763. X.TP 8n
  3764. Xedit_number = string;
  3765. X.br
  3766. XThis field records the edit number of the file
  3767. Xwhen it was added to the change (or updated using the
  3768. X.I "\*(n) -DIFFerence"
  3769. Xcommand).
  3770. XThis field is not present for new files.
  3771. X.TP 8n
  3772. Xusage = (source, test, manual_test);
  3773. X.br
  3774. XThis field describes what function the file serves.
  3775. X.TP 8n
  3776. Xdiff_time = integer;
  3777. X.br
  3778. XThis field records the last time modified of the change file
  3779. Xwhen the last
  3780. X.I "\*(n) -DIFFerence"
  3781. Xcommand was run.
  3782. XIt is only present between the
  3783. X.I being_developed
  3784. Xand
  3785. X.I being_integrated
  3786. Xstates,
  3787. Xinclusive.
  3788. XIt is not present for files which are being deleted.
  3789. XThis field is used to determine if a difference has been done,
  3790. Xand if the file has been tampered with before state transitions.
  3791. X.TP 8n
  3792. Xdiff_file_time = integer;
  3793. X.br
  3794. XThis field records the last time modified of the difference file
  3795. Xwhen the last
  3796. X.I "\*(n) -DIFFerence"
  3797. Xcommand was run.
  3798. XIt is only present between the
  3799. X.I being_developed
  3800. Xand
  3801. X.I being_integrated
  3802. Xstates,
  3803. Xinclusive.
  3804. XThis field is used to determine if a difference has been done,
  3805. Xand if the difference file has been tampered with before state transitions.
  3806. X.TP 8n
  3807. Xmove = string;
  3808. X.br
  3809. XTo change the name of a file,
  3810. Xa combination of deleting the old name and creating the new name is used.
  3811. XWith deleted files, this field is used to say where it went.
  3812. XWith new files, this field is used to say where it came from.
  3813. X.RE
  3814. X.so z_cr.so
  3815. END_OF_FILE
  3816. if test 6187 -ne `wc -c <'man5/aecstate.5'`; then
  3817.     echo shar: \"'man5/aecstate.5'\" unpacked with wrong size!
  3818. fi
  3819. # end of 'man5/aecstate.5'
  3820. fi
  3821. if test -f 'man5/aepattr.so' -a "${1}" != "-c" ; then 
  3822.   echo shar: Will not clobber existing file \"'man5/aepattr.so'\"
  3823. else
  3824. echo shar: Extracting \"'man5/aepattr.so'\" \(5833 characters\)
  3825. sed "s/^X//" >'man5/aepattr.so' <<'END_OF_FILE'
  3826. X'\" t
  3827. X.\"    aegis - project change supervisor
  3828. X.\"    Copyright (C) 1991, 1992, 1993 Peter Miller.
  3829. X.\"    All rights reserved.
  3830. X.\"
  3831. X.\"    This program is free software; you can redistribute it and/or modify
  3832. X.\"    it under the terms of the GNU General Public License as published by
  3833. X.\"    the Free Software Foundation; either version 2 of the License, or
  3834. X.\"    (at your option) any later version.
  3835. X.\"
  3836. X.\"    This program is distributed in the hope that it will be useful,
  3837. X.\"    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3838. X.\"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3839. X.\"    GNU General Public License for more details.
  3840. X.\"
  3841. X.\"    You should have received a copy of the GNU General Public License
  3842. X.\"    along with this program; if not, write to the Free Software
  3843. X.\"    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  3844. X.\"
  3845. X.\" MANIFEST: description of aegis project attribute file format
  3846. X.\"
  3847. X.TP 8n
  3848. Xdescription = string;
  3849. XThis field contains
  3850. Xa description of the project.
  3851. XLarge amounts of prose are not required;
  3852. Xa single line is sufficient.
  3853. X.TP 8n
  3854. Xowner_name = string;
  3855. XThis field contains
  3856. Xthe name of the user to whom baseline files belong.
  3857. X.TP 8n
  3858. Xgroup_name = string;
  3859. XThis field contains
  3860. Xthe name of the group to which baseline files belong.
  3861. X.TP 8n
  3862. Xdeveloper_may_review = boolean;
  3863. XIf this field is true, then a developer may review her own change.
  3864. XThis is probably only a good idea for projects of less than 3 people.
  3865. XThe idea is for as many people as possible to critically examine a change.
  3866. X.TP 8n
  3867. Xdeveloper_may_integrate = boolean;
  3868. XIf this field is true, then a developer may integrate her own change.
  3869. XThis is probably only a good idea for projects of less than 3 people.
  3870. XThe idea is for as many people as possible to critically examine a change.
  3871. X.TP 8n
  3872. Xreviewer_may_integrate = boolean;
  3873. XIf this field is true, then a reviewer may integrate a change she reviewed.
  3874. XThis is probably only a good idea for projects of less than 3 people.
  3875. XThe idea is for as many people as possible to critically examine a change.
  3876. X.TP 8n
  3877. Xdevelopers_may_create_changes = boolean;
  3878. XThis field is true if developers may created changes,
  3879. Xin addition to administrators.
  3880. XThis tends to be a very useful thing,
  3881. Xsince developers find most of the bugs.
  3882. X.TP 8n
  3883. Xdevelop_end_notify_command = string;
  3884. XThis command is used to
  3885. Xnotify that a change is ready for review.
  3886. XIt will probably use mail,
  3887. Xor it could be an in-house bulletin board.
  3888. XThis field is optional,
  3889. Xif not present no notification will be given.
  3890. XThis command could also be used to notify other management systems,
  3891. Xsuch as progress and defect tracking.
  3892. XAll of the substitutions described by
  3893. X.IR aesub (5)
  3894. Xare available.
  3895. X.TP 8n
  3896. Xdevelop_end_undo_notify_command = string;
  3897. XThis command is used to
  3898. Xnotify that a change had been withdrawn from review
  3899. Xfor further development.
  3900. XIt will probably use mail,
  3901. Xor it could be an in-house bulletin board.
  3902. XThis field is optional,
  3903. Xif not present no notification will be given.
  3904. XThis command could also be used to notify other management systems,
  3905. Xsuch as progress and defect tracking.
  3906. XAll of the substitutions described by
  3907. X.IR aesub (5)
  3908. Xare available.
  3909. X.TP 8n
  3910. Xreview_pass_notify_command = string;
  3911. XThis command is used to
  3912. Xnotify that a review has passed.
  3913. XIt will probably use mail,
  3914. Xor it could be an in-house bulletin board.
  3915. XThis field is optional,
  3916. Xif not present no notification will be given.
  3917. XThis command could also be used to notify other management systems,
  3918. Xsuch as progress and defect tracking.
  3919. XAll of the substitutions described by
  3920. X.IR aesub (5)
  3921. Xare available.
  3922. X.TP 8n
  3923. Xreview_pass_undo_notify_command = string;
  3924. XThis command is used to
  3925. Xnotify that a review has passed.
  3926. XIt will probably use mail,
  3927. Xor it could be an in-house bulletin board.
  3928. XThis field is optional,
  3929. Xif not present no notification will be given.
  3930. XThis command could also be used to notify other management systems,
  3931. Xsuch as progress and defect tracking.
  3932. XDefaults to the same action as the \fIdevelop_end_notify_command\fP field.
  3933. XAll of the substitutions described by
  3934. X.IR aesub (5)
  3935. Xare available.
  3936. X.TP 8n
  3937. Xreview_fail_notify_command = string;
  3938. XThis command is used to
  3939. Xnotify that a review has failed.
  3940. XIt will probably use mail,
  3941. Xor it could be an in-house bulletin board.
  3942. XThis field is optional,
  3943. Xif not present no notification will be given.
  3944. XThis command could also be used to notify other management systems,
  3945. Xsuch as progress and defect tracking.
  3946. XAll of the substitutions described by
  3947. X.IR aesub (5)
  3948. Xare available.
  3949. X.TP 8n
  3950. Xintegrate_pass_notify_command = string;
  3951. XThis command is used to
  3952. Xnotify that an integration has passed.
  3953. XIt will probably use mail,
  3954. Xor it could be an in-house bulletin board.
  3955. XThis field is optional,
  3956. Xif not present no notification will be given.
  3957. XThis command could also be used to notify other management systems,
  3958. Xsuch as progress and defect tracking.
  3959. XAll of the substitutions described by
  3960. X.IR aesub (5)
  3961. Xare available.
  3962. X.TP 8n
  3963. Xintegrate_fail_notify_command = string;
  3964. XThis command is used to
  3965. Xnotify that an integration has failed.
  3966. XIt will probably use mail,
  3967. Xor it could be an in-house bulletin board.
  3968. XThis field is optional,
  3969. Xif not present no notification will be given.
  3970. XThis command could also be used to notify other management systems,
  3971. Xsuch as progress and defect tracking.
  3972. XAll of the substitutions described by
  3973. X.IR aesub (5)
  3974. Xare available.
  3975. X.TP 8n
  3976. Xdefault_development_directory = string;
  3977. XThe pathname of where to place new development directories.
  3978. XThe pathname must be absolute.
  3979. XThis field is only consulted if
  3980. Xthe field of the same name in the user configuration file is not set.
  3981. X.TP 8n
  3982. Xumask = integer;
  3983. X.br
  3984. XFile permission mode mask.
  3985. XSee
  3986. X.IR umask (2)
  3987. Xfor more information.
  3988. XThis value will always be OR'ed with 022,
  3989. Xbecause
  3990. X.I aegis
  3991. Xis paranoid.
  3992. X.TP 8n
  3993. Xdefault_test_exemption = boolean;
  3994. X.br
  3995. XThis field contains what to do when a change is created with
  3996. Xno test exemption specified.
  3997. END_OF_FILE
  3998. if test 5833 -ne `wc -c <'man5/aepattr.so'`; then
  3999.     echo shar: \"'man5/aepattr.so'\" unpacked with wrong size!
  4000. fi
  4001. # end of 'man5/aepattr.so'
  4002. fi
  4003. if test -f 'man5/aepconf.5' -a "${1}" != "-c" ; then 
  4004.   echo shar: Will not clobber existing file \"'man5/aepconf.5'\"
  4005. else
  4006. echo shar: Extracting \"'man5/aepconf.5'\" \(7024 characters\)
  4007. sed "s/^X//" >'man5/aepconf.5' <<'END_OF_FILE'
  4008. X'\" t
  4009. X.\"    aegis - project change supervisor
  4010. X.\"    Copyright (C) 1991, 1992, 1993 Peter Miller.
  4011. X.\"    All rights reserved.
  4012. X.\"
  4013. X.\"    This program is free software; you can redistribute it and/or modify
  4014. X.\"    it under the terms of the GNU General Public License as published by
  4015. X.\"    the Free Software Foundation; either version 2 of the License, or
  4016. X.\"    (at your option) any later version.
  4017. X.\"
  4018. X.\"    This program is distributed in the hope that it will be useful,
  4019. X.\"    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4020. X.\"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  4021. X.\"    GNU General Public License for more details.
  4022. X.\"
  4023. X.\"    You should have received a copy of the GNU General Public License
  4024. X.\"    along with this program; if not, write to the Free Software
  4025. X.\"    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  4026. X.\"
  4027. X.\" MANIFEST: description of aegis project config file format
  4028. X.\"
  4029. X.so z_name.so
  4030. X.TH aepconf 5 \*(N)
  4031. X.SH NAME
  4032. Xaepconf - \*(n) project configuration file
  4033. X.SH SYNOPSIS
  4034. X\fIproject\fP\f(CW/baseline/config\fP
  4035. X.SH DESCRIPTION
  4036. XA project configuration file
  4037. Xis used to store information about a project.
  4038. XThis file is under source control,
  4039. Xand is one of the project's source files.
  4040. XDevelopers may thus modify this file as part of a change.
  4041. X.SH CONTENTS
  4042. XThis file contains the following fields:
  4043. X.TP 8n
  4044. Xbuild_command = string;
  4045. XThis field describes how to build the project
  4046. X(actually, how to do an integration build).
  4047. XThis field is mandatory.
  4048. XAll of the substitutions described by
  4049. X.IR aesub (5)
  4050. Xare available.
  4051. X.TP 8n
  4052. Xdevelopment_build_command = string;
  4053. XThis field describes how to do a development build.
  4054. XIf this field is absent, it defaults to the above.
  4055. XAll of the substitutions described by
  4056. X.IR aesub (5)
  4057. Xare available.
  4058. X.TP 8n
  4059. Xchange_file_command = string;
  4060. X.RS 8n
  4061. XThis field contains a command to be executed whenever
  4062. Xa '\*(n) -CoPy_file', '\*(n) -CoPy_file_Undo', '\*(n) -New_File', '\*(n) -New_File_Undo', '\*(n) -ReMove_file'
  4063. Xor '\*(n) -ReMove_file_Undo'
  4064. Xcommand is successful.
  4065. XIf this field is absent, nothing is done.
  4066. XAll of the substitutions described by
  4067. X.IR aesub (5)
  4068. Xare available;
  4069. Xin addition,
  4070. X.TP 8n
  4071. X${File_List}
  4072. X.br
  4073. XSpace separated list of files named.
  4074. X.RE
  4075. X.TP 8n
  4076. Xproject_file_command = string;
  4077. X.br
  4078. XThis field contains a command to be executed
  4079. Xduring a development build
  4080. Xbefore the
  4081. X.I "development build command"
  4082. Xabove, when 
  4083. X(a) it is the first build after a develop begin, or
  4084. X(b) some other change has been integrated into
  4085. Xthe baseline since the last build.
  4086. XIf this field is absent, nothing is done.
  4087. XAll of the substitutions described by
  4088. X.IR aesub (5)
  4089. Xare available.
  4090. X.TP 8n
  4091. Xintegrate_begin_command = string;
  4092. XThis field contains a command to be executed whenever
  4093. Xa '\*(n) -Integrate_Begin'
  4094. Xcommand is successful.
  4095. XIf this field is absent, nothing is done.
  4096. XAll of the substitutions described by
  4097. X.IR aesub (5)
  4098. Xare available.
  4099. X.TP 8n
  4100. Xlink_integration_directory
  4101. X.br
  4102. XThis flag is true if aegis should link the files from the baseline
  4103. Xinto the integration directory,
  4104. Xrather than copy them (the default).
  4105. XThis has risks,
  4106. Xas the build script (e.g.
  4107. X.I Howto.cook
  4108. Xor
  4109. X.IR Makefile ,
  4110. Xetc)
  4111. Xmust unlink targets before rebuilding them;
  4112. Xif this is not done the baseline will be corrupted.
  4113. X.TP 8n
  4114. Xhistory_create_command = string;
  4115. X.RS 8n
  4116. XThis field is used to create a new history.
  4117. XThe command is always executed as the project owner.
  4118. XAll of the substitutions described by
  4119. X.IR aesub (5)
  4120. Xare available;
  4121. Xin addition,
  4122. X.TP 8n
  4123. X${Input}
  4124. X.br
  4125. XAbsolute path of the source file.
  4126. X.TP 8n
  4127. X${History}
  4128. X.br
  4129. XAbsolute path of the history file.
  4130. XThis may need to be reworked with the
  4131. X.I Dirname
  4132. Xand
  4133. X.I Basename
  4134. Xsubstitutions to yield a string suitable for the history tool in question.
  4135. X.RE
  4136. X.TP 8n
  4137. Xhistory_get_command = string;
  4138. X.RS 8n
  4139. XThis field is used to get a file from history.
  4140. XThe command may be executed by developers.
  4141. XAll of the substitutions described by
  4142. X.IR aesub (5)
  4143. Xare available;
  4144. Xin addition,
  4145. X.TP 8n
  4146. X${History}
  4147. X.br
  4148. XThe absolute path of the history file.
  4149. XThis may need to be reworked with the
  4150. X.I Dirname
  4151. Xand
  4152. X.I Basename
  4153. Xsubstitutions to yield a string suitable for the history tool in question.
  4154. X.TP 8n
  4155. X${Edit}
  4156. X.br
  4157. XThe edit number to be extracted.
  4158. XIt may be an arbitrary string,
  4159. Xvarying on the particular history tool.
  4160. X.TP 8n
  4161. X${Output}
  4162. X.br
  4163. XThe absolute path of the destination file.
  4164. X.RE
  4165. X.TP 8n
  4166. Xhistory_put_command = string;
  4167. X.RS
  4168. XThis field is used to add a new change to the history.
  4169. XThe command is always executed as the project owner.
  4170. XAll of the substitutions described by
  4171. X.IR aesub (5)
  4172. Xare available;
  4173. Xin addition,
  4174. X.TP 8n
  4175. X${Input}
  4176. X.br
  4177. XThe absolute path of the source file.
  4178. X.TP 8n
  4179. X${History}
  4180. X.br
  4181. XThe absolute path of the history file.
  4182. XThis may need to be reworked with the
  4183. X.I Dirname
  4184. Xand
  4185. X.I Basename
  4186. Xsubstitutions to yield a string suitable for the history tool in question.
  4187. X.RE
  4188. X.TP 8n
  4189. Xhistory_query_command = string;
  4190. X.RS 8n
  4191. XThis field is used to query the topmost edit of a history file.
  4192. XResult to be printed on the standard output.
  4193. XThis command may be executed by developers.
  4194. XAll of the substitutions described by
  4195. X.IR aesub (5)
  4196. Xare available;
  4197. Xin addition,
  4198. X.TP 8n
  4199. X${History}
  4200. X.br
  4201. XThe absolute path of the history file.
  4202. XThis may need to be reworked with the
  4203. X.I Dirname
  4204. Xand
  4205. X.I Basename
  4206. Xsubstitutions to yield a string suitable for the history tool in question.
  4207. X.RE
  4208. X.TP 8n
  4209. Xdiff_command = string;
  4210. X.RS
  4211. XThis field is used to difference of 2 files.
  4212. XThe command is always executed by developers.
  4213. XAll of the substitutions described by
  4214. X.IR aesub (5)
  4215. Xare available;
  4216. Xin addition,
  4217. X.TP 8n
  4218. X${ORiginal}
  4219. X.br
  4220. XThe absolute path of the original
  4221. Xfile copied into the change.
  4222. XUsually in the baseline,
  4223. Xbut not always.
  4224. X.TP 8n
  4225. X${Input}
  4226. X.br
  4227. XThe absolute path of the file in the development directory.
  4228. X.TP 8n
  4229. X${Output}
  4230. X.br
  4231. XThe absolute path of the file in which to write the difference listing.
  4232. X.RE
  4233. X.TP 8n
  4234. Xdiff3_command = string;
  4235. X.RS 8n
  4236. XThis field is used to difference 3 files.
  4237. XThe command is always executed by developers.
  4238. XAll of the substitutions described by
  4239. X.IR aesub (5)
  4240. Xare available;
  4241. Xin addition,
  4242. X.TP 8n
  4243. X${ORiginal}
  4244. X.br
  4245. XThe absolute path of the original
  4246. Xfile copied into the change.
  4247. XUsually not in the baseline.
  4248. X.TP 8n
  4249. X${Most_Recent}
  4250. X.br
  4251. XThe absolute path of the competing edit,
  4252. Xusually in the baseline.
  4253. X.TP 8n
  4254. X${Input}
  4255. X.br
  4256. XThe absolute path of the file in the development directory.
  4257. X.TP 8n
  4258. X${Output}
  4259. X.br
  4260. XThe absolute path of the file in which to write the difference listing.
  4261. X.RE
  4262. X.TP 8n
  4263. Xfile_template = [ { ... } ];
  4264. X.br
  4265. XThe file template is consulted whenever a new file is created,
  4266. Xby one of the
  4267. X.IR aenf (1)
  4268. Xor
  4269. X.IT aent (1)
  4270. Xcommands.
  4271. XEach list item has the form:
  4272. X.RS
  4273. X.TP 8n
  4274. Xpattern = [ string ];
  4275. XThe name of the file,
  4276. Xrelative to the development directory.
  4277. XEach string is a shell file name pattern;
  4278. Xsee
  4279. X.IR sh (1)
  4280. Xfor more information.
  4281. X.TP 8n
  4282. Xbody = string;
  4283. XWhat to initialize the body of the file to.
  4284. XThere are no substitutions.
  4285. X.PP
  4286. XAll of the substitutions described in
  4287. X.IR aesub (5)
  4288. Xare available for the body string.
  4289. XIn addition, ${File_Name} will be replaced by the name of the new file.
  4290. X.RE
  4291. X.SH SEE ALSO
  4292. X.IR aeb (1)
  4293. X.so z_cr.so
  4294. END_OF_FILE
  4295. if test 7024 -ne `wc -c <'man5/aepconf.5'`; then
  4296.     echo shar: \"'man5/aepconf.5'\" unpacked with wrong size!
  4297. fi
  4298. # end of 'man5/aepconf.5'
  4299. fi
  4300. if test -f 'man5/aesub.5' -a "${1}" != "-c" ; then 
  4301.   echo shar: Will not clobber existing file \"'man5/aesub.5'\"
  4302. else
  4303. echo shar: Extracting \"'man5/aesub.5'\" \(7265 characters\)
  4304. sed "s/^X//" >'man5/aesub.5' <<'END_OF_FILE'
  4305. X'\" t
  4306. X.\"    aegis - project change supervisor
  4307. X.\"    Copyright (C) 1993 Peter Miller.
  4308. X.\"    All rights reserved.
  4309. X.\"
  4310. X.\"    This program is free software; you can redistribute it and/or modify
  4311. X.\"    it under the terms of the GNU General Public License as published by
  4312. X.\"    the Free Software Foundation; either version 2 of the License, or
  4313. X.\"    (at your option) any later version.
  4314. X.\"
  4315. X.\"    This program is distributed in the hope that it will be useful,
  4316. X.\"    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4317. X.\"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  4318. X.\"    GNU General Public License for more details.
  4319. X.\"
  4320. X.\"    You should have received a copy of the GNU General Public License
  4321. X.\"    along with this program; if not, write to the Free Software
  4322. X.\"    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  4323. X.\"
  4324. X.\" MANIFEST: manual page describing command substitutions
  4325. X.\"
  4326. X.so z_name.so
  4327. X.TH aesub 5 \*(N)
  4328. X.if n .ad l
  4329. X.if n .hy 0
  4330. X.SH NAME
  4331. Xaesub \- available command substitutions
  4332. X.SH DESCRIPTION
  4333. XWhen other programs are invoked by the
  4334. X.I aegis
  4335. Xprogram,
  4336. Xit is usually via a command string in a configuration file.
  4337. XThis section describes the format of these command strings.
  4338. X.SH GENERAL FORM
  4339. XThe command strings are very similar to shell variables.
  4340. XAn example will illustrate this:
  4341. X.RS 8n
  4342. X.nf
  4343. Xbuild_command =
  4344. X    "cook project=${project} change=${change}";
  4345. X.fi
  4346. X.RE
  4347. XIn this command definition,
  4348. Xthe "${project}" part is a substitution:
  4349. Xthe name of the project will be substituted
  4350. Xin the command at this point.
  4351. X.PP
  4352. XSubstitutions may take several forms:
  4353. X.TP 8n
  4354. X$name
  4355. X.br
  4356. XThis is the same as saying "${name}".
  4357. XThe name must start with an alphabetic,
  4358. Xand be followed by zero or more alphanumerics.
  4359. X.TP 8n
  4360. X${name}
  4361. X.br
  4362. XThe name in this form may contain any non-blank characters,
  4363. Xand it may be subject to substitution.
  4364. X.TP 8n
  4365. X${name \fIarg\fP...}
  4366. X.br
  4367. XThe name and the arguments in this form may contain any non-blank characters,
  4368. Xand it may be subject to further substitution.
  4369. X.TP 8n
  4370. X$$
  4371. X.br
  4372. XThis is replaced by a single $ character.
  4373. X.PP
  4374. XAs another example,
  4375. Xthe
  4376. X.I dirname
  4377. Xsubstitution is replaced by the directory name of the argument,
  4378. Xrather like the
  4379. X.IR dirname (1)
  4380. Xcommand.
  4381. XIn the command
  4382. X.RS
  4383. X.nf
  4384. Xhistory_query_command =
  4385. X    "get -t -g ${Dirname $History}/s.${Basename $History}";
  4386. X.fi
  4387. X.RE
  4388. Xthe
  4389. X.I Dirname
  4390. Xand
  4391. X.I Basename
  4392. Xsubstitutions are used to construct a suitable path to the SCCS
  4393. Xfile in the history directory.
  4394. X.SH ABBREVIATIONS
  4395. XThe names of the various substitutions may be abbreviated.
  4396. XIn the above examples,
  4397. Xand in the lists which follow,
  4398. Xthe minimum abbreviation is the uppercase letters.
  4399. XAll substitution name are case insensitive.
  4400. X.PP
  4401. XThe above example could be abbreviated to
  4402. X.RS
  4403. X.nf
  4404. Xhistory_query_command =
  4405. X    "get -t -g ${d $h}/s.${b $h}";
  4406. X.fi
  4407. X.RE
  4408. X.PP
  4409. XAmbiguous abbreviations will result in a fatal error message.
  4410. X.SH SUBSTITUTIONS
  4411. XThere are many substitutions which are always understood,
  4412. Xand some which are specific to the command being substituted.
  4413. XSpecific entries will be defined in the relevant manual section.
  4414. X.PP
  4415. XThe following lists contains those substitutions which are always understood:
  4416. X.TP 8n
  4417. XAdministrator_List
  4418. X.br
  4419. XSpace separated list of the project's administrators.
  4420. X.TP 8n
  4421. XBaseLine
  4422. X.br
  4423. XAbsolute path of the the project's baseline.
  4424. X.TP 8n
  4425. XBasename
  4426. X.br
  4427. XThis substitution takes one argument,
  4428. Xa pathname.
  4429. XThe value of the substitution will be the last element of the pathname.
  4430. XThis is similar to the
  4431. X.IR basename (1)
  4432. Xcommand.
  4433. X.TP 8n
  4434. XChange
  4435. X.br
  4436. XThe change number.
  4437. X.TP 8n
  4438. XDAte
  4439. X.br
  4440. XWith no arguments,
  4441. Xthe output is the current date.
  4442. XIf there are arguments,
  4443. Xthey forma format string.
  4444. XThis is similar to the
  4445. X.IR date (1)
  4446. Xcommand on many UNIX systems.
  4447. XFor a description of the date formats,
  4448. Xsee the
  4449. X.I DATE
  4450. Xsection,
  4451. Xbelow.
  4452. X.TP 8n
  4453. XDELta
  4454. X.br
  4455. XThe delta number of the change.
  4456. XThis is only available when the change is in the
  4457. X.I "being integrated"
  4458. Xstate or the
  4459. X.I completed
  4460. Xstate.
  4461. X.TP 8n
  4462. XDEVeloper
  4463. X.br
  4464. XThe name of the developer.
  4465. X.TP 8n
  4466. XDEVeloper_List
  4467. X.br
  4468. XSpace separated list of the project's developers.
  4469. X.TP 8n
  4470. XDevelopment_Directory
  4471. X.br
  4472. XThe absolute path of the change's development directory.
  4473. XOnly available when the change is between the
  4474. X.I "being developed"
  4475. Xstate and the
  4476. X.I "being integrated"
  4477. Xstate.
  4478. X.TP 8n
  4479. XDirname
  4480. X.br
  4481. XThis substitution takes one argument,
  4482. Xa pathname.
  4483. XThe value of the substitution will be everything but
  4484. Xthe last element of the pathname.
  4485. XThis is similar to the
  4486. X.IR dirname (1)
  4487. Xcommand.
  4488. X.TP 8n
  4489. XDownCase
  4490. X.br
  4491. XThis substitution takes one argument.
  4492. XThe value of the substitution will be the argument with
  4493. Xany upper case letters mapped to lower case.
  4494. X.TP 8n
  4495. XIDentifier
  4496. X.br
  4497. XThis substitution takes one argument.
  4498. XThe value of the substitution will be the argument with
  4499. Xall characters but alpha numerics mapped into an underscore (_),
  4500. Xso as to form a legal C identifier.
  4501. X.TP 8n
  4502. XINTegration_Directory
  4503. X.br
  4504. XThe absolute path of the change's integration directory.
  4505. XOnly available when the change is in the
  4506. X.I "being integrated"
  4507. Xstate.
  4508. X.TP 8n
  4509. XINTegrator
  4510. X.br
  4511. XThe name of the change's integrator.
  4512. XOnly available when the change is in the
  4513. X.I "being integrated"
  4514. Xstate or the
  4515. X.I "completed"
  4516. Xstate.
  4517. X.TP 8n
  4518. XINTegrator_List
  4519. X.br
  4520. XSpace separated list of the project's integrators.
  4521. X.TP 8n
  4522. XProject
  4523. X.br
  4524. XThe name of the project.
  4525. X.TP 8n
  4526. XReviewer
  4527. X.br
  4528. XThe name of the change's reviewer.
  4529. XOnly available when the change is between the
  4530. X.I "awaiting integration"
  4531. Xstate and the
  4532. X.I "completed"
  4533. Xstate.
  4534. X.TP 8n
  4535. XReviewer_List
  4536. X.br
  4537. XSpace separated list of the project's reviewers.
  4538. X.TP 8n
  4539. XUpCase
  4540. X.br
  4541. XThis substitution takes one argument.
  4542. XThe value of the substitution will be the argument with
  4543. Xany lower case letters mapped to upper case.
  4544. X.TP 8n
  4545. XVersion
  4546. X.br
  4547. XThe version of the change.
  4548. XIf the change is in the
  4549. X.I "being integrated"
  4550. Xstate or the
  4551. X.I "completed"
  4552. Xstate,
  4553. Xthe version will be of the form "\fIa\fB.\fIb\fB.D\fIddd\fR",
  4554. Xwhere "a" is the project's major version number,
  4555. X"b" is the project's minor version number, and
  4556. X"ddd" is the change's delta number.
  4557. XIf the change is in any other state,
  4558. Xthe version will be of the form "\fIa\fB.\fIb\fB.C\fIccc\fR",
  4559. Xwhere "ccc" is the change number.
  4560. X.SH DATE
  4561. XThis section describes the format specifiers accepted by the
  4562. Xdate substitution.
  4563. XThese are the same specifiers as defined
  4564. Xby the ANSI C standard
  4565. Xfor the strftime function.
  4566. X.TP 8n
  4567. X%%
  4568. XThe percent character (%)
  4569. X.TP 8n
  4570. X%a
  4571. Xthe abbreviated weekday name
  4572. X.TP 8n
  4573. X%A
  4574. Xthe full weekday name
  4575. X.TP 8n
  4576. X%b
  4577. Xthe abbreviated month name
  4578. X.TP 8n
  4579. X%B
  4580. Xthe full month name
  4581. X.TP 8n
  4582. X%c
  4583. Xthe date and time
  4584. X.TP 8n
  4585. X%d
  4586. Xthe day of the month,
  4587. Xzero padded
  4588. X.TP 8n
  4589. X%H
  4590. Xthe hour of the 24-hour day
  4591. X.TP 8n
  4592. X%I
  4593. Xthe hour of the 12-hour day
  4594. X.TP 8n
  4595. X%j
  4596. Xthe day number of year,
  4597. Xzero padded, one based
  4598. X.TP 8n
  4599. X%m
  4600. Xthe month of the year,
  4601. Xzero padded, one based
  4602. X.TP 8n
  4603. X%M
  4604. Xthe minute of the hour,
  4605. Xzero padded
  4606. X.TP 8n
  4607. X%p
  4608. Xmeridian indicator,
  4609. XAM or PM as appropriate
  4610. X.TP 8n
  4611. X%S
  4612. Xthe second of the minute
  4613. X.TP 8n
  4614. X%U
  4615. Xthe Sunday week of the year
  4616. X.TP 8n
  4617. X%w
  4618. Xthe day of the week,
  4619. XSunday is 0
  4620. X.TP 8n
  4621. X%W
  4622. Xthe Monday week of the year
  4623. X.TP 8n
  4624. X%x
  4625. Xthe date,
  4626. Xas \fImmm dd yyyy\fP
  4627. X.TP 8n
  4628. X%X
  4629. Xthe time,
  4630. Xas \fIhh:mm:ss\fP
  4631. X.TP 8n
  4632. X%y
  4633. Xthe year of the century
  4634. X.TP 8n
  4635. X%Y
  4636. Xthe year including the century
  4637. X.TP 8n
  4638. X%Z
  4639. Xtime zone abbreviation
  4640. X.PP
  4641. XUsing an undefined format specifier will
  4642. Xproduce random results,
  4643. Xdepending on the version of UNIX you are on.
  4644. X.so z_cr.so
  4645. END_OF_FILE
  4646. if test 7265 -ne `wc -c <'man5/aesub.5'`; then
  4647.     echo shar: \"'man5/aesub.5'\" unpacked with wrong size!
  4648. fi
  4649. # end of 'man5/aesub.5'
  4650. fi
  4651. if test -f 'script/xaegis.tcl' -a "${1}" != "-c" ; then 
  4652.   echo shar: Will not clobber existing file \"'script/xaegis.tcl'\"
  4653. else
  4654. echo shar: Extracting \"'script/xaegis.tcl'\" \(6744 characters\)
  4655. sed "s/^X//" >'script/xaegis.tcl' <<'END_OF_FILE'
  4656. X#! /usr/local/bin/wish -f
  4657. X#
  4658. X#    aegis - project change supervisor
  4659. X#    Copyright (C) 1993 Peter Miller.
  4660. X#    All rights reserved.
  4661. X#
  4662. X#    This program is free software; you can redistribute it and/or modify
  4663. X#    it under the terms of the GNU General Public License as published by
  4664. X#    the Free Software Foundation; either version 2 of the License, or
  4665. X#    (at your option) any later version.
  4666. X#
  4667. X#    This program is distributed in the hope that it will be useful,
  4668. X#    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4669. X#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  4670. X#    GNU General Public License for more details.
  4671. X#
  4672. X#    You should have received a copy of the GNU General Public License
  4673. X#    along with this program; if not, write to the Free Software
  4674. X#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  4675. X#
  4676. X# MANIFEST: wish script to give aegis a GUI interface
  4677. X#
  4678. X# You will need to have tcl/tk/wish installed for this to work correctly.
  4679. X# This script is based on tcl 7.0 and tk 3.3.
  4680. X#
  4681. X
  4682. Xset lib /usr/local/lib/aegis
  4683. X
  4684. X#
  4685. X# set window manager properties for the top-level window
  4686. X#
  4687. Xwm title . Aegis
  4688. Xwm maxsize . 32767 32767
  4689. Xwm minsize . 200 100
  4690. Xwm iconname . Aegis
  4691. Xwm iconbitmap . @$lib/aegis.icon
  4692. Xwm iconmask . @$lib/aegis.mask
  4693. X
  4694. X#
  4695. X# create the menu bar
  4696. X#
  4697. Xframe .menubar -relief raised -borderwidth 1
  4698. Xpack .menubar -side top -fill x
  4699. Xmenubutton .menubar.file -text "File" -menu .menubar.file.m
  4700. Xmenubutton .menubar.command -text "Command" -menu .menubar.command.m
  4701. Xpack append .menubar .menubar.file left .menubar.command left
  4702. X
  4703. Xmenu .menubar.file.m
  4704. X.menubar.file.m add command \
  4705. X    -label "Quit" \
  4706. X    -command exit
  4707. Xmenu .menubar.command.m
  4708. X.menubar.command.m add cascade        \
  4709. X    -label "Developer"        \
  4710. X    -menu .menubar.command.m.developer
  4711. X.menubar.command.m add cascade        \
  4712. X    -label "Reviewer"        \
  4713. X    -menu .menubar.command.m.reviewer
  4714. X.menubar.command.m add cascade        \
  4715. X    -label "Integrator"        \
  4716. X    -menu .menubar.command.m.integrator
  4717. X.menubar.command.m add cascade        \
  4718. X    -label "Administrator"        \
  4719. X    -menu .menubar.command.m.administrator
  4720. X
  4721. Xmenu .menubar.command.m.developer
  4722. X.menubar.command.m.developer add command \
  4723. X    -label "Develop Begin" \
  4724. X    -command not_implemented
  4725. X.menubar.command.m.developer add command \
  4726. X    -label "Develop Begin Undo" \
  4727. X    -command not_implemented
  4728. X.menubar.command.m.developer add command \
  4729. X    -label "Copy File" \
  4730. X    -command not_implemented
  4731. X.menubar.command.m.developer add command \
  4732. X    -label "Copy File Undo" \
  4733. X    -command not_implemented
  4734. X.menubar.command.m.developer add command \
  4735. X    -label "New File" \
  4736. X    -command not_implemented
  4737. X.menubar.command.m.developer add command \
  4738. X    -label "New File Undo" \
  4739. X    -command not_implemented
  4740. X.menubar.command.m.developer add command \
  4741. X    -label "New Test" \
  4742. X    -command not_implemented
  4743. X.menubar.command.m.developer add command \
  4744. X    -label "New Test Undo" \
  4745. X    -command not_implemented
  4746. X.menubar.command.m.developer add command \
  4747. X    -label "Remove File" \
  4748. X    -command not_implemented
  4749. X.menubar.command.m.developer add command \
  4750. X    -label "Remove File Undo" \
  4751. X    -command not_implemented
  4752. X.menubar.command.m.developer add command \
  4753. X    -label "Build" \
  4754. X    -command not_implemented
  4755. X.menubar.command.m.developer add command \
  4756. X    -label "Test" \
  4757. X    -command not_implemented
  4758. X.menubar.command.m.developer add command \
  4759. X    -label "Difference" \
  4760. X    -command not_implemented
  4761. X.menubar.command.m.developer add command \
  4762. X    -label "Develop End" \
  4763. X    -command not_implemented
  4764. X.menubar.command.m.developer add command \
  4765. X    -label "Develop End Undo" \
  4766. X    -command not_implemented
  4767. X
  4768. Xmenu .menubar.command.m.reviewer
  4769. X.menubar.command.m.reviewer add command \
  4770. X    -label "Review Fail" \
  4771. X    -command not_implemented
  4772. X.menubar.command.m.reviewer add command \
  4773. X    -label "Review Pass" \
  4774. X    -command not_implemented
  4775. X.menubar.command.m.reviewer add command \
  4776. X    -label "Review Pass Undo" \
  4777. X    -command not_implemented
  4778. X
  4779. Xmenu .menubar.command.m.integrator
  4780. X.menubar.command.m.integrator add command \
  4781. X    -label "Integrate Begin" \
  4782. X    -command not_implemented
  4783. X.menubar.command.m.integrator add command \
  4784. X    -label "Integrate Begin Undo" \
  4785. X    -command not_implemented
  4786. X.menubar.command.m.integrator add command \
  4787. X    -label "Build" \
  4788. X    -command not_implemented
  4789. X.menubar.command.m.integrator add command \
  4790. X    -label "Test" \
  4791. X    -command not_implemented
  4792. X.menubar.command.m.integrator add command \
  4793. X    -label "Integrate Fail" \
  4794. X    -command not_implemented
  4795. X.menubar.command.m.integrator add command \
  4796. X    -label "Integrate Pass" \
  4797. X    -command not_implemented
  4798. X
  4799. Xmenu .menubar.command.m.administrator
  4800. X.menubar.command.m.administrator add command \
  4801. X    -label "New Change" \
  4802. X    -command not_implemented
  4803. X.menubar.command.m.administrator add command \
  4804. X    -label "New Change Undo" \
  4805. X    -command not_implemented
  4806. X.menubar.command.m.administrator add command \
  4807. X    -label "Edit Change Attributes" \
  4808. X    -command not_implemented
  4809. X.menubar.command.m.administrator add command \
  4810. X    -label "Edit Project Attributes" \
  4811. X    -command not_implemented
  4812. X.menubar.command.m.administrator add command \
  4813. X    -label "New Developer" \
  4814. X    -command not_implemented
  4815. X.menubar.command.m.administrator add command \
  4816. X    -label "Remove Developer" \
  4817. X    -command not_implemented
  4818. X.menubar.command.m.administrator add command \
  4819. X    -label "New Reviewer" \
  4820. X    -command not_implemented
  4821. X.menubar.command.m.administrator add command \
  4822. X    -label "Remove Reviewer" \
  4823. X    -command not_implemented
  4824. X.menubar.command.m.administrator add command \
  4825. X    -label "New Integrator" \
  4826. X    -command not_implemented
  4827. X.menubar.command.m.administrator add command \
  4828. X    -label "Remove Integrator" \
  4829. X    -command not_implemented
  4830. X.menubar.command.m.administrator add command \
  4831. X    -label "New Administrator" \
  4832. X    -command not_implemented
  4833. X.menubar.command.m.administrator add command \
  4834. X    -label "Remove Administrator" \
  4835. X    -command not_implemented
  4836. X.menubar.command.m.administrator add command \
  4837. X    -label "New Project" \
  4838. X    -command not_implemented
  4839. X.menubar.command.m.administrator add command \
  4840. X    -label "Remove Project" \
  4841. X    -command not_implemented
  4842. X.menubar.command.m.administrator add command \
  4843. X    -label "New Project Release" \
  4844. X    -command not_implemented
  4845. X
  4846. X#
  4847. X# message when function is not implemented
  4848. X#
  4849. Xproc not_implemented {} \
  4850. X{
  4851. X    catch { destroy .notimp }
  4852. X    toplevel .notimp
  4853. X    wm title .notimp "Aegis"
  4854. X    wm iconname .notimp "Aegis"
  4855. X
  4856. X    message .notimp.msg \
  4857. X        -text "Work in progress\nFunction not yet implemented" \
  4858. X        -just center -aspect 300
  4859. X    pack .notimp.msg -side top -padx 10 -pady 10
  4860. X
  4861. X    button .notimp.button -text "Sigh" -command "destroy .notimp"
  4862. X    pack .notimp.button -side bottom -padx 10 -pady 10
  4863. X    bind .notimp <Return> "destroy .notimp"
  4864. X    focus .notimp
  4865. X}
  4866. X
  4867. X#
  4868. X# draw the aegis icon in a simple frame
  4869. X#
  4870. Xproc icon_screen { } \
  4871. X{
  4872. X    global lib
  4873. X    catch { destroy .screen }
  4874. X    frame .screen -width 200 -height 100
  4875. X    pack .screen -side bottom
  4876. X    label .screen.icon -bitmap @$lib/aegis.icon
  4877. X    pack .screen.icon -anchor center
  4878. X}
  4879. X
  4880. X#
  4881. X# on start-up, display the icon
  4882. X#
  4883. Xicon_screen
  4884. END_OF_FILE
  4885. if test 6744 -ne `wc -c <'script/xaegis.tcl'`; then
  4886.     echo shar: \"'script/xaegis.tcl'\" unpacked with wrong size!
  4887. fi
  4888. # end of 'script/xaegis.tcl'
  4889. fi
  4890. if test -f 'test/00/t0004a.sh' -a "${1}" != "-c" ; then 
  4891.   echo shar: Will not clobber existing file \"'test/00/t0004a.sh'\"
  4892. else
  4893. echo shar: Extracting \"'test/00/t0004a.sh'\" \(7169 characters\)
  4894. sed "s/^X//" >'test/00/t0004a.sh' <<'END_OF_FILE'
  4895. X#! /bin/sh
  4896. X#
  4897. X#    aegis - project change supervisor
  4898. X#    Copyright (C) 1991, 1992, 1993 Peter Miller.
  4899. X#    All rights reserved.
  4900. X#
  4901. X#    This program is free software; you can redistribute it and/or modify
  4902. X#    it under the terms of the GNU General Public License as published by
  4903. X#    the Free Software Foundation; either version 2 of the License, or
  4904. X#    (at your option) any later version.
  4905. X#
  4906. X#    This program is distributed in the hope that it will be useful,
  4907. X#    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4908. X#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  4909. X#    GNU General Public License for more details.
  4910. X#
  4911. X#    You should have received a copy of the GNU General Public License
  4912. X#    along with this program; if not, write to the Free Software
  4913. X#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  4914. X#
  4915. X# MANIFEST: Test the 'aegis -DIFFerence' command.
  4916. X#
  4917. X# File which are removed should be 'diff /baseline/x /dev/null'ed,
  4918. X# rather than 'diff ./x /dev/null'ed.
  4919. X# This will generate an error out of 'diff' if the local
  4920. X# file is used, because it will not be found.
  4921. X#
  4922. X
  4923. Xunset AEGIS_PROJECT
  4924. Xunset AEGIS_CHANGE
  4925. Xumask 022
  4926. X
  4927. XUSER=${USER:-${LOGNAME:-`whoami`}}
  4928. X
  4929. Xwork=${AEGIS_TMP:-/tmp}/$$
  4930. X
  4931. Xfail()
  4932. X{
  4933. X    set +x
  4934. X    echo "FAILED test of 'aegis -DIFFerence' command" 1>&2
  4935. X    find $work -type d -user $USER -exec chmod u+w {} \;
  4936. X    rm -rf $work
  4937. X    exit 1
  4938. X}
  4939. Xpass()
  4940. X{
  4941. X    set +x
  4942. X    echo PASSED 1>&2
  4943. X    find $work -type d -user $USER -exec chmod u+w {} \;
  4944. X    rm -rf $work
  4945. X    exit 0
  4946. X}
  4947. Xtrap "fail" 1 2 3 15
  4948. X
  4949. X#
  4950. X# some variable to make things earier to read
  4951. X#
  4952. XPAGER=cat
  4953. Xexport PAGER
  4954. Xworklib=$work/lib
  4955. Xworkproj=$work/foo.proj
  4956. Xworkchan=$work/foo.chan
  4957. Xtmp=$work/tmp
  4958. X
  4959. X#
  4960. X# echo commands so we can tell what failed
  4961. X#
  4962. Xset -x
  4963. X
  4964. X#
  4965. X# make the directories
  4966. X#
  4967. Xmkdir $work
  4968. X
  4969. X#
  4970. X# make a new project
  4971. X#
  4972. X./bin/aegis -newpro foo -dir $workproj -v -lib $worklib
  4973. Xif test $? -ne 0 ; then fail; fi
  4974. X
  4975. X#
  4976. X# change project attributes
  4977. X#
  4978. Xcat > $tmp << 'end'
  4979. Xdescription = "A bogus project created to test things.";
  4980. Xdeveloper_may_review = true;
  4981. Xdeveloper_may_integrate = true;
  4982. Xreviewer_may_integrate = true;
  4983. Xend
  4984. X./bin/aegis -proatt $tmp -proj foo -v -lib $worklib
  4985. Xif test $? -ne 0 ; then fail; fi
  4986. X
  4987. X#
  4988. X# create a new change
  4989. X#    make sure it creates the files it should
  4990. X#
  4991. Xcat > $tmp << 'end'
  4992. Xbrief_description = "This change is used to test the aegis functionality \
  4993. Xwith respect to change descriptions.";
  4994. Xcause = internal_bug;
  4995. Xend
  4996. X./bin/aegis -new_change $tmp -project foo -v -lib $worklib
  4997. Xif test $? -ne 0 ; then fail; fi
  4998. X
  4999. X#
  5000. X# create a second change
  5001. X#    make sure it creates the files it should
  5002. X#
  5003. Xcat > $tmp << 'end'
  5004. Xbrief_description = "This change was added to make the various listings \
  5005. Xmuch more interesting.";
  5006. Xcause = internal_bug;
  5007. Xend
  5008. X./bin/aegis -new_change $tmp -project foo -v -lib $worklib
  5009. Xif test $? -ne 0 ; then fail; fi
  5010. X
  5011. X#
  5012. X# add a new developer
  5013. X#
  5014. X./bin/aegis -newdev $USER -p foo -v -lib $worklib
  5015. Xif test $? -ne 0 ; then fail; fi
  5016. X
  5017. X#
  5018. X# begin development of a change
  5019. X#
  5020. X./bin/aegis -devbeg 1 -p foo -dir $workchan -v -lib $worklib
  5021. Xif test $? -ne 0 ; then fail; fi
  5022. X
  5023. X#
  5024. X# add a new files to the change
  5025. X#
  5026. X./bin/aegis -new_file $workchan/main.c -nl -v -lib $worklib -p foo
  5027. Xif test $? -ne 0 ; then fail; fi
  5028. X./bin/aegis -new_file $workchan/fubar -nl -v -lib $worklib -p foo
  5029. Xif test $? -ne 0 ; then fail; fi
  5030. X./bin/aegis -new_file $workchan/config -nl -v -lib $worklib -p foo
  5031. Xif test $? -ne 0 ; then fail; fi
  5032. X
  5033. X#
  5034. X# put something in 'main.c'
  5035. X#
  5036. Xcat > $workchan/main.c << 'end'
  5037. Xvoid
  5038. Xmain()
  5039. X{
  5040. X    exit(0);
  5041. X}
  5042. Xend
  5043. X
  5044. X#
  5045. X# put something in 'config'
  5046. X#
  5047. Xcat > $workchan/config << 'end'
  5048. Xbuild_command = "rm -f foo; cc -o foo -D'VERSION=\"$v\"' main.c";
  5049. Xlink_integration_directory = true;
  5050. X
  5051. Xhistory_get_command =
  5052. X    "co -u'$e' -p $h,v > $o";
  5053. Xhistory_create_command =
  5054. X    "ci -u -m/dev/null -t/dev/null $i $h,v; rcs -U $h,v";
  5055. Xhistory_put_command =
  5056. X    "ci -u -m/dev/null -t/dev/null $i $h,v; rcs -U $h,v";
  5057. Xhistory_query_command =
  5058. X    "rlog -r $h,v | awk '/^head:/ {print $$2}'";
  5059. X
  5060. Xdiff_command = "set +e; diff $orig $i > $out; test $$? -le 1";
  5061. X
  5062. Xdiff3_command = "(diff3 -e $mr $orig $i | sed -e '/^w$$/d' -e '/^q$$/d'; \
  5063. X    echo '1,$$p' ) | ed - $mr > $out";
  5064. Xend
  5065. X
  5066. X#
  5067. X# create a new test
  5068. X#
  5069. X./bin/aegis -nt -v -lib $worklib -p foo
  5070. Xif test $? -ne 0 ; then fail; fi
  5071. X
  5072. X#
  5073. X# put something in 'test/00/t0001a.sh'
  5074. X#
  5075. Xcat > $workchan/test/00/t0001a.sh << 'end'
  5076. X#!/bin/sh
  5077. X#
  5078. X# Project: "foo"
  5079. X# Change: 1
  5080. X#
  5081. X
  5082. Xfail()
  5083. X{
  5084. X    echo SHUZBUTT 1>&2
  5085. X    exit 1
  5086. X}
  5087. Xpass()
  5088. X{
  5089. X    exit 0
  5090. X}
  5091. Xtrap "fail" 1 2 3 15
  5092. X
  5093. X./foo
  5094. Xq=$?
  5095. X
  5096. X# check for signals
  5097. Xif test $q -ge 128 
  5098. Xthen
  5099. X    fail
  5100. Xfi
  5101. X
  5102. X# should not complain
  5103. Xif test $q -ne 0 
  5104. Xthen
  5105. X    fail
  5106. Xfi
  5107. X
  5108. X# it probably worked
  5109. Xpass
  5110. Xend
  5111. X
  5112. X#
  5113. X# let the clock tick over, so the build will be happy
  5114. X#
  5115. Xsleep 1
  5116. X
  5117. X#
  5118. X# build the change
  5119. X#
  5120. X./bin/aegis -build -nl -v -lib $worklib -p foo
  5121. Xif test $? -ne 0 ; then fail; fi
  5122. X
  5123. X#
  5124. X# difference the change
  5125. X#
  5126. X./bin/aegis -diff -nl -v -lib $worklib -p foo
  5127. Xif test $? -ne 0 ; then fail; fi
  5128. X
  5129. X#
  5130. X# test the change
  5131. X#
  5132. X./bin/aegis -test -nl -v -lib $worklib -p foo
  5133. Xif test $? -ne 0 ; then fail; fi
  5134. X
  5135. X#
  5136. X# finish development of the change
  5137. X#
  5138. X./bin/aegis -dev_end -v -lib $worklib -p foo
  5139. Xif test $? -ne 0 ; then fail; fi
  5140. X
  5141. X#
  5142. X# add a new reviewer
  5143. X#
  5144. X./bin/aegis -newrev $USER -p foo -v -lib $worklib
  5145. Xif test $? -ne 0 ; then fail; fi
  5146. X
  5147. X#
  5148. X# pass the review
  5149. X#
  5150. X./bin/aegis -review_pass -chan 1 -proj foo -v -lib $worklib
  5151. Xif test $? -ne 0 ; then fail; fi
  5152. X
  5153. X#
  5154. X# add an integrator
  5155. X#
  5156. X./bin/aegis -newint $USER -p foo -v -lib $worklib
  5157. Xif test $? -ne 0 ; then fail; fi
  5158. X
  5159. X#
  5160. X# start integrating
  5161. X#
  5162. X./bin/aegis -intbeg 1 -p foo -v -lib $worklib
  5163. Xif test $? -ne 0 ; then fail; fi
  5164. X
  5165. X#
  5166. X# integrate build
  5167. X#
  5168. Xsleep 1
  5169. X./bin/aegis -build -nl -v -lib $worklib -p foo
  5170. Xif test $? -ne 0 ; then fail; fi
  5171. X
  5172. X#
  5173. X# integrate test
  5174. X#
  5175. X./bin/aegis -test -nl -v -lib $worklib -p foo
  5176. Xif test $? -ne 0 ; then fail; fi
  5177. X
  5178. X#
  5179. X# integration pass
  5180. X#
  5181. X./bin/aegis -intpass -nl -v -lib $worklib -p foo
  5182. Xif test $? -ne 0 ; then fail; fi
  5183. X
  5184. X#
  5185. X# start work on change 2
  5186. X#
  5187. X./bin/aegis -devbeg 2 -p foo -v -dir $workchan -lib $worklib
  5188. Xif test $? -ne 0 ; then fail; fi
  5189. X
  5190. X#
  5191. X# copy a file into the change
  5192. X#
  5193. X./bin/aegis -cp $workchan/main.c -nl -v -lib $worklib -p foo
  5194. Xif test $? -ne 0 ; then fail; fi
  5195. X
  5196. X#
  5197. X# remove a file with the change
  5198. X#
  5199. X./bin/aegis -rm $workchan/fubar -nl -p foo -v -lib $worklib
  5200. Xif test $? -ne 0 ; then fail; fi
  5201. X
  5202. X#
  5203. X# change the file
  5204. X#
  5205. Xcat > $workchan/main.c << 'end'
  5206. X
  5207. X#include <stdio.h>
  5208. X
  5209. Xvoid
  5210. Xmain(argc, argv)
  5211. X    int    argc;
  5212. X    char    **argv;
  5213. X{
  5214. X    if (argc != 1)
  5215. X    {
  5216. X        fprintf(stderr, "usage: %s\n", argv[0]);
  5217. X        exit(1);
  5218. X    }
  5219. X    printf("hello, world\n");
  5220. X    exit(0);
  5221. X}
  5222. Xend
  5223. X
  5224. X#
  5225. X# need another test
  5226. X#
  5227. X./bin/aegis -nt -v -lib $worklib -p foo
  5228. Xif test $? -ne 0 ; then fail; fi
  5229. Xcat > $workchan/test/00/t0002a.sh << 'end'
  5230. X#!/bin/sh
  5231. X#
  5232. X# Project: "foo"
  5233. X# Change: 2
  5234. X#
  5235. X
  5236. Xfail()
  5237. X{
  5238. X    echo SHUZBUTT 1>&2
  5239. X    exit 1
  5240. X}
  5241. Xpass()
  5242. X{
  5243. X    exit 0
  5244. X}
  5245. Xtrap "fail" 1 2 3 15
  5246. X
  5247. X./foo ickky
  5248. Xq=$?
  5249. X
  5250. X# check for signals
  5251. Xif test $q -ge 128 
  5252. Xthen
  5253. X    fail
  5254. Xfi
  5255. X
  5256. X# should have complained
  5257. Xif test $q -eq 0 
  5258. Xthen
  5259. X    fail
  5260. Xfi
  5261. X
  5262. X# it probably worked
  5263. Xpass
  5264. Xend
  5265. X
  5266. X#
  5267. X# tick over clock to keep build happy
  5268. X#
  5269. Xsleep 1
  5270. X
  5271. X#
  5272. X# diff the change
  5273. X#    This is what all the set-up was about!
  5274. X#
  5275. X./bin/aegis -diff -nl -v -lib $worklib -p foo
  5276. Xif test $? -ne 0 ; then fail; fi
  5277. X
  5278. X# should be no automatic logging
  5279. Xif test "`find $work -name 'aegis.log' -print`" != "" ; then fail; fi
  5280. X
  5281. X#
  5282. X# the things tested in this test, worked
  5283. X#
  5284. Xpass
  5285. X
  5286. END_OF_FILE
  5287. if test 7169 -ne `wc -c <'test/00/t0004a.sh'`; then
  5288.     echo shar: \"'test/00/t0004a.sh'\" unpacked with wrong size!
  5289. fi
  5290. # end of 'test/00/t0004a.sh'
  5291. fi
  5292. if test -f 'test/00/t0007a.sh' -a "${1}" != "-c" ; then 
  5293.   echo shar: Will not clobber existing file \"'test/00/t0007a.sh'\"
  5294. else
  5295. echo shar: Extracting \"'test/00/t0007a.sh'\" \(6476 characters\)
  5296. sed "s/^X//" >'test/00/t0007a.sh' <<'END_OF_FILE'
  5297. X#! /bin/sh
  5298. X#
  5299. X#    aegis - project change supervisor
  5300. X#    Copyright (C) 1991, 1992, 1993 Peter Miller.
  5301. X#    All rights reserved.
  5302. X#
  5303. X#    This program is free software; you can redistribute it and/or modify
  5304. X#    it under the terms of the GNU General Public License as published by
  5305. X#    the Free Software Foundation; either version 2 of the License, or
  5306. X#    (at your option) any later version.
  5307. X#
  5308. X#    This program is distributed in the hope that it will be useful,
  5309. X#    but WITHOUT ANY WARRANTY; without even the implied warranty of
  5310. X#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  5311. X#    GNU General Public License for more details.
  5312. X#
  5313. X#    You should have received a copy of the GNU General Public License
  5314. X#    along with this program; if not, write to the Free Software
  5315. X#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  5316. X#
  5317. X# MANIFEST: test for correct behaviour around symbolic links
  5318. X#
  5319. X# Make sure can cope with symbolic links.
  5320. X# This test will always pass on systems without symbolic links.
  5321. X#
  5322. X
  5323. Xunset AEGIS_PROJECT
  5324. Xunset AEGIS_CHANGE
  5325. Xumask 022
  5326. X
  5327. XUSER=${USER:-${LOGNAME:-`whoami`}}
  5328. X
  5329. XPAGER=cat
  5330. Xexport PAGER
  5331. Xwork=${AEGIS_TMP:-/tmp}/$$
  5332. X
  5333. Xhere=`pwd`
  5334. Xif test $? -ne 0 ; then exit 1; fi
  5335. Xmkdir $work
  5336. Xif test $? -ne 0 ; then exit 1; fi
  5337. X
  5338. Xfail()
  5339. X{
  5340. X    set +x
  5341. X    cd $here
  5342. X    echo FAILED test for correct behaviour around symbolic links 1>&2
  5343. X    find $work -type d -user $USER -exec chmod u+w {} \;
  5344. X    rm -rf $work
  5345. X    exit 1
  5346. X}
  5347. Xpass()
  5348. X{
  5349. X    set +x
  5350. X    cd $here
  5351. X    find $work -type d -user $USER -exec chmod u+w {} \;
  5352. X    rm -rf $work
  5353. X    exit 0
  5354. X}
  5355. Xtrap "fail" 1 2 3 15
  5356. X
  5357. Xcd $work
  5358. Xif test $? -ne 0 ; then fail; fi
  5359. X
  5360. X#
  5361. X# program to ask questions about symlinks
  5362. X#
  5363. Xcat > symlink.c << 'fubar'
  5364. X#include <sys/types.h>
  5365. X#include <sys/stat.h>
  5366. Xvoid
  5367. Xmain(argc, argv)
  5368. X    int    argc;
  5369. X    char    **argv;
  5370. X{
  5371. X#ifdef S_IFLNK
  5372. X    if (argc == 2)
  5373. X    {
  5374. X        struct stat st;
  5375. X        if (lstat(argv[1], &st))
  5376. X            exit(0);
  5377. X        /* fails if file exists */
  5378. X        exit(1);
  5379. X    }
  5380. X    exit(0);
  5381. X#else
  5382. X    exit(2);
  5383. X#endif
  5384. X}
  5385. Xfubar
  5386. Xif test $? -ne 0 ; then fail; fi
  5387. Xcc -o symlink symlink.c
  5388. Xif test $? -ne 0 ; then fail; fi
  5389. X
  5390. X#
  5391. X# if this system has no symlinks
  5392. X# automagically pass the test
  5393. X#
  5394. X./symlink
  5395. Xif test $? -ge 2 ; then pass; fi
  5396. X
  5397. X#
  5398. X# some variable to make things earier to read
  5399. X#
  5400. Xworklib=$work/lib
  5401. Xworkproj=$work/foo.proj
  5402. Xworkchan=$work/foo.chan
  5403. Xtmp=$work/tmp
  5404. Xsymlinktestfile=$workchan/symlink
  5405. Xsymlinkdest=$workchan/symlinkdest
  5406. X
  5407. X#
  5408. X# make a new project
  5409. X#    and check files it should have made
  5410. X#
  5411. X$here/bin/aegis -newpro foo -dir $workproj -lib $worklib
  5412. Xif test $? -ne 0 ; then fail; fi
  5413. X
  5414. X#
  5415. X# change project attributes
  5416. X#
  5417. Xcat > $tmp << 'end'
  5418. Xdescription = "A bogus project created to test things.";
  5419. Xdeveloper_may_review = true;
  5420. Xdeveloper_may_integrate = true;
  5421. Xreviewer_may_integrate = true;
  5422. Xend
  5423. X$here/bin/aegis -proatt $tmp -proj foo -lib $worklib
  5424. Xif test $? -ne 0 ; then fail; fi
  5425. X
  5426. X#
  5427. X# create a new change
  5428. X#    make sure it creates the files it should
  5429. X#
  5430. Xcat > $tmp << 'end'
  5431. Xbrief_description = "This change is used to test the aegis functionality \
  5432. Xwith respect to change descriptions.";
  5433. Xcause = internal_bug;
  5434. Xend
  5435. X$here/bin/aegis -new_change $tmp -project foo -lib $worklib
  5436. Xif test $? -ne 0 ; then fail; fi
  5437. X
  5438. X#
  5439. X# add a new developer
  5440. X#
  5441. X$here/bin/aegis -newdev $USER -p foo -lib $worklib
  5442. Xif test $? -ne 0 ; then fail; fi
  5443. X
  5444. X#
  5445. X# begin development of a change
  5446. X#    check it made the files it should
  5447. X#
  5448. X$here/bin/aegis -devbeg 1 -p foo -dir $workchan -lib $worklib
  5449. Xif test $? -ne 0 ; then fail; fi
  5450. X
  5451. X#
  5452. X# create a symbolic link in the development directory
  5453. X#
  5454. Xmkdir $symlinkdest
  5455. Xif test $? -ne 0 ; then fail; fi
  5456. Xln -s $symlinkdest $symlinktestfile
  5457. Xif test $? -ne 0 ; then fail; fi
  5458. X
  5459. X#
  5460. X# add a new files to the change
  5461. X#
  5462. X$here/bin/aegis -new_file $workchan/main.c -nl -lib $worklib -p foo
  5463. Xif test $? -ne 0 ; then fail; fi
  5464. X$here/bin/aegis -new_file $workchan/config -nl -lib $worklib -p foo
  5465. Xif test $? -ne 0 ; then fail; fi
  5466. Xcat > $workchan/main.c << 'end'
  5467. Xvoid
  5468. Xmain()
  5469. X{
  5470. X    exit(0);
  5471. X}
  5472. Xend
  5473. Xcat > $workchan/config << 'end'
  5474. Xbuild_command = "rm -f foo; cc -o foo -D'VERSION=\"$v\"' main.c";
  5475. Xlink_integration_directory = true;
  5476. X
  5477. Xhistory_get_command =
  5478. X    "co -u'$e' -p $h,v > $o";
  5479. Xhistory_create_command =
  5480. X    "ci -u -m/dev/null -t/dev/null $i $h,v; rcs -U $h,v";
  5481. Xhistory_put_command =
  5482. X    "ci -u -m/dev/null -t/dev/null $i $h,v; rcs -U $h,v";
  5483. Xhistory_query_command =
  5484. X    "rlog -r $h,v | awk '/^head:/ {print $$2}'";
  5485. X
  5486. Xdiff_command = "set +e; diff $orig $i > $out; test $$? -le 1";
  5487. X
  5488. Xdiff3_command = "(diff3 -e $mr $orig $i | sed -e '/^w$$/d' -e '/^q$$/d'; \
  5489. X    echo '1,$$p' ) | ed - $mr > $out";
  5490. Xend
  5491. X
  5492. X#
  5493. X# create a new test
  5494. X#
  5495. X$here/bin/aegis -nt -lib $worklib -p foo
  5496. Xif test $? -ne 0 ; then fail; fi
  5497. Xcat > $workchan/test/00/t0001a.sh << 'end'
  5498. X#!/bin/sh
  5499. X#
  5500. X# Project: "foo"
  5501. Xfail()
  5502. X{
  5503. X    echo SHUZBUTT 1>&2
  5504. X    exit 1
  5505. X}
  5506. Xpass()
  5507. X{
  5508. X    exit 0
  5509. X}
  5510. Xtrap "fail" 1 2 3 15
  5511. X
  5512. X./foo
  5513. Xq=$?
  5514. X
  5515. X# check for signals
  5516. Xif test $q -ge 128 
  5517. Xthen
  5518. X    fail
  5519. Xfi
  5520. X
  5521. X# should not complain
  5522. Xif test $q -ne 0 
  5523. Xthen
  5524. X    fail
  5525. Xfi
  5526. X
  5527. X# it probably worked
  5528. Xpass
  5529. Xend
  5530. X
  5531. X#
  5532. X# let the clock tick over, so the build will be happy
  5533. X#
  5534. Xsleep 1
  5535. X
  5536. X#
  5537. X# build the change
  5538. X#
  5539. X$here/bin/aegis -build -nl -lib $worklib -p foo > /dev/null 2>&1
  5540. Xif test $? -ne 0 ; then fail; fi
  5541. X
  5542. X#
  5543. X# difference the change
  5544. X#
  5545. X$here/bin/aegis -diff -nl -lib $worklib -p foo > /dev/null 2>&1
  5546. Xif test $? -ne 0 ; then fail; fi
  5547. X
  5548. X#
  5549. X# test the change
  5550. X#
  5551. X$here/bin/aegis -test -nl -lib $worklib -p foo > /dev/null 2>&1
  5552. Xif test $? -ne 0 ; then fail; fi
  5553. X
  5554. X#
  5555. X# finish development of the change
  5556. X#
  5557. X$here/bin/aegis -dev_end -lib $worklib -p foo
  5558. Xif test $? -ne 0 ; then fail; fi
  5559. X
  5560. X#
  5561. X# add a new reviewer
  5562. X#
  5563. X$here/bin/aegis -newrev $USER -p foo -lib $worklib
  5564. Xif test $? -ne 0 ; then fail; fi
  5565. X
  5566. X#
  5567. X# pass the review
  5568. X#
  5569. X$here/bin/aegis -review_pass -chan 1 -proj foo -lib $worklib
  5570. Xif test $? -ne 0 ; then fail; fi
  5571. X
  5572. X#
  5573. X# add an integrator
  5574. X#
  5575. X$here/bin/aegis -newint $USER -p foo -lib $worklib
  5576. Xif test $? -ne 0 ; then fail; fi
  5577. X
  5578. X#
  5579. X# start integrating
  5580. X#
  5581. X$here/bin/aegis -intbeg 1 -p foo -lib $worklib
  5582. Xif test $? -ne 0 ; then fail; fi
  5583. X
  5584. X#
  5585. X# integrate build
  5586. X#
  5587. Xsleep 1
  5588. X$here/bin/aegis -build -nl -lib $worklib -p foo > /dev/null 2>&1
  5589. Xif test $? -ne 0 ; then fail; fi
  5590. X$here/bin/aegis -test -nl -lib $worklib -p foo > /dev/null 2>&1
  5591. Xif test $? -ne 0 ; then fail; fi
  5592. X
  5593. X#
  5594. X# pass the integration
  5595. X#
  5596. X$here/bin/aegis -intpass -nl -lib $worklib -p foo > /dev/null 2>&1
  5597. Xif test $? -ne 0 ; then fail; fi
  5598. X
  5599. X#
  5600. X# see if the symbolic link in the work area has been removed
  5601. X# or wether it is still there
  5602. X#
  5603. X./symlink $symlinktestfile
  5604. Xif test $? -ne 0 ; then fail; fi
  5605. X
  5606. X# should be no automatic logging
  5607. Xif test "`find $work -name 'aegis.log' -print`" != "" ; then fail; fi
  5608. X
  5609. X#
  5610. X# the things tested in this test, worked
  5611. X#
  5612. Xpass
  5613. END_OF_FILE
  5614. if test 6476 -ne `wc -c <'test/00/t0007a.sh'`; then
  5615.     echo shar: \"'test/00/t0007a.sh'\" unpacked with wrong size!
  5616. fi
  5617. # end of 'test/00/t0007a.sh'
  5618. fi
  5619. if test -f 'test/00/t0016a.sh' -a "${1}" != "-c" ; then 
  5620.   echo shar: Will not clobber existing file \"'test/00/t0016a.sh'\"
  5621. else
  5622. echo shar: Extracting \"'test/00/t0016a.sh'\" \(7083 characters\)
  5623. sed "s/^X//" >'test/00/t0016a.sh' <<'END_OF_FILE'
  5624. X#! /bin/sh
  5625. X#
  5626. X#    aegis - project change supervisor
  5627. X#    Copyright (C) 1993 Peter Miller.
  5628. X#    All rights reserved.
  5629. X#
  5630. X#    This program is free software; you can redistribute it and/or modify
  5631. X#    it under the terms of the GNU General Public License as published by
  5632. X#    the Free Software Foundation; either version 2 of the License, or
  5633. X#    (at your option) any later version.
  5634. X#
  5635. X#    This program is distributed in the hope that it will be useful,
  5636. X#    but WITHOUT ANY WARRANTY; without even the implied warranty of
  5637. X#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  5638. X#    GNU General Public License for more details.
  5639. X#
  5640. X#    You should have received a copy of the GNU General Public License
  5641. X#    along with this program; if not, write to the Free Software
  5642. X#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  5643. X#
  5644. X# MANIFEST: Test the aemv functionality
  5645. X#
  5646. X
  5647. Xunset AEGIS_PROJECT
  5648. Xunset AEGIS_CHANGE
  5649. Xumask 022
  5650. X
  5651. XUSER=${USER:-${LOGNAME:-`whoami`}}
  5652. X
  5653. Xwork=${AEGIS_TMP:-/tmp}/$$
  5654. XPAGER=cat
  5655. Xexport PAGER
  5656. X
  5657. Xhere=`pwd`
  5658. Xif test $? -ne 0 ; then exit 1; fi
  5659. Xmkdir $work
  5660. Xif test $? -ne 0 ; then exit 1; fi
  5661. X
  5662. Xfail()
  5663. X{
  5664. X    set +x
  5665. X    echo FAILED test of aemv command 1>&2
  5666. X    cd $here
  5667. X    find $work -type d -user $USER -exec chmod u+w {} \;
  5668. X    rm -rf $work
  5669. X    exit 1
  5670. X}
  5671. Xpass()
  5672. X{
  5673. X    set +x
  5674. X    echo PASSED 1>&2
  5675. X    cd $here
  5676. X    find $work -type d -user $USER -exec chmod u+w {} \;
  5677. X    rm -rf $work
  5678. X    exit 0
  5679. X}
  5680. Xtrap "fail" 1 2 3 15
  5681. X
  5682. Xcd $work
  5683. Xif test $? -ne 0 ; then fail; fi
  5684. X
  5685. X#
  5686. X# some variable to make things earier to read
  5687. X#
  5688. Xworklib=$work/lib
  5689. Xworkproj=$work/foo.proj
  5690. Xworkchan=$work/foo.chan
  5691. Xworkchan3=$work/foo.chan3
  5692. Xtmp=$work/tmp
  5693. X
  5694. X#
  5695. X# echo commands so we can tell what failed
  5696. X#
  5697. Xset -x
  5698. X
  5699. X#
  5700. X# make a new project
  5701. X#    and check files it should have made
  5702. X#
  5703. X$here/bin/aegis -newpro foo -dir $workproj -v -lib $worklib
  5704. Xif test $? -ne 0 ; then fail; fi
  5705. X
  5706. X#
  5707. X# change project attributes
  5708. X#
  5709. Xcat > $tmp << 'end'
  5710. Xdescription = "A bogus project created to test things.";
  5711. Xdeveloper_may_review = true;
  5712. Xdeveloper_may_integrate = true;
  5713. Xreviewer_may_integrate = true;
  5714. Xdefault_test_exemption = true;
  5715. Xend
  5716. X$here/bin/aegis -proatt $tmp -proj foo -v -lib $worklib
  5717. Xif test $? -ne 0 ; then fail; fi
  5718. X
  5719. X#
  5720. X# create a new change
  5721. X#    make sure it creates the files it should
  5722. X#
  5723. Xcat > $tmp << 'end'
  5724. Xbrief_description = "This change is used to test the aegis functionality \
  5725. Xwith respect to change descriptions.";
  5726. Xcause = internal_bug;
  5727. Xend
  5728. X$here/bin/aegis -new_change $tmp -project foo -v -lib $worklib
  5729. Xif test $? -ne 0 ; then fail; fi
  5730. X
  5731. X#
  5732. X# create a second change
  5733. X#    make sure it creates the files it should
  5734. X#
  5735. Xcat > $tmp << 'end'
  5736. Xbrief_description = "This change was added to make the various listings \
  5737. Xmuch more interesting.";
  5738. Xcause = internal_bug;
  5739. Xend
  5740. X$here/bin/aegis -new_change $tmp -project foo -v -lib $worklib
  5741. Xif test $? -ne 0 ; then fail; fi
  5742. X
  5743. X#
  5744. X# add a new developer
  5745. X#
  5746. X$here/bin/aegis -newdev $USER -p foo -v -lib $worklib
  5747. Xif test $? -ne 0 ; then fail; fi
  5748. X
  5749. X#
  5750. X# begin development of a change
  5751. X#    check it made the files it should
  5752. X#
  5753. X$here/bin/aegis -devbeg 1 -p foo -dir $workchan -v -lib $worklib
  5754. Xif test $? -ne 0 ; then fail; fi
  5755. X
  5756. X#
  5757. X# add a new files to the change
  5758. X#
  5759. X$here/bin/aegis -new_file $workchan/main.c -nl -v -lib $worklib -p foo
  5760. Xif test $? -ne 0 ; then fail; fi
  5761. X$here/bin/aegis -new_file $workchan/old -nl -v -lib $worklib -p foo
  5762. Xif test $? -ne 0 ; then fail; fi
  5763. X$here/bin/aegis -new_file $workchan/config -nl -v -lib $worklib -p foo
  5764. Xif test $? -ne 0 ; then fail; fi
  5765. Xcat > $workchan/main.c << 'end'
  5766. Xvoid
  5767. Xmain()
  5768. X{
  5769. X    exit(0);
  5770. X}
  5771. Xend
  5772. Xcat > $workchan/config << 'end'
  5773. Xbuild_command = "rm -f foo; cc -o foo -D'VERSION=\"$version\"' main.c";
  5774. Xlink_integration_directory = true;
  5775. X
  5776. Xhistory_get_command =
  5777. X    "co -u'$e' -p $h,v > $o";
  5778. Xhistory_create_command =
  5779. X    "ci -u -m/dev/null -t/dev/null $i $h,v; rcs -U $h,v";
  5780. Xhistory_put_command =
  5781. X    "ci -u -m/dev/null -t/dev/null $i $h,v; rcs -U $h,v";
  5782. Xhistory_query_command =
  5783. X    "rlog -r $h,v | awk '/^head:/ {print $$2}'";
  5784. X
  5785. Xdiff_command = "set +e; diff $orig $i > $out; test $$? -le 1";
  5786. X
  5787. Xdiff3_command = "(diff3 -e $mr $orig $i | sed -e '/^w$$/d' -e '/^q$$/d'; \
  5788. X    echo '1,$$p' ) | ed - $mr > $out";
  5789. Xend
  5790. X
  5791. X#
  5792. X# create a new test
  5793. X#
  5794. X$here/bin/aegis -nt -v -lib $worklib -p foo
  5795. Xif test $? -ne 0 ; then fail; fi
  5796. Xcat > $workchan/test/00/t0001a.sh << 'end'
  5797. X#!/bin/sh
  5798. X
  5799. Xfail()
  5800. X{
  5801. X    echo SHUZBUTT 1>&2
  5802. X    exit 1
  5803. X}
  5804. Xpass()
  5805. X{
  5806. X    exit 0
  5807. X}
  5808. Xtrap "fail" 1 2 3 15
  5809. X
  5810. X./foo
  5811. Xif test $? -ne 0; then fail; fi
  5812. X
  5813. X# it probably worked
  5814. Xpass
  5815. Xend
  5816. X
  5817. X#
  5818. X# let the clock tick over, so the build will be happy
  5819. X#
  5820. Xsleep 1
  5821. X
  5822. X#
  5823. X# build the change
  5824. X#
  5825. X$here/bin/aegis -build -nl -v -lib $worklib -p foo
  5826. Xif test $? -ne 0 ; then fail; fi
  5827. X
  5828. X#
  5829. X# difference the change
  5830. X#
  5831. X$here/bin/aegis -diff -nl -v -lib $worklib -p foo
  5832. Xif test $? -ne 0 ; then fail; fi
  5833. X
  5834. X#
  5835. X# test the change
  5836. X#
  5837. X$here/bin/aegis -test -nl -v -lib $worklib -p foo
  5838. Xif test $? -ne 0 ; then fail; fi
  5839. X
  5840. X#
  5841. X# finish development of the change
  5842. X#
  5843. X$here/bin/aegis -dev_end -v -lib $worklib -p foo
  5844. Xif test $? -ne 0 ; then fail; fi
  5845. X
  5846. X#
  5847. X# add a new reviewer
  5848. X#
  5849. X$here/bin/aegis -newrev $USER -p foo -v -lib $worklib
  5850. Xif test $? -ne 0 ; then fail; fi
  5851. X
  5852. X#
  5853. X# pass the review
  5854. X#
  5855. X$here/bin/aegis -review_pass -chan 1 -proj foo -v -lib $worklib
  5856. Xif test $? -ne 0 ; then fail; fi
  5857. X
  5858. X#
  5859. X# add an integrator
  5860. X#
  5861. X$here/bin/aegis -newint $USER -p foo -v -lib $worklib
  5862. Xif test $? -ne 0 ; then fail; fi
  5863. X
  5864. X#
  5865. X# start integrating
  5866. X#
  5867. X$here/bin/aegis -intbeg 1 -p foo -v -lib $worklib
  5868. Xif test $? -ne 0 ; then fail; fi
  5869. X
  5870. X#
  5871. X# integrate build
  5872. X#
  5873. Xsleep 1
  5874. X$here/bin/aegis -build -nl -v -lib $worklib -p foo
  5875. Xif test $? -ne 0 ; then fail; fi
  5876. X$here/bin/aegis -test -nl -v -lib $worklib -p foo
  5877. Xif test $? -ne 0 ; then fail; fi
  5878. X
  5879. X#
  5880. X# pass the integration
  5881. X#
  5882. X$here/bin/aegis -intpass -nl -v -lib $worklib -p foo
  5883. Xif test $? -ne 0 ; then fail; fi
  5884. X
  5885. X#
  5886. X# start work on change 2
  5887. X#
  5888. X$here/bin/aegis -devbeg 2 -p foo -v -dir $workchan -lib $worklib
  5889. Xif test $? -ne 0 ; then fail; fi
  5890. X
  5891. X#
  5892. X# move a file in change 2
  5893. X#
  5894. X$here/bin/aegis -mv $workchan/old $workchan/new -nl -v -lib $worklib -c 2 -p foo
  5895. Xif test $? -ne 0 ; then fail; fi
  5896. X$here/bin/aegis -cp $workchan/main.c -nl -v -lib $worklib -c 2 -p foo
  5897. Xif test $? -ne 0 ; then fail; fi
  5898. X
  5899. X$here/bin/aegis -l cf -v -lib $worklib -p foo -c 2
  5900. X
  5901. X#
  5902. X# tick over clock to keep build happy
  5903. X#
  5904. Xsleep 1
  5905. X
  5906. X#
  5907. X# build the change
  5908. X# diff the change
  5909. X#
  5910. X$here/bin/aegis -b -nl -v -lib $worklib -c 2 -p foo
  5911. Xif test $? -ne 0 ; then fail; fi
  5912. X$here/bin/aegis -diff -nl -v -lib $worklib -c 2 -p foo
  5913. Xif test $? -ne 0 ; then fail; fi
  5914. X
  5915. X#
  5916. X# end development
  5917. X# review pass
  5918. X# start integrating
  5919. X#
  5920. X$here/bin/aegis -devend -v -lib $worklib -c 2 -p foo
  5921. Xif test $? -ne 0 ; then fail; fi
  5922. X$here/bin/aegis -revpass -v -c 2 -p foo -lib $worklib
  5923. Xif test $? -ne 0 ; then fail; fi
  5924. X$here/bin/aegis -intbeg -v -c 2 -p foo -lib $worklib
  5925. Xif test $? -ne 0 ; then fail; fi
  5926. X
  5927. X#
  5928. X# build the integration
  5929. X#
  5930. Xsleep 1
  5931. X$here/bin/aegis -b -nl -v -lib $worklib -c 2 -p foo
  5932. Xif test $? -ne 0 ; then fail; fi
  5933. X
  5934. X#
  5935. X# pass the integration
  5936. X#    make sure it create the files, etc
  5937. X#
  5938. X$here/bin/aegis -intpass -nl -lib $worklib -c 2 -p foo
  5939. Xif test $? -ne 0 ; then fail; fi
  5940. X
  5941. X$here/bin/aegis -l pf -v -lib $worklib -p foo
  5942. X
  5943. X#
  5944. X# Only definite negatives are possible.
  5945. X# The functionality exercised by this test appears to work,
  5946. X# no other guarantees are made.
  5947. X#
  5948. Xpass
  5949. END_OF_FILE
  5950. if test 7083 -ne `wc -c <'test/00/t0016a.sh'`; then
  5951.     echo shar: \"'test/00/t0016a.sh'\" unpacked with wrong size!
  5952. fi
  5953. # end of 'test/00/t0016a.sh'
  5954. fi
  5955. if test -f 'test/00/t0018a.sh' -a "${1}" != "-c" ; then 
  5956.   echo shar: Will not clobber existing file \"'test/00/t0018a.sh'\"
  5957. else
  5958. echo shar: Extracting \"'test/00/t0018a.sh'\" \(7444 characters\)
  5959. sed "s/^X//" >'test/00/t0018a.sh' <<'END_OF_FILE'
  5960. X#! /bin/sh
  5961. X#
  5962. X#    aegis - project change supervisor
  5963. X#    Copyright (C) 1993 Peter Miller.
  5964. X#    All rights reserved.
  5965. X#
  5966. X#    This program is free software; you can redistribute it and/or modify
  5967. X#    it under the terms of the GNU General Public License as published by
  5968. X#    the Free Software Foundation; either version 2 of the License, or
  5969. X#    (at your option) any later version.
  5970. X#
  5971. X#    This program is distributed in the hope that it will be useful,
  5972. X#    but WITHOUT ANY WARRANTY; without even the implied warranty of
  5973. X#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  5974. X#    GNU General Public License for more details.
  5975. X#
  5976. X#    You should have received a copy of the GNU General Public License
  5977. X#    along with this program; if not, write to the Free Software
  5978. X#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  5979. X#
  5980. X# MANIFEST: Test the 'aegis -NewFile -Build' command.
  5981. X#
  5982. X
  5983. Xunset AEGIS_PROJECT
  5984. Xunset AEGIS_CHANGE
  5985. Xumask 022
  5986. X
  5987. XUSER=${USER:-${LOGNAME:-`whoami`}}
  5988. X
  5989. Xwork=${AEGIS_TMP:-/tmp}/$$
  5990. X
  5991. Xfail()
  5992. X{
  5993. X    set +x
  5994. X    echo "FAILED test of 'aegis -NewFile -Build' command" 1>&2
  5995. X    find $work -type d -user $USER -exec chmod u+w {} \;
  5996. X    rm -rf $work
  5997. X    exit 1
  5998. X}
  5999. Xpass()
  6000. X{
  6001. X    set +x
  6002. X    echo PASSED 1>&2
  6003. X    find $work -type d -user $USER -exec chmod u+w {} \;
  6004. X    rm -rf $work
  6005. X    exit 0
  6006. X}
  6007. Xtrap "fail" 1 2 3 15
  6008. X
  6009. X#
  6010. X# some variable to make things earier to read
  6011. X#
  6012. XPAGER=cat
  6013. Xexport PAGER
  6014. Xworklib=$work/lib
  6015. Xworkproj=$work/foo.proj
  6016. Xworkchan=$work/foo.chan
  6017. Xtmp=$work/tmp
  6018. X
  6019. X#
  6020. X# echo commands so we can tell what failed
  6021. X#
  6022. Xset -x
  6023. X
  6024. X#
  6025. X# make the directories
  6026. X#
  6027. Xmkdir $work
  6028. X
  6029. X#
  6030. X# make a new project
  6031. X#
  6032. X./bin/aegis -newpro foo -dir $workproj -v -lib $worklib
  6033. Xif test $? -ne 0 ; then fail; fi
  6034. X
  6035. X#
  6036. X# change project attributes
  6037. X#
  6038. Xcat > $tmp << 'end'
  6039. Xdescription = "A bogus project created to test things.";
  6040. Xdeveloper_may_review = true;
  6041. Xdeveloper_may_integrate = true;
  6042. Xreviewer_may_integrate = true;
  6043. Xend
  6044. X./bin/aegis -proatt $tmp -proj foo -v -lib $worklib
  6045. Xif test $? -ne 0 ; then fail; fi
  6046. X
  6047. X#
  6048. X# create a new change
  6049. X#    make sure it creates the files it should
  6050. X#
  6051. Xcat > $tmp << 'end'
  6052. Xbrief_description = "This change is used to test the aegis functionality \
  6053. Xwith respect to change descriptions.";
  6054. Xcause = internal_bug;
  6055. Xend
  6056. X./bin/aegis -new_change $tmp -project foo -v -lib $worklib
  6057. Xif test $? -ne 0 ; then fail; fi
  6058. X
  6059. X#
  6060. X# add a new developer
  6061. X#
  6062. X./bin/aegis -newdev $USER -p foo -v -lib $worklib
  6063. Xif test $? -ne 0 ; then fail; fi
  6064. X
  6065. X#
  6066. X# begin development of a change
  6067. X#
  6068. X./bin/aegis -devbeg 1 -p foo -dir $workchan -v -lib $worklib
  6069. Xif test $? -ne 0 ; then fail; fi
  6070. X
  6071. X#
  6072. X# add a new files to the change
  6073. X#
  6074. X./bin/aegis -new_file $workchan/main.c -nl -v -lib $worklib -p foo
  6075. Xif test $? -ne 0 ; then fail; fi
  6076. X./bin/aegis -new_file $workchan/fubar -nl -v -lib $worklib -p foo
  6077. Xif test $? -ne 0 ; then fail; fi
  6078. X./bin/aegis -new_file $workchan/version -b -nl -v -lib $worklib -p foo
  6079. Xif test $? -ne 0 ; then fail; fi
  6080. X./bin/aegis -new_file $workchan/config -nl -v -lib $worklib -p foo
  6081. Xif test $? -ne 0 ; then fail; fi
  6082. X
  6083. X#
  6084. X# put something in 'main.c'
  6085. X#
  6086. Xcat > $workchan/main.c << 'end'
  6087. Xvoid
  6088. Xmain()
  6089. X{
  6090. X    exit(0);
  6091. X}
  6092. Xend
  6093. X
  6094. X#
  6095. X# put something in 'config'
  6096. X#
  6097. Xcat > $workchan/config << 'end'
  6098. Xbuild_command = "rm -f foo version; cc -o foo main.c; echo '$v' > version";
  6099. Xlink_integration_directory = true;
  6100. X
  6101. Xhistory_get_command =
  6102. X    "co -u'$e' -p $h,v > $o";
  6103. Xhistory_create_command =
  6104. X    "ci -u -m/dev/null -t/dev/null $i $h,v; rcs -U $h,v";
  6105. Xhistory_put_command =
  6106. X    "ci -u -m/dev/null -t/dev/null $i $h,v; rcs -U $h,v";
  6107. Xhistory_query_command =
  6108. X    "rlog -r $h,v | awk '/^head:/ {print $$2}'";
  6109. X
  6110. Xdiff_command = "set +e; diff $orig $i > $out; test $$? -le 1";
  6111. X
  6112. Xdiff3_command = "(diff3 -e $mr $orig $i | sed -e '/^w$$/d' -e '/^q$$/d'; \
  6113. X    echo '1,$$p' ) | ed - $mr > $out";
  6114. Xend
  6115. X
  6116. X#
  6117. X# create a new test
  6118. X#
  6119. X./bin/aegis -nt -v -lib $worklib -p foo
  6120. Xif test $? -ne 0 ; then fail; fi
  6121. X
  6122. X#
  6123. X# put something in 'test/00/t0001a.sh'
  6124. X#
  6125. Xcat > $workchan/test/00/t0001a.sh << 'end'
  6126. X#!/bin/sh
  6127. X#
  6128. X# Project: "foo"
  6129. X# Change: 1
  6130. X#
  6131. X
  6132. Xfail()
  6133. X{
  6134. X    echo SHUZBUTT 1>&2
  6135. X    exit 1
  6136. X}
  6137. Xpass()
  6138. X{
  6139. X    exit 0
  6140. X}
  6141. Xtrap "fail" 1 2 3 15
  6142. X
  6143. X./foo
  6144. Xq=$?
  6145. X
  6146. X# check for signals
  6147. Xif test $q -ge 128 
  6148. Xthen
  6149. X    fail
  6150. Xfi
  6151. X
  6152. X# should not complain
  6153. Xif test $q -ne 0 
  6154. Xthen
  6155. X    fail
  6156. Xfi
  6157. X
  6158. X# it probably worked
  6159. Xpass
  6160. Xend
  6161. X
  6162. X#
  6163. X# let the clock tick over, so the build will be happy
  6164. X#
  6165. Xsleep 1
  6166. X
  6167. X#
  6168. X# build the change
  6169. X#
  6170. X./bin/aegis -build -nl -v -lib $worklib -p foo
  6171. Xif test $? -ne 0 ; then fail; fi
  6172. X
  6173. X#
  6174. X# difference the change
  6175. X#
  6176. X./bin/aegis -diff -nl -v -lib $worklib -p foo
  6177. Xif test $? -ne 0 ; then fail; fi
  6178. X
  6179. X#
  6180. X# test the change
  6181. X#
  6182. X./bin/aegis -test -nl -v -lib $worklib -p foo
  6183. Xif test $? -ne 0 ; then fail; fi
  6184. X
  6185. X#
  6186. X# finish development of the change
  6187. X#
  6188. X./bin/aegis -dev_end -v -lib $worklib -p foo
  6189. Xif test $? -ne 0 ; then fail; fi
  6190. X
  6191. X#
  6192. X# add a new reviewer
  6193. X#
  6194. X./bin/aegis -newrev $USER -p foo -v -lib $worklib
  6195. Xif test $? -ne 0 ; then fail; fi
  6196. X
  6197. X#
  6198. X# pass the review
  6199. X#
  6200. X./bin/aegis -review_pass -chan 1 -proj foo -v -lib $worklib
  6201. Xif test $? -ne 0 ; then fail; fi
  6202. X
  6203. X#
  6204. X# add an integrator
  6205. X#
  6206. X./bin/aegis -newint $USER -p foo -v -lib $worklib
  6207. Xif test $? -ne 0 ; then fail; fi
  6208. X
  6209. X#
  6210. X# start integrating
  6211. X#
  6212. X./bin/aegis -intbeg 1 -p foo -v -lib $worklib
  6213. Xif test $? -ne 0 ; then fail; fi
  6214. X
  6215. X#
  6216. X# integrate build
  6217. X#
  6218. Xsleep 1
  6219. X./bin/aegis -build -nl -v -lib $worklib -p foo
  6220. Xif test $? -ne 0 ; then fail; fi
  6221. X
  6222. X#
  6223. X# integrate test
  6224. X#
  6225. X./bin/aegis -test -nl -v -lib $worklib -p foo
  6226. Xif test $? -ne 0 ; then fail; fi
  6227. X
  6228. X#
  6229. X# integration pass
  6230. X#
  6231. X./bin/aegis -intpass -nl -v -lib $worklib -p foo
  6232. Xif test $? -ne 0 ; then fail; fi
  6233. X
  6234. X#
  6235. X# create a new change
  6236. X#    make sure it creates the files it should
  6237. X#
  6238. Xcat > $tmp << 'end'
  6239. Xbrief_description = "A seconf Change";
  6240. Xcause = internal_bug;
  6241. Xend
  6242. X./bin/aegis -new_change $tmp -project foo -v -lib $worklib
  6243. Xif test $? -ne 0 ; then fail; fi
  6244. X
  6245. X#
  6246. X# begin development of a change
  6247. X#
  6248. X./bin/aegis -devbeg 2 -p foo -dir $workchan -v -lib $worklib
  6249. Xif test $? -ne 0 ; then fail; fi
  6250. X
  6251. X#
  6252. X# set change attributes
  6253. X#
  6254. Xcat > $workchan/xx  << 'fubar'
  6255. Xtest_exempt = true;
  6256. Xtest_baseline_exempt = true;
  6257. Xfubar
  6258. Xif test $? -ne 0 ; then fail; fi
  6259. X./bin/aegis -ca $workchan/xx -p foo -v -lib $worklib
  6260. Xif test $? -ne 0 ; then fail; fi
  6261. X
  6262. X#
  6263. X# add a new files to the change
  6264. X#
  6265. X./bin/aegis -cp $workchan/main.c -nl -v -lib $worklib -p foo
  6266. Xif test $? -ne 0 ; then fail; fi
  6267. X
  6268. X#
  6269. X# make it re-compile
  6270. X#
  6271. Xcat >> $workchan/main.c << 'end'
  6272. X/* almost nothing */
  6273. Xend
  6274. X
  6275. X#
  6276. X# let the clock tick over, so the build will be happy
  6277. X#
  6278. Xsleep 1
  6279. X
  6280. X#
  6281. X# build the change
  6282. X#
  6283. X./bin/aegis -build -nl -v -lib $worklib -p foo
  6284. Xif test $? -ne 0 ; then fail; fi
  6285. X
  6286. X#
  6287. X# difference the change
  6288. X#
  6289. X./bin/aegis -diff -nl -v -lib $worklib -p foo
  6290. Xif test $? -ne 0 ; then fail; fi
  6291. X
  6292. X#
  6293. X# finish development of the change
  6294. X#
  6295. X./bin/aegis -dev_end -v -lib $worklib -p foo
  6296. Xif test $? -ne 0 ; then fail; fi
  6297. X
  6298. X#
  6299. X# pass the review
  6300. X#
  6301. X./bin/aegis -review_pass -chan 2 -proj foo -v -lib $worklib
  6302. Xif test $? -ne 0 ; then fail; fi
  6303. X
  6304. X#
  6305. X# start integrating
  6306. X#
  6307. X./bin/aegis -intbeg 2 -p foo -v -lib $worklib
  6308. Xif test $? -ne 0 ; then fail; fi
  6309. X
  6310. X#
  6311. X# integrate build
  6312. X#
  6313. Xsleep 1
  6314. X./bin/aegis -build -nl -v -lib $worklib -p foo
  6315. Xif test $? -ne 0 ; then fail; fi
  6316. X
  6317. X#
  6318. X# integration pass
  6319. X#
  6320. X./bin/aegis -intpass -nl -v -lib $worklib -p foo
  6321. Xif test $? -ne 0 ; then fail; fi
  6322. X
  6323. X#
  6324. X# the build file should now be a change file
  6325. X#    even though user did not put it there
  6326. X#
  6327. X./bin/aegis -l cf -c 2 -unf -lib $worklib -p foo > $work/test.out
  6328. Xif test $? -ne 0 ; then fail; fi
  6329. Xcat > $work/test.ok << 'fubar'
  6330. Xsource modify 1.2 main.c
  6331. Xbuild modify 1.2 version
  6332. Xfubar
  6333. Xif test $? -ne 0 ; then fail; fi
  6334. Xdiff $work/test.ok $work/test.out
  6335. Xif test $? -ne 0 ; then fail; fi
  6336. X
  6337. X#
  6338. X# the things tested in this test, worked
  6339. X#
  6340. Xpass
  6341. END_OF_FILE
  6342. if test 7444 -ne `wc -c <'test/00/t0018a.sh'`; then
  6343.     echo shar: \"'test/00/t0018a.sh'\" unpacked with wrong size!
  6344. fi
  6345. # end of 'test/00/t0018a.sh'
  6346. fi
  6347. echo shar: End of archive 5 \(of 19\).
  6348. cp /dev/null ark5isdone
  6349. MISSING=""
  6350. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
  6351.     if test ! -f ark${I}isdone ; then
  6352.     MISSING="${MISSING} ${I}"
  6353.     fi
  6354. done
  6355. if test "${MISSING}" = "" ; then
  6356.     echo You have unpacked all 19 archives.
  6357.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  6358. else
  6359.     echo You still need to unpack the following archives:
  6360.     echo "        " ${MISSING}
  6361. fi
  6362. ##  End of shell archive.
  6363. exit 0
  6364.