Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / gnu / usr.bin / rcs / ident / ident.1
1 .de Id
2 .ds Rv \\$3
3 .ds Dt \\$4
4 .ds iD \\$3 \\$4 \\$5 \\$6 \\$7
5 ..
6 .Id $FreeBSD: src/gnu/usr.bin/rcs/ident/ident.1,v 1.5 1999/08/27 23:36:42 peter Exp $
7 .Id $DragonFly: src/gnu/usr.bin/rcs/ident/ident.1,v 1.2 2003/06/17 04:25:47 dillon Exp $
8 .ds r \&\s-1RCS\s0
9 .ds u \&\s-1UTC\s0
10 .if n .ds - \%--
11 .if t .ds - \(em
12 .TH IDENT 1 \*(Dt GNU
13 .SH NAME
14 ident \- identify RCS keyword strings in files
15 .SH SYNOPSIS
16 .B ident
17 [
18 .B \-q
19 ] [
20 .B \-V
21 ] [
22 .I file
23 \&.\|.\|. ]
24 .SH DESCRIPTION
25 .B ident
26 searches for all instances of the pattern
27 .BI $ keyword : "\ text\ " $
28 in the named files or, if no files are named, the standard input.
29 .PP
30 These patterns are normally inserted automatically by the \*r command
31 .BR co (1),
32 but can also be inserted manually.
33 The option
34 .B \-q
35 suppresses
36 the warning given if there are no patterns in a file.
37 The option
38 .B \-V
39 prints
40 .BR ident 's
41 version number.
42 .PP
43 .B ident
44 works on text files as well as object files and dumps.
45 For example, if the C program in
46 .B f.c
47 contains
48 .IP
49 .ft 3
50 #include <stdio.h>
51 .br
52 static char const rcsid[] =
53 .br
54   \&"$\&Id: f.c,v \*(iD $\&";
55 .br
56 int main() { return printf(\&"%s\en\&", rcsid) == EOF; }
57 .ft P
58 .LP
59 and
60 .B f.c
61 is compiled into
62 .BR f.o ,
63 then the command
64 .IP
65 .B "ident  f.c  f.o"
66 .LP
67 will output
68 .nf
69 .IP
70 .ft 3
71 f.c:
72     $\&Id: f.c,v \*(iD $
73 f.o:
74     $\&Id: f.c,v \*(iD $
75 .ft
76 .fi
77 .PP
78 If a C program defines a string like
79 .B rcsid
80 above but does not use it,
81 .BR lint (1)
82 may complain, and some C compilers will optimize away the string.
83 The most reliable solution is to have the program use the
84 .B rcsid
85 string, as shown in the example above.
86 .PP
87 .B ident
88 finds all instances of the
89 .BI $ keyword : "\ text\ " $
90 pattern, even if
91 .I keyword
92 is not actually an \*r-supported keyword.
93 This gives you information about nonstandard keywords like
94 .BR $\&XConsortium$ .
95 .SH KEYWORDS
96 Here is the list of keywords currently maintained by
97 .BR co (1).
98 All times are given in Coordinated Universal Time (\*u,
99 sometimes called \&\s-1GMT\s0) by default, but if the files
100 were checked out with
101 .BR co 's
102 .BI \-z zone
103 option, times are given with a numeric time zone indication appended.
104 .TP
105 .B $\&Author$
106 The login name of the user who checked in the revision.
107 .TP
108 .B $\&Date$
109 The date and time the revision was checked in.
110 .TP
111 .B $\&Header$
112 A standard header containing the full pathname of the \*r file, the
113 revision number, the date and time, the author, the state,
114 and the locker (if locked).
115 .TP
116 .B $\&Id$
117 Same as
118 .BR $\&Header$ ,
119 except that the \*r filename is without a path.
120 .TP
121 .B $\&Locker$
122 The login name of the user who locked the revision (empty if not locked).
123 .TP
124 .B $\&Log$
125 The log message supplied during checkin.
126 For
127 .BR ident 's
128 purposes, this is equivalent to
129 .BR $\&RCSfile$ .
130 .TP
131 .B $\&Name$
132 The symbolic name used to check out the revision, if any.
133 .TP
134 .B $\&RCSfile$
135 The name of the \*r file without a path.
136 .TP
137 .B $\&Revision$
138 The revision number assigned to the revision.
139 .TP
140 .B $\&Source$
141 The full pathname of the \*r file.
142 .TP
143 .B $\&State$
144 The state assigned to the revision with the
145 .B \-s
146 option of
147 .BR rcs (1)
148 or
149 .BR ci (1).
150 .PP
151 .BR co (1)
152 represents the following characters in keyword values by escape sequences
153 to keep keyword strings well-formed.
154 .LP
155 .RS
156 .nf
157 .ne 6
158 .ta \w'newline  'u
159 \f2char escape sequence\fP
160 tab     \f3\et\fP
161 newline \f3\en\fP
162 space   \f3\e040
163 $       \e044
164 \e      \e\e\fP
165 .fi
166 .RE
167 .SH IDENTIFICATION
168 Author: Walter F. Tichy.
169 .br
170 Manual Page Revision: \*(Rv; Release Date: \*(Dt.
171 .br
172 Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
173 .br
174 Copyright \(co 1990, 1992, 1993 Paul Eggert.
175 .SH "SEE ALSO"
176 ci(1), co(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1),
177 rcsfile(5)
178 .br
179 Walter F. Tichy,
180 \*r\*-A System for Version Control,
181 .I "Software\*-Practice & Experience"
182 .BR 15 ,
183 7 (July 1985), 637-654.