CVS commit: src/usr.bin/lam

2021-01-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Jan 25 20:07:55 UTC 2021

Modified Files:
src/usr.bin/lam: lam.1

Log Message:
In the lam(1) example with a literal newline, use newish sh syntax.

Bump date (as of when I wrote the change and discussed it, in October;
forgot to commit since)


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/lam/lam.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/lam/lam.1
diff -u src/usr.bin/lam/lam.1:1.14 src/usr.bin/lam/lam.1:1.15
--- src/usr.bin/lam/lam.1:1.14	Mon Oct 26 04:09:32 2020
+++ src/usr.bin/lam/lam.1	Mon Jan 25 20:07:55 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lam.1,v 1.14 2020/10/26 04:09:32 dholland Exp $
+.\"	$NetBSD: lam.1,v 1.15 2021/01/25 20:07:55 dholland Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)lam.1	8.1 (Berkeley) 6/6/93
 .\"
-.Dd October 25, 2020
+.Dd October 26, 2020
 .Dt LAM 1
 .Os
 .Sh NAME
@@ -109,12 +109,10 @@ lam file1 file2 file3 file4
 joins 4 files together along each line.
 To merge the lines from four different files use
 .Bd -literal -offset indent
-lam file1 \-S "
-" file2 file3 file4
+lam file1 \-S $'\en' file2 file3 file4
 .Ed
 .Pp
-(with a literal newline; the means for inserting one may depend on
-your shell.)
+(The means for inserting a newline may depend on your shell.)
 .Pp
 Every 2 lines of a file may be joined on one line with
 .Bd -literal -offset indent



CVS commit: src/usr.bin/lam

2020-10-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Oct 26 04:09:32 UTC 2020

Modified Files:
src/usr.bin/lam: lam.1

Log Message:
Clarify the behavior of -S further in lam(1).

Seems that "lam file1 -S sep file2" does not carry the -S over past
file2, even though you can also write "lam file1 file2 -[sS] sep" to
give a separator string after the last file.

Ride previous date bump.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/lam/lam.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/lam/lam.1
diff -u src/usr.bin/lam/lam.1:1.13 src/usr.bin/lam/lam.1:1.14
--- src/usr.bin/lam/lam.1:1.13	Mon Oct 26 03:51:54 2020
+++ src/usr.bin/lam/lam.1	Mon Oct 26 04:09:32 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lam.1,v 1.13 2020/10/26 03:51:54 dholland Exp $
+.\"	$NetBSD: lam.1,v 1.14 2020/10/26 04:09:32 dholland Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -89,6 +89,8 @@ Print
 .Ar sepstring
 before printing line fragments from the next file.
 This option may appear after the last file.
+(A capitalized version appearing before the last file is not carried
+over past the last file.)
 .It Fl t Ar c
 The input line terminator is
 .Ar c



CVS commit: src/usr.bin/lam

2020-10-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Oct 26 03:51:54 UTC 2020

Modified Files:
src/usr.bin/lam: lam.1

Log Message:
Improve previous lam(1) change.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/lam/lam.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/lam/lam.1
diff -u src/usr.bin/lam/lam.1:1.12 src/usr.bin/lam/lam.1:1.13
--- src/usr.bin/lam/lam.1:1.12	Mon Oct 26 03:46:57 2020
+++ src/usr.bin/lam/lam.1	Mon Oct 26 03:51:54 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lam.1,v 1.12 2020/10/26 03:46:57 dholland Exp $
+.\"	$NetBSD: lam.1,v 1.13 2020/10/26 03:51:54 dholland Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -111,6 +111,9 @@ lam file1 \-S "
 " file2 file3 file4
 .Ed
 .Pp
+(with a literal newline; the means for inserting one may depend on
+your shell.)
+.Pp
 Every 2 lines of a file may be joined on one line with
 .Bd -literal -offset indent
 lam \- \- < file



CVS commit: src/usr.bin/lam

2020-10-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Oct 26 03:46:57 UTC 2020

Modified Files:
src/usr.bin/lam: lam.1

Log Message:
Fix the second example in lam(1).

(a) revert -r1.8 (changing -s back to -S) as it was wrong;
(b) get rid of the backslash since it doesn't belong.
(c) bump date.

Noted by Robert Elz.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/lam/lam.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/lam/lam.1
diff -u src/usr.bin/lam/lam.1:1.11 src/usr.bin/lam/lam.1:1.12
--- src/usr.bin/lam/lam.1:1.11	Mon Jul  3 21:34:19 2017
+++ src/usr.bin/lam/lam.1	Mon Oct 26 03:46:57 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lam.1,v 1.11 2017/07/03 21:34:19 wiz Exp $
+.\"	$NetBSD: lam.1,v 1.12 2020/10/26 03:46:57 dholland Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)lam.1	8.1 (Berkeley) 6/6/93
 .\"
-.Dd January 5, 2016
+.Dd October 25, 2020
 .Dt LAM 1
 .Os
 .Sh NAME
@@ -107,7 +107,7 @@ lam file1 file2 file3 file4
 joins 4 files together along each line.
 To merge the lines from four different files use
 .Bd -literal -offset indent
-lam file1 \-s "\e
+lam file1 \-S "
 " file2 file3 file4
 .Ed
 .Pp



CVS commit: src/usr.bin/lam

2016-01-04 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Jan  4 23:31:44 UTC 2016

Modified Files:
src/usr.bin/lam: lam.1

Log Message:
Add HISTORY and AUTHORS to lam

John A. Kunze requested to add himself as the authord of rs
on the FreeBSD bugzilla with the following text:

  Please re-instate my name (as "John A. Kunze") as AUTHOR of the
  jot, rs, and lam utilities.  I wrote these in 1982, around or
  before the time that I worked with Jordan at UCB (he left to work
  at FreeBSD and later at Apple).  Thank you!

  -- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196786

While there add a note that this tool first appeared in BSD 4.2.
This information is based on the FreeBSD manual pages.

Patch submitted by Michal Mazurek .

Reviewed by 


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/lam/lam.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/lam/lam.1
diff -u src/usr.bin/lam/lam.1:1.8 src/usr.bin/lam/lam.1:1.9
--- src/usr.bin/lam/lam.1:1.8	Thu Dec 13 21:09:34 2012
+++ src/usr.bin/lam/lam.1	Mon Jan  4 23:31:44 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lam.1,v 1.8 2012/12/13 21:09:34 pgoyette Exp $
+.\"	$NetBSD: lam.1,v 1.9 2016/01/04 23:31:44 kamil Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -126,3 +126,10 @@ lam \-t @ letter changes
 .Xr join 1 ,
 .Xr pr 1 ,
 .Xr printf 3
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Bx 4.2 .
+.Sh AUTHORS
+.An John A. Kunze



CVS commit: src/usr.bin/lam

2016-01-04 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Jan  4 23:57:23 UTC 2016

Modified Files:
src/usr.bin/lam: lam.1

Log Message:
Bump date for previous


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/lam/lam.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/lam/lam.1
diff -u src/usr.bin/lam/lam.1:1.9 src/usr.bin/lam/lam.1:1.10
--- src/usr.bin/lam/lam.1:1.9	Mon Jan  4 23:31:44 2016
+++ src/usr.bin/lam/lam.1	Mon Jan  4 23:57:23 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lam.1,v 1.9 2016/01/04 23:31:44 kamil Exp $
+.\"	$NetBSD: lam.1,v 1.10 2016/01/04 23:57:23 kamil Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)lam.1	8.1 (Berkeley) 6/6/93
 .\"
-.Dd December 1, 2001
+.Dd January 5, 2016
 .Dt LAM 1
 .Os
 .Sh NAME



CVS commit: src/usr.bin/lam

2012-12-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Dec 13 21:09:35 UTC 2012

Modified Files:
src/usr.bin/lam: lam.1

Log Message:
Adjust case of example to match usage (and code)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/lam/lam.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/lam/lam.1
diff -u src/usr.bin/lam/lam.1:1.7 src/usr.bin/lam/lam.1:1.8
--- src/usr.bin/lam/lam.1:1.7	Mon Apr  5 21:18:56 2010
+++ src/usr.bin/lam/lam.1	Thu Dec 13 21:09:34 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: lam.1,v 1.7 2010/04/05 21:18:56 joerg Exp $
+.\	$NetBSD: lam.1,v 1.8 2012/12/13 21:09:34 pgoyette Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -107,7 +107,7 @@ lam file1 file2 file3 file4
 joins 4 files together along each line.
 To merge the lines from four different files use
 .Bd -literal -offset indent
-lam file1 \-S \e
+lam file1 \-s \e
  file2 file3 file4
 .Ed
 .Pp



CVS commit: src/usr.bin/lam

2011-09-04 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Sep  4 20:28:09 UTC 2011

Modified Files:
src/usr.bin/lam: lam.c

Log Message:
ANSIfy + static + __dead


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/lam/lam.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/lam/lam.c
diff -u src/usr.bin/lam/lam.c:1.7 src/usr.bin/lam/lam.c:1.8
--- src/usr.bin/lam/lam.c:1.7	Sun Apr 12 13:01:55 2009
+++ src/usr.bin/lam/lam.c	Sun Sep  4 20:28:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lam.c,v 1.7 2009/04/12 13:01:55 lukem Exp $	*/
+/*	$NetBSD: lam.c,v 1.8 2011/09/04 20:28:09 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)lam.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: lam.c,v 1.7 2009/04/12 13:01:55 lukem Exp $);
+__RCSID($NetBSD: lam.c,v 1.8 2011/09/04 20:28:09 joerg Exp $);
 #endif /* not lint */
 
 /*
@@ -65,21 +65,18 @@
 	const char *format;	/* printf(3) style string spec. */
 }	input[MAXOFILES];
 
-int	morefiles;		/* set by getargs(), changed by gatherline() */
-int	nofinalnl;		/* normally append \n to each output line */
-char	line[BIGBUFSIZ];
-char	*linep;
-
-void	 error __P((const char *, const char *));
-char	*gatherline __P((struct openfile *));
-void	 getargs __P((char *[]));
-int	 main __P((int, char **));
-char	*pad __P((struct openfile *));
+static int	morefiles;		/* set by getargs(), changed by gatherline() */
+static int	nofinalnl;		/* normally append \n to each output line */
+static char	line[BIGBUFSIZ];
+static char	*linep;
+
+__dead static void	 error(const char *, const char *);
+static char	*gatherline(struct openfile *);
+static void	 getargs(char *[]);
+static char	*pad(struct openfile *);
 
 int
-main(argc, argv)
-	int argc;
-	char *argv[];
+main(int argc, char *argv[])
 {
 	struct	openfile *ip;
 
@@ -99,9 +96,8 @@
 	}
 }
 
-void
-getargs(av)
-	char *av[];
+static void
+getargs(char *av[])
 {
 	struct openfile *ip = input;
 	char *p, *c;
@@ -177,9 +173,8 @@
 		ip-sepstring = ;
 }
 
-char *
-pad(ip)
-	struct openfile *ip;
+static char *
+pad(struct openfile *ip)
 {
 	char *lp = linep;
 
@@ -192,9 +187,8 @@
 	return (lp);
 }
 
-char *
-gatherline(ip)
-	struct openfile *ip;
+static char *
+gatherline(struct openfile *ip)
 {
 	char s[BUFSIZ];
 	int c;
@@ -222,7 +216,7 @@
 	return (lp);
 }
 
-void
+static void
 error(const char *msg, const char *s)
 {
 	warnx(msg, s);



CVS commit: src/usr.bin/lam

2010-04-05 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Apr  5 21:18:56 UTC 2010

Modified Files:
src/usr.bin/lam: lam.1

Log Message:
\\ - \e


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/lam/lam.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/lam/lam.1
diff -u src/usr.bin/lam/lam.1:1.6 src/usr.bin/lam/lam.1:1.7
--- src/usr.bin/lam/lam.1:1.6	Fri Jan 18 01:50:11 2008
+++ src/usr.bin/lam/lam.1	Mon Apr  5 21:18:56 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: lam.1,v 1.6 2008/01/18 01:50:11 jschauma Exp $
+.\	$NetBSD: lam.1,v 1.7 2010/04/05 21:18:56 joerg Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -107,7 +107,7 @@
 joins 4 files together along each line.
 To merge the lines from four different files use
 .Bd -literal -offset indent
-lam file1 \-S \\
+lam file1 \-S \e
  file2 file3 file4
 .Ed
 .Pp



CVS commit: src/usr.bin/lam

2009-04-12 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Apr 12 13:01:55 UTC 2009

Modified Files:
src/usr.bin/lam: lam.c

Log Message:
fix -Wcast-qual issues


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/lam/lam.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/lam/lam.c
diff -u src/usr.bin/lam/lam.c:1.6 src/usr.bin/lam/lam.c:1.7
--- src/usr.bin/lam/lam.c:1.6	Mon Jul 21 14:19:23 2008
+++ src/usr.bin/lam/lam.c	Sun Apr 12 13:01:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: lam.c,v 1.6 2008/07/21 14:19:23 lukem Exp $	*/
+/*	$NetBSD: lam.c,v 1.7 2009/04/12 13:01:55 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = @(#)lam.c	8.1 (Berkeley) 6/6/93;
 #endif
-__RCSID($NetBSD: lam.c,v 1.6 2008/07/21 14:19:23 lukem Exp $);
+__RCSID($NetBSD: lam.c,v 1.7 2009/04/12 13:01:55 lukem Exp $);
 #endif /* not lint */
 
 /*
@@ -61,8 +61,8 @@
 	short	eof;		/* eof flag */
 	short	pad;		/* pad flag for missing columns */
 	char	eol;		/* end of line character */
-	char	*sepstring;	/* string to print before each line */
-	char	*format;	/* printf(3) style string spec. */
+	const char *sepstring;	/* string to print before each line */
+	const char *format;	/* printf(3) style string spec. */
 }	input[MAXOFILES];
 
 int	morefiles;		/* set by getargs(), changed by gatherline() */
@@ -70,7 +70,7 @@
 char	line[BIGBUFSIZ];
 char	*linep;
 
-void	 error __P((char *, char *));
+void	 error __P((const char *, const char *));
 char	*gatherline __P((struct openfile *));
 void	 getargs __P((char *[]));
 int	 main __P((int, char **));
@@ -223,8 +223,7 @@
 }
 
 void
-error(msg, s)
-	char *msg, *s;
+error(const char *msg, const char *s)
 {
 	warnx(msg, s);
 	fprintf(stderr,