home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume41 / dist-3.0 / patch20 < prev    next >
Encoding:
Text File  |  1994-01-27  |  44.6 KB  |  1,589 lines

  1. Newsgroups: comp.sources.misc
  2. From: Raphael Manfredi <ram@acri.fr>
  3. Subject: v41i116:  dist-3.0 - Configure script generator and related tools, Patch20
  4. Message-ID: <1994Jan28.023436.2557@sparky.sterling.com>
  5. X-Md4-Signature: afdb77965094b368e194b23abd7c1671
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Advanced Computer Research Institute, Lyon, France
  8. Date: Fri, 28 Jan 1994 02:34:36 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: Raphael Manfredi <ram@acri.fr>
  12. Posting-number: Volume 41, Issue 116
  13. Archive-name: dist-3.0/patch20
  14. Environment: UNIX, Perl, RCS
  15. Patch-To: dist-3.0: Volume 39, Issue 5-32
  16.  
  17. [The latest patch for dist version 3.0 is #22.]
  18.  
  19. System: dist version 3.0
  20. Patch #: 20
  21. Priority: LOW
  22. Subject: patch #16, continued
  23. Date: Mon Jan 24 15:54:21 MET 1994
  24. From: Raphael Manfredi <ram@acri.fr>
  25.  
  26. Description:
  27.     See patch #16.
  28.  
  29.  
  30. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your dist source
  31.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  32.     If you don't have the patch program, apply the following by hand,
  33.     or get patch (version 2.0, latest patchlevel).
  34.  
  35.     After patching:
  36.         *** DO NOTHING--INSTALL ALL PATCHES UP THROUGH #22 FIRST ***
  37.  
  38.     If patch indicates that patchlevel is the wrong version, you may need
  39.     to apply one or more previous patches, or the patch may already
  40.     have been applied.  See the patchlevel.h file to find out what has or
  41.     has not been applied.  In any event, don't continue with the patch.
  42.  
  43.     If you are missing previous patches they can be obtained from me:
  44.  
  45.         Raphael Manfredi <ram@acri.fr>
  46.  
  47.     If you send a mail message of the following form it will greatly speed
  48.     processing:
  49.  
  50.         Subject: Command
  51.         @SH mailpatch PATH dist 3.0 LIST
  52.                ^ note the c
  53.  
  54.     where PATH is a return path FROM ME TO YOU either in Internet notation,
  55.     or in bang notation from some well-known host, and LIST is the number
  56.     of one or more patches you need, separated by spaces, commas, and/or
  57.     hyphens.  Saying 35- says everything from 35 to the end.
  58.  
  59.     To get some more detailed instructions, send me the following mail:
  60.  
  61.         Subject: Command
  62.         @SH mailhelp PATH
  63.  
  64.  
  65. Index: patchlevel.h
  66. Prereq: 19
  67. 4c4
  68. < #define PATCHLEVEL 19
  69. ---
  70. > #define PATCHLEVEL 20
  71.  
  72. Index: pat/patftp.SH
  73. Prereq: 3.0.1.2
  74. *** pat/patftp.SH.old    Mon Jan 24 15:35:21 1994
  75. --- pat/patftp.SH    Mon Jan 24 15:35:21 1994
  76. ***************
  77. *** 20,26 ****
  78.       eval "exec perl -S \$0 \$*"
  79.           if \$running_under_some_shell;
  80.   
  81. ! # $Id: patftp.SH,v 3.0.1.2 1993/08/24 12:16:57 ram Exp $
  82.   #
  83.   #  Copyright (c) 1991-1993, Raphael Manfredi
  84.   #  
  85. --- 20,26 ----
  86.       eval "exec perl -S \$0 \$*"
  87.           if \$running_under_some_shell;
  88.   
  89. ! # $Id: patftp.SH,v 3.0.1.3 1994/01/24 14:30:43 ram Exp $
  90.   #
  91.   #  Copyright (c) 1991-1993, Raphael Manfredi
  92.   #  
  93. ***************
  94. *** 33,38 ****
  95. --- 33,42 ----
  96.   # Original Author: Larry Wall <lwall@netlabs.com>
  97.   #
  98.   # $Log: patftp.SH,v $
  99. + # Revision 3.0.1.3  1994/01/24  14:30:43  ram
  100. + # patch16: now prefix error messages with program's name
  101. + # patch16: added ~/.dist_profile awareness
  102. + #
  103.   # Revision 3.0.1.2  1993/08/24  12:16:57  ram
  104.   # patch3: removed useless orgname variable
  105.   #
  106. ***************
  107. *** 48,58 ****
  108.   !GROK!THIS!
  109.   cat >>patftp <<'!NO!SUBS!'
  110.   
  111.   require 'getopts.pl';
  112.   &usage unless &Getopts("hV");
  113.   
  114.   if ($opt_V) {
  115. !     print STDERR "patftp $version PL$patchlevel\n";
  116.       exit 0;
  117.   } elsif ($opt_h) {
  118.       &usage;
  119. --- 52,63 ----
  120.   !GROK!THIS!
  121.   cat >>patftp <<'!NO!SUBS!'
  122.   
  123. + $progname = &profile;    # Read ~/.dist_profile
  124.   require 'getopts.pl';
  125.   &usage unless &Getopts("hV");
  126.   
  127.   if ($opt_V) {
  128. !     print STDERR "$progname $version PL$patchlevel\n";
  129.       exit 0;
  130.   } elsif ($opt_h) {
  131.       &usage;
  132. ***************
  133. *** 64,75 ****
  134.   &readpackage;
  135.   
  136.   if ($#ARGV < 0) {
  137. !     open(PL,"patchlevel.h") || die "Can't open patchlevel.h\n";
  138.       while (<PL>) {
  139.           $argv = $1 if /^#define\s+PATCHLEVEL\s+(\d+)/;
  140.       }
  141.       close PL;
  142. !     die "Malformed patchlevel.h file.\n" if $argv eq '';
  143.       @ARGV = $argv;
  144.   } else {
  145.       for (@ARGV) {
  146. --- 69,80 ----
  147.   &readpackage;
  148.   
  149.   if ($#ARGV < 0) {
  150. !     open(PL,"patchlevel.h") || die "$progname: can't open patchlevel.h: $!\n";
  151.       while (<PL>) {
  152.           $argv = $1 if /^#define\s+PATCHLEVEL\s+(\d+)/;
  153.       }
  154.       close PL;
  155. !     die "$progname: malformed patchlevel.h file.\n" if $argv eq '';
  156.       @ARGV = $argv;
  157.   } else {
  158.       for (@ARGV) {
  159. ***************
  160. *** 80,94 ****
  161.   }
  162.   
  163.   if ($#ARGV < 0) {
  164. !     print STDERR  "No patches specified.\n";
  165.       &usage;
  166.   } elsif ($#ARGV) {
  167. !     print "Copying $package $baserev patches $argv to $ftpdir...\n";
  168.   } else {
  169. !     print "Copying $package $baserev patch $argv to $ftpdir...\n";
  170.   }
  171.   
  172. ! chdir 'bugs' || die "Can't cd to bugs\n";
  173.   
  174.   until ($#ARGV < 0) {
  175.       $patnum = shift;
  176. --- 85,99 ----
  177.   }
  178.   
  179.   if ($#ARGV < 0) {
  180. !     print STDERR  "$progname: no patches specified.\n";
  181.       &usage;
  182.   } elsif ($#ARGV) {
  183. !     print "$progname: copying $package $baserev patches $argv to $ftpdir...\n";
  184.   } else {
  185. !     print "$progname: copying $package $baserev patch $argv to $ftpdir...\n";
  186.   }
  187.   
  188. ! chdir 'bugs' || die "$progname: can't cd to bugs: $!\n";
  189.   
  190.   until ($#ARGV < 0) {
  191.       $patnum = shift;
  192. ***************
  193. *** 96,104 ****
  194.   }
  195.   
  196.   sub usage {
  197. !     print STDERR "Usage: patftp [-hV] patchlist\n";
  198. !     print STDERR "  -h : print this message and exit\n";
  199. !     print STDERR "  -V : print version number and exit\n";
  200.       exit 1;
  201.   }
  202.   
  203. --- 101,111 ----
  204.   }
  205.   
  206.   sub usage {
  207. !     print STDERR <<EOM;
  208. ! Usage: $progname [-hV] patchlist
  209. !   -h : print this message and exit
  210. !   -V : print version number and exit
  211. ! EOM
  212.       exit 1;
  213.   }
  214.   
  215. ***************
  216. *** 105,109 ****
  217. --- 112,118 ----
  218.   !NO!SUBS!
  219.   $grep -v '^;#' ../pl/package.pl >>patftp
  220.   $grep -v '^;#' ../pl/rangeargs.pl >>patftp
  221. + $grep -v '^;#' ../pl/tilde.pl >>patftp
  222. + $grep -v '^;#' ../pl/profile.pl >>patftp
  223.   chmod +x patftp
  224.   $eunicefix patftp
  225.  
  226. Index: mcon/U/Oldconfig.U
  227. Prereq: 3.0.1.1
  228. *** mcon/U/Oldconfig.U.old    Mon Jan 24 15:34:50 1994
  229. --- mcon/U/Oldconfig.U    Mon Jan 24 15:34:51 1994
  230. ***************
  231. *** 1,4 ****
  232. ! ?RCS: $Id: Oldconfig.U,v 3.0.1.1 1993/09/13 15:56:32 ram Exp $
  233.   ?RCS:
  234.   ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  235.   ?RCS: 
  236. --- 1,4 ----
  237. ! ?RCS: $Id: Oldconfig.U,v 3.0.1.2 1994/01/24 14:05:02 ram Exp $
  238.   ?RCS:
  239.   ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  240.   ?RCS: 
  241. ***************
  242. *** 9,14 ****
  243. --- 9,18 ----
  244.   ?RCS: of the source tree for dist 3.0.
  245.   ?RCS:
  246.   ?RCS: $Log: Oldconfig.U,v $
  247. + ?RCS: Revision 3.0.1.2  1994/01/24  14:05:02  ram
  248. + ?RCS: patch16: added post-processing on myuname for Xenix targets
  249. + ?RCS: patch16: message proposing config.sh defaults made consistent
  250. + ?RCS:
  251.   ?RCS: Revision 3.0.1.1  1993/09/13  15:56:32  ram
  252.   ?RCS: patch10: force use of config.sh when -d option is used (WAD)
  253.   ?RCS: patch10: complain about non-existent hint files (WAD)
  254. ***************
  255. *** 25,31 ****
  256.       contains Loc Options
  257.   ?MAKE:    -pick wipe $@ %<
  258.   ?S:myuname:
  259. ! ?S: The output of 'uname -a' if available, otherwise the hostname.
  260.   ?S:.
  261.   ?S:hint:
  262.   ?S:    Gives the type of hints used for previous answers. May be one of "default",
  263. --- 29,37 ----
  264.       contains Loc Options
  265.   ?MAKE:    -pick wipe $@ %<
  266.   ?S:myuname:
  267. ! ?S:    The output of 'uname -a' if available, otherwise the hostname. On Xenix,
  268. ! ?S:    pseudo variables assignments in the output are stripped, thank you. The
  269. ! ?S:    whole thing is then lower-cased.
  270.   ?S:.
  271.   ?S:hint:
  272.   ?S:    Gives the type of hints used for previous answers. May be one of "default",
  273. ***************
  274. *** 41,46 ****
  275. --- 47,60 ----
  276.   ?X: on some machines to avoid the error message when uname is not found; e.g.
  277.   ?X: old SUN-OS 3.2 would not execute hostname in (uname -a || hostname). Sigh!
  278.   myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
  279. + ?X: Special mention for Xenix, whose 'uname -a' gives us output like this:
  280. + ?X:  sysname=XENIX
  281. + ?X:  nodename=whatever
  282. + ?X:  release=2.3.2 .. etc...
  283. + ?X: Therefore, we strip all this variable assignment junk and remove all the
  284. + ?X: new lines to keep the myuname variable sane... --RAM
  285. + myuname=`echo $myuname | $sed -e 's/^[^=]*=//' | \
  286. +     tr '[A-Z]' '[a-z]' | tr '\012' ' '`
  287.   dflt=n
  288.   if test "$fastread" = yes; then
  289.       dflt=y
  290. ***************
  291. *** 96,103 ****
  292.       $test -f /bin/mips && /bin/mips && dflt="$dflt mips"
  293.       $test -d /NextApps && test -f /usr/adm/software_version && dflt="$dflt next"
  294.       $test -d /usr/include/minix && dflt="$dflt minix"
  295.       if $test -f $uname; then
  296. !         set `$uname -a | tr '[A-Z]' '[a-z]'`
  297.   
  298.           $test -f $5.sh && dflt="$dflt $5"
  299.   
  300. --- 110,120 ----
  301.       $test -f /bin/mips && /bin/mips && dflt="$dflt mips"
  302.       $test -d /NextApps && test -f /usr/adm/software_version && dflt="$dflt next"
  303.       $test -d /usr/include/minix && dflt="$dflt minix"
  304. + ?X: If we have uname, we already computed a suitable uname -a output, correctly
  305. + ?X: formatted for Xenix, and it lies in $myuname.
  306.       if $test -f $uname; then
  307. !         set X $myuname
  308. !         shift
  309.   
  310.           $test -f $5.sh && dflt="$dflt $5"
  311.   
  312. ***************
  313. *** 197,203 ****
  314.   hint=default
  315.   if test -f ../config.sh; then
  316.       echo " "
  317. !     rp="I see a config.sh file.  Did Configure make it on THIS system?"
  318.       . ./myread
  319.       case "$ans" in
  320.       n*|N*) echo "OK, I'll ignore it.";;
  321. --- 214,220 ----
  322.   hint=default
  323.   if test -f ../config.sh; then
  324.       echo " "
  325. !     rp="I see a config.sh file.  Shall I use it to set the defaults?"
  326.       . ./myread
  327.       case "$ans" in
  328.       n*|N*) echo "OK, I'll ignore it.";;
  329.  
  330. Index: mcon/pl/common.pl
  331. Prereq: 3.0.1.1
  332. *** mcon/pl/common.pl.old    Mon Jan 24 15:35:13 1994
  333. --- mcon/pl/common.pl    Mon Jan 24 15:35:13 1994
  334. ***************
  335. *** 1,4 ****
  336. ! ;# $Id: common.pl,v 3.0.1.1 1993/10/16 13:53:29 ram Exp $
  337.   ;#
  338.   ;#  Copyright (c) 1991-1993, Raphael Manfredi
  339.   ;#  
  340. --- 1,4 ----
  341. ! ;# $Id: common.pl,v 3.0.1.2 1994/01/24 14:22:54 ram Exp $
  342.   ;#
  343.   ;#  Copyright (c) 1991-1993, Raphael Manfredi
  344.   ;#  
  345. ***************
  346. *** 9,14 ****
  347. --- 9,17 ----
  348.   ;#  of the source tree for dist 3.0.
  349.   ;#
  350.   ;# $Log: common.pl,v $
  351. + ;# Revision 3.0.1.2  1994/01/24  14:22:54  ram
  352. + ;# patch16: can now define "internal use only" variables on ?MAKE: lines
  353. + ;#
  354.   ;# Revision 3.0.1.1  1993/10/16  13:53:29  ram
  355.   ;# patch12: added support for ?M: lines and confmagic.h production
  356.   ;#
  357. ***************
  358. *** 97,111 ****
  359.       local($_) = @_;
  360.       local(@ary);                    # Locally defined symbols
  361.       local(@dep);                    # Dependencies
  362. !     if (/^[\w ]*:/) {                # Main dependency rule
  363.           s|^\s*||;                    # Remove leading spaces
  364. -         $dependencies .= $_;        # Append to already existing dependencies
  365.           chop;
  366.           s/:(.*)//;
  367.           @dep = split(' ', $1);            # Dependencies
  368.           @ary = split(' ');                # Locally defined symbols
  369. -         $defined = join(' ', @ary);        # Symbols defined by this unit
  370.           foreach $sym (@ary) {
  371.               # Only sumbols starting with a lowercase letter are to
  372.               # appear in config.sh, excepted the ones listed in Except.
  373.               if ($sym =~ /^[a-z]/ || $Except{$sym}) {
  374. --- 100,114 ----
  375.       local($_) = @_;
  376.       local(@ary);                    # Locally defined symbols
  377.       local(@dep);                    # Dependencies
  378. !     if (/^[\w+ ]*:/) {                # Main dependency rule
  379.           s|^\s*||;                    # Remove leading spaces
  380.           chop;
  381.           s/:(.*)//;
  382.           @dep = split(' ', $1);            # Dependencies
  383.           @ary = split(' ');                # Locally defined symbols
  384.           foreach $sym (@ary) {
  385. +             # Symbols starting with a '+' are meant for internal use only.
  386. +             next if $sym =~ s/^\+//;
  387.               # Only sumbols starting with a lowercase letter are to
  388.               # appear in config.sh, excepted the ones listed in Except.
  389.               if ($sym =~ /^[a-z]/ || $Except{$sym}) {
  390. ***************
  391. *** 114,127 ****
  392.               }
  393.           }
  394.           $condlist = '';                # List of conditional symbols
  395. !         foreach $sym (@dep) {
  396. !             if ($sym =~ /^\+[A-Za-z]/) {
  397. !                 $sym =~ s|^\+||;
  398.                   $condlist .= "$sym ";
  399.                   push(@Cond, $sym) unless $condseen{$sym};
  400.                   $condseen{$sym}++;        # Conditionally wanted
  401.               }
  402.           }
  403.           $dependencies .= "    -cond $condlist\n" if $condlist;
  404.       } else {
  405.           $dependencies .= $_;        # Building rules
  406. --- 117,138 ----
  407.               }
  408.           }
  409.           $condlist = '';                # List of conditional symbols
  410. !         local($sym);                # Symbol copy, avoid @dep alteration
  411. !         foreach $dep (@dep) {
  412. !             if ($dep =~ /^\+[A-Za-z]/) {
  413. !                 ($sym = $dep) =~ s|^\+||;
  414.                   $condlist .= "$sym ";
  415.                   push(@Cond, $sym) unless $condseen{$sym};
  416.                   $condseen{$sym}++;        # Conditionally wanted
  417.               }
  418.           }
  419. +         # Append to already existing dependencies. The 'defined' variable
  420. +         # is set for &write_out, used to implement ?L: and ?I: canvas. It is
  421. +         # reset each time a new unit is parsed.
  422. +         # NB: leading '+' for defined symbols (internal use only) have been
  423. +         # removed at this point, but conditional dependencies still bear it.
  424. +         $defined = join(' ', @ary);        # Symbols defined by this unit
  425. +         $dependencies .= $defined . ':' . join(' ', @dep) . "\n";
  426.           $dependencies .= "    -cond $condlist\n" if $condlist;
  427.       } else {
  428.           $dependencies .= $_;        # Building rules
  429.  
  430. Index: mcon/U/errnolist.U
  431. *** mcon/U/errnolist.U.old    Mon Jan 24 15:34:59 1994
  432. --- mcon/U/errnolist.U    Mon Jan 24 15:34:59 1994
  433. ***************
  434. *** 0 ****
  435. --- 1,102 ----
  436. + ?RCS: $Id: errnolist.U,v 3.0.1.1 1994/01/24 14:10:54 ram Exp $
  437. + ?RCS:
  438. + ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  439. + ?RCS: 
  440. + ?RCS: You may redistribute only under the terms of the Artistic Licence,
  441. + ?RCS: as specified in the README file that comes with the distribution.
  442. + ?RCS: You may reuse parts of this distribution only within the terms of
  443. + ?RCS: that same Artistic Licence; a copy of which may be found at the root
  444. + ?RCS: of the source tree for dist 3.0.
  445. + ?RCS:
  446. + ?RCS: $Log: errnolist.U,v $
  447. + ?RCS: Revision 3.0.1.1  1994/01/24  14:10:54  ram
  448. + ?RCS: patch16: created
  449. + ?RCS:
  450. + ?MAKE:errnolist errnolist_SH errnolist_a errnolist_c errnolist_o: cat +cc \
  451. +     +ccflags +libs +d_sysernlst
  452. + ?MAKE:    -pick add $@ %<
  453. + ?S:errnolist:
  454. + ?S:    This variable holds the base name of a file containing the
  455. + ?S:    definition of the sys_errnolist array, if the C library
  456. + ?S:    doesn't provide it already.  Otherwise, its value is empty.
  457. + ?S:    The following lines should be included in your Makefile.SH:
  458. + ?S:    
  459. + ?S:        case "$errnolist" in
  460. + ?S:        '') ;;
  461. + ?S:        *)
  462. + ?S:            $spitshell >>Makefile <<!GROK!THIS!
  463. + ?S:        $errnolist_c: $errnolist_SH $errnolist_a
  464. + ?S:            sh ./$errnolist_SH
  465. + ?S:    
  466. + ?S:        !GROK!THIS!
  467. + ?S:            ;;
  468. + ?S:        esac
  469. + ?S:    
  470. + ?S:    You may define the 'errnolist' variable in your Myinit.U if you
  471. + ?S:    wish to override its default value "errnolist".
  472. + ?S:.
  473. + ?S:errnolist_SH:
  474. + ?S:    This is the name of a file which will generate errnolistc.
  475. + ?S:.
  476. + ?S:errnolist_a:
  477. + ?S:    This is the name of the awk script called by errnolist_SH.
  478. + ?S:.
  479. + ?S:errnolist_c:
  480. + ?S:    This is the name of a generated C file which provides the
  481. + ?S:    definition of the sys_errnolist array.
  482. + ?S:.
  483. + ?S:errnolist_o:
  484. + ?S:    This is the name of the object file which provides the
  485. + ?S:    definition of the sys_errnolist array, if the C library
  486. + ?S:    doesn't provide it already.  Otherwise, its value is empty.
  487. + ?S:.
  488. + ?INIT:errnolist=errnolist
  489. + : check for sys_errnolist
  490. + @if d_sysernlst || HAS_SYS_ERRNOLIST
  491. + case "$d_sysernlst" in
  492. + "$define")
  493. +     errnolist=''
  494. +     errnolist_SH=''
  495. +     errnolist_a=''
  496. +     errnolist_c=''
  497. +     errnolist_o=''
  498. +     ;;
  499. + *)
  500. +     echo " "
  501. +     echo "I'll make sure your Makefile provides sys_errnolist in $errnolist.c"
  502. +     errnolist_SH=$errnolist.SH
  503. +     errnolist_a=$errnolist.a
  504. +     errnolist_c=$errnolist.c
  505. +     errnolist_o=$errnolist.o
  506. +     ;;
  507. + esac
  508. + @else
  509. + echo " "
  510. + $cat <<EOM
  511. + Checking to see if your C library provides us with sys_errnolist[]...
  512. + EOM
  513. + $cat >errnolist.c <<'EOCP'
  514. + extern char *sys_errnolist[];
  515. + main() {
  516. +     char *p0 = sys_errnolist[0];
  517. +     char *p1 = sys_errnolist[1];
  518. +     return (p0 == p1);    /* Make sure they're not optimized away */
  519. + }
  520. + EOCP
  521. + if $cc $ccflags -o errnolist errnolist.c $libs >/dev/null 2>&1 ; then
  522. +     echo "It does."
  523. +     errnolist=''
  524. +     errnolist_SH=''
  525. +     errnolist_a=''
  526. +     errnolist_c=''
  527. +     errnolist_o=''
  528. + else
  529. +     echo "I'll make sure your Makefile provides sys_errnolist in $errnolist.c"
  530. +     errnolist_SH=$errnolist.SH
  531. +     errnolist_a=$errnolist.a
  532. +     errnolist_c=$errnolist.c
  533. +     errnolist_o=$errnolist.o
  534. + fi
  535. + @end
  536.  
  537. Index: mcon/U/MailList.U
  538. *** mcon/U/MailList.U.old    Mon Jan 24 15:34:50 1994
  539. --- mcon/U/MailList.U    Mon Jan 24 15:34:50 1994
  540. ***************
  541. *** 0 ****
  542. --- 1,82 ----
  543. + ?RCS: $Id: MailList.U,v 3.0.1.1 1994/01/24 14:01:49 ram Exp $
  544. + ?RCS:
  545. + ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  546. + ?RCS: 
  547. + ?RCS: You may redistribute only under the terms of the Artistic Licence,
  548. + ?RCS: as specified in the README file that comes with the distribution.
  549. + ?RCS: You may reuse parts of this distribution only within the terms of
  550. + ?RCS: that same Artistic Licence; a copy of which may be found at the root
  551. + ?RCS: of the source tree for dist 3.0.
  552. + ?RCS: 
  553. + ?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
  554. + ?RCS:
  555. + ?RCS: $Log: MailList.U,v $
  556. + ?RCS: Revision 3.0.1.1  1994/01/24  14:01:49  ram
  557. + ?RCS: patch16: created
  558. + ?RCS:
  559. + ?RCS:
  560. + ?X:
  561. + ?X: This unit offers the user the option of subscribing to the mailing
  562. + ?X: list. To force inclusion of this unit, you must add it's name to the
  563. + ?X: dependancies on the MAKE line in your private copy of End.U.
  564. + ?X: The address of the mailing list server must be set via a "list_request=..."
  565. + ?X: entry in the .package file. This is usually done by running packinit and
  566. + ?X: answering the proper questions.
  567. + ?X:
  568. + ?MAKE:MailList: cat mailer package Myread cf_name cf_email
  569. + ?MAKE:    -pick wipe $@ %<
  570. + ?T:list_request list_sub list_unsub list_name
  571. + ?X:
  572. + ?X: The cf_name dependency is used through list_sub when the mailing list
  573. + ?X: manager happens to be listserv, whereas cf_email is used whith majordomo
  574. + ?X: or when the mailing list request address is scanned by a human. Since
  575. + ?X: they do not appear within the unit itself, we need a lint hint.
  576. + ?X:
  577. + ?LINT:use cf_name cf_email
  578. + : offer to join the mailing list
  579. + list_request='<$list_request>'
  580. + list_sub="<$list_sub>"
  581. + list_unsub="<$list_unsub>"
  582. + list_name="<$list_name>"
  583. + $cat <<EOM
  584. + There is a mailing list for discussion about $package and related issues.
  585. + This is the preferred place to ask questions about the program and discuss
  586. + modifications and additions with the author and other users.  If you are able
  587. + to send mail to the Internet, you are encouraged to subscribe.  You need only
  588. + ever subscribe once, and you can unsubscribe automatically at any time in the
  589. + future.  If you have already subscribed and you wish to unsubscribe now, you
  590. + may do so by answering "unsubscribe".  Answer "subscribe" to subscribe to the
  591. + list.
  592. + EOM
  593. + rp="Subscribe to or unsubscribe from the $list_name mailing list?"
  594. + dflt=neither
  595. + . ./myread
  596. + case "$ans" in
  597. + [sS]*)    $cat <<EOM
  598. + You will be sent a message from the list server to let you know when your
  599. + subscription has been successful and telling you how to submit articles and
  600. + how to unsubscribe again when necessary. You may also unsubscribe by running
  601. + this script again and asking it to do so for you.
  602. + EOM
  603. +     echo "Sending mail to subscribe you to the $list_name list..." >&4
  604. +     $mailer $list_request <<EOM >/dev/null 2>&1
  605. + Precedence: junk
  606. + To: $list_request
  607. + $list_sub
  608. + EOM
  609. +     ;;
  610. + [uU]*)    echo "Sending mail to unsubscribe you from the $list_name list..." >&4
  611. +     $mailer $list_request <<EOM >/dev/null 2>&1
  612. + Precedence: junk
  613. + To: $list_request
  614. + $list_unsub
  615. + EOM
  616. +     ;;
  617. + esac
  618.  
  619. Index: mcon/man/mlint.SH
  620. Prereq: 3.0.1.3
  621. *** mcon/man/mlint.SH.old    Mon Jan 24 15:35:10 1994
  622. --- mcon/man/mlint.SH    Mon Jan 24 15:35:11 1994
  623. ***************
  624. *** 20,26 ****
  625.   .TH METACONFIG $manext "Version $VERSION PL$PATCHLEVEL"
  626.   ''' @(#) Manual page for metalint
  627.   '''
  628. ! ''' $Id: mlint.SH,v 3.0.1.3 1993/11/10 17:37:39 ram Exp $
  629.   '''
  630.   '''  Copyright (c) 1991-1993, Raphael Manfredi
  631.   '''  
  632. --- 20,26 ----
  633.   .TH METACONFIG $manext "Version $VERSION PL$PATCHLEVEL"
  634.   ''' @(#) Manual page for metalint
  635.   '''
  636. ! ''' $Id: mlint.SH,v 3.0.1.4 1994/01/24 14:20:39 ram Exp $
  637.   '''
  638.   '''  Copyright (c) 1991-1993, Raphael Manfredi
  639.   '''  
  640. ***************
  641. *** 31,36 ****
  642. --- 31,39 ----
  643.   '''  of the source tree for dist 3.0.
  644.   '''
  645.   ''' $Log: mlint.SH,v $
  646. + ''' Revision 3.0.1.4  1994/01/24  14:20:39  ram
  647. + ''' patch16: can now easily suppress warning about made "special units"
  648. + '''
  649.   ''' Revision 3.0.1.3  1993/11/10  17:37:39  ram
  650.   ''' patch14: documents stale ?M: dependency check
  651.   '''
  652. ***************
  653. *** 90,96 ****
  654.   .TP
  655.   "(?MAKE) special unit 'Xxx' should not be listed as made."
  656.   A special unit symbol (first letter capitalized) may only be listed as made
  657. ! in the special unit itself.
  658.   .TP
  659.   "(?MAKE) '+xxx' is listed x times."
  660.   A conditional dependency is listed more than once. This is harmless though.
  661. --- 93,102 ----
  662.   .TP
  663.   "(?MAKE) special unit 'Xxx' should not be listed as made."
  664.   A special unit symbol (first letter capitalized) may only be listed as made
  665. ! in the special unit itself. To suppress this warning in legitimate cases,
  666. ! add a '+' in front of the offending symbol (note that for non-special units,
  667. ! the '+' in this position indicates an internal symbol which should not appear
  668. ! in the config.sh file).
  669.   .TP
  670.   "(?MAKE) '+xxx' is listed x times."
  671.   A conditional dependency is listed more than once. This is harmless though.
  672.  
  673. Index: mcon/mlint.SH
  674. Prereq: 3.0.1.1
  675. *** mcon/mlint.SH.old    Mon Jan 24 15:35:12 1994
  676. --- mcon/mlint.SH    Mon Jan 24 15:35:12 1994
  677. ***************
  678. *** 20,26 ****
  679.       eval "exec perl -S \$0 \$*"
  680.           if \$running_under_some_shell;
  681.   
  682. ! # $Id: mlint.SH,v 3.0.1.1 1993/08/19 06:42:27 ram Exp $
  683.   #
  684.   #  Copyright (c) 1991-1993, Raphael Manfredi
  685.   #  
  686. --- 20,26 ----
  687.       eval "exec perl -S \$0 \$*"
  688.           if \$running_under_some_shell;
  689.   
  690. ! # $Id: mlint.SH,v 3.0.1.2 1994/01/24 14:21:00 ram Exp $
  691.   #
  692.   #  Copyright (c) 1991-1993, Raphael Manfredi
  693.   #  
  694. ***************
  695. *** 33,38 ****
  696. --- 33,41 ----
  697.   # Original Author: Harlan Stenn <harlan@mumps.pfcs.com>
  698.   #
  699.   # $Log: mlint.SH,v $
  700. + # Revision 3.0.1.2  1994/01/24  14:21:00  ram
  701. + # patch16: added ~/.dist_profile awareness
  702. + #
  703.   # Revision 3.0.1.1  1993/08/19  06:42:27  ram
  704.   # patch1: leading config.sh searching was not aborting properly
  705.   #
  706. ***************
  707. *** 56,61 ****
  708. --- 59,65 ----
  709.   chop($MC = `pwd`);                # Real metalint lib path (no symbolic links)
  710.   chdir $WD || die "Can't chdir back to $WD: $!\n";
  711.   
  712. + &profile;                        # Read ~/.dist_profile
  713.   require 'getopts.pl';
  714.   &usage unless &Getopts("hklV");
  715.   
  716. ***************
  717. *** 123,127 ****
  718. --- 127,132 ----
  719.   $grep -v '^;#' pl/obsolete.pl >>mlint 
  720.   $grep -v '^;#' pl/tsort.pl >>mlint 
  721.   $grep -v '^;#' ../pl/tilde.pl >>mlint 
  722. + $grep -v '^;#' ../pl/profile.pl >>mlint
  723.   chmod +x mlint
  724.   $eunicefix mlint
  725.  
  726. Index: bin/packinit.man
  727. Prereq: 3.0
  728. *** bin/packinit.man.old    Mon Jan 24 15:34:33 1994
  729. --- bin/packinit.man    Mon Jan 24 15:34:33 1994
  730. ***************
  731. *** 1,4 ****
  732. ! ''' $Id: packinit.man,v 3.0 1993/08/18 12:04:06 ram Exp $
  733.   '''
  734.   '''  Copyright (c) 1991-1993, Raphael Manfredi
  735.   '''  
  736. --- 1,4 ----
  737. ! ''' $Id: packinit.man,v 3.0.1.1 1994/01/24 13:54:31 ram Exp $
  738.   '''
  739.   '''  Copyright (c) 1991-1993, Raphael Manfredi
  740.   '''  
  741. ***************
  742. *** 9,14 ****
  743. --- 9,17 ----
  744.   '''  of the source tree for dist 3.0.
  745.   '''
  746.   ''' $Log: packinit.man,v $
  747. + ''' Revision 3.0.1.1  1994/01/24  13:54:31  ram
  748. + ''' patch16: now documents variables set in .package by packinit
  749. + '''
  750.   ''' Revision 3.0  1993/08/18  12:04:06  ram
  751.   ''' Baseline for dist 3.0 netwide release.
  752.   '''
  753. ***************
  754. *** 32,37 ****
  755. --- 35,114 ----
  756.   .I Packinit
  757.   will create a single file and leave the remaining of
  758.   your directory undisturbed.
  759. + .SH VARIABLES
  760. + .I Packinit
  761. + defines the following variables in your \fI.package\fR file:
  762. + .TP 15
  763. + .PD 0
  764. + baserev
  765. + The baseline revision number.
  766. + .TP
  767. + copyright
  768. + Name of the file used for Copyright expansion.
  769. + .TP
  770. + ftpdir
  771. + Directory where patches are located on the FTP site.
  772. + .TP
  773. + ftpsite
  774. + Name of the FTP site where patches may be retrieved from.
  775. + .TP
  776. + list_addr
  777. + Address of the package mailing list where users may post messages to.
  778. + .TP
  779. + list_manager
  780. + Type of list manager attached to the list administrative request address.
  781. + .TP
  782. + list_name
  783. + Name of the package users mailing list.
  784. + .TP
  785. + list_request
  786. + Address where subscribe and unsubscribe requests for the package mailing
  787. + list should be sent to.
  788. + .TP
  789. + list_sub
  790. + Format of the subscribe requests.
  791. + .TP
  792. + list_unsub
  793. + Format of the unsubscribe requests.
  794. + .TP
  795. + list_users
  796. + A boolean string set to 'true' when there is a mailing list set up for
  797. + discussion about the package.
  798. + .TP
  799. + mailagent
  800. + A boolean string set to 'true' when people are allowed to retrieve
  801. + patches via mailagent \fI@SH mailpatch\fR commands.
  802. + .TP
  803. + maintloc
  804. + E-mail address of the package maintainer, preferably in Internet format.
  805. + .TP
  806. + maintname
  807. + Full name of the package maintainer.
  808. + .TP
  809. + mydiff
  810. + Name of the \fIdiff\fR program to be used when computing a patch.
  811. + .TP
  812. + newsgroups
  813. + Newsgroup list where new patches should be posted to, empty for no
  814. + postings.
  815. + .TP
  816. + orgname
  817. + Full name of the organization where the package maitainer resides, or
  818. + path to a file containing that name.
  819. + .TP
  820. + package
  821. + Name of the package.
  822. + .TP
  823. + packver
  824. + Version of the \fIpackinit\fR program that built the \fI.package\fR file.
  825. + .TP
  826. + patchbranch
  827. + Name of the RCS branch used to store subsequent updates of a file after
  828. + a baseline has been released.
  829. + .TP
  830. + recipients
  831. + People who should be sent newly issued patches.
  832. + .PD
  833.   .SH FILE
  834.   .TP 15
  835.   \&.package
  836.  
  837. Index: mcon/U/sbrksmart.U
  838. *** mcon/U/sbrksmart.U.old    Mon Jan 24 15:35:07 1994
  839. --- mcon/U/sbrksmart.U    Mon Jan 24 15:35:07 1994
  840. ***************
  841. *** 0 ****
  842. --- 1,79 ----
  843. + ?RCS: $Id: sbrksmart.U,v 3.0.1.1 1994/01/24 14:16:45 ram Exp $
  844. + ?RCS:
  845. + ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  846. + ?RCS: 
  847. + ?RCS: You may redistribute only under the terms of the Artistic Licence,
  848. + ?RCS: as specified in the README file that comes with the distribution.
  849. + ?RCS: You may reuse parts of this distribution only within the terms of
  850. + ?RCS: that same Artistic Licence; a copy of which may be found at the root
  851. + ?RCS: of the source tree for dist 3.0.
  852. + ?RCS:
  853. + ?RCS: $Log: sbrksmart.U,v $
  854. + ?RCS: Revision 3.0.1.1  1994/01/24  14:16:45  ram
  855. + ?RCS: patch16: created
  856. + ?RCS:
  857. + ?MAKE:sbrksmart: cat d_sbrk +cc +ccflags +libs rm
  858. + ?MAKE:    -pick add $@ %<
  859. + ?S:sbrksmart:
  860. + ?S:    This variable conditionally defines HAS_SMART_SBRK if the sbrk()
  861. + ?S:    routine honors a negative argument to lower the break value.
  862. + ?S:.
  863. + ?C:HAS_SMART_SBRK:
  864. + ?C:    This symbol is defined when the sbrk() system call may be used with
  865. + ?C:    a negative argument to lower the break value, therefore releasing
  866. + ?C:    core to the system. If not, you'd probably be better off using the
  867. + ?C:    mmap() system call.
  868. + ?C:.
  869. + ?H:#$sbrksmart HAS_SMART_SBRK /**/
  870. + ?H:.
  871. + ?T:dumb
  872. + : see if sbrk can release core to the kernel
  873. + echo " "
  874. + case "$d_sbrk" in
  875. + "$define")
  876. +     echo "Let's see if your sbrk() is smart enough to release core..." >&4
  877. +     $cat > sbrk.c <<'EOC'
  878. + #define INC 256        /* Small enough to be less than a page size */
  879. + main()
  880. + {
  881. +     char *obrk = (char *) sbrk(0);
  882. +     char *nbrk;
  883. +     nbrk = (char *) sbrk(INC);
  884. +     if (nbrk == (char *) -1)
  885. +         exit(1);    /* Not enough memory */
  886. +     if (nbrk != obrk)
  887. +         exit(2);    /* Unreliable sbrk() */
  888. +     nbrk = sbrk(-INC);
  889. +     if (nbrk == (char *) -1)
  890. +         exit(3);    /* May have understood negative arg as huge positive */
  891. +     if (obrk != (char *) sbrk(0))
  892. +         exit(4);    /* Not smart, definitely */
  893. +     exit(0);        /* Ok */
  894. + }
  895. + EOC
  896. +     sbrksmart="$undef"
  897. +     dumb='-- assuming dumb sbrk().'
  898. +     if $cc $ccflags -o sbrk sbrk.c $libs >/dev/null 2>&1; then
  899. +         ./sbrk >/dev/null 2>&1
  900. +         case $? in
  901. +         0) sbrksmart="$define"
  902. +             echo "Yes, it can be used with negative values." ;;
  903. +         1) echo "Sorry, not enough memory $dumb" ;;
  904. +         2) echo "No it's not, and besides it seems to be buggy..." ;;
  905. +         3) echo "No, it fails with negative values." ;;
  906. +         4) echo "Nope, your sbrk() is too dumb." ;;
  907. +         *) echo "Err... Unexpected result $dumb" ;;
  908. +         esac
  909. +     else
  910. +         echo "(Could not compile test program $dumb)"
  911. +     fi
  912. +     ;;
  913. + *)
  914. +     echo "Since you don't have sbrk(), let's forget about the smart test!"
  915. +     ;;
  916. + esac
  917. + $rm -f sbrk sbrk.* core
  918.  
  919. Index: pat/patsnap.SH
  920. Prereq: 3.0.1.1
  921. *** pat/patsnap.SH.old    Mon Jan 24 15:35:25 1994
  922. --- pat/patsnap.SH    Mon Jan 24 15:35:25 1994
  923. ***************
  924. *** 20,26 ****
  925.       eval "exec perl -S \$0 \$*"
  926.           if \$running_under_some_shell;
  927.   
  928. ! # $Id: patsnap.SH,v 3.0.1.1 1993/08/24 12:22:08 ram Exp $
  929.   #
  930.   #  Copyright (c) 1991-1993, Raphael Manfredi
  931.   #  
  932. --- 20,26 ----
  933.       eval "exec perl -S \$0 \$*"
  934.           if \$running_under_some_shell;
  935.   
  936. ! # $Id: patsnap.SH,v 3.0.1.2 1994/01/24 14:33:08 ram Exp $
  937.   #
  938.   #  Copyright (c) 1991-1993, Raphael Manfredi
  939.   #  
  940. ***************
  941. *** 31,36 ****
  942. --- 31,40 ----
  943.   #  of the source tree for dist 3.0.
  944.   #
  945.   # $Log: patsnap.SH,v $
  946. + # Revision 3.0.1.2  1994/01/24  14:33:08  ram
  947. + # patch16: now prefix error messages with program's name
  948. + # patch16: added ~/.dist_profile awareness
  949. + #
  950.   # Revision 3.0.1.1  1993/08/24  12:22:08  ram
  951.   # patch3: created
  952.   #
  953. ***************
  954. *** 40,47 ****
  955.   !GROK!THIS!
  956.   cat >>patsnap <<'!NO!SUBS!'
  957.   
  958. ! $progname = 'patsnap';        # My name
  959.   require 'getopts.pl';
  960.   &usage unless $#ARGV >= 0;
  961.   &usage unless &Getopts("aho:V");
  962. --- 44,50 ----
  963.   !GROK!THIS!
  964.   cat >>patsnap <<'!NO!SUBS!'
  965.   
  966. ! $progname = &profile;        # Read ~/.dist_profile
  967.   require 'getopts.pl';
  968.   &usage unless $#ARGV >= 0;
  969.   &usage unless &Getopts("aho:V");
  970. ***************
  971. *** 62,68 ****
  972.   $SNAPSHOT = $opt_o if $opt_o;
  973.   
  974.   if ($opt_a) {
  975. !     open(MANI,"MANIFEST.new") || die "No MANIFEST.new found.\n";
  976.       @ARGV = ();
  977.       while (<MANI>) {
  978.           chop;
  979. --- 65,71 ----
  980.   $SNAPSHOT = $opt_o if $opt_o;
  981.   
  982.   if ($opt_a) {
  983. !     open(MANI,"MANIFEST.new") || die "$progname: can't read MANIFEST.new: $!\n";
  984.       @ARGV = ();
  985.       while (<MANI>) {
  986.           chop;
  987. ***************
  988. *** 88,99 ****
  989.           next;
  990.       }
  991.       elsif ($revs == 1) {
  992. !         print "Last revision for $file is $baserev.\n";
  993.           print SNAPSHOT "$file\t$baserev\n";
  994.       }
  995.       else {
  996.           ($lastrev) = ($rlog =~ /revision $revbranch\.(\d+)/);
  997. !         print "Last revision for $file is $revbranch.$lastrev.\n";
  998.           print SNAPSHOT "$file\t$revbranch.$lastrev\n";
  999.       }
  1000.   }
  1001. --- 91,102 ----
  1002.           next;
  1003.       }
  1004.       elsif ($revs == 1) {
  1005. !         print "$progname: last revision for $file is $baserev.\n";
  1006.           print SNAPSHOT "$file\t$baserev\n";
  1007.       }
  1008.       else {
  1009.           ($lastrev) = ($rlog =~ /revision $revbranch\.(\d+)/);
  1010. !         print "$progname: last revision for $file is $revbranch.$lastrev.\n";
  1011.           print SNAPSHOT "$file\t$revbranch.$lastrev\n";
  1012.       }
  1013.   }
  1014. ***************
  1015. *** 115,119 ****
  1016. --- 118,124 ----
  1017.   $grep -v '^;#' ../pl/package.pl >>patsnap
  1018.   $grep -v '^;#' ../pl/rcsargs.pl >>patsnap
  1019.   $grep -v '^;#' ../pl/comment.pl >>patsnap
  1020. + $grep -v '^;#' ../pl/tilde.pl >>patsnap
  1021. + $grep -v '^;#' ../pl/profile.pl >>patsnap
  1022.   chmod +x patsnap
  1023.   $eunicefix patsnap
  1024.  
  1025. Index: mcon/U/libflex.U
  1026. Prereq: 3.0
  1027. *** mcon/U/libflex.U.old    Mon Jan 24 15:35:02 1994
  1028. --- mcon/U/libflex.U    Mon Jan 24 15:35:02 1994
  1029. ***************
  1030. *** 1,4 ****
  1031. ! ?RCS: $Id: libflex.U,v 3.0 1993/08/18 12:08:59 ram Exp $
  1032.   ?RCS:
  1033.   ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  1034.   ?RCS: 
  1035. --- 1,4 ----
  1036. ! ?RCS: $Id: libflex.U,v 3.0.1.1 1994/01/24 14:13:25 ram Exp $
  1037.   ?RCS:
  1038.   ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  1039.   ?RCS: 
  1040. ***************
  1041. *** 9,32 ****
  1042.   ?RCS: of the source tree for dist 3.0.
  1043.   ?RCS:
  1044.   ?RCS: $Log: libflex.U,v $
  1045.   ?RCS: Revision 3.0  1993/08/18  12:08:59  ram
  1046.   ?RCS: Baseline for dist 3.0 netwide release.
  1047.   ?RCS:
  1048. ! ?MAKE:libflex: test Loc flex libpth
  1049.   ?MAKE:    -pick add $@ %<
  1050.   ?S:libflex:
  1051.   ?S:    This variable contains the argument to pass to the loader in order
  1052. ! ?S:    to get the flex library routines.  If there is no flex or flex
  1053.   ?S:    library, it is null.
  1054.   ?S:.
  1055.   ?T:xxx
  1056. - ?O: use libswanted='-lfl' instead (see libs.U)
  1057.   : see if we should include -lfl
  1058.   echo " "
  1059. ! case "$flex" in
  1060. ! */flex)
  1061.       if $test -r /usr/lib/libfl.a || $test -r /usr/local/lib/libfl.a ; then
  1062.           echo "-lfl found." >&4
  1063.       else
  1064.           xxx=`./loc libfl.a x $libpth`
  1065.           case "$xxx" in
  1066. --- 9,35 ----
  1067.   ?RCS: of the source tree for dist 3.0.
  1068.   ?RCS:
  1069.   ?RCS: $Log: libflex.U,v $
  1070. + ?RCS: Revision 3.0.1.1  1994/01/24  14:13:25  ram
  1071. + ?RCS: patch16: un-obsoleted this unit to allow smooth lex/flex compilations
  1072. + ?RCS:
  1073.   ?RCS: Revision 3.0  1993/08/18  12:08:59  ram
  1074.   ?RCS: Baseline for dist 3.0 netwide release.
  1075.   ?RCS:
  1076. ! ?MAKE:libflex: test Loc lex libpth
  1077.   ?MAKE:    -pick add $@ %<
  1078.   ?S:libflex:
  1079.   ?S:    This variable contains the argument to pass to the loader in order
  1080. ! ?S:    to get the flex/lex library routines.  If there is no flex or flex
  1081.   ?S:    library, it is null.
  1082.   ?S:.
  1083.   ?T:xxx
  1084.   : see if we should include -lfl
  1085.   echo " "
  1086. ! case "$lex" in
  1087. ! *flex)
  1088.       if $test -r /usr/lib/libfl.a || $test -r /usr/local/lib/libfl.a ; then
  1089.           echo "-lfl found." >&4
  1090. +         libflex='-lfl'
  1091.       else
  1092.           xxx=`./loc libfl.a x $libpth`
  1093.           case "$xxx" in
  1094. ***************
  1095. *** 40,47 ****
  1096.               ;;
  1097.           esac
  1098.       fi
  1099.   *)
  1100. ! echo "You don't seem to have flex, so I won't look for the flex library." >&4
  1101.       ;;
  1102.   esac
  1103.   
  1104. --- 43,69 ----
  1105.               ;;
  1106.           esac
  1107.       fi
  1108. +     ;;
  1109. + *lex)
  1110. +     if $test -r /usr/lib/libl.a || $test -r /usr/local/lib/libl.a ; then
  1111. +         echo "-ll found." >&4
  1112. +         libflex='-ll'
  1113. +     else
  1114. +         xxx=`./loc libl.a x $libpth`
  1115. +         case "$xxx" in
  1116. +         x)
  1117. +             echo "No lex library found." >&4
  1118. +             libflex=''
  1119. +             ;;
  1120. +         *)
  1121. +             echo "lex library found in $xxx." >&4
  1122. +             libflex="$xxx"
  1123. +             ;;
  1124. +         esac
  1125. +     fi
  1126. +     ;;
  1127.   *)
  1128. ! echo "You don't seem to have lex or flex, so I won't look for libraries." >&4
  1129.       ;;
  1130.   esac
  1131.   
  1132.  
  1133. Index: mcon/U/vaproto.U
  1134. Prereq: 3.0
  1135. *** mcon/U/vaproto.U.old    Mon Jan 24 15:35:07 1994
  1136. --- mcon/U/vaproto.U    Mon Jan 24 15:35:07 1994
  1137. ***************
  1138. *** 1,4 ****
  1139. ! ?RCS: $Id: vaproto.U,v 3.0 1993/08/18 12:09:59 ram Exp $
  1140.   ?RCS:
  1141.   ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  1142.   ?RCS: 
  1143. --- 1,4 ----
  1144. ! ?RCS: $Id: vaproto.U,v 3.0.1.1 1994/01/24 14:17:16 ram Exp $
  1145.   ?RCS:
  1146.   ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  1147.   ?RCS: 
  1148. ***************
  1149. *** 11,16 ****
  1150. --- 11,19 ----
  1151.   ?RCS: Orginal Author: Graham Stoney <greyham@research.canon.oz.au>
  1152.   ?RCS:
  1153.   ?RCS: $Log: vaproto.U,v $
  1154. + ?RCS: Revision 3.0.1.1  1994/01/24  14:17:16  ram
  1155. + ?RCS: patch16: definition of _V now appears only when needed
  1156. + ?RCS:
  1157.   ?RCS: Revision 3.0  1993/08/18  12:09:59  ram
  1158.   ?RCS: Baseline for dist 3.0 netwide release.
  1159.   ?RCS:
  1160. ***************
  1161. *** 25,31 ****
  1162.   ?C:    This variable is defined on systems supporting prototype declaration
  1163.   ?C:    of functions with a variable number of arguments.
  1164.   ?C:.
  1165. ! ?C:_V ~ %<:
  1166.   ?C:    This macro is used to declare function parameters in prototypes for
  1167.   ?C:    functions with a variable number of parameters. Use double parentheses.
  1168.   ?C:    For example:
  1169. --- 28,34 ----
  1170.   ?C:    This variable is defined on systems supporting prototype declaration
  1171.   ?C:    of functions with a variable number of arguments.
  1172.   ?C:.
  1173. ! ?C:_V:
  1174.   ?C:    This macro is used to declare function parameters in prototypes for
  1175.   ?C:    functions with a variable number of parameters. Use double parentheses.
  1176.   ?C:    For example:
  1177. ***************
  1178. *** 37,47 ****
  1179.   ?C:    have a non-effect _V() macro and still get prototypes via _().
  1180.   ?C:.
  1181.   ?H:?%<:#$vaproto CAN_VAPROTO    /**/
  1182. ! ?H:?%<:#ifdef CAN_VAPROTO
  1183. ! ?H:?%<:#define    _V(args) args
  1184. ! ?H:?%<:#else
  1185. ! ?H:?%<:#define    _V(args) ()
  1186. ! ?H:?%<:#endif
  1187.   ?H:.
  1188.   ?W:%<:_V
  1189.   ?LINT:set vaproto
  1190. --- 40,50 ----
  1191.   ?C:    have a non-effect _V() macro and still get prototypes via _().
  1192.   ?C:.
  1193.   ?H:?%<:#$vaproto CAN_VAPROTO    /**/
  1194. ! ?H:?_V:#ifdef CAN_VAPROTO
  1195. ! ?H:?_V:#define    _V(args) args
  1196. ! ?H:?_V:#else
  1197. ! ?H:?_V:#define    _V(args) ()
  1198. ! ?H:?_V:#endif
  1199.   ?H:.
  1200.   ?W:%<:_V
  1201.   ?LINT:set vaproto
  1202. ***************
  1203. *** 49,59 ****
  1204.   echo " "
  1205.   case "$prototype$i_stdarg" in
  1206.   $define$define)
  1207. !     echo "It appears we'll be able to prototype varargs functions."
  1208.       val="$define"
  1209.       ;;
  1210.   *)
  1211. !     echo "Too bad... We won't be using prototyped varargs functions..."
  1212.       val="$undef"
  1213.       ;;
  1214.   esac
  1215. --- 52,62 ----
  1216.   echo " "
  1217.   case "$prototype$i_stdarg" in
  1218.   $define$define)
  1219. !     echo "It appears we'll be able to prototype varargs functions." >&4
  1220.       val="$define"
  1221.       ;;
  1222.   *)
  1223. !     echo "Too bad... We won't be using prototyped varargs functions..." >&4
  1224.       val="$undef"
  1225.       ;;
  1226.   esac
  1227.  
  1228. Index: kit/makedist.SH
  1229. Prereq: 3.0.1.1
  1230. *** kit/makedist.SH.old    Mon Jan 24 15:34:37 1994
  1231. --- kit/makedist.SH    Mon Jan 24 15:34:37 1994
  1232. ***************
  1233. *** 17,23 ****
  1234.       eval "exec perl -S \$0 \$*"
  1235.           if \$running_under_some_shell;
  1236.   
  1237. ! # $Id: makedist.SH,v 3.0.1.1 1993/08/19 06:42:17 ram Exp $
  1238.   #
  1239.   #  Copyright (c) 1991-1993, Raphael Manfredi
  1240.   #  
  1241. --- 17,23 ----
  1242.       eval "exec perl -S \$0 \$*"
  1243.           if \$running_under_some_shell;
  1244.   
  1245. ! # $Id: makedist.SH,v 3.0.1.2 1994/01/24 13:58:20 ram Exp $
  1246.   #
  1247.   #  Copyright (c) 1991-1993, Raphael Manfredi
  1248.   #  
  1249. ***************
  1250. *** 28,33 ****
  1251. --- 28,38 ----
  1252.   #  of the source tree for dist 3.0.
  1253.   #
  1254.   # $Log: makedist.SH,v $
  1255. + # Revision 3.0.1.2  1994/01/24  13:58:20  ram
  1256. + # patch16: modified call to manifake to trap exceptions manually
  1257. + # patch16: removed final sed post-processing to allow 'make depend' target
  1258. + # patch16: added ~/.dist_profile awareness
  1259. + #
  1260.   # Revision 3.0.1.1  1993/08/19  06:42:17  ram
  1261.   # patch1: leading config.sh searching was not aborting properly
  1262.   #
  1263. ***************
  1264. *** 40,48 ****
  1265. --- 45,56 ----
  1266.   !GROK!THIS!
  1267.   $spitshell >>makedist <<'!NO!SUBS!'
  1268.   
  1269. + &profile;                    # Read ~/.dist_profile
  1270.   require 'getopts.pl';
  1271.   &usage unless &Getopts('c:f:dhvqs:V');
  1272.   
  1273. + $ENV{'DIST'} = '/dev/null';    # Disable ~/.dist_profile
  1274.   if ($opt_V) {
  1275.       print STDERR "makedist $version PL$patchlevel\n";
  1276.       exit 0;
  1277. ***************
  1278. *** 67,74 ****
  1279.   
  1280.   &readpackage;
  1281.   &get_patchlevel;
  1282. - &manifake;
  1283.   
  1284.   if ($opt_c) {                # Copy distribution only, no shell archive
  1285.       &distcopy;
  1286.       exit 0;
  1287. --- 75,87 ----
  1288.   
  1289.   &readpackage;
  1290.   &get_patchlevel;
  1291.   
  1292. + eval '&manifake';            # Want to trap possible die and redirect to fatal
  1293. + if ($@ ne '') {
  1294. +     chop($@);
  1295. +     &fatal($@);
  1296. + }
  1297.   if ($opt_c) {                # Copy distribution only, no shell archive
  1298.       &distcopy;
  1299.       exit 0;
  1300. ***************
  1301. *** 438,446 ****
  1302.   
  1303.   !NO!SUBS!
  1304.   $grep -v '^;#' ../pl/package.pl >>makedist
  1305. ! $grep -v '^;#' ../pl/manifake.pl | \
  1306. !     $sed -e 's|die \(.*\);|do fatal(\1);|' >>makedist
  1307.   $grep -v '^;#' ../pl/copyright.pl >>makedist
  1308.   $grep -v '^;#' ../pl/makedir.pl >>makedist
  1309.   chmod +x makedist
  1310.   $eunicefix makedist
  1311. --- 451,460 ----
  1312.   
  1313.   !NO!SUBS!
  1314.   $grep -v '^;#' ../pl/package.pl >>makedist
  1315. ! $grep -v '^;#' ../pl/manifake.pl >>makedist
  1316.   $grep -v '^;#' ../pl/copyright.pl >>makedist
  1317.   $grep -v '^;#' ../pl/makedir.pl >>makedist
  1318. + $grep -v '^;#' ../pl/tilde.pl >>makedist
  1319. + $grep -v '^;#' ../pl/profile.pl >>makedist
  1320.   chmod +x makedist
  1321.   $eunicefix makedist
  1322.  
  1323. Index: mcon/U/libyacc.U
  1324. Prereq: 3.0
  1325. *** mcon/U/libyacc.U.old    Mon Jan 24 15:35:03 1994
  1326. --- mcon/U/libyacc.U    Mon Jan 24 15:35:03 1994
  1327. ***************
  1328. *** 1,4 ****
  1329. ! ?RCS: $Id: libyacc.U,v 3.0 1993/08/18 12:09:04 ram Exp $
  1330.   ?RCS:
  1331.   ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  1332.   ?RCS: 
  1333. --- 1,4 ----
  1334. ! ?RCS: $Id: libyacc.U,v 3.0.1.1 1994/01/24 14:13:49 ram Exp $
  1335.   ?RCS:
  1336.   ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  1337.   ?RCS: 
  1338. ***************
  1339. *** 9,18 ****
  1340.   ?RCS: of the source tree for dist 3.0.
  1341.   ?RCS:
  1342.   ?RCS: $Log: libyacc.U,v $
  1343.   ?RCS: Revision 3.0  1993/08/18  12:09:04  ram
  1344.   ?RCS: Baseline for dist 3.0 netwide release.
  1345.   ?RCS:
  1346. ! ?MAKE:libyacc: Loc yacc libpth
  1347.   ?MAKE:    -pick add $@ %<
  1348.   ?S:libyacc:
  1349.   ?S:    This variable contains the argument to pass to the loader in order
  1350. --- 9,21 ----
  1351.   ?RCS: of the source tree for dist 3.0.
  1352.   ?RCS:
  1353.   ?RCS: $Log: libyacc.U,v $
  1354. + ?RCS: Revision 3.0.1.1  1994/01/24  14:13:49  ram
  1355. + ?RCS: patch16: un-obsoleted this unit for smooth yacc compilations
  1356. + ?RCS:
  1357.   ?RCS: Revision 3.0  1993/08/18  12:09:04  ram
  1358.   ?RCS: Baseline for dist 3.0 netwide release.
  1359.   ?RCS:
  1360. ! ?MAKE:libyacc: Loc yacc libpth test
  1361.   ?MAKE:    -pick add $@ %<
  1362.   ?S:libyacc:
  1363.   ?S:    This variable contains the argument to pass to the loader in order
  1364. ***************
  1365. *** 20,43 ****
  1366.   ?S:    library, it is null.
  1367.   ?S:.
  1368.   ?T:xxx
  1369. - ?O: use libswanted='-ly' instead (see libs.U)
  1370.   : see if we should include -ly
  1371.   echo " "
  1372.   case "$yacc" in
  1373.   *yacc)
  1374. !     xxx=`./loc liby.a x $libpth`
  1375. !     case "$xxx" in
  1376. !     x)
  1377. !         echo "No yacc library found." >&4
  1378. !         libyacc=''
  1379. !         ;;
  1380. !     *)
  1381. !         echo "yacc library found in $xxx." >&4
  1382. !         libyacc="$xxx"
  1383. !         ;;
  1384. !     esac
  1385.       ;;
  1386. ! */bison*)
  1387.       echo "You are using bison, so I won't look for a yacc library." >&4
  1388.       libyacc=''
  1389.       ;;
  1390. --- 23,50 ----
  1391.   ?S:    library, it is null.
  1392.   ?S:.
  1393.   ?T:xxx
  1394.   : see if we should include -ly
  1395.   echo " "
  1396.   case "$yacc" in
  1397.   *yacc)
  1398. !     if $test -r /usr/lib/liby.a || $test -r /usr/local/lib/liby.a ; then
  1399. !         echo "-ly found." >&4
  1400. !         libyacc='-ly'
  1401. !     else
  1402. !         xxx=`./loc liby.a x $libpth`
  1403. !         case "$xxx" in
  1404. !         x)
  1405. !             echo "No yacc library found." >&4
  1406. !             libyacc=''
  1407. !             ;;
  1408. !         *)
  1409. !             echo "yacc library found in $xxx." >&4
  1410. !             libyacc="$xxx"
  1411. !             ;;
  1412. !         esac
  1413. !     fi
  1414.       ;;
  1415. ! *bison*)
  1416.       echo "You are using bison, so I won't look for a yacc library." >&4
  1417.       libyacc=''
  1418.       ;;
  1419.  
  1420. Index: mcon/U/d_strerror.U
  1421. Prereq: 3.0
  1422. *** mcon/U/d_strerror.U.old    Mon Jan 24 15:34:57 1994
  1423. --- mcon/U/d_strerror.U    Mon Jan 24 15:34:57 1994
  1424. ***************
  1425. *** 1,4 ****
  1426. ! ?RCS: $Id: d_strerror.U,v 3.0 1993/08/18 12:07:35 ram Exp $
  1427.   ?RCS:
  1428.   ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  1429.   ?RCS: 
  1430. --- 1,4 ----
  1431. ! ?RCS: $Id: d_strerror.U,v 3.0.1.1 1994/01/24 14:08:56 ram Exp $
  1432.   ?RCS:
  1433.   ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  1434.   ?RCS: 
  1435. ***************
  1436. *** 9,14 ****
  1437. --- 9,18 ----
  1438.   ?RCS: of the source tree for dist 3.0.
  1439.   ?RCS:
  1440.   ?RCS: $Log: d_strerror.U,v $
  1441. + ?RCS: Revision 3.0.1.1  1994/01/24  14:08:56  ram
  1442. + ?RCS: patch16: protected code looking for sys_errnolist[] with @if
  1443. + ?RCS: patch16: added default value for d_sysernlst
  1444. + ?RCS:
  1445.   ?RCS: Revision 3.0  1993/08/18  12:07:35  ram
  1446.   ?RCS: Baseline for dist 3.0 netwide release.
  1447.   ?RCS:
  1448. ***************
  1449. *** 32,38 ****
  1450.   ?S:.
  1451.   ?C:HAS_STRERROR (STRERROR):
  1452.   ?C:    This symbol, if defined, indicates that the strerror routine is
  1453. ! ?C:    available to translate error numbers to strings.
  1454.   ?C:.
  1455.   ?C:HAS_SYS_ERRLIST (SYSERRLIST):
  1456.   ?C:    This symbol, if defined, indicates that the sys_errlist array is
  1457. --- 36,43 ----
  1458.   ?S:.
  1459.   ?C:HAS_STRERROR (STRERROR):
  1460.   ?C:    This symbol, if defined, indicates that the strerror routine is
  1461. ! ?C:    available to translate error numbers to strings. See the writeup
  1462. ! ?C:    of strerror() in this file before you try to define your own.
  1463.   ?C:.
  1464.   ?C:HAS_SYS_ERRLIST (SYSERRLIST):
  1465.   ?C:    This symbol, if defined, indicates that the sys_errlist array is
  1466. ***************
  1467. *** 54,59 ****
  1468. --- 59,65 ----
  1469.   ?H:#$d_sysernlst HAS_SYS_ERRNOLIST    /**/
  1470.   ?H:#$d_strerrm strerror(e) ((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e]) /**/
  1471.   ?H:.
  1472. + ?D:d_sysernlst=''
  1473.   ?T:xxx val
  1474.   : see if strerror and/or sys_errlist[] exist
  1475.   echo " "
  1476. ***************
  1477. *** 91,96 ****
  1478. --- 97,103 ----
  1479.       d_syserrlst="$undef"
  1480.       d_strerrm="$undef"
  1481.   fi
  1482. + @if d_sysernlst || HAS_SYS_ERRNOLIST
  1483.   if set sys_errnolist val -a d_sysernlst; eval $csym; $val; then
  1484.       echo "(Symbolic error codes can be fetched via the sys_errnolist[] array.)"
  1485.       d_sysernlst="$define"
  1486. ***************
  1487. *** 98,101 ****
  1488. --- 105,109 ----
  1489.       echo "(However, I can't extract the symbolic error code out of errno.)"
  1490.       d_sysernlst="$undef"
  1491.   fi
  1492. + @end
  1493.   
  1494.  
  1495. Index: mcon/U/cf_name.U
  1496. *** mcon/U/cf_name.U.old    Mon Jan 24 15:34:52 1994
  1497. --- mcon/U/cf_name.U    Mon Jan 24 15:34:52 1994
  1498. ***************
  1499. *** 0 ****
  1500. --- 1,68 ----
  1501. + ?RCS: $Id: cf_name.U,v 3.0.1.1 1994/01/24 14:05:11 ram Exp $
  1502. + ?RCS:
  1503. + ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  1504. + ?RCS: 
  1505. + ?RCS: You may redistribute only under the terms of the Artistic Licence,
  1506. + ?RCS: as specified in the README file that comes with the distribution.
  1507. + ?RCS: You may reuse parts of this distribution only within the terms of
  1508. + ?RCS: that same Artistic Licence; a copy of which may be found at the root
  1509. + ?RCS: of the source tree for dist 3.0.
  1510. + ?RCS: 
  1511. + ?RCS: Original Author: Graham Stoney <greyham@research.canon.oz.au>
  1512. + ?RCS:
  1513. + ?RCS: $Log: cf_name.U,v $
  1514. + ?RCS: Revision 3.0.1.1  1994/01/24  14:05:11  ram
  1515. + ?RCS: patch16: created
  1516. + ?RCS:
  1517. + ?RCS:
  1518. + ?MAKE:+cf_name: cf_by passcat Filexp nametype cat
  1519. + ?MAKE:    -pick add $@ %<
  1520. + ?S:cf_name:
  1521. + ?S:    Full name of the person who ran the Configure script and answered the
  1522. + ?S:    questions. This can be used by units that require the user's full name.
  1523. + ?S:    This variable is for internal use only.
  1524. + ?S:.
  1525. + ?T:xxx fn NAME
  1526. + : figure out their full name
  1527. + case "$NAME" in
  1528. + '') case "$nametype" in
  1529. +     other)
  1530. +         fn=`./filexp ~/.fullname`
  1531. +         xxx=usg
  1532. +         $test -f $fn && xxx=other
  1533. +         ;;
  1534. +     *)
  1535. +         xxx="$nametype"
  1536. +         ;;
  1537. +     esac
  1538. +     case "$xxx" in
  1539. +     bsd)
  1540. +         cf_name=`$passcat | grep "^$cf_by:" | \
  1541. +             sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/'`
  1542. +         ;;
  1543. +     usg)
  1544. +         cf_name=`$passcat | grep "^$cf_by:" | \
  1545. +             sed -e 's/^[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/' \
  1546. +             -e 's/[^-]*-\(.*\)(.*)/\1/'`
  1547. +         ;;
  1548. +     *)
  1549. +         cf_name=`$cat $fn`
  1550. +         ;;
  1551. +     esac
  1552. +     ;;
  1553. + *)
  1554. +     cf_name="$NAME"
  1555. +     ;;
  1556. + esac
  1557. + ?X:
  1558. + ?X: In the original unit, Graham asked for the user name, in case the above
  1559. + ?X: code was unable to figure it out correctly. Since now cf_name has been
  1560. + ?X: made an internal variable only (i.e. it is not saved in config.sh), letting
  1561. + ?X: the user override the computed default each time would be a pain.
  1562. + ?X: Therefore, I have decided to trust the above code to get it right, and for
  1563. + ?X: those rare cases where it will fail, too bad :-) --RAM.
  1564. + ?X:
  1565. + echo " "
  1566. + echo "Pleased to meet you, $cf_name."
  1567.  
  1568. *** End of Patch 20 ***
  1569.  
  1570. exit 0 # Just in case...
  1571.