annotate kpathsea/standards.texi @ 2331:798a4d06ba7d

[project @ 1996-07-19 01:52:57 by jwe] Initial revision
author jwe
date Fri, 19 Jul 1996 01:57:38 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2331
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1 \input texinfo @c -*-texinfo-*-
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2 @c %**start of header
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
3 @setfilename standards.info
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
4 @settitle GNU Coding Standards
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
5 @c UPDATE THIS DATE WHENEVER YOU MAKE CHANGES!
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
6 @set lastupdate 17 November 1994
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
7 @c %**end of header
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
8
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
9 @ifinfo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
10 @format
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
11 START-INFO-DIR-ENTRY
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
12 * Standards: (standards). GNU coding standards.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
13 END-INFO-DIR-ENTRY
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
14 @end format
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
15 @end ifinfo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
16
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
17 @setchapternewpage off
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
18
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
19 @ifinfo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
20 GNU Coding Standards
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
21 Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
22
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
23 Permission is granted to make and distribute verbatim copies of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
24 this manual provided the copyright notice and this permission notice
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
25 are preserved on all copies.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
26
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
27 @ignore
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
28 Permission is granted to process this file through TeX and print the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
29 results, provided the printed document carries copying permission
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
30 notice identical to this one except for the removal of this paragraph
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
31 (this paragraph not being relevant to the printed manual).
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
32 @end ignore
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
33
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
34 Permission is granted to copy and distribute modified versions of this
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
35 manual under the conditions for verbatim copying, provided that the entire
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
36 resulting derived work is distributed under the terms of a permission
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
37 notice identical to this one.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
38
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
39 Permission is granted to copy and distribute translations of this manual
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
40 into another language, under the above conditions for modified versions,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
41 except that this permission notice may be stated in a translation approved
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
42 by the Free Software Foundation.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
43 @end ifinfo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
44
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
45 @titlepage
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
46 @title GNU Coding Standards
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
47 @author Richard Stallman
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
48 @author last updated @value{lastupdate}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
49 @page
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
50
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
51 @vskip 0pt plus 1filll
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
52 Copyright @copyright{} 1992, 1993 Free Software Foundation, Inc.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
53
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
54 Permission is granted to make and distribute verbatim copies of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
55 this manual provided the copyright notice and this permission notice
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
56 are preserved on all copies.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
57
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
58 Permission is granted to copy and distribute modified versions of this
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
59 manual under the conditions for verbatim copying, provided that the entire
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
60 resulting derived work is distributed under the terms of a permission
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
61 notice identical to this one.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
62
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
63 Permission is granted to copy and distribute translations of this manual
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
64 into another language, under the above conditions for modified versions,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
65 except that this permission notice may be stated in a translation approved
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
66 by the Free Software Foundation.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
67 @end titlepage
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
68
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
69 @ifinfo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
70 @node Top, Preface, (dir), (dir)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
71 @top Version
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
72
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
73 Last updated @value{lastupdate}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
74 @end ifinfo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
75
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
76 @menu
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
77 * Preface:: About the GNU Coding Standards
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
78 * Reading Non-Free Code:: Referring to Proprietary Programs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
79 * Contributions:: Accepting Contributions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
80 * Change Logs:: Recording Changes
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
81 * Compatibility:: Compatibility with Other Implementations
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
82 * Makefile Conventions:: Makefile Conventions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
83 * Configuration:: How Configuration Should Work
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
84 * Source Language:: Using Languages Other Than C
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
85 * Formatting:: Formatting Your Source Code
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
86 * Comments:: Commenting Your Work
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
87 * Syntactic Conventions:: Clean Use of C Constructs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
88 * Names:: Naming Variables and Functions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
89 * Using Extensions:: Using Non-standard Features
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
90 * System Functions:: Portability and ``standard'' library functions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
91 * Semantics:: Program Behavior for All Programs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
92 * Errors:: Formatting Error Messages
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
93 * Libraries:: Library Behavior
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
94 * Portability:: Portability As It Applies to GNU
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
95 * User Interfaces:: Standards for Command Line Interfaces
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
96 * Documentation:: Documenting Programs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
97 * Releases:: Making Releases
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
98 @end menu
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
99
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
100 @node Preface
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
101 @chapter About the GNU Coding Standards
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
102
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
103 The GNU Coding Standards were written by Richard Stallman and other GNU
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
104 Project volunteers. Their purpose is to make the GNU system clean,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
105 consistent, and easy to install. This document can also be read as a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
106 guide to write portable, robust and reliable programs. It focuses on
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
107 programs written in C, but many of the rules and principles are useful
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
108 even if you write in another programming language. The rules often
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
109 state reasons for writing in a certain way.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
110
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
111 Corrections or suggestions regarding this document should be sent to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
112 @code{gnu@@prep.ai.mit.edu}. If you make a suggestion, please include a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
113 suggested new wording for it; our time is limited. We prefer a context
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
114 diff to the @file{standards.texi} or @file{make-stds.texi} files, but if
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
115 you don't have those files, please mail your suggestion anyway.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
116
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
117 This release of the GNU Coding Standards was last updated
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
118 @value{lastupdate}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
119
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
120 @node Reading Non-Free Code
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
121 @chapter Referring to Proprietary Programs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
122
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
123 Don't in any circumstances refer to Unix source code for or during
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
124 your work on GNU! (Or to any other proprietary programs.)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
125
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
126 If you have a vague recollection of the internals of a Unix program,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
127 this does not absolutely mean you can't write an imitation of it, but
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
128 do try to organize the imitation internally along different lines,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
129 because this is likely to make the details of the Unix version
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
130 irrelevant and dissimilar to your results.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
131
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
132 For example, Unix utilities were generally optimized to minimize
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
133 memory use; if you go for speed instead, your program will be very
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
134 different. You could keep the entire input file in core and scan it
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
135 there instead of using stdio. Use a smarter algorithm discovered more
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
136 recently than the Unix program. Eliminate use of temporary files. Do
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
137 it in one pass instead of two (we did this in the assembler).
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
138
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
139 Or, on the contrary, emphasize simplicity instead of speed. For some
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
140 applications, the speed of today's computers makes simpler algorithms
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
141 adequate.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
142
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
143 Or go for generality. For example, Unix programs often have static
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
144 tables or fixed-size strings, which make for arbitrary limits; use
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
145 dynamic allocation instead. Make sure your program handles NULs and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
146 other funny characters in the input files. Add a programming language
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
147 for extensibility and write part of the program in that language.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
148
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
149 Or turn some parts of the program into independently usable libraries.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
150 Or use a simple garbage collector instead of tracking precisely when
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
151 to free memory, or use a new GNU facility such as obstacks.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
152
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
153
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
154 @node Contributions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
155 @chapter Accepting Contributions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
156
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
157 If someone else sends you a piece of code to add to the program you are
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
158 working on, we need legal papers to use it---the same sort of legal
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
159 papers we will need to get from you. @emph{Each} significant
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
160 contributor to a program must sign some sort of legal papers in order
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
161 for us to have clear title to the program. The main author alone is not
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
162 enough.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
163
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
164 So, before adding in any contributions from other people, tell us
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
165 so we can arrange to get the papers. Then wait until we tell you
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
166 that we have received the signed papers, before you actually use the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
167 contribution.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
168
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
169 This applies both before you release the program and afterward. If
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
170 you receive diffs to fix a bug, and they make significant change, we
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
171 need legal papers for it.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
172
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
173 You don't need papers for changes of a few lines here or there, since
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
174 they are not significant for copyright purposes. Also, you don't need
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
175 papers if all you get from the suggestion is some ideas, not actual code
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
176 which you use. For example, if you write a different solution to the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
177 problem, you don't need to get papers.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
178
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
179 I know this is frustrating; it's frustrating for us as well. But if
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
180 you don't wait, you are going out on a limb---for example, what if the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
181 contributor's employer won't sign a disclaimer? You might have to take
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
182 that code out again!
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
183
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
184 The very worst thing is if you forget to tell us about the other
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
185 contributor. We could be very embarrassed in court some day as a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
186 result.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
187
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
188 @node Change Logs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
189 @chapter Change Logs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
190
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
191 Keep a change log for each directory, describing the changes made to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
192 source files in that directory. The purpose of this is so that people
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
193 investigating bugs in the future will know about the changes that
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
194 might have introduced the bug. Often a new bug can be found by
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
195 looking at what was recently changed. More importantly, change logs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
196 can help eliminate conceptual inconsistencies between different parts
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
197 of a program; they can give you a history of how the conflicting
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
198 concepts arose.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
199
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
200 Use the Emacs command @kbd{M-x add-change-log-entry} to start a new
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
201 entry in the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
202 change log. An entry should have an asterisk, the name of the changed
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
203 file, and then in parentheses the name of the changed functions,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
204 variables or whatever, followed by a colon. Then describe the changes
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
205 you made to that function or variable.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
206
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
207 Separate unrelated entries with blank lines. When two entries
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
208 represent parts of the same change, so that they work together, then
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
209 don't put blank lines between them. Then you can omit the file name
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
210 and the asterisk when successive entries are in the same file.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
211
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
212 Here are some examples:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
213
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
214 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
215 * register.el (insert-register): Return nil.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
216 (jump-to-register): Likewise.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
217
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
218 * sort.el (sort-subr): Return nil.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
219
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
220 * tex-mode.el (tex-bibtex-file, tex-file, tex-region):
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
221 Restart the tex shell if process is gone or stopped.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
222 (tex-shell-running): New function.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
223
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
224 * expr.c (store_one_arg): Round size up for move_block_to_reg.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
225 (expand_call): Round up when emitting USE insns.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
226 * stmt.c (assign_parms): Round size up for move_block_from_reg.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
227 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
228
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
229 It's important to name the changed function or variable in full. Don't
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
230 abbreviate them; don't combine them. Subsequent maintainers will often
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
231 search for a function name to find all the change log entries that
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
232 pertain to it; if you abbreviate the name, they won't find it when they
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
233 search. For example, some people are tempted to abbreviate groups of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
234 function names by writing @samp{* register.el
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
235 (@{insert,jump-to@}-register)}; this is not a good idea, since searching
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
236 for @code{jump-to-register} or @code{insert-register} would not find the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
237 entry.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
238
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
239 There's no need to describe the full purpose of the changes or how they
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
240 work together. It is better to put such explanations in comments in the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
241 code. That's why just ``New function'' is enough; there is a comment
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
242 with the function in the source to explain what it does.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
243
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
244 However, sometimes it is useful to write one line to describe the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
245 overall purpose of a large batch of changes.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
246
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
247 You can think of the change log as a conceptual ``undo list'' which
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
248 explains how earlier versions were different from the current version.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
249 People can see the current version; they don't need the change log
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
250 to tell them what is in it. What they want from a change log is a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
251 clear explanation of how the earlier version differed.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
252
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
253 When you change the calling sequence of a function in a simple
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
254 fashion, and you change all the callers of the function, there is no
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
255 need to make individual entries for all the callers. Just write in
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
256 the entry for the function being called, ``All callers changed.''
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
257
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
258 When you change just comments or doc strings, it is enough to write an
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
259 entry for the file, without mentioning the functions. Write just,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
260 ``Doc fix.'' There's no need to keep a change log for documentation
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
261 files. This is because documentation is not susceptible to bugs that
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
262 are hard to fix. Documentation does not consist of parts that must
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
263 interact in a precisely engineered fashion; to correct an error, you
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
264 need not know the history of the erroneous passage.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
265
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
266
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
267 @node Compatibility
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
268 @chapter Compatibility with Other Implementations
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
269
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
270 With certain exceptions, utility programs and libraries for GNU should
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
271 be upward compatible with those in Berkeley Unix, and upward compatible
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
272 with @sc{ANSI} C if @sc{ANSI} C specifies their behavior, and upward
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
273 compatible with @sc{POSIX} if @sc{POSIX} specifies their behavior.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
274
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
275 When these standards conflict, it is useful to offer compatibility
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
276 modes for each of them.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
277
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
278 @sc{ANSI} C and @sc{POSIX} prohibit many kinds of extensions. Feel
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
279 free to make the extensions anyway, and include a @samp{--ansi} or
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
280 @samp{--compatible} option to turn them off. However, if the extension
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
281 has a significant chance of breaking any real programs or scripts,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
282 then it is not really upward compatible. Try to redesign its
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
283 interface.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
284
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
285 Many GNU programs suppress extensions that conflict with POSIX if the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
286 environment variable @code{POSIXLY_CORRECT} is defined (even if it is
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
287 defined with a null value). Please make your program recognize this
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
288 variable if appropriate.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
289
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
290 When a feature is used only by users (not by programs or command
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
291 files), and it is done poorly in Unix, feel free to replace it
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
292 completely with something totally different and better. (For example,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
293 vi is replaced with Emacs.) But it is nice to offer a compatible
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
294 feature as well. (There is a free vi clone, so we offer it.)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
295
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
296 Additional useful features not in Berkeley Unix are welcome.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
297 Additional programs with no counterpart in Unix may be useful,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
298 but our first priority is usually to duplicate what Unix already
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
299 has.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
300
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
301 @comment The makefile standards are in a separate file that is also
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
302 @comment included by make.texinfo. Done by roland@gnu.ai.mit.edu on 1/6/93.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
303 @include make-stds.texi
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
304
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
305 @node Configuration
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
306 @chapter How Configuration Should Work
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
307
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
308 Each GNU distribution should come with a shell script named
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
309 @code{configure}. This script is given arguments which describe the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
310 kind of machine and system you want to compile the program for.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
311
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
312 The @code{configure} script must record the configuration options so
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
313 that they affect compilation.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
314
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
315 One way to do this is to make a link from a standard name such as
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
316 @file{config.h} to the proper configuration file for the chosen system.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
317 If you use this technique, the distribution should @emph{not} contain a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
318 file named @file{config.h}. This is so that people won't be able to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
319 build the program without configuring it first.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
320
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
321 Another thing that @code{configure} can do is to edit the Makefile. If
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
322 you do this, the distribution should @emph{not} contain a file named
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
323 @file{Makefile}. Instead, include a file @file{Makefile.in} which
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
324 contains the input used for editing. Once again, this is so that people
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
325 won't be able to build the program without configuring it first.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
326
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
327 If @code{configure} does write the @file{Makefile}, then @file{Makefile}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
328 should have a target named @file{Makefile} which causes @code{configure}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
329 to be rerun, setting up the same configuration that was set up last
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
330 time. The files that @code{configure} reads should be listed as
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
331 dependencies of @file{Makefile}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
332
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
333 All the files which are output from the @code{configure} script should
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
334 have comments at the beginning explaining that they were generated
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
335 automatically using @code{configure}. This is so that users won't think
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
336 of trying to edit them by hand.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
337
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
338 The @code{configure} script should write a file named @file{config.status}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
339 which describes which configuration options were specified when the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
340 program was last configured. This file should be a shell script which,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
341 if run, will recreate the same configuration.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
342
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
343 The @code{configure} script should accept an option of the form
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
344 @samp{--srcdir=@var{dirname}} to specify the directory where sources are found
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
345 (if it is not the current directory). This makes it possible to build
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
346 the program in a separate directory, so that the actual source directory
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
347 is not modified.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
348
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
349 If the user does not specify @samp{--srcdir}, then @code{configure} should
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
350 check both @file{.} and @file{..} to see if it can find the sources. If
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
351 it finds the sources in one of these places, it should use them from
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
352 there. Otherwise, it should report that it cannot find the sources, and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
353 should exit with nonzero status.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
354
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
355 Usually the easy way to support @samp{--srcdir} is by editing a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
356 definition of @code{VPATH} into the Makefile. Some rules may need to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
357 refer explicitly to the specified source directory. To make this
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
358 possible, @code{configure} can add to the Makefile a variable named
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
359 @code{srcdir} whose value is precisely the specified directory.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
360
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
361 The @code{configure} script should also take an argument which specifies the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
362 type of system to build the program for. This argument should look like
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
363 this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
364
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
365 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
366 @var{cpu}-@var{company}-@var{system}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
367 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
368
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
369 For example, a Sun 3 might be @samp{m68k-sun-sunos4.1}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
370
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
371 The @code{configure} script needs to be able to decode all plausible
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
372 alternatives for how to describe a machine. Thus, @samp{sun3-sunos4.1}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
373 would be a valid alias. For many programs, @samp{vax-dec-ultrix} would
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
374 be an alias for @samp{vax-dec-bsd}, simply because the differences
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
375 between Ultrix and @sc{BSD} are rarely noticeable, but a few programs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
376 might need to distinguish them.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
377 @c Real 4.4BSD now runs on some Suns.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
378
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
379 There is a shell script called @file{config.sub} that you can use
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
380 as a subroutine to validate system types and canonicalize aliases.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
381
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
382 Other options are permitted to specify in more detail the software
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
383 or hardware present on the machine, and include or exclude optional
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
384 parts of the package:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
385
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
386 @table @samp
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
387 @item --enable-@var{feature}@r{[}=@var{parameter}@r{]}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
388 Configure the package to build and install an optional user-level
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
389 facility called @var{feature}. This allows users to choose which
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
390 optional features to include. Giving an optional @var{parameter} of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
391 @samp{no} should omit @var{feature}, if it is built by default.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
392
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
393 No @samp{--enable} option should @strong{ever} cause one feature to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
394 replace another. No @samp{--enable} option should ever substitute one
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
395 useful behavior for another useful behavior. The only proper use for
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
396 @samp{--enable} is for questions of whether to build part of the program
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
397 or exclude it.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
398
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
399 @item --with-@var{package}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
400 @c @r{[}=@var{parameter}@r{]}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
401 The package @var{package} will be installed, so configure this package
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
402 to work with @var{package}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
403
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
404 @c Giving an optional @var{parameter} of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
405 @c @samp{no} should omit @var{package}, if it is used by default.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
406
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
407 Possible values of @var{package} include @samp{x}, @samp{x-toolkit},
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
408 @samp{gnu-as} (or @samp{gas}), @samp{gnu-ld}, @samp{gnu-libc}, and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
409 @samp{gdb}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
410
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
411 Do not use a @samp{--with} option to specify the file name to use to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
412 find certain files. That is outside the scope of what @samp{--with}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
413 options are for.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
414
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
415 @item --nfp
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
416 The target machine has no floating point processor.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
417
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
418 @item --gas
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
419 The target machine assembler is GAS, the GNU assembler.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
420 This is obsolete; users should use @samp{--with-gnu-as} instead.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
421
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
422 @item --x
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
423 The target machine has the X Window System installed.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
424 This is obsolete; users should use @samp{--with-x} instead.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
425 @end table
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
426
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
427 All @code{configure} scripts should accept all of these ``detail''
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
428 options, whether or not they make any difference to the particular
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
429 package at hand. In particular, they should accept any option that
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
430 starts with @samp{--with-} or @samp{--enable-}. This is so users will
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
431 be able to configure an entire GNU source tree at once with a single set
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
432 of options.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
433
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
434 You will note that the categories @samp{--with-} and @samp{--enable-}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
435 are narrow: they @strong{do not} provide a place for any sort of option
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
436 you might think of. That is deliberate. We want to limit the possible
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
437 configuration options in GNU software. We do not want GNU programs to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
438 have idiosyncratic configuration options.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
439
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
440 Packages that perform part of compilation may support cross-compilation.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
441 In such a case, the host and target machines for the program may be
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
442 different. The @code{configure} script should normally treat the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
443 specified type of system as both the host and the target, thus producing
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
444 a program which works for the same type of machine that it runs on.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
445
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
446 The way to build a cross-compiler, cross-assembler, or what have you, is
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
447 to specify the option @samp{--host=@var{hosttype}} when running
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
448 @code{configure}. This specifies the host system without changing the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
449 type of target system. The syntax for @var{hosttype} is the same as
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
450 described above.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
451
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
452 Bootstrapping a cross-compiler requires compiling it on a machine other
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
453 than the host it will run on. Compilation packages accept a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
454 configuration option @samp{--build=@var{hosttype}} for specifying the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
455 configuration on which you will compile them, in case that is different
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
456 from the host.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
457
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
458 Programs for which cross-operation is not meaningful need not accept the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
459 @samp{--host} option, because configuring an entire operating system for
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
460 cross-operation is not a meaningful thing.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
461
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
462 Some programs have ways of configuring themselves automatically. If
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
463 your program is set up to do this, your @code{configure} script can simply
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
464 ignore most of its arguments.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
465
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
466 @node Source Language
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
467 @chapter Using Languages Other Than C
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
468
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
469 Using a language other than C is like using a non-standard feature: it
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
470 will cause trouble for users. Even if GCC supports the other language,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
471 users may find it inconvenient to have to install the compiler for that
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
472 other language in order to build your program. So please write in C.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
473
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
474 There are three exceptions for this rule:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
475
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
476 @itemize @bullet
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
477 @item
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
478 It is okay to use a special language if the same program contains an
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
479 interpreter for that language.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
480
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
481 Thus, it is not a problem that GNU Emacs contains code written in Emacs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
482 Lisp, because it comes with a Lisp interpreter.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
483
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
484 @item
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
485 It is okay to use another language in a tool specifically intended for
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
486 use with that language.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
487
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
488 This is okay because the only people who want to build the tool will be
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
489 those who have installed the other language anyway.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
490
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
491 @item
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
492 If an application is not of extremely widespread interest, then perhaps
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
493 it's not important if the application is inconvenient to install.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
494 @end itemize
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
495
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
496 @node Formatting
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
497 @chapter Formatting Your Source Code
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
498
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
499 It is important to put the open-brace that starts the body of a C
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
500 function in column zero, and avoid putting any other open-brace or
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
501 open-parenthesis or open-bracket in column zero. Several tools look
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
502 for open-braces in column zero to find the beginnings of C functions.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
503 These tools will not work on code not formatted that way.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
504
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
505 It is also important for function definitions to start the name of the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
506 function in column zero. This helps people to search for function
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
507 definitions, and may also help certain tools recognize them. Thus,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
508 the proper format is this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
509
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
510 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
511 static char *
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
512 concat (s1, s2) /* Name starts in column zero here */
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
513 char *s1, *s2;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
514 @{ /* Open brace in column zero here */
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
515 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
516 @}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
517 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
518
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
519 @noindent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
520 or, if you want to use @sc{ANSI} C, format the definition like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
521
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
522 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
523 static char *
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
524 concat (char *s1, char *s2)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
525 @{
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
526 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
527 @}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
528 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
529
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
530 In @sc{ANSI} C, if the arguments don't fit nicely on one line,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
531 split it like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
532
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
533 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
534 int
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
535 lots_of_args (int an_integer, long a_long, short a_short,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
536 double a_double, float a_float)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
537 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
538 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
539
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
540 For the body of the function, we prefer code formatted like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
541
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
542 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
543 if (x < foo (y, z))
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
544 haha = bar[4] + 5;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
545 else
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
546 @{
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
547 while (z)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
548 @{
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
549 haha += foo (z, z);
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
550 z--;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
551 @}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
552 return ++x + bar ();
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
553 @}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
554 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
555
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
556 We find it easier to read a program when it has spaces before the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
557 open-parentheses and after the commas. Especially after the commas.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
558
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
559 When you split an expression into multiple lines, split it
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
560 before an operator, not after one. Here is the right way:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
561
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
562 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
563 if (foo_this_is_long && bar > win (x, y, z)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
564 && remaining_condition)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
565 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
566
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
567 Try to avoid having two operators of different precedence at the same
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
568 level of indentation. For example, don't write this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
569
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
570 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
571 mode = (inmode[j] == VOIDmode
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
572 || GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j])
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
573 ? outmode[j] : inmode[j]);
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
574 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
575
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
576 Instead, use extra parentheses so that the indentation shows the nesting:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
577
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
578 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
579 mode = ((inmode[j] == VOIDmode
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
580 || (GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j])))
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
581 ? outmode[j] : inmode[j]);
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
582 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
583
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
584 Insert extra parentheses so that Emacs will indent the code properly.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
585 For example, the following indentation looks nice if you do it by hand,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
586 but Emacs would mess it up:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
587
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
588 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
589 v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
590 + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
591 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
592
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
593 But adding a set of parentheses solves the problem:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
594
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
595 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
596 v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
597 + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000);
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
598 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
599
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
600 Format do-while statements like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
601
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
602 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
603 do
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
604 @{
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
605 a = foo (a);
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
606 @}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
607 while (a > 0);
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
608 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
609
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
610 Please use formfeed characters (control-L) to divide the program into
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
611 pages at logical places (but not within a function). It does not matter
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
612 just how long the pages are, since they do not have to fit on a printed
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
613 page. The formfeeds should appear alone on lines by themselves.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
614
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
615
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
616 @node Comments
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
617 @chapter Commenting Your Work
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
618
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
619 Every program should start with a comment saying briefly what it is for.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
620 Example: @samp{fmt - filter for simple filling of text}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
621
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
622 Please put a comment on each function saying what the function does,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
623 what sorts of arguments it gets, and what the possible values of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
624 arguments mean and are used for. It is not necessary to duplicate in
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
625 words the meaning of the C argument declarations, if a C type is being
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
626 used in its customary fashion. If there is anything nonstandard about
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
627 its use (such as an argument of type @code{char *} which is really the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
628 address of the second character of a string, not the first), or any
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
629 possible values that would not work the way one would expect (such as,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
630 that strings containing newlines are not guaranteed to work), be sure
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
631 to say so.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
632
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
633 Also explain the significance of the return value, if there is one.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
634
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
635 Please put two spaces after the end of a sentence in your comments, so
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
636 that the Emacs sentence commands will work. Also, please write
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
637 complete sentences and capitalize the first word. If a lower-case
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
638 identifer comes at the beginning of a sentence, don't capitalize it!
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
639 Changing the spelling makes it a different identifier. If you don't
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
640 like starting a sentence with a lower case letter, write the sentence
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
641 differently (e.g., ``The identifier lower-case is @dots{}'').
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
642
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
643 The comment on a function is much clearer if you use the argument
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
644 names to speak about the argument values. The variable name itself
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
645 should be lower case, but write it in upper case when you are speaking
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
646 about the value rather than the variable itself. Thus, ``the inode
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
647 number NODE_NUM'' rather than ``an inode''.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
648
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
649 There is usually no purpose in restating the name of the function in
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
650 the comment before it, because the reader can see that for himself.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
651 There might be an exception when the comment is so long that the function
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
652 itself would be off the bottom of the screen.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
653
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
654 There should be a comment on each static variable as well, like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
655
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
656 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
657 /* Nonzero means truncate lines in the display;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
658 zero means continue them. */
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
659 int truncate_lines;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
660 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
661
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
662 Every @samp{#endif} should have a comment, except in the case of short
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
663 conditionals (just a few lines) that are not nested. The comment should
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
664 state the condition of the conditional that is ending, @emph{including
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
665 its sense}. @samp{#else} should have a comment describing the condition
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
666 @emph{and sense} of the code that follows. For example:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
667
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
668 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
669 #ifdef foo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
670 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
671 #else /* not foo */
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
672 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
673 #endif /* not foo */
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
674 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
675
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
676 @noindent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
677 but, by contrast, write the comments this way for a @samp{#ifndef}:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
678
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
679 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
680 #ifndef foo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
681 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
682 #else /* foo */
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
683 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
684 #endif /* foo */
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
685 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
686
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
687
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
688 @node Syntactic Conventions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
689 @chapter Clean Use of C Constructs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
690
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
691 Please explicitly declare all arguments to functions.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
692 Don't omit them just because they are @code{int}s.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
693
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
694 Declarations of external functions and functions to appear later in the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
695 source file should all go in one place near the beginning of the file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
696 (somewhere before the first function definition in the file), or else
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
697 should go in a header file. Don't put @code{extern} declarations inside
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
698 functions.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
699
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
700 It used to be common practice to use the same local variables (with
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
701 names like @code{tem}) over and over for different values within one
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
702 function. Instead of doing this, it is better declare a separate local
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
703 variable for each distinct purpose, and give it a name which is
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
704 meaningful. This not only makes programs easier to understand, it also
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
705 facilitates optimization by good compilers. You can also move the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
706 declaration of each local variable into the smallest scope that includes
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
707 all its uses. This makes the program even cleaner.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
708
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
709 Don't use local variables or parameters that shadow global identifiers.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
710
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
711 Don't declare multiple variables in one declaration that spans lines.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
712 Start a new declaration on each line, instead. For example, instead
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
713 of this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
714
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
715 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
716 int foo,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
717 bar;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
718 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
719
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
720 @noindent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
721 write either this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
722
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
723 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
724 int foo, bar;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
725 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
726
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
727 @noindent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
728 or this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
729
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
730 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
731 int foo;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
732 int bar;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
733 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
734
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
735 @noindent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
736 (If they are global variables, each should have a comment preceding it
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
737 anyway.)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
738
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
739 When you have an @code{if}-@code{else} statement nested in another
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
740 @code{if} statement, always put braces around the @code{if}-@code{else}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
741 Thus, never write like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
742
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
743 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
744 if (foo)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
745 if (bar)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
746 win ();
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
747 else
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
748 lose ();
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
749 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
750
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
751 @noindent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
752 always like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
753
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
754 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
755 if (foo)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
756 @{
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
757 if (bar)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
758 win ();
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
759 else
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
760 lose ();
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
761 @}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
762 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
763
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
764 If you have an @code{if} statement nested inside of an @code{else}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
765 statement, either write @code{else if} on one line, like this,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
766
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
767 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
768 if (foo)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
769 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
770 else if (bar)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
771 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
772 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
773
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
774 @noindent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
775 with its @code{then}-part indented like the preceding @code{then}-part,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
776 or write the nested @code{if} within braces like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
777
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
778 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
779 if (foo)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
780 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
781 else
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
782 @{
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
783 if (bar)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
784 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
785 @}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
786 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
787
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
788 Don't declare both a structure tag and variables or typedefs in the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
789 same declaration. Instead, declare the structure tag separately
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
790 and then use it to declare the variables or typedefs.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
791
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
792 Try to avoid assignments inside @code{if}-conditions. For example,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
793 don't write this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
794
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
795 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
796 if ((foo = (char *) malloc (sizeof *foo)) == 0)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
797 fatal ("virtual memory exhausted");
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
798 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
799
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
800 @noindent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
801 instead, write this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
802
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
803 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
804 foo = (char *) malloc (sizeof *foo);
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
805 if (foo == 0)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
806 fatal ("virtual memory exhausted");
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
807 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
808
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
809 Don't make the program ugly to placate @code{lint}. Please don't insert any
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
810 casts to @code{void}. Zero without a cast is perfectly fine as a null
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
811 pointer constant.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
812
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
813 @node Names
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
814 @chapter Naming Variables and Functions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
815
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
816 Please use underscores to separate words in a name, so that the Emacs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
817 word commands can be useful within them. Stick to lower case; reserve
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
818 upper case for macros and @code{enum} constants, and for name-prefixes
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
819 that follow a uniform convention.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
820
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
821 For example, you should use names like @code{ignore_space_change_flag};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
822 don't use names like @code{iCantReadThis}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
823
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
824 Variables that indicate whether command-line options have been
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
825 specified should be named after the meaning of the option, not after
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
826 the option-letter. A comment should state both the exact meaning of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
827 the option and its letter. For example,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
828
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
829 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
830 /* Ignore changes in horizontal whitespace (-b). */
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
831 int ignore_space_change_flag;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
832 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
833
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
834 When you want to define names with constant integer values, use
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
835 @code{enum} rather than @samp{#define}. GDB knows about enumeration
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
836 constants.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
837
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
838 Use file names of 14 characters or less, to avoid creating gratuitous
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
839 problems on System V. You can use the program @code{doschk} to test for
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
840 this. @code{doschk} also tests for potential name conflicts if the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
841 files were loaded onto an MS-DOS file system---something you may or may
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
842 not care about.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
843
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
844
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
845 @node Using Extensions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
846 @chapter Using Non-standard Features
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
847
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
848 Many GNU facilities that already exist support a number of convenient
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
849 extensions over the comparable Unix facilities. Whether to use these
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
850 extensions in implementing your program is a difficult question.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
851
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
852 On the one hand, using the extensions can make a cleaner program.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
853 On the other hand, people will not be able to build the program
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
854 unless the other GNU tools are available. This might cause the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
855 program to work on fewer kinds of machines.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
856
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
857 With some extensions, it might be easy to provide both alternatives.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
858 For example, you can define functions with a ``keyword'' @code{INLINE}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
859 and define that as a macro to expand into either @code{inline} or
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
860 nothing, depending on the compiler.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
861
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
862 In general, perhaps it is best not to use the extensions if you can
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
863 straightforwardly do without them, but to use the extensions if they
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
864 are a big improvement.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
865
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
866 An exception to this rule are the large, established programs (such as
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
867 Emacs) which run on a great variety of systems. Such programs would
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
868 be broken by use of GNU extensions.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
869
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
870 Another exception is for programs that are used as part of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
871 compilation: anything that must be compiled with other compilers in
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
872 order to bootstrap the GNU compilation facilities. If these require
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
873 the GNU compiler, then no one can compile them without having them
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
874 installed already. That would be no good.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
875
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
876 Since most computer systems do not yet implement @sc{ANSI} C, using the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
877 @sc{ANSI} C features is effectively using a GNU extension, so the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
878 same considerations apply. (Except for @sc{ANSI} features that we
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
879 discourage, such as trigraphs---don't ever use them.)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
880
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
881
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
882 @node System Functions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
883 @chapter Calling System Functions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
884
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
885 C implementations differ substantially. ANSI C reduces but does not
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
886 eliminate the incompatibilities; meanwhile, many users wish to compile
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
887 GNU software with pre-ANSI compilers. This chapter gives
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
888 recommendations for how to use the more or less standard C library
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
889 functions to avoid unnecessary loss of portability.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
890
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
891 @itemize @bullet
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
892 @item
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
893 Don't use the value of @code{sprintf}. It returns the number of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
894 characters written on some systems, but not on all systems.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
895
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
896 @item
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
897 Don't declare system functions explicitly.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
898
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
899 Almost any declaration for a system function is wrong on some system.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
900 To minimize conflicts, leave it to the system header files to declare
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
901 system functions. If the headers don't declare a function, let it
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
902 remain undeclared.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
903
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
904 While it may seem unclean to use a function without declaring it, in
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
905 practice this works fine for most system library functions on the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
906 systems where this really happens. The problem is only theoretical. By
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
907 contrast, actual declarations have frequently caused actual conflicts.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
908
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
909 @item
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
910 If you must declare a system function, don't specify the argument types.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
911 Use an old-style declaration, not an ANSI prototype. The more you
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
912 specify about the function, the more likely a conflict.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
913
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
914 @item
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
915 In particular, don't unconditionally declare @code{malloc} or
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
916 @code{realloc}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
917
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
918 Most GNU programs use those functions just once, in functions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
919 conventionally named @code{xmalloc} and @code{xrealloc}. These
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
920 functions call @code{malloc} and @code{realloc}, respectively, and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
921 check the results.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
922
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
923 Because @code{xmalloc} and @code{xrealloc} are defined in your program,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
924 you can declare them in other files without any risk of type conflict.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
925
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
926 On most systems, @code{int} is the same length as a pointer; thus, the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
927 calls to @code{malloc} and @code{realloc} work fine. For the few
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
928 exceptional systems (mostly 64-bit machines), you can use
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
929 @strong{conditionalized} declarations of @code{malloc} and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
930 @code{realloc}---or put these declarations in configuration files
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
931 specific to those systems.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
932
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
933 @item
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
934 The string functions require special treatment. Some Unix systems have
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
935 a header file @file{string.h}; other have @file{strings.h}. Neither
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
936 file name is portable. There are two things you can do: use Autoconf to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
937 figure out which file to include, or don't include either file.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
938
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
939 @item
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
940 If you don't include either strings file, you can't get declarations for
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
941 the string functions from the header file in the usual way.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
942
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
943 That causes less of a problem than you might think. The newer ANSI
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
944 string functions are off-limits anyway because many systems still don't
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
945 support them. The string functions you can use are these:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
946
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
947 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
948 strcpy strncpy strcat strncat
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
949 strlen strcmp strncmp
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
950 strchr strrchr
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
951 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
952
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
953 The copy and concatenate functions work fine without a declaration as
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
954 long as you don't use their values. Using their values without a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
955 declaration fails on systems where the width of a pointer differs from
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
956 the width of @code{int}, and perhaps in other cases. It is trivial to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
957 avoid using their values, so do that.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
958
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
959 The compare functions and @code{strlen} work fine without a declaration
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
960 on most systems, possibly all the ones that GNU software runs on.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
961 You may find it necessary to declare them @strong{conditionally} on a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
962 few systems.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
963
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
964 The search functions must be declared to return @code{char *}. Luckily,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
965 there is no variation in the data type they return. But there is
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
966 variation in their names. Some systems give these functions the names
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
967 @code{index} and @code{rindex}; other systems use the names
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
968 @code{strchr} and @code{strrchr}. Some systems support both pairs of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
969 names, but neither pair works on all systems.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
970
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
971 You should pick a single pair of names and use it throughout your
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
972 program. (Nowadays, it is better to choose @code{strchr} and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
973 @code{strrchr}.) Declare both of those names as functions returning
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
974 @code{char *}. On systems which don't support those names, define them
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
975 as macros in terms of the other pair. For example, here is what to put
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
976 at the beginning of your file (or in a header) if you want to use the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
977 names @code{strchr} and @code{strrchr} throughout:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
978
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
979 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
980 #ifndef HAVE_STRCHR
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
981 #define strchr index
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
982 #endif
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
983 #ifndef HAVE_STRRCHR
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
984 #define strrchr rindex
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
985 #endif
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
986
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
987 char *strchr ();
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
988 char *strrchr ();
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
989 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
990 @end itemize
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
991
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
992 Here we assume that @code{HAVE_STRCHR} and @code{HAVE_STRRCHR} are
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
993 macros defined in systems where the corresponding functions exist.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
994 One way to get them properly defined is to use Autoconf.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
995
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
996 @node Semantics
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
997 @chapter Program Behavior for All Programs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
998
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
999 Avoid arbitrary limits on the length or number of @emph{any} data
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1000 structure, including filenames, lines, files, and symbols, by allocating
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1001 all data structures dynamically. In most Unix utilities, ``long lines
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1002 are silently truncated''. This is not acceptable in a GNU utility.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1003
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1004 Utilities reading files should not drop NUL characters, or any other
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1005 nonprinting characters @emph{including those with codes above 0177}. The
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1006 only sensible exceptions would be utilities specifically intended for
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1007 interface to certain types of printers that can't handle those characters.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1008
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1009 Check every system call for an error return, unless you know you wish to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1010 ignore errors. Include the system error text (from @code{perror} or
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1011 equivalent) in @emph{every} error message resulting from a failing
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1012 system call, as well as the name of the file if any and the name of the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1013 utility. Just ``cannot open foo.c'' or ``stat failed'' is not
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1014 sufficient.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1015
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1016 Check every call to @code{malloc} or @code{realloc} to see if it
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1017 returned zero. Check @code{realloc} even if you are making the block
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1018 smaller; in a system that rounds block sizes to a power of 2,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1019 @code{realloc} may get a different block if you ask for less space.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1020
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1021 In Unix, @code{realloc} can destroy the storage block if it returns
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1022 zero. GNU @code{realloc} does not have this bug: if it fails, the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1023 original block is unchanged. Feel free to assume the bug is fixed. If
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1024 you wish to run your program on Unix, and wish to avoid lossage in this
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1025 case, you can use the GNU @code{malloc}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1026
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1027 You must expect @code{free} to alter the contents of the block that was
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1028 freed. Anything you want to fetch from the block, you must fetch before
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1029 calling @code{free}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1030
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1031 If @code{malloc} fails in a noninteractive program, make that a fatal
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1032 error. In an interactive program (one that reads commands from the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1033 user), it is better to abort the command and return to the command
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1034 reader loop. This allows the user to kill other processes to free up
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1035 virtual memory, and then try the command again.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1036
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1037 Use @code{getopt_long} to decode arguments, unless the argument syntax
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1038 makes this unreasonable.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1039
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1040 When static storage is to be written in during program execution, use
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1041 explicit C code to initialize it. Reserve C initialized declarations
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1042 for data that will not be changed.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1043
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1044 Try to avoid low-level interfaces to obscure Unix data structures (such
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1045 as file directories, utmp, or the layout of kernel memory), since these
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1046 are less likely to work compatibly. If you need to find all the files
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1047 in a directory, use @code{readdir} or some other high-level interface.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1048 These will be supported compatibly by GNU.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1049
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1050 By default, the GNU system will provide the signal handling functions of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1051 @sc{BSD} and of @sc{POSIX}. So GNU software should be written to use
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1052 these.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1053
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1054 In error checks that detect ``impossible'' conditions, just abort.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1055 There is usually no point in printing any message. These checks
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1056 indicate the existence of bugs. Whoever wants to fix the bugs will have
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1057 to read the source code and run a debugger. So explain the problem with
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1058 comments in the source. The relevant data will be in variables, which
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1059 are easy to examine with the debugger, so there is no point moving them
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1060 elsewhere.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1061
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1062
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1063 @node Errors
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1064 @chapter Formatting Error Messages
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1065
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1066 Error messages from compilers should look like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1067
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1068 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1069 @var{source-file-name}:@var{lineno}: @var{message}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1070 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1071
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1072 Error messages from other noninteractive programs should look like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1073
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1074 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1075 @var{program}:@var{source-file-name}:@var{lineno}: @var{message}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1076 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1077
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1078 @noindent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1079 when there is an appropriate source file, or like this:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1080
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1081 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1082 @var{program}: @var{message}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1083 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1084
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1085 @noindent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1086 when there is no relevant source file.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1087
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1088 In an interactive program (one that is reading commands from a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1089 terminal), it is better not to include the program name in an error
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1090 message. The place to indicate which program is running is in the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1091 prompt or with the screen layout. (When the same program runs with
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1092 input from a source other than a terminal, it is not interactive and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1093 would do best to print error messages using the noninteractive style.)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1094
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1095 The string @var{message} should not begin with a capital letter when
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1096 it follows a program name and/or filename. Also, it should not end
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1097 with a period.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1098
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1099 Error messages from interactive programs, and other messages such as
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1100 usage messages, should start with a capital letter. But they should not
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1101 end with a period.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1102
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1103
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1104 @node Libraries
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1105 @chapter Library Behavior
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1106
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1107 Try to make library functions reentrant. If they need to do dynamic
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1108 storage allocation, at least try to avoid any nonreentrancy aside from
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1109 that of @code{malloc} itself.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1110
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1111 Here are certain name conventions for libraries, to avoid name
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1112 conflicts.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1113
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1114 Choose a name prefix for the library, more than two characters long.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1115 All external function and variable names should start with this
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1116 prefix. In addition, there should only be one of these in any given
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1117 library member. This usually means putting each one in a separate
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1118 source file.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1119
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1120 An exception can be made when two external symbols are always used
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1121 together, so that no reasonable program could use one without the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1122 other; then they can both go in the same file.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1123
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1124 External symbols that are not documented entry points for the user
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1125 should have names beginning with @samp{_}. They should also contain
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1126 the chosen name prefix for the library, to prevent collisions with
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1127 other libraries. These can go in the same files with user entry
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1128 points if you like.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1129
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1130 Static functions and variables can be used as you like and need not
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1131 fit any naming convention.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1132
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1133
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1134 @node Portability
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1135 @chapter Portability As It Applies to GNU
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1136
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1137 Much of what is called ``portability'' in the Unix world refers to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1138 porting to different Unix versions. This is a secondary consideration
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1139 for GNU software, because its primary purpose is to run on top of one
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1140 and only one kernel, the GNU kernel, compiled with one and only one C
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1141 compiler, the GNU C compiler. The amount and kinds of variation among
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1142 GNU systems on different cpu's will be like the variation among Berkeley
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1143 4.3 systems on different cpu's.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1144
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1145 All users today run GNU software on non-GNU systems. So supporting a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1146 variety of non-GNU systems is desirable; simply not paramount.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1147 The easiest way to achieve portability to a reasonable range of systems
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1148 is to use Autoconf. It's unlikely that your program needs to know more
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1149 information about the host machine than Autoconf can provide, simply
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1150 because most of the programs that need such knowledge have already been
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1151 written.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1152
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1153 It is difficult to be sure exactly what facilities the GNU kernel
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1154 will provide, since it isn't finished yet. Therefore, assume you can
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1155 use anything in 4.3; just avoid using the format of semi-internal data
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1156 bases (e.g., directories) when there is a higher-level alternative
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1157 (@code{readdir}).
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1158
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1159 You can freely assume any reasonably standard facilities in the C
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1160 language, libraries or kernel, because we will find it necessary to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1161 support these facilities in the full GNU system, whether or not we
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1162 have already done so. The fact that there may exist kernels or C
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1163 compilers that lack these facilities is irrelevant as long as the GNU
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1164 kernel and C compiler support them.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1165
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1166 It remains necessary to worry about differences among cpu types, such
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1167 as the difference in byte ordering and alignment restrictions. It's
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1168 unlikely that 16-bit machines will ever be supported by GNU, so there
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1169 is no point in spending any time to consider the possibility that an
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1170 int will be less than 32 bits.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1171
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1172 You can assume that all pointers have the same format, regardless
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1173 of the type they point to, and that this is really an integer.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1174 There are some weird machines where this isn't true, but they aren't
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1175 important; don't waste time catering to them. Besides, eventually
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1176 we will put function prototypes into all GNU programs, and that will
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1177 probably make your program work even on weird machines.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1178
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1179 Since some important machines (including the 68000) are big-endian,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1180 it is important not to assume that the address of an @code{int} object
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1181 is also the address of its least-significant byte. Thus, don't
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1182 make the following mistake:
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1183
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1184 @example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1185 int c;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1186 @dots{}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1187 while ((c = getchar()) != EOF)
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1188 write(file_descriptor, &c, 1);
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1189 @end example
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1190
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1191 You can assume that it is reasonable to use a meg of memory. Don't
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1192 strain to reduce memory usage unless it can get to that level. If
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1193 your program creates complicated data structures, just make them in
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1194 core and give a fatal error if malloc returns zero.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1195
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1196 If a program works by lines and could be applied to arbitrary
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1197 user-supplied input files, it should keep only a line in memory, because
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1198 this is not very hard and users will want to be able to operate on input
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1199 files that are bigger than will fit in core all at once.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1200
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1201
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1202 @node User Interfaces
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1203 @chapter Standards for Command Line Interfaces
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1204
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1205 Please don't make the behavior of a utility depend on the name used
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1206 to invoke it. It is useful sometimes to make a link to a utility
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1207 with a different name, and that should not change what it does.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1208
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1209 Instead, use a run time option or a compilation switch or both
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1210 to select among the alternate behaviors.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1211
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1212 Likewise, please don't make the behavior of the program depend on the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1213 type of output device it is used with. Device independence is an
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1214 important principle of the system's design; do not compromise it
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1215 merely to save someone from typing an option now and then.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1216
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1217 If you think one behavior is most useful when the output is to a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1218 terminal, and another is most useful when the output is a file or a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1219 pipe, then it is usually best to make the default behavior the one that
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1220 is useful with output to a terminal, and have an option for the other
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1221 behavior.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1222
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1223 Compatibility requires certain programs to depend on the type of output
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1224 device. It would be disastrous if @code{ls} or @code{sh} did not do so
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1225 in the way all users expect. In some of these cases, we supplement the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1226 program with a preferred alternate version that does not depend on the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1227 output device type. For example, we provide a @code{dir} program much
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1228 like @code{ls} except that its default output format is always
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1229 multi-column format.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1230
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1231 It is a good idea to follow the @sc{POSIX} guidelines for the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1232 command-line options of a program. The easiest way to do this is to use
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1233 @code{getopt} to parse them. Note that the GNU version of @code{getopt}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1234 will normally permit options anywhere among the arguments unless the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1235 special argument @samp{--} is used. This is not what @sc{POSIX}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1236 specifies; it is a GNU extension.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1237
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1238 Please define long-named options that are equivalent to the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1239 single-letter Unix-style options. We hope to make GNU more user
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1240 friendly this way. This is easy to do with the GNU function
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1241 @code{getopt_long}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1242
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1243 One of the advantages of long-named options is that they can be
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1244 consistent from program to program. For example, users should be able
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1245 to expect the ``verbose'' option of any GNU program which has one, to be
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1246 spelled precisely @samp{--verbose}. To achieve this uniformity, look at
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1247 the table of common long-option names when you choose the option names
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1248 for your program. The table appears below.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1249
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1250 If you use names not already in the table, please send
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1251 @samp{gnu@@prep.ai.mit.edu} a list of them, with their meanings, so we
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1252 can update the table.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1253
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1254 It is usually a good idea for file names given as ordinary arguments
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1255 to be input files only; any output files would be specified using
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1256 options (preferably @samp{-o}). Even if you allow an output file name
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1257 as an ordinary argument for compatibility, try to provide a suitable
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1258 option as well. This will lead to more consistency among GNU
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1259 utilities, so that there are fewer idiosyncracies for users to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1260 remember.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1261
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1262 Programs should support an option @samp{--version} which prints the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1263 program's version number on standard output and exits successfully, and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1264 an option @samp{--help} which prints option usage information on
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1265 standard output and exits successfully. These options should inhibit
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1266 the normal function of the command; they should do nothing except print
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1267 the requested information.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1268
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1269 @c Please leave newlines between items in this table; it's much easier
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1270 @c to update when it isn't completely squashed together and unreadable.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1271 @c When there is more than one short option for a long option name, put
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1272 @c a semicolon between the lists of the programs that use them, not a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1273 @c period. --friedman
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1274
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1275 @table @samp
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1276
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1277 @item after-date
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1278 @samp{-N} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1279
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1280 @item all
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1281 @samp{-a} in @code{du}, @code{ls}, @code{nm}, @code{stty}, @code{uname},
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1282 and @code{unexpand}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1283
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1284 @item all-text
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1285 @samp{-a} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1286
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1287 @item almost-all
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1288 @samp{-A} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1289
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1290 @item append
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1291 @samp{-a} in @code{etags}, @code{tee}, @code{time};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1292 @samp{-r} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1293
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1294 @item archive
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1295 @samp{-a} in @code{cp}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1296
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1297 @item archive-name
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1298 @samp{-n} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1299
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1300 @item arglength
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1301 @samp{-l} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1302
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1303 @item ascii
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1304 @samp{-a} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1305
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1306 @item assume-new
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1307 @samp{-W} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1308
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1309 @item assume-old
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1310 @samp{-o} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1311
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1312 @item auto-check
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1313 @samp{-a} in @code{recode}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1314
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1315 @item auto-pager
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1316 @samp{-a} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1317
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1318 @item auto-reference
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1319 @samp{-A} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1320
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1321 @item avoid-wraps
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1322 @samp{-n} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1323
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1324 @item backward-search
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1325 @samp{-B} in @code{ctags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1326
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1327 @item basename
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1328 @samp{-f} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1329
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1330 @item batch
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1331 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1332
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1333 @item baud
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1334 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1335
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1336 @item before
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1337 @samp{-b} in @code{tac}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1338
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1339 @item binary
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1340 @samp{-b} in @code{cpio} and @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1341
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1342 @item bits-per-code
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1343 @samp{-b} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1344
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1345 @item block-size
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1346 Used in @code{cpio} and @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1347
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1348 @item blocks
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1349 @samp{-b} in @code{head} and @code{tail}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1350
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1351 @item break-file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1352 @samp{-b} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1353
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1354 @item brief
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1355 Used in various programs to make output shorter.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1356
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1357 @item bytes
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1358 @samp{-c} in @code{head}, @code{split}, and @code{tail}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1359
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1360 @item c@t{++}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1361 @samp{-C} in @code{etags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1362
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1363 @item catenate
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1364 @samp{-A} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1365
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1366 @item cd
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1367 Used in various programs to specify the directory to use.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1368
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1369 @item changes
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1370 @samp{-c} in @code{chgrp} and @code{chown}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1371
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1372 @item classify
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1373 @samp{-F} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1374
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1375 @item colons
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1376 @samp{-c} in @code{recode}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1377
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1378 @item command
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1379 @samp{-c} in @code{su};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1380 @samp{-x} in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1381
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1382 @item compare
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1383 @samp{-d} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1384
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1385 @item compress
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1386 @samp{-Z} in @code{tar} and @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1387
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1388 @item concatenate
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1389 @samp{-A} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1390
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1391 @item confirmation
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1392 @samp{-w} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1393
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1394 @item context
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1395 Used in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1396
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1397 @item copyright
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1398 @samp{-C} in @code{ptx}, @code{recode}, and @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1399
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1400 @item core
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1401 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1402
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1403 @item count
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1404 @samp{-q} in @code{who}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1405
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1406 @item count-links
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1407 @samp{-l} in @code{du}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1408
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1409 @item create
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1410 Used in @code{tar} and @code{cpio}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1411
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1412 @item cut-mark
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1413 @samp{-c} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1414
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1415 @item cxref
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1416 @samp{-x} in @code{ctags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1417
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1418 @item date
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1419 @samp{-d} in @code{touch}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1420
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1421 @item debug
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1422 @samp{-d} in Make and @code{m4};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1423 @samp{-t} in Bison.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1424
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1425 @item define
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1426 @samp{-D} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1427
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1428 @item defines
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1429 @samp{-d} in Bison and @code{ctags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1430
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1431 @item delete
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1432 @samp{-D} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1433
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1434 @item dereference
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1435 @samp{-L} in @code{chgrp}, @code{chown}, @code{cpio}, @code{du},
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1436 @code{ls}, and @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1437
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1438 @item dereference-args
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1439 @samp{-D} in @code{du}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1440
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1441 @item diacritics
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1442 @samp{-d} in @code{recode}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1443
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1444 @item dictionary-order
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1445 @samp{-d} in @code{look}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1446
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1447 @item diff
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1448 @samp{-d} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1449
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1450 @item digits
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1451 @samp{-n} in @code{csplit}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1452
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1453 @item directory
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1454 Specify the directory to use, in various programs. In @code{ls}, it
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1455 means to show directories themselves rather than their contents. In
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1456 @code{rm} and @code{ln}, it means to not treat links to directories
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1457 specially.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1458
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1459 @item discard-all
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1460 @samp{-x} in @code{strip}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1461
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1462 @item discard-locals
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1463 @samp{-X} in @code{strip}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1464
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1465 @item dry-run
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1466 @samp{-n} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1467
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1468 @item ed
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1469 @samp{-e} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1470
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1471 @item elide-empty-files
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1472 @samp{-z} in @code{csplit}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1473
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1474 @item end-delete
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1475 @samp{-x} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1476
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1477 @item end-insert
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1478 @samp{-z} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1479
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1480 @item entire-new-file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1481 @samp{-N} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1482
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1483 @item environment-overrides
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1484 @samp{-e} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1485
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1486 @item eof
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1487 @samp{-e} in @code{xargs}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1488
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1489 @item epoch
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1490 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1491
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1492 @item error-limit
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1493 Used in Makeinfo.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1494
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1495 @item error-output
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1496 @samp{-o} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1497
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1498 @item escape
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1499 @samp{-b} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1500
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1501 @item exclude-from
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1502 @samp{-X} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1503
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1504 @item exec
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1505 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1506
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1507 @item exit
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1508 @samp{-x} in @code{xargs}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1509
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1510 @item exit-0
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1511 @samp{-e} in @code{unshar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1512
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1513 @item expand-tabs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1514 @samp{-t} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1515
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1516 @item expression
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1517 @samp{-e} in @code{sed}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1518
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1519 @item extern-only
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1520 @samp{-g} in @code{nm}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1521
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1522 @item extract
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1523 @samp{-i} in @code{cpio};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1524 @samp{-x} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1525
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1526 @item faces
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1527 @samp{-f} in @code{finger}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1528
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1529 @item fast
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1530 @samp{-f} in @code{su}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1531
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1532 @item fatal-warnings
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1533 @samp{-E} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1534
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1535 @item file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1536 @samp{-f} in @code{info}, Make, @code{mt}, and @code{tar};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1537 @samp{-n} in @code{sed};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1538 @samp{-r} in @code{touch}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1539
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1540 @item file-prefix
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1541 @samp{-b} in Bison.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1542
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1543 @item file-type
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1544 @samp{-F} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1545
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1546 @item files-from
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1547 @samp{-T} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1548
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1549 @item fill-column
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1550 Used in Makeinfo.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1551
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1552 @item flag-truncation
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1553 @samp{-F} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1554
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1555 @item fixed-output-files
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1556 @samp{-y} in Bison.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1557
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1558 @item follow
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1559 @samp{-f} in @code{tail}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1560
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1561 @item footnote-style
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1562 Used in Makeinfo.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1563
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1564 @item force
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1565 @samp{-f} in @code{cp}, @code{ln}, @code{mv}, and @code{rm}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1566
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1567 @item force-prefix
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1568 @samp{-F} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1569
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1570 @item format
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1571 Used in @code{ls}, @code{time}, and @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1572
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1573 @item freeze-state
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1574 @samp{-F} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1575
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1576 @item fullname
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1577 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1578
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1579 @item gap-size
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1580 @samp{-g} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1581
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1582 @item get
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1583 @samp{-x} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1584
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1585 @item graphic
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1586 @samp{-i} in @code{ul}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1587
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1588 @item graphics
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1589 @samp{-g} in @code{recode}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1590
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1591 @item group
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1592 @samp{-g} in @code{install}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1593
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1594 @item gzip
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1595 @samp{-z} in @code{tar} and @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1596
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1597 @item hashsize
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1598 @samp{-H} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1599
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1600 @item header
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1601 @samp{-h} in @code{objdump} and @code{recode}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1602
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1603 @item heading
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1604 @samp{-H} in @code{who}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1605
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1606 @item help
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1607 Used to ask for brief usage information.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1608
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1609 @item here-delimiter
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1610 @samp{-d} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1611
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1612 @item hide-control-chars
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1613 @samp{-q} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1614
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1615 @item idle
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1616 @samp{-u} in @code{who}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1617
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1618 @item ifdef
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1619 @samp{-D} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1620
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1621 @item ignore
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1622 @samp{-I} in @code{ls};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1623 @samp{-x} in @code{recode}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1624
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1625 @item ignore-all-space
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1626 @samp{-w} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1627
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1628 @item ignore-backups
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1629 @samp{-B} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1630
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1631 @item ignore-blank-lines
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1632 @samp{-B} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1633
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1634 @item ignore-case
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1635 @samp{-f} in @code{look} and @code{ptx};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1636 @samp{-i} in @code{diff} and @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1637
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1638 @item ignore-errors
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1639 @samp{-i} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1640
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1641 @item ignore-file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1642 @samp{-i} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1643
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1644 @item ignore-indentation
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1645 @samp{-S} in @code{etags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1646
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1647 @item ignore-init-file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1648 @samp{-f} in Oleo.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1649
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1650 @item ignore-interrupts
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1651 @samp{-i} in @code{tee}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1652
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1653 @item ignore-matching-lines
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1654 @samp{-I} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1655
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1656 @item ignore-space-change
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1657 @samp{-b} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1658
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1659 @item ignore-zeros
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1660 @samp{-i} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1661
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1662 @item include
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1663 @samp{-i} in @code{etags};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1664 @samp{-I} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1665
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1666 @item include-dir
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1667 @samp{-I} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1668
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1669 @item incremental
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1670 @samp{-G} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1671
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1672 @item info
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1673 @samp{-i}, @samp{-l}, and @samp{-m} in Finger.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1674
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1675 @item initial
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1676 @samp{-i} in @code{expand}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1677
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1678 @item initial-tab
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1679 @samp{-T} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1680
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1681 @item inode
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1682 @samp{-i} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1683
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1684 @item interactive
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1685 @samp{-i} in @code{cp}, @code{ln}, @code{mv}, @code{rm};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1686 @samp{-e} in @code{m4};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1687 @samp{-p} in @code{xargs};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1688 @samp{-w} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1689
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1690 @item intermix-type
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1691 @samp{-p} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1692
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1693 @item jobs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1694 @samp{-j} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1695
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1696 @item just-print
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1697 @samp{-n} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1698
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1699 @item keep-going
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1700 @samp{-k} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1701
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1702 @item keep-files
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1703 @samp{-k} in @code{csplit}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1704
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1705 @item kilobytes
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1706 @samp{-k} in @code{du} and @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1707
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1708 @item language
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1709 @samp{-l} in @code{etags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1710
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1711 @item less-mode
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1712 @samp{-l} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1713
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1714 @item level-for-gzip
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1715 @samp{-g} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1716
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1717 @item line-bytes
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1718 @samp{-C} in @code{split}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1719
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1720 @item lines
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1721 Used in @code{split}, @code{head}, and @code{tail}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1722
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1723 @item link
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1724 @samp{-l} in @code{cpio}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1725
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1726 @item list
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1727 @samp{-t} in @code{cpio};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1728 @samp{-l} in @code{recode}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1729
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1730 @item list
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1731 @samp{-t} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1732
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1733 @item literal
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1734 @samp{-N} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1735
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1736 @item load-average
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1737 @samp{-l} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1738
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1739 @item login
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1740 Used in @code{su}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1741
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1742 @item machine
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1743 No listing of which programs already use this;
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1744 someone should check to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1745 see if any actually do and tell @code{gnu@@prep.ai.mit.edu}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1746
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1747 @item macro-name
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1748 @samp{-M} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1749
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1750 @item mail
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1751 @samp{-m} in @code{hello} and @code{uname}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1752
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1753 @item make-directories
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1754 @samp{-d} in @code{cpio}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1755
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1756 @item makefile
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1757 @samp{-f} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1758
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1759 @item mapped
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1760 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1761
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1762 @item max-args
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1763 @samp{-n} in @code{xargs}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1764
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1765 @item max-chars
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1766 @samp{-n} in @code{xargs}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1767
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1768 @item max-lines
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1769 @samp{-l} in @code{xargs}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1770
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1771 @item max-load
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1772 @samp{-l} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1773
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1774 @item max-procs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1775 @samp{-P} in @code{xargs}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1776
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1777 @item mesg
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1778 @samp{-T} in @code{who}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1779
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1780 @item message
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1781 @samp{-T} in @code{who}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1782
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1783 @item minimal
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1784 @samp{-d} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1785
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1786 @item mixed-uuencode
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1787 @samp{-M} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1788
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1789 @item mode
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1790 @samp{-m} in @code{install}, @code{mkdir}, and @code{mkfifo}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1791
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1792 @item modification-time
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1793 @samp{-m} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1794
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1795 @item multi-volume
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1796 @samp{-M} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1797
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1798 @item name-prefix
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1799 @samp{-a} in Bison.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1800
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1801 @item nesting-limit
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1802 @samp{-L} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1803
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1804 @item net-headers
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1805 @samp{-a} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1806
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1807 @item new-file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1808 @samp{-W} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1809
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1810 @item no-builtin-rules
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1811 @samp{-r} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1812
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1813 @item no-character-count
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1814 @samp{-w} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1815
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1816 @item no-check-existing
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1817 @samp{-x} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1818
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1819 @item no-common
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1820 @samp{-3} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1821
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1822 @item no-create
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1823 @samp{-c} in @code{touch}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1824
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1825 @item no-defines
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1826 @samp{-D} in @code{etags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1827
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1828 @item no-deleted
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1829 @samp{-1} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1830
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1831 @item no-dereference
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1832 @samp{-d} in @code{cp}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1833
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1834 @item no-inserted
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1835 @samp{-2} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1836
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1837 @item no-keep-going
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1838 @samp{-S} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1839
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1840 @item no-lines
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1841 @samp{-l} in Bison.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1842
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1843 @item no-piping
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1844 @samp{-P} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1845
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1846 @item no-prof
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1847 @samp{-e} in @code{gprof}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1848
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1849 @item no-regex
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1850 @samp{-R} in @code{etags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1851
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1852 @item no-sort
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1853 @samp{-p} in @code{nm}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1854
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1855 @item no-split
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1856 Used in Makeinfo.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1857
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1858 @item no-static
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1859 @samp{-a} in @code{gprof}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1860
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1861 @item no-time
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1862 @samp{-E} in @code{gprof}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1863
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1864 @item no-timestamp
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1865 @samp{-m} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1866
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1867 @item no-validate
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1868 Used in Makeinfo.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1869
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1870 @item no-warn
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1871 Used in various programs to inhibit warnings.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1872
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1873 @item node
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1874 @samp{-n} in @code{info}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1875
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1876 @item nodename
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1877 @samp{-n} in @code{uname}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1878
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1879 @item nonmatching
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1880 @samp{-f} in @code{cpio}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1881
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1882 @item nstuff
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1883 @samp{-n} in @code{objdump}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1884
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1885 @item null
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1886 @samp{-0} in @code{xargs}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1887
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1888 @item number
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1889 @samp{-n} in @code{cat}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1890
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1891 @item number-nonblank
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1892 @samp{-b} in @code{cat}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1893
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1894 @item numeric-sort
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1895 @samp{-n} in @code{nm}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1896
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1897 @item numeric-uid-gid
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1898 @samp{-n} in @code{cpio} and @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1899
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1900 @item nx
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1901 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1902
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1903 @item old-archive
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1904 @samp{-o} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1905
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1906 @item old-file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1907 @samp{-o} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1908
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1909 @item one-file-system
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1910 @samp{-l} in @code{tar}, @code{cp}, and @code{du}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1911
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1912 @item only-file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1913 @samp{-o} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1914
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1915 @item only-prof
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1916 @samp{-f} in @code{gprof}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1917
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1918 @item only-time
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1919 @samp{-F} in @code{gprof}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1920
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1921 @item output
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1922 In various programs, specify the output file name.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1923
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1924 @item output-prefix
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1925 @samp{-o} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1926
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1927 @item override
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1928 @samp{-o} in @code{rm}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1929
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1930 @item overwrite
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1931 @samp{-c} in @code{unshar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1932
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1933 @item owner
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1934 @samp{-o} in @code{install}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1935
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1936 @item paginate
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1937 @samp{-l} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1938
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1939 @item paragraph-indent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1940 Used in Makeinfo.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1941
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1942 @item parents
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1943 @samp{-p} in @code{mkdir} and @code{rmdir}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1944
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1945 @item pass-all
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1946 @samp{-p} in @code{ul}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1947
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1948 @item pass-through
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1949 @samp{-p} in @code{cpio}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1950
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1951 @item port
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1952 @samp{-P} in @code{finger}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1953
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1954 @item portability
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1955 @samp{-c} in @code{cpio} and @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1956
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1957 @item prefix-builtins
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1958 @samp{-P} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1959
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1960 @item prefix
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1961 @samp{-f} in @code{csplit}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1962
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1963 @item preserve
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1964 Used in @code{tar} and @code{cp}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1965
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1966 @item preserve-environment
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1967 @samp{-p} in @code{su}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1968
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1969 @item preserve-modification-time
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1970 @samp{-m} in @code{cpio}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1971
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1972 @item preserve-order
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1973 @samp{-s} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1974
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1975 @item preserve-permissions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1976 @samp{-p} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1977
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1978 @item print
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1979 @samp{-l} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1980
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1981 @item print-chars
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1982 @samp{-L} in @code{cmp}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1983
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1984 @item print-data-base
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1985 @samp{-p} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1986
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1987 @item print-directory
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1988 @samp{-w} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1989
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1990 @item print-file-name
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1991 @samp{-o} in @code{nm}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1992
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1993 @item print-symdefs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1994 @samp{-s} in @code{nm}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1995
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1996 @item printer
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1997 @samp{-p} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1998
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
1999 @item query-user
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2000 @samp{-X} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2001
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2002 @item question
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2003 @samp{-q} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2004
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2005 @item quiet
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2006 Used in many programs to inhibit the usual output. @strong{Note:} every
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2007 program accepting @samp{--quiet} should accept @samp{--silent} as a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2008 synonym.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2009
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2010 @item quiet-unshar
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2011 @samp{-Q} in @code{shar}
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2012
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2013 @item quote-name
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2014 @samp{-Q} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2015
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2016 @item rcs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2017 @samp{-n} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2018
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2019 @item read-full-blocks
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2020 @samp{-B} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2021
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2022 @item readnow
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2023 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2024
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2025 @item recon
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2026 @samp{-n} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2027
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2028 @item record-number
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2029 @samp{-R} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2030
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2031 @item recursive
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2032 Used in @code{chgrp}, @code{chown}, @code{cp}, @code{ls}, @code{diff},
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2033 and @code{rm}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2034
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2035 @item reference-limit
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2036 Used in Makeinfo.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2037
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2038 @item references
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2039 @samp{-r} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2040
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2041 @item regex
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2042 @samp{-r} in @code{tac} and @code{etags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2043
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2044 @item release
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2045 @samp{-r} in @code{uname}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2046
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2047 @item reload-state
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2048 @samp{-R} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2049
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2050 @item relocation
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2051 @samp{-r} in @code{objdump}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2052
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2053 @item rename
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2054 @samp{-r} in @code{cpio}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2055
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2056 @item replace
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2057 @samp{-i} in @code{xargs}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2058
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2059 @item report-identical-files
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2060 @samp{-s} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2061
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2062 @item reset-access-time
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2063 @samp{-a} in @code{cpio}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2064
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2065 @item reverse
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2066 @samp{-r} in @code{ls} and @code{nm}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2067
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2068 @item reversed-ed
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2069 @samp{-f} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2070
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2071 @item right-side-defs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2072 @samp{-R} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2073
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2074 @item same-order
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2075 @samp{-s} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2076
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2077 @item same-permissions
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2078 @samp{-p} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2079
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2080 @item save
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2081 @samp{-g} in @code{stty}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2082
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2083 @item se
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2084 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2085
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2086 @item sentence-regexp
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2087 @samp{-S} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2088
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2089 @item separate-dirs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2090 @samp{-S} in @code{du}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2091
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2092 @item separator
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2093 @samp{-s} in @code{tac}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2094
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2095 @item sequence
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2096 Used by @code{recode} to chose files or pipes for sequencing passes.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2097
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2098 @item shell
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2099 @samp{-s} in @code{su}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2100
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2101 @item show-all
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2102 @samp{-A} in @code{cat}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2103
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2104 @item show-c-function
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2105 @samp{-p} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2106
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2107 @item show-ends
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2108 @samp{-E} in @code{cat}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2109
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2110 @item show-function-line
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2111 @samp{-F} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2112
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2113 @item show-tabs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2114 @samp{-T} in @code{cat}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2115
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2116 @item silent
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2117 Used in many programs to inhibit the usual output.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2118 @strong{Note:} every program accepting
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2119 @samp{--silent} should accept @samp{--quiet} as a synonym.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2120
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2121 @item size
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2122 @samp{-s} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2123
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2124 @item sort
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2125 Used in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2126
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2127 @item sparse
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2128 @samp{-S} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2129
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2130 @item speed-large-files
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2131 @samp{-H} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2132
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2133 @item split-at
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2134 @samp{-E} in @code{unshar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2135
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2136 @item split-size-limit
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2137 @samp{-L} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2138
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2139 @item squeeze-blank
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2140 @samp{-s} in @code{cat}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2141
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2142 @item start-delete
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2143 @samp{-w} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2144
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2145 @item start-insert
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2146 @samp{-y} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2147
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2148 @item starting-file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2149 Used in @code{tar} and @code{diff} to specify which file within
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2150 a directory to start processing with.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2151
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2152 @item statistics
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2153 @samp{-s} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2154
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2155 @item stdin-file-list
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2156 @samp{-S} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2157
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2158 @item stop
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2159 @samp{-S} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2160
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2161 @item strict
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2162 @samp{-s} in @code{recode}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2163
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2164 @item strip
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2165 @samp{-s} in @code{install}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2166
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2167 @item strip-all
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2168 @samp{-s} in @code{strip}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2169
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2170 @item strip-debug
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2171 @samp{-S} in @code{strip}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2172
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2173 @item submitter
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2174 @samp{-s} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2175
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2176 @item suffix
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2177 @samp{-S} in @code{cp}, @code{ln}, @code{mv}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2178
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2179 @item suffix-format
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2180 @samp{-b} in @code{csplit}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2181
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2182 @item sum
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2183 @samp{-s} in @code{gprof}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2184
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2185 @item summarize
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2186 @samp{-s} in @code{du}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2187
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2188 @item symbolic
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2189 @samp{-s} in @code{ln}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2190
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2191 @item symbols
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2192 Used in GDB and @code{objdump}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2193
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2194 @item synclines
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2195 @samp{-s} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2196
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2197 @item sysname
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2198 @samp{-s} in @code{uname}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2199
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2200 @item tabs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2201 @samp{-t} in @code{expand} and @code{unexpand}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2202
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2203 @item tabsize
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2204 @samp{-T} in @code{ls}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2205
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2206 @item terminal
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2207 @samp{-T} in @code{tput} and @code{ul}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2208 @samp{-t} in @code{wdiff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2209
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2210 @item text
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2211 @samp{-a} in @code{diff}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2212
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2213 @item text-files
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2214 @samp{-T} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2215
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2216 @item time
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2217 Used in @code{ls} and @code{touch}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2218
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2219 @item to-stdout
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2220 @samp{-O} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2221
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2222 @item total
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2223 @samp{-c} in @code{du}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2224
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2225 @item touch
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2226 @samp{-t} in Make, @code{ranlib}, and @code{recode}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2227
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2228 @item trace
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2229 @samp{-t} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2230
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2231 @item traditional
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2232 @samp{-t} in @code{hello};
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2233 @samp{-G} in @code{m4} and @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2234
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2235 @item tty
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2236 Used in GDB.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2237
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2238 @item typedefs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2239 @samp{-t} in @code{ctags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2240
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2241 @item typedefs-and-c++
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2242 @samp{-T} in @code{ctags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2243
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2244 @item typeset-mode
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2245 @samp{-t} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2246
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2247 @item uncompress
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2248 @samp{-z} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2249
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2250 @item unconditional
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2251 @samp{-u} in @code{cpio}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2252
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2253 @item undefine
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2254 @samp{-U} in @code{m4}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2255
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2256 @item undefined-only
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2257 @samp{-u} in @code{nm}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2258
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2259 @item update
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2260 @samp{-u} in @code{cp}, @code{ctags}, @code{mv}, @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2261
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2262 @item uuencode
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2263 @samp{-B} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2264
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2265 @item vanilla-operation
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2266 @samp{-V} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2267
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2268 @item verbose
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2269 Print more information about progress. Many programs support this.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2270
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2271 @item verify
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2272 @samp{-W} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2273
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2274 @item version
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2275 Print the version number.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2276
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2277 @item version-control
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2278 @samp{-V} in @code{cp}, @code{ln}, @code{mv}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2279
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2280 @item vgrind
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2281 @samp{-v} in @code{ctags}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2282
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2283 @item volume
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2284 @samp{-V} in @code{tar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2285
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2286 @item what-if
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2287 @samp{-W} in Make.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2288
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2289 @item whole-size-limit
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2290 @samp{-l} in @code{shar}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2291
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2292 @item width
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2293 @samp{-w} in @code{ls} and @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2294
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2295 @item word-regexp
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2296 @samp{-W} in @code{ptx}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2297
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2298 @item writable
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2299 @samp{-T} in @code{who}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2300
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2301 @item zeros
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2302 @samp{-z} in @code{gprof}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2303
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2304 @end table
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2305
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2306 @node Documentation
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2307 @chapter Documenting Programs
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2308
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2309 Please use Texinfo for documenting GNU programs. See the Texinfo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2310 manual, either the hardcopy or the version in the GNU Emacs Info
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2311 subsystem (@kbd{C-h i}). See existing GNU Texinfo files (e.g., those
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2312 under the @file{man/} directory in the GNU Emacs distribution) for
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2313 examples.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2314
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2315 The title page of the manual should state the version of the program
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2316 which the manual applies to. The Top node of the manual should also
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2317 contain this information. If the manual is changing more frequently
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2318 than or independent of the program, also state a version number for
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2319 the manual in both of these places.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2320
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2321 The manual should document all command-line arguments and all
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2322 commands. It should give examples of their use. But don't organize
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2323 the manual as a list of features. Instead, organize it by the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2324 concepts a user will have before reaching that point in the manual.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2325 Address the goals that a user will have in mind, and explain how to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2326 accomplish them. Don't use Unix man pages as a model for how to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2327 write GNU documentation; they are a bad example to follow.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2328
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2329 The manual should have a node named @samp{@var{program} Invocation} or
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2330 @samp{Invoking @var{program}}, where @var{program} stands for the name
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2331 of the program being described, as you would type it in the shell to run
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2332 the program. This node (together with its subnodes, if any) should
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2333 describe the program's command line arguments and how to run it (the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2334 sort of information people would look in a man page for). Start with an
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2335 @samp{@@example} containing a template for all the options and arguments
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2336 that the program uses.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2337
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2338 Alternatively, put a menu item in some menu whose item name fits one of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2339 the above patterns. This identifies the node which that item points to
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2340 as the node for this purpose, regardless of the node's actual name.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2341
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2342 There will be automatic features for specifying a program name and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2343 quickly reading just this part of its manual.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2344
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2345 If one manual describes several programs, it should have such a node for
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2346 each program described.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2347
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2348 In addition to its manual, the package should have a file named
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2349 @file{NEWS} which contains a list of user-visible changes worth
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2350 mentioning. In each new release, add items to the front of the file and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2351 identify the version they pertain to. Don't discard old items; leave
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2352 them in the file after the newer items. This way, a user upgrading from
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2353 any previous version can see what is new.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2354
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2355 If the @file{NEWS} file gets very long, move some of the older items
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2356 into a file named @file{ONEWS} and put a note at the end referring the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2357 user to that file.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2358
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2359 Please do not use the term ``pathname'' that is used in Unix
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2360 documentation; use ``file name'' (two words) instead. We use the term
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2361 ``path'' only for search paths, which are lists of file names.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2362
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2363 It is ok to supply a man page for the program as well as a Texinfo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2364 manual if you wish to. But keep in mind that supporting a man page
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2365 requires continual effort, each time the program is changed. Any time
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2366 you spend on the man page is time taken away from more useful things you
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2367 could contribute.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2368
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2369 Thus, even if a user volunteers to donate a man page, you may find this
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2370 gift costly to accept. Unless you have time on your hands, it may be
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2371 better to refuse the man page unless the same volunteer agrees to take
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2372 full responsibility for maintaining it---so that you can wash your hands
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2373 of it entirely. If the volunteer ceases to do the job, then don't feel
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2374 obliged to pick it up yourself; it may be better to withdraw the man
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2375 page until another volunteer offers to carry on with it.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2376
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2377 Alternatively, if you expect the discrepancies to be small enough that
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2378 the man page remains useful, put a prominent note near the beginning of
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2379 the man page explaining that you don't maintain it and that the Texinfo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2380 manual is more authoritative, and describing how to access the Texinfo
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2381 documentation.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2382
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2383 @node Releases
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2384 @chapter Making Releases
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2385
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2386 Package the distribution of Foo version 69.96 in a gzipped tar file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2387 named @file{foo-69.96.tar.gz}. It should unpack into a subdirectory
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2388 named @file{foo-69.96}.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2389
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2390 Building and installing the program should never modify any of the files
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2391 contained in the distribution. This means that all the files that form
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2392 part of the program in any way must be classified into @dfn{source
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2393 files} and @dfn{non-source files}. Source files are written by humans
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2394 and never changed automatically; non-source files are produced from
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2395 source files by programs under the control of the Makefile.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2396
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2397 Naturally, all the source files must be in the distribution. It is okay
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2398 to include non-source files in the distribution, provided they are
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2399 up-to-date and machine-independent, so that building the distribution
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2400 normally will never modify them. We commonly include non-source files
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2401 produced by Bison, Lex, @TeX{}, and Makeinfo; this helps avoid
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2402 unnecessary dependencies between our distributions, so that users can
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2403 install whichever packages they want to install.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2404
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2405 Non-source files that might actually be modified by building and
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2406 installing the program should @strong{never} be included in the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2407 distribution. So if you do distribute non-source files, always make
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2408 sure they are up to date when you make a new distribution.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2409
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2410 Make sure that the directory into which the distribution unpacks (as
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2411 well as any subdirectories) are all world-writable (octal mode 777).
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2412 This is so that old versions of @code{tar} which preserve the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2413 ownership and permissions of the files from the tar archive will be
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2414 able to extract all the files even if the user is unprivileged.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2415
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2416 Make sure that all the files in the distribution are world-readable.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2417
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2418 Make sure that no file name in the distribution is more than 14
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2419 characters long. Likewise, no file created by building the program
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2420 should have a name longer than 14 characters. The reason for this is
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2421 that some systems adhere to a foolish interpretation of the POSIX
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2422 standard, and refuse to open a longer name, rather than truncating as
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2423 they did in the past.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2424
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2425 Don't include any symbolic links in the distribution itself. If the tar
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2426 file contains symbolic links, then people cannot even unpack it on
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2427 systems that don't support symbolic links. Also, don't use multiple
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2428 names for one file in different directories, because certain file
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2429 systems cannot handle this and that prevents unpacking the
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2430 distribution.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2431
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2432 Try to make sure that all the file names will be unique on MS-DOG. A
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2433 name on MS-DOG consists of up to 8 characters, optionally followed by a
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2434 period and up to three characters. MS-DOG will truncate extra
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2435 characters both before and after the period. Thus,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2436 @file{foobarhacker.c} and @file{foobarhacker.o} are not ambiguous; they
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2437 are truncated to @file{foobarha.c} and @file{foobarha.o}, which are
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2438 distinct.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2439
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2440 Include in your distribution a copy of the @file{texinfo.tex} you used
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2441 to test print any @file{*.texinfo} files.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2442
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2443 Likewise, if your program uses small GNU software packages like regex,
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2444 getopt, obstack, or termcap, include them in the distribution file.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2445 Leaving them out would make the distribution file a little smaller at
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2446 the expense of possible inconvenience to a user who doesn't know what
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2447 other files to get.
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2448
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2449 @contents
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2450
798a4d06ba7d [project @ 1996-07-19 01:52:57 by jwe]
jwe
parents:
diff changeset
2451 @bye