This file contains diffs from version 3.63 of GNU Make to version 3.64. Changes in files that are generated by etags and TeX have been omitted. diff -ruN make-3.64/ChangeLog make-3.65/ChangeLog --- make-3.64/ChangeLog Wed Apr 21 15:18:02 1993 +++ make-3.65/ChangeLog Sun May 9 15:41:34 1993 @@ -1,3 +1,90 @@ +Sun May 9 15:41:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.65. + +Fri May 7 18:34:56 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * function.c (handle_function): Fatal for unmatched paren. + +Thu May 6 16:13:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.64.3. + + * commands.c (handling_fatal_signal): New variable. + (fatal_error_signal): Set it. + * job.c (reap_children): Avoid nonreentrant operations if that is set. + * make.h: Declare handling_fatal_signal. + + * expand.c (reference_variable): New function, snippet of code + broken out of simple-reference case of variable_expand. + (variable_expand): Use it for simple refs. + (variable_expand): When checking for a computed variable name, + notice a colon that comes before the final CLOSEPAREN. Expand + only up to the colon, and then replace the pending text with a + copy containing the expanded name and fall through to subst ref + handling. + (variable_expand): Don't bother expanding the name if a colon + appears before the first $. + (expand_argument): Use alloca instead of savestring. + (variable_expand): For subst ref, expand both sides of = before + passing to [pat]subst_expand. Use find_percent instead of lindex + to check the lhs for a %. + +Wed May 5 14:45:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.64.2. + +Mon May 3 17:00:32 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * arscan.c (ar_name_equal) [AIAMAG]: Abort if TRUNCATED is nonzero. + + * read.c (read_makefile): Pass extra arg of 1 to parse_file_seq, + not to multi_glob. + +Thu Apr 29 19:47:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Version 3.64.1. + + * arscan.c (ar_scan): New local flag var LONG_NAME. Set it when + we read the member name in any of the fashions that allow it to be + arbitrarily long. Pass its negation to FUNCTION. + (describe_member): Take TRUNCATED from ar_scan and print it. + (ar_name_equal): Take new arg TRUNCATED; if nonzero, compare only + the first sizeof (struct ar_hdr.ar_name) chars. + (ar_member_pos): Take TRUNCATED from ar_scan, pass to ar_name_equal. + * ar.c (ar_member_date_1): Likewise. + +Wed Apr 28 21:18:22 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * job.c (reap_children): Before calling start_job_command to start + the next command line, reset C->remote by calling start_remote_job_p. + +Mon Apr 26 15:56:15 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * arscan.c (ar_scan): New local var NAMEMAP. + In loop, rename NAME to NAMEBUF; new var NAME is a pointer; new + flag IS_NAMEMAP. When extracting the member name, always put a + null at its end first. If the name is "//" or "/ARFILENAMES", set + IS_NAMEMAP. If we have already read in NAMEMAP, and NAME looks + like " /N", get full name from NAMEMAP+N. + Else if NAME looks like "#1/N", read N chars from the + elt data to be the full name. At end of loop, if IS_NAMEMAP, read + the elt's data into alloca'd NAMEMAP. + (ar_name_equal): #if 0 truncating code. + + * make.h: Don't declare vfork at all. It returns int anyway, + unless declared it; and we conflicted with some systems. + + * main.c (define_makeflags): If FLAGSTRING[1] is '-', define + MAKEFLAGS to all of FLAGSTRING, not &FLAGSTRING[1]. Don't want to + define it to something like "-no-print-directory". + Use %g format instead of %f for floating-valued things. + +Thu Apr 22 18:40:58 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * GNUmakefile (Makefile.in): Use a substitution ref on nolib-deps + to change remote-%.dep to remote-stub.dep. + Wed Apr 21 15:17:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * Version 3.64. diff -ruN make-3.64/Makefile.in make-3.65/Makefile.in --- make-3.64/Makefile.in Wed Apr 21 15:19:13 1993 +++ make-3.65/Makefile.in Sun May 9 15:46:58 1993 @@ -246,11 +246,10 @@ function.o : function.c make.h config.h variable.h dep.h commands.h job.h vpath.o : vpath.c make.h config.h file.h variable.h version.o : version.c -ar.o : ar.c make.h file.h +ar.o : ar.c make.h config.h file.h arscan.o : arscan.c make.h config.h signame.o : signame.c config.h signame.h -remote-cstms.o : remote-cstms.c make.h config.h commands.h job.h pmake/customs/customs.h \ - pmake/customs/config.h pmake/customs/../unix/config.h pmake/customs/rpc.h pmake/lib/include/sprite.h +remote-stub.o : remote-stub.c make.h config.h commands.h getopt.o : getopt.c config.h getopt.h getopt1.o : getopt1.c config.h getopt.h getloadavg.o : getloadavg.c config.h diff -ruN make-3.64/NEWS make-3.65/NEWS --- make-3.64/NEWS Mon Apr 12 15:58:11 1993 +++ make-3.65/NEWS Sun May 9 15:43:00 1993 @@ -5,6 +5,10 @@ Please send GNU make bug reports to bug-gnu-utils@prep.ai.mit.edu. +Version 3.65 + +* Make now supports long-named members in `ar' archive files. + Version 3.64 * Make now supports the `+=' syntax for a variable definition which appends diff -ruN make-3.64/README make-3.65/README --- make-3.64/README Wed Apr 21 15:19:03 1993 +++ make-3.65/README Sun May 9 15:46:57 1993 @@ -1,4 +1,4 @@ -This directory contains the 3.64 test release of GNU Make. +This directory contains the 3.65 test release of GNU Make. All bugs reported for previous test releases have been fixed. Some bugs surely remain. diff -ruN make-3.64/alloca.c make-3.65/alloca.c --- make-3.64/alloca.c Wed Mar 31 17:32:10 1993 +++ make-3.65/alloca.c Sat May 8 13:42:29 1993 @@ -1,41 +1,32 @@ -/* - alloca -- (mostly) portable public-domain implementation -- D A Gwyn +/* alloca.c -- allocate automatically reclaimed memory + (Mostly) portable public-domain implementation -- D A Gwyn - 93/3/31 jimb - Use xfree instead of free. - 86/05/30 rms - include config.h, since on VMS it renames some symbols. - Use xmalloc instead of malloc. - - This implementation of the PWB library alloca() function, - which is used to allocate space off the run-time stack so - that it is automatically reclaimed upon procedure exit, - was inspired by discussions with J. Q. Johnson of Cornell. - - It should work under any C implementation that uses an - actual procedure stack (as opposed to a linked list of - frames). There are some preprocessor constants that can - be defined when compiling for your specific system, for - improved efficiency; however, the defaults should be okay. - - The general concept of this implementation is to keep - track of all alloca()-allocated blocks, and reclaim any - that are found to be deeper in the stack than the current - invocation. This heuristic does not reclaim storage as - soon as it becomes invalid, but it will do so eventually. - - As a special case, alloca(0) reclaims storage without - allocating any. It is a good idea to use alloca(0) in - your main control loop, etc. to force garbage collection. -*/ -#ifndef lint -static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */ -#endif + This implementation of the PWB library alloca function, + which is used to allocate space off the run-time stack so + that it is automatically reclaimed upon procedure exit, + was inspired by discussions with J. Q. Johnson of Cornell. + + There are some preprocessor constants that can + be defined when compiling for your specific system, for + improved efficiency; however, the defaults should be okay. + + The general concept of this implementation is to keep + track of all alloca-allocated blocks, and reclaim any + that are found to be deeper in the stack than the current + invocation. This heuristic does not reclaim storage as + soon as it becomes invalid, but it will do so eventually. + + As a special case, alloca(0) reclaims storage without + allocating any. It is a good idea to use alloca(0) in + your main control loop, etc. to force garbage collection. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif +/* If compiling with GCC, this file's not needed. */ +#ifndef alloca + #ifdef emacs #ifdef static /* actually, only want this if static is defined as "" @@ -54,149 +45,421 @@ #define free xfree #endif -#ifndef alloca /* If compiling with GCC, this file's not needed. */ +/* If your stack is a linked list of frames, you have to + provide an "address metric" ADDRESS_FUNCTION macro. */ + +#ifdef CRAY +long i00afunc (); +#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) +#else +#define ADDRESS_FUNCTION(arg) &(arg) +#endif -#ifdef __STDC__ -typedef void *pointer; /* generic pointer type */ +#if __STDC__ +typedef void *pointer; #else -typedef char *pointer; /* generic pointer type */ +typedef char *pointer; #endif -#define NULL 0 /* null pointer constant */ +#define NULL 0 -extern pointer xmalloc (); +extern pointer xmalloc (); -/* - Define STACK_DIRECTION if you know the direction of stack - growth for your system; otherwise it will be automatically - deduced at run-time. +/* Define STACK_DIRECTION if you know the direction of stack + growth for your system; otherwise it will be automatically + deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown -*/ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ #ifndef STACK_DIRECTION -#define STACK_DIRECTION 0 /* direction unknown */ +#define STACK_DIRECTION 0 /* Direction unknown. */ #endif #if STACK_DIRECTION != 0 -#define STACK_DIR STACK_DIRECTION /* known at compile-time */ +#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ -#else /* STACK_DIRECTION == 0; need run-time code */ +#else /* STACK_DIRECTION == 0; need run-time code. */ -static int stack_dir; /* 1 or -1 once known */ +static int stack_dir; /* 1 or -1 once known. */ #define STACK_DIR stack_dir static void -find_stack_direction (/* void */) +find_stack_direction () { - static char *addr = NULL; /* address of first - `dummy', once known */ - auto char dummy; /* to get stack address */ + static char *addr = NULL; /* Address of first `dummy', once known. */ + auto char dummy; /* To get stack address. */ if (addr == NULL) - { /* initial entry */ - addr = &dummy; + { /* Initial entry. */ + addr = ADDRESS_FUNCTION (dummy); - find_stack_direction (); /* recurse once */ + find_stack_direction (); /* Recurse once. */ } - else /* second entry */ - if (&dummy > addr) - stack_dir = 1; /* stack grew upward */ - else - stack_dir = -1; /* stack grew downward */ + else + { + /* Second entry. */ + if (ADDRESS_FUNCTION (dummy) > addr) + stack_dir = 1; /* Stack grew upward. */ + else + stack_dir = -1; /* Stack grew downward. */ + } } -#endif /* STACK_DIRECTION == 0 */ +#endif /* STACK_DIRECTION == 0 */ + +/* An "alloca header" is used to: + (a) chain together all alloca'ed blocks; + (b) keep track of stack depth. -/* - An "alloca header" is used to: - (a) chain together all alloca'ed blocks; - (b) keep track of stack depth. - - It is very important that sizeof (header) agree with malloc - alignment chunk size. The following default should work okay. -*/ + It is very important that sizeof(header) agree with malloc + alignment chunk size. The following default should work okay. */ #ifndef ALIGN_SIZE -#define ALIGN_SIZE sizeof (double) +#define ALIGN_SIZE sizeof(double) #endif typedef union hdr { - char align[ALIGN_SIZE]; /* to force sizeof (header) */ + char align[ALIGN_SIZE]; /* To force sizeof(header). */ struct { - union hdr *next; /* for chaining headers */ - char *deep; /* for stack depth measure */ + union hdr *next; /* For chaining headers. */ + char *deep; /* For stack depth measure. */ } h; } header; -/* - alloca ( size ) returns a pointer to at least `size' bytes of - storage which will be automatically reclaimed upon exit from - the procedure that called alloca. Originally, this space - was supposed to be taken from the current stack frame of the - caller, but that method cannot be made to work for some - implementations of C, for example under Gould's UTX/32. -*/ +static header *last_alloca_header = NULL; /* -> last alloca header. */ -static header *last_alloca_header = NULL; /* -> last alloca header */ +/* Return a pointer to at least SIZE bytes of storage, + which will be automatically reclaimed upon exit from + the procedure that called alloca. Originally, this space + was supposed to be taken from the current stack frame of the + caller, but that method cannot be made to work for some + implementations of C, for example under Gould's UTX/32. */ pointer -alloca (size) /* returns pointer to storage */ - unsigned size; /* # bytes to allocate */ +alloca (size) + unsigned size; { - auto char probe; /* probes stack depth: */ - register char *depth = &probe; + auto char probe; /* Probes stack depth: */ + register char *depth = ADDRESS_FUNCTION (probe); #if STACK_DIRECTION == 0 - if (STACK_DIR == 0) /* unknown growth direction */ + if (STACK_DIR == 0) /* Unknown growth direction. */ find_stack_direction (); #endif - /* Reclaim garbage, defined as all alloca'ed storage that - was allocated from deeper in the stack than currently. */ + /* Reclaim garbage, defined as all alloca'd storage that + was allocated from deeper in the stack than currently. */ { - register header *hp; /* traverses linked list */ + register header *hp; /* Traverses linked list. */ for (hp = last_alloca_header; hp != NULL;) if ((STACK_DIR > 0 && hp->h.deep > depth) || (STACK_DIR < 0 && hp->h.deep < depth)) { - register header *np = hp->h.next; + register header *np = hp->h.next; - free ((pointer) hp); /* collect garbage */ + free ((pointer) hp); /* Collect garbage. */ - hp = np; /* -> next header */ + hp = np; /* -> next header. */ } else - break; /* rest are not deeper */ + break; /* Rest are not deeper. */ - last_alloca_header = hp; /* -> last valid storage */ + last_alloca_header = hp; /* -> last valid storage. */ } if (size == 0) - return NULL; /* no allocation required */ + return NULL; /* No allocation required. */ - /* Allocate combined header + user data storage. */ + /* Allocate combined header + user data storage. */ { - register pointer new = xmalloc (sizeof (header) + size); - /* address of header */ + register pointer new = xmalloc (sizeof (header) + size); + /* Address of header. */ - ((header *)new)->h.next = last_alloca_header; - ((header *)new)->h.deep = depth; + ((header *) new)->h.next = last_alloca_header; + ((header *) new)->h.deep = depth; - last_alloca_header = (header *)new; + last_alloca_header = (header *) new; - /* User storage begins just after header. */ + /* User storage begins just after header. */ - return (pointer)((char *)new + sizeof (header)); + return (pointer) ((char *) new + sizeof (header)); } } + +#ifdef CRAY + +#ifdef DEBUG_I00AFUNC +#include +#endif + +#ifndef CRAY_STACK +#define CRAY_STACK +#ifndef CRAY2 +/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ +struct stack_control_header + { + long shgrow:32; /* Number of times stack has grown. */ + long shaseg:32; /* Size of increments to stack. */ + long shhwm:32; /* High water mark of stack. */ + long shsize:32; /* Current size of stack (all segments). */ + }; + +/* The stack segment linkage control information occurs at + the high-address end of a stack segment. (The stack + grows from low addresses to high addresses.) The initial + part of the stack segment linkage control information is + 0200 (octal) words. This provides for register storage + for the routine which overflows the stack. */ + +struct stack_segment_linkage + { + long ss[0200]; /* 0200 overflow words. */ + long sssize:32; /* Number of words in this segment. */ + long ssbase:32; /* Offset to stack base. */ + long:32; + long sspseg:32; /* Offset to linkage control of previous + segment of stack. */ + long:32; + long sstcpt:32; /* Pointer to task common address block. */ + long sscsnm; /* Private control structure number for + microtasking. */ + long ssusr1; /* Reserved for user. */ + long ssusr2; /* Reserved for user. */ + long sstpid; /* Process ID for pid based multi-tasking. */ + long ssgvup; /* Pointer to multitasking thread giveup. */ + long sscray[7]; /* Reserved for Cray Research. */ + long ssa0; + long ssa1; + long ssa2; + long ssa3; + long ssa4; + long ssa5; + long ssa6; + long ssa7; + long sss0; + long sss1; + long sss2; + long sss3; + long sss4; + long sss5; + long sss6; + long sss7; + }; + +#else /* CRAY2 */ +/* The following structure defines the vector of words + returned by the STKSTAT library routine. */ +struct stk_stat + { + long now; /* Current total stack size. */ + long maxc; /* Amount of contiguous space which would + be required to satisfy the maximum + stack demand to date. */ + long high_water; /* Stack high-water mark. */ + long overflows; /* Number of stack overflow ($STKOFEN) calls. */ + long hits; /* Number of internal buffer hits. */ + long extends; /* Number of block extensions. */ + long stko_mallocs; /* Block allocations by $STKOFEN. */ + long underflows; /* Number of stack underflow calls ($STKRETN). */ + long stko_free; /* Number of deallocations by $STKRETN. */ + long stkm_free; /* Number of deallocations by $STKMRET. */ + long segments; /* Current number of stack segments. */ + long maxs; /* Maximum number of stack segments so far. */ + long pad_size; /* Stack pad size. */ + long current_address; /* Current stack segment address. */ + long current_size; /* Current stack segment size. This + number is actually corrupted by STKSTAT to + include the fifteen word trailer area. */ + long initial_address; /* Address of initial segment. */ + long initial_size; /* Size of initial segment. */ + }; + +/* The following structure describes the data structure which trails + any stack segment. I think that the description in 'asdef' is + out of date. I only describe the parts that I am sure about. */ + +struct stk_trailer + { + long this_address; /* Address of this block. */ + long this_size; /* Size of this block (does not include + this trailer). */ + long unknown2; + long unknown3; + long link; /* Address of trailer block of previous + segment. */ + long unknown5; + long unknown6; + long unknown7; + long unknown8; + long unknown9; + long unknown10; + long unknown11; + long unknown12; + long unknown13; + long unknown14; + }; + +#endif /* CRAY2 */ +#endif /* not CRAY_STACK */ + +#ifdef CRAY2 +/* Determine a "stack measure" for an arbitrary ADDRESS. + I doubt that "lint" will like this much. */ + +static long +i00afunc (long *address) +{ + struct stk_stat status; + struct stk_trailer *trailer; + long *block, size; + long result = 0; + + /* We want to iterate through all of the segments. The first + step is to get the stack status structure. We could do this + more quickly and more directly, perhaps, by referencing the + $LM00 common block, but I know that this works. */ + + STKSTAT (&status); + + /* Set up the iteration. */ + + trailer = (struct stk_trailer *) (status.current_address + + status.current_size + - 15); + + /* There must be at least one stack segment. Therefore it is + a fatal error if "trailer" is null. */ + + if (trailer == 0) + abort (); + + /* Discard segments that do not contain our argument address. */ + + while (trailer != 0) + { + block = (long *) trailer->this_address; + size = trailer->this_size; + if (block == 0 || size == 0) + abort (); + trailer = (struct stk_trailer *) trailer->link; + if ((block <= address) && (address < (block + size))) + break; + } + + /* Set the result to the offset in this segment and add the sizes + of all predecessor segments. */ + + result = address - block; + + if (trailer == 0) + { + return result; + } + + do + { + if (trailer->this_size <= 0) + abort (); + result += trailer->this_size; + trailer = (struct stk_trailer *) trailer->link; + } + while (trailer != 0); + + /* We are done. Note that if you present a bogus address (one + not in any segment), you will get a different number back, formed + from subtracting the address of the first block. This is probably + not what you want. */ + + return (result); +} + +#else /* not CRAY2 */ +/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. + Determine the number of the cell within the stack, + given the address of the cell. The purpose of this + routine is to linearize, in some sense, stack addresses + for alloca. */ + +static long +i00afunc (long address) +{ + long stkl = 0; + + long size, pseg, this_segment, stack; + long result = 0; + + struct stack_segment_linkage *ssptr; + + /* Register B67 contains the address of the end of the + current stack segment. If you (as a subprogram) store + your registers on the stack and find that you are past + the contents of B67, you have overflowed the segment. + + B67 also points to the stack segment linkage control + area, which is what we are really interested in. */ + + stkl = CRAY_STACKSEG_END (); + ssptr = (struct stack_segment_linkage *) stkl; + + /* If one subtracts 'size' from the end of the segment, + one has the address of the first word of the segment. + + If this is not the first segment, 'pseg' will be + nonzero. */ + + pseg = ssptr->sspseg; + size = ssptr->sssize; + + this_segment = stkl - size; + + /* It is possible that calling this routine itself caused + a stack overflow. Discard stack segments which do not + contain the target address. */ + + while (!(this_segment <= address && address <= stkl)) + { +#ifdef DEBUG_I00AFUNC + fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); +#endif + if (pseg == 0) + break; + stkl = stkl - pseg; + ssptr = (struct stack_segment_linkage *) stkl; + size = ssptr->sssize; + pseg = ssptr->sspseg; + this_segment = stkl - size; + } + + result = address - this_segment; + + /* If you subtract pseg from the current end of the stack, + you get the address of the previous stack segment's end. + This seems a little convoluted to me, but I'll bet you save + a cycle somewhere. */ + + while (pseg != 0) + { +#ifdef DEBUG_I00AFUNC + fprintf (stderr, "%011o %011o\n", pseg, size); +#endif + stkl = stkl - pseg; + ssptr = (struct stack_segment_linkage *) stkl; + size = ssptr->sssize; + pseg = ssptr->sspseg; + result += size; + } + return (result); +} + +#endif /* not CRAY2 */ +#endif /* CRAY */ #endif /* no alloca */ diff -ruN make-3.64/ar.c make-3.65/ar.c --- make-3.64/ar.c Thu Jun 11 00:58:08 1992 +++ make-3.65/ar.c Thu Apr 29 19:57:58 1993 @@ -1,4 +1,5 @@ -/* Copyright (C) 1988, 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 + Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify @@ -107,14 +108,16 @@ /* ARGSUSED */ static long int -ar_member_date_1 (desc, mem, hdrpos, datapos, size, date, uid, gid, mode, name) +ar_member_date_1 (desc, mem, truncated, + hdrpos, datapos, size, date, uid, gid, mode, name) int desc; char *mem; + int truncated; long int hdrpos, datapos, size, date; int uid, gid, mode; char *name; { - return ar_name_equal (name, mem) ? date : 0; + return ar_name_equal (name, mem, truncated) ? date : 0; } /* Set the archive-member NAME's modtime to now. */ diff -ruN make-3.64/arscan.c make-3.65/arscan.c --- make-3.64/arscan.c Mon Apr 12 16:52:46 1993 +++ make-3.65/arscan.c Mon May 3 17:03:37 1993 @@ -53,6 +53,7 @@ and for each one call FUNCTION with the following arguments: archive file descriptor for reading the data, member name, + member name might be truncated flag, member header position in file, member data position in file, member data size, @@ -82,6 +83,8 @@ #ifdef AIAMAG FL_HDR fl_header; #endif + char *namemap = 0; + int long_name = 0; register int desc = open (archive, O_RDONLY, 0); if (desc < 0) return -1; @@ -153,7 +156,9 @@ int uidval, gidval; long int data_offset; #else - char name[sizeof member_header.ar_name + 1]; + char namebuf[sizeof member_header.ar_name + 1]; + char *name; + int is_namemap; /* Nonzero if this entry maps long names. */ #endif long int eltsize; int eltmode; @@ -186,6 +191,8 @@ name[name_len] = 0; + long_name = 1; + sscanf (member_header.ar_date, "%12ld", &dateval); sscanf (member_header.ar_uid, "%12d", &uidval); sscanf (member_header.ar_gid, "%12d", &gidval); @@ -216,15 +223,59 @@ return -2; } + name = namebuf; bcopy (member_header.ar_name, name, sizeof member_header.ar_name); { register char *p = name + sizeof member_header.ar_name; - while (p > name && *--p == ' ') + do *p = '\0'; + while (p > name && *--p == ' '); +#ifndef AIAMAG + /* If the member name is "//" or "ARFILENAMES/" this may be + a list of file name mappings. The maximum file name + length supported by the standard archive format is 14 + characters. This member will actually always be the + first or second entry in the archive, but we don't check + that. */ + is_namemap = (!strcmp (name, "//") + || !strcmp (name, "ARFILENAMES/")); +#endif /* Not AIAMAG. */ /* On some systems, there is a slash after each member name. */ if (*p == '/') *p = '\0'; + +#ifndef AIAMAG + /* If the member name starts with a space or a slash, this + is an index into the file name mappings (used by GNU ar). + Otherwise if the member name looks like #1/NUMBER the + real member name appears in the element data (used by + 4.4BSD). */ + if (! is_namemap + && (name[0] == ' ' || name[0] == '/') + && namemap != 0) + { + name = namemap + atoi (name + 1); + long_name = 1; + } + else if (name[0] == '#' + && name[1] == '1' + && name[2] == '/') + { + int namesize = atoi (name + 3); + + name = (char *) alloca (namesize + 1); + nread = read (desc, name, namesize); + if (nread != namesize) + { + close (desc); + return -2; + } + name[namesize] = '\0'; + + long_name = 1; + } +#endif /* Not AIAMAG. */ } #ifndef M_XENIX @@ -236,7 +287,7 @@ #endif /* Not Xenix. */ fnval = - (*function) (desc, name, member_offset, + (*function) (desc, name, ! long_name, member_offset, member_offset + AR_HDR_SIZE, eltsize, #ifndef M_XENIX atol (member_header.ar_date), @@ -270,6 +321,40 @@ return -2; } #else + + /* If this member maps archive names, we must read it in. The + name map will always precede any members whose names must + be mapped. */ + if (is_namemap) + { + char *clear; + char *limit; + + namemap = (char *) alloca (eltsize); + nread = read (desc, namemap, eltsize); + if (nread != eltsize) + { + (void) close (desc); + return -2; + } + + /* The names are separated by newlines. Some formats have + a trailing slash. Null terminate the strings for + convenience. */ + limit = namemap + eltsize; + for (clear = namemap; clear < limit; clear++) + { + if (*clear == '\n') + { + *clear = '\0'; + if (clear[-1] == '/') + clear[-1] = '\0'; + } + } + + is_namemap = 0; + } + member_offset += AR_HDR_SIZE + eltsize; if (member_offset % 2 != 0) member_offset++; @@ -281,12 +366,14 @@ return 0; } -/* Return nonzero iff NAME matches MEM. If NAME is longer than - sizeof (struct ar_hdr.ar_name), MEM may be the truncated version. */ +/* Return nonzero iff NAME matches MEM. + If TRUNCATED is nonzero, MEM may be truncated to + sizeof (struct ar_hdr.ar_name) - 1. */ int -ar_name_equal (name, mem) +ar_name_equal (name, mem, truncated) char *name, *mem; + int truncated; { char *p; @@ -294,7 +381,10 @@ if (p != 0) name = p + 1; -#if !defined (AIAMAG) && !defined (APOLLO) + /* We no longer use this kludge, since we + now support long archive member names. */ + +#if 0 && !defined (AIAMAG) && !defined (APOLLO) { /* `reallylongname.o' matches `reallylongnam.o'. @@ -323,6 +413,18 @@ #else /* AIX or APOLLO. */ + if (truncated) + { +#ifdef AIAMAG + /* TRUNCATED should never be set on this system. */ + abort (); +#else + struct ar_hdr hdr; + return !strncmp (name, mem, + sizeof (hdr.ar_name) - 1); +#endif + } + return !strcmp (name, mem); #endif @@ -330,14 +432,16 @@ /* ARGSUSED */ static long int -ar_member_pos (desc, mem, hdrpos, datapos, size, date, uid, gid, mode, name) +ar_member_pos (desc, mem, truncated, + hdrpos, datapos, size, date, uid, gid, mode, name) int desc; char *mem; + int truncated; long int hdrpos, datapos, size, date; int uid, gid, mode; char *name; { - if (!ar_name_equal (name, mem)) + if (!ar_name_equal (name, mem, truncated)) return 0; return hdrpos; } @@ -408,15 +512,19 @@ #ifdef TEST long int -describe_member (desc, name, hdrpos, datapos, size, date, uid, gid, mode) +describe_member (desc, name, truncated, + hdrpos, datapos, size, date, uid, gid, mode) int desc; char *name; + int truncated; long int hdrpos, datapos, size, date; int uid, gid, mode; { extern char *ctime (); - printf ("Member %s: %ld bytes at %ld (%ld).\n", name, size, hdrpos, datapos); + printf ("Member `%s'%s: %ld bytes at %ld (%ld).\n", + name, truncated ? " (name might be truncated)" : "", + size, hdrpos, datapos); printf (" Date %s", ctime (&date)); printf (" uid = %d, gid = %d, mode = 0%o.\n", uid, gid, mode); diff -ruN make-3.64/commands.c make-3.65/commands.c --- make-3.64/commands.c Sun Feb 21 15:05:54 1993 +++ make-3.65/commands.c Thu May 6 17:30:42 1993 @@ -318,6 +318,11 @@ new_job (file); } +/* This is set while we are inside fatal_error_signal, + so things can avoid nonreentrant operations. */ + +int handling_fatal_signal = 0; + /* Handle fatal signals. */ RETSIGTYPE @@ -324,6 +329,8 @@ fatal_error_signal (sig) int sig; { + handling_fatal_signal = 1; + signal (sig, SIG_DFL); #ifdef POSIX { diff -ruN make-3.64/config.h.in make-3.65/config.h.in --- make-3.64/config.h.in Wed Apr 21 15:19:40 1993 +++ make-3.65/config.h.in Sun May 9 15:58:36 1993 @@ -162,5 +162,8 @@ /* Define if you have the header file. */ #undef HAVE_MEMORY_H +/* Define if you have the header file. */ +#undef HAVE_MACH_MACH_H + /* Define if you have the header file. */ #undef HAVE_SYS_WAIT_H diff -ruN make-3.64/configure make-3.65/configure --- make-3.64/configure Wed Apr 21 15:19:28 1993 +++ make-3.65/configure Sun May 9 15:54:09 1993 @@ -121,10 +121,12 @@ if test -z "$CC"; then echo checking for gcc - saveifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" + # Extract the first word of `gcc', so it can be a program name with args. + set dummy gcc; word=$2 for dir in $PATH; do test -z "$dir" && dir=. - if test -f $dir/gcc; then + if test -f $dir/$word; then CC="gcc" break fi @@ -132,6 +134,7 @@ IFS="$saveifs" fi test -z "$CC" && CC="cc" +test -n "$CC" -a -n "$verbose" && echo " setting CC to $CC" # Find out if we are using GNU C, under whatever name. cat > conftest.c < conftest.c < #include -int main() { exit(0); } +int main() { exit(0); } int t() { DIR *dirp = opendir ("/"); } EOF if eval $compile; then @@ -391,7 +400,7 @@ cat > conftest.c < #include -int main() { exit(0); } +int main() { exit(0); } int t() { DIR *dirp = opendir ("/"); } EOF if eval $compile; then @@ -413,7 +422,7 @@ cat > conftest.c < #include -int main() { exit(0); } +int main() { exit(0); } int t() { DIR *dirp = opendir ("/"); } EOF if eval $compile; then @@ -435,7 +444,7 @@ cat > conftest.c < #include -int main() { exit(0); } +int main() { exit(0); } int t() { DIR *dirp = opendir ("/"); } EOF if eval $compile; then @@ -481,7 +490,7 @@ eval "$CPP $DEFS conftest.c > conftest.out 2>&1" if egrep "uid_t" conftest.out >/dev/null 2>&1; then : -else +else { test -n "$verbose" && \ echo ' defining' uid_t to be 'int' @@ -508,7 +517,7 @@ eval "$CPP $DEFS conftest.c > conftest.out 2>&1" if egrep "pid_t" conftest.out >/dev/null 2>&1; then : -else +else { test -n "$verbose" && \ echo ' defining' pid_t to be 'int' @@ -530,7 +539,7 @@ #undef signal #endif extern void (*signal ()) (); -int main() { exit(0); } +int main() { exit(0); } int t() { int i; } EOF if eval $compile; then @@ -645,7 +654,7 @@ echo checking for working const cat > conftest.c < conftest.c < -int main() { exit(0); } +int main() { exit(0); } int t() { rindex(0, 0); bzero(0, 0); } EOF if eval $compile; then @@ -696,9 +705,12 @@ echo checking for ${func} cat > conftest.c < -int main() { exit(0); } +int main() { exit(0); } int t() { -#ifdef __stub_${func} +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_${func}) || defined (__stub___${func}) choke me #else /* Override any gcc2 internal prototype to avoid an error. */ @@ -719,7 +731,6 @@ fi rm -f conftest* -#endif done # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works @@ -727,7 +738,7 @@ echo checking for working alloca.h cat > conftest.c < -int main() { exit(0); } +int main() { exit(0); } int t() { char *p = alloca(2 * sizeof(int)); } EOF if eval $compile; then @@ -761,7 +772,7 @@ echo checking for alloca cat > conftest.c < conftest.c </dev/null; then + echo checking for _getb67 +cat > conftest.c < +int main() { exit(0); } +int t() { +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub__getb67) || defined (__stub____getb67) +choke me +#else +/* Override any gcc2 internal prototype to avoid an error. */ +extern char _getb67(); _getb67(); +#endif + } +EOF +if eval $compile; then + { +test -n "$verbose" && \ +echo ' defining' CRAY_STACKSEG_END to be '_getb67' +DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67" +SEDDEFS="${SEDDEFS}\${SEDdA}CRAY_STACKSEG_END\${SEDdB}CRAY_STACKSEG_END\${SEDdC}_getb67\${SEDdD} +\${SEDuA}CRAY_STACKSEG_END\${SEDuB}CRAY_STACKSEG_END\${SEDuC}_getb67\${SEDuD} +\${SEDeA}CRAY_STACKSEG_END\${SEDeB}CRAY_STACKSEG_END\${SEDeC}_getb67\${SEDeD} +" +} + +else + echo checking for GETB67 +cat > conftest.c < +int main() { exit(0); } +int t() { +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_GETB67) || defined (__stub___GETB67) +choke me +#else +/* Override any gcc2 internal prototype to avoid an error. */ +extern char GETB67(); GETB67(); +#endif + } +EOF +if eval $compile; then + { +test -n "$verbose" && \ +echo ' defining' CRAY_STACKSEG_END to be 'GETB67' +DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67" +SEDDEFS="${SEDDEFS}\${SEDdA}CRAY_STACKSEG_END\${SEDdB}CRAY_STACKSEG_END\${SEDdC}GETB67\${SEDdD} +\${SEDuA}CRAY_STACKSEG_END\${SEDuB}CRAY_STACKSEG_END\${SEDuC}GETB67\${SEDuD} +\${SEDeA}CRAY_STACKSEG_END\${SEDeB}CRAY_STACKSEG_END\${SEDeC}GETB67\${SEDeD} +" +} + +else + echo checking for getb67 +cat > conftest.c < +int main() { exit(0); } +int t() { +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_getb67) || defined (__stub___getb67) +choke me +#else +/* Override any gcc2 internal prototype to avoid an error. */ +extern char getb67(); getb67(); +#endif + } +EOF +if eval $compile; then + { +test -n "$verbose" && \ +echo ' defining' CRAY_STACKSEG_END to be 'getb67' +DEFS="$DEFS -DCRAY_STACKSEG_END=getb67" +SEDDEFS="${SEDDEFS}\${SEDdA}CRAY_STACKSEG_END\${SEDdB}CRAY_STACKSEG_END\${SEDdC}getb67\${SEDdD} +\${SEDuA}CRAY_STACKSEG_END\${SEDuB}CRAY_STACKSEG_END\${SEDuC}getb67\${SEDuD} +\${SEDeA}CRAY_STACKSEG_END\${SEDeB}CRAY_STACKSEG_END\${SEDeC}getb67\${SEDeD} +" +} + +fi +rm -f conftest* + +fi +rm -f conftest* + +fi +rm -f conftest* + +fi +rm -f conftest* + fi rm -f conftest* @@ -990,7 +1107,7 @@ echo checking for -lutils cat > conftest.c < conftest.c < conftest.c < conftest.c < conftest.c < conftest.c < +EOF +err=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"` +if test -z "$err"; then + { +test -n "$verbose" && \ +echo ' defining' ${trhdr} +DEFS="$DEFS -D${trhdr}=1" +SEDDEFS="${SEDDEFS}\${SEDdA}${trhdr}\${SEDdB}${trhdr}\${SEDdC}1\${SEDdD} +\${SEDuA}${trhdr}\${SEDuB}${trhdr}\${SEDuC}1\${SEDuD} +\${SEDeA}${trhdr}\${SEDeB}${trhdr}\${SEDeC}1\${SEDeD} +" +} + +fi +rm -f conftest* +done + +fi +if test -z "$have_sym"; then echo checking for nlist.h cat > conftest.c < @@ -1225,7 +1374,7 @@ echo checking for n_un in struct nlist cat > conftest.c < -int main() { exit(0); } +int main() { exit(0); } int t() { struct nlist n; n.n_un.n_name = 0; } EOF if eval $compile; then @@ -1274,7 +1423,7 @@ if $NEED_SETGID; then # Figure out what group owns /dev/kmem. # The installed program will need to be setgid and owned by that group. - KMEM_GROUP=`ls -lg /dev/kmem | + KMEM_GROUP=`ls -lg /dev/kmem | sed 's/^.[rwx-]*[ ]*[0-9]*[ ]*[^ ]*\ [ ]*\([^ ]*\)[ ].*$/\1/'` fi @@ -1282,10 +1431,15 @@ echo checking for strcoll cat > conftest.c < -int main() { exit(0); } -int t() { strcoll ("abc", "abc"); } +main () +{ + exit (strcoll ("abc", "def") >= 0 || + strcoll ("ABC", "DEF") >= 0 || + strcoll ("123", "456") >= 0); +} EOF -if eval $compile; then +eval $compile +if test -s conftest && (./conftest; exit) 2>/dev/null; then { test -n "$verbose" && \ echo ' defining' HAVE_STRCOLL @@ -1299,7 +1453,6 @@ fi rm -f conftest* - for hdr in sys/wait.h do trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'` @@ -1328,9 +1481,12 @@ echo checking for ${func} cat > conftest.c < -int main() { exit(0); } +int main() { exit(0); } int t() { -#ifdef __stub_${func} +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_${func}) || defined (__stub___${func}) choke me #else /* Override any gcc2 internal prototype to avoid an error. */ @@ -1351,7 +1507,6 @@ fi rm -f conftest* -#endif done echo checking for union wait @@ -1358,7 +1513,7 @@ cat > conftest.c < #include -int main() { exit(0); } +int main() { exit(0); } int t() { union wait status; int pid; pid = wait (&status); #ifdef WEXITSTATUS /* Some POSIXoid systems have both the new-style macros and the old @@ -1390,7 +1545,7 @@ echo checking for sys_siglist declaration in signal.h cat > conftest.c < -int main() { exit(0); } +int main() { exit(0); } int t() { char *msg = *(sys_siglist + 1); } EOF if eval $compile; then @@ -1460,7 +1615,7 @@ REMOTE=stub # check whether --with-customs was given -if test -n "$-"; then +if test -n "$with_customs"; then REMOTE=cstms LIBS="$LIBS libcustoms.a" fi diff -ruN make-3.64/expand.c make-3.65/expand.c --- make-3.64/expand.c Wed Feb 3 15:59:22 1993 +++ make-3.65/expand.c Thu May 6 17:14:33 1993 @@ -103,6 +103,30 @@ return value; } + +/* Expand a simple reference to variable NAME, which LENGTH chars long. */ + +#ifdef __GNUC__ +__inline +#endif +static char * +reference_variable (o, name, length) + char *o; + char *name; + unsigned int length; +{ + register struct variable *v = lookup_variable (name, length); + + if (v != 0 && *v->value != '\0') + { + char *value = (v->recursive ? recursively_expand (v) : v->value); + o = variable_buffer_output (o, value, strlen (value)); + if (v->recursive) + free (value); + } + + return o; +} /* Scan LINE for variable references and expansion-function calls. Build in `variable_buffer' the result of expanding the references and calls. @@ -151,6 +175,7 @@ register char *beg = p + 1; char *op, *begp; char *end; + char *colon = 0; op = o; begp = p; @@ -167,7 +192,7 @@ p1 = index (beg, closeparen); if (p1 != 0) p1 = lindex (beg, p1, '$'); - if (p1 != 0) + if (p1 != 0 && lindex (beg, p1, ':') == 0) { /* BEG now points past the opening paren or brace. Count parens or braces until it is matched. */ @@ -178,6 +203,12 @@ ++count; else if (*p == closeparen && --count < 0) break; + else if (colon == 0 && count == 0 && *p == ':') + /* Record where we found a colon, which + indicates a substitution reference. + We want to expand the text before the + reference only. */ + colon = p; } /* If COUNT is >= 0, there were unmatched opening parens or braces, so we go to the simple case of a variable name @@ -184,16 +215,29 @@ such as `$($(a)'. */ if (count < 0) { - char *name = expand_argument (beg, p); - static char start[3] = { '$', }, end[2]; - start[1] = openparen; - end[0] = closeparen; - p1 = concat (start, name, end); - free (name); - name = allocated_variable_expand (p1); - o = variable_buffer_output (o, name, strlen (name)); - free (name); - break; + char *name = expand_argument (beg, colon == 0 ? p : colon); + unsigned int namelen = strlen (name); + if (colon == 0) + { + /* This is a simple reference to the expanded name. */ + o = reference_variable (o, name, namelen); + free (name); + break; + } + else + { + /* This is a substitution reference to the expanded + name. We replace the pending text with a copy + containing the expanded name in place of the + original name, and then fall through to + the normal substitution reference code below. */ + unsigned int restlen = strlen (colon) + 1; + beg = (char *) alloca (namelen + restlen); + bcopy (name, beg, namelen); + bcopy (colon, &beg[namelen], restlen); + /* Point COLON into the new copy. */ + colon = &beg[namelen]; + } } } @@ -201,17 +245,17 @@ it does not contain any variable references inside. There are several things it could be. */ - p = index (beg, ':'); - if (p != 0 && lindex (beg, p, closeparen) == 0) + if (colon == 0) + colon = index (beg, ':'); + if (colon != 0 && lindex (beg, colon, closeparen) == 0) { /* This is a substitution reference: $(FOO:A=B). */ int count; - char *subst_beg, *replace_beg; - unsigned int subst_len, replace_len; + char *subst_beg, *subst_end, *replace_beg, *replace_end; - v = lookup_variable (beg, p - beg); + v = lookup_variable (beg, colon - beg); - subst_beg = p + 1; + subst_beg = colon + 1; count = 0; for (p = subst_beg; *p != '\0'; ++p) { @@ -225,7 +269,7 @@ if (count > 0) /* There were unmatched opening parens. */ return initialize_variable_output (); - subst_len = p - subst_beg; + subst_end = p; replace_beg = p + 1; count = 0; @@ -240,27 +284,29 @@ /* There were unmatched opening parens. */ return initialize_variable_output (); end = p; - replace_len = p - replace_beg; + replace_end = p; + p = expand_argument (subst_beg, subst_end); + p1 = expand_argument (replace_beg, replace_end); + if (v != 0 && *v->value != '\0') { char *value = (v->recursive ? recursively_expand (v) : v->value); - if (lindex (subst_beg, subst_beg + subst_len, '%') != 0) - { - p = savestring (subst_beg, subst_len); - p1 = savestring (replace_beg, replace_len); - o = patsubst_expand (o, value, p, p1, - (char *) 0, (char *) 0); - free (p); - free (p1); - } + char *percent = find_percent (p); + if (percent != 0) + o = patsubst_expand (o, value, p, p1, + percent, (char *) 0); else - o = subst_expand (o, value, subst_beg, replace_beg, - subst_len, replace_len, 0, 1); + o = subst_expand (o, value, + p, p1, strlen (p), strlen (p1), + 0, 1); if (v->recursive) free (value); } + + free (p); + free (p1); } /* No, this must be an ordinary variable reference. */ @@ -270,16 +316,7 @@ end = index (beg, closeparen); if (end == 0) return initialize_variable_output (); - v = lookup_variable (beg, end - beg); - - if (v != 0 && *v->value != '\0') - { - char *value = (v->recursive ? recursively_expand (v) - : v->value); - o = variable_buffer_output (o, value, strlen (value)); - if (v->recursive) - free (value); - } + o = reference_variable (o, beg, end - beg); } /* Advance p past the variable reference to resume scan. */ @@ -333,12 +370,18 @@ expand_argument (str, end) char *str, *end; { - char *tmp = savestring (str, end - str); - char *value = allocated_variable_expand (tmp); + char *tmp; - free (tmp); + if (*end == '\0') + tmp = str; + else + { + tmp = (char *) alloca (end - str + 1); + bcopy (str, tmp, end - str); + tmp[end - str] = '\0'; + } - return value; + return allocated_variable_expand (tmp); } /* Expand LINE for FILE. Error messages refer to the file and line where diff -ruN make-3.64/function.c make-3.65/function.c --- make-3.64/function.c Thu Apr 15 18:29:47 1993 +++ make-3.65/function.c Fri May 7 18:34:49 1993 @@ -1119,6 +1119,11 @@ break; } + if (count >= 0) + makefile_fatal (reading_filename, *reading_lineno_ptr, + "unterminated call to function `%s': missing `%c'", + function_table[code].name, closeparen); + /* We found the end; expand the function call. */ *op = expand_function (*op, function_table[code].function, argbeg, p); diff -ruN make-3.64/getloadavg.c make-3.65/getloadavg.c --- make-3.64/getloadavg.c Thu Apr 15 16:36:37 1993 +++ make-3.65/getloadavg.c Sun May 9 15:21:25 1993 @@ -39,6 +39,7 @@ BSD Real BSD, not just BSD-like. DGUX eunice UNIX emulator under VMS. + hpux NeXT sgi sequent Sequent Dynix 3.x.x (BSD) @@ -103,6 +104,11 @@ /* Some shorthands. */ + +#if defined (HPUX) && !defined (hpux) +#define hpux +#endif + #if defined(hp300) && !defined(hpux) #define MORE_BSD #endif @@ -119,8 +125,16 @@ #define OSF_ALPHA #endif +/* UTek's /bin/cc on the 4300 has no architecture specific cpp define by + default, but _MACH_IND_SYS_TYPES is defined in . Combine + that with a couple of other things and we'll have a unique match. */ +#if !defined (tek4300) && defined (unix) && defined (m68k) && defined (mc68000) && defined (mc68020) && defined (_MACH_IND_SYS_TYPES) +#define tek4300 /* Define by emacs, but not by other users. */ +#endif + + /* VAX C can't handle multi-line #ifs. */ -#if (defined(MORE_BSD) || defined(sun) || defined(decstation) || defined(_SEQUENT_) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined(sequent) || defined (OSF_ALPHA)) +#if (defined(MORE_BSD) || defined(sun) || defined(decstation) || defined(_SEQUENT_) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined(sequent) || defined (OSF_ALPHA) || (defined (ardent) && defined (titan)) || defined (tek4300)) #define LOAD_AVE_TYPE long #endif @@ -141,6 +155,14 @@ #define FSCALE 1000.0 #endif +#if defined (ardent) && defined (titan) +#define FSCALE 65536.0 +#endif + +#ifdef tek4300 +#define FSCALE 100.0 +#endif + #endif /* Not FSCALE. */ #if !defined (LDAV_CVT) && defined (FSCALE) @@ -148,7 +170,7 @@ #endif /* VAX C can't handle multi-line #ifs. */ -#if !defined(NLIST_STRUCT) && (defined(MORE_BSD) || defined(sun) || defined(decstation) || defined(hpux) || defined(_SEQUENT_) || defined(sequent) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined (OSF_ALPHA)) +#if !defined(NLIST_STRUCT) && (defined(MORE_BSD) || defined(sun) || defined(decstation) || defined(hpux) || defined(_SEQUENT_) || defined(sequent) || defined(sgi) || defined(SVR4) || defined(sony_news) || defined (OSF_ALPHA) || (defined (ardent) && defined (titan)) || defined (tek4300)) #define NLIST_STRUCT #endif @@ -166,7 +188,7 @@ #define KERNEL_FILE "/hp-ux" #endif -#if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || defined(SVR4)) +#if !defined(KERNEL_FILE) && (defined(_SEQUENT_) || defined(MIPS) || defined(SVR4) || defined(ISC) || defined (sgi) || defined(SVR4) || (defined (ardent) && defined (titan))) #define KERNEL_FILE "/unix" #endif @@ -175,7 +197,7 @@ #define LDAV_SYMBOL "_Loadavg" #endif -#if !defined(LDAV_SYMBOL) && (defined(hpux) || defined(_SEQUENT_) || defined(SVR4) || defined(ISC) || defined(sgi)) +#if !defined(LDAV_SYMBOL) && ((defined(hpux) && !defined(hp9000s300)) || defined(_SEQUENT_) || defined(SVR4) || defined(ISC) || defined(sgi) || (defined (ardent) && defined (titan))) #define LDAV_SYMBOL "avenrun" #endif @@ -235,7 +257,11 @@ #endif /* LOAD_AVE_TYPE */ #ifdef NeXT +#ifdef HAVE_MACH_MACH_H #include +#else +#include +#endif #endif /* NeXT */ #ifdef sgi @@ -279,7 +305,7 @@ #ifdef NeXT static processor_set_t default_set; -static int initialized; +static int getloadavg_initialized; #endif /* NeXT */ #ifdef UMAX @@ -295,7 +321,7 @@ /* File descriptor open to /dev/kmem or VMS load ave driver. */ static int channel; /* Nonzero iff channel is valid. */ -static int initialized; +static int getloadavg_initialized; /* Offset in kmem to seek to read load average, or 0 means invalid. */ static long offset; @@ -336,19 +362,19 @@ return -1; } - if (!initialized) + if (!getloadavg_initialized) { if (processor_set_default (host_self (), &default_set) == KERN_SUCCESS) - initialized = 1; + getloadavg_initialized = 1; } - if (initialized) + if (getloadavg_initialized) { info_count = PROCESSOR_SET_BASIC_INFO_COUNT; if (processor_set_info (default_set, PROCESSOR_SET_BASIC_INFO, &host, (processor_set_info_t) &info, &info_count) != KERN_SUCCESS) - initialized = 0; + getloadavg_initialized = 0; else { if (nelem > 0) @@ -356,7 +382,7 @@ } } - if (!initialized) + if (!getloadavg_initialized) return -1; #endif /* NeXT */ @@ -473,11 +499,10 @@ #endif /* apollo */ #if !defined (LDAV_DONE) && defined (VMS) -#define LDAV_DONE /* VMS specific code -- read from the Load Ave driver. */ LOAD_AVE_TYPE load_ave[3]; - static int initialized = 0; + static int getloadavg_initialized = 0; #ifdef eunice struct { @@ -487,7 +512,7 @@ #endif /* Ensure that there is a channel open to the load ave device. */ - if (!initialized) + if (!getloadavg_initialized) { /* Attempt to open the channel. */ #ifdef eunice @@ -497,23 +522,24 @@ $DESCRIPTOR (descriptor, "LAV0:"); #endif if (sys$assign (&descriptor, &channel, 0, 0) & 1) - initialized = 1; + getloadavg_initialized = 1; } /* Read the load average vector. */ - if (initialized && !(sys$qiow (0, channel, IO$_READVBLK, 0, 0, 0, - load_ave, 12, 0, 0, 0, 0) & 1)) + if (getloadavg_initialized + && !(sys$qiow (0, channel, IO$_READVBLK, 0, 0, 0, + load_ave, 12, 0, 0, 0, 0) & 1)) { sys$dassgn (channel); - initialized = 0; + getloadavg_initialized = 0; } - if (!initialized) + if (!getloadavg_initialized) return -1; #endif /* VMS */ #if !defined (LDAV_DONE) && defined(LOAD_AVE_TYPE) && !defined(VMS) -#define LDAV_DONE + /* UNIX-specific code -- read the average from /dev/kmem. */ #define LDAV_PRIVILEGED /* This code requires special installation. */ @@ -557,24 +583,24 @@ } /* Make sure we have /dev/kmem open. */ - if (!initialized) + if (!getloadavg_initialized) { #ifndef SUNOS_5 channel = open ("/dev/kmem", 0); if (channel >= 0) - initialized = 1; + getloadavg_initialized = 1; #else /* SUNOS_5 */ kd = kvm_open (0, 0, 0, O_RDONLY, 0); if (kd != 0) { kvm_nlist (kd, nl); - initialized = 1; + getloadavg_initialized = 1; } #endif /* SUNOS_5 */ } /* If we can, get the load average values. */ - if (offset && initialized) + if (offset && getloadavg_initialized) { /* Try to read the load. */ #ifndef SUNOS_5 @@ -583,7 +609,7 @@ != sizeof (load_ave)) { close (channel); - initialized = 0; + getloadavg_initialized = 0; } #else /* SUNOS_5 */ if (kvm_read (kd, offset, (char *) load_ave, sizeof (load_ave)) @@ -590,12 +616,12 @@ != sizeof (load_ave)) { kvm_close (kd); - initialized = 0; + getloadavg_initialized = 0; } #endif /* SUNOS_5 */ } - if (offset == 0 || !initialized) + if (offset == 0 || !getloadavg_initialized) return -1; #endif /* LOAD_AVE_TYPE and not VMS */ @@ -606,6 +632,8 @@ loadavg[elem++] = LDAV_CVT (load_ave[1]); if (nelem > 2) loadavg[elem++] = LDAV_CVT (load_ave[2]); + +#define LDAV_DONE #endif /* !LDAV_DONE && LOAD_AVE_TYPE */ #ifdef LDAV_DONE diff -ruN make-3.64/getopt.c make-3.65/getopt.c --- make-3.64/getopt.c Fri Apr 16 12:17:04 1993 +++ make-3.65/getopt.c Fri May 7 15:29:58 1993 @@ -10,12 +10,12 @@ under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ diff -ruN make-3.64/getopt.h make-3.65/getopt.h --- make-3.64/getopt.h Fri Apr 16 10:52:07 1993 +++ make-3.65/getopt.h Fri May 7 15:29:53 1993 @@ -5,12 +5,12 @@ under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ diff -ruN make-3.64/getopt1.c make-3.65/getopt1.c --- make-3.64/getopt1.c Fri Apr 16 12:17:06 1993 +++ make-3.65/getopt1.c Fri May 7 15:29:55 1993 @@ -1,16 +1,17 @@ -/* Getopt for GNU. - Copyright (C) 1987, 88, 89, 90, 91, 1992, 1993 Free Software Foundation, Inc. +/* getopt_long and getopt_long_only entry points for GNU getopt. + Copyright (C) 1987, 88, 89, 90, 91, 92, 1993 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ @@ -66,7 +67,7 @@ but does match a short option, it is parsed as a short option instead. */ -int +int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; diff -ruN make-3.64/glob/Makefile.in make-3.65/glob/Makefile.in --- make-3.64/glob/Makefile.in Wed Apr 21 15:19:05 1993 +++ make-3.65/glob/Makefile.in Sun May 9 16:00:13 1993 @@ -38,11 +38,14 @@ $(AR) $(ARFLAGS) $@ glob.o fnmatch.o $(RANLIB) $@ -glob.o: $(srcdir)/glob.h $(srcdir)/fnmatch.h -fnmatch.o: $(srcdir)/fnmatch.h +# For some reason, Unix make wants the dependencies on the source files. +# Otherwise it refuses to use an implicit rule! +# And, get this: it doesn't work to use $(srcdir)/foo.c!! +glob.o: $(srcdir)/glob.h $(srcdir)/fnmatch.h glob.c +fnmatch.o: $(srcdir)/fnmatch.h fnmatch.c .c.o: - $(CC) $(CFLAGS) $(CPPFLAGS) -I. -I$(srcdir) -c $< $(OUTPUT_OPTION) + $(CC) -I. -I$(srcdir) -c $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION) .PHONY: clean realclean glob-clean glob-realclean clean glob-clean: diff -ruN make-3.64/job.c make-3.65/job.c --- make-3.64/job.c Wed Apr 14 13:22:35 1993 +++ make-3.65/job.c Thu May 6 17:30:10 1993 @@ -332,7 +332,26 @@ /* If there are more commands to run, try to start them. */ if (job_next_command (c)) - start_job_command (c); + { + if (handling_fatal_signal) + { + /* Never start new commands while we are dying. + Since there are more commands that wanted to be run, + the target was not completely remade. So we treat + this as if a command had failed. */ + c->file->command_state = cs_finished; + c->file->update_status = 1; + } + else + { + /* Check again whether to start remotely. + Whether or not we want to changes over time. + Also, start_remote_job may need state set up + by start_remote_job_p. */ + c->remote = start_remote_job_p (); + start_job_command (c); + } + } switch (c->file->command_state) { @@ -355,8 +374,9 @@ } } - /* Notice if the target of the commands has been changed. */ - notice_finished_file (c->file); + if (! handling_fatal_signal) + /* Notice if the target of the commands has been changed. */ + notice_finished_file (c->file); if (debug_flag) printf ("Removing child 0x%08lx PID %d%s from chain.\n", @@ -368,7 +388,8 @@ children = c->next; else lastc->next = c->next; - free_child (c); + if (! handling_fatal_signal) /* Avoid nonreentrancy. */ + free_child (c); /* There is now another slot open. */ --job_slots_used; diff -ruN make-3.64/main.c make-3.65/main.c --- make-3.64/main.c Wed Apr 14 14:20:33 1993 +++ make-3.65/main.c Mon Apr 26 16:05:02 1993 @@ -1510,7 +1510,7 @@ else { char *buf = (char *) alloca (100); - sprintf (buf, "%f", *(double *) cs->value_ptr); + sprintf (buf, "%g", *(double *) cs->value_ptr); ADD_FLAG (buf, strlen (buf)); } } @@ -1592,9 +1592,14 @@ *p = '\0'; } - /* On Sun, the value of MFLAGS starts with a `-' but the - value of MAKEFLAGS lacks the `-'. Be compatible. */ - (void) define_variable ("MAKEFLAGS", 9, &flagstring[1], o_env, 0); + (void) define_variable ("MAKEFLAGS", 9, + /* On Sun, the value of MFLAGS starts with a `-' but + the value of MAKEFLAGS lacks the `-'. + Be compatible with this unless FLAGSTRING starts + with a long option `--foo', since removing the + first dash would result in the bogus `-foo'. */ + flagstring[1] == '-' ? flagstring : &flagstring[1], + o_env, 0); (void) define_variable ("MFLAGS", 6, flagstring, o_env, 0); } diff -ruN make-3.64/make.h make-3.65/make.h --- make-3.64/make.h Wed Apr 14 13:34:15 1993 +++ make-3.65/make.h Thu May 6 17:30:40 1993 @@ -292,14 +292,6 @@ #define getcwd(buf, len) getwd (buf) #endif -#if !defined(__GNU_LIBRARY__) && (!defined(vfork) || !defined(POSIX)) -#ifdef POSIX -extern pid_t vfork (); -#else -extern int vfork (); -#endif -#endif - extern char **environ; extern char *reading_filename; @@ -318,6 +310,8 @@ extern unsigned int makelevel; extern unsigned int commands_started; + +extern int handling_fatal_signal; #define DEBUGPR(msg) \ diff -ruN make-3.64/read.c make-3.65/read.c --- make-3.64/read.c Thu Apr 15 18:30:01 1993 +++ make-3.65/read.c Mon May 3 17:14:22 1993 @@ -505,9 +505,9 @@ /* Parse the list of file names. */ p2 = p; files = multi_glob (parse_file_seq (&p2, '\0', - sizeof (struct nameseq)), - sizeof (struct nameseq), - 1); + sizeof (struct nameseq), + 1), + sizeof (struct nameseq)); free (p); /* Save the state of conditionals and start diff -ruN make-3.64/texinfo.tex make-3.65/texinfo.tex --- make-3.64/texinfo.tex Tue Apr 20 17:01:35 1993 +++ make-3.65/texinfo.tex Sun May 9 10:33:22 1993 @@ -22,9 +22,8 @@ %You are forbidden to forbid anyone else to use, share and improve %what you give them. Help stamp out software-hoarding! -\def\texinfoversion{2.106} +\def\texinfoversion{2.108} \message{Loading texinfo package [Version \texinfoversion]:} -\message{} % Print the version number if in a .fmt file. \everyjob{\message{[Texinfo version \texinfoversion]}\message{}} @@ -55,7 +54,7 @@ \newlinechar = `^^J % Ignore a token. -% +% \def\gobble#1{} \hyphenation{ap-pen-dix} @@ -73,9 +72,9 @@ % since that produces some useless output on the terminal. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% -\def\loggingall{\tracingcommands2 \tracingstats2 - \tracingpages1 \tracingoutput1 \tracinglostchars1 - \tracingmacros2 \tracingparagraphs1 \tracingrestores1 +\def\loggingall{\tracingcommands2 \tracingstats2 + \tracingpages1 \tracingoutput1 \tracinglostchars1 + \tracingmacros2 \tracingparagraphs1 \tracingrestores1 \showboxbreadth\maxdimen\showboxdepth\maxdimen }% @@ -139,7 +138,7 @@ \nointerlineskip \vbox{\line{\ewbot\hfill\ewbot}} }} - \advancepageno + \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi} % % Do @cropmarks to get crop marks @@ -225,7 +224,7 @@ % here.) But this means we cannot call \removeactivespaces as part of % \argremovec{,omment}, since @c uses \parsearg, and thus the argument % that \parsearg gets might well have any character at all in it. -% +% \def\removeactivespaces#1{% \begingroup \ignoreactivespaces @@ -235,7 +234,7 @@ } % Change the active space to expand to nothing. -% +% \begingroup \obeyspaces \gdef\ignoreactivespaces{\obeyspaces\let =\empty} @@ -283,7 +282,7 @@ } % There is an environment #1, but it hasn't been started. Give an error. -% +% \def\unmatchedenderror#1{% \errhelp = \EMsimple \errmessage{This `@end #1' doesn't have a matching `@#1'}% @@ -290,18 +289,20 @@ } % Define the control sequence \E#1 to give an unmatched @end error. -% +% \def\defineunmatchedend#1{% \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% } -% Single-spacing is done by various environments. - +% Single-spacing is done by various environments (specifically, in +% \nonfillstart and \quotations). \newskip\singlespaceskip \singlespaceskip = \baselineskip \def\singlespace{% -{\advance \baselineskip by -\singlespaceskip -\kern \baselineskip}% +% Why was this kern here? It messes up equalizing space above and below +% environments. --karl, 6may93 +%{\advance \baselineskip by -\singlespaceskip +%\kern \baselineskip}% \baselineskip=\singlespaceskip } @@ -346,7 +347,7 @@ % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. -% +% \def\group{\begingroup \ifnum\catcode13=\active \else \errhelp = \groupinvalidhelp @@ -356,8 +357,8 @@ % The \vtop we start below produces a box with normal height and large % depth; thus, TeX puts \baselineskip glue before it, and (when the % next line of text is done) \lineskip glue after it. (See p.82 of - % the TeXbook.) But the next line of text also gets us \parskip glue. - % Final result: space below is slightly more than space above. + % the TeXbook.) Thus, space below is not quite equal to space + % above. But it's pretty close. \def\Egroup{% \egroup % End the \vtop. \endgroup % End the \group. @@ -372,6 +373,22 @@ % Hence this just inserts a strut at the beginning of each line. \everypar = {\strut}% % + % Since we have a strut on every line, we don't need any of TeX's + % normal interline spacing. + \offinterlineskip + % + % OK, but now we have to do something about blank + % lines in the input in @example-like environments, which normally + % just turn into \lisppar, which will insert no space now that we've + % turned off the interline space. Simplest is to make them be an + % empty paragraph. + \ifx\par\lisppar + \edef\par{\leavevmode \par}% + % + % Reset ^^M's definition to new definition of \par. + \obeylines + \fi + % % We do @comment here in case we are called inside an environment, % such as @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after @@ -383,7 +400,7 @@ % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. -% +% \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} @@ -414,13 +431,13 @@ \allowbreak \nointerlineskip \vtop to #1\mil{\vfil}% - % + % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. - % + % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which @@ -534,8 +551,8 @@ % Used in nested conditionals, where we have to parse the Texinfo source % and so want to turn off most commands, in case they are used -% incorrectly. -% +% incorrectly. +% \def\ignoremorecommands{% \let\defcv = \relax \let\deffn = \relax @@ -565,20 +582,22 @@ \let\down = \relax \let\raisesections = \relax \let\up = \relax + \let\set = \relax + \let\clear = \relax } % Ignore @ignore ... @end ignore. -% +% \def\ignore{\doignore{ignore}} % Also ignore @ifinfo, @menu, and @direntry text. -% +% \def\ifinfo{\doignore{ifinfo}} \def\menu{\doignore{menu}} \def\direntry{\doignore{direntry}} % Ignore text until a line `@end #1'. -% +% \def\doignore#1{\begingroup % Don't complain about control sequences we have declared \outer. \ignoresections @@ -594,7 +613,7 @@ } % What we do to finish off ignored text. -% +% \def\enddoignore{\endgroup\ignorespaces}% \newif\ifwarnedobs\warnedobsfalse @@ -623,7 +642,7 @@ % Ignore text, except that we keep track of conditional commands for % purposes of nesting, up to an `@end #1' command. -% +% \def\nestedignore#1{% \obstexwarn % We must actually expand the ignored text to look for the @end @@ -631,7 +650,7 @@ % text into a \vbox and then do nothing with the result. To minimize % the change of memory overflow, we follow the approach outlined on % page 401 of the TeXbook: make the current font be a dummy font. - % + % \setbox0 = \vbox\bgroup % Don't complain about control sequences we have declared \outer. \ignoresections @@ -648,7 +667,7 @@ % We can't do anything about stray @-signs, unfortunately; % they'll produce `undefined control sequence' errors. \ignoremorecommands - % + % % Set the current font to be \nullfont, a TeX primitive, and define % all the font commands to also use \nullfont. We don't use % dummy.tfm, as suggested in the TeXbook, because not all sites @@ -679,7 +698,7 @@ % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. -% +% % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we @@ -709,7 +728,7 @@ % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. -% +% \def\ifset{\parsearg\ifsetxxx} \def\ifsetxxx #1{% \expandafter\ifx\csname SET#1\endcsname\relax @@ -724,7 +743,7 @@ % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. -% +% \def\ifclear{\parsearg\ifclearxxx} \def\ifclearxxx #1{% \expandafter\ifx\csname SET#1\endcsname\relax @@ -739,7 +758,7 @@ % @iftex always succeeds; we read the text following, through @end % iftex). But `@end iftex' should be valid only after an @iftex. -% +% \def\iftex{\conditionalsucceed{iftex}} \defineunmatchedend{iftex} @@ -749,7 +768,7 @@ % define \Eiftex to redefine itself to be its previous value. (We can't % just define it to fail again with an ``unmatched end'' error, since % the @ifset might be nested.) -% +% \def\conditionalsucceed#1{% \edef\temp{% % Remember the current value of \E#1. @@ -767,7 +786,7 @@ \def\nece#1{\expandafter\noexpand\csname#1\endcsname} % @asis just yields its argument. Used with @table, for example. -% +% \def\asis#1{#1} % @math means output in math mode. @@ -776,10 +795,10 @@ % we read the toc file back, the $'s will be normal characters (as they % should be, according to the definition of Texinfo). So we must use a % control sequence to switch into and out of math mode. -% +% % This isn't quite enough for @math to work properly in indices, but it % seems unlikely it will ever be needed there. -% +% \let\implicitmath = $ \def\math#1{\implicitmath #1\implicitmath} @@ -806,7 +825,7 @@ \let\lastnode=\relax} \let\refill=\relax - + % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. @@ -849,7 +868,7 @@ % Instead of cmb10, you many want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 % looks better when embedded in a line with cmr10. -\font\textbf=cmb10 scaled \mainmagstep +\font\textbf=cmb10 scaled \mainmagstep \font\textit=cmti10 scaled \mainmagstep \font\textsl=cmsl10 scaled \mainmagstep \font\textsf=cmss10 scaled \mainmagstep @@ -863,7 +882,7 @@ \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} % Fonts for indices and small examples. -% We actually use the slanted font rather than the italic, +% We actually use the slanted font rather than the italic, % because texinfo normally uses the slanted fonts for that. % Do not make many font distinctions in general in the index, since they % aren't very useful. @@ -919,7 +938,7 @@ \font\ssectt=cmtt12 scaled \magstephalf \font\ssecsf=cmss12 scaled \magstephalf \font\ssecbf=cmbx12 scaled \magstephalf -\font\ssecsc=cmcsc10 scaled \magstep1 +\font\ssecsc=cmcsc10 scaled \magstep1 \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled \magstep1 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, @@ -934,7 +953,7 @@ % texinfo doesn't allow for producing subscripts and superscripts, we % don't bother to reset \scriptfont and \scriptscriptfont (which would % also require loading a lot more fonts). -% +% \def\resetmathfonts{% \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf @@ -947,7 +966,7 @@ % in math mode, where it is the current \fam that is relevant in most % cases, not the current. Plain TeX does, for example, % \def\bf{\fam=\bffam \tenbf} By redefining \tenbf, we obviate the need -% to redefine \bf itself. +% to redefine \bf itself. \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc @@ -954,7 +973,7 @@ \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \resetmathfonts} \def\chapfonts{% - \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl + \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \resetmathfonts} @@ -975,7 +994,7 @@ \resetmathfonts} % Set up the default fonts, so we can use them for creating boxes. -% +% \textfonts % Count depth in font-changes, for error checks @@ -1006,7 +1025,7 @@ % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. -% +% \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } @@ -1037,7 +1056,7 @@ % % Turn off hyphenation. \nohyphenation - % + % \rawbackslash \frenchspacing #1% @@ -1065,7 +1084,7 @@ %\let\exp=\tclose %Was temporary -% @kbd is like @code, except that if the argument is just one @key command, +% @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\xkey{\key} @@ -1077,12 +1096,12 @@ % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of % @dmn{}pt. -% +% \def\dmn#1{\thinspace #1} \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} -\def\l#1{{\li #1}\null} % +\def\l#1{{\li #1}\null} % \def\r#1{{\rm #1}} % roman font % Use of \lowercase was suggested. @@ -1133,7 +1152,7 @@ \def\author{\parsearg\authorzzz}% \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi {\authorfont \leftline{##1}}}% - % + % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page @@ -1358,8 +1377,9 @@ \nobreak % This prevents a break before @itemx. % % Be sure we are not still in the middle of a paragraph. - \parskip=0in + {\parskip = 0in \par + }% % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that @@ -1368,6 +1388,14 @@ % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax \setbox0=\hbox{\hskip \leftskip \hskip -\tableindent \unhbox0}\box0 + % + % We're going to be starting a paragraph, but we don't want the + % \parskip glue -- logically it's part of the @item we just started. + \nobreak \vskip-\parskip + % + % Stop a page break at the \parskip glue coming up. Unfortunately + % we can't prevent a possible page break at the following + % \baselineskip glue. \nobreak \else % The item text fits into the space. Start a paragraph, so that the @@ -1399,7 +1427,7 @@ {\obeylines\obeyspaces% \gdef\ftablex #1^^M{% \tabley\fnitemindex#1 \endtabley -\def\Eftable{\endgraf\endgroup\afterenvbreak}% +\def\Eftable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} @@ -1406,7 +1434,7 @@ {\obeylines\obeyspaces% \gdef\vtablex #1^^M{% \tabley\vritemindex#1 \endtabley -\def\Evtable{\endgraf\endgroup\afterenvbreak}% +\def\Evtable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\dontindex #1{} @@ -1433,7 +1461,7 @@ \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi% -\def\Etable{\endgraf\endgroup\afterenvbreak}% +\def\Etable{\endgraf\afterenvbreak\endgroup}% \let\item = \internalBitem % \let\itemx = \internalBitemx % \let\kitem = \internalBkitem % @@ -1462,7 +1490,7 @@ \parindent = 0pt % \parskip = \smallskipamount % \ifdim \parskip=0pt \parskip=2pt \fi% -\def#2{\endgraf\endgroup\afterenvbreak}% +\def#2{\endgraf\afterenvbreak\endgroup}% \def\itemcontents{#1}% \let\item=\itemizeitem} @@ -1473,13 +1501,13 @@ % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. -% +% \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. -% +% \def\enumerate{\parsearg\enumeratezzz} \def\enumeratezzz #1{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% @@ -1501,11 +1529,11 @@ % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. - % + % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . - % - \ifnum\lccode\expandafter`\thearg=0\relax + % + \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. @@ -1523,7 +1551,7 @@ % An @enumerate whose labels are integers. The starting integer is % given in \thearg. -% +% \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% @@ -1558,7 +1586,7 @@ % Call itemizey, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. -% +% \def\startenumeration#1{% \advance\itemno by -1 \itemizey{#1.}\Eenumerate\flushcr @@ -1566,7 +1594,7 @@ % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. -% +% \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} @@ -1782,7 +1810,7 @@ % \secondary {subtopic}{pagelist} % for each subtopic. -% Define the user-accessible indexing commands +% Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} @@ -1829,7 +1857,7 @@ % % See if the index file exists and is nonempty. \openin 1 \jobname.#1s - \ifeof 1 + \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure @@ -1868,7 +1896,7 @@ % This typesets a paragraph consisting of #1, dot leaders, and then #2 % flush to the right margin. It is used for index and table of contents % entries. The paragraph is indented by \leftskip. -% +% \def\entry #1#2{\begingroup % % Start a new paragraph if necessary, so our assignments below can't @@ -1889,7 +1917,7 @@ % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. - % + % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent=2em @@ -1954,17 +1982,17 @@ % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it once. - % + % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +- < % 1pt) as it did when we hard-coded it. - % + % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. - % + % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 @@ -2179,7 +2207,7 @@ \gdef\thischaptername{#1}% \xdef\thischapter{Appendix \appendixletter: \noexpand\thischaptername}% {\chapternofonts% -\edef\temp{{\realbackslash chapentry +\edef\temp{{\realbackslash chapentry {#1}{Appendix \appendixletter}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % @@ -2199,8 +2227,8 @@ % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant -% to be executed, not expanded). -% +% to be executed, not expanded). +% % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, @@ -2487,7 +2515,7 @@ \let\paragraphindent=\comment % Section fonts are the base font at magstep2, which produces -% a size a bit more than 14 points in the default situation. +% a size a bit more than 14 points in the default situation. \def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}} \def\plainsecheading #1{\secheadingi {#1}} @@ -2499,7 +2527,7 @@ \ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } -% Subsection fonts are the base font at magstep1, +% Subsection fonts are the base font at magstep1, % which produces a size of 12 points. \def\subsecheading #1#2#3#4{\subsecheadingi {#2.#3.#4\enspace #1}} @@ -2534,7 +2562,7 @@ \ifnum \pageno>0 \pageno = -1 % Request roman numbered pages. \fi - % Don't need to put `Contents' or `Short Contents' in the headline. + % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \unnumbchapmacro{#1}\def\thischapter{}% \begingroup % Set up to handle contents files properly. @@ -2543,7 +2571,7 @@ \advance\hsize by -\contentsrightmargin % Don't use the full line length. } - + % Normal (long) toc. \outer\def\contents{% \startcontents{Table of Contents}% @@ -2630,10 +2658,10 @@ % This parameter controls the indentation of the various levels. \newdimen\tocindent \tocindent = 3pc -% Now for the actual typesetting. In all these, #1 is the text and #2 is the +% Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % -% If the toc has to be broken over pages, we would want to be at chapters +% If the toc has to be broken over pages, we would want to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip\baselineskip @@ -2663,7 +2691,7 @@ % the index entries, but we want to suppress hyphenation here. (We % can't do that in the \entry macro, since index entries might consist % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) -% +% \def\tocentry#1#2{\begingroup \hyphenpenalty = 10000 \entry{#1}{#2}% @@ -2683,7 +2711,7 @@ \message{environments,} -% Since these characters are used in examples, it should be an even number of +% Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % Furthermore, these definitions must come after we define our fonts. \newbox\dblarrowbox \newbox\longdblarrowbox @@ -2766,16 +2794,16 @@ % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in -% This is the definition that ^M gets inside @lisp -% phr: changed space to \null, to avoid overfull hbox problems. -{\obeyspaces% -\gdef\lisppar{\null\endgraf}} +% This is the definition that ^^M gets inside @lisp, @example, and other +% such environments. \null is better than a space, since it doesn't +% have any width. +\def\lisppar{\null\endgraf} % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. -% +% {\obeyspaces % \gdef\sepspaces{\obeyspaces\let =\tie}} @@ -2787,7 +2815,11 @@ % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt -% Make spacing and below environment symmetrical. +% Make spacing and below environment symmetrical. We use \parskip here +% to help in doing that, since in @example-like environments \parskip +% is reset to zero; thus the \afterenvbreak inserts no space -- but the +% start of the next paragraph will insert \parskip +% \def\aboveenvbreak{{\advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip \penalty-50 \vskip\envskipamount \fi}} @@ -2822,7 +2854,7 @@ \begingroup \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt %we want these *outside*. - \cartinner=\hsize \advance\cartinner by-\lskip + \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18pt % allow for 3pt kerns on either @@ -2855,7 +2887,7 @@ \cartbot \egroup \endgroup -}} +}} % This macro is called at the beginning of all the @example variants, @@ -2865,7 +2897,7 @@ \inENV % This group ends at the end of the body \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. - \singlespace % single space lines + \singlespace \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt @@ -2881,32 +2913,40 @@ \fi } -\def\Elisp{\endgroup\afterenvbreak}% +% To ending an @example-like environment, we first end the paragraph +% (via \afterenvbreak's vertical glue), and then the group. That way we +% keep the zero \parskip that the environments set -- \parskip glue +% will be inserted at the beginning of the next paragraph in the +% document, after the environment. +% +\def\nonfillfinish{\afterenvbreak\endgroup}% +% This macro is \def\lisp{\begingroup \nonfillstart - \def\Elisp{\endgroup\afterenvbreak}% + \let\Elisp = \nonfillfinish \tt - \rawbackslash % output the \ character from the current font + \rawbackslash % have \ input char produce \ char from current font \gobble } % Define the \E... control sequence only if we are inside the % environment, so the error checking in \end will work. -% +% % We must call \lisp last in the definition, since it reads the % return following the @example (or whatever) command. % -\def\example{\begingroup \def\Eexample{\Elisp\endgroup}\lisp} -\def\smallexample{\begingroup \def\Esmallexample{\Elisp\endgroup}\lisp} +\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} +\def\smallexample{\begingroup \def\Esmallexample{\nonfillfinish\endgroup}\lisp} +\def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}\lisp} -% Macro for 9 pt. examples, necessary to print with 5" lines. From -% Pavel@xerox. This is not used for @smallexamples unless the -% @smallbook command is given. +% @smallexample and @smalllisp. This is not used unless the @smallbook +% command is given. Originally contributed by Pavel@xerox. % \def\smalllispx{\begingroup \nonfillstart - \def\Esmalllisp{\endgroup\afterenvbreak}% + \let\Esmalllisp = \nonfillfinish + \let\Esmallexample = \nonfillfinish % % Smaller interline space and fonts for small examples. \baselineskip 10pt @@ -2919,7 +2959,7 @@ % \def\display{\begingroup \nonfillstart - \def\Edisplay{\endgroup\afterenvbreak}% + \let\Edisplay = \nonfillfinish \gobble } @@ -2928,7 +2968,7 @@ \def\format{\begingroup \let\nonarrowing = t \nonfillstart - \def\Eformat{\endgroup\afterenvbreak} + \let\Eformat = \nonfillfinish \gobble } @@ -2937,13 +2977,13 @@ \def\flushleft{\begingroup \let\nonarrowing = t \nonfillstart - \def\Eflushleft{\endgroup\afterenvbreak}% + \let\Eflushleft = \nonfillfinish \gobble } \def\flushright{\begingroup \let\nonarrowing = t \nonfillstart - \def\Eflushright{\endgroup\afterenvbreak}% + \let\Eflushright = \nonfillfinish \advance\leftskip by 0pt plus 1fill \gobble} @@ -2955,7 +2995,7 @@ \aboveenvbreak}% \singlespace \parindent=0pt -\def\Equotation{\par\endgroup\afterenvbreak}% +\let\Equotation = \nonfillfinish % @cartouche defines \nonarrowing to inhibit narrowing % at next level down. \ifx\nonarrowing\relax @@ -3042,7 +3082,7 @@ \advance \hsize by -\dimen2 \advance \hsize by -\dimen3 \rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}% % Make all lines underfull and no complaints: -\tolerance=10000 \hbadness=10000 +\tolerance=10000 \hbadness=10000 \advance\leftskip by -\defbodyindent \exdentamount=\defbodyindent {\df #1}\enskip % Generate function name @@ -3125,7 +3165,7 @@ %%% This is the same as all the others except for the last line. We need %%% to parse the arguments differently for @deftp, since the ``attributes'' %%% there are optional. -%%% +%%% %%\def\deftpparsebody #1#2#3#4 {\begingroup\inENV % %%\medbreak % %%% Define the end token that this defining construct specifies @@ -3143,7 +3183,7 @@ %% % i.e., \deftpheader{CLASS}; this is passed from \deftpparsebody. %% % #2 is the type name, e.g., `struct termios'. %% % #3 is the (possibly empty) attribute list. -%% % +%% % %% \gdef\parsetpheaderline#1#2#3^^M{% %% \endgroup % Started in \deftpparsebody. %% % @@ -3453,7 +3493,7 @@ % cross-reference, #3 the printed node name, #4 the name of the Info % file, #5 the name of the printed manual. All but the node name can be % omitted. -% +% \def\pxref#1{see \xrefX[#1,,,,,,,]} \def\xref#1{See \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} @@ -3530,7 +3570,7 @@ % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. -% +% \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Non-3.0. \else @@ -3665,7 +3705,7 @@ % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. -% +% \long\gdef\footnotezzz#1{\insert\footins{% % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. @@ -3696,15 +3736,15 @@ % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. -% -\def\lineskipfactor{.1} -\def\strutheightpercent{.71} -\def\strutdepthpercent{.29} % +\def\lineskipfactor{.08333} +\def\strutheightpercent{.70833} +\def\strutdepthpercent {.29167} +% \def\setleading#1{% - \baselineskip = #1\relax - \normalbaselineskip = \baselineskip - \lineskip = \lineskipfactor\baselineskip + \normalbaselineskip = #1\relax + \normallineskip = \lineskipfactor\normalbaselineskip + \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip @@ -3716,7 +3756,7 @@ % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). -% +% \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode @@ -3743,7 +3783,7 @@ % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). -% +% \def\finalout{\overfullrule=0pt} @@ -3780,7 +3820,7 @@ % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. This makes it come to about 9pt for the 8.5x11 format. -% +% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% @@ -3861,7 +3901,7 @@ % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. -% +% \def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi} % Turn off all special characters except @ @@ -3939,7 +3979,7 @@ \catcode`\\=\active % If a .fmt file is being used, we don't want the `\input texinfo' to show up. -% That is what \eatinput is for; after that, the `\' should revert to printing +% That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @@ -3946,9 +3986,9 @@ @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then -% the first `\{ in the file would cause an error. This macro tries to fix +% the first `\{ in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. -% +% @gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi} %% These look ok in all fonts, so just make them not special. The @rm below diff -ruN make-3.64/version.c make-3.65/version.c --- make-3.64/version.c Wed Apr 21 15:17:53 1993 +++ make-3.65/version.c Sun May 9 15:41:24 1993 @@ -1,4 +1,4 @@ -char *version_string = "3.64"; +char *version_string = "3.65";