diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-06-05 02:59:00 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-06-05 02:59:00 +0000 |
| commit | 78e55a1f29558e8be54566ead1e7be8ab9d45273 (patch) | |
| tree | 65fd45fa55d0cd3888b40a4f41dd3383616dfd74 /gnu/usr.bin | |
| parent | 885f2f31b4599f4bc7468278c783c1c30f1f86ed (diff) | |
Notes
Diffstat (limited to 'gnu/usr.bin')
225 files changed, 1573 insertions, 2590 deletions
diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index da9e62d3696b..ca63802ed06f 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -2,6 +2,6 @@ SUBDIR= as awk bc cc cpio cvs dc dialog diff diff3 gdb \ grep groff gzip ld man mkisofs patch perl ptx rcs sdiff send-pr \ - sort tar texinfo + sort tar texinfo yppush .include <bsd.subdir.mk> diff --git a/gnu/usr.bin/as/Makefile b/gnu/usr.bin/as/Makefile index 50e4ac8cad08..879a48078122 100644 --- a/gnu/usr.bin/as/Makefile +++ b/gnu/usr.bin/as/Makefile @@ -27,6 +27,8 @@ SRCS+= app.c as.c atof-generic.c bignum-copy.c \ CFLAGS+= -I$(.CURDIR) ${ADDINCLUDE} -I$(.CURDIR)/config \ -DOLD_GAS -DSIGTY=void -Derror=as_fatal \ -DSUB_SEGMENT_ALIGN=4 -DFREEBSD_AOUT +DPADD+= ${LIBGNUMALLOC} +LDADD+= -lgnumalloc CONF_HEADERS= targ-cpu.h obj-format.h host.h targ-env.h diff --git a/gnu/usr.bin/as/Makefile.in b/gnu/usr.bin/as/Makefile.in index b91bb3322bbf..9e7645856d4b 100644 --- a/gnu/usr.bin/as/Makefile.in +++ b/gnu/usr.bin/as/Makefile.in @@ -1,5 +1,3 @@ -# $Id$ - # Makefile for GNU Assembler # Copyright (C) 1987-1992 Free Software Foundation, Inc. @@ -308,7 +306,7 @@ targ-cpu.o : targ-cpu.c targ-env.h obj-format.h \ doc: $(srcdir)/as.info $(srcdir)/as.info: $(srcdir)/doc/as.texinfo - (cd doc; make as.info; mv -f as.info $srcdir) + (cd doc; make as.info; mv as.info $srcdir) clean: (cd doc ; $(MAKE) clean) @@ -371,17 +369,17 @@ bootstrap3: force # Copy the object files from a particular stage into a subdirectory. stage1: force -mkdir stage1 - -mv -f $(STAGESTUFF) stage1 + -mv $(STAGESTUFF) stage1 if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi stage2: force -mkdir stage2 - -mv -f $(STAGESTUFF) stage2 + -mv $(STAGESTUFF) stage2 if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi stage3: force -mkdir stage3 - -mv -f $(STAGESTUFF) stage3 + -mv $(STAGESTUFF) stage3 if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi against=stage2 @@ -390,15 +388,15 @@ comparison: force for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done de-stage1: force - - (cd stage1 ; rm -f as ; mv -f * ..) + - (cd stage1 ; rm as ; mv -f * ..) - rmdir stage1 de-stage2: force - - (cd stage2 ; rm -f as ; mv -f * ..) + - (cd stage2 ; rm as ; mv -f * ..) - rmdir stage2 de-stage3: force - - (cd stage3 ; rm -f as ; mv -f * ..) + - (cd stage3 ; rm as ; mv -f * ..) - rmdir stage3 #In GNU Make, ignore whether `stage*' exists. diff --git a/gnu/usr.bin/as/as.1 b/gnu/usr.bin/as/as.1 index 66f7ee5004b0..57e2dc1f9b9e 100644 --- a/gnu/usr.bin/as/as.1 +++ b/gnu/usr.bin/as/as.1 @@ -3,7 +3,7 @@ .TH as 1 "21 January 1992" "cygnus support" "GNU Development Tools" .SH NAME -as \- the portable GNU assembler. +GNU as \- the portable GNU assembler. .SH SYNOPSIS .na diff --git a/gnu/usr.bin/as/hash.c b/gnu/usr.bin/as/hash.c index 70068ea81ab9..e8b82d2030f6 100644 --- a/gnu/usr.bin/as/hash.c +++ b/gnu/usr.bin/as/hash.c @@ -837,7 +837,7 @@ main() for (;;) { printf("hash_test command: "); - fgets(answer, 100, stdin); + gets(answer); command = answer[0]; if (isupper(command)) command = tolower(command); /* ecch! */ switch (command) @@ -929,7 +929,7 @@ char * description; char * malloc(); printf(" %s : ",description); - fgets(answer, 100, stdin); + gets(answer); /* will one day clean up answer here */ retval = malloc(strlen(answer)+1); if (!retval) @@ -967,7 +967,7 @@ whattable() /* determine number: what hash table to use */ for (;;) { printf(" what hash table (%d:%d) ? ",0,TABLES-1); - fgets(answer, 100, stdin); + gets(answer); sscanf(answer,"%d",&number); if (number >= 0 && number<TABLES) { diff --git a/gnu/usr.bin/awk/Makefile b/gnu/usr.bin/awk/Makefile index 1fa87cc9c8ce..690eacf1c286 100644 --- a/gnu/usr.bin/awk/Makefile +++ b/gnu/usr.bin/awk/Makefile @@ -11,3 +11,4 @@ DPADD+= ${LIBGNUREGEX} ${LIBM} LDADD+= -lgnuregex -lm .include <bsd.prog.mk> +#.include "../../usr.bin/Makefile.inc" diff --git a/gnu/usr.bin/awk/awk.1 b/gnu/usr.bin/awk/awk.1 index 1b58bec9acbe..a98c99d1608b 100644 --- a/gnu/usr.bin/awk/awk.1 +++ b/gnu/usr.bin/awk/awk.1 @@ -1,11 +1,11 @@ .ds PX \s-1POSIX\s+1 .ds UX \s-1UNIX\s+1 .ds AN \s-1ANSI\s+1 -.TH AWK 1 "Apr 18 1994" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "Apr 18 1994" "Free Software Foundation" "Utility Commands" .SH NAME -awk \- GNU awk pattern scanning and processing language +gawk \- pattern scanning and processing language .SH SYNOPSIS -.B awk +.B gawk [ POSIX or GNU style options ] .B \-f .I program-file @@ -13,7 +13,7 @@ awk \- GNU awk pattern scanning and processing language .B \-\^\- ] file .\^.\^. .br -.B awk +.B gawk [ POSIX or GNU style options ] [ .B \-\^\- @@ -35,7 +35,7 @@ of \*(UX also provides some GNU-specific extensions. .PP The command line consists of options to -.I awk +.I gawk itself, the AWK program text (if not supplied via the .B \-f or @@ -57,7 +57,7 @@ for \*(PX mandated features. Other implementations of the AWK language are likely to only accept the traditional one letter options. .PP Following the \*(PX standard, -.IR awk -specific +.IR gawk -specific options are supplied via arguments to the .B \-W option. Multiple @@ -135,9 +135,9 @@ flag sets the maximum record size. These two flags and the option are from the AT&T Bell Labs research version of \*(UX .IR awk . They are ignored by -.IR awk , +.IR gawk , since -.I awk +.I gawk has no pre-defined limits. .TP \w'\fB\-\^\-copyright\fR'u+1n .PD 0 @@ -148,7 +148,7 @@ has no pre-defined limits. Run in .I compatibility mode. In compatibility mode, -.I awk +.I gawk behaves identically to \*(UX .IR awk ; none of the GNU-specific extensions are recognized. @@ -268,10 +268,10 @@ will be recognized in the same argument. .PD .B \-\^\-version Print version information for this particular copy of -.I awk +.I gawk on the error output. This is useful mainly for knowing if the current copy of -.I awk +.I gawk on your system is up to date with respect to whatever the Free Software Foundation is distributing. @@ -341,10 +341,10 @@ all variable assignments specified via the .B \-v option are performed. Next, -.I awk +.I gawk compiles the program into an internal form. Then, -.I awk +.I gawk executes the code in the .B BEGIN block(s) (if any), @@ -353,7 +353,7 @@ each file named in the .B ARGV array. If there are no files named on the command line, -.I awk +.I gawk reads the standard input. .PP If a filename on the command line has the form @@ -374,11 +374,11 @@ a single data file. If the value of a particular element of .B ARGV is empty (\fB""\fR), -.I awk +.I gawk skips over it. .PP For each line in the input, -.I awk +.I gawk tests to see if it matches any .I pattern in the AWK program. @@ -388,7 +388,7 @@ is executed. The patterns are tested in the order they occur in the program. .PP Finally, after all the input is exhausted, -.I awk +.I gawk executes the code in the .B END block(s) (if any). @@ -403,7 +403,7 @@ runs; these will be described as needed and summarized below. .SS Fields .PP As each input line is read, -.I awk +.I gawk splits the line into .IR fields , using the value of the @@ -429,7 +429,7 @@ If the .B FIELDWIDTHS variable is set to a space separated list of numbers, each field is expected to have fixed width, and -.I awk +.I gawk will split up the record using the specified widths. The value of .B FS is ignored. @@ -480,7 +480,7 @@ AWK's built-in variables are: .TP \w'\fBFIELDWIDTHS\fR'u+1n .B ARGC The number of command line arguments (does not include options to -.IR awk , +.IR gawk , or the program source). .TP .B ARGIND @@ -506,12 +506,12 @@ The array is indexed by the environment variables, each element being the value of that variable (e.g., \fBENVIRON["HOME"]\fP might be .BR /u/arnold ). Changing this array does not affect the environment seen by programs which -.I awk +.I gawk spawns via redirection or the .B system() function. (This may change in a future version of -.IR awk .) +.IR gawk .) .\" but don't hold your breath... .TP .B ERRNO @@ -528,14 +528,14 @@ a string describing the error. .TP .B FIELDWIDTHS A white-space separated list of fieldwidths. When set, -.I awk +.I gawk parses the input into fields of fixed width, instead of using the value of the .B FS variable as the field separator. The fixed field width facility is still experimental; expect the semantics to change as -.I awk +.I gawk evolves over time. .TP .B FILENAME @@ -605,7 +605,7 @@ The input record separator, by default a newline. is exceptional in that only the first character of its string value is used for separating records. (This will probably change in a future release of -.IR awk .) +.IR gawk .) If .B RS is set to the null string, then records are separated by @@ -739,7 +739,7 @@ Two strings are compared, of course, as strings. According to the \*(PX standard, even if two strings are numeric strings, a numeric comparison is performed. However, this is clearly incorrect, and -.I awk +.I gawk does not do this. .PP Uninitialized variables have the numeric value 0 and the string value "" @@ -1246,13 +1246,13 @@ into a file, or via .B getline from a file, -.I awk +.I gawk recognizes certain special filenames internally. These filenames allow access to open file descriptors inherited from -.IR awk 's +.IR gawk 's parent process (usually the shell). Other special filenames provide access information about the running -.B awk +.B gawk process. The filenames are: .TP \w'\fB/dev/stdout\fR'u+1n @@ -1468,7 +1468,7 @@ Non-alphabetic characters are left unchanged. .PP Since one of the primary uses of AWK programs is processing log files that contain time stamp information, -.I awk +.I gawk provides the following two functions for obtaining time stamps and formatting them. .PP @@ -1496,11 +1496,11 @@ guaranteed to be available. A public-domain version of .IR strftime (3) and a man page for it are shipped with -.IR awk ; +.IR gawk ; if that version was used to build -.IR awk , +.IR gawk , then all of the conversions described in that man page are available to -.IR awk. +.IR gawk. .SS String Constants .PP String constants in AWK are sequences of characters enclosed @@ -1643,12 +1643,12 @@ Addison-Wesley, 1988. ISBN 0-201-07981-X. Edition 0.15, published by the Free Software Foundation, 1993. .SH POSIX COMPATIBILITY A primary goal for -.I awk +.I gawk is compatibility with the \*(PX standard, as well as with the latest version of \*(UX .IR awk . To this end, -.I awk +.I gawk incorporates the following user visible features which are not described in the AWK book, but are part of @@ -1679,7 +1679,7 @@ The option for implementation specific features is from the \*(PX standard. .PP When processing arguments, -.I awk +.I gawk uses the special option ``\fB\-\^\-\fP'' to signal the end of arguments. In compatibility mode, it will warn about, but otherwise ignore, @@ -1696,7 +1696,7 @@ has it return the seed it was using, to allow keeping track of random number sequences. Therefore .B srand() in -.I awk +.I gawk also returns its current seed. .PP Other new features are: @@ -1711,7 +1711,7 @@ array; the and .BR \ev escape sequences (done originally in -.I awk +.I gawk and fed back into AT&T's); the .B tolower() and @@ -1726,13 +1726,13 @@ has some extensions to \*(PX They are described in this section. All the extensions described here can be disabled by invoking -.I awk +.I gawk with the .B "\-W compat" option. .PP The following features of -.I awk +.I gawk are not available in \*(PX .IR awk . @@ -1800,7 +1800,7 @@ or when closing a file or pipe, respectively. .PP When -.I awk +.I gawk is invoked with the .B "\-W compat" option, @@ -1818,7 +1818,7 @@ has been specified. .ig .PP If -.I awk +.I gawk was compiled for debugging, it will accept the following additional options: .TP @@ -1833,13 +1833,13 @@ or .IR bison (1) debugging output during program parsing. This option should only be of interest to the -.I awk +.I gawk maintainers, and may not even be compiled into -.IR awk . +.IR gawk . .. .SH HISTORICAL FEATURES There are two features of historical AWK implementations that -.I awk +.I gawk supports. First, it is possible to call the .B length() @@ -1863,7 +1863,7 @@ a = length($0) .RE .PP This feature is marked as ``deprecated'' in the \*(PX standard, and -.I awk +.I gawk will issue a warning about its use if .B "\-W lint" is specified on the command line. @@ -1887,14 +1887,14 @@ has not been specified. If .B POSIXLY_CORRECT exists in the environment, then -.I awk +.I gawk behaves exactly as if .B \-\-posix had been specified on the command line. If .B \-\-lint has been specified, -.I awk +.I gawk will issue a warning message to this effect. .SH BUGS The @@ -1910,9 +1910,9 @@ and the associated and .B /dev/stderr files, you may get different output from -.I awk +.I gawk than you would get on a system without those files. When -.I awk +.I gawk interprets these files internally, it synchronizes output to the standard output with output to .BR /dev/stdout , @@ -1921,11 +1921,11 @@ open files. Caveat Emptor. .SH VERSION INFORMATION This man page documents -.IR awk , +.IR gawk , version 2.15. .PP Starting with the 2.15 version of -.IR awk , +.IR gawk , the .BR \-c , .BR \-V , diff --git a/gnu/usr.bin/awk/main.c b/gnu/usr.bin/awk/main.c index 1f483bcd6bc5..ff9426e501fb 100644 --- a/gnu/usr.bin/awk/main.c +++ b/gnu/usr.bin/awk/main.c @@ -23,9 +23,6 @@ * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef __FreeBSD__ -#include <locale.h> -#endif #include "getopt.h" #include "awk.h" #include "patchlevel.h" @@ -145,9 +142,6 @@ char **argv; extern int opterr; extern char *optarg; -#ifdef __FreeBSD__ - (void) setlocale(LC_CTYPE, ""); -#endif #ifdef __EMX__ _response(&argc, &argv); _wildcard(&argc, &argv); diff --git a/gnu/usr.bin/bc/scan.c b/gnu/usr.bin/bc/scan.c index 6bff4516deb5..94f1aedaa3d1 100644 --- a/gnu/usr.bin/bc/scan.c +++ b/gnu/usr.bin/bc/scan.c @@ -1,7 +1,7 @@ /* A lexical scanner generated by flex */ /* scanner skeleton version: - * $Header: /home/ncvs/src/gnu/usr.bin/bc/scan.c,v 1.1.1.1 1993/06/19 00:26:18 paul Exp $ + * $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/bc/scan.c,v 1.2 1995/05/30 04:49:02 rgrimes Exp $ */ #define FLEX_SCANNER diff --git a/gnu/usr.bin/cc/cc/Makefile b/gnu/usr.bin/cc/cc/Makefile index 6ac463f8cbc7..e796b5353315 100644 --- a/gnu/usr.bin/cc/cc/Makefile +++ b/gnu/usr.bin/cc/cc/Makefile @@ -8,6 +8,6 @@ BINDIR= /usr/bin .PATH: ${.CURDIR}/../cc_int SRCS+= obstack.c version.c LINKS= ${BINDIR}/cc ${BINDIR}/gcc -MLINKS= cc.1 gcc.1 cc.1 c++.1 cc.1 g++.1 +MLINKS= cc.1 gcc.1 .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/cc/cc.1 b/gnu/usr.bin/cc/cc/cc.1 index 88d1d58b5715..dc5d5b2bf432 100644 --- a/gnu/usr.bin/cc/cc/cc.1 +++ b/gnu/usr.bin/cc/cc/cc.1 @@ -438,17 +438,7 @@ in the following sections. \-m486 \-mno\-486 \-msoft\-float -\-mrtd -\-mregparm -\-msvr3\-shlib -\-mno\-ieee\-fp \-mno\-fp\-ret\-in\-387 -\-mfancy\-math\-387 -\-mno\-wide\-multiply -\-mdebug\-addr -\-mno\-move -\-mprofiler\-epilogue -\-reg\-alloc=LIST .Sp .I HPPA Options .br @@ -3500,7 +3490,6 @@ assembler files (with a `\|\c These `\|\c .B \-m\c \&\|' options are defined for the Intel 80386 family of computers: -.TP .B \-m486 .TP .B \-mno\-486 @@ -3537,11 +3526,6 @@ The option `\|\c .B \-mno-fp-ret-in-387\c \&\|' causes such values to be returned in ordinary CPU registers instead. -.TP -.B \-mprofiler-epilogue -.TP -.B \-mno-profiler-epilogue -Generate extra code to write profile information for function exits. .PP These `\|\c .B \-m\c @@ -4077,7 +4061,7 @@ if available, else .B /tmp\c \&). .SH "SEE ALSO" -cpp(1), as(1), ld(1), gdb(1). +cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1). .br .RB "`\|" gcc "\|', `\|" cpp \|', .RB "`\|" as "\|', `\|" ld \|', diff --git a/gnu/usr.bin/cc/cc/gcc.c b/gnu/usr.bin/cc/cc/gcc.c index 43ea4a7ade2d..152c579d9a44 100644 --- a/gnu/usr.bin/cc/cc/gcc.c +++ b/gnu/usr.bin/cc/cc/gcc.c @@ -720,7 +720,7 @@ static struct compiler default_compilers[] = {"@f2c", "f2c %{checksubscripts:-C} %{I2} %{onetrip} %{honorcase:-U} %{u} %{w}\ %{ANSIC:-A} %{a} %{C++}\ - %{c} %{E} %{ec} %{ext} %{f} %{72} %{g} %{h} %{i2} %{kr} %{krd}\ + %{c} %{E} %{ec} %{ext} %{f} %{72} %{g} %{h} %{i2} %{kr}\ %{P} %{p} %{r} %{r8} %{s} %{w8} %{z} %{N*}\ %i %{!pipe: -o %g.c} %{pipe:-o -}|\n", "cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ diff --git a/gnu/usr.bin/cc/doc/invoke.texi b/gnu/usr.bin/cc/doc/invoke.texi index 54534a031a75..d3fc4f382589 100644 --- a/gnu/usr.bin/cc/doc/invoke.texi +++ b/gnu/usr.bin/cc/doc/invoke.texi @@ -274,10 +274,9 @@ in addition to the above: -mstats -G @var{num} -nocpp @emph{i386 Options} --m486 -mno-486 -mno-fancy-math-387 --mno-fp-ret-in-387 -mno-ieee-fp -mno-wide-multiply --mprofiler-epilogue -msoft-float -msvr3-shlib --mreg-alloc=@var{list} +-m486 -mieee-fp -mno-486 -mno-fancy-math-387 +-mno-fp-ret-in-387 -msoft-float -msvr3-shlib +-mno-wide-multiply -mreg-alloc=@var{list} @emph{HPPA Options} -mdisable-fpregs -mdisable-indexing -mjump-in-delay @@ -3482,8 +3481,8 @@ These @samp{-m} options are defined for the i386 family of computers: Control whether or not code is optimized for a 486 instead of an 386. Code generated for an 486 will run on a 386 and vice versa. -@item -mno-ieee-fp -@itemx -mieee-fp +@item -mieee-fp +@itemx -m-no-ieee-fp Control whether or not the compiler uses IEEE floating point comparisons. These handle correctly the case where the result of a comparison is unordered. @@ -3530,12 +3529,6 @@ Control whether GNU CC uses the @code{mul} and @code{imul} that produce 64 bit results in @code{eax:edx} from 32 bit operands to do @code{long long} multiplies and 32-bit division by constants. -@item -mprofiler-epilogue -@itemx -mno-profiler-epilogue -Generate extra code to write profile information for function exits. -This option has no effect except in combination with @samp{-g} or -@samp{-pg}. - @item -mreg-alloc=@var{regs} Control the default allocation order of integer registers. The string @var{regs} is a series of letters specifing a register. The diff --git a/gnu/usr.bin/cc/f77/Makefile b/gnu/usr.bin/cc/f77/Makefile index e7ed05100edb..04f667bd98bd 100644 --- a/gnu/usr.bin/cc/f77/Makefile +++ b/gnu/usr.bin/cc/f77/Makefile @@ -5,5 +5,6 @@ PROG = f77 SRCS = f77.c BINDIR= /usr/bin +NOMAN= 1 .include <bsd.prog.mk> diff --git a/gnu/usr.bin/cc/include/tm.h b/gnu/usr.bin/cc/include/tm.h index 14aa504879b5..440d509cefae 100644 --- a/gnu/usr.bin/cc/include/tm.h +++ b/gnu/usr.bin/cc/include/tm.h @@ -27,21 +27,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Get perform_* macros to build libgcc.a. */ #include "i386/perform.h" -#define MASK_PROFILER_EPILOGUE 010000000000 - -#define TARGET_PROFILER_EPILOGUE (target_flags & MASK_PROFILER_EPILOGUE) - -#undef SUBTARGET_SWITCHES -#define SUBTARGET_SWITCHES \ - { "profiler-epilogue", MASK_PROFILER_EPILOGUE}, \ - { "no-profiler-epilogue", -MASK_PROFILER_EPILOGUE}, - #undef CPP_PREDEFINES #define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__=2 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)" -#define STARTFILE_SPEC \ - "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:%{static:scrt0.o%s}%{!static:crt0.o%s}}}" - #define INCLUDE_DEFAULTS { \ { "/usr/include", 0 }, \ { "/usr/include/g++", 1 }, \ @@ -92,16 +80,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ fprintf (FILE, "\tcall mcount\n"); \ } +#if 0 /* not ready for this; it should be decided at compile time */ #define FUNCTION_PROFILER_EPILOGUE(FILE) \ { \ - if (TARGET_PROFILER_EPILOGUE) \ - { \ - if (flag_pic) \ - fprintf (FILE, "\tcall *mexitcount@GOT(%%ebx)\n"); \ - else \ - fprintf (FILE, "\tcall mexitcount\n"); \ - } \ + if (flag_pic) \ + fprintf (FILE, "\tcall *mexitcount@GOT(%%ebx)\n"); \ + else \ + fprintf (FILE, "\tcall mexitcount\n"); \ } +#endif /* Override the default comment-starter of "/". */ diff --git a/gnu/usr.bin/cc/libgcc/Makefile b/gnu/usr.bin/cc/libgcc/Makefile index e6024eb06e5d..45a301df0fef 100644 --- a/gnu/usr.bin/cc/libgcc/Makefile +++ b/gnu/usr.bin/cc/libgcc/Makefile @@ -17,12 +17,12 @@ P2OBJS=${LIB2OBJS:.o=.po} ${LIB1OBJS}: libgcc1.c ${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.CURDIR}/libgcc1.c @${LD} -x -r ${.TARGET} - @mv -f a.out ${.TARGET} + @mv a.out ${.TARGET} ${LIB2OBJS}: libgcc2.c ${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.CURDIR}/libgcc2.c @${LD} -x -r ${.TARGET} - @mv -f a.out ${.TARGET} + @mv a.out ${.TARGET} .if !defined(NOPIC) ${LIB1SOBJS}: libgcc1.c diff --git a/gnu/usr.bin/cpio/main.c b/gnu/usr.bin/cpio/main.c index 9346b780bed1..78b5fc53145f 100644 --- a/gnu/usr.bin/cpio/main.c +++ b/gnu/usr.bin/cpio/main.c @@ -23,9 +23,6 @@ #include <getopt.h> #include <sys/types.h> #include <sys/stat.h> -#ifdef __FreeBSD__ -#include <locale.h> -#endif #include "filetypes.h" #include "system.h" #include "cpiohdr.h" @@ -461,9 +458,6 @@ main (argc, argv) program_name = argv[0]; umask (0); -#ifdef __FreeBSD__ - (void) setlocale (LC_ALL, ""); -#endif #ifdef __TURBOC__ _fmode = O_BINARY; /* Put stdin and stdout in binary mode. */ #endif diff --git a/gnu/usr.bin/cpio/util.c b/gnu/usr.bin/cpio/util.c index 7204af7d37da..e2e1c1e86697 100644 --- a/gnu/usr.bin/cpio/util.c +++ b/gnu/usr.bin/cpio/util.c @@ -784,9 +784,9 @@ get_next_reel (tape_des) fprintf (tty_out, "%s%d%s", new_media_message_with_number, reel_number, new_media_message_after_number); else if (archive_name) - fprintf (tty_out, "Found end of volume. Load next volume and press RETURN. "); + fprintf (tty_out, "Found end of tape. Load next tape and press RETURN. "); else - fprintf (tty_out, "Found end of volume. To continue, type device/file name when ready.\n"); + fprintf (tty_out, "Found end of tape. To continue, type device/file name when ready.\n"); fflush (tty_out); diff --git a/gnu/usr.bin/cvs/contrib/easy-import.pl b/gnu/usr.bin/cvs/contrib/easy-import.pl index 3c0b7b5e75a1..3ba452b7fb46 100644 --- a/gnu/usr.bin/cvs/contrib/easy-import.pl +++ b/gnu/usr.bin/cvs/contrib/easy-import.pl @@ -22,7 +22,7 @@ sub scan_opts $dont_do_it = "-n" if $opt_n; if($opt_v) { - print STDERR '$Source: /home/ncvs/src/gnu/usr.bin/cvs/contrib/easy-import.pl,v $ $Revision: 1.5 $' . "\n"; # 'emacs kludge + print STDERR '$Source: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/cvs/contrib/easy-import.pl,v $ $Revision: 1.5 $' . "\n"; # 'emacs kludge exit 0; } die "usage: $0 [-v] [-n] [moduledir]\n" . @@ -162,20 +162,20 @@ sub cvs_init sub lsmodules { # list all known CVS modules - local(%rv, $mname, $mpath, $_); + local(@rv, $mname, $_); - %rv = (); + @rv = (); open(CVS, "cvs co -c|"); while($_ = <CVS>) { chop; - ($mname,$mpath) = split; + ($mname) = split; next if $mname eq ""; - $rv{$mname} = $mpath; + @rv = (@rv, $mname); } close(CVS); - return %rv; + return @rv; } @@ -259,65 +259,56 @@ $area = "$rep/$selected"; print "\n${so}[Working on:${se} ${us}$area${ue}${so}]${se}\n"; -%cvsmods = &lsmodules(); - for(;;) { $| = 1; - print "${so}Gimme the module name:${se} "; + print "${so}Enter the module path:${se} $area/"; $| = 0; - $modname = <>; - chop $modname; - if ($modname eq "") { - print "\a${us}You cannot use an empty module name.${ue}\n"; + $modpath = <>; + chop $modpath; + if ($modpath eq "") { + print "\a${us}You cannot use an empty module path.${ue}\n"; next; } - last if !$cvsmods{$modname}; - print "\a${us}This module name does already exist;\n" . - "do you intend to create a vendor-branch import?${ue}: "; - $rep = <>; - if ($rep =~ /\s*[yY]/) { - ($area,$modpath) = split(/\//,$cvsmods{$modname},2); - $branchimport = 1; - last; - } - print "${us}Choose another name.${ue}\n"; + last if ! -d "$cvsroot/$area/$modpath"; + print "\a${us}This module path does already exist; " . + "choose another one.${ue}\n"; } -if(!$branchimport) { - for(;;) { - $| = 1; - print "${so}Enter the module path:${se} $area/"; - $| = 0; - $modpath = <>; - chop $modpath; - if ($modpath eq "") { - print "\a${us}You cannot use an empty module path.${ue}\n"; - next; - } - last if ! -d "$cvsroot/$area/$modpath"; - print "\a${us}This module path does already exist; " . - "choose another one.${ue}\n"; - } +@newdirs = (); +$dir1 = "$cvsroot/$area"; +$dir2 = "$area"; +@newdirs = (@newdirs, "$dir2") if ! -d $dir1; - @newdirs = (); - $dir1 = "$cvsroot/$area"; - $dir2 = "$area"; - +foreach $ele (split(/\//, $modpath)) { + $dir1 = "$dir1/$ele"; + $dir2 = "$dir2/$ele"; @newdirs = (@newdirs, "$dir2") if ! -d $dir1; +} - foreach $ele (split(/\//, $modpath)) { - $dir1 = "$dir1/$ele"; - $dir2 = "$dir2/$ele"; - @newdirs = (@newdirs, "$dir2") if ! -d $dir1; - } +print "${so}You're going to create the following new directories:${se}\n"; + +&list(@newdirs); - print "${so}You're going to create the following new directories:${se}\n"; +@cvsmods = &lsmodules(); - &list(@newdirs); +for(;;) { + $| = 1; + print "${so}Gimme the module name:${se} "; + $| = 0; + $modname = <>; + chop $modname; + if ($modname eq "") { + print "\a${us}You cannot use an empty module name.${ue}\n"; + next; + } + last if !&contains($modname, @cvsmods); + print "\a${us}This module name does already exist; " . + "choose another one.${ue}\n"; } + for(;;) { $| = 1; print "${so}Enter a \`vendor\' tag (e. g. the authors ID):${se} "; @@ -343,38 +334,37 @@ print "${so}This is your last chance to interrupt, " . $| = 0; <>; -if (!$branchimport) { - $mod = ""; - foreach $tmp (sort(keys(%cvsmods))) { - if($tmp gt $modname) { - $mod = $tmp; - last; - } - } - if($mod eq "") { - # we are going to append our module - $cmd = "\$\na\n"; - } else { - # we can insert it - $cmd = "/^${mod}[ \t]/\ni\n"; +$mod = ""; +foreach $tmp (@cvsmods) { + if($tmp gt $modname) { + $mod = $tmp; + last; } +} + +if($mod eq "") { + # we are going to append our module + $cmd = "\$\na\n"; +} else { + # we can insert it + $cmd = "/^${mod}[ \t]/\ni\n"; +} - print "${so}Checking out the modules database...${se}\n"; - system("cvs co modules") && die "${us}failed.\n${ue}"; +print "${so}Checking out the modules database...${se}\n"; +system("cvs co modules") && die "${us}failed.\n${ue}"; - print "${so}Inserting new module...${se}\n"; - open(ED, "|ed modules/modules") || die "${us}Cannot start ed${ue}\n"; - print(ED "${cmd}${modname}" . ' ' x (16 - length($modname)) . - "$area/${modpath}\n.\nw\nq\n"); - close(ED); +print "${so}Inserting new module...${se}\n"; +open(ED, "|ed modules/modules") || die "${us}Cannot start ed${ue}\n"; +print(ED "${cmd}${modname}" . ' ' x (16 - length($modname)) . + "$area/${modpath}\n.\nw\nq\n"); +close(ED); - print "${so}Commiting new modules database...${se}\n"; - system("cvs $dont_do_it commit -m \" " . - "${modname} --> $area/${modpath}\" modules") - && die "Commit failed\n"; +print "${so}Commiting new modules database...${se}\n"; +system("cvs $dont_do_it commit -m \" " . + "${modname} --> $area/${modpath}\" modules") + && die "Commit failed\n"; - system("cvs $dont_do_it -Q release -d modules"); -} +system("cvs $dont_do_it -Q release -d modules"); print "${so}Importing source. Enter a commit message in the editor.${se}\n"; diff --git a/gnu/usr.bin/cvs/doc/cvs.texinfo b/gnu/usr.bin/cvs/doc/cvs.texinfo index ef125f524b6e..b3404d5825aa 100644 --- a/gnu/usr.bin/cvs/doc/cvs.texinfo +++ b/gnu/usr.bin/cvs/doc/cvs.texinfo @@ -1647,11 +1647,7 @@ int main(int argc, gencode(); else fprintf(stderr, "No code generated.\n"); -<<<<<<< driver.c - exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -======= exit(!!nerr); ->>>>>>> 1.6 @} @end example diff --git a/gnu/usr.bin/cvs/examples/loginfo b/gnu/usr.bin/cvs/examples/loginfo index 0c338249ce63..e9c25e064612 100644 --- a/gnu/usr.bin/cvs/examples/loginfo +++ b/gnu/usr.bin/cvs/examples/loginfo @@ -1,5 +1,5 @@ # -#ident "@(#)cvs/examples:$Name$:$Id$" +# $CVSid: @(#)loginfo 1.5 92/03/31 $ # # The "loginfo" file is used to control where "cvs commit" log information # is sent. The first entry on a line is a regular expression which is tested diff --git a/gnu/usr.bin/diff/diff.1 b/gnu/usr.bin/diff/diff.1 index 4acd3c9ac44d..e16f6d98dcfa 100644 --- a/gnu/usr.bin/diff/diff.1 +++ b/gnu/usr.bin/diff/diff.1 @@ -309,6 +309,9 @@ Use to output a line taken from just the first file in if-then-else format. .TP +.B \-p +Show which C function each change is in. +.TP .B \-P When comparing directories, if a file appears only in the second directory of the two, treat it as present but empty in the other. @@ -322,25 +325,25 @@ to paginate it. Report only whether the files differ, not the details of the differences. .TP +.B \-r +When comparing directories, recursively compare any subdirectories +found. +.TP .B \-\-rcs Output RCS-format diffs; like .B \-f except that each command specifies the number of lines affected. .TP -.B \-r -.br -.ns -.TP .B \-\-recursive When comparing directories, recursively compare any subdirectories found. .TP -.B \-s +.B \-\-report\-identical\-files .br .ns .TP -.B \-\-report\-identical\-files +.B \-s Report when two files are the same. .TP .BI "\-S " file diff --git a/gnu/usr.bin/gdb/bfd/sysdep.h b/gnu/usr.bin/gdb/bfd/sysdep.h index 5e989eb230f7..f57363b66aba 100644 --- a/gnu/usr.bin/gdb/bfd/sysdep.h +++ b/gnu/usr.bin/gdb/bfd/sysdep.h @@ -19,7 +19,7 @@ #define SEEK_SET 0 #define SEEK_CUR 1 -#define HOST_PAGE_SIZE PAGE_SIZE +#define HOST_PAGE_SIZE NBPG #define HOST_MACHINE_ARCH bfd_arch_i386 #define HOST_TEXT_START_ADDR USRTEXT diff --git a/gnu/usr.bin/gdb/bfd/trad-core.c b/gnu/usr.bin/gdb/bfd/trad-core.c index 78a70a737416..dc3d84380f17 100644 --- a/gnu/usr.bin/gdb/bfd/trad-core.c +++ b/gnu/usr.bin/gdb/bfd/trad-core.c @@ -117,7 +117,7 @@ trad_unix_core_file_p (abfd) bfd_set_error (bfd_error_system_call); return 0; } - if (PAGE_SIZE * (UPAGES + u.u_dsize + if (NBPG * (UPAGES + u.u_dsize #ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE - u.u_tsize #endif @@ -127,7 +127,7 @@ trad_unix_core_file_p (abfd) return 0; } #ifndef TRAD_CORE_ALLOW_ANY_EXTRA_SIZE - if (PAGE_SIZE * (UPAGES + u.u_dsize + u.u_ssize) + if (NBPG * (UPAGES + u.u_dsize + u.u_ssize) #ifdef TRAD_CORE_EXTRA_SIZE_ALLOWED /* Some systems write the file too big. */ + TRAD_CORE_EXTRA_SIZE_ALLOWED @@ -187,26 +187,26 @@ trad_unix_core_file_p (abfd) core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; core_regsec (abfd)->flags = SEC_HAS_CONTENTS; - core_datasec (abfd)->_raw_size = PAGE_SIZE * u.u_dsize + core_datasec (abfd)->_raw_size = NBPG * u.u_dsize #ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE - - PAGE_SIZE * u.u_tsize + - NBPG * u.u_tsize #endif ; - core_stacksec (abfd)->_raw_size = PAGE_SIZE * u.u_ssize; - core_regsec (abfd)->_raw_size = PAGE_SIZE * UPAGES; /* Larger than sizeof struct u */ + core_stacksec (abfd)->_raw_size = NBPG * u.u_ssize; + core_regsec (abfd)->_raw_size = NBPG * UPAGES; /* Larger than sizeof struct u */ /* What a hack... we'd like to steal it from the exec file, since the upage does not seem to provide it. FIXME. */ #ifdef HOST_DATA_START_ADDR core_datasec (abfd)->vma = HOST_DATA_START_ADDR; #else - core_datasec (abfd)->vma = HOST_TEXT_START_ADDR + (PAGE_SIZE * u.u_tsize); + core_datasec (abfd)->vma = HOST_TEXT_START_ADDR + (NBPG * u.u_tsize); #endif #ifdef HOST_STACK_START_ADDR core_stacksec (abfd)->vma = HOST_STACK_START_ADDR; #else - core_stacksec (abfd)->vma = HOST_STACK_END_ADDR - (PAGE_SIZE * u.u_ssize); + core_stacksec (abfd)->vma = HOST_STACK_END_ADDR - (NBPG * u.u_ssize); #endif /* This is tricky. As the "register section", we give them the entire @@ -225,10 +225,10 @@ trad_unix_core_file_p (abfd) using minor trickery to get around the offset-or-absolute-addr problem. */ core_regsec (abfd)->vma = 0 - (int) u.u_ar0; - core_datasec (abfd)->filepos = PAGE_SIZE * UPAGES; - core_stacksec (abfd)->filepos = (PAGE_SIZE * UPAGES) + PAGE_SIZE * u.u_dsize + core_datasec (abfd)->filepos = NBPG * UPAGES; + core_stacksec (abfd)->filepos = (NBPG * UPAGES) + NBPG * u.u_dsize #ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE - - PAGE_SIZE * u.u_tsize + - NBPG * u.u_tsize #endif ; core_regsec (abfd)->filepos = 0; /* Register segment is the upage */ diff --git a/gnu/usr.bin/gdb/gdb/Makefile b/gnu/usr.bin/gdb/gdb/Makefile index d1513bb6fb62..68a86ae5395b 100644 --- a/gnu/usr.bin/gdb/gdb/Makefile +++ b/gnu/usr.bin/gdb/gdb/Makefile @@ -1,5 +1,3 @@ -# $Id$ - PROG = gdb BINDIR= /usr/bin CLEANFILES+= y.tab.h c-exp.tab.c ch-exp.tab.c m2-exp.tab.c @@ -26,24 +24,24 @@ c-exp.tab.c: $(.CURDIR)/c-exp.y sed -e '/extern.*malloc/d' -e '/extern.*realloc/d' -e '/extern.*free/d' \ -e '/include.*malloc.h/d' -e 's/malloc/xmalloc/g' \ -e 's/realloc/xrealloc/g' < y.tab.c > c-exp.new - rm -f y.tab.c - mv -f c-exp.new ./c-exp.tab.c + rm y.tab.c + mv c-exp.new ./c-exp.tab.c ch-exp.tab.c: $(.CURDIR)/ch-exp.y yacc -d -p ch_ $(.CURDIR)/ch-exp.y sed -e '/extern.*malloc/d' -e '/extern.*realloc/d' -e '/extern.*free/d' \ -e '/include.*malloc.h/d' -e 's/malloc/xmalloc/g' \ -e 's/realloc/xrealloc/g' < y.tab.c > ch-exp.new - rm -f y.tab.c - mv -f ch-exp.new ./ch-exp.tab.c + rm y.tab.c + mv ch-exp.new ./ch-exp.tab.c m2-exp.tab.c: $(.CURDIR)/m2-exp.y yacc -d -p m2_ $(.CURDIR)/m2-exp.y sed -e '/extern.*malloc/d' -e '/extern.*realloc/d' -e '/extern.*free/d' \ -e '/include.*malloc.h/d' -e 's/malloc/xmalloc/g' \ -e 's/realloc/xrealloc/g' < y.tab.c > m2-exp.new - rm -f y.tab.c - mv -f m2-exp.new ./m2-exp.tab.c + rm y.tab.c + mv m2-exp.new ./m2-exp.tab.c CFLAGS+= -I$(.CURDIR)/. -I${DESTDIR}/usr/include/readline -I$(.CURDIR)/../bfd diff --git a/gnu/usr.bin/gdb/gdb/freebsd-nat.c b/gnu/usr.bin/gdb/gdb/freebsd-nat.c index ebf7db75d261..5a3935474ef2 100644 --- a/gnu/usr.bin/gdb/gdb/freebsd-nat.c +++ b/gnu/usr.bin/gdb/gdb/freebsd-nat.c @@ -480,7 +480,7 @@ kvtophys (fd, addr) CORE_ADDR addr; { CORE_ADDR v; - unsigned int pte; + struct pte pte; static CORE_ADDR PTD = -1; CORE_ADDR current_ptd; @@ -526,18 +526,18 @@ CORE_ADDR addr; /* * Read the first-level page table (ptd). */ - v = current_ptd + ((unsigned)addr >> PDRSHIFT) * sizeof pte; - if (physrd(fd, v, (char *)&pte, sizeof pte) < 0 || (pte&PG_V) == 0) + v = current_ptd + ((unsigned)addr >> PD_SHIFT) * sizeof pte; + if (physrd(fd, v, (char *)&pte, sizeof pte) < 0 || pte.pg_v == 0) return (~0); /* * Read the second-level page table. */ - v = (pte&PG_FRAME) + ((addr >> PAGE_SHIFT)&(NPTEPG-1)) * sizeof pte; - if (physrd(fd, v, (char *) &pte, sizeof(pte)) < 0 || (pte&PG_V) == 0) + v = i386_ptob(pte.pg_pfnum) + ((addr&PT_MASK) >> PG_SHIFT) * sizeof pte; + if (physrd(fd, v, (char *) &pte, sizeof(pte)) < 0 || pte.pg_v == 0) return (~0); - addr = (pte & PG_FRAME) + (addr & PAGE_MASK); + addr = i386_ptob(pte.pg_pfnum) + (addr & PGOFSET); #if 0 printf("vtophys(%x) -> %x\n", oldaddr, addr); #endif @@ -605,7 +605,7 @@ kernel_core_file_hook(fd, addr, buf, len) break; } /* we can't read across a page boundary */ - i = min(len, PAGE_SIZE - (addr & PAGE_MASK)); + i = min(len, NBPG - (addr & PGOFSET)); if ((cc = physrd(fd, paddr, cp, i)) <= 0) { bzero(cp, len); return (cp - buf); diff --git a/gnu/usr.bin/gdb/gdb/gdb.1 b/gnu/usr.bin/gdb/gdb/gdb.1 index 0245ec81cc8c..2a2af1f9a0e6 100644 --- a/gnu/usr.bin/gdb/gdb/gdb.1 +++ b/gnu/usr.bin/gdb/gdb/gdb.1 @@ -11,8 +11,6 @@ gdb \- The GNU Debugger .RB "[\|" \-help "\|]" .RB "[\|" \-nx "\|]" .RB "[\|" \-q "\|]" -.RB "[\|" \-k "\|]" -.RB "[\|" \-w "\|]" .RB "[\|" \-batch "\|]" .RB "[\|" \-cd=\c .I dir\c @@ -283,23 +281,6 @@ command options and arguments have been processed. messages are also suppressed in batch mode. .TP -.B \-kernel -.TP -.B \-k -Puts GDB into kernel debugging mode. If no executable file is specified then -/kernel is used. If no core file is specified then /dev/mem is -used. Crash dumps can be examined by specifying both an executable and -a core file. - -.TP -.B \-wcore -.TP -.B \-w -This flag is only effective when debugging a "live" kernel. It makes the -core file (/dev/mem) writable so that kernel variables can be changed -during a debugging session. Use this with caution ! - -.TP .B \-batch Run in batch mode. Exit with status \c .B 0\c diff --git a/gnu/usr.bin/gdb/libiberty/Makefile b/gnu/usr.bin/gdb/libiberty/Makefile index 838781295e82..2bc6abfab4a7 100644 --- a/gnu/usr.bin/gdb/libiberty/Makefile +++ b/gnu/usr.bin/gdb/libiberty/Makefile @@ -1,7 +1,7 @@ LIB= iberty SRCS= argv.c basename.c concat.c cplus-dem.c fdmatch.c getopt.c \ getopt1.c ieee-float.c obstack.c spaces.c strerror.c strsignal.c \ - xmalloc.c + vasprintf.c xmalloc.c CFLAGS+= -I$(.CURDIR)/../gdb/. NOPROFILE=no diff --git a/gnu/usr.bin/gdb/libiberty/vasprintf.c b/gnu/usr.bin/gdb/libiberty/vasprintf.c new file mode 100644 index 000000000000..b3ba0ca6ca8c --- /dev/null +++ b/gnu/usr.bin/gdb/libiberty/vasprintf.c @@ -0,0 +1,139 @@ +/* Like vsprintf but provides a pointer to malloc'd storage, which must + be freed by the caller. + Copyright (C) 1994 Free Software Foundation, Inc. + +This file is part of the libiberty library. +Libiberty is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +Libiberty 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with libiberty; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <stdio.h> +#include <varargs.h> + +#ifdef TEST +int global_total_width; +#endif + +unsigned long strtoul (); +char *malloc (); + +int +vasprintf (result, format, args) + char **result; + char *format; + va_list args; +{ + char *p = format; + /* Add one to make sure that it is never zero, which might cause malloc + to return NULL. */ + int total_width = strlen (format) + 1; + va_list ap = args; + + while (*p != '\0') + { + if (*p++ == '%') + { + while (strchr ("-+ #0", *p)) + ++p; + if (*p == '*') + { + ++p; + total_width += abs (va_arg (ap, int)); + } + else + total_width += strtoul (p, &p, 10); + if (*p == '.') + { + ++p; + if (*p == '*') + { + ++p; + total_width += abs (va_arg (ap, int)); + } + else + total_width += strtoul (p, &p, 10); + } + while (strchr ("hlL", *p)) + ++p; + /* Should be big enough for any format specifier except %s. */ + total_width += 30; + switch (*p) + { + case 'd': + case 'i': + case 'o': + case 'u': + case 'x': + case 'X': + case 'c': + va_arg (ap, int); + break; + case 'f': + case 'e': + case 'E': + case 'g': + case 'G': + va_arg (ap, double); + break; + case 's': + total_width += strlen (va_arg (ap, char *)); + break; + case 'p': + case 'n': + va_arg (ap, char *); + break; + } + } + } +#ifdef TEST + global_total_width = total_width; +#endif + *result = malloc (total_width); + if (*result != NULL) + return vsprintf (*result, format, args); + else + return 0; +} + +#ifdef TEST +void +checkit (va_alist) + va_dcl +{ + va_list args; + char *format; + char *result; + + va_start (args); + format = va_arg (args, char *); + vasprintf (&result, format, args); + if (strlen (result) < global_total_width) + printf ("PASS: "); + else + printf ("FAIL: "); + printf ("%d %s\n", global_total_width, result); +} + +int +main () +{ + checkit ("%d", 0x12345678); + checkit ("%200d", 5); + checkit ("%.300d", 6); + checkit ("%100.150d", 7); + checkit ("%s", "jjjjjjjjjiiiiiiiiiiiiiiioooooooooooooooooppppppppppppaa\n\ +777777777777777777333333333333366666666666622222222222777777777777733333"); + checkit ("%f%s%d%s", 1.0, "foo", 77, "asdjffffffffffffffiiiiiiiiiiixxxxx"); +} +#endif /* TEST */ diff --git a/gnu/usr.bin/grep/Makefile b/gnu/usr.bin/grep/Makefile index 0cfcf6b2d44c..a7811a3c656c 100644 --- a/gnu/usr.bin/grep/Makefile +++ b/gnu/usr.bin/grep/Makefile @@ -2,7 +2,7 @@ PROG= grep SRCS= dfa.c grep.c getopt.c kwset.c obstack.c search.c CFLAGS+=-DGREP -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_UNISTD_H=1 \ -DHAVE_GETPAGESIZE=1 -DHAVE_MEMCHR=1 -DHAVE_STRERROR=1 \ - -DHAVE_VALLOC=1 -DHAVE_MMAP=1 -DHAVE_FTS=1 + -DHAVE_VALLOC=1 LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep diff --git a/gnu/usr.bin/grep/grep.1 b/gnu/usr.bin/grep/grep.1 index 22e96e8b7cdd..27c6b0e419d2 100644 --- a/gnu/usr.bin/grep/grep.1 +++ b/gnu/usr.bin/grep/grep.1 @@ -3,13 +3,22 @@ grep, egrep, fgrep \- print lines matching a pattern .SH SYNOPOSIS .B grep -[\-[AB] num] -[\-HRPS] -[\-CEFGLVabchilnqsvwx] -[\-e expr] -[\-f file] -files... - +[ +.BR \- [[ AB "] ]\c" +.I "num" +] +[ +.BR \- [ CEFGVBchilnsvwx ] +] +[ +.B \-e +] +.I pattern +| +.BI \-f file +] [ +.I files... +] .SH DESCRIPTION .PP .B Grep @@ -93,9 +102,6 @@ Print the version number of to standard error. This version number should be included in all bug reports (see below). .TP -.B \-a -Don't search in binary files. -.TP .B \-b Print the byte offset within the input file before each line of output. @@ -159,36 +165,6 @@ characters are letters, digits, and the underscore. .TP .B \-x Select only those matches that exactly match the whole line. - -.PP -Following options only avaible if compiled with FTS library: -.PD 0 -.TP -.BI \-H -If the -.I \-R -option is specified, symbolic links on the command line -are followed. (Symbolic links encountered in the tree traversal -are not followed.) -.TP - -.BI \-L -If the -.I \-R -option is specified, all symbolic links are followed. -.TP - -.BI \-P -If the -.I \-R -option is specified, no symbolic links are followed. -.TP - -.BI \-R -Search in the file hierarchies -rooted in the files instead of just the files themselves. -.TP - .PD .SH "REGULAR EXPRESSIONS" .PP diff --git a/gnu/usr.bin/grep/grep.c b/gnu/usr.bin/grep/grep.c index 2576e3dab758..dc3329853307 100644 --- a/gnu/usr.bin/grep/grep.c +++ b/gnu/usr.bin/grep/grep.c @@ -19,9 +19,6 @@ #include <errno.h> #include <stdio.h> -#ifdef __FreeBSD__ -#include <locale.h> -#endif #ifndef errno extern int errno; @@ -56,7 +53,6 @@ extern char *memchr(); #include <unistd.h> #else #define O_RDONLY 0 -#define STDIN_FILENO 0 extern int open(), read(), close(); #endif @@ -95,16 +91,6 @@ memchr(vp, c, n) } #endif -/* traverse a file hierarchy library */ -#ifdef HAVE_FTS -#include <sys/types.h> -#include <sys/stat.h> -#include <fts.h> -#endif - -/* don't search in binary files */ -int aflag; - /* Define flags declared in grep.h. */ char *matcher; int match_icase; @@ -510,40 +496,6 @@ grepbuf(beg, lim) return nlines; } - -/* - * try to guess if fd belong to a binary file - */ - -int isBinaryFile(fd) - int fd; -{ -#define BINARY_BUF_LEN 32 - static unsigned char buf[BINARY_BUF_LEN]; - int i, n; - - /* pipe, socket, fifo */ - if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) - return(0); - - if ((n =(int) read(fd, buf, (size_t)BINARY_BUF_LEN)) == -1) - return(0); - - /* look for non-printable chars */ - for(i = 0; i < n; i++) - if (!isprint(buf[i]) && !isspace(buf[i])) - return(1); - - /* reset fd to begin of file */ - if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) - return(0); - - - return(0); -} - - - /* Search a given file. Return a count of lines printed. */ static int grep(fd) @@ -553,10 +505,6 @@ grep(fd) size_t residue, save; char *beg, *lim; - /* skip binary files */ - if (aflag && isBinaryFile(fd)) - return(0); - reset(fd); totalcc = 0; @@ -617,15 +565,8 @@ grep(fd) static char version[] = "GNU grep version 2.0"; -#ifdef HAVE_FTS -#define USAGE \ -"usage: %s [-[AB] <num>] [-HRPS] [-CEFGLVabchilnqsvwx]\n\ - [-e <expr>] [-f file] [files ...]\n" -#else #define USAGE \ -"usage: %s [-[AB] <num>] [-CEFGLVabchilnqsvwx]\n\ - [-e <expr>] [-f file] [files ...]\n" -#endif + "usage: %s [-[[AB] ]<num>] [-[CEFGVchilnqsvwx]] [-[ef]] <expr> [<files...>]\n" static void usage() @@ -664,16 +605,7 @@ main(argc, argv) FILE *fp; extern char *optarg; extern int optind; -#ifdef HAVE_FTS - int Rflag, Hflag, Pflag, Lflag; - FTS *ftsp; - FTSENT *ftsent; - int fts_options; -#endif -#ifdef __FreeBSD__ - (void) setlocale(LC_CTYPE, ""); -#endif prog = argv[0]; if (prog && strrchr(prog, '/')) prog = strrchr(prog, '/') + 1; @@ -686,20 +618,9 @@ main(argc, argv) list_files = 0; suppress_errors = 0; matcher = NULL; - aflag = 0; -#ifdef HAVE_FTS - Rflag = Hflag = Pflag = Lflag = 0; -#endif - - while ((opt = getopt(argc, argv, - -#ifndef HAVE_FTS -"0123456789A:B:CEFGVX:abce:f:hiLlnqsvwxy" -#else -"0123456789A:B:CEFGHLPRSVX:abce:f:hiLlnqsvwxy?" -#endif -)) != EOF) + while ((opt = getopt(argc, argv, "0123456789A:B:CEFGVX:bce:f:hiLlnqsvwxy")) + != EOF) switch (opt) { case '0': @@ -751,34 +672,6 @@ main(argc, argv) fatal("matcher already specified", 0); matcher = optarg; break; - -#ifdef HAVE_FTS - /* symbolic links on the command line are followed */ - case 'H': - Hflag = 1; - Lflag = Pflag = 0; - break; - - /* no symbolic links are followed */ - case 'P': - Pflag = 1; - Hflag = Lflag = 0; - break; - - /* traverse file hierarchies */ - case 'R': - Rflag = 1; - break; - - /* all symbolic links are followed */ - case 'S': - Lflag = 1; - Hflag = Pflag = 0; - break; -#endif - case 'a': - aflag = 1; - break; case 'b': out_byte = 1; break; @@ -876,126 +769,12 @@ main(argc, argv) (*compile)(keys, keycc); -#ifndef HAVE_FTS if (argc - optind > 1 && !no_filenames) -#else - if ((argc - optind > 1 || Rflag) && !no_filenames) -#endif out_file = 1; status = 1; -#if HAVE_FTS - if (Rflag) { - fts_options = FTS_PHYSICAL | FTS_NOCHDIR; - - if (Hflag) - fts_options |= FTS_COMFOLLOW; - - if (Lflag) { - fts_options |= FTS_LOGICAL; - fts_options &= ~FTS_PHYSICAL; - } - - if (Pflag) { - fts_options &= ~FTS_LOGICAL & ~FTS_COMFOLLOW; - fts_options |= FTS_PHYSICAL; - } - } - - if (Rflag && optind < argc) { - int i; - - /* replace "-" with "/dev/stdin" */ - for (i = optind; i < argc; i++) - if (strcmp(argv[i], "-") == 0) - *(argv + i) = "/dev/stdin"; - - if ((ftsp = fts_open(argv + optind, fts_options, - (int(*)())NULL)) == NULL) { - if (!suppress_errors) - error("", errno); - } else { - - while((ftsent = fts_read(ftsp)) != NULL) { - filename = ftsent->fts_accpath; - - switch(ftsent->fts_info) { - - /* regular file */ - case FTS_F: - break; - - /* directory */ - case FTS_D: - case FTS_DC: - case FTS_DP: - continue; break; - - /* errors */ - case FTS_DNR: - error(filename, errno); - continue; break; - - case FTS_ERR: - case FTS_NS: - error(filename, ftsent->fts_errno); - continue; break; - - /* dead symlink */ - case FTS_SLNONE: - continue; break; - - /* symlink, don't skip */ - case FTS_SL: - break; - - default: - /* - if (!suppress_errors) - fprintf(stderr, "%s: ignored\n", filename); - continue; break; - */ - - } - - if ((desc = open(filename, O_RDONLY)) == -1) { - error(filename, errno); - continue; - } - - count = grep(desc); - if (count_matches) - { - if (out_file) - printf("%s:", filename); - printf("%d\n", count); - } - if (count) - { - status = 0; - if (list_files == 1) - printf("%s\n", filename); - } - else if (list_files == -1) - printf("%s\n", filename); - - if (desc != STDIN_FILENO) - close(desc); - } - - if (fts_close(ftsp) == -1) - error("fts_close", errno); - } - - /* ! Rflag */ - } else - -#endif /* HAVE_FTS */ - - /* search in file names from arguments, not from stdin */ if (optind < argc) - while (optind < argc) { desc = strcmp(argv[optind], "-") ? open(argv[optind], O_RDONLY) : 0; @@ -1027,8 +806,6 @@ main(argc, argv) close(desc); ++optind; } - - /* read input from stdin */ else { filename = "(standard input)"; diff --git a/gnu/usr.bin/grep/search.c b/gnu/usr.bin/grep/search.c index 5e17d034abbe..2b8933805c9a 100644 --- a/gnu/usr.bin/grep/search.c +++ b/gnu/usr.bin/grep/search.c @@ -46,7 +46,7 @@ extern char *memchr(); #define bcopy(s, d, n) memcpy((d), (s), (n)) #endif -#if defined(isascii) && !defined(__FreeBSD__) +#ifdef isascii #define ISALNUM(C) (isascii(C) && isalnum(C)) #define ISUPPER(C) (isascii(C) && isupper(C)) #else diff --git a/gnu/usr.bin/groff/Makefile.cfg b/gnu/usr.bin/groff/Makefile.cfg index 0c7adc565ddd..406e24ee2813 100644 --- a/gnu/usr.bin/groff/Makefile.cfg +++ b/gnu/usr.bin/groff/Makefile.cfg @@ -1,6 +1,5 @@ -# $Id$ - BINDIR?= /usr/bin +SHAREDIR?= /usr/share SHELL= /bin/sh # Define `page' to be letter if your PostScript printer uses 8.5x11 @@ -90,13 +89,13 @@ CFLAGS+=$(DEFINES) .y.o: $(YACC) $(YFLAGS) $(.IMPSRC) - mv -f y.tab.c $(.PREFIX).cc - mv -f y.tab.h $(.PREFIX).tab.h + mv y.tab.c $(.PREFIX).cc + mv y.tab.h $(.PREFIX).tab.h ${CXX} ${CXXFLAGS} -c $(.PREFIX).cc -o ${.TARGET} .y.cc: $(YACC) $(YFLAGS) $(.IMPSRC) - mv -f y.tab.c $(.PREFIX).cc - mv -f y.tab.h $(.PREFIX).tab.h + mv y.tab.c $(.PREFIX).cc + mv y.tab.h $(.PREFIX).tab.h .SUFFIXES: .man .1 .2 .3 .4 .5 .6 .7 .8 diff --git a/gnu/usr.bin/groff/Makefile.comm b/gnu/usr.bin/groff/Makefile.comm index 9e6f15ee5937..b3d24af39c54 100644 --- a/gnu/usr.bin/groff/Makefile.comm +++ b/gnu/usr.bin/groff/Makefile.comm @@ -1,5 +1,3 @@ -# $Id$ - # Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # @@ -95,14 +93,14 @@ extraclean: else \ $(YACC) $(YACCFLAGS) $<; \ fi - mv -f y.tab.c $@ + mv y.tab.c $@ # Avoid ending up with two versions of $(YTABH). if test -n "$(YTABH)"; then \ if test -f $(srcdir)/$(YTABH); then \ rm -f $(YTABH); \ - mv -f y.tab.h $(srcdir)/$(YTABH); \ + mv y.tab.h $(srcdir)/$(YTABH); \ else \ - mv -f y.tab.h $(YTABH); \ + mv y.tab.h $(YTABH); \ fi; \ fi @@ -219,7 +217,7 @@ uninstall_dev: .PHONY: depend_src depend_src: depend.temp - mv -f depend.temp Makefile.dep + mv depend.temp Makefile.dep depend.temp: FORCE > depend.temp; @@ -229,7 +227,7 @@ depend.temp: FORCE || $(CC) $(ALL_CFLAGS) -MM $(CSRCS) >>depend.temp if test -n "$(YTABH)"; then \ sed -e 's|$(YTABH)|$(YTABC)|g' depend.temp >depend.temp1; \ - mv -f depend.temp1 depend.temp; \ + mv depend.temp1 depend.temp; \ fi .PHONY: TAGS_src diff --git a/gnu/usr.bin/groff/Makefile.dev b/gnu/usr.bin/groff/Makefile.dev index 2aa71f87e116..4f6948fb19d6 100644 --- a/gnu/usr.bin/groff/Makefile.dev +++ b/gnu/usr.bin/groff/Makefile.dev @@ -13,15 +13,18 @@ FONTMODE?= 444 all: $(FONTFILES) -.for f in $(FONTFILES) -.if exists($f) -beforeinstall: $f -.else -beforeinstall: $(.CURDIR)/$f +.if !target(maninstall) +maninstall: + @echo -n +.endif + +.if !target(install) +install: + for f in $(FONTFILES); do \ + ff=$$f; test -f $$f || ff=${.CURDIR}/$$f || true; \ + install -c -o $(FONTOWN) -g $(FONTGRP) -m $(FONTMODE) $$ff \ + $(DESTDIR)$(DEVICEDIR)/$$f; \ + done .endif -.endfor -beforeinstall: - $(INSTALL) -c -o $(FONTOWN) -g $(FONTGRP) -m $(FONTMODE) \ - ${.ALLSRC} $(DESTDIR)$(DEVICEDIR) .include <bsd.prog.mk> diff --git a/gnu/usr.bin/groff/Makefile.in b/gnu/usr.bin/groff/Makefile.in index 723798716348..321fc2ef19d6 100644 --- a/gnu/usr.bin/groff/Makefile.in +++ b/gnu/usr.bin/groff/Makefile.in @@ -1,5 +1,3 @@ -# $Id$ - # Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # @@ -340,7 +338,7 @@ dist: done; \ rm -f Makefile; \ $(LN_S) $$srcdir/Makefile.init Makefile - mv -f tmp groff-$(version) + mv tmp groff-$(version) tar cfh - groff-$(version) | gzip -c >groff-$(version).tar.gz rm -fr groff-$(version) diff --git a/gnu/usr.bin/groff/addftinfo/addftinfo.man b/gnu/usr.bin/groff/addftinfo/addftinfo.man index 0b6b796a7497..4c92477c7b8b 100644 --- a/gnu/usr.bin/groff/addftinfo/addftinfo.man +++ b/gnu/usr.bin/groff/addftinfo/addftinfo.man @@ -79,6 +79,7 @@ If a parameter is not specified the default will be used. The defaults are chosen to have the reasonable values for a Times font. .SH "SEE ALSO" +.BR font (5) .BR groff_font (@MAN5EXT@), .BR groff (@MAN1EXT@), .BR groff_char (@MAN7EXT@) diff --git a/gnu/usr.bin/groff/grodvi/Makefile b/gnu/usr.bin/groff/grodvi/Makefile index de4a71258fc3..9dafc47937bf 100644 --- a/gnu/usr.bin/groff/grodvi/Makefile +++ b/gnu/usr.bin/groff/grodvi/Makefile @@ -4,7 +4,7 @@ PROG= grodvi SRCS= dvi.cc CFLAGS+= -I${.CURDIR}/../include LDADD+= ${LIBDRIVER} ${LIBGROFF} -lm -DPADD+= ${LIBDRIVER} ${LIBGROFF} ${LIBM} +DPADD+= ${LIBDRIVER} ${LIBGROFF} ${LIBMATH} MANDEPEND= grodvi.1 CLEANFILES+= ${MANDEPEND} diff --git a/gnu/usr.bin/groff/groff/Makefile b/gnu/usr.bin/groff/groff/Makefile index 9539f700d560..6499244622c6 100644 --- a/gnu/usr.bin/groff/groff/Makefile +++ b/gnu/usr.bin/groff/groff/Makefile @@ -4,7 +4,7 @@ PROG= groff SRCS= groff.cc pipeline.c CFLAGS+= -I${.CURDIR}/../include LDADD+= ${LIBGROFF} -lm -DPADD+= ${LIBGROFF} ${LIBM} +DPADD+= ${LIBGROFF} ${LIBMATH} MANDEPEND= groff.1 CLEANFILES+= ${MANDEPEND} diff --git a/gnu/usr.bin/groff/groff/groff.man b/gnu/usr.bin/groff/groff/groff.man index 40961ccc256f..a1a337ac05f6 100644 --- a/gnu/usr.bin/groff/groff/groff.man +++ b/gnu/usr.bin/groff/groff/groff.man @@ -83,9 +83,6 @@ For typewriter-like devices .TP .B latin1 For typewriter-like devices using the ISO Latin-1 character set. -.TP -.B koi8-r -For typewriter-like devices using the russian KOI8-R character set. .LP The postprocessor to be used for a device is specified by the .B postpro @@ -347,7 +344,7 @@ The most recent released version of groff is always available for anonymous ftp from prep.ai.mit.edu (18.71.0.38) in the directory pub/gnu. .SH "SEE ALSO" -.\" .BR grog (@MAN1EXT@), +.BR grog (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR @g@tbl (@MAN1EXT@), .BR @g@pic (@MAN1EXT@), @@ -357,7 +354,7 @@ pub/gnu. .BR grops (@MAN1EXT@), .BR grodvi (@MAN1EXT@), .BR grotty (@MAN1EXT@), -.\" .BR gxditview (@MAN1EXT@), +.BR gxditview (@MAN1EXT@), .BR groff_font (@MAN5EXT@), .BR groff_out (@MAN5EXT@), .BR groff_ms (@MAN7EXT@), diff --git a/gnu/usr.bin/groff/grops/Makefile b/gnu/usr.bin/groff/grops/Makefile index 7b68bc18d22c..3716f18484c7 100644 --- a/gnu/usr.bin/groff/grops/Makefile +++ b/gnu/usr.bin/groff/grops/Makefile @@ -4,7 +4,7 @@ PROG= grops SRCS= ps.cc psrm.cc CFLAGS+= -I${.CURDIR}/../include LDADD+= ${LIBDRIVER} ${LIBGROFF} -lm -DPADD+= ${LIBDRIVER} ${LIBGROFF} ${LIBM} +DPADD+= ${LIBDRIVER} ${LIBGROFF} ${LIBMATH} MANDEPEND= grops.1 CLEANFILES+= ${MANDEPEND} diff --git a/gnu/usr.bin/groff/grops/grops.man b/gnu/usr.bin/groff/grops/grops.man index 1f4947ebf863..7a2d0bd90fb8 100644 --- a/gnu/usr.bin/groff/grops/grops.man +++ b/gnu/usr.bin/groff/grops/grops.man @@ -609,7 +609,7 @@ The input to must be in the format output by .BR @g@troff (@MAN1EXT@). This is described in -.BR groff_out (@MAN5EXT@). +.BR groff_out (@MAN1EXT@). In addition the device and font description files for the device used must meet certain requirements. The device and font description files supplied for @@ -808,7 +808,7 @@ Macros to undo the effect of .BI /tmp/grops XXXXXX Temporary file. .SH "SEE ALSO" -.\" .BR afmtodit (@MAN1EXT@), +.BR afmtodit (@MAN1EXT@), .BR groff (@MAN1EXT@), .BR @g@troff (@MAN1EXT@), .BR psbb (@MAN1EXT@), diff --git a/gnu/usr.bin/groff/grotty/Makefile b/gnu/usr.bin/groff/grotty/Makefile index 18bd9ba18bab..d9d1ab287127 100644 --- a/gnu/usr.bin/groff/grotty/Makefile +++ b/gnu/usr.bin/groff/grotty/Makefile @@ -4,7 +4,7 @@ PROG= grotty SRCS= tty.cc CFLAGS+= -I${.CURDIR}/../include LDADD+= ${LIBDRIVER} ${LIBGROFF} -lm -DPADD+= ${LIBDRIVER} ${LIBGROFF} ${LIBM} +DPADD+= ${LIBDRIVER} ${LIBGROFF} ${LIBMATH} MANDEPEND= grotty.1 CLEANFILES+= ${MANDEPEND} diff --git a/gnu/usr.bin/groff/grotty/grotty.man b/gnu/usr.bin/groff/grotty/grotty.man index 9e7d31c90544..6b7e7471dbd3 100644 --- a/gnu/usr.bin/groff/grotty/grotty.man +++ b/gnu/usr.bin/groff/grotty/grotty.man @@ -22,8 +22,7 @@ should invoked by using the .B groff command with a -.BR \-Tascii , -.B \-Tkoi8-r +.B \-Tascii or .B \-Tlatin1 option. @@ -102,8 +101,7 @@ Search the directory for font and device description files; .I name is the name of the device, usually -.BR ascii , -.B koi8-r +.B ascii or .BR latin1 . .TP @@ -152,18 +150,28 @@ characters. Print the version number. .SH FILES .TP -.B @FONTDIR@/dev\fIname\fB/DESC +.B @FONTDIR@/devascii/DESC Device description file for -.I name +.B ascii device. .TP -.BI @FONTDIR@/dev\fIname\fB/ F +.B @FONTDIR@/devascii/ F Font description file for font .I F of -.I name +.B ascii device. +.TP +.B @FONTDIR@/devlatin1/DESC +Device description file for +.B latin1 device. .TP +.B @FONTDIR@/devlatin1/ F +Font description file for font +.I F +of +.B latin1 device. +.TP .B @MACRODIR@/tmac.tty Macros for use with .BR grotty . @@ -192,4 +200,5 @@ cannot be printed. .BR groff_font (@MAN5EXT@), .BR groff_char (@MAN7EXT@), .BR ul (1), -.BR more (1) +.BR more (1), +.BR less (1) diff --git a/gnu/usr.bin/groff/indxbib/Makefile b/gnu/usr.bin/groff/indxbib/Makefile index 0508c6675a4a..be2bb8f2b30a 100644 --- a/gnu/usr.bin/groff/indxbib/Makefile +++ b/gnu/usr.bin/groff/indxbib/Makefile @@ -4,7 +4,7 @@ PROG= indxbib SRCS= indxbib.cc dirnamemax.c signal.c CFLAGS+= -I${.CURDIR}/../include LDADD+= ${LIBBIB} ${LIBGROFF} -lm -DPADD+= ${LIBBIB} ${LIBGROFF} ${LIBM} +DPADD+= ${LIBBIB} ${LIBGROFF} ${LIBMATH} MANDEPEND= indxbib.1 CLEANFILES+= ${MANDEPEND} @@ -14,7 +14,7 @@ CLEANFILES+= ${MANDEPEND} # Sigh... Hardcode it. - jkh # afterinstall: - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/eign \ + install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/eign \ ${DESTDIR}${SHAREDIR}/dict .include "../Makefile.cfg" diff --git a/gnu/usr.bin/groff/libgroff/cmap.cc b/gnu/usr.bin/groff/libgroff/cmap.cc index 7c35253a483c..640f4bfecb05 100644 --- a/gnu/usr.bin/groff/libgroff/cmap.cc +++ b/gnu/usr.bin/groff/libgroff/cmap.cc @@ -19,9 +19,6 @@ with groff; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <ctype.h> -#ifdef __FreeBSD__ -#include <locale.h> -#endif #include "cmap.h" cmap cmlower(CMAP_BUILTIN); @@ -52,9 +49,6 @@ cmap_init::cmap_init() if (initialised) return; initialised = 1; -#ifdef __FreeBSD__ - (void) setlocale(LC_CTYPE, ""); -#endif for (int i = 0; i <= UCHAR_MAX; i++) { cmupper.v[i] = ISASCII(i) && islower(i) ? toupper(i) : i; cmlower.v[i] = ISASCII(i) && isupper(i) ? tolower(i) : i; diff --git a/gnu/usr.bin/groff/libgroff/cset.cc b/gnu/usr.bin/groff/libgroff/cset.cc index c720d1b9eed8..1319aa77edbe 100644 --- a/gnu/usr.bin/groff/libgroff/cset.cc +++ b/gnu/usr.bin/groff/libgroff/cset.cc @@ -19,9 +19,6 @@ with groff; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <ctype.h> -#ifdef __FreeBSD__ -#include <locale.h> -#endif #include "cset.h" cset csalpha(CSET_BUILTIN); @@ -89,9 +86,6 @@ cset_init::cset_init() if (initialised) return; initialised = 1; -#ifdef __FreeBSD__ - (void) setlocale(LC_CTYPE, ""); -#endif for (int i = 0; i <= UCHAR_MAX; i++) { csalpha.v[i] = ISASCII(i) && isalpha(i); csupper.v[i] = ISASCII(i) && isupper(i); diff --git a/gnu/usr.bin/groff/lkbib/Makefile b/gnu/usr.bin/groff/lkbib/Makefile index d00f0f688975..c7e8d2a506ee 100644 --- a/gnu/usr.bin/groff/lkbib/Makefile +++ b/gnu/usr.bin/groff/lkbib/Makefile @@ -4,7 +4,7 @@ PROG= lkbib SRCS= lkbib.cc CFLAGS+= -I${.CURDIR}/../include LDADD+= ${LIBBIB} ${LIBGROFF} -lm -DPADD+= ${LIBBIB} ${LIBGROFF} ${LIBM} +DPADD+= ${LIBBIB} ${LIBGROFF} ${LIBMATH} MANDEPEND= lkbib.1 CLEANFILES+= ${MANDEPEND} diff --git a/gnu/usr.bin/groff/lookbib/Makefile b/gnu/usr.bin/groff/lookbib/Makefile index fb1a65c87f66..dde1c71e2a2b 100644 --- a/gnu/usr.bin/groff/lookbib/Makefile +++ b/gnu/usr.bin/groff/lookbib/Makefile @@ -4,7 +4,7 @@ PROG= lookbib SRCS= lookbib.cc CFLAGS+= -I$(.CURDIR)/../include LDADD+= $(LIBBIB) $(LIBGROFF) -lm -DPADD+= $(LIBBIB) $(LIBGROFF) $(LIBM) +DPADD+= $(LIBBIB) $(LIBGROFF) $(LIBMATH) MANDEPEND= lookbib.1 CLEANFILES+= ${MANDEPEND} diff --git a/gnu/usr.bin/groff/mm/Makefile b/gnu/usr.bin/groff/mm/Makefile index 9023bb85ba21..f2ea0b35639e 100644 --- a/gnu/usr.bin/groff/mm/Makefile +++ b/gnu/usr.bin/groff/mm/Makefile @@ -13,9 +13,9 @@ MANDEPEND= ${MAN7} CLEANFILES+= ${MANDEPEND} afterinstall: - ${INSTALL} -c -o $(TMACOWN) -g $(TMACGRP) -m $(TMACMODE) \ + install -c -o $(TMACOWN) -g $(TMACGRP) -m $(TMACMODE) \ $(.CURDIR)/tmac.m $(DESTDIR)$(TMACDIR)/tmac.m - ${INSTALL} -c -o $(TMACOWN) -g $(TMACGRP) -m $(TMACMODE) \ + install -c -o $(TMACOWN) -g $(TMACGRP) -m $(TMACMODE) \ $(.CURDIR)/tmac.m $(DESTDIR)$(TMACDIR)/tmac.mse test -d $(DESTDIR)$(TMACDIR)/mm || mkdir $(DESTDIR)$(TMACDIR)/mm @@ -23,7 +23,8 @@ afterinstall: chmod 755 $(DESTDIR)$(TMACDIR)/mm for f in $(FILES); do \ - $(INSTALL) -c -o $(TMACOWN) -g $(TMACGRP) -m $(TMACMODE) \ + rm -f $(DESTDIR)$(TMACDIR)/mm/$$f; \ + install -c -o $(TMACOWN) -g $(TMACGRP) -m $(TMACMODE) \ $(.CURDIR)/mm/$$f $(DESTDIR)$(TMACDIR)/mm/$$f; \ done for f in $(LOCALE); do \ diff --git a/gnu/usr.bin/groff/nroff/Makefile b/gnu/usr.bin/groff/nroff/Makefile index 6758dd4b9c57..8998b2daf8ca 100644 --- a/gnu/usr.bin/groff/nroff/Makefile +++ b/gnu/usr.bin/groff/nroff/Makefile @@ -4,9 +4,9 @@ MANDEPEND= nroff.1 CLEANFILES+= ${MANDEPEND} afterinstall: - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ $(.CURDIR)/nroff.sh $(DESTDIR)$(BINDIR)/nroff - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ $(.CURDIR)/psroff.sh $(DESTDIR)$(BINDIR)/psroff .include <../Makefile.cfg> diff --git a/gnu/usr.bin/groff/pic/Makefile b/gnu/usr.bin/groff/pic/Makefile index 5a0e171050e9..90ef8d7bf3eb 100644 --- a/gnu/usr.bin/groff/pic/Makefile +++ b/gnu/usr.bin/groff/pic/Makefile @@ -5,7 +5,7 @@ SRCS= lex.cc main.cc object.cc common.cc troff.cc tex.cc OBJS= pic.o CFLAGS+= -I. -I${.CURDIR}/../include LDADD+= ${LIBGROFF} -lm -DPADD+= ${LIBGROFF} ${LIBM} +DPADD+= ${LIBGROFF} ${LIBMATH} MANDEPEND= pic.1 CLEANFILES+= pic.cc pic.tab.h ${MANDEPEND} diff --git a/gnu/usr.bin/groff/refer/Makefile b/gnu/usr.bin/groff/refer/Makefile index ac8d5f059e53..c82327adf424 100644 --- a/gnu/usr.bin/groff/refer/Makefile +++ b/gnu/usr.bin/groff/refer/Makefile @@ -5,7 +5,7 @@ SRCS= command.cc ref.cc refer.cc token.cc OBJS= label.o CFLAGS+= -I. -I${.CURDIR}/../include LDADD+= ${LIBBIB} ${LIBGROFF} -lm -DPADD+= ${LIBBIB} ${LIBGROFF} ${LIBM} +DPADD+= ${LIBBIB} ${LIBGROFF} ${LIBMATH} MANDEPEND= refer.1 CLEANFILES+= label.cc label.tab.h ${MANDEPEND} diff --git a/gnu/usr.bin/groff/tbl/Makefile b/gnu/usr.bin/groff/tbl/Makefile index bdf9431dc914..c58e90e3f7d1 100644 --- a/gnu/usr.bin/groff/tbl/Makefile +++ b/gnu/usr.bin/groff/tbl/Makefile @@ -4,7 +4,7 @@ PROG= tbl SRCS= main.cc table.cc CFLAGS+= -I${.CURDIR}/../include LDADD+= ${LIBGROFF} -lm -DPADD+= ${LIBGROFF} ${LIBM} +DPADD+= ${LIBGROFF} ${LIBMATH} MANDEPEND= tbl.1 CLEANFILES+= ${MANDEPEND} diff --git a/gnu/usr.bin/groff/tfmtodit/Makefile b/gnu/usr.bin/groff/tfmtodit/Makefile index 541398642ab4..d75c12f6ea33 100644 --- a/gnu/usr.bin/groff/tfmtodit/Makefile +++ b/gnu/usr.bin/groff/tfmtodit/Makefile @@ -4,7 +4,7 @@ PROG= tfmtodit SRCS= tfmtodit.cc CFLAGS+= -I${.CURDIR}/../include LDADD+= ${LIBGROFF} -lm -DPADD+= ${LIBGROFF} ${LIBM} +DPADD+= ${LIBGROFF} ${LIBMATH} MANDEPEND= tfmtodit.1 CLEANFILES+= ${MANDEPEND} diff --git a/gnu/usr.bin/groff/tmac/Makefile b/gnu/usr.bin/groff/tmac/Makefile index c4b310ea3f0e..2c88f3b856cb 100644 --- a/gnu/usr.bin/groff/tmac/Makefile +++ b/gnu/usr.bin/groff/tmac/Makefile @@ -6,8 +6,8 @@ TMACMODE?= 444 TMACDIR?= /usr/share/tmac MDOCDIR?= ${TMACDIR}/mdoc -MAN7= groff_ms.7 me.7 -MLINKS= groff_ms.7 ms.7 me.7 groff_me.7 +MAN7= groff_ms.7 me.7 +MLINKS= groff_ms.7 ms.7 LINKS= ${TMACDIR}/tmac.andoc ${TMACDIR}/tmac.an MANDEPEND= ${MAN7} @@ -22,26 +22,26 @@ MDOCFILES= doc-common doc-ditroff doc-nroff doc-syms beforeinstall: for f in ${FILES}; do \ - ${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ + install -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ ${.CURDIR}/$$f ${DESTDIR}${TMACDIR}; \ done sed -f ${.CURDIR}/strip.sed ${.CURDIR}/tmac.an >tmac.groff_an - ${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ + install -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ tmac.groff_an ${DESTDIR}${TMACDIR} for f in ${STRIPFILES}; do \ rm -f temp; \ sed -f ${.CURDIR}/strip.sed ${.CURDIR}/$$f >temp; \ - ${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ + install -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ temp ${DESTDIR}${TMACDIR}/$$f; \ done for f in ${MDOCFILES}; do \ rm -f temp; \ sed -f ${.CURDIR}/strip.sed ${.CURDIR}/$$f >temp; \ - ${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ + install -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ temp ${DESTDIR}${MDOCDIR}/$$f; \ done test -f ${DESTDIR}${TMACDIR}/man.local || \ - ${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ + install -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ ${.CURDIR}/man.local ${DESTDIR}${TMACDIR} .include "../Makefile.cfg" diff --git a/gnu/usr.bin/groff/tmac/tmac.doc.old b/gnu/usr.bin/groff/tmac/tmac.doc.old index df44cc3c8fcd..51a0ec0053a5 100644 --- a/gnu/usr.bin/groff/tmac/tmac.doc.old +++ b/gnu/usr.bin/groff/tmac/tmac.doc.old @@ -315,9 +315,9 @@ . if "\\$3"" \{\ . \" Volume Title if none given . if \\$2>=1 .if \\$2<=8 \{\ -. ds vT FreeBSD Reference Manual -. if \\$2>1 .if \\$2<6 .ds vT FreeBSD Programmer's Manual -. if "\\$2"8" .ds vT FreeBSD System Manager's Manual +. ds vT UNIX Reference Manual +. if \\$2>1 .if \\$2<6 .ds vT UNIX Programmer's Manual +. if "\\$2"8" .ds vT UNIX System Manager's Manual . \} . if "\\$2"unass" .ds vT DRAFT . if "\\$2"draft" .ds vT DRAFT diff --git a/gnu/usr.bin/groff/troff/Makefile b/gnu/usr.bin/groff/troff/Makefile index f51d93afc23e..61a237c8eccc 100644 --- a/gnu/usr.bin/groff/troff/Makefile +++ b/gnu/usr.bin/groff/troff/Makefile @@ -3,7 +3,7 @@ SRCS= env.cc node.cc input.cc div.cc symbol.cc dictionary.cc reg.cc \ number.cc majorminor.cc CFLAGS+= -I${.CURDIR}/../include LDADD+= ${LIBGROFF} -lm -DPADD+= ${LIBGROFF} ${LIBM} +DPADD+= ${LIBGROFF} ${LIBMATH} MANDEPEND= troff.1 CLEANFILES+= majorminor.cc ${MANDEPEND} @@ -17,9 +17,9 @@ majorminor.cc: ${.CURDIR}/../VERSION \"`sed -e 's/^[^.]*\.\([0-9]*\).*$$/\1/' ${.CURDIR}/../VERSION`\"\; >>$@ afterinstall: - ${INSTALL} -c -o bin -g bin -m 444 ${.CURDIR}/hyphen.us \ + install -c -o bin -g bin -m 444 ${.CURDIR}/hyphen.us \ ${DESTDIR}${tmacdir}/hyphen.us - ${INSTALL} -c -o bin -g bin -m 444 ${.CURDIR}/hyphen.us-ru \ + install -c -o bin -g bin -m 444 ${.CURDIR}/hyphen.us-ru \ ${DESTDIR}${tmacdir}/hyphen.us-ru .include "../Makefile.cfg" diff --git a/gnu/usr.bin/groff/xditview/Makefile b/gnu/usr.bin/groff/xditview/Makefile index b3453e5603d6..66d93178b668 100644 --- a/gnu/usr.bin/groff/xditview/Makefile +++ b/gnu/usr.bin/groff/xditview/Makefile @@ -15,14 +15,13 @@ CFLAGS+= -I${X11BASE}/include -DFONTPATH=\"$(fontpath)\" SRCS+= xditview.c Dvi.c draw.c font.c lex.c page.c parse.c \ XFontName.c DviChar.c device.c LDDESTDIR+= -L${X11BASE}/lib -LDADD+= -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -lm +LDADD+= -lXaw -lXmu -lXt -lXext -lX11 -lm DPADD+= ${X11BASE}/lib/libXaw.a ${X11BASE}/lib/libXmu.a \ - ${X11BASE}/lib/libXt.a ${X11BASE}/lib/libSM.a \ - ${X11BASE}/lib/libICE.a ${X11BASE}/lib/libXext.a \ + ${X11BASE}/lib/libXt.a ${X11BASE}/lib/libXext.a \ ${X11BASE}/lib/libX11.a afterinstall: - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ + install -c -o ${BINOWN} -g ${BINGRP} -m 444 \ ${.CURDIR}/GXditview.ad \ ${DESTDIR}${X11BASE}/lib/X11/app-defaults/GXditview .endif diff --git a/gnu/usr.bin/gzip/Makefile b/gnu/usr.bin/gzip/Makefile index a646372be7a3..e6f86523e47e 100644 --- a/gnu/usr.bin/gzip/Makefile +++ b/gnu/usr.bin/gzip/Makefile @@ -1,24 +1,18 @@ # @(#)Makefile 5.3 (Berkeley) 5/12/90 -# $Id$ PROG= gzip SRCS= gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c \ crypt.c lzw.c unlzw.c unlzh.c unpack.c getopt.c match.S -MAN1= gzexe.1 gzip.1 zdiff.1 zforce.1 zmore.1 znew.1 zgrep.1 +MAN1= gzexe.1 gzip.1 zdiff.1 zforce.1 zmore.1 znew.1 CFLAGS+=-DASMV -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1 MLINKS= gzip.1 gunzip.1 gzip.1 zcat.1 gzip.1 gzcat.1 -MLINKS+= zgrep.1 zfgrep.1 zgrep.1 zegrep.1 -MLINKS+= zdiff.1 zcmp.1 LINKS+= ${BINDIR}/gzip ${BINDIR}/gunzip LINKS+= ${BINDIR}/gzip ${BINDIR}/gzcat LINKS+= ${BINDIR}/gzip ${BINDIR}/zcat -LINKS+= ${BINDIR}/zgrep ${BINDIR}/zegrep -LINKS+= ${BINDIR}/zgrep ${BINDIR}/zfgrep -LINKS+= ${BINDIR}/zdiff ${BINDIR}/zcmp NOSHARED=yes -beforeinstall: - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ +afterinstall: + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${.CURDIR}/zforce ${.CURDIR}/gzexe ${.CURDIR}/znew \ ${.CURDIR}/zmore ${.CURDIR}/zdiff ${.CURDIR}/zgrep \ ${DESTDIR}${BINDIR} @@ -26,7 +20,7 @@ beforeinstall: match.o: ${.CURDIR}/match.S $(CPP) ${.CURDIR}/match.S >_match.s $(CC) -c _match.s - mv -f _match.o match.o + mv _match.o match.o rm -f _match.s .include <bsd.prog.mk> diff --git a/gnu/usr.bin/gzip/gzip.1 b/gnu/usr.bin/gzip/gzip.1 index 5304d30b44ea..084dffd5e123 100644 --- a/gnu/usr.bin/gzip/gzip.1 +++ b/gnu/usr.bin/gzip/gzip.1 @@ -367,7 +367,8 @@ explicit command line parameters. For example: On Vax/VMS, the name of the environment variable is GZIP_OPT, to avoid a conflict with the symbol set for invocation of the program. .SH "SEE ALSO" -znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), compress(1) +znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1), +pack(1), compact(1) .SH "DIAGNOSTICS" Exit status is normally 0; if an error occurs, exit status is 1. If a warning occurs, exit status is 2. diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c index 2500143c3d34..1a04825659eb 100644 --- a/gnu/usr.bin/ld/ld.c +++ b/gnu/usr.bin/ld/ld.c @@ -3593,17 +3593,6 @@ write_file_syms(entry, syms_written_addr) if (!(lsp->flags & LS_WRITE)) continue; - if (discard_locals == DISCARD_ALL || - discard_locals == DISCARD_L && lsp->flags & LS_L_SYMBOL) { - /* - * The user wants to discard this symbol, but it - * is referenced by a relocation. We can still - * save some file space by suppressing the unique - * renaming of the symbol. - */ - lsp->flags &= ~LS_RENAME; - } - if (p->n_un.n_strx == 0) name = NULL; else if (!(lsp->flags & LS_RENAME)) diff --git a/gnu/usr.bin/ld/rtld/Makefile b/gnu/usr.bin/ld/rtld/Makefile index 5a0d03c4fe72..b5c26468623f 100644 --- a/gnu/usr.bin/ld/rtld/Makefile +++ b/gnu/usr.bin/ld/rtld/Makefile @@ -26,8 +26,8 @@ realinstall: : -chflags noschg ${DESTDIR}${BINDIR}/${PROG} -ln -f ${DESTDIR}${BINDIR}/${PROG} ${DESTDIR}${BINDIR}/${PROG}.old - mv -f ${DESTDIR}${BINDIR}/${PROG}.new ${DESTDIR}${BINDIR}/${PROG} + mv ${DESTDIR}${BINDIR}/${PROG}.new ${DESTDIR}${BINDIR}/${PROG} chflags schg ${DESTDIR}${BINDIR}/${PROG} - -rm -f ${DESTDIR}${BINDIR}/${PROG}.old + -rm ${DESTDIR}${BINDIR}/${PROG}.old .include <bsd.prog.mk> diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c index 666c10a3772b..f3ceee150d15 100644 --- a/gnu/usr.bin/ld/rtld/rtld.c +++ b/gnu/usr.bin/ld/rtld/rtld.c @@ -88,8 +88,6 @@ struct somap_private { struct so_map *spd_parent; struct so_list *spd_children; struct so_map *spd_prev; - dev_t spd_dev; - ino_t spd_ino; int spd_refcount; int spd_flags; #define RTLD_MAIN 0x01 @@ -493,41 +491,17 @@ map_object(path, sodp, parent) struct so_map *parent; { struct so_map *smp; - struct stat statbuf; if(path == NULL) /* Special case for the main program itself */ smp = link_map_head; else { - /* - * Check whether the shared object is already mapped. - * We check first for an exact match by pathname. That - * will detect the usual case. If no match is found by - * pathname, then stat the file, and check for a match by - * device and inode. That will detect the less common case - * involving multiple links to the same library. - */ + /* Check whether the shared object is already mapped */ for(smp = link_map_head; smp != NULL; smp = smp->som_next) { if(!(LM_PRIVATE(smp)->spd_flags & (RTLD_MAIN|RTLD_RTLD)) && smp->som_path != NULL && strcmp(smp->som_path, path) == 0) break; } - if(smp == NULL) { /* Check for a match by device and inode */ - if (stat(path, &statbuf) == -1) { - generror ("cannot stat \"%s\" : %s", - path, strerror(errno)); - return NULL; - } - for (smp = link_map_head; smp != NULL; - smp = smp->som_next) { - struct somap_private *smpp = LM_PRIVATE(smp); - - if (!(smpp->spd_flags & (RTLD_MAIN | RTLD_RTLD)) - && smpp->spd_ino == statbuf.st_ino - && smpp->spd_dev == statbuf.st_dev) - break; - } - } } if (smp == NULL) { /* We must map the object */ @@ -615,14 +589,6 @@ map_object(path, sodp, parent) smpp->a_text = hdr.a_text; smpp->a_data = hdr.a_data; smpp->a_bss = hdr.a_bss; - - /* - * Save the device and inode, so we can detect multiple links - * to the same library. Note, if we reach this point, then - * statbuf is guaranteed to have been filled in. - */ - smpp->spd_dev = statbuf.st_dev; - smpp->spd_ino = statbuf.st_ino; } LM_PRIVATE(smp)->spd_refcount++; diff --git a/gnu/usr.bin/man/Makefile b/gnu/usr.bin/man/Makefile index 2529d8dbd491..9e5955885307 100644 --- a/gnu/usr.bin/man/Makefile +++ b/gnu/usr.bin/man/Makefile @@ -5,6 +5,6 @@ # distribution. # -SUBDIR = lib man manpath apropos makewhatis catman +SUBDIR = lib man manpath apropos whatis makewhatis catman .include <bsd.subdir.mk> diff --git a/gnu/usr.bin/man/apropos/Makefile b/gnu/usr.bin/man/apropos/Makefile index 25dd83046268..f1a2b0566f3b 100644 --- a/gnu/usr.bin/man/apropos/Makefile +++ b/gnu/usr.bin/man/apropos/Makefile @@ -1,9 +1,44 @@ # $Id: Makefile,v 1.8 1994/08/28 18:33:42 bde Exp $ -SHPROG= apropos +.if exists(${.CURDIR}/obj) +MAN1= ${.CURDIR}/obj/apropos.1 +TARG= ${.CURDIR}/obj/apropos +.else +MAN1= ${.CURDIR}/apropos.1 +TARG= ${.CURDIR}/apropos +.endif -MLINKS= apropos.1 whatis.1 -LINKS= ${BINDIR}/apropos ${BINDIR}/whatis +MANDEPEND= ${MAN1} -.include "../../Makefile.inc" -.include "../Makefile.shprog" +CLEANFILES+= ${TARG} ${MAN1} + +all: ${TARG} ${MAN1} + +depend rcsfreeze tags all: + @echo -n + +${TARG}: ${.CURDIR}/apropos.sh + sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \ + -e 's,%pager%,${pager},' \ + ${.CURDIR}/apropos.sh > ${.TARGET} + +${MAN1}: ${.CURDIR}/apropos.man + sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \ + -e 's,%pager%,${pager},' -e 's,%troff%,${troff},' \ + -e 's,%manpath_config_file%,${manpath_config_file},' \ + ${.CURDIR}/apropos.man > ${.TARGET} + +install: ${TARG} maninstall + install -c -o bin -g bin -m 555 ${TARG} ${DESTDIR}/usr/bin + +.include "../Makefile.inc" + +.if make(maninstall) || make(install) +.if !defined(NOMAN) +.include <bsd.man.mk> +.elif !target(maninstall) +maninstall: +.endif +.endif + +.include <bsd.prog.mk> diff --git a/gnu/usr.bin/man/apropos/apropos.man b/gnu/usr.bin/man/apropos/apropos.man index 62b7d7a9d044..3bb3e17d617e 100644 --- a/gnu/usr.bin/man/apropos/apropos.man +++ b/gnu/usr.bin/man/apropos/apropos.man @@ -1,4 +1,4 @@ -.\" Man page for apropos an whatis +.\" Man page for apropos .\" .\" Copyright (c) 1990, 1991, John W. Eaton. .\" @@ -15,19 +15,13 @@ .TH apropos 1 "Jan 15, 1991" .LO 1 .SH NAME -apropos, whatis \- search the whatis database +apropos \- search the whatis database for strings .SH SYNOPSIS .BI apropos keyword ... - -.BI whatis -keyword ... .SH DESCRIPTION -.B apropos -searches a set of database files containing short descriptions +apropos searches a set of database files containing short descriptions of system commands for keywords and displays the result on the standard output. -.B whatis -display only complete word matches. .SH "SEE ALSO" -man(1), makewhatis(1). +whatis(1), man(1). diff --git a/gnu/usr.bin/man/apropos/apropos.sh b/gnu/usr.bin/man/apropos/apropos.sh index 91b77c2530f0..070b8481c1ed 100644 --- a/gnu/usr.bin/man/apropos/apropos.sh +++ b/gnu/usr.bin/man/apropos/apropos.sh @@ -13,64 +13,52 @@ # Department of Chemical Engineering # The University of Texas at Austin # Austin, Texas 78712 -# -# rewritten by Wolfram Schneider, Berlin, Feb 1996 -# -# $Id$ - -PATH=/bin:/usr/bin:$PATH -db=whatis # name of whatis data base -grepopt='' +PATH=/usr/local/bin:/bin:/usr/ucb:/usr/bin -# argument test -case $# in 0) - echo "usage: `basename $0` keyword ..." >&2 - exit 1 - ;; -esac +libdir=%libdir% -case "$0" in - *whatis) grepopt='-w';; # run as whatis(1) - *) grepopt='';; # otherwise run as apropos(1) -esac +if [ $# = 0 ] +then + echo "usage: `basename $0` keyword ..." + exit 1 +fi -# test manpath manpath=`%bindir%/manpath -q | tr : '\040'` -case X"$manpath" in X) - echo "`basename $0`: manpath is null, use \"/usr/share/man\"" >&2 - manpath=/usr/share/man - ;; -esac +if [ "$manpath" = "" ] +then + echo "whatis: manpath is null" + exit 1 +fi -# reset $PAGER if $PAGER is empty -case X"$PAGER" in X) - PAGER="%pager%" - ;; -esac +if [ "$PAGER" = "" ] +then + PAGER="%pager%" +fi -# search for existing */whatis databases -mandir='' -for d in $manpath +while [ $1 ] do - if [ -f "$d/$db" -a -r "$d/$db" ] - then - mandir="$mandir $d/$db" - fi -done + found=0 + for d in $manpath /usr/lib + do + if [ -f $d/whatis ] + then + grep -i "$1" $d/whatis + status=$? + if [ "$status" = "0" ] + then + found=1 + fi + fi + done -case X"$mandir" in X) - echo "`basename $0`: no whatis databases in $manpath" >&2 - exit 1 -esac + if [ "$found" = "0" ] + then + echo "$1: nothing appropriate" + fi - -for manpage -do - if grep -hi $grepopt "$manpage" $mandir; then : - else - echo "$manpage: nothing appropriate" - fi + shift done | $PAGER +exit diff --git a/gnu/usr.bin/man/catman/catman.1 b/gnu/usr.bin/man/catman/catman.1 index 1ac287b06589..9731974d77e5 100644 --- a/gnu/usr.bin/man/catman/catman.1 +++ b/gnu/usr.bin/man/catman/catman.1 @@ -125,13 +125,6 @@ or .Sh FEATURES Very fast if all man pages already formatted. -Does not support the -.Fl w -option as some other systems do. Use -.Xr makewhatis 1 -to rebuild the -.Ql whatis -database. .Sh BUGS .Xr man 1 is a setuid program. Be careful that user diff --git a/gnu/usr.bin/man/catman/catman.perl b/gnu/usr.bin/man/catman/catman.perl index d0723290f1ff..cc6dc7628d6d 100644 --- a/gnu/usr.bin/man/catman/catman.perl +++ b/gnu/usr.bin/man/catman/catman.perl @@ -237,7 +237,7 @@ sub parse_subdir { next if $file eq "." || $file eq ".."; # fo_09-o.bar0 - if ($file !~ /^[\w\-\+\[\.]+\.\w+$/) { + if ($file !~ /^[\w\-\[\.]+\.\w+$/) { &garbage("$mandir/$file", "Assume garbage") unless -d "$mandir/$file"; next; @@ -294,7 +294,7 @@ sub parse_subdir { foreach $file (readdir(D)) { next if $file =~ /^(\.|\.\.)$/; # skip current and parent directory - if ($file !~ /^[\w\-\+\[\.]+\.\w+$/) { + if ($file !~ /^[\w\-\[\.]+\.\w+$/) { &garbage("$catdir/$file", "Assume garbage") unless -d "$catdir/$file"; next; diff --git a/gnu/usr.bin/man/lib/config.h_dist b/gnu/usr.bin/man/lib/config.h_dist index 4900c4d4a050..3438e6f0082a 100644 --- a/gnu/usr.bin/man/lib/config.h_dist +++ b/gnu/usr.bin/man/lib/config.h_dist @@ -170,7 +170,7 @@ #ifndef MANPATH_MAIN static char *std_sections[] = { - "1", "n", "l", "6", "8", "2", "3", "4", "5", "7", "9", "p", "o", NULL + "1", "n", "l", "6", "8", "2", "3", "4", "5", "7", "p", "o", NULL }; #endif diff --git a/gnu/usr.bin/man/makewhatis/Makefile b/gnu/usr.bin/man/makewhatis/Makefile index 7849d739de10..644a3a59b6ed 100644 --- a/gnu/usr.bin/man/makewhatis/Makefile +++ b/gnu/usr.bin/man/makewhatis/Makefile @@ -1,16 +1,7 @@ MAN1= makewhatis.1 -MAN8= makewhatis.local.8 -MLINKS= makewhatis.local.8 catman.local.8 - -libexecdir=/usr/libexec -LINKS=${libexecdir}/makewhatis.local ${libexecdir}/catman.local beforeinstall: ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${.CURDIR}/makewhatis.perl ${DESTDIR}${BINDIR}/makewhatis - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ - ${.CURDIR}/makewhatis.local.sh \ - ${DESTDIR}${libexecdir}/makewhatis.local - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/man/makewhatis/makewhatis.1 b/gnu/usr.bin/man/makewhatis/makewhatis.1 index 71f69eb434fb..ec48e1a534cc 100644 --- a/gnu/usr.bin/man/makewhatis/makewhatis.1 +++ b/gnu/usr.bin/man/makewhatis/makewhatis.1 @@ -1,5 +1,5 @@ .\" -.\" (c) Copyright 1995 Wolfram Schneider, Berlin. All rights reserved. +.\" (c) Copyright 1995 Wolfram Schneider. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -41,27 +41,26 @@ .Nd create whatis database .Sh SYNOPSIS -.Nm -.Op Fl a | Fl append -.Op Fl h | Fl help +.Nm makewhatis .Op Fl i | Fl indent Ar column .Op Fl n | Fl name Ar name .Op Fl o | Fl outfile Ar file .Op Fl v | Fl verbose +.Op Fl h | Fl help .Op Ar directories ... .Sh DESCRIPTION -.Nm +.Nm Makewhatis extracts the name and a short description from unformatted manpages and creates the .Xr whatis 1 database. -.Nm +.Nm Makewhatis can read gzip'ed manpages. .Ar Directory names a directory containing manpage subdirectories -.Pq named Pa man.+ . +.Pq named Pa man[0-8] . Colons are treated as spaces, hence .Ic makewhatis $MANPATH or @@ -70,31 +69,8 @@ are allowed. .Sh OPTIONS .Bl -tag -width Ds -.It Fl a , Fl append -Append mode. Don't delete old entries in whatis database. Note: -the new database will be sorted without repeated lines and -.Nm -does not check if old entries are valid. - .It Fl h , Fl help Print options and exit. - -.It Fl i , Fl indent Ar column -Justify description strings to -.Ar column Pq default 24 . - -.It Fl n , Fl name Ar name -Use -.Ar name -instead of -.Pa whatis Ns . - -.It Fl o , Fl outfile Ar file -Write all output to -.Ar file -instead of -.Pa dirname/whatis Ns . - .It Fl v, Fl verbose Issue more warnings .Pq to stderr . @@ -105,8 +81,22 @@ for an uncompressed page, for a compressed page, and .Ql + for a link. -.El +.It Fl i , Fl indent Ar column +Justify description strings to +.Ar column Pq default 24 . + +.It Fl o , Fl outfile Ar file +Write all output to +.Ar file +instead of +.Pa dirname/whatis Ns . + +.It Fl n , Fl name Ar name +Use +.Ar name +instead of +.Pa whatis Ns . .Sh EXAMPLES .Pp @@ -118,7 +108,8 @@ Create whatis database for all directories in your .Ic makewhatis -outfile /tmp/mywhatis /usr/local/man $HOME/man .Pp Create whatis database -.Pa /tmp/mywhatis . +.Pa /tmp/mywhatis +\&. Traverse directories .Pa /usr/local/man and @@ -142,19 +133,16 @@ May be useful for Solaris. whatis database .It Pa /etc/weekly run -.Nm makewhatis.local +.Nm every week .El .Sh SEE ALSO -.Xr apropos 1 , -.Xr catman 1 , -.Xr sort 1 , -.Xr makewhatis.local 1 , .Xr man 1 , +.Xr whatis 1 , +.Xr apropos 1 , .Xr manpath 1 , -.Xr uniq 1 , -.Xr whatis 1 . +.Xr catman 1 . .Sh HISTORY This @@ -162,5 +150,6 @@ This command appeared in FreeBSD 2.1. .Sh AUTHOR -Wolfram Schneider, Berlin. - +Wolfram Schneider +.Aq wosch@cs.tu-berlin.de , +Germany diff --git a/gnu/usr.bin/man/makewhatis/makewhatis.perl b/gnu/usr.bin/man/makewhatis/makewhatis.perl index e6a7748d0eba..c0fa966bb931 100644 --- a/gnu/usr.bin/man/makewhatis/makewhatis.perl +++ b/gnu/usr.bin/man/makewhatis/makewhatis.perl @@ -61,38 +61,14 @@ sub open_output { } $tmp = $whatisdb; # for signals + if (!open(A, "> $whatisdb")) { + die "$whatisdb: $!\n" if $outfile; - # Array of all entries - @a = (); - - - # Append mode - if ($append) { - local($file) = $whatisdb; - $file =~ s/\.tmp$// if !$outfile; - - if (open(A, "$file")) { - warn "Open $file for append mode\n" if $verbose; - while(<A>) { - push(@a, $_); - } - close A; - } - - else { - warn "$whatisdb: $!\n" if lstat($file) && $verbose; # - } - undef $file; + warn "$whatisdb: $!\n"; $err++; return 0; } - + @a = (); warn "Open $whatisdb\n" if $verbose; - if (!open(A, "> $whatisdb")) { - die "$whatisdb: $!\n" if $outfile; - - warn "$whatisdb: $!\n"; $err++; return 0; - } - select A; return 1; } @@ -107,21 +83,21 @@ sub close_output { if ($success) { # success # uniq + @b = (); warn "\n" if $verbose && $pointflag; warn "sort -u > $whatisdb\n" if $verbose; foreach $i (sort @a) { if ($i ne $last) { push(@b, $i); + $counter++; } $last =$i; } - - $counter = $#b + 1; print @b; close A; select STDOUT; if (!$outfile) { + rename($whatisdb, $w); warn "Rename $whatisdb to $w\n" if $verbose; - rename($whatisdb, $w) || warn "rename $whatisdb $w\n"; $counter_all += $counter; warn "$counter entries in $w\n" if $verbose; } else { @@ -244,9 +220,8 @@ sub ext { sub name { local($name) = @_; - $name =~ s=.*/==; - $name =~ s=$ext$==o; - $name =~ s=\.[^\.]+$==; + $name =~ s/.*\///g; + $name =~ s/\.[^.]*$//; return "$name"; } @@ -275,9 +250,6 @@ sub out { $man =~ s/[,. ]+$//; $man =~ s/,/($extension),/g; $man .= "($extension)"; - - &manpagename; - $desc =~ s/^[ \t]+//; for($i = length($man); $i < $indent && $desc; $i++) { @@ -290,33 +262,6 @@ sub out { } } -# The filename of manual page is not a keyword. -# This is bad, because you don't find the manpage -# whith: $ man <section> <keyword> -# -# Add filename if a) filename is not a keyword and b) no keyword(s) -# exist as file in same mansection -# -sub manpagename { - foreach (split(/,\s+/, $man)) { - s/\(.+//; - # filename is keyword - return if $name eq $_; - } - - local($f) = $file; $f =~ s%/*[^/]+$%%; # dirname - local($e) = $file; $e =~ s/$ext$//; $e =~ s%.*(\.[^.]+)$%$1%; # .1 - - foreach (split(/,\s+/, $man)) { - s/\(.+//; - - # a keyword exist as file - return if -e "$f/$_$e" || -e "$f/$_$e$ext"; - } - - $man = "$name($extension), $man"; -} - # looking for NAME sub manual { local($file) = @_; @@ -435,12 +380,11 @@ sub variables { $indent = 24; # indent for description $outfile = 0; # Don't write to ./whatis $whatis_name = "whatis"; # Default name for DB - $append = 0; # Don't delete old entries # if no argument for directories given @defaultmanpath = ( '/usr/share/man' ); - $ext = '.gz'; # extension + $ext = ".gz"; # extension umask(022); $err = 0; # exit code @@ -478,7 +422,6 @@ sub parse { elsif (/^--?(o|outfile)$/) { $outfile = $argv[0]; shift @argv } elsif (/^--?(f|format|i|indent)$/) { $i = $argv[0]; shift @argv } elsif (/^--?(n|name)$/) { $whatis_name = $argv[0];shift @argv } - elsif (/^--?(a|append)$/) { $append = 1 } else { &usage } } diff --git a/gnu/usr.bin/man/man/Makefile b/gnu/usr.bin/man/man/Makefile index 1807455e219d..5eafd803f00e 100644 --- a/gnu/usr.bin/man/man/Makefile +++ b/gnu/usr.bin/man/man/Makefile @@ -18,10 +18,8 @@ DPADD+= ${MAN1} CFLAGS+= -I${.CURDIR}/../lib -DSTDC_HEADERS -DPOSIX -DHAS_TROFF CFLAGS+= -DDO_COMPRESS -DALT_SYSTEMS -DSETREUID -DCATMODE=0664 CLEANFILES+= ${MAN1} -MANDEPEND+= ${MAN1} ${MAN1}: ${.CURDIR}/man.man - @${ECHO} echo Making ${.TARGET:T} from ${.ALLSRC:T}; \ sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \ -e 's,%pager%,${pager},' -e 's,%troff%,${troff},' \ -e 's,%manpath_config_file%,${manpath_config_file},' \ diff --git a/gnu/usr.bin/man/man/man.man b/gnu/usr.bin/man/man/man.man index 7556c58d3074..bddfc028b7f7 100644 --- a/gnu/usr.bin/man/man/man.man +++ b/gnu/usr.bin/man/man/man.man @@ -127,7 +127,7 @@ the man page. By default, .B %pager% is used. .SH "SEE ALSO" -apropos(1), whatis(1), manpath(1), more(1), groff(1). +apropos(1), whatis(1), manpath(1), less(1), groff(1). .SH BUGS The .B \-t diff --git a/gnu/usr.bin/man/manpath/Makefile b/gnu/usr.bin/man/manpath/Makefile index 6633d6c1bd04..970f442a58f3 100644 --- a/gnu/usr.bin/man/manpath/Makefile +++ b/gnu/usr.bin/man/manpath/Makefile @@ -17,17 +17,14 @@ DPADD+= ${MAN1} CFLAGS+= -DMAIN -DSTDC_HEADERS -DPOSIX -DHAS_TROFF -DDO_UNCOMPRESS CFLAGS+= -DALT_SYSTEMS -I${.CURDIR}/../lib -I${.CURDIR}/../lib/obj CLEANFILES+= ${MAN1} -MANDEPEND+= ${MAN1} ${MAN1}: ${.CURDIR}/manpath.man - @${ECHO} Making ${.TARGET:T} from ${.ALLSRC:T}; \ sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \ -e 's,%pager%,${pager},' -e 's,%troff%,${troff},' \ -e 's,%manpath_config_file%,${manpath_config_file},' \ ${.CURDIR}/manpath.man > ${MAN1} afterinstall: - ${INSTALL} -c -o bin -g bin -m 644 ${.CURDIR}/manpath.config \ - ${DESTDIR}${manpath_config_file}.sample + install -c -o bin -g bin -m 644 ${.CURDIR}/manpath.config ${DESTDIR}${manpath_config_file}.sample .include <bsd.prog.mk> diff --git a/gnu/usr.bin/man/manpath/manpath.config b/gnu/usr.bin/man/manpath/manpath.config index 91aac298531e..b43c7a6aee27 100644 --- a/gnu/usr.bin/man/manpath/manpath.config +++ b/gnu/usr.bin/man/manpath/manpath.config @@ -16,7 +16,7 @@ # MANDATORY_MANPATH /usr/share/man MANDATORY_MANPATH /usr/local/man -#MANDATORY_MANPATH /usr/X386/man +MANDATORY_MANPATH /usr/X386/man MANDATORY_MANPATH /usr/X11R6/man # # set up PATH to MANPATH mapping diff --git a/gnu/usr.bin/mkisofs/ChangeLog b/gnu/usr.bin/mkisofs/ChangeLog index 8dc41be1ffc9..b31a554e7d31 100644 --- a/gnu/usr.bin/mkisofs/ChangeLog +++ b/gnu/usr.bin/mkisofs/ChangeLog @@ -1,39 +1,4 @@ -Sun Feb 26 01:52:06 1995 Eric Youngdale (eric@largo) - - * Add patches from Ross Biro to allow you to merge arbitrary - trees into the image. This is not compiled in by default but - you need to add -DADD_FILES when compiling. - -Fri Feb 17 02:29:03 1995 Paul Eggert <eggert@twinsun.com> - - * tree.c: Port to Solaris 2.4. Prefer <sys/mkdev.h> if - HASMKDEV. Cast unknown integer types to unsigned long and - print them with %lu or %lx. - -Thu Jan 26 15:25:00 1995 H. Peter Anvin (hpa@yggdrasil.com) - - * mkisofs.c: Substitute underscore for leading dot in non-Rock - Ridge filenames, since MS-DOS cannot read files whose names - begin with a period. - -Mon Jan 16 18:31:41 1995 Eric Youngdale (eric@aib.com) - - * rock.c (generate_rock_ridge_attributes): Only use ROOT - record for symlinks if we are at the start of the symlink. - Otherwise just generate an empty entry. - -Mon Jan 16 16:19:50 1995 Eric Youngdale (eric@aib.com) - - * diag/isodump.c: Use isonum_733 instead of trying to dereference - pointers when trying to decode 733 numbers in the iso9660 image. - - * diag/isovfy.c: Likewise. - - * write.c: Always assign an extent number, even for zero length - files. A zero length file with a NULL extent is apparently dropped - by many readers. - -Wed Jan 11 13:46:50 1995 Eric Youngdale (eric@aib.com) +Wed Jan 11 13:46:50 1995 Eric Youngdale (eric@localhost) * mkisofs.c: Modify extension record to conform to IEEE P1282 specifications. This is commented out right now, but a trivial diff --git a/gnu/usr.bin/mkisofs/Makefile.in b/gnu/usr.bin/mkisofs/Makefile.in index dceb17c2c483..dd0d318acc5f 100644 --- a/gnu/usr.bin/mkisofs/Makefile.in +++ b/gnu/usr.bin/mkisofs/Makefile.in @@ -43,9 +43,7 @@ mkisofs.o: mkisofs.c iso9660.h mkisofs.h exclude.h clean: /bin/rm -f *.o core mkisofs *~ #*# - (cd diag/; make clean) - (cd cdwrite/; make clean) dist: - tar -cvf - README Configure Makefile.in make.com TODO COPYING ChangeLog *.8 *.c *.h diag cdwrite.old cdwrite-1.5 | gzip > mkisofs-1.04.tar.gz + tar -cvf - README Configure Makefile.in make.com TODO COPYING ChangeLog *.8 *.c *.h diag | gzip > mkisofs-1.02.tar.gz diff --git a/gnu/usr.bin/mkisofs/README b/gnu/usr.bin/mkisofs/README index f2f415f66215..f71e2d7ff7c8 100644 --- a/gnu/usr.bin/mkisofs/README +++ b/gnu/usr.bin/mkisofs/README @@ -1,8 +1,3 @@ -Note: - There is a feature which can be optionally compiled into -mkisofs that allows you to merge arbitrary directory trees into the -image you are creating. You need to compile with -DADD_FILES for my -changes to take effect. Thanks to Ross Biro biro@yggdrasil.com. This program requires a lot of virtual memory to run since it builds all of the directories in memory. The exact requirements @@ -10,9 +5,6 @@ depend upon a lot of things, but for Rock Ridge discs 12Mb would not be unreasonable. Without RockRidge and without the translation tables, the requirements would be considerably less. - The cdwrite utility is maintained separately from mkisofs by -yggdrasil.com. It is enclosed here as a convenience, since the two programs -are often useful together. ***************************** Notes for version 1.2. diff --git a/gnu/usr.bin/mkisofs/defaults.h b/gnu/usr.bin/mkisofs/defaults.h index 03960d1471ab..27b258cbddc0 100644 --- a/gnu/usr.bin/mkisofs/defaults.h +++ b/gnu/usr.bin/mkisofs/defaults.h @@ -11,24 +11,12 @@ #define ABSTRACT_DEFAULT NULL #define VOLSET_ID_DEFAULT NULL #define VOLUME_ID_DEFAULT "CDROM" - #ifdef __FreeBSD__ #define SYSTEM_ID_DEFAULT "FreeBSD" -#endif - +#else #ifdef __QNX__ #define SYSTEM_ID_DEFAULT "QNX" -#endif - -#ifdef __linux__ +#else #define SYSTEM_ID_DEFAULT "LINUX" #endif - - -#ifdef __osf__ -#define SYSTEM_ID_DEFAULT "OSF" -#endif - -#ifndef SYSTEM_ID_DEFAULT -#define SYSTEM_ID_DEFAULT "UNKNOWNSYS" #endif diff --git a/gnu/usr.bin/mkisofs/diag/Makefile b/gnu/usr.bin/mkisofs/diag/Makefile index e6f3a12f117f..1aefdf68d418 100644 --- a/gnu/usr.bin/mkisofs/diag/Makefile +++ b/gnu/usr.bin/mkisofs/diag/Makefile @@ -1,16 +1,10 @@ -#CC = gcc -CC = cc -traditional - -all: dump isodump isovfy - -isoinfo:isoinfo.c - ${CC} -g -o isoinfo isoinfo.c +all: dump isodump isovfy dump:dump.c - ${CC} -o dump dump.c + gcc -o dump dump.c isodump:isodump.c - ${CC} -o isodump isodump.c + gcc -o isodump isodump.c isovfy:isovfy.c - ${CC} -o isovfy isovfy.c + gcc -o isovfy isovfy.c clean: - rm -f dump isodump isovfy isoinfo + rm dump isodump isovfy diff --git a/gnu/usr.bin/mkisofs/diag/isodump.c b/gnu/usr.bin/mkisofs/diag/isodump.c index 442c6ed466f2..49ef4b91299d 100644 --- a/gnu/usr.bin/mkisofs/diag/isodump.c +++ b/gnu/usr.bin/mkisofs/diag/isodump.c @@ -52,7 +52,7 @@ isonum_731 (char * p) int -isonum_733 (unsigned char * p) +isonum_733 (char * p) { return (isonum_731 (p)); } @@ -104,7 +104,7 @@ struct iso_directory_record { unsigned char interleave [ISODCL (28, 28)]; /* 711 */ unsigned char volume_sequence_number [ISODCL (29, 32)]; /* 723 */ unsigned char name_len [ISODCL (33, 33)]; /* 711 */ - unsigned char name [1]; + unsigned char name [0]; }; #ifdef USE_TERMIOS @@ -285,15 +285,13 @@ int dump_rr(struct iso_directory_record * idr) { int len; - unsigned char * pnt; + char * pnt; len = idr->length[0] & 0xff; len -= sizeof(struct iso_directory_record); - len += sizeof(idr->name); len -= idr->name_len[0]; - pnt = (unsigned char *) idr; + pnt = (char *) idr; pnt += sizeof(struct iso_directory_record); - pnt -= sizeof(idr->name); pnt += idr->name_len[0]; if((idr->name_len[0] & 1) == 0){ pnt++; @@ -320,9 +318,9 @@ showblock(int flag){ if(idr->length[0] == 0) break; printf("%3d ", idr->length[0]); printf("[%2d] ", idr->volume_sequence_number[0]); - printf("%5x ", isonum_733(idr->extent)); - printf("%8d ", isonum_733(idr->size)); - printf ((idr->flags[0] & 2) ? "*" : " "); + printf("%5x ", *((unsigned int *) idr->extent)); + printf("%8d ", *((unsigned int *) idr->size)); + printf ((idr->flags[0] & 2) ? "*" : " "); if(idr->name_len[0] == 1 && idr->name[0] == 0) printf(". "); else if(idr->name_len[0] == 1 && idr->name[0] == 1) diff --git a/gnu/usr.bin/mkisofs/diag/isovfy.c b/gnu/usr.bin/mkisofs/diag/isovfy.c index eb52c914689c..43e13895ee10 100644 --- a/gnu/usr.bin/mkisofs/diag/isovfy.c +++ b/gnu/usr.bin/mkisofs/diag/isovfy.c @@ -112,7 +112,7 @@ isonum_732 (char * p) } int -isonum_733 (unsigned char * p) +isonum_733 (char * p) { return (isonum_731 (p)); } @@ -312,14 +312,14 @@ check_tree(int file_addr, int file_size, int parent_addr){ else if(idr->name_len[0] == 1 && idr->name[0] == 0) { iline += sprintf(&lbuffer[iline],". "); rflag = 0; - if(orig_file_addr !=isonum_733(idr->extent)) + if(orig_file_addr !=*((unsigned int *) idr->extent)) iline += sprintf(&lbuffer[iline],"***** Directory has null extent.", goof++); if(i1) iline += sprintf(&lbuffer[iline],"***** . not first entry.", rr_goof++); } else if(idr->name_len[0] == 1 && idr->name[0] == 1) { iline += sprintf(&lbuffer[iline],".. "); rflag = 0; - if(parent_file_addr !=isonum_733(idr->extent)) + if(parent_file_addr !=*((unsigned int *) idr->extent)) iline += sprintf(&lbuffer[iline],"***** Directory has null extent.", goof++); if(i1 != 1) iline += sprintf(&lbuffer[iline],"***** .. not second entry.", rr_goof++); @@ -332,10 +332,7 @@ check_tree(int file_addr, int file_size, int parent_addr){ }; if(size && extent == 0) iline += sprintf(&lbuffer[iline],"****Extent==0, size != 0", goof++); -#if 0 - /* This is apparently legal. */ if(size == 0 && extent) iline += sprintf(&lbuffer[iline],"****Extent!=0, size == 0", goof++); -#endif if(idr->flags[0] & 0xfd) iline += sprintf(&lbuffer[iline],"Flags=(%x) ", idr->flags[0], goof++); @@ -364,8 +361,8 @@ check_tree(int file_addr, int file_size, int parent_addr){ - if(rflag && (idr->flags[0] & 2)) check_tree((isonum_733(idr->extent)) << 11, - isonum_733(idr->size), + if(rflag && (idr->flags[0] & 2)) check_tree((*((unsigned int *) idr->extent)) << 11, + *((unsigned int *) idr->size), orig_file_addr << 11); i += buffer[i]; i1++; diff --git a/gnu/usr.bin/mkisofs/exclude.c b/gnu/usr.bin/mkisofs/exclude.c index c20ea2848534..99c66bd4e03b 100644 --- a/gnu/usr.bin/mkisofs/exclude.c +++ b/gnu/usr.bin/mkisofs/exclude.c @@ -29,7 +29,8 @@ char * fn; return; } - excl[i] = (char *) malloc(strlen(fn)+1); + + excl[i] = malloc(strlen(fn)+1); if (! excl[i]) { fprintf(stderr,"Can't allocate memory for excluded filename\n"); return; diff --git a/gnu/usr.bin/mkisofs/mkisofs.8 b/gnu/usr.bin/mkisofs/mkisofs.8 index d05909bf537e..8eb29ec3a7a6 100644 --- a/gnu/usr.bin/mkisofs/mkisofs.8 +++ b/gnu/usr.bin/mkisofs/mkisofs.8 @@ -1,5 +1,5 @@ .\" -*- nroff -*- -.TH MKISOFS 8 "January 1995" "Version 1.04" +.TH MKISOFS 8 "August 1993" "Version 1.03" .SH NAME mkisofs \- create a iso9660 filesystem with optional Rock Ridge attributes. .SH SYNOPSIS @@ -32,12 +32,6 @@ mkisofs \- create a iso9660 filesystem with optional Rock Ridge attributes. .B \-l ] [ -.B \-L -] -[ -.B \-L -] -[ .B \-V ] [ @@ -45,10 +39,6 @@ mkisofs \- create a iso9660 filesystem with optional Rock Ridge attributes. .I volid ] [ -.B \-i -.I include-list -] -[ .B \-p .I preparer ] @@ -98,76 +88,49 @@ example of this would be the files foo.bar and foo.bar.~1~ - the file foo.bar.~1~ would be written as FOO.000;1 and the file foo.bar would be written as FOO.BAR;1 .PP -Note that -.B mkisofs -is not designed to communicate with the writer directly. Most writers -have proprietary command sets which vary from one manufacturer to -another, and you need a specialized tool to actually burn the disk. -The cdwrite utility that comes with mkisofs is capable of communicating -with Phillips drives (newer versions of cdwrite should be available from -Yggdrasil). Most writers come with some version of DOS software -that allows a direct image copy of an iso9660 image to the writer. -.PP -Also you should know that most cd writers are very particular about timing. -Once you start to burn a disc, you cannot let their buffer empty before you -are done, or you will end up with a corrupt disc. Thus it is critical -that you be able to maintain an uninterupted data stream to the writer -for the entire time that the disc is being written. -.PP .br .B path is the path of the directory tree to be copied into the iso9660 filesystem. .SH OPTIONS .TP -.I \-a +.I -a Include all files on the iso9660 filesystem. Normally files that contain the characters '~' or '#' will not be included (these are typically backup files for editors under unix). .TP -.I \-A application_id +.I -A application_id Specifies a text string that will be written into the volume header. This should describe the application that will be on the disc. There is space on the disc for 128 characters of information. This parameter can also be set in the file .mkisofsrc with APPL=id. If specified in both places, the command line version is used. .TP -.I \-d +.I -d Omit trailing period from files that do not have a period. This violates the ISO9660 standard, but it happens to work on many systems. Use with caution. .TP -.I \-D +.I -D Do not use deep directory relocation, and instead just pack them in the way we see them. This violates the ISO9660 standard, but it works on many systems. Use with caution. .TP -.I \-f +.I -f Follow symbolic links when generating the filesystem. When this option is not in use, symbolic links will be entered using Rock Ridge if enabled, otherwise the file will be ignored. .TP -.I \-i include-list -Use the specified file as a list of files to add to the directory tree. -This is useful for quickly repacking a CD while adding files to it. -The format of this file is path1/file=path2 where path1 is the directory -in the ISO9660 file system where file should appear and path2 is the -where to find the file. -.TP -.I \-l +.I -l Allow full 32 character filenames. Normally the ISO9660 filename will be in an 8.3 format which is compatible with MS-DOS, even though the ISO9660 standard allows filenames of up to 32 characters. If you use this option, the disc may be difficult to use on a MS-DOS system, but this comes in handy on some other systems (such as the Amiga). Use with caution. .TP -.I \-L -Allow filenames to begin with a period. Ususally, a leading dot is -replaced with an underscore in order to maintain MS-DOS compatibility. -.TP -.I \-N +.I -N Omit version numbers from ISO9660 file names. This may violate the ISO9660 standard, but no one really uses the version numbers anyway. Use with caution. .TP -.I \-o filename +.I -o filename is the name of the file to which the iso9660 filesystem image should be written. This can be a disk file, a tape drive, or it can correspond directly to the device name of the optical disc writer. If not specified, stdout is @@ -175,7 +138,7 @@ to the device name of the optical disc writer. If not specified, stdout is disk drive, in which case the disk partition can be mounted and examined to ensure that the premastering was done correctly. .TP -.I \-P publisher_id +.I -P publisher_id Specifies a text string that will be written into the volume header. This should describe the publisher of the CDROM, usually with a mailing address and phone number. There is space on the disc for 128 @@ -183,7 +146,7 @@ characters of information. This parameter can also be set in the file .mkisofsrc with PUBL=. If specified in both places, the command line version is used. .TP -.I \-p preparer_id +.I -p preparer_id Specifies a text string that will be written into the volume header. This should describe the preparer of the CDROM, usually with a mailing address and phone number. There is space on the disc for 128 @@ -191,26 +154,26 @@ characters of information. This parameter can also be set in the file .mkisofsrc with PREP=. If specified in both places, the command line version is used. .TP -.I \-R +.I -R Generate SUSP and RR records using the Rock Ridge protocol to further describe the files on the iso9660 filesystem. .TP -.I \-T +.I -T Generate a file TRANS.TBL in each directory on the CDROM, which can be used on non-Rock Ridge capable systems to help establish the correct file names. There is also information present in the file that indicates the major and minor numbers for block and character devices, and each symlink has the name of the link file given. .TP -.I \-V volid +.I -V volid Specifies the volume ID to be written into the master block. This parameter can also be set in the file .mkisofsrc with VOLI=id. If specified in both places, the command line version is used. .TP -.I \-v +.I -v Verbose execution. .TP -.I \-x path +.I -x path Exclude .I path from being written to CDROM. @@ -220,9 +183,9 @@ given as command line argument and the path relative to this directory. Multiple paths may be excluded (up to 1000). Example: -mkisofs \-o cd \-x /local/dir1 \-x /local/dir2 /local +mkisofs -o cd -x /local/dir1 -x /local/dir2 /local .TP -.I \-z +.I -z Generate special SUSP records for transparently compressed files. This is only of use and interest for hosts that support transparent decompression. This is an experimental feature, and no hosts yet support this, but there @@ -252,7 +215,7 @@ filesystem. The name mkisofs is probably a bit of a misnomer, since it not only creates the filesystem, but it also populates it as well. .PP .br -Eric Youngdale <eric@aib.com> wrote both the linux isofs9660 filesystem +Eric Youngdale <ericy@cais.com> wrote both the linux isofs9660 filesystem and the mkisofs utility, and is currently maintaining them. The copyright for the mkisofs utility is held by Yggdrasil Computing, Incorporated. .SH BUGS diff --git a/gnu/usr.bin/mkisofs/mkisofs.c b/gnu/usr.bin/mkisofs/mkisofs.c index e1948caf5c0f..4cfed7861eeb 100644 --- a/gnu/usr.bin/mkisofs/mkisofs.c +++ b/gnu/usr.bin/mkisofs/mkisofs.c @@ -20,8 +20,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* ADD_FILES changes made by Ross Biro biro@yggdrasil.com 2/23/95 */ - #include "mkisofs.h" #include <assert.h> @@ -56,7 +54,7 @@ struct directory * root = NULL; -static char version_string[] = "mkisofs v1.04"; +static char version_string[] = "mkisofs v1.03"; FILE * discimage; unsigned int next_extent = 0; @@ -92,7 +90,6 @@ int omit_version_number = 0; /* May violate iso9660, but noone uses vers*/ int RR_relocation_depth = 6; /* Violates iso9660, but most systems work */ int full_iso9660_filenames = 0; /* Used with Amiga. Disc will not work with DOS */ -int allow_leading_dots = 0; /* DOS cannot read names with leading dots */ struct rcopts{ char * tag; @@ -188,7 +185,7 @@ void usage(){ fprintf(stderr,"Usage:\n"); fprintf(stderr, "mkisofs [-o outfile] [-R] [-V volid] [-v] [-a] \ -[-T]\n [-l] [-d] [-V] [-D] [-L] [-p preparer] \ +[-T]\n [-l] [-d] [-V] [-D] [-p preparer] \ [-P publisher] [ -A app_id ] [-z] \ [-x path -x path ...] path\n"); exit(1); @@ -283,15 +280,9 @@ int FDECL3(iso9660_file_length,const char*, name, struct directory_entry *, sres if(current_length < 30) *result++ = (islower(*pnt) ? toupper(*pnt) : *pnt); } else { /* Dos style filenames */ if(*pnt == '.') { - if (!chars_before_dot && !allow_leading_dots) { - /* DOS can't read files with dot first */ - chars_before_dot++; - if (result) *result++ = '_'; /* Substitute underscore */ - } else { - if (seen_dot) {ignore++; continue;} - if(result) *result++ = '.'; - seen_dot++; - } + if (seen_dot) {ignore++; continue;} + if(result) *result++ = '.'; + seen_dot++; } else if (seen_dot) { if(chars_after_dot < 3) { chars_after_dot++; @@ -376,154 +367,6 @@ int FDECL3(iso9660_file_length,const char*, name, struct directory_entry *, sres return chars_before_dot + chars_after_dot + seen_dot + extra; } -#ifdef ADD_FILES - -struct file_adds *root_file_adds = NULL; - -void -FDECL2(add_one_file, char *, addpath, char *, path ) -{ - char *cp; - char *name; - struct file_adds *f; - struct file_adds *tmp; - - f = root_file_adds; - tmp = NULL; - - name = rindex (addpath, PATH_SEPARATOR); - if (name == NULL) { - name = addpath; - } else { - name++; - } - - cp = strtok (addpath, SPATH_SEPARATOR); - - while (cp != NULL && strcmp (name, cp)) { - if (f == NULL) { - root_file_adds = e_malloc (sizeof *root_file_adds); - f=root_file_adds; - f->name = NULL; - f->child = NULL; - f->next = NULL; - f->add_count = 0; - f->adds = NULL; - f->used = 0; - } - if (f->child) { - for (tmp = f->child; tmp->next != NULL; tmp =tmp->next) { - if (strcmp (tmp->name, cp) == 0) { - f = tmp; - goto next; - } - } - if (strcmp (tmp->name, cp) == 0) { - f=tmp; - goto next; - } - /* add a new node. */ - tmp->next = e_malloc (sizeof (*tmp->next)); - f=tmp->next; - f->name = strdup (cp); - f->child = NULL; - f->next = NULL; - f->add_count = 0; - f->adds = NULL; - f->used = 0; - } else { - /* no children. */ - f->child = e_malloc (sizeof (*f->child)); - f = f->child; - f->name = strdup (cp); - f->child = NULL; - f->next = NULL; - f->add_count = 0; - f->adds = NULL; - f->used = 0; - - } - next: - cp = strtok (NULL, SPATH_SEPARATOR); - } - /* Now f if non-null points to where we should add things */ - if (f == NULL) { - root_file_adds = e_malloc (sizeof *root_file_adds); - f=root_file_adds; - f->name = NULL; - f->child = NULL; - f->next = NULL; - f->add_count = 0; - f->adds = NULL; - } - - /* Now f really points to where we should add this name. */ - f->add_count++; - f->adds = realloc (f->adds, sizeof (*f->adds)*f->add_count); - f->adds[f->add_count-1].path = strdup (path); - f->adds[f->add_count-1].name = strdup (name); -} - -void -FDECL3(add_file_list, int, argc, char **,argv, int, ind) -{ - char *ptr; - char *dup_arg; - - while (ind < argc) { - dup_arg = strdup (argv[ind]); - ptr = index (dup_arg,'='); - if (ptr == NULL) { - free (dup_arg); - return; - } - *ptr = 0; - ptr++; - add_one_file (dup_arg, ptr); - free (dup_arg); - ind++; - } -} -void -FDECL1(add_file, char *, filename) -{ - char buff[1024]; - FILE *f; - char *ptr; - char *p2; - int count=0; - - if (strcmp (filename, "-") == 0) { - f = stdin; - } else { - f = fopen (filename, "r"); - if (f == NULL) { - perror ("fopen"); - exit (1); - } - } - while (fgets (buff, 1024, f)) { - count++; - ptr = buff; - while (isspace (*ptr)) ptr++; - if (*ptr==0) continue; - if (*ptr=='#') continue; - - if (ptr[strlen(ptr)-1]== '\n') ptr[strlen(ptr)-1]=0; - p2 = index (ptr, '='); - if (p2 == NULL) { - fprintf (stderr, "Error in line %d: %s\n", count, buff); - exit (1); - } - *p2 = 0; - p2++; - add_one_file (ptr, p2); - } - if (f != stdin) fclose (f); -} - -#endif - int FDECL2(main, int, argc, char **, argv){ char * outfile; struct directory_entry de; @@ -531,9 +374,6 @@ int FDECL2(main, int, argc, char **, argv){ struct stat statbuf; char * scan_tree; int c; -#ifdef ADD_FILES - char *add_file_file = NULL; -#endif if (argc < 2) usage(); @@ -542,7 +382,7 @@ int FDECL2(main, int, argc, char **, argv){ read_rcfile(argv[0]); outfile = NULL; - while ((c = getopt(argc, argv, "i:o:V:RfvaTp:P:x:dDlLNzA:")) != EOF) + while ((c = getopt(argc, argv, "o:V:RfvaTp:P:x:dDlNzA:")) != EOF) switch (c) { case 'p': @@ -575,9 +415,6 @@ int FDECL2(main, int, argc, char **, argv){ case 'l': full_iso9660_filenames++; break; - case 'L': - allow_leading_dots++; - break; case 'N': omit_version_number++; break; @@ -613,11 +450,6 @@ int FDECL2(main, int, argc, char **, argv){ case 'x': exclude(optarg); break; - case 'i': -#ifdef ADD_FILES - add_file_file = optarg; - break; -#endif default: usage(); exit(1); @@ -646,13 +478,6 @@ int FDECL2(main, int, argc, char **, argv){ scan_tree = argv[optind]; -#ifdef ADD_FILES - if (add_file_file) { - add_file(add_file_file); - } - add_file_list (argc, argv, optind+1); -#endif - if(!scan_tree){ usage(); exit(1); @@ -674,7 +499,7 @@ int FDECL2(main, int, argc, char **, argv){ #else extension_record = generate_rr_extension_record("IEEE_P1282", "THE IEEE P1282 PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM SEMANTICS", - "PLEASE CONTACT THE IEEE STANDARDS DEPARTMENT, PISCATAWAY, NJ, USA FOR THE P1282 SPECIFICATION.", &extension_record_size); + "PLEASE CONTACT THE IEEE STANDARDS DEPARTMENT,PISCATAWAY, NJ, USA FOR THE P1282 SPECIFICATION.", &extension_record_size); #endif }; diff --git a/gnu/usr.bin/mkisofs/mkisofs.h b/gnu/usr.bin/mkisofs/mkisofs.h index efdd8a8356e4..e17bb848a9cd 100644 --- a/gnu/usr.bin/mkisofs/mkisofs.h +++ b/gnu/usr.bin/mkisofs/mkisofs.h @@ -19,9 +19,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* ADD_FILES changes made by Ross Biro biro@yggdrasil.com 2/23/95 */ - -#include <sys/types.h> #include <stdio.h> /* This symbol is used to indicate that we do not have things like @@ -43,6 +40,7 @@ #endif #include <string.h> +#include <sys/types.h> #include <sys/stat.h> #ifdef linux @@ -102,7 +100,6 @@ struct directory_entry{ unsigned int priority; char * name; char * table; - char * whole_name; struct directory * filedir; struct directory_entry * parent_rec; unsigned int flags; @@ -144,23 +141,6 @@ struct deferred{ unsigned int flags; }; -#ifdef ADD_FILES -struct file_adds { - char *name; - struct file_adds *child; - struct file_adds *next; - int add_count; - int used; - struct dirent de; - struct { - char *path; - char *name; - } *adds; -}; -extern struct file_adds *root_file_adds; - -#endif - extern void DECL(sort_n_finish,(struct directory *)); extern int goof; extern struct directory * root; diff --git a/gnu/usr.bin/mkisofs/rock.c b/gnu/usr.bin/mkisofs/rock.c index f3361cef32df..dfa774f02057 100644 --- a/gnu/usr.bin/mkisofs/rock.c +++ b/gnu/usr.bin/mkisofs/rock.c @@ -279,7 +279,7 @@ int deep_opt; nchar -= 1; } else if(cpnt[0] == 0){ if(MAYBE_ADD_CE_ENTRY(2)) add_CE_entry(); - Rock[ipnt++] = (cpnt == &symlink_buff[0] ? SL_ROOT : 0); + Rock[ipnt++] = SL_ROOT; Rock[ipnt++] = 0; /* length is zero */ lenval += 2; } else { diff --git a/gnu/usr.bin/mkisofs/tree.c b/gnu/usr.bin/mkisofs/tree.c index 5060c41a1740..c07c52e12eaf 100644 --- a/gnu/usr.bin/mkisofs/tree.c +++ b/gnu/usr.bin/mkisofs/tree.c @@ -20,21 +20,15 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* ADD_FILES changes made by Ross Biro biro@yggdrasil.com 2/23/95 */ - #include <stdlib.h> #include <string.h> #include <time.h> #include <errno.h> #ifndef VMS -#if defined(HASSYSMACROS) && !defined(HASMKDEV) -#include <sys/sysmacros.h> -#endif #include <unistd.h> -#ifdef HASMKDEV -#include <sys/types.h> -#include <sys/mkdev.h> +#ifdef HASSYSMACROS +#include <sys/sysmacros.h> #endif #else #include <sys/file.h> @@ -481,89 +475,6 @@ void finish_cl_pl_entries(){ d_entry = d_entry->next; }; } - -#ifdef ADD_FILES -/* This function looks up additions. */ -char * -FDECL3(look_up_addition,char **, newpath, char *,path, struct dirent **,de) { - char *dup_path; - char *cp; - struct file_adds *f; - struct file_adds *tmp; - - f=root_file_adds; - if (!f) return NULL; - - /* I don't trust strtok */ - dup_path = strdup (path); - - cp = strtok (dup_path, SPATH_SEPARATOR); - while (cp != NULL) { - for (tmp = f->child; tmp != NULL; tmp=tmp->next) { - if (strcmp (tmp->name, cp) == 0) break; - } - if (tmp == NULL) { - /* no match */ - free (dup_path); - return (NULL); - } - f = tmp; - cp = strtok(NULL, SPATH_SEPARATOR); - } - free (dup_path); - - /* looks like we found something. */ - if (tmp->used >= tmp->add_count) return (NULL); - - *newpath = tmp->adds[tmp->used].path; - tmp->used++; - *de = &(tmp->de); - return (tmp->adds[tmp->used-1].name); - -} - -/* This function lets us add files from outside the standard file tree. - It is useful if we want to duplicate a cd, but add/replace things. - We should note that the real path will be used for exclusions. */ - -struct dirent * -FDECL3(readdir_add_files, char **, pathp, char *,path, DIR *, dir){ - struct dirent *de; - - char *addpath; - char *name; - - de = readdir (dir); - if (de) { - return (de); - } - - name=look_up_addition (&addpath, path, &de); - - if (!name) { - return; - } - - *pathp=addpath; - - /* Now we must create the directory entry. */ - /* fortuneately only the name seems to matter. */ - /* - de->d_ino = -1; - de->d_off = 0; - de->d_reclen = strlen (name); - */ - strncpy (de->d_name, name, NAME_MAX); - de->d_name[NAME_MAX]=0; - return (de); - -} -#else -struct dirent * -FDECL3(readdir_add_files, char **, pathp, char *,path, DIR *, dir){ - return (readdir (dir)); -} -#endif /* * This function scans the directory tree, looking for files, and it makes * note of everything that is found. We also begin to construct the ISO9660 @@ -582,7 +493,6 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){ char * cpnt; int new_reclen; int deep_flag; - char *old_path; current_dir = opendir(path); d_entry = NULL; @@ -590,9 +500,7 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){ /* Apparently NFS sometimes allows you to open the directory, but then refuses to allow you to read the contents. Allow for this */ - old_path = path; - - if(current_dir) d_entry = readdir_add_files(&path, old_path, current_dir); + if(current_dir) d_entry = readdir(current_dir); if(!current_dir || !d_entry) { fprintf(stderr,"Unable to open directory %s\n", path); @@ -670,7 +578,7 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){ /* The first time through, skip this, since we already asked for the first entry when we opened the directory. */ - if(dflag) d_entry = readdir_add_files(&path, old_path, current_dir); + if(dflag) d_entry = readdir(current_dir); dflag++; if(!d_entry) break; @@ -721,11 +629,10 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){ if(S_ISLNK(lstatbuf.st_mode)){ - /* Here we decide how to handle the symbolic links. Here - we handle the general case - if we are not following - links or there is an error, then we must change - something. If RR is in use, it is easy, we let RR - describe the file. If not, then we punt the file. */ + /* Here we decide how to handle the symbolic links. Here we + handle the general case - if we are not following links or there is an + error, then we must change something. If RR is in use, it is easy, we + let RR describe the file. If not, then we punt the file. */ if((status || !follow_links)){ if(use_RockRidge){ @@ -745,50 +652,35 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){ }; } - if( follow_links - && S_ISDIR(statbuf.st_mode) ) - { - if( strcmp(d_entry->d_name, ".") - && strcmp(d_entry->d_name, "..") ) - { - if(find_directory_hash(statbuf.st_dev, STAT_INODE(statbuf))) - { - if(!use_RockRidge) - { - fprintf(stderr, "Already cached directory seen (%s)\n", - whole_path); - continue; - } - statbuf.st_size = 0; - STAT_INODE(statbuf) = UNCACHED_INODE; - statbuf.st_dev = (dev_t) UNCACHED_DEVICE; - statbuf.st_mode = (statbuf.st_mode & ~S_IFMT) | S_IFREG; + /* Here we handle a different kind of case. Here we have a symlink, + but we want to follow symlinks. If we run across a directory loop, + then we need to pretend that we are not following symlinks for this file. + If this is the first time we have seen this, then make this seem + as if there was no symlink there in the first place */ + + else if(strcmp(d_entry->d_name, ".") && + strcmp(d_entry->d_name, "..")) { + if(find_directory_hash(statbuf.st_dev, STAT_INODE(statbuf))){ + fprintf(stderr, "Infinite loop detected (%s)\n", whole_path); + if(!use_RockRidge) continue; + statbuf.st_size = 0; + STAT_INODE(statbuf) = UNCACHED_INODE; + statbuf.st_dev = (dev_t) UNCACHED_DEVICE; + statbuf.st_mode = (statbuf.st_mode & ~S_IFMT) | S_IFREG; } else { - lstatbuf = statbuf; - add_directory_hash(statbuf.st_dev, STAT_INODE(statbuf)); - } - } - } - } + lstatbuf = statbuf; + add_directory_hash(statbuf.st_dev, STAT_INODE(statbuf)); + }; + }; + }; - /* - * Add directories to the cache so that we don't waste space even - * if we are supposed to be following symlinks. - */ - if( follow_links - && strcmp(d_entry->d_name, ".") - && strcmp(d_entry->d_name, "..") - && S_ISDIR(statbuf.st_mode) ) - { - add_directory_hash(statbuf.st_dev, STAT_INODE(statbuf)); - } #ifdef VMS if(!S_ISDIR(lstatbuf.st_mode) && (statbuf.st_fab_rfm != FAB$C_FIX && statbuf.st_fab_rfm != FAB$C_STMLF)) { fprintf(stderr,"Warning - file %s has an unsupported VMS record" " format (%d)\n", whole_path, statbuf.st_fab_rfm); - } + }; #endif if(S_ISREG(lstatbuf.st_mode) && (status = access(whole_path, R_OK))){ @@ -799,15 +691,11 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){ /* Add this so that we can detect directory loops with hard links. If we are set up to follow symlinks, then we skip this checking. */ - if( !follow_links - && S_ISDIR(lstatbuf.st_mode) - && strcmp(d_entry->d_name, ".") - && strcmp(d_entry->d_name, "..") ) - { + if(!follow_links && S_ISDIR(lstatbuf.st_mode) && strcmp(d_entry->d_name, ".") && + strcmp(d_entry->d_name, "..")) { if(find_directory_hash(statbuf.st_dev, STAT_INODE(statbuf))) { - fprintf(stderr,"Directory loop - fatal goof (%s %lx %lu).\n", - whole_path, (unsigned long) statbuf.st_dev, - (unsigned long) STAT_INODE(statbuf)); + fprintf(stderr,"Directory loop - fatal goof (%s %x %d).\n", + whole_path, statbuf.st_dev, STAT_INODE(statbuf)); exit(1); }; add_directory_hash(statbuf.st_dev, STAT_INODE(statbuf)); @@ -839,7 +727,6 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){ s_entry->table = NULL; s_entry->name = strdup(d_entry->d_name); - s_entry->whole_name = strdup (whole_path); s_entry->filedir = this_dir; s_entry->isorec.flags[0] = 0; @@ -923,20 +810,18 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){ break; #ifndef NON_UNIXFS case S_IFBLK: - sprintf(buffer,"B\t%s\t%lu %lu\n", + sprintf(buffer,"B\t%s\t%d %d\n", s_entry->name, - (unsigned long) major(statbuf.st_rdev), - (unsigned long) minor(statbuf.st_rdev)); + major(statbuf.st_rdev), minor(statbuf.st_rdev)); break; case S_IFIFO: sprintf(buffer,"P\t%s\n", s_entry->name); break; case S_IFCHR: - sprintf(buffer,"C\t%s\t%lu %lu\n", + sprintf(buffer,"C\t%s\t%d %d\n", s_entry->name, - (unsigned long) major(statbuf.st_rdev), - (unsigned long) minor(statbuf.st_rdev)); + major(statbuf.st_rdev), minor(statbuf.st_rdev)); break; case S_IFLNK: readlink(whole_path, symlink_buff, sizeof(symlink_buff)); diff --git a/gnu/usr.bin/mkisofs/write.c b/gnu/usr.bin/mkisofs/write.c index 64b4a3ce593c..3a98a3907624 100644 --- a/gnu/usr.bin/mkisofs/write.c +++ b/gnu/usr.bin/mkisofs/write.c @@ -376,7 +376,11 @@ static void FDECL1(assign_file_addresses, struct directory *, dpnt){ dwpnt->name = NULL; } else { dwpnt->table = NULL; - strcpy(whole_path, s_entry->whole_name); + strcpy(whole_path, s_entry->filedir->whole_name); +#ifndef VMS + if(strlen(whole_path)) strcat(whole_path, "/"); +#endif + strcat(whole_path, s_entry->name); dwpnt->name = strdup(whole_path); }; dwpnt->next = NULL; @@ -403,15 +407,8 @@ static void FDECL1(assign_file_addresses, struct directory *, dpnt){ fprintf(stderr,"Reported file size is %d extents\n", s_entry->size); exit(1); }; - } else { - /* - * This is for zero-length files. If we leave the extent 0, - * then we get screwed, because many readers simply drop files - * that have an extent of zero. Thus we leave the size 0, - * and just assign the extent number. - */ - set_733(s_entry->isorec.extent, last_extent); - } + } else + set_733(s_entry->isorec.extent, 0); }; }; }; diff --git a/gnu/usr.bin/patch/EXTERN.h b/gnu/usr.bin/patch/EXTERN.h index 96dd888a933d..be56db25fdba 100644 --- a/gnu/usr.bin/patch/EXTERN.h +++ b/gnu/usr.bin/patch/EXTERN.h @@ -1,6 +1,9 @@ -/* $Header: /home/ncvs/src/gnu/usr.bin/patch/EXTERN.h,v 1.1.1.1 1993/06/19 14:21:52 paul Exp $ +/* $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/EXTERN.h,v 1.2 1995/05/30 05:02:26 rgrimes Exp $ * * $Log: EXTERN.h,v $ + * Revision 1.2 1995/05/30 05:02:26 rgrimes + * Remove trailing whitespace. + * * Revision 1.1.1.1 1993/06/19 14:21:52 paul * b-maked patch-2.10 * diff --git a/gnu/usr.bin/patch/INTERN.h b/gnu/usr.bin/patch/INTERN.h index b718b1d4cc9f..706717082c58 100644 --- a/gnu/usr.bin/patch/INTERN.h +++ b/gnu/usr.bin/patch/INTERN.h @@ -1,6 +1,9 @@ -/* $Header: /home/ncvs/src/gnu/usr.bin/patch/INTERN.h,v 1.1.1.1 1993/06/19 14:21:52 paul Exp $ +/* $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/INTERN.h,v 1.2 1995/05/30 05:02:27 rgrimes Exp $ * * $Log: INTERN.h,v $ + * Revision 1.2 1995/05/30 05:02:27 rgrimes + * Remove trailing whitespace. + * * Revision 1.1.1.1 1993/06/19 14:21:52 paul * b-maked patch-2.10 * diff --git a/gnu/usr.bin/patch/common.h b/gnu/usr.bin/patch/common.h index 4bb99e024819..11f48cd10338 100644 --- a/gnu/usr.bin/patch/common.h +++ b/gnu/usr.bin/patch/common.h @@ -1,6 +1,9 @@ -/* $Header: /home/ncvs/src/gnu/usr.bin/patch/common.h,v 1.2 1993/09/22 16:51:03 rich Exp $ +/* $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/common.h,v 1.3 1995/05/30 05:02:30 rgrimes Exp $ * * $Log: common.h,v $ + * Revision 1.3 1995/05/30 05:02:30 rgrimes + * Remove trailing whitespace. + * * Revision 1.2 1993/09/22 16:51:03 rich * Increaed the fixed static buffer sizes and maximum hunk size that * otherwise causes the XFree86 1.3 patch set to fail. diff --git a/gnu/usr.bin/patch/inp.c b/gnu/usr.bin/patch/inp.c index e8e1531776df..015138cfc019 100644 --- a/gnu/usr.bin/patch/inp.c +++ b/gnu/usr.bin/patch/inp.c @@ -1,6 +1,9 @@ -/* $Header: /home/ncvs/src/gnu/usr.bin/patch/inp.c,v 1.2 1995/01/12 22:09:39 hsu Exp $ +/* $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/inp.c,v 1.3 1995/05/30 05:02:31 rgrimes Exp $ * * $Log: inp.c,v $ + * Revision 1.3 1995/05/30 05:02:31 rgrimes + * Remove trailing whitespace. + * * Revision 1.2 1995/01/12 22:09:39 hsu * Fix bug that created new files even when running in -C check mode. * Reviewed by: phk diff --git a/gnu/usr.bin/patch/inp.h b/gnu/usr.bin/patch/inp.h index ea07ee89d8a1..07b42b9cdc7a 100644 --- a/gnu/usr.bin/patch/inp.h +++ b/gnu/usr.bin/patch/inp.h @@ -1,6 +1,9 @@ -/* $Header: /home/ncvs/src/gnu/usr.bin/patch/inp.h,v 1.1.1.1 1993/06/19 14:21:52 paul Exp $ +/* $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/inp.h,v 1.2 1995/05/30 05:02:33 rgrimes Exp $ * * $Log: inp.h,v $ + * Revision 1.2 1995/05/30 05:02:33 rgrimes + * Remove trailing whitespace. + * * Revision 1.1.1.1 1993/06/19 14:21:52 paul * b-maked patch-2.10 * diff --git a/gnu/usr.bin/patch/patch.1 b/gnu/usr.bin/patch/patch.1 index edc690f13516..eb7578d76c11 100644 --- a/gnu/usr.bin/patch/patch.1 +++ b/gnu/usr.bin/patch/patch.1 @@ -1,6 +1,6 @@ .\" -*- nroff -*- .rn '' }` -'\" $Header: /home/ncvs/src/gnu/usr.bin/patch/patch.1,v 1.4 1994/02/25 21:45:59 phk Exp $ +'\" $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/patch.1,v 1.4 1994/02/25 21:45:59 phk Exp $ '\" '\" $Log: patch.1,v $ .\" Revision 1.4 1994/02/25 21:45:59 phk @@ -211,7 +211,7 @@ Only context diffs have lines like that, but if there is an \*(L"Index:\*(R" line in the leading garbage, .I patch will try to use the file name from that line. -The Index line, if present, takes precedence over the context diff header. +The context diff header takes precedence over an Index line. If no file name can be intuited from the leading garbage, you will be asked for the name of the file to patch. .PP diff --git a/gnu/usr.bin/patch/patch.c b/gnu/usr.bin/patch/patch.c index b03d065af555..8f3e84c9a95f 100644 --- a/gnu/usr.bin/patch/patch.c +++ b/gnu/usr.bin/patch/patch.c @@ -1,5 +1,5 @@ char rcsid[] = - "$Header: /home/ncvs/src/gnu/usr.bin/patch/patch.c,v 1.5 1995/01/12 22:09:40 hsu Exp $"; + "$Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/patch.c,v 1.6 1995/05/30 05:02:34 rgrimes Exp $"; /* patch - a program to apply diffs to original files * @@ -9,6 +9,9 @@ char rcsid[] = * money off of it, or pretend that you wrote it. * * $Log: patch.c,v $ + * Revision 1.6 1995/05/30 05:02:34 rgrimes + * Remove trailing whitespace. + * * Revision 1.5 1995/01/12 22:09:40 hsu * Fix bug that created new files even when running in -C check mode. * Reviewed by: phk diff --git a/gnu/usr.bin/patch/pch.c b/gnu/usr.bin/patch/pch.c index a607f67641cb..9d0ebca7675a 100644 --- a/gnu/usr.bin/patch/pch.c +++ b/gnu/usr.bin/patch/pch.c @@ -1,4 +1,4 @@ -/* $Header: /home/ncvs/src/gnu/usr.bin/patch/pch.c,v 1.5.4.2 1996/04/11 10:33:45 markm Exp $ +/* $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/pch.c,v 1.5.4.2 1996/04/11 10:33:45 markm Exp $ * * $Log: pch.c,v $ * Revision 1.5.4.2 1996/04/11 10:33:45 markm @@ -373,6 +373,8 @@ intuit_diff_type() else filearg[0] = savestr(newname); } + else if (indname) + filearg[0] = savestr(indname); else if (oldname) filearg[0] = savestr(oldname); else if (newname) diff --git a/gnu/usr.bin/patch/pch.h b/gnu/usr.bin/patch/pch.h index 49670816989f..a8d07f89bf8a 100644 --- a/gnu/usr.bin/patch/pch.h +++ b/gnu/usr.bin/patch/pch.h @@ -1,6 +1,9 @@ -/* $Header: /home/ncvs/src/gnu/usr.bin/patch/pch.h,v 1.1.1.1 1993/06/19 14:21:52 paul Exp $ +/* $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/pch.h,v 1.2 1995/05/30 05:02:36 rgrimes Exp $ * * $Log: pch.h,v $ + * Revision 1.2 1995/05/30 05:02:36 rgrimes + * Remove trailing whitespace. + * * Revision 1.1.1.1 1993/06/19 14:21:52 paul * b-maked patch-2.10 * diff --git a/gnu/usr.bin/patch/util.h b/gnu/usr.bin/patch/util.h index c56b4c304004..84f1ca47fcbf 100644 --- a/gnu/usr.bin/patch/util.h +++ b/gnu/usr.bin/patch/util.h @@ -1,6 +1,9 @@ -/* $Header: /home/ncvs/src/gnu/usr.bin/patch/util.h,v 1.1.1.1 1993/06/19 14:21:52 paul Exp $ +/* $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/util.h,v 1.2 1995/05/30 05:02:38 rgrimes Exp $ * * $Log: util.h,v $ + * Revision 1.2 1995/05/30 05:02:38 rgrimes + * Remove trailing whitespace. + * * Revision 1.1.1.1 1993/06/19 14:21:52 paul * b-maked patch-2.10 * diff --git a/gnu/usr.bin/patch/version.c b/gnu/usr.bin/patch/version.c index dfd2e9a6bb86..4c95e5be2485 100644 --- a/gnu/usr.bin/patch/version.c +++ b/gnu/usr.bin/patch/version.c @@ -1,6 +1,9 @@ -/* $Header: /home/ncvs/src/gnu/usr.bin/patch/version.c,v 1.1.1.1 1993/06/19 14:21:52 paul Exp $ +/* $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/version.c,v 1.2 1995/05/30 05:02:39 rgrimes Exp $ * * $Log: version.c,v $ + * Revision 1.2 1995/05/30 05:02:39 rgrimes + * Remove trailing whitespace. + * * Revision 1.1.1.1 1993/06/19 14:21:52 paul * b-maked patch-2.10 * diff --git a/gnu/usr.bin/patch/version.h b/gnu/usr.bin/patch/version.h index f59ee261e639..498050c3dea5 100644 --- a/gnu/usr.bin/patch/version.h +++ b/gnu/usr.bin/patch/version.h @@ -1,6 +1,9 @@ -/* $Header: /home/ncvs/src/gnu/usr.bin/patch/version.h,v 1.1.1.1 1993/06/19 14:21:52 paul Exp $ +/* $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/patch/version.h,v 1.2 1995/05/30 05:02:40 rgrimes Exp $ * * $Log: version.h,v $ + * Revision 1.2 1995/05/30 05:02:40 rgrimes + * Remove trailing whitespace. + * * Revision 1.1.1.1 1993/06/19 14:21:52 paul * b-maked patch-2.10 * diff --git a/gnu/usr.bin/perl/eg/ADB b/gnu/usr.bin/perl/eg/ADB index 09b93c302aae..39c58d99e2a0 100644 --- a/gnu/usr.bin/perl/eg/ADB +++ b/gnu/usr.bin/perl/eg/ADB @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/ADB,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/ADB,v 1.1.1.1 1994/09/10 06:27:46 gclarkii Exp $ # This script is only useful when used in your crash directory. diff --git a/gnu/usr.bin/perl/eg/changes b/gnu/usr.bin/perl/eg/changes index 9835e1b6ddc2..b82efda0861e 100644 --- a/gnu/usr.bin/perl/eg/changes +++ b/gnu/usr.bin/perl/eg/changes @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/changes,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/changes,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ ($dir, $days) = @ARGV; $dir = '/' if $dir eq ''; diff --git a/gnu/usr.bin/perl/eg/dus b/gnu/usr.bin/perl/eg/dus index 94c648bd7626..ccab061d6227 100644 --- a/gnu/usr.bin/perl/eg/dus +++ b/gnu/usr.bin/perl/eg/dus @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/dus,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/dus,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ # This script does a du -s on any directories in the current directory that # are not mount points for another filesystem. diff --git a/gnu/usr.bin/perl/eg/findcp b/gnu/usr.bin/perl/eg/findcp index 47e443820d88..39f7ba4830b0 100644 --- a/gnu/usr.bin/perl/eg/findcp +++ b/gnu/usr.bin/perl/eg/findcp @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/findcp,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/findcp,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ # This is a wrapper around the find command that pretends find has a switch # of the form -cp host:destination. It presumes your find implements -ls. diff --git a/gnu/usr.bin/perl/eg/findtar b/gnu/usr.bin/perl/eg/findtar index a60f10f76c32..046e48f83fbb 100644 --- a/gnu/usr.bin/perl/eg/findtar +++ b/gnu/usr.bin/perl/eg/findtar @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/findtar,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/findtar,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ # findtar takes find-style arguments and spits out a tarfile on stdout. # It won't work unless your find supports -ls and your tar the I flag. diff --git a/gnu/usr.bin/perl/eg/g/gcp b/gnu/usr.bin/perl/eg/g/gcp index 3e44a9cf182b..f5045d8fd3ef 100644 --- a/gnu/usr.bin/perl/eg/g/gcp +++ b/gnu/usr.bin/perl/eg/g/gcp @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/g/gcp,v 1.1.1.1 1993/08/23 21:29:44 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/g/gcp,v 1.1.1.1 1994/09/10 06:27:48 gclarkii Exp $ # Here is a script to do global rcps. See man page. diff --git a/gnu/usr.bin/perl/eg/g/gcp.man b/gnu/usr.bin/perl/eg/g/gcp.man index 8985742fa473..21f15d625d30 100644 --- a/gnu/usr.bin/perl/eg/g/gcp.man +++ b/gnu/usr.bin/perl/eg/g/gcp.man @@ -1,4 +1,4 @@ -.\" $Header: /home/cvs/386BSD/ports/lang/perl/eg/g/gcp.man,v 1.1.1.1 1993/08/23 21:29:44 nate Exp $ +.\" $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/g/gcp.man,v 1.1.1.1 1994/09/10 06:27:48 gclarkii Exp $ .TH GCP 1C "13 May 1988" .SH NAME gcp \- global file copy diff --git a/gnu/usr.bin/perl/eg/g/ged b/gnu/usr.bin/perl/eg/g/ged index d296a84c913a..f6fb91a1b88f 100644 --- a/gnu/usr.bin/perl/eg/g/ged +++ b/gnu/usr.bin/perl/eg/g/ged @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/g/ged,v 1.1.1.1 1993/08/23 21:29:44 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/g/ged,v 1.1.1.1 1994/09/10 06:27:48 gclarkii Exp $ # Does inplace edits on a set of files on a set of machines. # diff --git a/gnu/usr.bin/perl/eg/g/gsh b/gnu/usr.bin/perl/eg/g/gsh index 3322a02ff74f..14e0ae08f119 100644 --- a/gnu/usr.bin/perl/eg/g/gsh +++ b/gnu/usr.bin/perl/eg/g/gsh @@ -1,6 +1,6 @@ #! /usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/g/gsh,v 1.1.1.1 1993/08/23 21:29:44 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/g/gsh,v 1.1.1.1 1994/09/10 06:27:48 gclarkii Exp $ # Do rsh globally--see man page diff --git a/gnu/usr.bin/perl/eg/g/gsh.man b/gnu/usr.bin/perl/eg/g/gsh.man index 00eafb66d8c2..5bc5a175a834 100644 --- a/gnu/usr.bin/perl/eg/g/gsh.man +++ b/gnu/usr.bin/perl/eg/g/gsh.man @@ -1,4 +1,4 @@ -.\" $Header: /home/cvs/386BSD/ports/lang/perl/eg/g/gsh.man,v 1.1.1.1 1993/08/23 21:29:44 nate Exp $ +.\" $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/g/gsh.man,v 1.1.1.1 1994/09/10 06:27:48 gclarkii Exp $ .TH GSH 8 "13 May 1988" .SH NAME gsh \- global shell diff --git a/gnu/usr.bin/perl/eg/muck.man b/gnu/usr.bin/perl/eg/muck.man index 1b45ee0325c0..0e44926a5e0d 100644 --- a/gnu/usr.bin/perl/eg/muck.man +++ b/gnu/usr.bin/perl/eg/muck.man @@ -1,4 +1,4 @@ -.\" $Header: /home/cvs/386BSD/ports/lang/perl/eg/muck.man,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +.\" $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/muck.man,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ .TH MUCK 1 "10 Jan 1989" .SH NAME muck \- make usage checker diff --git a/gnu/usr.bin/perl/eg/myrup b/gnu/usr.bin/perl/eg/myrup index b3185896ef98..813a4693ace7 100644 --- a/gnu/usr.bin/perl/eg/myrup +++ b/gnu/usr.bin/perl/eg/myrup @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/myrup,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/myrup,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ # This was a customization of ruptime requested by someone here who wanted # to be able to find the least loaded machine easily. It uses the diff --git a/gnu/usr.bin/perl/eg/nih b/gnu/usr.bin/perl/eg/nih index a376142cdd75..5058dbe0806e 100644 --- a/gnu/usr.bin/perl/eg/nih +++ b/gnu/usr.bin/perl/eg/nih @@ -1,7 +1,7 @@ eval "exec /usr/bin/perl -Spi.bak $0 $*" if $running_under_some_shell; -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/nih,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/nih,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ # This script makes #! scripts directly executable on machines that don't # support #!. It edits in place any scripts mentioned on the command line. diff --git a/gnu/usr.bin/perl/eg/relink b/gnu/usr.bin/perl/eg/relink index 69956c9a6738..1484f3da40b7 100644 --- a/gnu/usr.bin/perl/eg/relink +++ b/gnu/usr.bin/perl/eg/relink @@ -2,9 +2,12 @@ 'di'; 'ig00'; # -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/relink,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/relink,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ # # $Log: relink,v $ +# Revision 1.1.1.1 1994/09/10 06:27:47 gclarkii +# Initial import of Perl 4.046 bmaked +# # Revision 1.1.1.1 1993/08/23 21:29:43 nate # PERL! # diff --git a/gnu/usr.bin/perl/eg/rename b/gnu/usr.bin/perl/eg/rename index b568406f8603..64d9a595669e 100644 --- a/gnu/usr.bin/perl/eg/rename +++ b/gnu/usr.bin/perl/eg/rename @@ -2,9 +2,12 @@ 'di'; 'ig00'; # -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/rename,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/rename,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ # # $Log: rename,v $ +# Revision 1.1.1.1 1994/09/10 06:27:47 gclarkii +# Initial import of Perl 4.046 bmaked +# # Revision 1.1.1.1 1993/08/23 21:29:43 nate # PERL! # diff --git a/gnu/usr.bin/perl/eg/rmfrom b/gnu/usr.bin/perl/eg/rmfrom index 0c8fa2c86aaf..8c05ba55b955 100644 --- a/gnu/usr.bin/perl/eg/rmfrom +++ b/gnu/usr.bin/perl/eg/rmfrom @@ -1,6 +1,6 @@ #!/usr/bin/perl -n -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/rmfrom,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/rmfrom,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ # A handy (but dangerous) script to put after a find ... -print. diff --git a/gnu/usr.bin/perl/eg/scan/scan_df b/gnu/usr.bin/perl/eg/scan/scan_df index 688738710a53..3904fa7bb2ed 100644 --- a/gnu/usr.bin/perl/eg/scan/scan_df +++ b/gnu/usr.bin/perl/eg/scan/scan_df @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/scan/scan_df,v 1.1.1.1 1993/08/23 21:29:44 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/scan/scan_df,v 1.1.1.1 1994/09/10 06:27:49 gclarkii Exp $ # This report points out filesystems that are in danger of overflowing. diff --git a/gnu/usr.bin/perl/eg/scan/scan_last b/gnu/usr.bin/perl/eg/scan/scan_last index 6621120d3e44..3fef9b679ab0 100644 --- a/gnu/usr.bin/perl/eg/scan/scan_last +++ b/gnu/usr.bin/perl/eg/scan/scan_last @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/scan/scan_last,v 1.1.1.1 1993/08/23 21:29:45 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/scan/scan_last,v 1.1.1.1 1994/09/10 06:27:49 gclarkii Exp $ # This reports who was logged on at weird hours diff --git a/gnu/usr.bin/perl/eg/scan/scan_messages b/gnu/usr.bin/perl/eg/scan/scan_messages index a28cda858a17..d5e6999cfae2 100644 --- a/gnu/usr.bin/perl/eg/scan/scan_messages +++ b/gnu/usr.bin/perl/eg/scan/scan_messages @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/scan/scan_messages,v 1.1.1.1 1993/08/23 21:29:44 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/scan/scan_messages,v 1.1.1.1 1994/09/10 06:27:49 gclarkii Exp $ # This prints out extraordinary console messages. You'll need to customize. diff --git a/gnu/usr.bin/perl/eg/scan/scan_passwd b/gnu/usr.bin/perl/eg/scan/scan_passwd index f9c53c7d2385..938f86d979ee 100644 --- a/gnu/usr.bin/perl/eg/scan/scan_passwd +++ b/gnu/usr.bin/perl/eg/scan/scan_passwd @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/scan/scan_passwd,v 1.1.1.1 1993/08/23 21:29:45 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/scan/scan_passwd,v 1.1.1.1 1994/09/10 06:27:49 gclarkii Exp $ # This scans passwd file for security holes. diff --git a/gnu/usr.bin/perl/eg/scan/scan_ps b/gnu/usr.bin/perl/eg/scan/scan_ps index b0480d544c30..890039136889 100644 --- a/gnu/usr.bin/perl/eg/scan/scan_ps +++ b/gnu/usr.bin/perl/eg/scan/scan_ps @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/scan/scan_ps,v 1.1.1.1 1993/08/23 21:29:45 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/scan/scan_ps,v 1.1.1.1 1994/09/10 06:27:49 gclarkii Exp $ # This looks for looping processes. diff --git a/gnu/usr.bin/perl/eg/scan/scan_sudo b/gnu/usr.bin/perl/eg/scan/scan_sudo index a95a6092b467..09813cee0244 100644 --- a/gnu/usr.bin/perl/eg/scan/scan_sudo +++ b/gnu/usr.bin/perl/eg/scan/scan_sudo @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/scan/scan_sudo,v 1.1.1.1 1993/08/23 21:29:45 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/scan/scan_sudo,v 1.1.1.1 1994/09/10 06:27:49 gclarkii Exp $ # Analyze the sudo log. diff --git a/gnu/usr.bin/perl/eg/scan/scan_suid b/gnu/usr.bin/perl/eg/scan/scan_suid index a730e0aaee16..2d5d6b64c70c 100644 --- a/gnu/usr.bin/perl/eg/scan/scan_suid +++ b/gnu/usr.bin/perl/eg/scan/scan_suid @@ -1,6 +1,6 @@ #!/usr/bin/perl -P -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/scan/scan_suid,v 1.1.1.1 1993/08/23 21:29:44 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/scan/scan_suid,v 1.1.1.1 1994/09/10 06:27:49 gclarkii Exp $ # Look for new setuid root files. diff --git a/gnu/usr.bin/perl/eg/scan/scanner b/gnu/usr.bin/perl/eg/scan/scanner index f773e87e8f8a..5b24dc6c03ba 100644 --- a/gnu/usr.bin/perl/eg/scan/scanner +++ b/gnu/usr.bin/perl/eg/scan/scanner @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/scan/scanner,v 1.1.1.1 1993/08/23 21:29:44 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/scan/scanner,v 1.1.1.1 1994/09/10 06:27:48 gclarkii Exp $ # This runs all the scan_* routines on all the machines in /etc/ghosts. # We run this every morning at about 6 am: diff --git a/gnu/usr.bin/perl/eg/shmkill b/gnu/usr.bin/perl/eg/shmkill index e8d1b11b3630..967edee3d0d6 100644 --- a/gnu/usr.bin/perl/eg/shmkill +++ b/gnu/usr.bin/perl/eg/shmkill @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/shmkill,v 1.1.1.1 1993/08/23 21:29:43 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/shmkill,v 1.1.1.1 1994/09/10 06:27:47 gclarkii Exp $ # A script to call from crontab periodically when people are leaving shared # memory sitting around unattached. diff --git a/gnu/usr.bin/perl/eg/van/empty b/gnu/usr.bin/perl/eg/van/empty index ee656e68563f..61b606a42614 100644 --- a/gnu/usr.bin/perl/eg/van/empty +++ b/gnu/usr.bin/perl/eg/van/empty @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/van/empty,v 1.1.1.1 1993/08/23 21:29:45 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/van/empty,v 1.1.1.1 1994/09/10 06:27:49 gclarkii Exp $ # This script empties a trashcan. diff --git a/gnu/usr.bin/perl/eg/van/unvanish b/gnu/usr.bin/perl/eg/van/unvanish index 50459821546b..2e6655a4362e 100644 --- a/gnu/usr.bin/perl/eg/van/unvanish +++ b/gnu/usr.bin/perl/eg/van/unvanish @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/van/unvanish,v 1.1.1.1 1993/08/23 21:29:45 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/van/unvanish,v 1.1.1.1 1994/09/10 06:27:50 gclarkii Exp $ sub it { if ($olddir ne '.') { diff --git a/gnu/usr.bin/perl/eg/van/vanexp b/gnu/usr.bin/perl/eg/van/vanexp index 79b78854d54c..e494cf5d4180 100644 --- a/gnu/usr.bin/perl/eg/van/vanexp +++ b/gnu/usr.bin/perl/eg/van/vanexp @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/van/vanexp,v 1.1.1.1 1993/08/23 21:29:45 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/van/vanexp,v 1.1.1.1 1994/09/10 06:27:50 gclarkii Exp $ # This is for running from a find at night to expire old .deleteds diff --git a/gnu/usr.bin/perl/eg/van/vanish b/gnu/usr.bin/perl/eg/van/vanish index b79776a4ebdc..20a5d39bd463 100644 --- a/gnu/usr.bin/perl/eg/van/vanish +++ b/gnu/usr.bin/perl/eg/van/vanish @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Header: /home/cvs/386BSD/ports/lang/perl/eg/van/vanish,v 1.1.1.1 1993/08/23 21:29:45 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/eg/van/vanish,v 1.1.1.1 1994/09/10 06:27:50 gclarkii Exp $ sub it { if ($olddir ne '.') { diff --git a/gnu/usr.bin/perl/emacs/perldb.pl b/gnu/usr.bin/perl/emacs/perldb.pl index 7c9e6513ea0c..eaecb2251b7d 100644 --- a/gnu/usr.bin/perl/emacs/perldb.pl +++ b/gnu/usr.bin/perl/emacs/perldb.pl @@ -3,7 +3,7 @@ package DB; # modified Perl debugger, to be run from Emacs in perldb-mode # Ray Lischner (uunet!mntgfx!lisch) as of 5 Nov 1990 -$header = '$Header: /home/cvs/386BSD/ports/lang/perl/emacs/perldb.pl,v 1.1.1.1 1993/08/23 21:29:46 nate Exp $'; +$header = '$Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/emacs/perldb.pl,v 1.1.1.1 1994/09/10 06:27:50 gclarkii Exp $'; # # This file is automatically included if you do perl -d. # It's probably not useful to include this yourself. @@ -13,6 +13,9 @@ $header = '$Header: /home/cvs/386BSD/ports/lang/perl/emacs/perldb.pl,v 1.1.1.1 1 # have a breakpoint. It also inserts a do 'perldb.pl' before the first line. # # $Log: perldb.pl,v $ +# Revision 1.1.1.1 1994/09/10 06:27:50 gclarkii +# Initial import of Perl 4.046 bmaked +# # Revision 1.1.1.1 1993/08/23 21:29:46 nate # PERL! # diff --git a/gnu/usr.bin/perl/lib/Makefile b/gnu/usr.bin/perl/lib/Makefile index 158cbfa26c42..387824ba0708 100644 --- a/gnu/usr.bin/perl/lib/Makefile +++ b/gnu/usr.bin/perl/lib/Makefile @@ -2,14 +2,14 @@ PLIBDIR= ${DESTDIR}/usr/share/perl PLIB+= abbrev.pl assert.pl bigfloat.pl bigint.pl bigrat.pl cacheout.pl PLIB+= chat2.pl complete.pl ctime.pl dumpvar.pl exceptions.pl fastcwd.pl -PLIB+= find.pl finddepth.pl flush.pl getcwd.pl gethostname.pl getopts.pl -PLIB+= importenv.pl look.pl newgetopt.pl open2.pl perldb.pl pwd.pl -PLIB+= shellwords.pl stat.pl syslog.pl termcap.pl timelocal.pl validate.pl +PLIB+= find.pl finddepth.pl flush.pl getcwd.pl getopts.pl importenv.pl +PLIB+= look.pl newgetopt.pl open2.pl perldb.pl pwd.pl shellwords.pl +PLIB+= stat.pl syslog.pl termcap.pl timelocal.pl validate.pl NOOBJ= install: - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PLIB} ${PLIBDIR} + install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PLIB} ${PLIBDIR} clean: cleandir: diff --git a/gnu/usr.bin/perl/lib/importenv.pl b/gnu/usr.bin/perl/lib/importenv.pl index c9ad330b6d03..002d760add5e 100644 --- a/gnu/usr.bin/perl/lib/importenv.pl +++ b/gnu/usr.bin/perl/lib/importenv.pl @@ -1,4 +1,4 @@ -;# $Header: /home/cvs/386BSD/ports/lang/perl/lib/importenv.pl,v 1.1.1.1 1993/08/23 21:29:53 nate Exp $ +;# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/lib/importenv.pl,v 1.1.1.1 1994/09/10 06:27:52 gclarkii Exp $ ;# This file, when interpreted, pulls the environment into normal variables. ;# Usage: diff --git a/gnu/usr.bin/perl/lib/stat.pl b/gnu/usr.bin/perl/lib/stat.pl index 6186f5428d18..1fe8c90d96c0 100644 --- a/gnu/usr.bin/perl/lib/stat.pl +++ b/gnu/usr.bin/perl/lib/stat.pl @@ -1,4 +1,4 @@ -;# $Header: /home/cvs/386BSD/ports/lang/perl/lib/stat.pl,v 1.1.1.1 1993/08/23 21:29:53 nate Exp $ +;# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/lib/stat.pl,v 1.1.1.1 1994/09/10 06:27:53 gclarkii Exp $ ;# Usage: ;# require 'stat.pl'; diff --git a/gnu/usr.bin/perl/lib/validate.pl b/gnu/usr.bin/perl/lib/validate.pl index 4b901b6c314e..d54dba4a0d60 100644 --- a/gnu/usr.bin/perl/lib/validate.pl +++ b/gnu/usr.bin/perl/lib/validate.pl @@ -1,4 +1,4 @@ -;# $Header: /home/cvs/386BSD/ports/lang/perl/lib/validate.pl,v 1.1.1.1 1993/08/23 21:29:51 nate Exp $ +;# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/lib/validate.pl,v 1.1.1.1 1994/09/10 06:27:53 gclarkii Exp $ ;# The validate routine takes a single multiline string consisting of ;# lines containing a filename plus a file test to try on it. (The diff --git a/gnu/usr.bin/perl/perl/crypt.c b/gnu/usr.bin/perl/perl/crypt.c index 3e95f452cf7f..a60c30f771f7 100644 --- a/gnu/usr.bin/perl/perl/crypt.c +++ b/gnu/usr.bin/perl/perl/crypt.c @@ -36,7 +36,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /* from static char sccsid[] = "@(#)crypt.c 5.11 (Berkeley) 6/25/91"; */ -static char rcsid[] = "$Header: /home/ncvs/src/gnu/usr.bin/perl/perl/crypt.c,v 1.1.1.1 1994/09/10 06:27:37 gclarkii Exp $"; +static char rcsid[] = "$Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/crypt.c,v 1.2 1995/05/30 05:02:58 rgrimes Exp $"; #endif /* LIBC_SCCS and not lint */ #include <unistd.h> diff --git a/gnu/usr.bin/perl/perl/t/base/cond.t b/gnu/usr.bin/perl/perl/t/base/cond.t index 7d49f4e9b591..69b687033d5e 100755 --- a/gnu/usr.bin/perl/perl/t/base/cond.t +++ b/gnu/usr.bin/perl/perl/t/base/cond.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/base/cond.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/base/cond.t,v 1.1.1.1 1994/09/10 06:27:39 gclarkii Exp $ # make sure conditional operators work diff --git a/gnu/usr.bin/perl/perl/t/base/if.t b/gnu/usr.bin/perl/perl/t/base/if.t index 2a9b82c77e7d..2635eb0d97a1 100755 --- a/gnu/usr.bin/perl/perl/t/base/if.t +++ b/gnu/usr.bin/perl/perl/t/base/if.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/base/if.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/base/if.t,v 1.1.1.1 1994/09/10 06:27:39 gclarkii Exp $ print "1..2\n"; diff --git a/gnu/usr.bin/perl/perl/t/base/lex.t b/gnu/usr.bin/perl/perl/t/base/lex.t index cd6321d9f081..0c59d8ab84d7 100755 --- a/gnu/usr.bin/perl/perl/t/base/lex.t +++ b/gnu/usr.bin/perl/perl/t/base/lex.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/base/lex.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/base/lex.t,v 1.1.1.1 1994/09/10 06:27:39 gclarkii Exp $ print "1..18\n"; diff --git a/gnu/usr.bin/perl/perl/t/base/pat.t b/gnu/usr.bin/perl/perl/t/base/pat.t index 2c8d9a9f2b85..95d9aca91670 100755 --- a/gnu/usr.bin/perl/perl/t/base/pat.t +++ b/gnu/usr.bin/perl/perl/t/base/pat.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/base/pat.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/base/pat.t,v 1.1.1.1 1994/09/10 06:27:39 gclarkii Exp $ print "1..2\n"; diff --git a/gnu/usr.bin/perl/perl/t/base/term.t b/gnu/usr.bin/perl/perl/t/base/term.t index c049c5872364..ed057f69e7c6 100755 --- a/gnu/usr.bin/perl/perl/t/base/term.t +++ b/gnu/usr.bin/perl/perl/t/base/term.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/base/term.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/base/term.t,v 1.1.1.1 1994/09/10 06:27:39 gclarkii Exp $ print "1..6\n"; diff --git a/gnu/usr.bin/perl/perl/t/cmd/elsif.t b/gnu/usr.bin/perl/perl/t/cmd/elsif.t index 0e3457f6ad1f..a80983e02c04 100755 --- a/gnu/usr.bin/perl/perl/t/cmd/elsif.t +++ b/gnu/usr.bin/perl/perl/t/cmd/elsif.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/cmd/elsif.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/cmd/elsif.t,v 1.1.1.1 1994/09/10 06:27:39 gclarkii Exp $ sub foo { if ($_[0] == 1) { diff --git a/gnu/usr.bin/perl/perl/t/cmd/for.t b/gnu/usr.bin/perl/perl/t/cmd/for.t index 4a0c9226bae8..dc0ffcd68bdc 100755 --- a/gnu/usr.bin/perl/perl/t/cmd/for.t +++ b/gnu/usr.bin/perl/perl/t/cmd/for.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/cmd/for.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/cmd/for.t,v 1.1.1.1 1994/09/10 06:27:39 gclarkii Exp $ print "1..7\n"; diff --git a/gnu/usr.bin/perl/perl/t/cmd/mod.t b/gnu/usr.bin/perl/perl/t/cmd/mod.t index eeb44d97b5d8..7117ff6c2d1a 100755 --- a/gnu/usr.bin/perl/perl/t/cmd/mod.t +++ b/gnu/usr.bin/perl/perl/t/cmd/mod.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/cmd/mod.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/cmd/mod.t,v 1.1.1.1 1994/09/10 06:27:39 gclarkii Exp $ print "1..7\n"; diff --git a/gnu/usr.bin/perl/perl/t/cmd/switch.t b/gnu/usr.bin/perl/perl/t/cmd/switch.t index d0d4c932ad0d..fd33fc0a25b0 100755 --- a/gnu/usr.bin/perl/perl/t/cmd/switch.t +++ b/gnu/usr.bin/perl/perl/t/cmd/switch.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/cmd/switch.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/cmd/switch.t,v 1.1.1.1 1994/09/10 06:27:39 gclarkii Exp $ print "1..18\n"; diff --git a/gnu/usr.bin/perl/perl/t/cmd/while.t b/gnu/usr.bin/perl/perl/t/cmd/while.t index 006e251a9d2e..824c4d46d4e1 100755 --- a/gnu/usr.bin/perl/perl/t/cmd/while.t +++ b/gnu/usr.bin/perl/perl/t/cmd/while.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/cmd/while.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/cmd/while.t,v 1.1.1.1 1994/09/10 06:27:39 gclarkii Exp $ print "1..10\n"; diff --git a/gnu/usr.bin/perl/perl/t/comp/cmdopt.t b/gnu/usr.bin/perl/perl/t/comp/cmdopt.t index 3c47130602ca..f2eed8b37401 100755 --- a/gnu/usr.bin/perl/perl/t/comp/cmdopt.t +++ b/gnu/usr.bin/perl/perl/t/comp/cmdopt.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/comp/cmdopt.t,v 1.1.1.1 1993/08/23 21:30:06 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/comp/cmdopt.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ print "1..40\n"; diff --git a/gnu/usr.bin/perl/perl/t/comp/decl.t b/gnu/usr.bin/perl/perl/t/comp/decl.t index f1c84c2190ce..3158a64000cb 100755 --- a/gnu/usr.bin/perl/perl/t/comp/decl.t +++ b/gnu/usr.bin/perl/perl/t/comp/decl.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/comp/decl.t,v 1.1.1.1 1993/08/23 21:30:07 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/comp/decl.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ # check to see if subroutine declarations work everwhere diff --git a/gnu/usr.bin/perl/perl/t/comp/multiline.t b/gnu/usr.bin/perl/perl/t/comp/multiline.t index 78df482d3e7c..eb404c0355c3 100755 --- a/gnu/usr.bin/perl/perl/t/comp/multiline.t +++ b/gnu/usr.bin/perl/perl/t/comp/multiline.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/comp/multiline.t,v 1.1.1.1 1993/08/23 21:30:06 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/comp/multiline.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ print "1..5\n"; diff --git a/gnu/usr.bin/perl/perl/t/comp/script.t b/gnu/usr.bin/perl/perl/t/comp/script.t index 9dcf90195856..c2f6163f0a06 100755 --- a/gnu/usr.bin/perl/perl/t/comp/script.t +++ b/gnu/usr.bin/perl/perl/t/comp/script.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/comp/script.t,v 1.1.1.1 1993/08/23 21:30:06 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/comp/script.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ print "1..3\n"; diff --git a/gnu/usr.bin/perl/perl/t/comp/term.t b/gnu/usr.bin/perl/perl/t/comp/term.t index 70b23fd8a6ae..d8ce0adb061c 100755 --- a/gnu/usr.bin/perl/perl/t/comp/term.t +++ b/gnu/usr.bin/perl/perl/t/comp/term.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/comp/term.t,v 1.1.1.1 1993/08/23 21:30:06 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/comp/term.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ # tests that aren't important enough for base.term diff --git a/gnu/usr.bin/perl/perl/t/io/argv.t b/gnu/usr.bin/perl/perl/t/io/argv.t index 99c593620eee..e0db31da8a34 100755 --- a/gnu/usr.bin/perl/perl/t/io/argv.t +++ b/gnu/usr.bin/perl/perl/t/io/argv.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/io/argv.t,v 1.1.1.1 1993/08/23 21:30:06 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/io/argv.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ print "1..5\n"; diff --git a/gnu/usr.bin/perl/perl/t/io/dup.t b/gnu/usr.bin/perl/perl/t/io/dup.t index 8d11eca79973..5462c368e60e 100755 --- a/gnu/usr.bin/perl/perl/t/io/dup.t +++ b/gnu/usr.bin/perl/perl/t/io/dup.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/io/dup.t,v 1.1.1.1 1993/08/23 21:30:06 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/io/dup.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ print "1..6\n"; diff --git a/gnu/usr.bin/perl/perl/t/io/inplace.t b/gnu/usr.bin/perl/perl/t/io/inplace.t index b22afdaa4b98..3cd4c06a8632 100755 --- a/gnu/usr.bin/perl/perl/t/io/inplace.t +++ b/gnu/usr.bin/perl/perl/t/io/inplace.t @@ -2,7 +2,7 @@ $^I = '.bak'; -# $Header: /home/cvs/386BSD/ports/lang/perl/t/io/inplace.t,v 1.1.1.1 1993/08/23 21:30:05 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/io/inplace.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ print "1..2\n"; diff --git a/gnu/usr.bin/perl/perl/t/io/pipe.t b/gnu/usr.bin/perl/perl/t/io/pipe.t index 791a9c715f85..371d85881c3c 100755 --- a/gnu/usr.bin/perl/perl/t/io/pipe.t +++ b/gnu/usr.bin/perl/perl/t/io/pipe.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/io/pipe.t,v 1.1.1.1 1993/08/23 21:30:06 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/io/pipe.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ $| = 1; print "1..8\n"; diff --git a/gnu/usr.bin/perl/perl/t/io/print.t b/gnu/usr.bin/perl/perl/t/io/print.t index 11854427410b..67a71c05a2c2 100755 --- a/gnu/usr.bin/perl/perl/t/io/print.t +++ b/gnu/usr.bin/perl/perl/t/io/print.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/io/print.t,v 1.1.1.1 1993/08/23 21:30:06 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/io/print.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ print "1..16\n"; diff --git a/gnu/usr.bin/perl/perl/t/io/tell.t b/gnu/usr.bin/perl/perl/t/io/tell.t index 27e69a0fd7ee..3943b68f41cc 100755 --- a/gnu/usr.bin/perl/perl/t/io/tell.t +++ b/gnu/usr.bin/perl/perl/t/io/tell.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/io/tell.t,v 1.1.1.1 1993/08/23 21:30:06 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/io/tell.t,v 1.1.1.1 1994/09/10 06:27:40 gclarkii Exp $ print "1..13\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/append.t b/gnu/usr.bin/perl/perl/t/op/append.t index 92c6f48e80c4..38f8627bf7de 100755 --- a/gnu/usr.bin/perl/perl/t/op/append.t +++ b/gnu/usr.bin/perl/perl/t/op/append.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/append.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/append.t,v 1.1.1.1 1994/09/10 06:27:41 gclarkii Exp $ print "1..3\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/array.t b/gnu/usr.bin/perl/perl/t/op/array.t index 39e05e3fbbb4..8e7b5b9ce0c4 100755 --- a/gnu/usr.bin/perl/perl/t/op/array.t +++ b/gnu/usr.bin/perl/perl/t/op/array.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/array.t,v 1.1.1.1 1993/08/23 21:30:02 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/array.t,v 1.1.1.1 1994/09/10 06:27:41 gclarkii Exp $ print "1..36\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/auto.t b/gnu/usr.bin/perl/perl/t/op/auto.t index 5301f934d8ed..9ea0aa86186d 100755 --- a/gnu/usr.bin/perl/perl/t/op/auto.t +++ b/gnu/usr.bin/perl/perl/t/op/auto.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/auto.t,v 1.1.1.1 1993/08/23 21:30:01 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/auto.t,v 1.1.1.1 1994/09/10 06:27:41 gclarkii Exp $ print "1..34\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/chop.t b/gnu/usr.bin/perl/perl/t/op/chop.t index d691d734105b..89c9411e147f 100755 --- a/gnu/usr.bin/perl/perl/t/op/chop.t +++ b/gnu/usr.bin/perl/perl/t/op/chop.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/chop.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/chop.t,v 1.1.1.1 1994/09/10 06:27:41 gclarkii Exp $ print "1..4\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/cond.t b/gnu/usr.bin/perl/perl/t/op/cond.t index 054a5ff7f0d7..a263acd57d8b 100755 --- a/gnu/usr.bin/perl/perl/t/op/cond.t +++ b/gnu/usr.bin/perl/perl/t/op/cond.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/cond.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/cond.t,v 1.1.1.1 1994/09/10 06:27:41 gclarkii Exp $ print "1..4\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/delete.t b/gnu/usr.bin/perl/perl/t/op/delete.t index e4e1fea10658..4796f2294b46 100755 --- a/gnu/usr.bin/perl/perl/t/op/delete.t +++ b/gnu/usr.bin/perl/perl/t/op/delete.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/delete.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/delete.t,v 1.1.1.1 1994/09/10 06:27:41 gclarkii Exp $ print "1..6\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/do.t b/gnu/usr.bin/perl/perl/t/op/do.t index 370012c129b1..ca52c0970b7a 100755 --- a/gnu/usr.bin/perl/perl/t/op/do.t +++ b/gnu/usr.bin/perl/perl/t/op/do.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/do.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/do.t,v 1.1.1.1 1994/09/10 06:27:41 gclarkii Exp $ sub foo1 { diff --git a/gnu/usr.bin/perl/perl/t/op/each.t b/gnu/usr.bin/perl/perl/t/op/each.t index 532d1b01f3f4..2057b85a10a2 100755 --- a/gnu/usr.bin/perl/perl/t/op/each.t +++ b/gnu/usr.bin/perl/perl/t/op/each.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/each.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/each.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ print "1..3\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/exec.t b/gnu/usr.bin/perl/perl/t/op/exec.t index 69909f740790..e573830b9f78 100755 --- a/gnu/usr.bin/perl/perl/t/op/exec.t +++ b/gnu/usr.bin/perl/perl/t/op/exec.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/exec.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/exec.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ $| = 1; # flush stdout print "1..8\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/exp.t b/gnu/usr.bin/perl/perl/t/op/exp.t index 2195e54067d6..f3c8d2e3c36d 100755 --- a/gnu/usr.bin/perl/perl/t/op/exp.t +++ b/gnu/usr.bin/perl/perl/t/op/exp.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/exp.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/exp.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ print "1..6\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/flip.t b/gnu/usr.bin/perl/perl/t/op/flip.t index 74ba5085ac5f..a2f2dbed94b1 100755 --- a/gnu/usr.bin/perl/perl/t/op/flip.t +++ b/gnu/usr.bin/perl/perl/t/op/flip.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/flip.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/flip.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ print "1..8\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/fork.t b/gnu/usr.bin/perl/perl/t/op/fork.t index 10b54a2a2c5b..9a7df615b125 100755 --- a/gnu/usr.bin/perl/perl/t/op/fork.t +++ b/gnu/usr.bin/perl/perl/t/op/fork.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/fork.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/fork.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ $| = 1; print "1..2\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/glob.t b/gnu/usr.bin/perl/perl/t/op/glob.t index 68b0844cad74..e1afdde5e8f2 100755 --- a/gnu/usr.bin/perl/perl/t/op/glob.t +++ b/gnu/usr.bin/perl/perl/t/op/glob.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/glob.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/glob.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ print "1..4\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/index.t b/gnu/usr.bin/perl/perl/t/op/index.t index 769314b5e37f..82ee07997586 100755 --- a/gnu/usr.bin/perl/perl/t/op/index.t +++ b/gnu/usr.bin/perl/perl/t/op/index.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/index.t,v 1.1.1.1 1993/08/23 21:30:01 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/index.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ print "1..20\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/int.t b/gnu/usr.bin/perl/perl/t/op/int.t index 09434b8675a6..be87f5f92f9c 100755 --- a/gnu/usr.bin/perl/perl/t/op/int.t +++ b/gnu/usr.bin/perl/perl/t/op/int.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/int.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/int.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ print "1..4\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/join.t b/gnu/usr.bin/perl/perl/t/op/join.t index a6678e979011..8b46640105bb 100755 --- a/gnu/usr.bin/perl/perl/t/op/join.t +++ b/gnu/usr.bin/perl/perl/t/op/join.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/join.t,v 1.1.1.1 1993/08/23 21:30:02 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/join.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ print "1..3\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/list.t b/gnu/usr.bin/perl/perl/t/op/list.t index 52b2347bfd30..c1d03b425be3 100755 --- a/gnu/usr.bin/perl/perl/t/op/list.t +++ b/gnu/usr.bin/perl/perl/t/op/list.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/list.t,v 1.1.1.1 1993/08/23 21:30:02 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/list.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ print "1..27\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/local.t b/gnu/usr.bin/perl/perl/t/op/local.t index 67396e7cddeb..d2d1224f8861 100755 --- a/gnu/usr.bin/perl/perl/t/op/local.t +++ b/gnu/usr.bin/perl/perl/t/op/local.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/local.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/local.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ print "1..20\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/magic.t b/gnu/usr.bin/perl/perl/t/op/magic.t index 1f47a9936ace..da9eb7e9a18a 100755 --- a/gnu/usr.bin/perl/perl/t/op/magic.t +++ b/gnu/usr.bin/perl/perl/t/op/magic.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/magic.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/magic.t,v 1.1.1.1 1994/09/10 06:27:42 gclarkii Exp $ $| = 1; # command buffering diff --git a/gnu/usr.bin/perl/perl/t/op/mkdir.t b/gnu/usr.bin/perl/perl/t/op/mkdir.t index 0290ed4e5bbc..ba9d400f724e 100755 --- a/gnu/usr.bin/perl/perl/t/op/mkdir.t +++ b/gnu/usr.bin/perl/perl/t/op/mkdir.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/mkdir.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/mkdir.t,v 1.1.1.1 1994/09/10 06:27:43 gclarkii Exp $ print "1..7\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/oct.t b/gnu/usr.bin/perl/perl/t/op/oct.t index 9322cf0e73e1..351cc68e4a09 100755 --- a/gnu/usr.bin/perl/perl/t/op/oct.t +++ b/gnu/usr.bin/perl/perl/t/op/oct.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/oct.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/oct.t,v 1.1.1.1 1994/09/10 06:27:43 gclarkii Exp $ print "1..3\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/ord.t b/gnu/usr.bin/perl/perl/t/op/ord.t index 9d319882d4fe..0ee5610c04ca 100755 --- a/gnu/usr.bin/perl/perl/t/op/ord.t +++ b/gnu/usr.bin/perl/perl/t/op/ord.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/ord.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/ord.t,v 1.1.1.1 1994/09/10 06:27:43 gclarkii Exp $ print "1..2\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/pack.t b/gnu/usr.bin/perl/perl/t/op/pack.t index 1dfaddf370ef..2b81445f6630 100755 --- a/gnu/usr.bin/perl/perl/t/op/pack.t +++ b/gnu/usr.bin/perl/perl/t/op/pack.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/pack.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/pack.t,v 1.1.1.1 1994/09/10 06:27:43 gclarkii Exp $ print "1..3\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/push.t b/gnu/usr.bin/perl/perl/t/op/push.t index 3d738acfbda3..893bc16b6eb6 100755 --- a/gnu/usr.bin/perl/perl/t/op/push.t +++ b/gnu/usr.bin/perl/perl/t/op/push.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/push.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/push.t,v 1.1.1.1 1994/09/10 06:27:43 gclarkii Exp $ @tests = split(/\n/, <<EOF); 0 3, 0 1 2, 3 4 5 6 7 diff --git a/gnu/usr.bin/perl/perl/t/op/range.t b/gnu/usr.bin/perl/perl/t/op/range.t index 6214f9527b99..dbcade62e553 100755 --- a/gnu/usr.bin/perl/perl/t/op/range.t +++ b/gnu/usr.bin/perl/perl/t/op/range.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/range.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/range.t,v 1.1.1.1 1994/09/10 06:27:43 gclarkii Exp $ print "1..8\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/read.t b/gnu/usr.bin/perl/perl/t/op/read.t index 4151e5c6a674..d36c6ac7d50f 100755 --- a/gnu/usr.bin/perl/perl/t/op/read.t +++ b/gnu/usr.bin/perl/perl/t/op/read.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/read.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/read.t,v 1.1.1.1 1994/09/10 06:27:43 gclarkii Exp $ print "1..4\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/repeat.t b/gnu/usr.bin/perl/perl/t/op/repeat.t index 68c61fc6a05e..60695d957a98 100755 --- a/gnu/usr.bin/perl/perl/t/op/repeat.t +++ b/gnu/usr.bin/perl/perl/t/op/repeat.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/repeat.t,v 1.1.1.1 1993/08/23 21:30:02 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/repeat.t,v 1.1.1.1 1994/09/10 06:27:43 gclarkii Exp $ print "1..19\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/s.t b/gnu/usr.bin/perl/perl/t/op/s.t index 59300209cd39..1ce76a598e77 100755 --- a/gnu/usr.bin/perl/perl/t/op/s.t +++ b/gnu/usr.bin/perl/perl/t/op/s.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/s.t,v 1.1.1.1 1993/08/23 21:30:01 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/s.t,v 1.1.1.1 1994/09/10 06:27:43 gclarkii Exp $ print "1..51\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/sleep.t b/gnu/usr.bin/perl/perl/t/op/sleep.t index 81113712d343..b9ca93a339e5 100755 --- a/gnu/usr.bin/perl/perl/t/op/sleep.t +++ b/gnu/usr.bin/perl/perl/t/op/sleep.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/sleep.t,v 1.1.1.1 1993/08/23 21:30:04 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/sleep.t,v 1.1.1.1 1994/09/10 06:27:45 gclarkii Exp $ print "1..1\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/split.t b/gnu/usr.bin/perl/perl/t/op/split.t index 63bf3c7c76da..20b969c201eb 100755 --- a/gnu/usr.bin/perl/perl/t/op/split.t +++ b/gnu/usr.bin/perl/perl/t/op/split.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/split.t,v 1.1.1.1 1993/08/23 21:30:02 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/split.t,v 1.1.1.1 1994/09/10 06:27:46 gclarkii Exp $ print "1..12\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/sprintf.t b/gnu/usr.bin/perl/perl/t/op/sprintf.t index cdb4af5a2244..7b822078edd1 100755 --- a/gnu/usr.bin/perl/perl/t/op/sprintf.t +++ b/gnu/usr.bin/perl/perl/t/op/sprintf.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/sprintf.t,v 1.1.1.1 1993/08/23 21:30:01 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/sprintf.t,v 1.1.1.1 1994/09/10 06:27:46 gclarkii Exp $ print "1..1\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/study.t b/gnu/usr.bin/perl/perl/t/op/study.t index a0fdc4cd273c..4b8eaf72c852 100755 --- a/gnu/usr.bin/perl/perl/t/op/study.t +++ b/gnu/usr.bin/perl/perl/t/op/study.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/study.t,v 1.1.1.1 1993/08/23 21:30:02 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/study.t,v 1.1.1.1 1994/09/10 06:27:46 gclarkii Exp $ print "1..24\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/substr.t b/gnu/usr.bin/perl/perl/t/op/substr.t index 09f312f83762..edeef1bb76cf 100755 --- a/gnu/usr.bin/perl/perl/t/op/substr.t +++ b/gnu/usr.bin/perl/perl/t/op/substr.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/substr.t,v 1.1.1.1 1993/08/23 21:30:01 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/substr.t,v 1.1.1.1 1994/09/10 06:27:46 gclarkii Exp $ print "1..22\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/time.t b/gnu/usr.bin/perl/perl/t/op/time.t index f8e5545f7b41..3b26bfe53231 100755 --- a/gnu/usr.bin/perl/perl/t/op/time.t +++ b/gnu/usr.bin/perl/perl/t/op/time.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/time.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/time.t,v 1.1.1.1 1994/09/10 06:27:46 gclarkii Exp $ print "1..5\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/undef.t b/gnu/usr.bin/perl/perl/t/op/undef.t index b4827db0c547..b95cc0c6a531 100755 --- a/gnu/usr.bin/perl/perl/t/op/undef.t +++ b/gnu/usr.bin/perl/perl/t/op/undef.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/undef.t,v 1.1.1.1 1993/08/23 21:30:02 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/undef.t,v 1.1.1.1 1994/09/10 06:27:46 gclarkii Exp $ print "1..21\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/unshift.t b/gnu/usr.bin/perl/perl/t/op/unshift.t index 53d73883822b..3f5ffbdf14e0 100755 --- a/gnu/usr.bin/perl/perl/t/op/unshift.t +++ b/gnu/usr.bin/perl/perl/t/op/unshift.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/unshift.t,v 1.1.1.1 1993/08/23 21:30:02 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/unshift.t,v 1.1.1.1 1994/09/10 06:27:46 gclarkii Exp $ print "1..2\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/vec.t b/gnu/usr.bin/perl/perl/t/op/vec.t index 51344769b6cf..9abe64d95234 100755 --- a/gnu/usr.bin/perl/perl/t/op/vec.t +++ b/gnu/usr.bin/perl/perl/t/op/vec.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/vec.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/vec.t,v 1.1.1.1 1994/09/10 06:27:46 gclarkii Exp $ print "1..13\n"; diff --git a/gnu/usr.bin/perl/perl/t/op/write.t b/gnu/usr.bin/perl/perl/t/op/write.t index d17f1951bb76..041ef5a6dc06 100755 --- a/gnu/usr.bin/perl/perl/t/op/write.t +++ b/gnu/usr.bin/perl/perl/t/op/write.t @@ -1,6 +1,6 @@ #!./perl -# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/write.t,v 1.1.1.1 1993/08/23 21:30:02 nate Exp $ +# $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/perl/t/op/write.t,v 1.1.1.1 1994/09/10 06:27:46 gclarkii Exp $ print "1..3\n"; diff --git a/gnu/usr.bin/perl/x2p/Makefile b/gnu/usr.bin/perl/x2p/Makefile index 8057dfbb9ad8..cc6c2fe58dbc 100644 --- a/gnu/usr.bin/perl/x2p/Makefile +++ b/gnu/usr.bin/perl/x2p/Makefile @@ -11,9 +11,9 @@ DPADD= ${LIBM} MAN1+= a2p.1 s2p.1 h2ph.1 beforeinstall: - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 ${.CURDIR}/s2p \ + install -c -o ${BINOWN} -g ${BINGRP} -m 555 ${.CURDIR}/s2p \ ${DESTDIR}${BINDIR} - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 ${.CURDIR}/h2ph \ + install -c -o ${BINOWN} -g ${BINGRP} -m 555 ${.CURDIR}/h2ph \ ${DESTDIR}${BINDIR} afterinstall: diff --git a/gnu/usr.bin/perl/x2p/a2p.1 b/gnu/usr.bin/perl/x2p/a2p.1 index 58d8c077fafd..6cbe3d191ca9 100644 --- a/gnu/usr.bin/perl/x2p/a2p.1 +++ b/gnu/usr.bin/perl/x2p/a2p.1 @@ -1,7 +1,10 @@ .rn '' }` -''' $Header: /home/cvs/386BSD/ports/lang/perl/x2p/a2p.man,v 1.1.1.1 1993/08/23 21:30:10 nate Exp $ +''' $Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/perl/x2p/a2p.1,v 1.1.1.1 1994/09/10 06:27:55 gclarkii Exp $ ''' -''' $Log: a2p.man,v $ +''' $Log: a2p.1,v $ +.\" Revision 1.1.1.1 1994/09/10 06:27:55 gclarkii +.\" Initial import of Perl 4.046 bmaked +.\" .\" Revision 1.1.1.1 1993/08/23 21:30:10 nate .\" PERL! .\" diff --git a/gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.sh b/gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.sh index e7ef3fdfc324..cdf622f84626 100644 --- a/gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.sh +++ b/gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.sh @@ -25,7 +25,7 @@ # {RCS/}.rcsfreeze.ver version number # {RCS/}.rscfreeze.log log messages, most recent first -PATH=/bin:/usr/bin:$PATH +PATH=/usr/local/bin:/bin:/usr/bin:/usr/ucb:$PATH export PATH DATE=`date` || exit diff --git a/gnu/usr.bin/rcs/rcstest b/gnu/usr.bin/rcs/rcstest index 6eca1f55f1ca..7363a6d26602 100755 --- a/gnu/usr.bin/rcs/rcstest +++ b/gnu/usr.bin/rcs/rcstest @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh # Test RCS's functions. # The RCS commands are searched for in the PATH as usual; @@ -18,7 +18,7 @@ # $Id: rcstest,v 1.1.1.1 1993/06/18 04:22:10 jkh Exp $ -# Copyright 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert +# Copyright 1990, 1991 by Paul Eggert # Distributed under license by the Free Software Foundation, Inc. # # This file is part of RCS. @@ -34,23 +34,13 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with RCS; see the file COPYING. -# If not, write to the Free Software Foundation, -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with RCS; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # # Report problems and direct all questions to: # # rcs-bugs@cs.purdue.edu -# The Makefile overrides the following defaults. -: ${ALL_CFLAGS=-Dhas_conf_h} -: ${CC=cc} -: ${DIFF=diff} -# : ${LDFLAGS=} ${LIBS=} tickles old shell bug - -CL="$CC $ALL_CFLAGS $LDFLAGS -o a.out" -L=$LIBS - RCSINIT=-x export RCSINIT @@ -65,26 +55,26 @@ case $1 in *) echo >&2 "$0: usage: $0 [-v]"; exit 2 esac -if test -d RCS -then rmdir=: -else rmdir=rmdir; mkdir RCS || exit -fi +test -d RCS || { + echo >&2 "$0: RCS: not a directory; please \`mkdir RCS' first." + exit 1 +} rm -f a.* $RCSfile $RCS_alt $lockfile && echo 1.1 >a.11 && echo 1.1.1.1 >a.3x1 && echo 1.2 >a.12 || { echo "#initialization failed"; exit 2; } -case "`$DIFF -c a.11 a.3x1`" in -*!\ 1.1.1.1) - diff="$DIFF -c";; +case `diff -c a.11 a.3x1` in +*'! 1.1.1.1') + diff='diff -c';; *) - echo "#warning: $DIFF -c does not work, so diagnostics may be cryptic" - diff=$DIFF + echo "#warning: diff -c does not work, so diagnostics may be cryptic" + diff=diff esac rcs -i -L -ta.11 $q a.c && -test -r $RCSfile || { +<$RCSfile || { echo "#rcs -i -L failed; perhaps RCS is not properly installed." exit 1 } @@ -94,7 +84,7 @@ rm -f $RCSfile || exit 2 cp a.11 a.c && ci -ta.11 -mm $q a.c && -test -r $RCSfile && +<$RCSfile && rcs -L $q a.c || { echo "#ci+rcs -L failed"; exit 1; } test ! -f a.c || { echo "#ci did not remove working file"; exit 1; } for l in '' '-l' @@ -109,7 +99,6 @@ ci -mm $q a.c && co $q a.c && $diff a.12 a.c || { echo "#ci+co failed"; exit 1; } -rm -f a.c && co -r1.1 $q a.c && $diff a.11 a.c || { echo "#can't retrieve first revision"; exit 1; } @@ -119,24 +108,21 @@ ci -r1.1.1 -mm $q a.c && co -r1.1.1.1 $q a.c && $diff a.3x1 a.c || { echo "#branches failed"; exit 1; } -rm -f a.c && co -l $q a.c && ci -f -mm $q a.c && co -r1.3 $q a.c && $diff a.12 a.c || { echo "#(co -l; ci -f) failed"; exit 1; } -rm -f a.c && co -l $q a.c && echo 1.4 >a.c && ci -l -mm $q a.c && echo error >a.c && ci -mm $q a.c || { echo "#ci -l failed"; exit 1; } -rm -f a.c && co -l $q a.c && echo 1.5 >a.c && ci -u -mm $q a.c && -test -r a.c || { echo "#ci -u didn't create a working file"; exit 1; } +<a.c || { echo "#ci -u didn't create a working file"; exit 1; } rm -f a.c && echo error >a.c || exit 2 ci -mm $q a.c 2>/dev/null && { echo "#ci -u didn't unlock the file"; exit 1; } @@ -180,28 +166,42 @@ case $LOGNAME in esac esac esac - - -# Get the date of the previous revision in UTC. -date=`rlog -r a.c | sed -n '/^date: /{ s///; s/;.*//; p; q; }'` || exit -case $date in -[0-9][0-9][0-9]*[0-9]/[0-1][0-9]/[0-3][0-9]\ [0-2][0-9]:[0-5][0-9]:[0-6][0-9]);; -*) echo >&2 "$0: $date: bad rlog date output"; exit 1 +date=`date -u 2>/dev/null` || +date=`TZ=GMT0 date 2>/dev/null` || +date=`TZ= date` || exit 2 +set $date +case $2 in +Jan) m=01;; Feb) m=02;; Mar) m=03;; Apr) m=04;; May) m=05;; Jun) m=06;; +Jul) m=07;; Aug) m=08;; Sep) m=09;; Oct) m=10;; Nov) m=11;; Dec) m=12;; +*) echo >&2 "$0: $2: unknown month name"; exit 2 esac -PWD=`pwd` && export PWD && -rm -f a.c && +case $3 in +?) d=0$3;; +*) d=$3 +esac +case $6 in +[0-9][0-9][0-9][0-9]*) D=$6/$m/$d;; +*) + case $5 in + [0-9][0-9][0-9][0-9]*) D=$5/$m/$d;; + *) echo >&2 "$0: bad date format: $date"; exit 2 + esac +esac +T=$4 +case $PWD in +'') PWD=`pwd` +esac && co -l $q a.c && sed 's/@/$/g' >a.kv <<EOF @Author: w @ -@Date: $date @ -@Header: $PWD$SLASH$RCSfile 2.1 $date w s @ -@Id: a.c 2.1 $date w s @ +@Date: $D $T @ +@Header: $PWD$SLASH$RCSfile 2.1 $D $T w s @ +@Id: a.c 2.1 $D $T w s @ @Locker: @ - * @Log: a.c @ - * Revision 2.1 $date w +@Log: a.c @ + * Revision 2.1 $D $T w * m * -@Name: Oz @ @RCSfile: a.c @ @Revision: 2.1 @ @Source: $PWD$SLASH$RCSfile @ @@ -210,28 +210,25 @@ EOF test $? = 0 && sed 's/:.*\$/$/' a.kv >a.k && sed -e 's/w s [$]/w s '"$me"' $/' -e 's/[$]Locker: /&'"$me/" a.kv >a.kvl && -sed s/Oz//g a.kv >a.e && -sed s/Oz/N/g a.kv >a.N && -sed -e '/\$/!d' -e 's/\$$/: old $/' a.k >a.o && +sed -e '/^\$/!d' -e 's/\$$/: old $/' a.k >a.o && sed -e 's/\$[^ ]*: //' -e 's/ \$//' a.kv >a.v && cp a.o a.c && -ci -d"$date" -nOz -ss -ww -u2.1 -mm $q a.c && +ci -d"$date" -ss -ww -u2.1 -mm $q a.c && $diff a.kv a.c || { echo "#keyword expansion failed"; exit 1; } -co -pOz -ko $q a.c >a.oo && +co -p -ko $q a.c >a.oo && $diff a.o a.oo || { echo "#co -p -ko failed"; exit 1; } -cp a.kv a.o && cp a.o a.b || exit 2 -rcs -oOz $q a.c && +cp a.kv a.o || exit 2 +rcs -o2.1 $q a.c && rcs -l $q a.c && ci -k -u $q a.c && $diff a.kv a.c || { echo "#ci -k failed"; exit 1; } -sed -n 's/^[^$]*\$/$/p' a.kv >a.i && +sed '/^[^$]/d' a.kv >a.i && ident a.c >a.i1 && sed -e 1d -e 's/^[ ]*//' a.i1 >a.i2 && $diff a.i a.i2 || { echo "#ident failed"; exit 1; } rcs -i $q a.c 2>/dev/null && { echo "#rcs -i permitted existing file"; exit 1; } -rm -f a.c && co -l $q a.c && echo 2.2 >a.c && ci -mm $q a.c && @@ -262,73 +259,40 @@ rcs -nN:1.1 $q a.c && co -rN $q a.c && $diff a.11 a.c || { echo "#rcs -n failed"; exit 1; } -rm -f a.c && rcs -NN:2.1 $q a.c && co -rN $q a.c && -$diff a.N a.c || { echo "#rcs -N failed"; exit 1; } +$diff a.kv a.c || { echo "#rcs -N failed"; exit 1; } -rm -f a.c && co -l $q a.c && -echo ':::$''Log$' >a.c && +rcs -c':::' $q a.c && +echo '$''Log$' >a.c && ci -u -mm $q a.c && -test " `sed '$!d' a.c`" = ' :::' || { echo "#comment leader failed"; exit 1; } +test " `sed '$!d' a.c`" = ' :::' || { echo "#rcs -c failed"; exit 1; } -rm -f a.c && rcs -o2.2: $q a.c && co $q a.c && -$diff a.e a.c || { echo "#rcs -o failed"; exit 1; } +$diff a.kv a.c || { echo "#rcs -o failed"; exit 1; } -rcsdiff -r1.1 -rOz $q a.c >a.0 +rcsdiff -r1.1 -r2.1 $q a.c >a.0 case $? in 1) ;; *) echo "#rcsdiff bad status"; exit 1 esac -$DIFF a.11 a.kv >a.1 +diff a.11 a.kv >a.1 $diff a.0 a.1 || { echo "#rcsdiff failed"; exit 1; } rcs -l2.1 $q a.c || { echo "#rcs -l2.1 failed"; exit 1; } -for i in b k kv kvl o v +for i in k kv kvl o v do rm -f a.c && cp a.$i a.c && - rcsdiff -k$i -rOz $q a.c || { echo "#rcsdiff -k$i failed"; exit 1; } + rcsdiff -k$i $q a.c || { echo "#rcsdiff -k$i failed"; exit 1; } done co -p1.1 -ko $q a.c >a.t && $diff a.11 a.t || { echo "#co -p1.1 -ko failed"; exit 1; } rcs -u2.1 $q a.c || { echo "#rcs -u2.1 failed"; exit 1; } rm -f a.c && -rcsclean $q a.c && -rcsclean -u $q a.c || { echo "#rcsclean botched a nonexistent file"; exit 1; } - -rm -f a.c && -co $q a.c && -rcsclean -n $q a.c && -rcsclean -n -u $q a.c && -test -f a.c || { echo "#rcsclean -n removed a file"; exit 1; } - -rm -f a.c && -co $q a.c && -rcsclean $q a.c && -test ! -f a.c || { echo "#rcsclean missed an unlocked file"; exit 1; } - -rm -f a.c && -co -l $q a.c && -rcsclean $q a.c && -test -f a.c || { echo "#rcsclean removed a locked file"; exit 1; } -rcsclean -u $q a.c && -test ! -f a.c || { - echo "#rcsclean -u missed an unchanged locked file"; exit 1; -} - -rm -f a.c && -co -l $q a.c && -echo change >>a.c && -rcsclean $q a.c && -rcsclean $q -u a.c && -test -f a.c || { echo "#rcsclean removed a changed file"; exit 1; } - -rm -f a.c && co -l $q a.c && cat >a.c <<'EOF' 2.2 @@ -360,7 +324,7 @@ b1 c d1 EOF -rcsmerge -E -r2.2 -r2.3 $q a.c +rcsmerge -r2.2 -r2.3 $q a.c case $? in 0) if $diff a.0 a.c >/dev/null @@ -379,36 +343,16 @@ case $? in echo "#rcsmerge bad status"; exit 1 esac -# Avoid `tr' if possible; it's not portable, and it can't handle null bytes. -# Our substitute exclusive-ORs with '\n'; -# this ensures null bytes on output, which is even better than `tr', -# since some diffs think a file is binary only if it contains null bytes. -cat >a.c <<'EOF' -#include <stdio.h> -int main() { - int c; - while ((c=getchar()) != EOF) - putchar(c ^ '\n'); - return 0; -} -EOF -tr=tr -if (rm -f a.exe a.out && $CL a.c $L >&2) >/dev/null 2>&1 -then - if test -s a.out - then tr=./a.out - elif test -s a.exe - then tr=./a.exe - fi -fi +nl=' +' { - co -p $q a.c | $tr '\012' '\200' >a.24 && + co -p $q a.c | tr "$nl" '\200' >a.24 && cp a.24 a.c && ciOut=`(ci -l -mm $q a.c 2>&1)` && case $ciOut in ?*) echo >&2 "$ciOut" esac && - co -p $q a.c | $tr '\200' '\012' >a.c && + co -p $q a.c | tr '\200' "$nl" >a.c && rcsdiff -r2.3 $q a.c >/dev/null && echo 2.5 >a.c && @@ -434,15 +378,15 @@ locks: strict access list: symbolic names: N: 2.1 - Oz: 2.1 n: 1.8 +comment leader: ":::" keyword substitution: kv total revisions: 13; selected revisions: 1 description: 1.1 ---------------------------- revision 2.1 -date: $date; author: w; state: s; lines: +14 -1 +date: $D $T; author: w; state: s; lines: +13 -1 ============================================================================= EOF test $? = 0 || { echo "#rlog failed"; exit 1; } @@ -450,5 +394,4 @@ test $? = 0 || { echo "#rlog failed"; exit 1; } test ! -f $lockfile || { echo "#lock file not removed"; exit 1; } -rm -f a.* $RCSfile $RCS_alt -$rmdir RCS +exec rm -f a.* $RCSfile $RCS_alt diff --git a/gnu/usr.bin/send-pr/Makefile b/gnu/usr.bin/send-pr/Makefile index a6e4d222f975..a3a765be3993 100644 --- a/gnu/usr.bin/send-pr/Makefile +++ b/gnu/usr.bin/send-pr/Makefile @@ -4,15 +4,11 @@ MAN1= send-pr.1 SUBMITTERS= current-users -RELEASE= `uname -rsm` -RELEASE_EV!= uname -rsm +RELEASE!= uname -rsm CLEANFILES+= send-pr send-pr.el SUBDIR+= doc -LINKS= ${BINDIR}/send-pr ${BINDIR}/sendbug -MLINKS= send-pr.1 sendbug.1 - all: send-pr _PROGSUBDIR send-pr: send-pr.sh Makefile @@ -23,14 +19,14 @@ send-pr: send-pr.sh Makefile send-pr.el: send-pr-el.in Makefile sed -e 's,@DATADIR@,/etc,g' \ - -e 's/@DEFAULT_RELEASE@/$(RELEASE_EV)/g' \ + -e 's/@DEFAULT_RELEASE@/$(RELEASE)/g' \ -e 's/"unknown"/"$(SUBMITTERS)"/g' \ ${.ALLSRC:N*Makefile} > ${.TARGET} beforeinstall: - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ send-pr ${DESTDIR}${BINDIR}/send-pr - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 0644 \ + install -c -o ${BINOWN} -g ${BINGRP} -m 0644 \ ${.CURDIR}/categories ${DESTDIR}/etc/gnats/freefall .include <bsd.prog.mk> diff --git a/gnu/usr.bin/send-pr/send-pr.1 b/gnu/usr.bin/send-pr/send-pr.1 index af29f44a11e9..3717ebd90c17 100644 --- a/gnu/usr.bin/send-pr/send-pr.1 +++ b/gnu/usr.bin/send-pr/send-pr.1 @@ -237,6 +237,15 @@ for installation instructions. .I Reporting Problems Using send-pr (also installed as the GNU Info file .BR send-pr.info ). +.LP +.BR gnats (l), +.BR query-pr (1), +.BR edit-pr (1), +.BR gnats (8), +.BR queue-pr (8), +.BR at-pr (8), +.BR mkcat (8), +.BR mkdist (8). .SH AUTHORS Jeffrey Osier, Brendan Kehoe, Jason Merrill, Heinz G. Seidl (Cygnus Support) diff --git a/gnu/usr.bin/sort/Makefile b/gnu/usr.bin/sort/Makefile index 73d919cf5eb9..78eb30de1716 100644 --- a/gnu/usr.bin/sort/Makefile +++ b/gnu/usr.bin/sort/Makefile @@ -1,6 +1,11 @@ PROG= sort -SRCS= sort.c error.c version.c long-options.c getopt.c getopt1.c xstrtod.c +SRCS= sort.c error.c version.c long-options.c getopt.c getopt1.c + +CFLAGS+=-I${.CURDIR} -DDIRENT=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_LONG_DOUBLE=1 \ + -DHAVE_ST_BLKSIZE=1 -DHAVE_VPRINTF=1 -DRETSIGTYPE=void \ + -DSTDC_HEADERS=1 -DHAVE_STRERROR=1 -DHAVE_FCNTL_H=1 \ + -DHAVE_LIMITS_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRING_H=1 \ + -DHAVE_UNISTD_H=1 -CFLAGS+=-I${.CURDIR} -DHAVE_CONFIG_H .include <bsd.prog.mk> diff --git a/gnu/usr.bin/sort/error.c b/gnu/usr.bin/sort/error.c index 21a9ca4df64d..611f220d07d2 100644 --- a/gnu/usr.bin/sort/error.c +++ b/gnu/usr.bin/sort/error.c @@ -1,5 +1,5 @@ /* error.c -- error handler for noninteractive utilities - Copyright (C) 1990, 91, 92, 93, 94, 95 Free Software Foundation, Inc. + Copyright (C) 1990, 1991, 1992, 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 @@ -15,55 +15,53 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */ +/* Written by David MacKenzie. */ #ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use <config.h> instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ #include <config.h> +#else +#include "config.h" +#endif #endif #include <stdio.h> -#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC -# if __STDC__ -# include <stdarg.h> -# define VA_START(args, lastarg) va_start(args, lastarg) -# else -# include <varargs.h> -# define VA_START(args, lastarg) va_start(args) -# endif -#else -# define va_alist a1, a2, a3, a4, a5, a6, a7, a8 -# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8; -#endif +#ifdef HAVE_VPRINTF -#if STDC_HEADERS || _LIBC -# include <stdlib.h> -# include <string.h> -#else -void exit (); -#endif +#if __STDC__ +#include <stdarg.h> +#define VA_START(args, lastarg) va_start(args, lastarg) +#else /* !__STDC__ */ +#include <varargs.h> +#define VA_START(args, lastarg) va_start(args) +#endif /* !__STDC__ */ -/* This variable is incremented each time `error' is called. */ -unsigned int error_message_count; +#else /* !HAVE_VPRINTF */ -/* If NULL, error will flush stdout, then print on stderr the program - name, a colon and a space. Otherwise, error will call this - function without parameters instead. */ -void (*error_print_progname) () = NULL; +#ifdef HAVE_DOPRNT +#define va_alist args +#define va_dcl int args; +#else /* !HAVE_DOPRNT */ +#define va_alist a1, a2, a3, a4, a5, a6, a7, a8 +#define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8; +#endif /* !HAVE_DOPRNT */ -#ifdef _LIBC -#define program_name program_invocation_name -#endif +#endif /* !HAVE_VPRINTF */ + +#ifdef STDC_HEADERS +#include <stdlib.h> +#include <string.h> +#else /* !STDC_HEADERS */ +void exit (); +#endif /* !STDC_HEADERS */ -/* The calling program should define program_name and set it to the - name of the executing program. */ extern char *program_name; -#if HAVE_STRERROR || _LIBC -# ifndef strerror /* On some systems, strerror is a macro */ -char *strerror (); -# endif -#else +#ifndef HAVE_STRERROR static char * private_strerror (errnum) int errnum; @@ -75,51 +73,40 @@ private_strerror (errnum) return "Unknown system error"; } #define strerror private_strerror -#endif +#endif /* !HAVE_STRERROR */ /* Print the program name and error message MESSAGE, which is a printf-style format string with optional args. If ERRNUM is nonzero, print its corresponding system error message. Exit with status STATUS if it is nonzero. */ /* VARARGS */ - void -#if defined(VA_START) && __STDC__ -error (int status, int errnum, const char *message, ...) -#else +#if defined (HAVE_VPRINTF) && __STDC__ +error (int status, int errnum, char *message, ...) +#else /* !HAVE_VPRINTF or !__STDC__ */ error (status, errnum, message, va_alist) int status; int errnum; char *message; va_dcl -#endif +#endif /* !HAVE_VPRINTF or !__STDC__ */ { -#ifdef VA_START +#ifdef HAVE_VPRINTF va_list args; -#endif +#endif /* HAVE_VPRINTF */ - if (error_print_progname) - (*error_print_progname) (); - else - { - fflush (stdout); - fprintf (stderr, "%s: ", program_name); - } - -#ifdef VA_START + fprintf (stderr, "%s: ", program_name); +#ifdef HAVE_VPRINTF VA_START (args, message); -# if HAVE_VPRINTF || _LIBC vfprintf (stderr, message, args); -# else - _doprnt (message, args, stderr); -# endif va_end (args); -#else +#else /* !HAVE_VPRINTF */ +#ifdef HAVE_DOPRNT + _doprnt (message, &args, stderr); +#else /* !HAVE_DOPRNT */ fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); -#endif - - ++error_message_count; - +#endif /* !HAVE_DOPRNT */ +#endif /* !HAVE_VPRINTF */ if (errnum) fprintf (stderr, ": %s", strerror (errnum)); putc ('\n', stderr); diff --git a/gnu/usr.bin/sort/getopt.c b/gnu/usr.bin/sort/getopt.c index 8bcf5594571c..7a4673b8d8db 100644 --- a/gnu/usr.bin/sort/getopt.c +++ b/gnu/usr.bin/sort/getopt.c @@ -3,7 +3,7 @@ "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! - Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95 + 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 @@ -20,17 +20,18 @@ along with this program; if not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. - Ditto for AIX 3.2 and <stdlib.h>. */ -#ifndef _NO_PROTO -#define _NO_PROTO -#endif - #ifdef HAVE_CONFIG_H +#if defined (emacs) || defined (CONFIG_BROKETS) +/* We use <config.h> instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ #include <config.h> +#else +#include "config.h" +#endif #endif -#if !defined (__STDC__) || !__STDC__ +#ifndef __STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const @@ -38,6 +39,11 @@ #endif #endif +/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. */ +#ifndef _NO_PROTO +#define _NO_PROTO +#endif + #include <stdio.h> /* Comment out all this code if we are using the GNU C Library, and are not @@ -59,16 +65,10 @@ #include <stdlib.h> #endif /* GNU C library. */ -#ifndef _ -/* This is for other GNU distributions with internationalized messages. - When compiling libc, the _ macro is predefined. */ -#ifdef HAVE_LIBINTL_H -# include <libintl.h> -# define _(msgid) gettext (msgid) -#else -# define _(msgid) (msgid) -#endif -#endif +/* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a + long-named option. Because this is not POSIX.2 compliant, it is + being phased out. */ +/* #define GETOPT_COMPAT */ /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user @@ -92,7 +92,7 @@ Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ -char *optarg = NULL; +char *optarg = 0; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller @@ -162,9 +162,6 @@ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; - -/* Value of POSIXLY_CORRECT environment variable. */ -static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries @@ -195,18 +192,19 @@ my_index (str, chr) } /* If using GCC, we can safely declare strlen this way. - If not using GCC, it is ok not to declare it. */ + If not using GCC, it is ok not to declare it. + (Supposedly there are some machines where it might get a warning, + but changing this conditional to __STDC__ is too risky.) */ #ifdef __GNUC__ -/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. - That was relevant to code that was here before. */ -#if !defined (__STDC__) || !__STDC__ -/* gcc with -traditional declares the built-in strlen to return int, - and has done so at least since version 2.4.5. -- rms. */ -extern int strlen (const char *); -#endif /* not __STDC__ */ -#endif /* __GNUC__ */ +#ifdef IN_GCC +#include "gstddef.h" +#else +#include <stddef.h> +#endif +extern size_t strlen (const char *); +#endif -#endif /* not __GNU_LIBRARY__ */ +#endif /* GNU C library. */ /* Handle permutation of arguments. */ @@ -281,42 +279,6 @@ exchange (argv) first_nonopt += (optind - last_nonopt); last_nonopt = optind; } - -/* Initialize the internal data when the first call is made. */ - -static const char * -_getopt_initialize (optstring) - const char *optstring; -{ - /* Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ - - first_nonopt = last_nonopt = optind = 1; - - nextchar = NULL; - - posixly_correct = getenv ("POSIXLY_CORRECT"); - - /* Determine how to handle the ordering of options and nonoptions. */ - - if (optstring[0] == '-') - { - ordering = RETURN_IN_ORDER; - ++optstring; - } - else if (optstring[0] == '+') - { - ordering = REQUIRE_ORDER; - ++optstring; - } - else if (posixly_correct != NULL) - ordering = REQUIRE_ORDER; - else - ordering = PERMUTE; - - return optstring; -} /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. @@ -383,18 +345,41 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int *longind; int long_only; { - optarg = NULL; + int option_index; + + optarg = 0; + + /* Initialize the internal data when the first call is made. + Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ if (optind == 0) { - optstring = _getopt_initialize (optstring); - optind = 1; /* Don't scan ARGV[0], the program name. */ + first_nonopt = last_nonopt = optind = 1; + + nextchar = NULL; + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (getenv ("POSIXLY_CORRECT") != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; } if (nextchar == NULL || *nextchar == '\0') { - /* Advance to the next ARGV-element. */ - if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, @@ -405,16 +390,21 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) else if (last_nonopt != optind) first_nonopt = optind; - /* Skip any additional non-options + /* Now skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc - && (argv[optind][0] != '-' || argv[optind][1] == '\0')) + && (argv[optind][0] != '-' || argv[optind][1] == '\0') +#ifdef GETOPT_COMPAT + && (longopts == NULL + || argv[optind][0] != '+' || argv[optind][1] == '\0') +#endif /* GETOPT_COMPAT */ + ) optind++; last_nonopt = optind; } - /* The special ARGV-element `--' means premature end of options. + /* Special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ @@ -447,7 +437,12 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ - if ((argv[optind][0] != '-' || argv[optind][1] == '\0')) + if ((argv[optind][0] != '-' || argv[optind][1] == '\0') +#ifdef GETOPT_COMPAT + && (longopts == NULL + || argv[optind][0] != '+' || argv[optind][1] == '\0') +#endif /* GETOPT_COMPAT */ + ) { if (ordering == REQUIRE_ORDER) return EOF; @@ -456,53 +451,36 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) } /* We have found another option-ARGV-element. - Skip the initial punctuation. */ + Start decoding its characters. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } - /* Decode the current option-ARGV-element. */ - - /* Check whether the ARGV-element is a long option. - - If long_only and the ARGV-element has the form "-f", where f is - a valid short option, don't consider it an abbreviated form of - a long option that starts with f. Otherwise there would be no - way to give the -f short option. - - On the other hand, if there's a long option "fubar" and - the ARGV-element is "-fu", do consider that an abbreviation of - the long option, just like "--fu", and not "-f" with arg "u". - - This distinction seems to be the most useful approach. */ - if (longopts != NULL - && (argv[optind][1] == '-' - || (long_only && (argv[optind][2] - || !my_index (optstring, argv[optind][1]))))) + && ((argv[optind][0] == '-' + && (argv[optind][1] == '-' || long_only)) +#ifdef GETOPT_COMPAT + || argv[optind][0] == '+' +#endif /* GETOPT_COMPAT */ + )) { - char *nameend; const struct option *p; - const struct option *pfound = NULL; + char *s = nextchar; int exact = 0; int ambig = 0; + const struct option *pfound = NULL; int indfound; - int option_index; - for (nameend = nextchar; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - -#ifdef lint - indfound = 0; /* Avoid spurious compiler warning. */ -#endif + while (*s && *s != '=') + s++; - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, nextchar, nameend - nextchar)) + /* Test all options for either exact match or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; + p++, option_index++) + if (!strncmp (p->name, nextchar, s - nextchar)) { - if (nameend - nextchar == strlen (p->name)) + if (s - nextchar == strlen (p->name)) { /* Exact match found. */ pfound = p; @@ -517,14 +495,14 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) indfound = option_index; } else - /* Second or later nonexact match found. */ + /* Second nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (opterr) - fprintf (stderr, _("%s: option `%s' is ambiguous\n"), + fprintf (stderr, "%s: option `%s' is ambiguous\n", argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; @@ -535,26 +513,27 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) { option_index = indfound; optind++; - if (*nameend) + if (*s) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) - optarg = nameend + 1; + optarg = s + 1; else { if (opterr) - if (argv[optind - 1][1] == '-') - /* --option */ - fprintf (stderr, - _("%s: option `--%s' doesn't allow an argument\n"), - argv[0], pfound->name); - else - /* +option or -option */ - fprintf (stderr, - _("%s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[optind - 1][0], pfound->name); - + { + if (argv[optind - 1][1] == '-') + /* --option */ + fprintf (stderr, + "%s: option `--%s' doesn't allow an argument\n", + argv[0], pfound->name); + else + /* +option or -option */ + fprintf (stderr, + "%s: option `%c%s' doesn't allow an argument\n", + argv[0], argv[optind - 1][0], pfound->name); + } nextchar += strlen (nextchar); return '?'; } @@ -566,9 +545,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) else { if (opterr) - fprintf (stderr, - _("%s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]); + fprintf (stderr, "%s: option `%s' requires an argument\n", + argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } @@ -583,23 +561,25 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) } return pfound->val; } - /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' +#ifdef GETOPT_COMPAT + || argv[optind][0] == '+' +#endif /* GETOPT_COMPAT */ || my_index (optstring, *nextchar) == NULL) { if (opterr) { if (argv[optind][1] == '-') /* --option */ - fprintf (stderr, _("%s: unrecognized option `--%s'\n"), + fprintf (stderr, "%s: unrecognized option `--%s'\n", argv[0], nextchar); else /* +option or -option */ - fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), + fprintf (stderr, "%s: unrecognized option `%c%s'\n", argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; @@ -608,7 +588,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) } } - /* Look at and handle the next short option-character. */ + /* Look at and handle the next option-character. */ { char c = *nextchar++; @@ -622,13 +602,16 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) { if (opterr) { - if (posixly_correct) - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, _("%s: illegal option -- %c\n"), +#if 0 + if (c < 040 || c >= 0177) + fprintf (stderr, "%s: unrecognized option, character code 0%o\n", argv[0], c); else - fprintf (stderr, _("%s: invalid option -- %c\n"), - argv[0], c); + fprintf (stderr, "%s: unrecognized option `-%c'\n", argv[0], c); +#else + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c); +#endif } optopt = c; return '?'; @@ -644,7 +627,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) optind++; } else - optarg = NULL; + optarg = 0; nextchar = NULL; } else @@ -661,10 +644,14 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) { if (opterr) { +#if 0 + fprintf (stderr, "%s: option `-%c' requires an argument\n", + argv[0], c); +#else /* 1003.2 specifies the format of this message. */ - fprintf (stderr, - _("%s: option requires an argument -- %c\n"), - argv[0], c); + fprintf (stderr, "%s: option requires an argument -- %c\n", + argv[0], c); +#endif } optopt = c; if (optstring[0] == ':') diff --git a/gnu/usr.bin/sort/getopt.h b/gnu/usr.bin/sort/getopt.h index 4ac33b71824d..45541f5ac0f9 100644 --- a/gnu/usr.bin/sort/getopt.h +++ b/gnu/usr.bin/sort/getopt.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc. + Copyright (C) 1989, 1990, 1991, 1992, 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 @@ -76,7 +76,7 @@ extern int optopt; struct option { -#if defined (__STDC__) && __STDC__ +#if __STDC__ const char *name; #else char *name; @@ -94,15 +94,15 @@ struct option #define required_argument 1 #define optional_argument 2 -#if defined (__STDC__) && __STDC__ -#ifdef __GNU_LIBRARY__ +#if __STDC__ +#if defined(__GNU_LIBRARY__) /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ extern int getopt (); -#endif /* __GNU_LIBRARY__ */ +#endif /* not __GNU_LIBRARY__ */ extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv, @@ -120,7 +120,7 @@ extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); -#endif /* __STDC__ */ +#endif /* not __STDC__ */ #ifdef __cplusplus } diff --git a/gnu/usr.bin/sort/getopt1.c b/gnu/usr.bin/sort/getopt1.c index 4580211cfac3..f784b5757c59 100644 --- a/gnu/usr.bin/sort/getopt1.c +++ b/gnu/usr.bin/sort/getopt1.c @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987, 88, 89, 90, 91, 92, 1993, 1994 + 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 @@ -17,12 +17,19 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H +#if defined (emacs) || defined (CONFIG_BROKETS) +/* We use <config.h> instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ #include <config.h> +#else +#include "config.h" +#endif #endif #include "getopt.h" -#if !defined (__STDC__) || !__STDC__ +#ifndef __STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const diff --git a/gnu/usr.bin/sort/long-options.c b/gnu/usr.bin/sort/long-options.c index dd7a8ca14822..85876677a1b1 100644 --- a/gnu/usr.bin/sort/long-options.c +++ b/gnu/usr.bin/sort/long-options.c @@ -1,5 +1,5 @@ /* Utility to accept --help and --version options as unobtrusively as possible. - Copyright (C) 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 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 @@ -18,11 +18,21 @@ /* Jim Meyering (meyering@comco.com) */ #ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use <config.h> instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ #include <config.h> +#else +#include "config.h" +#endif #endif #include <stdio.h> #include <getopt.h> +#include <sys/types.h> +#include "system.h" +#include "version.h" #include "long-options.h" static struct option const long_options[] = @@ -36,11 +46,9 @@ static struct option const long_options[] = Be careful not to gobble up `--'. */ void -parse_long_options (argc, argv, command_name, version_string, usage) +parse_long_options (argc, argv, usage) int argc; char **argv; - const char *command_name; - const char *version_string; void (*usage)(); { int c; @@ -59,10 +67,10 @@ parse_long_options (argc, argv, command_name, version_string, usage) switch (c) { case 'h': - (*usage) (0); + usage (0); case 'v': - printf ("%s - %s\n", command_name, version_string); + printf ("%s\n", version_string); exit (0); default: diff --git a/gnu/usr.bin/sort/long-options.h b/gnu/usr.bin/sort/long-options.h index 986a52d0d47c..9d1a9c73a393 100644 --- a/gnu/usr.bin/sort/long-options.h +++ b/gnu/usr.bin/sort/long-options.h @@ -1,10 +1 @@ -#undef __P -#if defined (__STDC__) && __STDC__ -#define __P(args) args -#else -#define __P(args) () -#endif - -void - parse_long_options __P ((int _argc, char **_argv, const char *_command_name, - const char *_version_string, void (*_usage) (int))); +void parse_long_options (); diff --git a/gnu/usr.bin/sort/sort.1 b/gnu/usr.bin/sort/sort.1 index e9f4b1ed290c..17ea03f62acc 100644 --- a/gnu/usr.bin/sort/sort.1 +++ b/gnu/usr.bin/sort/sort.1 @@ -1,4 +1,4 @@ -.TH SORT 1 "GNU Text Utilities" "FSF" \" -*- nroff -*- +.TH SORT 1 \" -*- nroff -*- .SH NAME sort \- sort lines of text files .SH SYNOPSIS @@ -192,7 +192,7 @@ option is taken to apply to both the \fI+pos\fP and the \fI\-pos\fP parts of a key specification. Keys may span multiple fields. .PP In addition, when GNU -.B sort +.B join is invoked with exactly one argument, the following options are recognized: .TP .I "\-\-help" diff --git a/gnu/usr.bin/sort/sort.c b/gnu/usr.bin/sort/sort.c index 5a93de6fa621..74d4b466ffc5 100644 --- a/gnu/usr.bin/sort/sort.c +++ b/gnu/usr.bin/sort/sort.c @@ -1,5 +1,5 @@ /* sort - sort lines of text (with all kinds of options). - Copyright (C) 1988, 1991, 1992, 1993, 1994, 1995 Free Software Foundation + Copyright (C) 1988, 1991 Free Software Foundation 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 @@ -13,13 +13,22 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Written December 1988 by Mike Haertel. The author may be reached (Email) at the address mike@gnu.ai.mit.edu, or (US mail) as Mike Haertel c/o Free Software Foundation. */ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use <config.h> instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ #include <config.h> +#else +#include "config.h" +#endif +#endif /* Get isblank from GNU libc. */ #define _GNU_SOURCE @@ -27,16 +36,10 @@ #include <sys/types.h> #include <signal.h> #include <stdio.h> -#ifdef __FreeBSD__ -#include <locale.h> -#endif #include "system.h" -#include "version.h" #include "long-options.h" -#include "error.h" -#include "xstrtod.h" -#ifdef HAVE_LIMITS_H +#ifdef _POSIX_VERSION #include <limits.h> #else #ifndef UCHAR_MAX @@ -49,73 +52,16 @@ char *realloc (); void free (); #endif -/* Undefine, to avoid warning about redefinition on some systems. */ -#undef min -#define min(a, b) ((a) < (b) ? (a) : (b)) +void error (); +static void usage (); +#define min(a, b) ((a) < (b) ? (a) : (b)) #define UCHAR_LIM (UCHAR_MAX + 1) #define UCHAR(c) ((unsigned char) (c)) -#ifndef DEFAULT_TMPDIR -#define DEFAULT_TMPDIR "/tmp" -#endif - /* The kind of blanks for '-b' to skip in various options. */ enum blanktype { bl_start, bl_end, bl_both }; -/* Lines are held in core as counted strings. */ -struct line -{ - char *text; /* Text of the line. */ - int length; /* Length not including final newline. */ - char *keybeg; /* Start of first key. */ - char *keylim; /* Limit of first key. */ -}; - -/* Arrays of lines. */ -struct lines -{ - struct line *lines; /* Dynamically allocated array of lines. */ - int used; /* Number of slots used. */ - int alloc; /* Number of slots allocated. */ - int limit; /* Max number of slots to allocate. */ -}; - -/* Input buffers. */ -struct buffer -{ - char *buf; /* Dynamically allocated buffer. */ - int used; /* Number of bytes used. */ - int alloc; /* Number of bytes allocated. */ - int left; /* Number of bytes left after line parsing. */ -}; - -struct keyfield -{ - int sword; /* Zero-origin 'word' to start at. */ - int schar; /* Additional characters to skip. */ - int skipsblanks; /* Skip leading white space at start. */ - int eword; /* Zero-origin first word after field. */ - int echar; /* Additional characters in field. */ - int skipeblanks; /* Skip trailing white space at finish. */ - int *ignore; /* Boolean array of characters to ignore. */ - char *translate; /* Translation applied to characters. */ - int numeric; /* Flag for numeric comparison. Handle - strings of digits with optional decimal - point, but no exponential notation. */ - int general_numeric; /* Flag for general, numeric comparison. - Handle numbers in exponential notation. */ - int month; /* Flag for comparison by month name. */ - int reverse; /* Reverse the sense of comparison. */ - struct keyfield *next; /* Next keyfield to try. */ -}; - -struct month -{ - char *name; - int val; -}; - /* The name this program was run with. */ char *program_name; @@ -136,7 +82,11 @@ static char fold_toupper[UCHAR_LIM]; /* Table mapping 3-letter month names to integers. Alphabetic order allows binary search. */ -static struct month const monthtab[] = +static struct month +{ + char *name; + int val; +} const monthtab[] = { {"APR", 4}, {"AUG", 8}, @@ -157,17 +107,17 @@ static struct month const monthtab[] = /* Initial buffer size for in core sorting. Will not grow unless a line longer than this is seen. */ -static int sortalloc = 512 * 1024; +static int sortalloc = 524288; /* Initial buffer size for in core merge buffers. Bear in mind that up to NMERGE * mergealloc bytes may be allocated for merge buffers. */ -static int mergealloc = 16 * 1024; +static int mergealloc = 16384; /* Guess of average line length. */ static int linelength = 30; /* Maximum number of elements for the array(s) of struct line's, in bytes. */ -#define LINEALLOC (256 * 1024) +#define LINEALLOC 262144 /* Prefix for temporary file names. */ static char *temp_file_prefix; @@ -192,55 +142,49 @@ static int unique; /* Nonzero if any of the input files are the standard input. */ static int have_read_stdin; -/* Lists of key field comparisons to be tried. */ -static struct keyfield keyhead; +/* Lines are held in core as counted strings. */ +struct line +{ + char *text; /* Text of the line. */ + int length; /* Length not including final newline. */ + char *keybeg; /* Start of first key. */ + char *keylim; /* Limit of first key. */ +}; -static void -usage (int status) +/* Arrays of lines. */ +struct lines { - if (status != 0) - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); - else - { - printf (_("\ -Usage: %s [OPTION]... [FILE]...\n\ -"), - program_name); - printf (_("\ -Write sorted concatenation of all FILE(s) to standard output.\n\ -\n\ - +POS1 [-POS2] start a key at POS1, end it before POS2\n\ - -M compare (unknown) < `JAN' < ... < `DEC', imply -b\n\ - -T DIRECT use DIRECT for temporary files, not $TMPDIR or %s\n\ - -b ignore leading blanks in sort fields or keys\n\ - -c check if given files already sorted, do not sort\n\ - -d consider only [a-zA-Z0-9 ] characters in keys\n\ - -f fold lower case to upper case characters in keys\n\ - -g compare according to general numerical value, imply -b\n\ - -i consider only [\\040-\\0176] characters in keys\n\ - -k POS1[,POS2] same as +POS1 [-POS2], but all positions counted from 1\n\ - -m merge already sorted files, do not sort\n\ - -n compare according to string numerical value, imply -b\n\ - -o FILE write result on FILE instead of standard output\n\ - -r reverse the result of comparisons\n\ - -s stabilize sort by disabling last resort comparison\n\ - -t SEP use SEParator instead of non- to whitespace transition\n\ - -u with -c, check for strict ordering\n\ - -u with -m, only output the first of an equal sequence\n\ - --help display this help and exit\n\ - --version output version information and exit\n\ -\n\ -POS is F[.C][OPTS], where F is the field number and C the character\n\ -position in the field, both counted from zero. OPTS is made up of one\n\ -or more of Mbdfinr, this effectively disable global -Mbdfinr settings\n\ -for that key. If no key given, use the entire line as key. With no\n\ -FILE, or when FILE is -, read standard input.\n\ -") - , DEFAULT_TMPDIR); - } - exit (status); -} + struct line *lines; /* Dynamically allocated array of lines. */ + int used; /* Number of slots used. */ + int alloc; /* Number of slots allocated. */ + int limit; /* Max number of slots to allocate. */ +}; + +/* Input buffers. */ +struct buffer +{ + char *buf; /* Dynamically allocated buffer. */ + int used; /* Number of bytes used. */ + int alloc; /* Number of bytes allocated. */ + int left; /* Number of bytes left after line parsing. */ +}; + +/* Lists of key field comparisons to be tried. */ +static struct keyfield +{ + int sword; /* Zero-origin 'word' to start at. */ + int schar; /* Additional characters to skip. */ + int skipsblanks; /* Skip leading white space at start. */ + int eword; /* Zero-origin first word after field. */ + int echar; /* Additional characters in field. */ + int skipeblanks; /* Skip trailing white space at finish. */ + int *ignore; /* Boolean array of characters to ignore. */ + char *translate; /* Translation applied to characters. */ + int numeric; /* Flag for numeric comparison. */ + int month; /* Flag for comparison by month name. */ + int reverse; /* Reverse the sense of comparison. */ + struct keyfield *next; /* Next keyfield to try. */ +} keyhead; /* The list of temporary files. */ static struct tempnode @@ -252,7 +196,7 @@ static struct tempnode /* Clean up any remaining temporary files. */ static void -cleanup (void) +cleanup () { struct tempnode *node; @@ -262,15 +206,16 @@ cleanup (void) /* Allocate N bytes of memory dynamically, with error checking. */ -static char * -xmalloc (unsigned int n) +char * +xmalloc (n) + unsigned n; { char *p; p = malloc (n); if (p == 0) { - error (0, 0, _("virtual memory exhausted")); + error (0, 0, "virtual memory exhausted"); cleanup (); exit (2); } @@ -282,8 +227,10 @@ xmalloc (unsigned int n) If P is NULL, run xmalloc. If N is 0, run free and return NULL. */ -static char * -xrealloc (char *p, unsigned int n) +char * +xrealloc (p, n) + char *p; + unsigned n; { if (p == 0) return xmalloc (n); @@ -295,7 +242,7 @@ xrealloc (char *p, unsigned int n) p = realloc (p, n); if (p == 0) { - error (0, 0, _("virtual memory exhausted")); + error (0, 0, "virtual memory exhausted"); cleanup (); exit (2); } @@ -303,81 +250,50 @@ xrealloc (char *p, unsigned int n) } static FILE * -xtmpfopen (const char *file) +xfopen (file, how) + char *file, *how; { - FILE *fp; - int fd; + FILE *fp = strcmp (file, "-") ? fopen (file, how) : stdin; - fd = open (file, O_WRONLY | O_CREAT | O_TRUNC, 0600); - if (fd < 0 || (fp = fdopen (fd, "w")) == NULL) + if (fp == 0) { error (0, errno, "%s", file); cleanup (); exit (2); } - - return fp; -} - -static FILE * -xfopen (const char *file, const char *how) -{ - FILE *fp; - - if (strcmp (file, "-") == 0) - { - fp = stdin; - } - else - { - if ((fp = fopen (file, how)) == NULL) - { - error (0, errno, "%s", file); - cleanup (); - exit (2); - } - } - if (fp == stdin) have_read_stdin = 1; return fp; } static void -xfclose (FILE *fp) +xfclose (fp) + FILE *fp; { - if (fp == stdin) - { - /* Allow reading stdin from tty more than once. */ - if (feof (fp)) - clearerr (fp); - } - else if (fp == stdout) - { - if (fflush (fp) != 0) - { - error (0, errno, _("flushing file")); - cleanup (); - exit (2); - } - } - else + fflush (fp); + if (fp != stdin && fp != stdout) { if (fclose (fp) != 0) { - error (0, errno, _("error closing file")); + error (0, errno, "error closing file"); cleanup (); exit (2); } } + else + /* Allow reading stdin from tty more than once. */ + clearerr (fp); } static void -xfwrite (const char *buf, int size, int nelem, FILE *fp) +xfwrite (buf, size, nelem, fp) + char *buf; + int size, nelem; + FILE *fp; { if (fwrite (buf, size, nelem, fp) != nelem) { - error (0, errno, _("write error")); + error (0, errno, "write error"); cleanup (); exit (2); } @@ -386,25 +302,18 @@ xfwrite (const char *buf, int size, int nelem, FILE *fp) /* Return a name for a temporary file. */ static char * -tempname (void) +tempname () { - static unsigned int seq; + static int seq; int len = strlen (temp_file_prefix); - char *name = xmalloc (len + 1 + sizeof ("sort") - 1 + 5 + 5 + 1); - struct tempnode *node; - - node = (struct tempnode *) xmalloc (sizeof (struct tempnode)); - sprintf (name, - "%s%ssort%5.5d%5.5d", - temp_file_prefix, - (len && temp_file_prefix[len - 1] != '/') ? "/" : "", - (unsigned int) getpid () & 0xffff, seq); - - /* Make sure that SEQ's value fits in 5 digits. */ - ++seq; - if (seq >= 100000) - seq = 0; + char *name = xmalloc (len + 16); + struct tempnode *node = + (struct tempnode *) xmalloc (sizeof (struct tempnode)); + if (len && temp_file_prefix[len - 1] != '/') + sprintf (name, "%s/sort%5.5d%5.5d", temp_file_prefix, getpid (), ++seq); + else + sprintf (name, "%ssort%5.5d%5.5d", temp_file_prefix, getpid (), ++seq); node->name = name; node->next = temphead.next; temphead.next = node; @@ -415,7 +324,8 @@ tempname (void) remove it if it is found on the list. */ static void -zaptemp (char *name) +zaptemp (name) + char *name; { struct tempnode *node, *temp; @@ -435,7 +345,7 @@ zaptemp (char *name) /* Initialize the character class tables. */ static void -inittables (void) +inittables () { int i; @@ -459,7 +369,9 @@ inittables (void) /* Initialize BUF, allocating ALLOC bytes initially. */ static void -initbuf (struct buffer *buf, int alloc) +initbuf (buf, alloc) + struct buffer *buf; + int alloc; { buf->alloc = alloc; buf->buf = xmalloc (buf->alloc); @@ -472,11 +384,13 @@ initbuf (struct buffer *buf, int alloc) of bytes buffered. */ static int -fillbuf (struct buffer *buf, FILE *fp) +fillbuf (buf, fp) + struct buffer *buf; + FILE *fp; { int cc; - memmove (buf->buf, buf->buf + buf->used - buf->left, buf->left); + bcopy (buf->buf + buf->used - buf->left, buf->buf, buf->left); buf->used = buf->left; while (!feof (fp) && (buf->used == 0 || !memchr (buf->buf, '\n', buf->used))) @@ -489,7 +403,7 @@ fillbuf (struct buffer *buf, FILE *fp) cc = fread (buf->buf + buf->used, 1, buf->alloc - buf->used, fp); if (ferror (fp)) { - error (0, errno, _("read error")); + error (0, errno, "read error"); cleanup (); exit (2); } @@ -514,7 +428,10 @@ fillbuf (struct buffer *buf, FILE *fp) for, ever. */ static void -initlines (struct lines *lines, int alloc, int limit) +initlines (lines, alloc, limit) + struct lines *lines; + int alloc; + int limit; { lines->alloc = alloc; lines->lines = (struct line *) xmalloc (lines->alloc * sizeof (struct line)); @@ -526,7 +443,9 @@ initlines (struct lines *lines, int alloc, int limit) by KEY in LINE. */ static char * -begfield (const struct line *line, const struct keyfield *key) +begfield (line, key) + struct line *line; + struct keyfield *key; { register char *ptr = line->text, *lim = ptr + line->length; register int sword = key->sword, schar = key->schar; @@ -552,10 +471,8 @@ begfield (const struct line *line, const struct keyfield *key) while (ptr < lim && blanks[UCHAR (*ptr)]) ++ptr; - if (ptr + schar <= lim) - ptr += schar; - else - ptr = lim; + while (ptr < lim && schar--) + ++ptr; return ptr; } @@ -564,28 +481,19 @@ begfield (const struct line *line, const struct keyfield *key) in LINE specified by KEY. */ static char * -limfield (const struct line *line, const struct keyfield *key) +limfield (line, key) + struct line *line; + struct keyfield *key; { register char *ptr = line->text, *lim = ptr + line->length; register int eword = key->eword, echar = key->echar; - /* Note: from the POSIX spec: - The leading field separator itself is included in - a field when -t is not used. FIXME: move this comment up... */ - - /* Move PTR past EWORD fields or to one past the last byte on LINE, - whichever comes first. If there are more than EWORD fields, leave - PTR pointing at the beginning of the field having zero-based index, - EWORD. If a delimiter character was specified (via -t), then that - `beginning' is the first character following the delimiting TAB. - Otherwise, leave PTR pointing at the first `blank' character after - the preceding field. */ if (tab) while (ptr < lim && eword--) { while (ptr < lim && *ptr != tab) ++ptr; - if (ptr < lim && (eword || echar > 0)) + if (ptr < lim && (eword || key->skipeblanks)) ++ptr; } else @@ -597,54 +505,23 @@ limfield (const struct line *line, const struct keyfield *key) ++ptr; } - /* Make LIM point to the end of (one byte past) the current field. */ - if (tab) - { - char *newlim; - newlim = memchr (ptr, tab, lim - ptr); - if (newlim) - lim = newlim; - } - else - { - char *newlim; - newlim = ptr; - while (newlim < lim && blanks[UCHAR (*newlim)]) - ++newlim; - while (newlim < lim && !blanks[UCHAR (*newlim)]) - ++newlim; - lim = newlim; - } - - /* If we're skipping leading blanks, don't start counting characters - until after skipping past any leading blanks. */ - if (key->skipsblanks) + if (key->skipeblanks) while (ptr < lim && blanks[UCHAR (*ptr)]) ++ptr; - /* Advance PTR by ECHAR (if possible), but no further than LIM. */ - if (ptr + echar <= lim) - ptr += echar; - else - ptr = lim; + while (ptr < lim && echar--) + ++ptr; return ptr; } -/* FIXME */ - -void -trim_trailing_blanks (const char *a_start, char **a_end) -{ - while (*a_end > a_start && blanks[UCHAR (*(*a_end - 1))]) - --(*a_end); -} - /* Find the lines in BUF, storing pointers and lengths in LINES. - Also replace newlines in BUF with NULs. */ + Also replace newlines with NULs. */ static void -findlines (struct buffer *buf, struct lines *lines) +findlines (buf, lines) + struct buffer *buf; + struct lines *lines; { register char *beg = buf->buf, *lim = buf->buf + buf->used, *ptr; struct keyfield *key = keyhead.next; @@ -689,11 +566,6 @@ findlines (struct buffer *buf, struct lines *lines) ++beg; lines->lines[lines->used].keybeg = beg; } - if (key->skipeblanks) - { - trim_trailing_blanks (lines->lines[lines->used].keybeg, - &lines->lines[lines->used].keylim); - } } else { @@ -713,7 +585,8 @@ findlines (struct buffer *buf, struct lines *lines) of the fraction. Strings not of this form are considered to be zero. */ static int -fraccompare (register const char *a, register const char *b) +fraccompare (a, b) + register char *a, *b; { register tmpa = UCHAR (*a), tmpb = UCHAR (*b); @@ -768,12 +641,12 @@ fraccompare (register const char *a, register const char *b) hideously fast. */ static int -numcompare (register const char *a, register const char *b) +numcompare (a, b) + register char *a, *b; { register int tmpa, tmpb, loga, logb, tmp; - tmpa = UCHAR (*a); - tmpb = UCHAR (*b); + tmpa = UCHAR (*a), tmpb = UCHAR (*b); while (blanks[tmpa]) tmpa = UCHAR (*++a); @@ -782,30 +655,19 @@ numcompare (register const char *a, register const char *b) if (tmpa == '-') { - do - tmpa = UCHAR (*++a); - while (tmpa == '0'); + tmpa = UCHAR (*++a); if (tmpb != '-') { - if (tmpa == '.') - do - tmpa = UCHAR (*++a); - while (tmpa == '0'); - if (digits[tmpa]) - return -1; - while (tmpb == '0') - tmpb = UCHAR (*++b); - if (tmpb == '.') - do - tmpb = *++b; - while (tmpb == '0'); - if (digits[tmpb]) + if (digits[tmpa] && digits[tmpb]) return -1; return 0; } - do + tmpb = UCHAR (*++b); + + while (tmpa == '0') + tmpa = UCHAR (*++a); + while (tmpb == '0') tmpb = UCHAR (*++b); - while (tmpb == '0'); while (tmpa == tmpb && digits[tmpa]) tmpa = UCHAR (*++a), tmpb = UCHAR (*++b); @@ -835,22 +697,7 @@ numcompare (register const char *a, register const char *b) } else if (tmpb == '-') { - do - tmpb = UCHAR (*++b); - while (tmpb == '0'); - if (tmpb == '.') - do - tmpb = *++b; - while (tmpb == '0'); - if (digits[tmpb]) - return 1; - while (tmpa == '0') - tmpa = UCHAR (*++a); - if (tmpa == '.') - do - tmpa = UCHAR (*++a); - while (tmpa == '0'); - if (digits[tmpa]) + if (digits[UCHAR (tmpa)] && digits[UCHAR (*++b)]) return 1; return 0; } @@ -889,29 +736,13 @@ numcompare (register const char *a, register const char *b) } } -static int -general_numcompare (const char *sa, const char *sb) -{ - double a, b; - /* FIXME: add option to warn about failed conversions. */ - /* FIXME: maybe add option to try expensive FP conversion - only if A and B can't be compared more cheaply/accurately. */ - if (xstrtod (sa, NULL, &a)) - { - a = 0; - } - if (xstrtod (sb, NULL, &b)) - { - b = 0; - } - return a == b ? 0 : a < b ? -1 : 1; -} - /* Return an integer <= 12 associated with month name S with length LEN, 0 if the name in S is not recognized. */ static int -getmonth (const char *s, int len) +getmonth (s, len) + char *s; + int len; { char month[4]; register int i, lo = 0, hi = 12; @@ -940,7 +771,8 @@ getmonth (const char *s, int len) are no more keys or a difference is found. */ static int -keycompare (const struct line *a, const struct line *b) +keycompare (a, b) + struct line *a, *b; { register char *texta, *textb, *lima, *limb, *translate; register int *ignore; @@ -989,16 +821,6 @@ keycompare (const struct line *a, const struct line *b) if (lenb < 0) lenb = 0; - if (key->skipeblanks) - { - char *a_end = texta + lena; - char *b_end = textb + lenb; - trim_trailing_blanks (texta, &a_end); - trim_trailing_blanks (textb, &b_end); - lena = a_end - texta; - lenb = b_end - textb; - } - /* Actually compare the fields. */ if (key->numeric) { @@ -1017,23 +839,6 @@ keycompare (const struct line *a, const struct line *b) return key->reverse ? -diff : diff; continue; } - else if (key->general_numeric) - { - if (*lima || *limb) - { - char savea = *lima, saveb = *limb; - - *lima = *limb = '\0'; - diff = general_numcompare (texta, textb); - *lima = savea, *limb = saveb; - } - else - diff = general_numcompare (texta, textb); - - if (diff) - return key->reverse ? -diff : diff; - continue; - } else if (key->month) { diff = getmonth (texta, lena) - getmonth (textb, lenb); @@ -1042,64 +847,38 @@ keycompare (const struct line *a, const struct line *b) continue; } else if (ignore && translate) - -#define CMP_WITH_IGNORE(A, B) \ - do \ - { \ - while (texta < lima && textb < limb) \ - { \ - while (texta < lima && ignore[UCHAR (*texta)]) \ - ++texta; \ - while (textb < limb && ignore[UCHAR (*textb)]) \ - ++textb; \ - if (texta < lima && textb < limb) \ - { \ - if ((A) != (B)) \ - { \ - diff = (A) - (B); \ - break; \ - } \ - ++texta; \ - ++textb; \ - } \ - \ - if (texta == lima && textb < limb && !ignore[UCHAR (*textb)]) \ - diff = -1; \ - else if (texta < lima && textb == limb \ - && !ignore[UCHAR (*texta)]) \ - diff = 1; \ - } \ - \ - if (diff == 0) \ - { \ - while (texta < lima && ignore[UCHAR (*texta)]) \ - ++texta; \ - while (textb < limb && ignore[UCHAR (*textb)]) \ - ++textb; \ - \ - if (texta == lima && textb < limb) \ - diff = -1; \ - else if (texta < lima && textb == limb) \ - diff = 1; \ - } \ - /* Relative lengths are meaningless if characters were ignored. \ - Handling this case here avoids what might be an invalid length \ - comparison below. */ \ - if (diff == 0 && texta == lima && textb == limb) \ - return 0; \ - } \ - while (0) - - CMP_WITH_IGNORE (translate[UCHAR (*texta)], translate[UCHAR (*textb)]); + while (texta < lima && textb < limb) + { + while (texta < lima && ignore[UCHAR (*texta)]) + ++texta; + while (textb < limb && ignore[UCHAR (*textb)]) + ++textb; + if (texta < lima && textb < limb && + translate[UCHAR (*texta++)] != translate[UCHAR (*textb++)]) + { + diff = translate[UCHAR (*--texta)] - translate[UCHAR (*--textb)]; + break; + } + } else if (ignore) - CMP_WITH_IGNORE (*texta, *textb); + while (texta < lima && textb < limb) + { + while (texta < lima && ignore[UCHAR (*texta)]) + ++texta; + while (textb < limb && ignore[UCHAR (*textb)]) + ++textb; + if (texta < lima && textb < limb && *texta++ != *textb++) + { + diff = *--texta - *--textb; + break; + } + } else if (translate) while (texta < lima && textb < limb) { if (translate[UCHAR (*texta++)] != translate[UCHAR (*textb++)]) { - diff = (translate[UCHAR (*--texta)] - - translate[UCHAR (*--textb)]); + diff = translate[UCHAR (*--texta)] - translate[UCHAR (*--textb)]; break; } } @@ -1119,7 +898,8 @@ keycompare (const struct line *a, const struct line *b) depending on whether A compares less than, equal to, or greater than B. */ static int -compare (register const struct line *a, register const struct line *b) +compare (a, b) + register struct line *a, *b; { int diff, tmpa, tmpb, mini; @@ -1158,17 +938,18 @@ compare (register const struct line *a, register const struct line *b) } /* Check that the lines read from the given FP come in order. Return - 1 if they do and 0 if there is a disorder. - FIXME: return number of first out-of-order line if not sorted. */ + 1 if they do and 0 if there is a disorder. */ static int -checkfp (FILE *fp) +checkfp (fp) + FILE *fp; { struct buffer buf; /* Input buffer. */ struct lines lines; /* Lines scanned from the buffer. */ struct line temp; /* Copy of previous line. */ int cc; /* Character count. */ - int alloc, sorted = 1; + int cmp; /* Result of calling compare. */ + int alloc, i, success = 1; initbuf (&buf, mergealloc); initlines (&lines, mergealloc / linelength + 1, @@ -1177,69 +958,64 @@ checkfp (FILE *fp) temp.text = xmalloc (alloc); cc = fillbuf (&buf, fp); - if (cc == 0) - goto finish; - findlines (&buf, &lines); - while (1) - { - struct line *prev_line; /* Pointer to previous line. */ - int cmp; /* Result of calling compare. */ - int i; - - /* Compare each line in the buffer with its successor. */ - for (i = 0; i < lines.used - 1; ++i) - { - cmp = compare (&lines.lines[i], &lines.lines[i + 1]); - if ((unique && cmp >= 0) || (cmp > 0)) - { - sorted = 0; - goto finish; - } - } - - /* Save the last line of the buffer and refill the buffer. */ - prev_line = lines.lines + (lines.used - 1); - if (prev_line->length > alloc) - { - while (prev_line->length + 1 > alloc) - alloc *= 2; - temp.text = xrealloc (temp.text, alloc); - } - memcpy (temp.text, prev_line->text, prev_line->length + 1); - temp.length = prev_line->length; - temp.keybeg = temp.text + (prev_line->keybeg - prev_line->text); - temp.keylim = temp.text + (prev_line->keylim - prev_line->text); + if (cc) + do + { + /* Compare each line in the buffer with its successor. */ + for (i = 0; i < lines.used - 1; ++i) + { + cmp = compare (&lines.lines[i], &lines.lines[i + 1]); + if ((unique && cmp >= 0) || (cmp > 0)) + { + success = 0; + goto finish; + } + } - cc = fillbuf (&buf, fp); - if (cc == 0) - break; + /* Save the last line of the buffer and refill the buffer. */ + if (lines.lines[lines.used - 1].length > alloc) + { + while (lines.lines[lines.used - 1].length + 1 > alloc) + alloc *= 2; + temp.text = xrealloc (temp.text, alloc); + } + bcopy (lines.lines[lines.used - 1].text, temp.text, + lines.lines[lines.used - 1].length + 1); + temp.length = lines.lines[lines.used - 1].length; - findlines (&buf, &lines); - /* Make sure the line saved from the old buffer contents is - less than or equal to the first line of the new buffer. */ - cmp = compare (&temp, &lines.lines[0]); - if ((unique && cmp >= 0) || (cmp > 0)) - { - sorted = 0; - break; - } - } + cc = fillbuf (&buf, fp); + if (cc) + { + findlines (&buf, &lines); + /* Make sure the line saved from the old buffer contents is + less than or equal to the first line of the new buffer. */ + cmp = compare (&temp, &lines.lines[0]); + if ((unique && cmp >= 0) || (cmp > 0)) + { + success = 0; + break; + } + } + } + while (cc); finish: xfclose (fp); free (buf.buf); free ((char *) lines.lines); free (temp.text); - return sorted; + return success; } /* Merge lines from FPS onto OFP. NFPS cannot be greater than NMERGE. Close FPS before returning. */ static void -mergefps (FILE **fps, register int nfps, FILE *ofp) +mergefps (fps, nfps, ofp) + FILE *fps[], *ofp; + register int nfps; { struct buffer buffer[NMERGE]; /* Input buffers for each file. */ struct lines lines[NMERGE]; /* Line tables for each buffer. */ @@ -1253,10 +1029,6 @@ mergefps (FILE **fps, register int nfps, FILE *ofp) output. */ register int i, j, t; -#ifdef lint /* Suppress `used before initialized' warning. */ - savealloc = 0; -#endif - /* Allocate space for a saved line if necessary. */ if (unique) { @@ -1300,7 +1072,7 @@ mergefps (FILE **fps, register int nfps, FILE *ofp) /* Repeatedly output the smallest line until no input remains. */ while (nfps) { - /* If uniqified output is turned on, output only the first of + /* If uniqified output is turned out, output only the first of an identical series of lines. */ if (unique) { @@ -1319,7 +1091,7 @@ mergefps (FILE **fps, register int nfps, FILE *ofp) saved.text = xrealloc (saved.text, savealloc); } saved.length = lines[ord[0]].lines[cur[ord[0]]].length; - memcpy (saved.text, lines[ord[0]].lines[cur[ord[0]]].text, + bcopy (lines[ord[0]].lines[cur[ord[0]]].text, saved.text, saved.length + 1); if (lines[ord[0]].lines[cur[ord[0]]].keybeg != NULL) { @@ -1401,7 +1173,9 @@ mergefps (FILE **fps, register int nfps, FILE *ofp) /* Sort the array LINES with NLINES members, using TEMP for temporary space. */ static void -sortlines (struct line *lines, int nlines, struct line *temp) +sortlines (lines, nlines, temp) + struct line *lines, *temp; + int nlines; { register struct line *lo, *hi, *t; register int nlo, nhi; @@ -1442,7 +1216,9 @@ sortlines (struct line *lines, int nlines, struct line *temp) Return a count of disordered files. */ static int -check (char **files, int nfiles) +check (files, nfiles) + char *files[]; + int nfiles; { int i, disorders = 0; FILE *fp; @@ -1452,7 +1228,7 @@ check (char **files, int nfiles) fp = xfopen (files[i], "r"); if (!checkfp (fp)) { - fprintf (stderr, _("%s: disorder on %s\n"), program_name, files[i]); + printf ("%s: disorder on %s\n", program_name, files[i]); ++disorders; } } @@ -1462,7 +1238,10 @@ check (char **files, int nfiles) /* Merge NFILES FILES onto OFP. */ static void -merge (char **files, int nfiles, FILE *ofp) +merge (files, nfiles, ofp) + char *files[]; + int nfiles; + FILE *ofp; { int i, j, t; char *temp; @@ -1475,7 +1254,7 @@ merge (char **files, int nfiles, FILE *ofp) { for (j = 0; j < NMERGE; ++j) fps[j] = xfopen (files[i * NMERGE + j], "r"); - tfp = xtmpfopen (temp = tempname ()); + tfp = xfopen (temp = tempname (), "w"); mergefps (fps, NMERGE, tfp); xfclose (tfp); for (j = 0; j < NMERGE; ++j) @@ -1484,7 +1263,7 @@ merge (char **files, int nfiles, FILE *ofp) } for (j = 0; j < nfiles % NMERGE; ++j) fps[j] = xfopen (files[i * NMERGE + j], "r"); - tfp = xtmpfopen (temp = tempname ()); + tfp = xfopen (temp = tempname (), "w"); mergefps (fps, nfiles % NMERGE, tfp); xfclose (tfp); for (j = 0; j < nfiles % NMERGE; ++j) @@ -1503,7 +1282,10 @@ merge (char **files, int nfiles, FILE *ofp) /* Sort NFILES FILES onto OFP. */ static void -sort (char **files, int nfiles, FILE *ofp) +sort (files, nfiles, ofp) + char **files; + int nfiles; + FILE *ofp; { struct buffer buf; struct lines lines; @@ -1511,7 +1293,7 @@ sort (char **files, int nfiles, FILE *ofp) int i, ntmp; FILE *fp, *tfp; struct tempnode *node; - int n_temp_files = 0; + int ntemp = 0; char **tempfiles; initbuf (&buf, sortalloc); @@ -1534,12 +1316,12 @@ sort (char **files, int nfiles, FILE *ofp) xrealloc ((char *) tmp, ntmp * sizeof (struct line)); } sortlines (lines.lines, lines.used, tmp); - if (feof (fp) && !nfiles && !n_temp_files && !buf.left) + if (feof (fp) && !nfiles && !ntemp && !buf.left) tfp = ofp; else { - ++n_temp_files; - tfp = xtmpfopen (tempname ()); + ++ntemp; + tfp = xfopen (tempname (), "w"); } for (i = 0; i < lines.used; ++i) if (!unique || i == 0 @@ -1558,13 +1340,13 @@ sort (char **files, int nfiles, FILE *ofp) free ((char *) lines.lines); free ((char *) tmp); - if (n_temp_files) + if (ntemp) { - tempfiles = (char **) xmalloc (n_temp_files * sizeof (char *)); - i = n_temp_files; + tempfiles = (char **) xmalloc (ntemp * sizeof (char *)); + i = ntemp; for (node = temphead.next; i > 0; node = node->next) tempfiles[--i] = node->name; - merge (tempfiles, n_temp_files, ofp); + merge (tempfiles, ntemp, ofp); free ((char *) tempfiles); } } @@ -1572,7 +1354,8 @@ sort (char **files, int nfiles, FILE *ofp) /* Insert key KEY at the end of the list (`keyhead'). */ static void -insertkey (struct keyfield *key) +insertkey (key) + struct keyfield *key; { struct keyfield *k = &keyhead; @@ -1583,26 +1366,28 @@ insertkey (struct keyfield *key) } static void -badfieldspec (const char *s) +badfieldspec (s) + char *s; { - error (2, 0, _("invalid field specification `%s'"), s); + error (2, 0, "invalid field specification `%s'", s); } /* Handle interrupts and hangups. */ static void -sighandler (int sig) +sighandler (sig) + int sig; { -#ifdef SA_INTERRUPT +#ifdef _POSIX_VERSION struct sigaction sigact; sigact.sa_handler = SIG_DFL; sigemptyset (&sigact.sa_mask); sigact.sa_flags = 0; sigaction (sig, &sigact, NULL); -#else /* !SA_INTERRUPT */ +#else /* !_POSIX_VERSION */ signal (sig, SIG_DFL); -#endif /* SA_INTERRUPT */ +#endif /* _POSIX_VERSION */ cleanup (); kill (getpid (), sig); } @@ -1613,8 +1398,10 @@ sighandler (int sig) BLANKTYPE is the kind of blanks that 'b' should skip. */ static char * -set_ordering (register const char *s, struct keyfield *key, - enum blanktype blanktype) +set_ordering (s, key, blanktype) + register char *s; + struct keyfield *key; + enum blanktype blanktype; { while (*s) { @@ -1632,9 +1419,11 @@ set_ordering (register const char *s, struct keyfield *key, case 'f': key->translate = fold_toupper; break; +#if 0 case 'g': - key->general_numeric = 1; + /* Reserved for comparing floating-point numbers. */ break; +#endif case 'i': key->ignore = nonprinting; break; @@ -1643,24 +1432,22 @@ set_ordering (register const char *s, struct keyfield *key, break; case 'n': key->numeric = 1; - if (blanktype == bl_start || blanktype == bl_both) - key->skipsblanks = 1; - if (blanktype == bl_end || blanktype == bl_both) - key->skipeblanks = 1; break; case 'r': key->reverse = 1; break; default: - return (char *) s; + return s; } ++s; } - return (char *) s; + return s; } void -main (int argc, char **argv) +main (argc, argv) + int argc; + char *argv[]; { struct keyfield *key = NULL, gkey; char *s; @@ -1668,25 +1455,22 @@ main (int argc, char **argv) int checkonly = 0, mergeonly = 0, nfiles = 0; char *minus = "-", *outfile = minus, **files, *tmp; FILE *ofp; -#ifdef SA_INTERRUPT +#ifdef _POSIX_VERSION struct sigaction oldact, newact; -#endif /* SA_INTERRUPT */ +#endif /* _POSIX_VERSION */ -#ifdef __FreeBSD__ - (void) setlocale(LC_CTYPE, ""); -#endif program_name = argv[0]; - parse_long_options (argc, argv, "sort", version_string, usage); + parse_long_options (argc, argv, usage); have_read_stdin = 0; inittables (); temp_file_prefix = getenv ("TMPDIR"); if (temp_file_prefix == NULL) - temp_file_prefix = DEFAULT_TMPDIR; + temp_file_prefix = "/tmp"; -#ifdef SA_INTERRUPT +#ifdef _POSIX_VERSION newact.sa_handler = sighandler; sigemptyset (&newact.sa_mask); newact.sa_flags = 0; @@ -1703,7 +1487,7 @@ main (int argc, char **argv) sigaction (SIGTERM, NULL, &oldact); if (oldact.sa_handler != SIG_IGN) sigaction (SIGTERM, &newact, NULL); -#else /* !SA_INTERRUPT */ +#else /* !_POSIX_VERSION */ if (signal (SIGINT, SIG_IGN) != SIG_IGN) signal (SIGINT, sighandler); if (signal (SIGHUP, SIG_IGN) != SIG_IGN) @@ -1712,12 +1496,12 @@ main (int argc, char **argv) signal (SIGPIPE, sighandler); if (signal (SIGTERM, SIG_IGN) != SIG_IGN) signal (SIGTERM, sighandler); -#endif /* !SA_INTERRUPT */ +#endif /* !_POSIX_VERSION */ gkey.sword = gkey.eword = -1; gkey.ignore = NULL; gkey.translate = NULL; - gkey.numeric = gkey.general_numeric = gkey.month = gkey.reverse = 0; + gkey.numeric = gkey.month = gkey.reverse = 0; gkey.skipsblanks = gkey.skipeblanks = 0; files = (char **) xmalloc (sizeof (char *) * argc); @@ -1733,9 +1517,9 @@ main (int argc, char **argv) key->ignore = NULL; key->translate = NULL; key->skipsblanks = key->skipeblanks = 0; - key->numeric = key->general_numeric = key->month = key->reverse = 0; + key->numeric = key->month = key->reverse = 0; s = argv[i] + 1; - if (! (digits[UCHAR (*s)] || (*s == '.' && digits[UCHAR (s[1])]))) + if (!digits[UCHAR (*s)]) badfieldspec (argv[i]); for (t = 0; digits[UCHAR (*s)]; ++s) t = 10 * t + *s - '0'; @@ -1757,7 +1541,7 @@ main (int argc, char **argv) else if (argv[i][0] == '-' && argv[i][1]) { s = argv[i] + 1; - if (digits[UCHAR (*s)] || (*s == '.' && digits[UCHAR (s[1])])) + if (digits[UCHAR (*s)]) { if (!key) usage (2); @@ -1792,7 +1576,7 @@ main (int argc, char **argv) else { if (i == argc - 1) - error (2, 0, _("option `-k' requires an argument")); + error (2, 0, "option `-k' requires an argument"); else s = argv[++i]; } @@ -1810,34 +1594,15 @@ main (int argc, char **argv) badfieldspec (argv[i]); for (t = 0; digits[UCHAR (*s)]; ++s) t = 10 * t + *s - '0'; - if (t == 0) - { - /* Provoke with `sort -k0' */ - error (0, 0, _("the starting field number argument \ -to the `-k' option must be positive")); - badfieldspec (argv[i]); - } - --t; + if (t) + t--; t2 = 0; if (*s == '.') { - if (!digits[UCHAR (s[1])]) - { - /* Provoke with `sort -k1.' */ - error (0, 0, _("starting field spec has `.' but \ -lacks following character offset")); - badfieldspec (argv[i]); - } for (++s; digits[UCHAR (*s)]; ++s) t2 = 10 * t2 + *s - '0'; - if (t2 == 0) - { - /* Provoke with `sort -k1.0' */ - error (0, 0, _("starting field character offset \ -argument to the `-k' option\nmust be positive")); - badfieldspec (argv[i]); - } - --t2; + if (t2) + t2--; } if (t2 || t) { @@ -1847,52 +1612,20 @@ argument to the `-k' option\nmust be positive")); else key->sword = -1; s = set_ordering (s, key, bl_start); - if (*s == 0) - { - key->eword = -1; - key->echar = 0; - } - else if (*s != ',') + if (*s && *s != ',') badfieldspec (argv[i]); - else if (*s == ',') + else if (*s++) { - /* Skip over comma. */ - ++s; - if (*s == 0) - { - /* Provoke with `sort -k1,' */ - error (0, 0, _("field specification has `,' but \ -lacks following field spec")); - badfieldspec (argv[i]); - } /* Get POS2. */ for (t = 0; digits[UCHAR (*s)]; ++s) t = t * 10 + *s - '0'; - if (t == 0) - { - /* Provoke with `sort -k1,0' */ - error (0, 0, _("ending field number argument \ -to the `-k' option must be positive")); - badfieldspec (argv[i]); - } - --t; t2 = 0; if (*s == '.') { - if (!digits[UCHAR (s[1])]) - { - /* Provoke with `sort -k1,1.' */ - error (0, 0, _("ending field spec has `.' \ -but lacks following character offset")); - badfieldspec (argv[i]); - } for (++s; digits[UCHAR (*s)]; ++s) t2 = t2 * 10 + *s - '0'; - } - else - { - /* `-k 2,3' is equivalent to `+1 -3'. */ - ++t; + if (t2) + t--; } key->eword = t; key->echar = t2; @@ -1912,7 +1645,7 @@ but lacks following character offset")); else { if (i == argc - 1) - error (2, 0, _("option `-o' requires an argument")); + error (2, 0, "option `-o' requires an argument"); else outfile = argv[++i]; } @@ -1929,20 +1662,19 @@ but lacks following character offset")); goto outer; } else - error (2, 0, _("option `-t' requires an argument")); + error (2, 0, "option `-t' requires an argument"); break; case 'T': if (s[1]) temp_file_prefix = ++s; - else + else if (i < argc - 1) { - if (i < argc - 1) - temp_file_prefix = argv[++i]; - else - error (2, 0, _("option `-T' requires an argument")); + temp_file_prefix = argv[++i]; + goto outer; } - goto outer; - /* break; */ + else + error (2, 0, "option `-T' requires an argument"); + break; case 'u': unique = 1; break; @@ -1951,7 +1683,7 @@ but lacks following character offset")); Solaris 2. */ goto outer; default: - fprintf (stderr, _("%s: unrecognized option `-%c'\n"), + fprintf (stderr, "%s: unrecognized option `-%c'\n", argv[0], *s); usage (2); } @@ -1972,8 +1704,7 @@ but lacks following character offset")); /* Inheritance of global options to individual keys. */ for (key = keyhead.next; key; key = key->next) if (!key->ignore && !key->translate && !key->skipsblanks && !key->reverse - && !key->skipeblanks && !key->month && !key->numeric - && !key->general_numeric) + && !key->skipeblanks && !key->month && !key->numeric) { key->ignore = gkey.ignore; key->translate = gkey.translate; @@ -1981,13 +1712,11 @@ but lacks following character offset")); key->skipeblanks = gkey.skipeblanks; key->month = gkey.month; key->numeric = gkey.numeric; - key->general_numeric = gkey.general_numeric; key->reverse = gkey.reverse; } if (!keyhead.next && (gkey.ignore || gkey.translate || gkey.skipsblanks - || gkey.skipeblanks || gkey.month || gkey.numeric - || gkey.general_numeric)) + || gkey.skipeblanks || gkey.month || gkey.numeric)) insertkey (&gkey); reverse = gkey.reverse; @@ -2002,61 +1731,32 @@ but lacks following character offset")); if (strcmp (outfile, "-")) { - struct stat outstat; - if (stat (outfile, &outstat) == 0) + for (i = 0; i < nfiles; ++i) + if (!strcmp (outfile, files[i])) + break; + if (i == nfiles) + ofp = xfopen (outfile, "w"); + else { - /* The following code prevents a race condition when - people use the brain dead shell programming idiom: - cat file | sort -o file - This feature is provided for historical compatibility, - but we strongly discourage ever relying on this in - new shell programs. */ + char buf[8192]; + FILE *fp = xfopen (outfile, "r"); + int cc; - /* Temporarily copy each input file that might be another name - for the output file. When in doubt (e.g. a pipe), copy. */ - for (i = 0; i < nfiles; ++i) + tmp = tempname (); + ofp = xfopen (tmp, "w"); + while ((cc = fread (buf, 1, sizeof buf, fp)) > 0) + xfwrite (buf, 1, cc, ofp); + if (ferror (fp)) { - char buf[8192]; - FILE *fp; - int cc; - - if (S_ISREG (outstat.st_mode) && strcmp (outfile, files[i])) - { - struct stat instat; - if ((strcmp (files[i], "-") - ? stat (files[i], &instat) - : fstat (fileno (stdin), &instat)) != 0) - { - error (0, errno, "%s", files[i]); - cleanup (); - exit (2); - } - if (S_ISREG (instat.st_mode) - && (instat.st_ino != outstat.st_ino - || instat.st_dev != outstat.st_dev)) - { - /* We know the files are distinct. */ - continue; - } - } - - fp = xfopen (files[i], "r"); - tmp = tempname (); - ofp = xtmpfopen (tmp); - while ((cc = fread (buf, 1, sizeof buf, fp)) > 0) - xfwrite (buf, 1, cc, ofp); - if (ferror (fp)) - { - error (0, errno, "%s", files[i]); - cleanup (); - exit (2); - } - xfclose (ofp); - xfclose (fp); - files[i] = tmp; + error (0, errno, "%s", outfile); + cleanup (); + exit (2); } + xfclose (ofp); + xfclose (fp); + files[i] = tmp; + ofp = xfopen (outfile, "w"); } - ofp = xfopen (outfile, "w"); } else ofp = stdout; @@ -2073,12 +1773,57 @@ but lacks following character offset")); Solaris, Ultrix, and Irix. This premature fflush makes the output reappear. --karl@cs.umb.edu */ if (fflush (ofp) < 0) - error (1, errno, _("%s: write error"), outfile); + error (1, errno, "fflush", outfile); if (have_read_stdin && fclose (stdin) == EOF) - error (1, errno, outfile); + error (1, errno, "-"); if (ferror (stdout) || fclose (stdout) == EOF) - error (1, errno, _("%s: write error"), outfile); + error (1, errno, "write error"); exit (0); } + +static void +usage (status) + int status; +{ + if (status != 0) + fprintf (stderr, "Try `%s --help' for more information.\n", + program_name); + else + { + printf ("\ +Usage: %s [OPTION]... [FILE]...\n\ +", + program_name); + printf ("\ +\n\ + +POS1 [-POS2] start a key at POS1, end it before POS2\n\ + -M compare (unknown) < `JAN' < ... < `DEC', imply -b\n\ + -T DIRECT use DIRECTfor temporary files, not $TEMPDIR nor /tmp\n\ + -b ignore leading blanks in sort fields or keys\n\ + -c check if given files already sorted, do not sort\n\ + -d consider only [a-zA-Z0-9 ] characters in keys\n\ + -f fold lower case to upper case characters in keys\n\ + -i consider only [\\040-\\0176] characters in keys\n\ + -k POS1[,POS2] same as +POS1 [-POS2], but all positions counted from 1\n\ + -m merge already sorted files, do not sort\n\ + -n compare according to string numerical value, imply -b\n\ + -o FILE write result on FILE instead of standard output\n\ + -r reverse the result of comparisons\n\ + -s stabilize sort by disabling last resort comparison\n\ + -t SEP use SEParator instead of non- to whitespace transition\n\ + -u with -c, check for strict ordering\n\ + -u with -m, only output the first of an equal sequence\n\ + --help display this help and exit\n\ + --version output version information and exit\n\ +\n\ +POS is F[.C][OPTS], where F is the field number and C the character\n\ +position in the field, both counted from zero. OPTS is made up of one\n\ +or more of Mbdfinr, this effectively disable global -Mbdfinr settings\n\ +for that key. If no key given, use the entire line as key. With no\n\ +FILE, or when FILE is -, read standard input.\n\ +"); + } + exit (status); +} diff --git a/gnu/usr.bin/sort/system.h b/gnu/usr.bin/sort/system.h index bfb19e121c34..4aeaaea188b6 100644 --- a/gnu/usr.bin/sort/system.h +++ b/gnu/usr.bin/sort/system.h @@ -13,25 +13,48 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Include sys/types.h before this file. */ #include <sys/stat.h> -#ifdef STAT_MACROS_BROKEN +#ifdef STAT_MACROS_BROKEN +#ifdef S_ISBLK #undef S_ISBLK +#endif +#ifdef S_ISCHR #undef S_ISCHR +#endif +#ifdef S_ISDIR #undef S_ISDIR +#endif +#ifdef S_ISFIFO #undef S_ISFIFO +#endif +#ifdef S_ISLNK #undef S_ISLNK +#endif +#ifdef S_ISMPB #undef S_ISMPB +#endif +#ifdef S_ISMPC #undef S_ISMPC +#endif +#ifdef S_ISNWK #undef S_ISNWK +#endif +#ifdef S_ISREG #undef S_ISREG +#endif +#ifdef S_ISSOCK #undef S_ISSOCK -#endif /* STAT_MACROS_BROKEN. */ +#endif +#endif /* STAT_MACROS_BROKEN. */ +#ifndef S_ISREG /* Doesn't have POSIX.1 stat stuff. */ +#define mode_t unsigned short +#endif #if !defined(S_ISBLK) && defined(S_IFBLK) #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) #endif @@ -67,56 +90,42 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif - #ifndef _POSIX_VERSION off_t lseek (); #endif -#ifndef STDIN_FILENO -#define STDIN_FILENO 0 +#if defined(HAVE_STRING_H) || defined(STDC_HEADERS) +#if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H) +#include <memory.h> #endif - -#ifndef STDOUT_FILENO -#define STDOUT_FILENO 1 +#include <string.h> +#ifndef index +#define index strchr #endif - -#ifndef STDERR_FILENO -#define STDERR_FILENO 2 +#ifndef rindex +#define rindex strrchr +#endif +/* Don't define bcopy; we need one that can handle overlaps. */ +#ifndef bzero +#define bzero(s, n) memset ((s), 0, (n)) +#endif +#ifndef bcmp +#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) #endif - -/* Don't use bcopy! Use memmove if source and destination may overlap, - memcpy otherwise. */ - -#ifdef HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include <memory.h> -# endif -# include <string.h> #else -# include <strings.h> +#include <strings.h> char *memchr (); #endif #include <errno.h> -#ifndef errno -extern int errno; -#endif - #ifdef STDC_HEADERS #include <stdlib.h> #else char *getenv (); +extern int errno; #endif -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif - -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif - -#ifdef HAVE_FCNTL_H +#if defined(HAVE_FCNTL_H) || defined(_POSIX_VERSION) #include <fcntl.h> #else #include <sys/file.h> @@ -164,42 +173,28 @@ char *getenv (); #include <ctype.h> -#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) -#define ISASCII(c) 1 -#else -#define ISASCII(c) isascii(c) +#ifndef isascii +#define isascii(c) 1 #endif #ifdef isblank -#define ISBLANK(c) (ISASCII (c) && isblank (c)) +#define ISBLANK(c) (isascii (c) && isblank (c)) #else #define ISBLANK(c) ((c) == ' ' || (c) == '\t') #endif #ifdef isgraph -#define ISGRAPH(c) (ISASCII (c) && isgraph (c)) +#define ISGRAPH(c) (isascii (c) && isgraph (c)) #else -#define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c)) +#define ISGRAPH(c) (isascii (c) && isprint (c) && !isspace (c)) #endif -#define ISPRINT(c) (ISASCII (c) && isprint (c)) -#define ISDIGIT(c) (ISASCII (c) && isdigit (c)) -#define ISALNUM(c) (ISASCII (c) && isalnum (c)) -#define ISALPHA(c) (ISASCII (c) && isalpha (c)) -#define ISCNTRL(c) (ISASCII (c) && iscntrl (c)) -#define ISLOWER(c) (ISASCII (c) && islower (c)) -#define ISPUNCT(c) (ISASCII (c) && ispunct (c)) -#define ISSPACE(c) (ISASCII (c) && isspace (c)) -#define ISUPPER(c) (ISASCII (c) && isupper (c)) -#define ISXDIGIT(c) (ISASCII (c) && isxdigit (c)) - -/* Disable string localization for the time being. */ -#undef _ -#define _(String) String - -#ifndef __P -# if PROTOTYPES -# define __P(Args) Args -# else -# define __P(Args) () -# endif -#endif +#define ISPRINT(c) (isascii (c) && isprint (c)) +#define ISDIGIT(c) (isascii (c) && isdigit (c)) +#define ISALNUM(c) (isascii (c) && isalnum (c)) +#define ISALPHA(c) (isascii (c) && isalpha (c)) +#define ISCNTRL(c) (isascii (c) && iscntrl (c)) +#define ISLOWER(c) (isascii (c) && islower (c)) +#define ISPUNCT(c) (isascii (c) && ispunct (c)) +#define ISSPACE(c) (isascii (c) && isspace (c)) +#define ISUPPER(c) (isascii (c) && isupper (c)) +#define ISXDIGIT(c) (isascii (c) && isxdigit (c)) diff --git a/gnu/usr.bin/sort/version.c b/gnu/usr.bin/sort/version.c index 0289fcb69842..64c62b1953ab 100644 --- a/gnu/usr.bin/sort/version.c +++ b/gnu/usr.bin/sort/version.c @@ -1,3 +1,13 @@ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use <config.h> instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ #include <config.h> +#else +#include "config.h" +#endif +#endif + #include "version.h" -const char *version_string = "GNU textutils 1.14"; +const char *version_string = "GNU textutils 1.9"; diff --git a/gnu/usr.bin/tar/Makefile b/gnu/usr.bin/tar/Makefile index c9c76bfdda4b..c0b6d4410405 100644 --- a/gnu/usr.bin/tar/Makefile +++ b/gnu/usr.bin/tar/Makefile @@ -15,3 +15,4 @@ DPADD+= ${LIBGNUREGEX} LDADD+= -lgnuregex .include <bsd.prog.mk> +.include "../../usr.bin/Makefile.inc" diff --git a/gnu/usr.bin/tar/getdate.y b/gnu/usr.bin/tar/getdate.y index aa8f6b512a33..86ca34f7f59c 100644 --- a/gnu/usr.bin/tar/getdate.y +++ b/gnu/usr.bin/tar/getdate.y @@ -1,5 +1,5 @@ %{ -/* $Revision: 1.1.1.1 $ +/* $Revision: 1.2 $ ** ** Originally written by Steven M. Bellovin <smb@research.att.com> while ** at the University of North Carolina at Chapel Hill. Later tweaked by @@ -98,7 +98,7 @@ extern struct tm *localtime(); #if !defined(lint) && !defined(SABER) static char RCS[] = - "$Header: /home/ncvs/src/gnu/usr.bin/tar/getdate.y,v 1.1.1.1 1993/06/18 04:22:21 jkh Exp $"; + "$Header: /pub/FreeBSD/FreeBSD-CVS/src/gnu/usr.bin/tar/getdate.y,v 1.2 1994/11/04 02:12:22 jkh Exp $"; #endif /* !defined(lint) && !defined(SABER) */ diff --git a/gnu/usr.bin/tar/tar.1 b/gnu/usr.bin/tar/tar.1 index 2cb50b30c01e..f2ade73b05a9 100644 --- a/gnu/usr.bin/tar/tar.1 +++ b/gnu/usr.bin/tar/tar.1 @@ -39,7 +39,7 @@ regular disk file. The first argument word of the .Nm command line is usually a command word of bundled function and modifier -letters, optionally preceded by a dash; +letters, optionally preceeded by a dash; it must contain exactly one function letter from the set .Cm A , .Cm c , @@ -53,7 +53,7 @@ extract (further described below). The command word can also contain other function modifiers described below, some of which will take arguments from the command line in the order they are specified in the command word (review the EXAMPLES section). Functions and function modifiers can also be specified -with the GNU argument convention (preceded by two dashes, one function or +with the GNU argument convention (preceeded by two dashes, one function or modifier per word. Command-line arguments that specify files to add to, extract from, or list from an archive may be given as shell pattern matching strings. @@ -132,7 +132,7 @@ this will change the inode-change time!). Sets the block size for reading or writing to N 512-byte blocks. .It Fl B .It Fl -read-full-blocks -Re-assemble short reads into full blocks (for reading 4.2BSD pipes). +Re-assemble short readsinto full blocks (for reading 4.2BSD pipes). .It Fl C Ar directory .It Fl -directory Ar directory Change to @@ -176,7 +176,7 @@ Ignore blocks of zeroes in archive (usually means End-Of-File). .It Fl -ignore-failed-read Don't exit with non-zero status on unreadable files. .It Fl k -.It Fl -keep-old-files +-It Fl -keep-old-files Keep files which already exist on disk; don't overwrite them from the archive. .It Fl K Ar file .It Fl -starting-file Ar file @@ -215,9 +215,6 @@ Extract all protection information. .It Fl -preserve Has the effect of .Fl p s. -.It Fl P -.It Fl -absolute-paths -Don't strip leading `/' from file names. .It Fl R .It Fl -record-number Show record number within archive with each message. @@ -375,7 +372,7 @@ domain version), Jay Fenlason (first GNU author), Joy Kendall, Jim Kingdon, David J. MacKenzie, Michael I Bushnell, Noah Friedman, and innumerable others who have contributed fixes and additions. -Man page obtained by the FreeBSD group from the NetBSD 1.0 release. +Obtained by the FreeBSD group from the NetBSD 1.0 release. .Sh BUGS The .Fl C diff --git a/gnu/usr.bin/tar/tar.c b/gnu/usr.bin/tar/tar.c index 8fb8f810a345..84e2b94283ce 100644 --- a/gnu/usr.bin/tar/tar.c +++ b/gnu/usr.bin/tar/tar.c @@ -25,9 +25,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <stdio.h> #include <sys/types.h> /* Needed for typedefs in tar.h */ -#ifdef __FreeBSD__ -#include <locale.h> -#endif #include "getopt.h" /* @@ -201,10 +198,6 @@ main (argc, argv) { extern char version_string[]; -#ifdef __FreeBSD__ - (void) setlocale (LC_ALL, ""); -#endif - tar = argv[0]; /* JF: was "tar" Set program name */ filename_terminator = '\n'; errors = 0; diff --git a/gnu/usr.bin/texinfo/Makefile.inc b/gnu/usr.bin/texinfo/Makefile.inc index 3bc46441f473..2aa30701b803 100644 --- a/gnu/usr.bin/texinfo/Makefile.inc +++ b/gnu/usr.bin/texinfo/Makefile.inc @@ -1,3 +1,5 @@ # Texinfo defaults. # $Id: Makefile.inc,v 1.2 1994/09/15 12:09:36 jkh Exp $ +INFODIR?= /usr/share/info + diff --git a/gnu/usr.bin/texinfo/info-files/Makefile b/gnu/usr.bin/texinfo/info-files/Makefile index eeda5bd5f4a3..1337187d7885 100644 --- a/gnu/usr.bin/texinfo/info-files/Makefile +++ b/gnu/usr.bin/texinfo/info-files/Makefile @@ -5,7 +5,7 @@ INFOFILES= dir install: - ${INSTALL} -c -g ${BINGRP} -o ${BINOWN} -m 444 ${INFOFILES} \ + install ${COPY} -g ${BINGRP} -o ${BINOWN} -m 444 ${INFOFILES} \ ${DESTDIR}${INFODIR} clean cleandir obj: diff --git a/gnu/usr.bin/texinfo/info-files/dir b/gnu/usr.bin/texinfo/info-files/dir index 6c7f9002d373..ddedcfbcc747 100644 --- a/gnu/usr.bin/texinfo/info-files/dir +++ b/gnu/usr.bin/texinfo/info-files/dir @@ -15,9 +15,6 @@ File: dir Node: Top This is the top of the INFO tree System utilities: * AMD: (amdref). AMD Reference Manual. -* CVS: (cvs). CVS Reference Manual. -* CVS-CLIENT: (cvsclient). CVS client/server Reference Manual. -* DIFF: (diff). DIFF/PATCH Reference Manual. * DC: (dc). The GNU desk calculator. * GAWK: (gawk). The GNU AWK language interpreter manual. * Info: (info). Manual for this documentation browsing system. @@ -46,7 +43,6 @@ Programming & development tools: * GXX Internals: (gxxint). Guide to the internals of the GNU C++ compiler. * GDB: (gdb). The GNU Debugger (C & C++) manual. * GDB Internals: (gdbint). Guide to the internals of GDB. -* GMP: (gmp). The GNU MP Math library. * History: (history). The GNU History library. * Readline: (readline). The GNU Readline library * Regex: (regex). The GNU regular expression library. diff --git a/gnu/usr.bin/texinfo/info/info.1 b/gnu/usr.bin/texinfo/info/info.1 index aabfcf12962d..674bcefb8dde 100644 --- a/gnu/usr.bin/texinfo/info/info.1 +++ b/gnu/usr.bin/texinfo/info/info.1 @@ -216,8 +216,7 @@ is not given. .B INFO_PRINT_COMMAND The command used for printing. .SH SEE ALSO -.BR man (1) -.\" .BR emacs (1) +.BR emacs (1) .SH AUTHOR .RS Brian Fox, Free Software Foundation diff --git a/gnu/usr.bin/texinfo/misc/Makefile b/gnu/usr.bin/texinfo/misc/Makefile index c53561dd405c..59fb65f61a2c 100644 --- a/gnu/usr.bin/texinfo/misc/Makefile +++ b/gnu/usr.bin/texinfo/misc/Makefile @@ -39,8 +39,8 @@ LOADLIBES = $(LIBS) SHELL = /bin/sh -CFLAGS = -O2 -LDFLAGS = -O2 +CFLAGS = -g +LDFLAGS = -g prefix = /usr/local exec_prefix = $(prefix) |
