summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2005-11-21 08:34:26 +0000
committerxsa <xsa@openbsd.org>2005-11-21 08:34:26 +0000
commit10cdf919f60dd87c466abadf5bb30becb0dfbc10 (patch)
tree147bf6d552fff241350ca9dfa4e501bb22c667c2
parentfix up the copyright date on these pages. the ipmi.4 change is ok by marco@ (diff)
downloadwireguard-openbsd-10cdf919f60dd87c466abadf5bb30becb0dfbc10.tar.xz
wireguard-openbsd-10cdf919f60dd87c466abadf5bb30becb0dfbc10.zip
add EXAMPLES section; input+ok jmc, niallo ok
-rw-r--r--usr.bin/rcs/ident.127
1 files changed, 26 insertions, 1 deletions
diff --git a/usr.bin/rcs/ident.1 b/usr.bin/rcs/ident.1
index 8331a592984..bb590a80858 100644
--- a/usr.bin/rcs/ident.1
+++ b/usr.bin/rcs/ident.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ident.1,v 1.2 2005/10/19 16:15:36 xsa Exp $
+.\" $OpenBSD: ident.1,v 1.3 2005/11/21 08:34:26 xsa Exp $
.\"
.\" Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
.\" All rights reserved.
@@ -43,6 +43,31 @@ Quiet mode, suppress warnings if no pattern found.
.It Fl V
Display version information and exit.
.El
+.Sh EXAMPLES
+Given the following source code in file
+.Pa foo.c :
+.Bd -literal -offset indent
+#include <stdio.h>
+
+static char const rcsid[] =
+ "$\&Id: foo.c,v 1.2 2005/11/18 09:34:51 xsa Exp $";
+
+int
+main(void) {
+ printf("%s\en", rcsid);
+ return (0);
+}
+.Ed
+.Pp
+Compile it and run
+.Nm :
+.Bd -literal -offset indent
+$ ident foo.c foo.o
+foo.c:
+ $\&Id: foo.c,v 1.2 2005/11/18 09:34:51 xsa Exp $
+foo.o:
+ $\&Id: foo.c,v 1.2 2005/11/18 09:34:51 xsa Exp $
+.Ed
.Sh SEE ALSO
.Xr ci 1 ,
.Xr co 1 ,