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