Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/etc/standards.info

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 This is standards.info, produced by makeinfo version 4.0 from
     1This is standards.info, produced by makeinfo version 4.3 from
    22./standards.texi.
    33
     
    77
    88   GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996,
    9 1997, 1998 Free Software Foundation, Inc.
    10 
    11    Permission is granted to make and distribute verbatim copies of this
    12 manual provided the copyright notice and this permission notice are
    13 preserved on all copies.
    14 
    15    Permission is granted to copy and distribute modified versions of
    16 this manual under the conditions for verbatim copying, provided that
    17 the entire resulting derived work is distributed under the terms of a
    18 permission notice identical to this one.
    19 
    20    Permission is granted to copy and distribute translations of this
    21 manual into another language, under the above conditions for modified
    22 versions, except that this permission notice may be stated in a
    23 translation approved by the Free Software Foundation.
     91997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
     10
     11   Permission is granted to copy, distribute and/or modify this document
     12under the terms of the GNU Free Documentation License, Version 1.1 or
     13any later version published by the Free Software Foundation; with no
     14Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
     15Texts.  A copy of the license is included in the section entitled "GNU
     16Free Documentation License".
    2417
    2518
     
    2922*******
    3023
    31    Last updated March 13, 1998.
     24   Last updated February 14, 2002.
    3225
    3326* Menu:
    3427
    3528* Preface::                     About the GNU Coding Standards
    36 * Intellectual Property::       Keeping Free Software Free
     29* Legal Issues::                Keeping Free Software Free
    3730* Design Advice::               General Program Design
    3831* Program Behavior::            Program Behavior for All Programs
     
    4033* Documentation::               Documenting Programs
    4134* Managing Releases::           The Release Process
    42 
    43 
    44 File: standards.info,  Node: Preface,  Next: Intellectual Property,  Prev: Top,  Up: Top
     35* References::                  References to Non-Free Software or Documentation
     36* Copying This Manual::         How to Make Copies of This Manual
     37* Index::
     38
     39
     40File: standards.info,  Node: Preface,  Next: Legal Issues,  Prev: Top,  Up: Top
    4541
    4642About the GNU Coding Standards
     
    5551state reasons for writing in a certain way.
    5652
     53   This release of the GNU Coding Standards was last updated February
     5414, 2002.
     55
     56   If you did not obtain this file directly from the GNU project and
     57recently, please check for a newer version.  You can ftp the GNU Coding
     58Standards from any GNU FTP host in the directory `/pub/gnu/standards/'.
     59The GNU Coding Standards are available there in several different
     60formats: `standards.text', `standards.info', and `standards.dvi', as
     61well as the Texinfo "source" which is divided in two files:
     62`standards.texi' and `make-stds.texi'.  The GNU Coding Standards are
     63also available on the GNU World Wide Web server:
     64`http://www.gnu.org/prep/standards_toc.html'.
     65
    5766   Corrections or suggestions for this document should be sent to
    58 <gnu@gnu.org>.  If you make a suggestion, please include a suggested
    59 new wording for it; our time is limited.  We prefer a context diff to
    60 the `standards.texi' or `make-stds.texi' files, but if you don't have
    61 those files, please mail your suggestion anyway.
    62 
    63    This release of the GNU Coding Standards was last updated March 13,
    64 1998.
    65 
    66 
    67 File: standards.info,  Node: Intellectual Property,  Next: Design Advice,  Prev: Preface,  Up: Top
     67<bug-standards@gnu.org>.  If you make a suggestion, please include a
     68suggested new wording for it; our time is limited.  We prefer a context
     69diff to the `standards.texi' or `make-stds.texi' files, but if you
     70don't have those files, please mail your suggestion anyway.
     71
     72   These standards cover the minimum of what is important when writing a
     73GNU package.  Likely, the needs for additional standards will come up.
     74Sometimes, you might suggest that such standards be added to this
     75document.  If you think your standards would be generally useful, please
     76do suggest them.
     77
     78   You should also set standards for your package on many questions not
     79addressed or not firmly specified here.  The most important point is to
     80be self-consistent--try to stick to the conventions you pick, and try
     81to document them as much as possible.  That way, your program will be
     82more maintainable by others.
     83
     84
     85File: standards.info,  Node: Legal Issues,  Next: Design Advice,  Prev: Preface,  Up: Top
    6886
    6987Keeping Free Software Free
    7088**************************
    7189
    72    This node discusses how you can make sure that GNU software remains
    73 unencumbered.
     90   This node discusses how you can make sure that GNU software avoids
     91legal difficulties, and other related issues.
    7492
    7593* Menu:
     
    7795* Reading Non-Free Code::       Referring to Proprietary Programs
    7896* Contributions::               Accepting Contributions
    79 
    80 
    81 File: standards.info,  Node: Reading Non-Free Code,  Next: Contributions,  Up: Intellectual Property
     97* Trademarks::                  How We Deal with Trademark Issues
     98
     99
     100File: standards.info,  Node: Reading Non-Free Code,  Next: Contributions,  Up: Legal Issues
    82101
    83102Referring to Proprietary Programs
     
    116135
    117136
    118 File: standards.info,  Node: Contributions,  Prev: Reading Non-Free Code,  Up: Intellectual Property
     137File: standards.info,  Node: Contributions,  Next: Trademarks,  Prev: Reading Non-Free Code,  Up: Legal Issues
    119138
    120139Accepting Contributions
    121140=======================
    122141
    123    If someone else sends you a piece of code to add to the program you
    124 are working on, we need legal papers to use it--the same sort of legal
    125 papers we will need to get from you.  _Each_ significant contributor to
    126 a program must sign some sort of legal papers in order for us to have
    127 clear title to the program.  The main author alone is not enough.
     142   If the program you are working on is copyrighted by the Free Software
     143Foundation, then when someone else sends you a piece of code to add to
     144the program, we need legal papers to use it--just as we asked you to
     145sign papers initially.  _Each_ person who makes a nontrivial
     146contribution to a program must sign some sort of legal papers in order
     147for us to have clear title to the program; the main author alone is not
     148enough.
    128149
    129150   So, before adding in any contributions from other people, please tell
     
    140161text, so we need legal papers for all kinds.
    141162
     163   We know it is frustrating to ask for legal papers; it's frustrating
     164for us as well.  But if you don't wait, you are going out on a limb--for
     165example, what if the contributor's employer won't sign a disclaimer?
     166You might have to take that code out again!
     167
    142168   You don't need papers for changes of a few lines here or there, since
    143169they are not significant for copyright purposes.  Also, you don't need
    144170papers if all you get from the suggestion is some ideas, not actual code
    145 which you use.  For example, if you write a different solution to the
    146 problem, you don't need to get papers.
    147 
    148    We know this is frustrating; it's frustrating for us as well.  But if
    149 you don't wait, you are going out on a limb--for example, what if the
    150 contributor's employer won't sign a disclaimer?  You might have to take
    151 that code out again!
     171which you use.  For example, if someone send you one implementation, but
     172you write a different implementation of the same idea, you don't need to
     173get papers.
    152174
    153175   The very worst thing is if you forget to tell us about the other
     
    160182
    161183
    162 File: standards.info,  Node: Design Advice,  Next: Program Behavior,  Prev: Intellectual Property,  Up: Top
     184File: standards.info,  Node: Trademarks,  Prev: Contributions,  Up: Legal Issues
     185
     186Trademarks
     187==========
     188
     189   Please do not include any trademark acknowledgements in GNU software
     190packages or documentation.
     191
     192   Trademark acknowledgements are the statements that such-and-such is a
     193trademark of so-and-so.  The GNU Project has no objection to the basic
     194idea of trademarks, but these acknowledgements feel like kowtowing, so
     195we don't use them.  There is no legal requirement for them.
     196
     197   What is legally required, as regards other people's trademarks, is to
     198avoid using them in ways which a reader might read as naming or labeling
     199our own programs or activities.  For example, since "Objective C" is
     200(or at least was) a trademark, we made sure to say that we provide a
     201"compiler for the Objective C language" rather than an "Objective C
     202compiler".  The latter is meant to be short for the former, but it does
     203not explicitly state the relationship, so it could be misinterpreted as
     204using "Objective C" as a label for the compiler rather than for the
     205language.
     206
     207
     208File: standards.info,  Node: Design Advice,  Next: Program Behavior,  Prev: Legal Issues,  Up: Top
    163209
    164210General Program Design
     
    170216* Menu:
    171217
     218* Source Language::             Which languges to use.
    172219* Compatibility::               Compatibility with other implementations
    173220* Using Extensions::            Using non-standard features
    174 * ANSI C::                      Using ANSI C features
    175 * Source Language::             Using languages other than C
    176 
    177 
    178 File: standards.info,  Node: Compatibility,  Next: Using Extensions,  Up: Design Advice
     221* Standard C::                  Using Standard C features
     222* Conditional Compilation::     Compiling Code Only If A Conditional is True
     223
     224
     225File: standards.info,  Node: Source Language,  Next: Compatibility,  Up: Design Advice
     226
     227Which Languages to Use
     228======================
     229
     230   When you want to use a language that gets compiled and runs at high
     231speed, the best language to use is C.  Using another language is like
     232using a non-standard feature: it will cause trouble for users.  Even if
     233GCC supports the other language, users may find it inconvenient to have
     234to install the compiler for that other language in order to build your
     235program.  For example, if you write your program in C++, people will
     236have to install the GNU C++ compiler in order to compile your program.
     237
     238   C has one other advantage over C++ and other compiled languages: more
     239people know C, so more people will find it easy to read and modify the
     240program if it is written in C.
     241
     242   So in general it is much better to use C, rather than the comparable
     243alternatives.
     244
     245   But there are two exceptions to that conclusion:
     246
     247   * It is no problem to use another language to write a tool
     248     specifically intended for use with that language.  That is because
     249     the only people who want to build the tool will be those who have
     250     installed the other language anyway.
     251
     252   * If an application is of interest only to a narrow part of the
     253     community, then the question of which language it is written in
     254     has less effect on other people, so you may as well please
     255     yourself.
     256
     257   Many programs are designed to be extensible: they include an
     258interpreter for a language that is higher level than C.  Often much of
     259the program is written in that language, too.  The Emacs editor
     260pioneered this technique.
     261
     262   The standard extensibility interpreter for GNU software is GUILE,
     263which implements the language Scheme (an especially clean and simple
     264dialect of Lisp).  `http://www.gnu.org/software/guile/'.  We don't
     265reject programs written in other "scripting languages" such as Perl and
     266Python, but using GUILE is very important for the overall consistency of
     267the GNU system.
     268
     269
     270File: standards.info,  Node: Compatibility,  Next: Using Extensions,  Prev: Source Language,  Up: Design Advice
    179271
    180272Compatibility with Other Implementations
     
    183275   With occasional exceptions, utility programs and libraries for GNU
    184276should be upward compatible with those in Berkeley Unix, and upward
    185 compatible with ANSI C if ANSI C specifies their behavior, and upward
    186 compatible with POSIX if POSIX specifies their behavior.
     277compatible with Standard C if Standard C specifies their behavior, and
     278upward compatible with POSIX if POSIX specifies their behavior.
    187279
    188280   When these standards conflict, it is useful to offer compatibility
    189281modes for each of them.
    190282
    191    ANSI C and POSIX prohibit many kinds of extensions.  Feel free to
    192 make the extensions anyway, and include a `--ansi', `--posix', or
     283   Standard C and POSIX prohibit many kinds of extensions.  Feel free
     284to make the extensions anyway, and include a `--ansi', `--posix', or
    193285`--compatible' option to turn them off.  However, if the extension has
    194286a significant chance of breaking any real programs or scripts, then it
    195 is not really upward compatible.  Try to redesign its interface.
     287is not really upward compatible.  So you should try to redesign its
     288interface to make it upward compatible.
    196289
    197290   Many GNU programs suppress extensions that conflict with POSIX if the
     
    206299feature as well.  (There is a free `vi' clone, so we offer it.)
    207300
    208    Additional useful features not in Berkeley Unix are welcome.
    209 
    210 
    211 File: standards.info,  Node: Using Extensions,  Next: ANSI C,  Prev: Compatibility,  Up: Design Advice
     301   Additional useful features are welcome regardless of whether there
     302is any precedent for them.
     303
     304
     305File: standards.info,  Node: Using Extensions,  Next: Standard C,  Prev: Compatibility,  Up: Design Advice
    212306
    213307Using Non-standard Features
     
    233327
    234328   An exception to this rule are the large, established programs (such
    235 as Emacs) which run on a great variety of systems.  Such programs would
    236 be broken by use of GNU extensions.
     329as Emacs) which run on a great variety of systems.  Using GNU
     330extensions in such programs would make many users unhappy, so we don't
     331do that.
    237332
    238333   Another exception is for programs that are used as part of
     
    240335order to bootstrap the GNU compilation facilities.  If these require
    241336the GNU compiler, then no one can compile them without having them
    242 installed already.  That would be no good.
    243 
    244 
    245 File: standards.info,  Node: ANSI C,  Next: Source Language,  Prev: Using Extensions,  Up: Design Advice
    246 
    247 ANSI C and pre-ANSI C
    248 =====================
    249 
    250    Do not ever use the "trigraph" feature of ANSI C.
    251 
    252    ANSI C is widespread enough now that it is ok to write new programs
    253 that use ANSI C features (and therefore will not work in non-ANSI
    254 compilers).  And if a program is already written in ANSI C, there's no
    255 need to convert it to support non-ANSI compilers.
    256 
    257    However, it is easy to support non-ANSI compilers in most programs,
    258 so you might still consider doing so when you write a program.  Instead
    259 of writing function definitions in ANSI prototype form,
     337installed already.  That would be extremely troublesome in certain
     338cases.
     339
     340
     341File: standards.info,  Node: Standard C,  Next: Conditional Compilation,  Prev: Using Extensions,  Up: Design Advice
     342
     343Standard C and Pre-Standard C
     344=============================
     345
     346   1989 Standard C is widespread enough now that it is ok to use its
     347features in new programs.  There is one exception: do not ever use the
     348"trigraph" feature of Standard C.
     349
     350   1999 Standard C is not widespread yet, so please do not require its
     351features in programs.  It is ok to use its features if they are present.
     352
     353   However, it is easy to support pre-standard compilers in most
     354programs, so if you know how to do that, feel free.  If a program you
     355are maintaining has such support, you should try to keep it working.
     356
     357   To support pre-standard C, instead of writing function definitions in
     358standard prototype form,
    260359
    261360     int
     
    263362     ...
    264363
    265 write the definition in pre-ANSI style like this,
     364write the definition in pre-standard style like this,
    266365
    267366     int
     
    275374
    276375   You need such a declaration anyway, in a header file, to get the
    277 benefit of ANSI C prototypes in all the files where the function is
    278 called.  And once you have it, you lose nothing by writing the function
    279 definition in the pre-ANSI style.
    280 
    281    If you don't know non-ANSI C, there's no need to learn it; just
    282 write in ANSI C.
    283 
    284 
    285 File: standards.info,  Node: Source Language,  Prev: ANSI C,  Up: Design Advice
    286 
    287 Using Languages Other Than C
    288 ============================
    289 
    290    Using a language other than C is like using a non-standard feature:
    291 it will cause trouble for users.  Even if GCC supports the other
    292 language, users may find it inconvenient to have to install the
    293 compiler for that other language in order to build your program.  For
    294 example, if you write your program in C++, people will have to install
    295 the C++ compiler in order to compile your program.  Thus, it is better
    296 if you write in C.
    297 
    298    But there are three situations when there is no disadvantage in using
    299 some other language:
    300 
    301    * It is okay to use another language if your program contains an
    302      interpreter for that language.
    303 
    304      For example, if your program links with GUILE, it is ok to write
    305      part of the program in Scheme or another language supported by
    306      GUILE.
    307 
    308    * It is okay to use another language in a tool specifically intended
    309      for use with that language.
    310 
    311      This is okay because the only people who want to build the tool
    312      will be those who have installed the other language anyway.
    313 
    314    * If an application is of interest to a narrow community, then
    315      perhaps it's not important if the application is inconvenient to
    316      install.
    317 
    318    C has one other advantage over C++ and other compiled languages: more
    319 people know C, so more people will find it easy to read and modify the
    320 program if it is written in C.
     376benefit of prototypes in all the files where the function is called.
     377And once you have the declaration, you normally lose nothing by writing
     378the function definition in the pre-standard style.
     379
     380   This technique does not work for integer types narrower than `int'.
     381If you think of an argument as being of a type narrower than `int',
     382declare it as `int' instead.
     383
     384   There are a few special cases where this technique is hard to use.
     385For example, if a function argument needs to hold the system type
     386`dev_t', you run into trouble, because `dev_t' is shorter than `int' on
     387some machines; but you cannot use `int' instead, because `dev_t' is
     388wider than `int' on some machines.  There is no type you can safely use
     389on all machines in a non-standard definition.  The only way to support
     390non-standard C and pass such an argument is to check the width of
     391`dev_t' using Autoconf and choose the argument type accordingly.  This
     392may not be worth the trouble.
     393
     394   In order to support pre-standard compilers that do not recognize
     395prototypes, you may want to use a preprocessor macro like this:
     396
     397     /* Declare the prototype for a general external function.  */
     398     #if defined (__STDC__) || defined (WINDOWSNT)
     399     #define P_(proto) proto
     400     #else
     401     #define P_(proto) ()
     402     #endif
     403
     404
     405File: standards.info,  Node: Conditional Compilation,  Prev: Standard C,  Up: Design Advice
     406
     407Conditional Compilation
     408=======================
     409
     410   When supporting configuration options already known when building
     411your program we prefer using `if (... )' over conditional compilation,
     412as in the former case the compiler is able to perform more extensive
     413checking of all possible code paths.
     414
     415   For example, please write
     416
     417       if (HAS_FOO)
     418         ...
     419       else
     420         ...
     421
     422   instead of:
     423
     424       #ifdef HAS_FOO
     425         ...
     426       #else
     427         ...
     428       #endif
     429
     430   A modern compiler such as GCC will generate exactly the same code in
     431both cases, and we have been using similar techniques with good success
     432in several projects.
     433
     434   While this is not a silver bullet solving all portability problems,
     435following this policy would have saved the GCC project alone many person
     436hours if not days per year.
     437
     438   In the case of function-like macros like `REVERSIBLE_CC_MODE' in GCC
     439which cannot be simply used in `if( ...)' statements, there is an easy
     440workaround.  Simply introduce another macro `HAS_REVERSIBLE_CC_MODE' as
     441in the following example:
     442
     443       #ifdef REVERSIBLE_CC_MODE
     444       #define HAS_REVERSIBLE_CC_MODE 1
     445       #else
     446       #define HAS_REVERSIBLE_CC_MODE 0
     447       #endif
    321448
    322449
     
    326453*********************************
    327454
    328    This node describes how to write robust software. It also describes
    329 general standards for error messages, the command line interface, and
    330 how libraries should behave.
     455   This node describes conventions for writing robust software.  It
     456also describes general standards for error messages, the command line
     457interface, and how libraries should behave.
    331458
    332459* Menu:
     
    335462* Libraries::                   Library behavior
    336463* Errors::                      Formatting error messages
    337 * User Interfaces::             Standards for command line interfaces
    338 * Option Table::                Table of long options.
     464* User Interfaces::             Standards about interfaces generally
     465* Graphical Interfaces::        Standards for graphical interfaces
     466* Command-Line Interfaces::     Standards for command line interfaces
     467* Option Table::                Table of long options
    339468* Memory Usage::                When and how to care about memory needs
     469* File Usage::                  Which files to use, and where
    340470
    341471
     
    354484nonprinting characters _including those with codes above 0177_.  The
    355485only sensible exceptions would be utilities specifically intended for
    356 interface to certain types of printers that can't handle those
    357 characters.
     486interface to certain types of terminals or printers that can't handle
     487those characters.  Whenever possible, try to make programs work
     488properly with sequences of bytes that represent multibyte characters,
     489using encodings such as UTF-8 and others.
    358490
    359491   Check every system call for an error return, unless you know you
     
    395527these are less likely to work compatibly.  If you need to find all the
    396528files in a directory, use `readdir' or some other high-level interface.
    397 These will be supported compatibly by GNU.
    398 
    399    By default, the GNU system will provide the signal handling
    400 functions of BSD and of POSIX.  So GNU software should be written to use
    401 these.
     529These are supported compatibly by GNU.
     530
     531   The preferred signal handling facilities are the BSD variant of
     532`signal', and the POSIX `sigaction' function; the alternative USG
     533`signal' interface is an inferior design.
     534
     535   Nowadays, using the POSIX signal functions may be the easiest way to
     536make a program portable.  If you use `signal', then on GNU/Linux
     537systems running GNU libc version 1, you should include `bsd/signal.h'
     538instead of `signal.h', so as to get BSD behavior.  It is up to you
     539whether to support systems where `signal' has only the USG behavior, or
     540give up on them.
    402541
    403542   In error checks that detect "impossible" conditions, just abort.
     
    419558instead of `/tmp'.
    420559
     560   In addition, be aware that there is a possible security problem when
     561creating temporary files in world-writable directories.  In C, you can
     562avoid this problem by creating temporary files in this manner:
     563
     564     fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0600);
     565
     566or by using the `mkstemps' function from libiberty.
     567
     568   In bash, use `set -C' to avoid this problem.
     569
    421570
    422571File: standards.info,  Node: Libraries,  Next: Errors,  Prev: Semantics,  Up: Program Behavior
     
    442591
    443592   External symbols that are not documented entry points for the user
    444 should have names beginning with `_'.  They should also contain the
    445 chosen name prefix for the library, to prevent collisions with other
    446 libraries.  These can go in the same files with user entry points if
    447 you like.
     593should have names beginning with `_'.  The `_' should be followed by
     594the chosen name prefix for the library, to prevent collisions with
     595other libraries.  These can go in the same files with user entry points
     596if you like.
    448597
    449598   Static functions and variables can be used as you like and need not
     
    460609     SOURCE-FILE-NAME:LINENO: MESSAGE
    461610
     611If you want to mention the column number, use this format:
     612
     613     SOURCE-FILE-NAME:LINENO:COLUMN: MESSAGE
     614
     615Line numbers should start from 1 at the beginning of the file, and
     616column numbers should start from 1 at the beginning of the line.  (Both
     617of these conventions are chosen for compatibility.)  Calculate column
     618numbers assuming that space and all ASCII printing characters have
     619equal width, and assuming tab stops every 8 columns.
     620
    462621   Error messages from other noninteractive programs should look like
    463622this:
     
    470629
    471630when there is no relevant source file.
     631
     632   If you want to mention the column number, use this format:
     633
     634     PROGRAM:SOURCE-FILE-NAME:LINENO:COLUMN: MESSAGE
    472635
    473636   In an interactive program (one that is reading commands from a
     
    487650
    488651
    489 File: standards.info,  Node: User Interfaces,  Next: Option Table,  Prev: Errors,  Up: Program Behavior
    490 
    491 Standards for Command Line Interfaces
    492 =====================================
     652File: standards.info,  Node: User Interfaces,  Next: Graphical Interfaces,  Prev: Errors,  Up: Program Behavior
     653
     654Standards for Interfaces Generally
     655==================================
    493656
    494657   Please don't make the behavior of a utility depend on the name used
     
    502665type of output device it is used with.  Device independence is an
    503666important principle of the system's design; do not compromise it merely
    504 to save someone from typing an option now and then.
     667to save someone from typing an option now and then.  (Variation in error
     668message syntax when using a terminal is ok, because that is a side issue
     669that people do not depend on.)
    505670
    506671   If you think one behavior is most useful when the output is to a
     
    518683format.
    519684
     685
     686File: standards.info,  Node: Graphical Interfaces,  Next: Command-Line Interfaces,  Prev: User Interfaces,  Up: Program Behavior
     687
     688Standards for Graphical Interfaces
     689==================================
     690
     691   When you write a program that provides a graphical user interface,
     692please make it work with X Windows and the GTK toolkit unless the
     693functionality specifically requires some alternative (for example,
     694"displaying jpeg images while in console mode").
     695
     696   In addition, please provide a command-line interface to control the
     697functionality.  (In many cases, the graphical user interface can be a
     698separate program which invokes the command-line program.)  This is so
     699that the same jobs can be done from scripts.
     700
     701   Please also consider providing a CORBA interface (for use from
     702GNOME), a library interface (for use from C), and perhaps a
     703keyboard-driven console interface (for use by users from console mode).
     704Once you are doing the work to provide the functionality and the
     705graphical interface, these won't be much extra work.
     706
     707
     708File: standards.info,  Node: Command-Line Interfaces,  Next: Option Table,  Prev: Graphical Interfaces,  Up: Program Behavior
     709
     710Standards for Command Line Interfaces
     711=====================================
     712
    520713   It is a good idea to follow the POSIX guidelines for the
    521714command-line options of a program.  The easiest way to do this is to use
     
    548741
    549742`--version'
    550      This option should direct the program to information about its
    551      name, version, origin and legal status, all on standard output,
    552      and then exit successfully.  Other options and arguments should be
    553      ignored once this is seen, and the program should not perform its
    554      normal function.
     743     This option should direct the program to print information about
     744     its name, version, origin and legal status, all on standard
     745     output, and then exit successfully.  Other options and arguments
     746     should be ignored once this is seen, and the program should not
     747     perform its normal function.
    555748
    556749     The first line is meant to be easy for a program to parse; the
     
    620813     appeared in the first line.
    621814
     815     Translations of the above lines must preserve the validity of the
     816     copyright notices (*note Internationalization::).  If the
     817     translation's character set supports it, the `(C)' should be
     818     replaced with the copyright symbol, as follows:
     819
     820     (the official copyright symbol, which is the letter C in a circle);
     821
     822     Write the word "Copyright" exactly like that, in English.  Do not
     823     translate it into another language.  International treaties
     824     recognize the English word "Copyright"; translations into other
     825     languages do not have legal significance.
     826
    622827`--help'
    623828     This option should output brief documentation for how to invoke the
     
    632837
    633838
    634 File: standards.info,  Node: Option Table,  Next: Memory Usage,  Prev: User Interfaces,  Up: Program Behavior
     839File: standards.info,  Node: Option Table,  Next: Memory Usage,  Prev: Command-Line Interfaces,  Up: Program Behavior
    635840
    636841Table of Long Options
     
    640845incomplete, but we aim to list all the options that a new program might
    641846want to be compatible with.  If you use names not already in the table,
    642 please send <gnu@gnu.org> a list of them, with their meanings, so we
    643 can update the table.
     847please send <bug-standards@gnu.org> a list of them, with their
     848meanings, so we can update the table.
    644849
    645850`after-date'
     
    691896     `-n' in `wdiff'.
    692897
     898`background'
     899     For server programs, run in the background.
     900
    693901`backward-search'
    694902     `-B' in `ctags'.
     
    8101018`dereference-args'
    8111019     `-D' in `du'.
     1020
     1021`device'
     1022     Specify an I/O device (special file name).
    8121023
    8131024`diacritics'
     
    9411152     `-F' in `shar'.
    9421153
     1154`foreground'
     1155     For server programs, run in the foreground; in other words, don't
     1156     do anything special to run the server in the background.
     1157
    9431158`format'
    9441159     Used in `ls', `time', and `ptx'.
     
    9861201     `-q' in `ls'.
    9871202
     1203`html'
     1204     In `makeinfo', output HTML.
     1205
    9881206`idle'
    9891207     `-u' in `who'.
     
    10421260`info'
    10431261     `-i', `-l', and `-m' in Finger.
     1262
     1263`init-file'
     1264     In some programs, specify the name of the file to read as the
     1265     user's init file.
    10441266
    10451267`initial'
     
    10591281     `-p' in `shar'.
    10601282
     1283`iso-8601'
     1284     Used in `date'
     1285
    10611286`jobs'
    10621287     `-j' in Make.
     
    12921517     `-F' in `gprof'.
    12931518
     1519`options'
     1520     `-o' in `getopt', `fdlist', `fdmount', `fdmountd', and `fdumount'.
     1521
    12941522`output'
    12951523     In various programs, specify the output file name.
     
    13751603`prompt'
    13761604     `-p' in `ed'.
     1605
     1606`proxy'
     1607     Specify an HTTP proxy.
    13771608
    13781609`query-user'
     
    15011732     `-s' in `ls'.
    15021733
     1734`socket'
     1735     Specify a file descriptor for a network server to use for its
     1736     socket, instead of opening and binding a new socket.  This
     1737     provides a way to run, in a nonpriveledged process, a server that
     1738     normally needs a reserved port number.
     1739
    15031740`sort'
    15041741     Used in `ls'.
     
    15981835     Used in `ls' and `touch'.
    15991836
     1837`timeout'
     1838     Specify how long to wait before giving up on some operation.
     1839
    16001840`to-stdout'
    16011841     `-O' in `tar'.
     
    16871927
    16881928
    1689 File: standards.info,  Node: Memory Usage,  Prev: Option Table,  Up: Program Behavior
     1929File: standards.info,  Node: Memory Usage,  Next: File Usage,  Prev: Option Table,  Up: Program Behavior
    16901930
    16911931Memory Usage
    16921932============
    16931933
    1694    If it typically uses just a few meg of memory, don't bother making
    1695 any effort to reduce memory usage.  For example, if it is impractical
    1696 for other reasons to operate on files more than a few meg long, it is
    1697 reasonable to read entire input files into core to operate on them.
     1934   If a program typically uses just a few meg of memory, don't bother
     1935making any effort to reduce memory usage.  For example, if it is
     1936impractical for other reasons to operate on files more than a few meg
     1937long, it is reasonable to read entire input files into core to operate
     1938on them.
    16981939
    16991940   However, for programs such as `cat' or `tail', that can usefully
     
    17091950
    17101951
     1952File: standards.info,  Node: File Usage,  Prev: Memory Usage,  Up: Program Behavior
     1953
     1954File Usage
     1955==========
     1956
     1957   Programs should be prepared to operate when `/usr' and `/etc' are
     1958read-only file systems.  Thus, if the program manages log files, lock
     1959files, backup files, score files, or any other files which are modified
     1960for internal purposes, these files should not be stored in `/usr' or
     1961`/etc'.
     1962
     1963   There are two exceptions.  `/etc' is used to store system
     1964configuration information; it is reasonable for a program to modify
     1965files in `/etc' when its job is to update the system configuration.
     1966Also, if the user explicitly asks to modify one file in a directory, it
     1967is reasonable for the program to store other files in the same
     1968directory.
     1969
     1970
    17111971File: standards.info,  Node: Writing C,  Next: Documentation,  Prev: Program Behavior,  Up: Top
    17121972
     
    17221982* Comments::                    Commenting Your Work
    17231983* Syntactic Conventions::       Clean Use of C Constructs
    1724 * Names::                       Naming Variables and Functions
     1984* Names::                       Naming Variables, Functions, and Files
    17251985* System Portability::          Portability between different operating systems
    17261986* CPU Portability::             Supporting the range of CPU types
     
    17532013     }
    17542014
    1755 or, if you want to use ANSI C, format the definition like this:
     2015or, if you want to use Standard C syntax, format the definition like
     2016this:
    17562017
    17572018     static char *
     
    17612022     }
    17622023
    1763    In ANSI C, if the arguments don't fit nicely on one line, split it
    1764 like this:
     2024   In Standard C, if the arguments don't fit nicely on one line, split
     2025it like this:
    17652026
    17662027     int
     
    17692030     ...
    17702031
    1771    For the body of the function, we prefer code formatted like this:
     2032   The rest of this section gives our recommendations for other aspects
     2033of C formatting style, which is also the default style of the `indent'
     2034program in version 1.2 and newer.  It corresponds to the options
     2035
     2036     -nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
     2037     -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob
     2038
     2039   We don't think of these recommendations as requirements, because it
     2040causes no problems for users if two different programs have different
     2041formatting styles.
     2042
     2043   But whatever style you use, please use it consistently, since a
     2044mixture of styles within one program tends to look ugly.  If you are
     2045contributing changes to an existing program, please follow the style of
     2046that program.
     2047
     2048   For the body of the function, our recommended style looks like this:
    17722049
    17732050     if (x < foo (y, z))
     
    18082085   Insert extra parentheses so that Emacs will indent the code properly.
    18092086For example, the following indentation looks nice if you do it by hand,
    1810 but Emacs would mess it up:
    18112087
    18122088     v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
    18132089         + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000;
    18142090
    1815    But adding a set of parentheses solves the problem:
     2091but Emacs would alter it.  Adding a set of parentheses produces
     2092something that looks equally nice, and which Emacs will preserve:
    18162093
    18172094     v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
     
    19172194=========================
    19182195
    1919    Please explicitly declare all arguments to functions.  Don't omit
    1920 them just because they are `int's.
     2196   Please explicitly declare the types of all objects.  For example, you
     2197should explicitly declare all arguments to functions, and you should
     2198declare functions to return `int' rather than omitting the `int'.
     2199
     2200   Some programmers like to use the GCC `-Wall' option, and change the
     2201code whenever it issues a warning.  If you want to do this, then do.
     2202Other programmers prefer not to use `-Wall', because it gives warnings
     2203for valid and legitimate code which they do not want to change.  If you
     2204want to do this, then do.  The compiler should be your servant, not
     2205your master.
    19212206
    19222207   Declarations of external functions and functions to appear later in
     
    20192304File: standards.info,  Node: Names,  Next: System Portability,  Prev: Syntactic Conventions,  Up: Writing C
    20202305
    2021 Naming Variables and Functions
    2022 ==============================
     2306Naming Variables, Functions, and Files
     2307======================================
    20232308
    20242309   The names of global variables and functions in a program serve as
     
    20312316within one context, where (presumably) comments explain their purpose.
    20322317
     2318   Try to limit your use of abbreviations in symbol names.  It is ok to
     2319make a few abbreviations, explain what they mean, and then use them
     2320frequently, but don't use lots of obscure abbreviations.
     2321
    20332322   Please use underscores to separate words in a name, so that the Emacs
    20342323word commands can be useful within them.  Stick to lower case; reserve
     
    20502339`enum' rather than `#define'.  GDB knows about enumeration constants.
    20512340
    2052    Use file names of 14 characters or less, to avoid creating gratuitous
    2053 problems on older System V systems.  You can use the program `doschk'
    2054 to test for this.  `doschk' also tests for potential name conflicts if
    2055 the files were loaded onto an MS-DOS file system--something you may or
    2056 may not care about.
     2341   You might want to make sure that none of the file names would
     2342conflict the files were loaded onto an MS-DOS file system which
     2343shortens the names.  You can use the program `doschk' to test for this.
     2344
     2345   Some GNU programs were designed to limit themselves to file names of
     234614 characters or less, to avoid file name conflicts if they are read
     2347into older System V systems.  Please preserve this feature in the
     2348existing GNU programs that have it, but there is no need to do this in
     2349new GNU programs.  `doschk' also reports file names longer than 14
     2350characters.
    20572351
    20582352
     
    20672361
    20682362   The primary purpose of GNU software is to run on top of the GNU
    2069 kernel, compiled with the GNU C compiler, on various types of CPU.  The
    2070 amount and kinds of variation among GNU systems on different CPUs will
    2071 be comparable to the variation among Linux-based GNU systems or among
    2072 BSD systems today.  So the kinds of portability that are absolutely
    2073 necessary are quite limited.
    2074 
    2075    But many users do run GNU software on non-GNU Unix or Unix-like
    2076 systems.  So supporting a variety of Unix-like systems is desirable,
    2077 although not paramount.
     2363kernel, compiled with the GNU C compiler, on various types of CPU.  So
     2364the kinds of portability that are absolutely necessary are quite
     2365limited.  But it is important to support Linux-based GNU systems, since
     2366they are the form of GNU that is popular.
     2367
     2368   Beyond that, it is good to support the other free operating systems
     2369(*BSD), and it is nice to support other Unix-like systems if you want
     2370to.  Supporting a variety of Unix-like systems is desirable, although
     2371not paramount.  It is usually not too hard, so you may as well do it.
     2372But you don't have to consider it an obligation, if it does turn out to
     2373be hard.
    20782374
    20792375   The easiest way to achieve portability to most Unix-like systems is
     
    20872383
    20882384   As for systems that are not like Unix, such as MSDOS, Windows, the
    2089 Macintosh, VMS, and MVS, supporting them is usually so much work that it
    2090 is better if you don't.
    2091 
    2092    The planned GNU kernel is not finished yet, but you can tell which
    2093 facilities it will provide by looking at the GNU C Library Manual.  The
    2094 GNU kernel is based on Mach, so the features of Mach will also be
    2095 available.  However, if you use Mach features, you'll probably have
    2096 trouble debugging your program today.
     2385Macintosh, VMS, and MVS, supporting them is often a lot of work.  When
     2386that is the case, it is better to spend your time adding features that
     2387will be useful on GNU and GNU/Linux, rather than on supporting other
     2388incompatible systems.
     2389
     2390   It is a good idea to define the "feature test macro" `_GNU_SOURCE'
     2391when compiling your C files.  When you compile on GNU or GNU/Linux,
     2392this will enable the declarations of GNU library extension functions,
     2393and that will usually give you a compiler error message if you define
     2394the same function names in some other way in your program.  (You don't
     2395have to actually _use_ these functions, if you prefer to make the
     2396program more portable to other systems.)
     2397
     2398   But whether or not you use these GNU extensions, you should avoid
     2399using their names for any other meanings.  Doing so would make it hard
     2400to move your code into other GNU programs.
    20972401
    20982402
     
    21092413GNU.
    21102414
     2415   Similarly, don't make any effort to cater to the possibility that
     2416`long' will be smaller than predefined types like `size_t'.  For
     2417example, the following code is ok:
     2418
     2419     printf ("size = %lu\n", (unsigned long) sizeof array);
     2420     printf ("diff = %ld\n", (long) (pointer2 - pointer1));
     2421
     2422   1989 Standard C requires this to work, and we know of only one
     2423counterexample: 64-bit programs on Microsoft Windows IA-64.  We will
     2424leave it to those who want to port GNU programs to that environment to
     2425figure out how to do it.
     2426
     2427   Predefined file-size types like `off_t' are an exception: they are
     2428longer than `long' on many platforms, so code like the above won't work
     2429with them.  One way to print an `off_t' value portably is to print its
     2430digits yourself, one by one.
     2431
    21112432   Don't assume that the address of an `int' object is also the address
    21122433of its least-significant byte.  This is false on big-endian machines.
     
    21212442between pointers of various types, or between pointers and integers.
    21222443On most machines, there's no difference anyway.  As for the few
    2123 machines where there is a difference, all of them support ANSI C, so
    2124 you can use prototypes (conditionalized to be active only in ANSI C) to
    2125 make the code work on those systems.
     2444machines where there is a difference, all of them support Standard C
     2445prototypes, so you can use prototypes (perhaps conditionalized to be
     2446active only in Standard C) to make the code work on those systems.
    21262447
    21272448   In certain cases, it is ok to pass integer and pointer arguments
     
    21322453     error (s, a1, a2, a3)
    21332454          char *s;
    2134           int a1, a2, a3;
     2455          char *a1, *a2, *a3;
    21352456     {
    21362457       fprintf (stderr, "error: ");
     
    21382459     }
    21392460
    2140 In practice, this works on all machines, and it is much simpler than any
     2461In practice, this works on all machines, since a pointer is generally
     2462the widest possible kind of argument; it is much simpler than any
    21412463"correct" alternative.  Be sure _not_ to use a prototype for such
    21422464functions.
    21432465
    2144    However, avoid casting pointers to integers unless you really need
    2145 to.  These assumptions really reduce portability, and in most programs
    2146 they are easy to avoid.  In the cases where casting pointers to
    2147 integers is essential--such as, a Lisp interpreter which stores type
    2148 information as well as an address in one word--it is ok to do so, but
    2149 you'll have to make explicit provisions to handle different word sizes.
     2466   If you have decided to use Standard C, then you can instead define
     2467`error' using `stdarg.h', and pass the arguments along to `vfprintf'.
     2468
     2469   Avoid casting pointers to integers if you can.  Such casts greatly
     2470reduce portability, and in most programs they are easy to avoid.  In the
     2471cases where casting pointers to integers is essential--such as, a Lisp
     2472interpreter which stores type information as well as an address in one
     2473word--you'll have to make explicit provisions to handle different word
     2474sizes.  You will also need to make provision for systems in which the
     2475normal range of addresses you can get from `malloc' starts far away
     2476from zero.
    21502477
    21512478
     
    21552482========================
    21562483
    2157    C implementations differ substantially.  ANSI C reduces but does not
    2158 eliminate the incompatibilities; meanwhile, many users wish to compile
    2159 GNU software with pre-ANSI compilers.  This chapter gives
    2160 recommendations for how to use the more or less standard C library
    2161 functions to avoid unnecessary loss of portability.
    2162 
    2163    * Don't use the value of `sprintf'.  It returns the number of
     2484   C implementations differ substantially.  Standard C reduces but does
     2485not eliminate the incompatibilities; meanwhile, many GNU packages still
     2486support pre-standard compilers because this is not hard to do.  This
     2487chapter gives recommendations for how to use the more-or-less standard C
     2488library functions to avoid unnecessary loss of portability.
     2489
     2490   * Don't use the return value of `sprintf'.  It returns the number of
    21642491     characters written on some systems, but not on all systems.
     2492
     2493   * Be aware that `vfprintf' is not always available.
    21652494
    21662495   * `main' should be declared to return type `int'.  It should
     
    21822511
    21832512   * If you must declare a system function, don't specify the argument
    2184      types.  Use an old-style declaration, not an ANSI prototype.  The
    2185      more you specify about the function, the more likely a conflict.
     2513     types.  Use an old-style declaration, not a Standard C prototype.
     2514     The more you specify about the function, the more likely a
     2515     conflict.
    21862516
    21872517   * In particular, don't unconditionally declare `malloc' or `realloc'.
     
    22112541     usual way.
    22122542
    2213      That causes less of a problem than you might think.  The newer ANSI
    2214      string functions should be avoided anyway because many systems
    2215      still don't support them.  The string functions you can use are
    2216      these:
     2543     That causes less of a problem than you might think.  The newer
     2544     standard string functions should be avoided anyway because many
     2545     systems still don't support them.  The string functions you can
     2546     use are these:
    22172547
    22182548          strcpy   strncpy   strcat   strncat
     
    22402570     You should pick a single pair of names and use it throughout your
    22412571     program.  (Nowadays, it is better to choose `strchr' and `strrchr'
    2242      for new programs, since those are the standard ANSI names.)
    2243      Declare both of those names as functions returning `char *'.  On
    2244      systems which don't support those names, define them as macros in
    2245      terms of the other pair.  For example, here is what to put at the
    2246      beginning of your file (or in a header) if you want to use the
    2247      names `strchr' and `strrchr' throughout:
     2572     for new programs, since those are the standard names.)  Declare
     2573     both of those names as functions returning `char *'.  On systems
     2574     which don't support those names, define them as macros in terms of
     2575     the other pair.  For example, here is what to put at the beginning
     2576     of your file (or in a header) if you want to use the names
     2577     `strchr' and `strrchr' throughout:
    22482578
    22492579          #ifndef HAVE_STRCHR
     
    23662696********************
    23672697
     2698   A GNU program should ideally come with full free documentation,
     2699adequate for both reference and tutorial purposes.  If the package can
     2700be programmed or extended, the documentation should cover programming or
     2701extending it, as well as just using it.
     2702
    23682703* Menu:
    23692704
    23702705* GNU Manuals::                 Writing proper manuals.
     2706* Doc Strings and Manuals::     Compiling doc strings doesn't make a manual.
    23712707* Manual Structure Details::    Specific structure conventions.
     2708* License for Manuals::         Writing the distribution terms for a manual.
     2709* Manual Credits::              Giving credit to documentation contributors.
     2710* Printed Manuals::             Mentioning the printed manual.
    23722711* NEWS File::                   NEWS files supplement manuals.
    23732712* Change Logs::                 Recording Changes
     
    23772716
    23782717
    2379 File: standards.info,  Node: GNU Manuals,  Next: Manual Structure Details,  Up: Documentation
     2718File: standards.info,  Node: GNU Manuals,  Next: Doc Strings and Manuals,  Up: Documentation
    23802719
    23812720GNU Manuals
    23822721===========
    23832722
    2384    The preferred way to document part of the GNU system is to write a
    2385 manual in the Texinfo formatting language.  See the Texinfo manual,
    2386 either the hardcopy, or the on-line version available through `info' or
    2387 the Emacs Info subsystem (`C-h i').
     2723   The preferred document format for the GNU system is the Texinfo
     2724formatting language.  Every GNU package should (ideally) have
     2725documentation in Texinfo both for reference and for learners.  Texinfo
     2726makes it possible to produce a good quality formatted book, using TeX,
     2727and to generate an Info file.  It is also possible to generate HTML
     2728output from Texinfo source.  See the Texinfo manual, either the
     2729hardcopy, or the on-line version available through `info' or the Emacs
     2730Info subsystem (`C-h i').
     2731
     2732   Nowadays some other formats such as Docbook and Sgmltexi can be
     2733converted automatically into Texinfo.  It is ok to produce the Texinfo
     2734documentation by conversion this way, as long as it gives good results.
    23882735
    23892736   Programmers often find it most natural to structure the documentation
     
    24142761the whole subject clearer.
    24152762
    2416    The manual which discusses a program should document all of the
    2417 program's command-line options and all of its commands.  It should give
    2418 examples of their use.  But don't organize the manual as a list of
     2763   The manual which discusses a program should certainly document all of
     2764the program's command-line options and all of its commands.  It should
     2765give examples of their use.  But don't organize the manual as a list of
    24192766features.  Instead, organize it logically, by subtopics.  Address the
    24202767questions that a user will ask when thinking about the job that the
     
    24252772and for reading straight through (appendixes aside).  A GNU manual
    24262773should give a good introduction to a beginner reading through from the
    2427 start, and should also provide all the details that hackers want.
     2774start, and should also provide all the details that hackers want.  The
     2775Bison manual is a good example of this--please take a look at it to see
     2776what we mean.
    24282777
    24292778   That is not as hard as it first sounds.  Arrange each chapter as a
     
    24392788Bison manual provides a good example of how to do this.
    24402789
     2790   To serve as a reference, a manual should have an Index that list all
     2791the functions, variables, options, and important concepts that are part
     2792of the program.  One combined Index should do for a short manual, but
     2793sometimes for a complex package it is better to use multiple indices.
     2794The Texinfo manual includes advice on preparing good index entries, see
     2795*Note Making Index Entries: (texinfo)Index Entries, and see *Note
     2796Defining the Entries of an Index: (texinfo)Indexing Commands.
     2797
    24412798   Don't use Unix man pages as a model for how to write GNU
    24422799documentation; most of them are terse, badly structured, and give
    24432800inadequate explanation of the underlying concepts.  (There are, of
    2444 course exceptions.)  Also Unix man pages use a particular format which
    2445 is different from what we use in GNU manuals.
     2801course, some exceptions.)  Also, Unix man pages use a particular format
     2802which is different from what we use in GNU manuals.
     2803
     2804   Please include an email address in the manual for where to report
     2805bugs _in the manual_.
    24462806
    24472807   Please do not use the term "pathname" that is used in Unix
    24482808documentation; use "file name" (two words) instead.  We use the term
    2449 "path" only for search paths, which are lists of file names.
     2809"path" only for search paths, which are lists of directory names.
    24502810
    24512811   Please do not use the term "illegal" to refer to erroneous input to a
    24522812computer program.  Please use "invalid" for this, and reserve the term
    2453 "illegal" for violations of law.
    2454 
    2455 
    2456 File: standards.info,  Node: Manual Structure Details,  Next: NEWS File,  Prev: GNU Manuals,  Up: Documentation
     2813"illegal" for activities punishable by law.
     2814
     2815
     2816File: standards.info,  Node: Doc Strings and Manuals,  Next: Manual Structure Details,  Prev: GNU Manuals,  Up: Documentation
     2817
     2818Doc Strings and Manuals
     2819=======================
     2820
     2821   Some programming systems, such as Emacs, provide a documentation
     2822string for each function, command or variable.  You may be tempted to
     2823write a reference manual by compiling the documentation strings and
     2824writing a little additional text to go around them--but you must not do
     2825it.  That approach is a fundamental mistake.  The text of well-written
     2826documentation strings will be entirely wrong for a manual.
     2827
     2828   A documentation string needs to stand alone--when it appears on the
     2829screen, there will be no other text to introduce or explain it.
     2830Meanwhile, it can be rather informal in style.
     2831
     2832   The text describing a function or variable in a manual must not stand
     2833alone; it appears in the context of a section or subsection.  Other text
     2834at the beginning of the section should explain some of the concepts, and
     2835should often make some general points that apply to several functions or
     2836variables.  The previous descriptions of functions and variables in the
     2837section will also have given information about the topic.  A description
     2838written to stand alone would repeat some of that information; this
     2839redundance looks bad.  Meanwhile, the informality that is acceptable in
     2840a documentation string is totally unacceptable in a manual.
     2841
     2842   The only good way to use documentation strings in writing a good
     2843manual is to use them as a source of information for writing good text.
     2844
     2845
     2846File: standards.info,  Node: Manual Structure Details,  Next: License for Manuals,  Prev: Doc Strings and Manuals,  Up: Documentation
    24572847
    24582848Manual Structure Details
     
    24652855number for the manual in both of these places.
    24662856
    2467    Each program documented in the manual should should have a node named
     2857   Each program documented in the manual should have a node named
    24682858`PROGRAM Invocation' or `Invoking PROGRAM'.  This node (together with
    24692859its subnodes, if any) should describe the program's command line
     
    24762866to as the node for this purpose, regardless of the node's actual name.
    24772867
    2478    There will be automatic features for specifying a program name and
    2479 quickly reading just this part of its manual.
     2868   The `--usage' feature of the Info reader looks for such a node or
     2869menu item in order to find the relevant text, so it is essential for
     2870every Texinfo file to have one.
    24802871
    24812872   If one manual describes several programs, it should have such a node
    2482 for each program described.
    2483 
    2484 
    2485 File: standards.info,  Node: NEWS File,  Next: Change Logs,  Prev: Manual Structure Details,  Up: Documentation
     2873for each program described in the manual.
     2874
     2875
     2876File: standards.info,  Node: License for Manuals,  Next: Manual Credits,  Prev: Manual Structure Details,  Up: Documentation
     2877
     2878License for Manuals
     2879===================
     2880
     2881   Please use the GNU Free Documentation License for all GNU manuals
     2882that are more than a few pages long.  Likewise for a collection of short
     2883documents--you only need one copy of the GNU FDL for the whole
     2884collection.  For a single short document, you can use a very permissive
     2885non-copyleft license, to avoid taking up space with a long license.
     2886
     2887   See `http://www.gnu.org/copyleft/fdl-howto.html' for more explanation
     2888of how to employ the GFDL.
     2889
     2890   Note that it is not obligatory to include a copy of the GNU GPL or
     2891GNU LGPL in a manual whose license is neither the GPL nor the LGPL.  It
     2892can be a good idea to include the program's license in a large manual;
     2893in a short manual, whose size would be increased considerably by
     2894including the program's license, it is probably better not to include
     2895it.
     2896
     2897
     2898File: standards.info,  Node: Manual Credits,  Next: Printed Manuals,  Prev: License for Manuals,  Up: Documentation
     2899
     2900Manual Credits
     2901==============
     2902
     2903   Please credit the principal human writers of the manual as the
     2904authors, on the title page of the manual.  If a company sponsored the
     2905work, thank the company in a suitable place in the manual, but do not
     2906cite the company as an author.
     2907
     2908
     2909File: standards.info,  Node: Printed Manuals,  Next: NEWS File,  Prev: Manual Credits,  Up: Documentation
     2910
     2911Printed Manuals
     2912===============
     2913
     2914   The FSF publishes some GNU manuals in printed form.  To encourage
     2915sales of these manuals, the on-line versions of the manual should
     2916mention at the very start that the printed manual is available and
     2917should point at information for getting it--for instance, with a link
     2918to the page <http://www.gnu.org/order/order.html>.  This should not be
     2919included in the printed manual, though, because there it is redundant.
     2920
     2921   It is also useful to explain in the on-line forms of the manual how
     2922the user can print out the manual from the sources.
     2923
     2924
     2925File: standards.info,  Node: NEWS File,  Next: Change Logs,  Prev: Printed Manuals,  Up: Documentation
    24862926
    24872927The NEWS File
     
    25192959* Simple Changes::
    25202960* Conditional Changes::
     2961* Indicating the Part Changed::
    25212962
    25222963
     
    25382979   Another alternative is to record change log information with a
    25392980version control system such as RCS or CVS.  This can be converted
    2540 automatically to a `ChangeLog' file.
     2981automatically to a `ChangeLog' file using `rcs2log'; in Emacs, the
     2982command `C-x v a' (`vc-update-change-log') does the job.
    25412983
    25422984   There's no need to describe the full purpose of the changes or how
     
    25633005--------------------
    25643006
    2565    Here are some examples of change log entries:
    2566 
     3007   Here are some simple examples of change log entries, starting with
     3008the header line that says who made the change and when, followed by
     3009descriptions of specific changes.  (These examples are drawn from Emacs
     3010and GCC.)
     3011
     3012     1998-08-17  Richard Stallman  <rms@gnu.org>
     3013     
    25673014     * register.el (insert-register): Return nil.
    25683015     (jump-to-register): Likewise.
     
    25943041name and the asterisk when successive entries are in the same file.
    25953042
     3043   Break long lists of function names by closing continued lines with
     3044`)', rather than `,', and opening the continuation with `(' as in this
     3045example:
     3046
     3047     * keyboard.c (menu_bar_items, tool_bar_items)
     3048     (Fexecute_extended_command): Deal with `keymap' property.
     3049
    25963050
    25973051File: standards.info,  Node: Simple Changes,  Next: Conditional Changes,  Prev: Style of Change Logs,  Up: Change Logs
     
    26043058
    26053059   When you change the calling sequence of a function in a simple
    2606 fashion, and you change all the callers of the function, there is no
    2607 need to make individual entries for all the callers that you changed.
    2608 Just write in the entry for the function being called, "All callers
    2609 changed."
     3060fashion, and you change all the callers of the function to use the new
     3061calling sequence, there is no need to make individual entries for all
     3062the callers that you changed.  Just write in the entry for the function
     3063being called, "All callers changed"--like this:
    26103064
    26113065     * keyboard.c (Fcommand_execute): New arg SPECIAL.
     
    26243078
    26253079
    2626 File: standards.info,  Node: Conditional Changes,  Prev: Simple Changes,  Up: Change Logs
     3080File: standards.info,  Node: Conditional Changes,  Next: Indicating the Part Changed,  Prev: Simple Changes,  Up: Change Logs
    26273081
    26283082Conditional Changes
     
    26583112
    26593113     (gethostname) [!HAVE_SOCKETS]: Replace with winsock version.
     3114
     3115
     3116File: standards.info,  Node: Indicating the Part Changed,  Prev: Conditional Changes,  Up: Change Logs
     3117
     3118Indicating the Part Changed
     3119---------------------------
     3120
     3121   Indicate the part of a function which changed by using angle brackets
     3122enclosing an indication of what the changed part does.  Here is an entry
     3123for a change in the part of the function `sh-while-getopts' that deals
     3124with `sh' commands:
     3125
     3126     * progmodes/sh-script.el (sh-while-getopts) <sh>: Handle case that
     3127     user-specified option string is empty.
    26603128
    26613129
     
    27123180
    27133181
    2714 File: standards.info,  Node: Managing Releases,  Prev: Documentation,  Up: Top
     3182File: standards.info,  Node: Managing Releases,  Next: References,  Prev: Documentation,  Up: Top
    27153183
    27163184The Release Process
     
    27283196
    27293197* Configuration::               How Configuration Should Work
    2730 * Makefile Conventions::        Makefile Conventions
     3198* Makefile Conventions::        Makefile Conventions
    27313199* Releases::                    Making Releases
    27323200
     
    28343302     options are for.
    28353303
    2836 `--nfp'
    2837      The target machine has no floating point processor.
    2838 
    2839 `--gas'
    2840      The target machine assembler is GAS, the GNU assembler.  This is
    2841      obsolete; users should use `--with-gnu-as' instead.
    2842 
    2843 `--x'
    2844      The target machine has the X Window System installed.  This is
    2845      obsolete; users should use `--with-x' instead.
    2846 
    28473304   All `configure' scripts should accept all of these "detail" options,
    28483305whether or not they make any difference to the particular package at
     
    28583315
    28593316   Packages that perform part of the compilation process may support
    2860 cross-compilation.  In such a case, the host and target machines for
    2861 the program may be different.  The `configure' script should normally
    2862 treat the specified type of system as both the host and the target,
    2863 thus producing a program which works for the same type of machine that
    2864 it runs on.
    2865 
    2866    The way to build a cross-compiler, cross-assembler, or what have
    2867 you, is to specify the option `--host=HOSTTYPE' when running
    2868 `configure'.  This specifies the host system without changing the type
    2869 of target system.  The syntax for HOSTTYPE is the same as described
    2870 above.
     3317cross-compilation.  In such a case, the host and target machines for the
     3318program may be different.
     3319
     3320   The `configure' script should normally treat the specified type of
     3321system as both the host and the target, thus producing a program which
     3322works for the same type of machine that it runs on.
     3323
     3324   To configure a cross-compiler, cross-assembler, or what have you, you
     3325should specify a target different from the host, using the configure
     3326option `--target=TARGETTYPE'.  The syntax for TARGETTYPE is the same as
     3327for the host type.  So the command would look like this:
     3328
     3329     ./configure HOSTTYPE --target=TARGETTYPE
     3330
     3331   Programs for which cross-operation is not meaningful need not accept
     3332the `--target' option, because configuring an entire operating system
     3333for cross-operation is not a meaningful operation.
    28713334
    28723335   Bootstrapping a cross-compiler requires compiling it on a machine
    28733336other than the host it will run on.  Compilation packages accept a
    2874 configuration option `--build=HOSTTYPE' for specifying the
    2875 configuration on which you will compile them, in case that is different
    2876 from the host.
    2877 
    2878    Programs for which cross-operation is not meaningful need not accept
    2879 the `--host' option, because configuring an entire operating system for
    2880 cross-operation is not a meaningful thing.
     3337configuration option `--build=BUILDTYPE' for specifying the
     3338configuration on which you will compile them, but the configure script
     3339should normally guess the build machine type (using `config.guess'), so
     3340this option is probably not necessary.  The host and target types
     3341normally default from the build type, so in bootstrapping a
     3342cross-compiler you must specify them both explicitly.
    28813343
    28823344   Some programs have ways of configuring themselves automatically.  If
     
    28913353
    28923354   This node describes conventions for writing the Makefiles for GNU
    2893 programs.
     3355programs.  Using Automake will help you write a Makefile that follows
     3356these conventions.
    28943357
    28953358* Menu:
    28963359
    2897 * Makefile Basics::             General Conventions for Makefiles
    2898 * Utilities in Makefiles::      Utilities in Makefiles
    2899 * Command Variables::           Variables for Specifying Commands
    2900 * Directory Variables::         Variables for Installation Directories
    2901 * Standard Targets::            Standard Targets for Users
     3360* Makefile Basics::             General Conventions for Makefiles
     3361* Utilities in Makefiles::      Utilities in Makefiles
     3362* Command Variables::           Variables for Specifying Commands
     3363* Directory Variables::         Variables for Installation Directories
     3364* Standard Targets::            Standard Targets for Users
    29023365* Install Command Categories::  Three categories of commands in the `install'
    29033366                                  rule: normal, pre-install and post-install.
     
    29443407
    29453408will fail when the build directory is not the source directory, because
    2946 `foo.man' and `sedscript' are in the the source directory.
     3409`foo.man' and `sedscript' are in the source directory.
    29473410
    29483411   When using GNU `make', relying on `VPATH' to find the source file
     
    30953558
    30963559   Every Makefile should also define the variables `INSTALL_PROGRAM'
    3097 and `INSTALL_DATA'.  (The default for each of these should be
    3098 `$(INSTALL)'.)  Then it should use those variables as the commands for
    3099 actual installation, for executables and nonexecutables respectively.
    3100 Use these variables as follows:
     3560and `INSTALL_DATA'.  (The default for `INSTALL_PROGRAM' should be
     3561`$(INSTALL)'; the default for `INSTALL_DATA' should be `${INSTALL} -m
     3562644'.)  Then it should use those variables as the commands for actual
     3563installation, for executables and nonexecutables respectively.  Use
     3564these variables as follows:
    31013565
    31023566     $(INSTALL_PROGRAM) foo $(bindir)/foo
     
    31263590is easy to install in a nonstandard place.  The standard names for these
    31273591variables are described below.  They are based on a standard filesystem
    3128 layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
    3129 other modern operating systems.
     3592layout; variants of it are used in SVR4, 4.4BSD, GNU/Linux, Ultrix v4,
     3593and other modern operating systems.
    31303594
    31313595   These two variables set the root for the installation.  All the other
     
    31413605
    31423606     Running `make install' with a different value of `prefix' from the
    3143      one used to build the program should NOT recompile the program.
     3607     one used to build the program should _not_ recompile the program.
    31443608
    31453609`exec_prefix'
     
    31553619
    31563620     Running `make install' with a different value of `exec_prefix'
    3157      from the one used to build the program should NOT recompile the
     3621     from the one used to build the program should _not_ recompile the
    31583622     program.
    31593623
     
    34523916`install-strip'
    34533917     Like `install', but strip the executable files while installing
    3454      them.  In many cases, the definition of this target can be very
    3455      simple:
     3918     them.  In simple cases, this target can use the `install' target in
     3919     a simple way:
    34563920
    34573921          install-strip:
    34583922                  $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
    34593923                          install
     3924
     3925     But if the package installs scripts as well as real executables,
     3926     the `install-strip' target can't just refer to the `install'
     3927     target; it has to strip the executables but not the scripts.
     3928
     3929     `install-strip' should not strip the executables in the build
     3930     directory which are being copied for installation.  It should only
     3931     strip the copies that are installed.
    34603932
    34613933     Normally we do not recommend stripping an executable unless you
     
    35624034     in it, and then `tar' that subdirectory.
    35634035
    3564      Compress the tar file file with `gzip'.  For example, the actual
     4036     Compress the tar file with `gzip'.  For example, the actual
    35654037     distribution file for GCC version 1.40 is called `gcc-1.40.tar.gz'.
    35664038
     
    35974069                                          $(mandir)
    35984070
     4071     or, if you wish to support `DESTDIR',
     4072
     4073          # Make sure all installation directories (e.g. $(bindir))
     4074          # actually exist by making them if necessary.
     4075          installdirs: mkinstalldirs
     4076                  $(srcdir)/mkinstalldirs \
     4077                      $(DESTDIR)$(bindir) $(DESTDIR)$(datadir) \
     4078                      $(DESTDIR)$(libdir) $(DESTDIR)$(infodir) \
     4079                      $(DESTDIR)$(mandir)
     4080
    35994081     This rule should not modify the directories where compilation is
    36004082     done.  It should do nothing but create installation directories.
     
    37274209never changed automatically; non-source files are produced from source
    37284210files by programs under the control of the Makefile.
     4211
     4212   The distribution should contain a file named `README' which gives
     4213the name of the package, and a general description of what it does.  It
     4214is also good to explain the purpose of each of the first-level
     4215subdirectories in the package, if there are any.  The `README' file
     4216should either state the version number of the package, or refer to where
     4217in the package it can be found.
     4218
     4219   The `README' file should refer to the file `INSTALL', which should
     4220contain an explanation of the installation procedure.
     4221
     4222   The `README' file should also refer to the file which contains the
     4223copying conditions.  The GNU GPL, if used, should be in a file called
     4224`COPYING'.  If the GNU LGPL is used, it should be in a file called
     4225`COPYING.LIB'.
    37294226
    37304227   Naturally, all the source files must be in the distribution.  It is
     
    37784275know what other files to get.
    37794276
     4277
     4278File: standards.info,  Node: References,  Next: Copying This Manual,  Prev: Managing Releases,  Up: Top
     4279
     4280References to Non-Free Software and Documentation
     4281*************************************************
     4282
     4283   A GNU program should not recommend use of any non-free program.  We
     4284can't stop some people from writing proprietary programs, or stop other
     4285people from using them, but we can and should avoid helping to
     4286advertise them to new potential customers.  Proprietary software is a
     4287social and ethical problem, and the point of GNU is to solve that
     4288problem.
     4289
     4290   When a non-free program or system is well known, you can mention it
     4291in passing--that is harmless, since users who might want to use it
     4292probably already know about it.  For instance, it is fine to explain
     4293how to build your package on top of some non-free operating system, or
     4294how to use it together with some widely used non-free program.
     4295
     4296   However, you should give only the necessary information to help those
     4297who already use the non-free program to use your program with it--don't
     4298give, or refer to, any further information about the proprietary
     4299program, and don't imply that the proprietary program enhances your
     4300program, or that its existence is in any way a good thing.  The goal
     4301should be that people already using the proprietary program will get
     4302the advice they need about how to use your free program, while people
     4303who don't already use the proprietary program will not see anything to
     4304lead them to take an interest in it.
     4305
     4306   If a non-free program or system is obscure in your program's domain,
     4307your program should not mention or support it at all, since doing so
     4308would tend to popularize the non-free program more than it popularizes
     4309your program.  (You cannot hope to find many additional users among the
     4310users of Foobar if the users of Foobar are few.)
     4311
     4312   A GNU package should not refer the user to any non-free documentation
     4313for free software.  Free documentation that can be included in free
     4314operating systems is essential for completing the GNU system, so it is
     4315a major focus of the GNU Project; to recommend use of documentation
     4316that we are not allowed to use in GNU would undermine the efforts to
     4317get documentation that we can include.  So GNU packages should never
     4318recommend non-free documentation.
     4319
     4320
     4321File: standards.info,  Node: Copying This Manual,  Next: Index,  Prev: References,  Up: Top
     4322
     4323Copying This Manual
     4324*******************
     4325
     4326* Menu:
     4327
     4328* GNU Free Documentation License::  License for copying this manual
     4329
     4330
     4331File: standards.info,  Node: GNU Free Documentation License,  Up: Copying This Manual
     4332
     4333GNU Free Documentation License
     4334******************************
     4335
     4336                        Version 1.1, March 2000
     4337     Copyright (C) 2000  Free Software Foundation, Inc.
     4338     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     4339     
     4340     Everyone is permitted to copy and distribute verbatim copies
     4341     of this license document, but changing it is not allowed.
     4342
     4343
     4344  0. PREAMBLE
     4345
     4346     The purpose of this License is to make a manual, textbook, or other
     4347     written document "free" in the sense of freedom: to assure everyone
     4348     the effective freedom to copy and redistribute it, with or without
     4349     modifying it, either commercially or noncommercially.  Secondarily,
     4350     this License preserves for the author and publisher a way to get
     4351     credit for their work, while not being considered responsible for
     4352     modifications made by others.
     4353
     4354     This License is a kind of "copyleft", which means that derivative
     4355     works of the document must themselves be free in the same sense.
     4356     It complements the GNU General Public License, which is a copyleft
     4357     license designed for free software.
     4358
     4359     We have designed this License in order to use it for manuals for
     4360     free software, because free software needs free documentation: a
     4361     free program should come with manuals providing the same freedoms
     4362     that the software does.  But this License is not limited to
     4363     software manuals; it can be used for any textual work, regardless
     4364     of subject matter or whether it is published as a printed book.
     4365     We recommend this License principally for works whose purpose is
     4366     instruction or reference.
     4367
     4368
     4369  1. APPLICABILITY AND DEFINITIONS
     4370
     4371     This License applies to any manual or other work that contains a
     4372     notice placed by the copyright holder saying it can be distributed
     4373     under the terms of this License.  The "Document", below, refers to
     4374     any such manual or work.  Any member of the public is a licensee,
     4375     and is addressed as "you."
     4376
     4377     A "Modified Version" of the Document means any work containing the
     4378     Document or a portion of it, either copied verbatim, or with
     4379     modifications and/or translated into another language.
     4380
     4381     A "Secondary Section" is a named appendix or a front-matter
     4382     section of the Document that deals exclusively with the
     4383     relationship of the publishers or authors of the Document to the
     4384     Document's overall subject (or to related matters) and contains
     4385     nothing that could fall directly within that overall subject.
     4386     (For example, if the Document is in part a textbook of
     4387     mathematics, a Secondary Section may not explain any mathematics.)
     4388     The relationship could be a matter of historical connection with
     4389     the subject or with related matters, or of legal, commercial,
     4390     philosophical, ethical or political position regarding them.
     4391
     4392     The "Invariant Sections" are certain Secondary Sections whose
     4393     titles are designated, as being those of Invariant Sections, in
     4394     the notice that says that the Document is released under this
     4395     License.
     4396
     4397     The "Cover Texts" are certain short passages of text that are
     4398     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
     4399     that says that the Document is released under this License.
     4400
     4401     A "Transparent" copy of the Document means a machine-readable copy,
     4402     represented in a format whose specification is available to the
     4403     general public, whose contents can be viewed and edited directly
     4404     and straightforwardly with generic text editors or (for images
     4405     composed of pixels) generic paint programs or (for drawings) some
     4406     widely available drawing editor, and that is suitable for input to
     4407     text formatters or for automatic translation to a variety of
     4408     formats suitable for input to text formatters.  A copy made in an
     4409     otherwise Transparent file format whose markup has been designed
     4410     to thwart or discourage subsequent modification by readers is not
     4411     Transparent.  A copy that is not "Transparent" is called "Opaque."
     4412
     4413     Examples of suitable formats for Transparent copies include plain
     4414     ASCII without markup, Texinfo input format, LaTeX input format,
     4415     SGML or XML using a publicly available DTD, and
     4416     standard-conforming simple HTML designed for human modification.
     4417     Opaque formats include PostScript, PDF, proprietary formats that
     4418     can be read and edited only by proprietary word processors, SGML
     4419     or XML for which the DTD and/or processing tools are not generally
     4420     available, and the machine-generated HTML produced by some word
     4421     processors for output purposes only.
     4422
     4423     The "Title Page" means, for a printed book, the title page itself,
     4424     plus such following pages as are needed to hold, legibly, the
     4425     material this License requires to appear in the title page.  For
     4426     works in formats which do not have any title page as such, "Title
     4427     Page" means the text near the most prominent appearance of the
     4428     work's title, preceding the beginning of the body of the text.
     4429
     4430  2. VERBATIM COPYING
     4431
     4432     You may copy and distribute the Document in any medium, either
     4433     commercially or noncommercially, provided that this License, the
     4434     copyright notices, and the license notice saying this License
     4435     applies to the Document are reproduced in all copies, and that you
     4436     add no other conditions whatsoever to those of this License.  You
     4437     may not use technical measures to obstruct or control the reading
     4438     or further copying of the copies you make or distribute.  However,
     4439     you may accept compensation in exchange for copies.  If you
     4440     distribute a large enough number of copies you must also follow
     4441     the conditions in section 3.
     4442
     4443     You may also lend copies, under the same conditions stated above,
     4444     and you may publicly display copies.
     4445
     4446  3. COPYING IN QUANTITY
     4447
     4448     If you publish printed copies of the Document numbering more than
     4449     100, and the Document's license notice requires Cover Texts, you
     4450     must enclose the copies in covers that carry, clearly and legibly,
     4451     all these Cover Texts: Front-Cover Texts on the front cover, and
     4452     Back-Cover Texts on the back cover.  Both covers must also clearly
     4453     and legibly identify you as the publisher of these copies.  The
     4454     front cover must present the full title with all words of the
     4455     title equally prominent and visible.  You may add other material
     4456     on the covers in addition.  Copying with changes limited to the
     4457     covers, as long as they preserve the title of the Document and
     4458     satisfy these conditions, can be treated as verbatim copying in
     4459     other respects.
     4460
     4461     If the required texts for either cover are too voluminous to fit
     4462     legibly, you should put the first ones listed (as many as fit
     4463     reasonably) on the actual cover, and continue the rest onto
     4464     adjacent pages.
     4465
     4466     If you publish or distribute Opaque copies of the Document
     4467     numbering more than 100, you must either include a
     4468     machine-readable Transparent copy along with each Opaque copy, or
     4469     state in or with each Opaque copy a publicly-accessible
     4470     computer-network location containing a complete Transparent copy
     4471     of the Document, free of added material, which the general
     4472     network-using public has access to download anonymously at no
     4473     charge using public-standard network protocols.  If you use the
     4474     latter option, you must take reasonably prudent steps, when you
     4475     begin distribution of Opaque copies in quantity, to ensure that
     4476     this Transparent copy will remain thus accessible at the stated
     4477     location until at least one year after the last time you
     4478     distribute an Opaque copy (directly or through your agents or
     4479     retailers) of that edition to the public.
     4480
     4481     It is requested, but not required, that you contact the authors of
     4482     the Document well before redistributing any large number of
     4483     copies, to give them a chance to provide you with an updated
     4484     version of the Document.
     4485
     4486  4. MODIFICATIONS
     4487
     4488     You may copy and distribute a Modified Version of the Document
     4489     under the conditions of sections 2 and 3 above, provided that you
     4490     release the Modified Version under precisely this License, with
     4491     the Modified Version filling the role of the Document, thus
     4492     licensing distribution and modification of the Modified Version to
     4493     whoever possesses a copy of it.  In addition, you must do these
     4494     things in the Modified Version:
     4495
     4496     A. Use in the Title Page (and on the covers, if any) a title
     4497     distinct    from that of the Document, and from those of previous
     4498     versions    (which should, if there were any, be listed in the
     4499     History section    of the Document).  You may use the same title
     4500     as a previous version    if the original publisher of that version
     4501     gives permission.
     4502     B. List on the Title Page, as authors, one or more persons or
     4503     entities    responsible for authorship of the modifications in the
     4504     Modified    Version, together with at least five of the principal
     4505     authors of the    Document (all of its principal authors, if it
     4506     has less than five).
     4507     C. State on the Title page the name of the publisher of the
     4508     Modified Version, as the publisher.
     4509     D. Preserve all the copyright notices of the Document.
     4510     E. Add an appropriate copyright notice for your modifications
     4511     adjacent to the other copyright notices.
     4512     F. Include, immediately after the copyright notices, a license
     4513     notice    giving the public permission to use the Modified Version
     4514     under the    terms of this License, in the form shown in the
     4515     Addendum below.
     4516     G. Preserve in that license notice the full lists of Invariant
     4517     Sections    and required Cover Texts given in the Document's
     4518     license notice.
     4519     H. Include an unaltered copy of this License.
     4520     I. Preserve the section entitled "History", and its title, and add
     4521     to    it an item stating at least the title, year, new authors, and
     4522       publisher of the Modified Version as given on the Title Page.
     4523     If    there is no section entitled "History" in the Document,
     4524     create one    stating the title, year, authors, and publisher of
     4525     the Document as    given on its Title Page, then add an item
     4526     describing the Modified    Version as stated in the previous
     4527     sentence.
     4528     J. Preserve the network location, if any, given in the Document for
     4529       public access to a Transparent copy of the Document, and
     4530     likewise    the network locations given in the Document for
     4531     previous versions    it was based on.  These may be placed in the
     4532     "History" section.     You may omit a network location for a work
     4533     that was published at    least four years before the Document
     4534     itself, or if the original    publisher of the version it refers
     4535     to gives permission.
     4536     K. In any section entitled "Acknowledgements" or "Dedications",
     4537     preserve the section's title, and preserve in the section all the
     4538      substance and tone of each of the contributor acknowledgements
     4539     and/or dedications given therein.
     4540     L. Preserve all the Invariant Sections of the Document,
     4541     unaltered in their text and in their titles.  Section numbers
     4542     or the equivalent are not considered part of the section titles.
     4543     M. Delete any section entitled "Endorsements."  Such a section
     4544     may not be included in the Modified Version.
     4545     N. Do not retitle any existing section as "Endorsements"    or to
     4546     conflict in title with any Invariant Section.
     4547
     4548     If the Modified Version includes new front-matter sections or
     4549     appendices that qualify as Secondary Sections and contain no
     4550     material copied from the Document, you may at your option
     4551     designate some or all of these sections as invariant.  To do this,
     4552     add their titles to the list of Invariant Sections in the Modified
     4553     Version's license notice.  These titles must be distinct from any
     4554     other section titles.
     4555
     4556     You may add a section entitled "Endorsements", provided it contains
     4557     nothing but endorsements of your Modified Version by various
     4558     parties-for example, statements of peer review or that the text has
     4559     been approved by an organization as the authoritative definition
     4560     of a standard.
     4561
     4562     You may add a passage of up to five words as a Front-Cover Text,
     4563     and a passage of up to 25 words as a Back-Cover Text, to the end
     4564     of the list of Cover Texts in the Modified Version.  Only one
     4565     passage of Front-Cover Text and one of Back-Cover Text may be
     4566     added by (or through arrangements made by) any one entity.  If the
     4567     Document already includes a cover text for the same cover,
     4568     previously added by you or by arrangement made by the same entity
     4569     you are acting on behalf of, you may not add another; but you may
     4570     replace the old one, on explicit permission from the previous
     4571     publisher that added the old one.
     4572
     4573     The author(s) and publisher(s) of the Document do not by this
     4574     License give permission to use their names for publicity for or to
     4575     assert or imply endorsement of any Modified Version.
     4576
     4577  5. COMBINING DOCUMENTS
     4578
     4579     You may combine the Document with other documents released under
     4580     this License, under the terms defined in section 4 above for
     4581     modified versions, provided that you include in the combination
     4582     all of the Invariant Sections of all of the original documents,
     4583     unmodified, and list them all as Invariant Sections of your
     4584     combined work in its license notice.
     4585
     4586     The combined work need only contain one copy of this License, and
     4587     multiple identical Invariant Sections may be replaced with a single
     4588     copy.  If there are multiple Invariant Sections with the same name
     4589     but different contents, make the title of each such section unique
     4590     by adding at the end of it, in parentheses, the name of the
     4591     original author or publisher of that section if known, or else a
     4592     unique number.  Make the same adjustment to the section titles in
     4593     the list of Invariant Sections in the license notice of the
     4594     combined work.
     4595
     4596     In the combination, you must combine any sections entitled
     4597     "History" in the various original documents, forming one section
     4598     entitled "History"; likewise combine any sections entitled
     4599     "Acknowledgements", and any sections entitled "Dedications."  You
     4600     must delete all sections entitled "Endorsements."
     4601
     4602  6. COLLECTIONS OF DOCUMENTS
     4603
     4604     You may make a collection consisting of the Document and other
     4605     documents released under this License, and replace the individual
     4606     copies of this License in the various documents with a single copy
     4607     that is included in the collection, provided that you follow the
     4608     rules of this License for verbatim copying of each of the
     4609     documents in all other respects.
     4610
     4611     You may extract a single document from such a collection, and
     4612     distribute it individually under this License, provided you insert
     4613     a copy of this License into the extracted document, and follow
     4614     this License in all other respects regarding verbatim copying of
     4615     that document.
     4616
     4617  7. AGGREGATION WITH INDEPENDENT WORKS
     4618
     4619     A compilation of the Document or its derivatives with other
     4620     separate and independent documents or works, in or on a volume of
     4621     a storage or distribution medium, does not as a whole count as a
     4622     Modified Version of the Document, provided no compilation
     4623     copyright is claimed for the compilation.  Such a compilation is
     4624     called an "aggregate", and this License does not apply to the
     4625     other self-contained works thus compiled with the Document, on
     4626     account of their being thus compiled, if they are not themselves
     4627     derivative works of the Document.
     4628
     4629     If the Cover Text requirement of section 3 is applicable to these
     4630     copies of the Document, then if the Document is less than one
     4631     quarter of the entire aggregate, the Document's Cover Texts may be
     4632     placed on covers that surround only the Document within the
     4633     aggregate.  Otherwise they must appear on covers around the whole
     4634     aggregate.
     4635
     4636  8. TRANSLATION
     4637
     4638     Translation is considered a kind of modification, so you may
     4639     distribute translations of the Document under the terms of section
     4640     4.  Replacing Invariant Sections with translations requires special
     4641     permission from their copyright holders, but you may include
     4642     translations of some or all Invariant Sections in addition to the
     4643     original versions of these Invariant Sections.  You may include a
     4644     translation of this License provided that you also include the
     4645     original English version of this License.  In case of a
     4646     disagreement between the translation and the original English
     4647     version of this License, the original English version will prevail.
     4648
     4649  9. TERMINATION
     4650
     4651     You may not copy, modify, sublicense, or distribute the Document
     4652     except as expressly provided for under this License.  Any other
     4653     attempt to copy, modify, sublicense or distribute the Document is
     4654     void, and will automatically terminate your rights under this
     4655     License.  However, parties who have received copies, or rights,
     4656     from you under this License will not have their licenses
     4657     terminated so long as such parties remain in full compliance.
     4658
     4659 10. FUTURE REVISIONS OF THIS LICENSE
     4660
     4661     The Free Software Foundation may publish new, revised versions of
     4662     the GNU Free Documentation License from time to time.  Such new
     4663     versions will be similar in spirit to the present version, but may
     4664     differ in detail to address new problems or concerns.  See
     4665     http://www.gnu.org/copyleft/.
     4666
     4667     Each version of the License is given a distinguishing version
     4668     number.  If the Document specifies that a particular numbered
     4669     version of this License "or any later version" applies to it, you
     4670     have the option of following the terms and conditions either of
     4671     that specified version or of any later version that has been
     4672     published (not as a draft) by the Free Software Foundation.  If
     4673     the Document does not specify a version number of this License,
     4674     you may choose any version ever published (not as a draft) by the
     4675     Free Software Foundation.
     4676
     4677
     4678ADDENDUM: How to use this License for your documents
     4679====================================================
     4680
     4681   To use this License in a document you have written, include a copy of
     4682the License in the document and put the following copyright and license
     4683notices just after the title page:
     4684
     4685     Copyright (C)  YEAR  YOUR NAME.
     4686     Permission is granted to copy, distribute and/or modify this document
     4687     under the terms of the GNU Free Documentation License, Version 1.1
     4688     or any later version published by the Free Software Foundation;
     4689     with the Invariant Sections being LIST THEIR TITLES, with the
     4690     Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
     4691     A copy of the license is included in the section entitled "GNU
     4692     Free Documentation License."
     4693
     4694   If you have no Invariant Sections, write "with no Invariant Sections"
     4695instead of saying which ones are invariant.  If you have no Front-Cover
     4696Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
     4697LIST"; likewise for Back-Cover Texts.
     4698
     4699   If your document contains nontrivial examples of program code, we
     4700recommend releasing these examples in parallel under your choice of
     4701free software license, such as the GNU General Public License, to
     4702permit their use in free software.
     4703
     4704
     4705File: standards.info,  Node: Index,  Prev: Copying This Manual,  Up: Top
     4706
     4707Index
     4708*****
     4709
     4710* Menu:
     4711
     4712* #endif, commenting:                    Comments.
     4713* --help option:                         Command-Line Interfaces.
     4714* --version option:                      Command-Line Interfaces.
     4715* -Wall compiler option:                 Syntactic Conventions.
     4716* accepting contributions:               Contributions.
     4717* address for bug reports:               Command-Line Interfaces.
     4718* ANSI C standard:                       Standard C.
     4719* arbitrary limits on data:              Semantics.
     4720* autoconf:                              System Portability.
     4721* avoiding proprietary code:             Reading Non-Free Code.
     4722* behavior, dependent on program's name: User Interfaces.
     4723* binary packages:                       Install Command Categories.
     4724* bindir:                                Directory Variables.
     4725* braces, in C source:                   Formatting.
     4726* bug reports:                           Command-Line Interfaces.
     4727* canonical name of a program:           Command-Line Interfaces.
     4728* casting pointers to integers:          CPU Portability.
     4729* change logs:                           Change Logs.
     4730* change logs, conditional changes:      Conditional Changes.
     4731* change logs, style:                    Style of Change Logs.
     4732* command-line arguments, decoding:      Semantics.
     4733* command-line interface:                Command-Line Interfaces.
     4734* commenting:                            Comments.
     4735* compatibility with C and POSIX standards: Compatibility.
     4736* compiler warnings:                     Syntactic Conventions.
     4737* conditional changes, and change logs:  Conditional Changes.
     4738* conditionals, comments for:            Comments.
     4739* configure:                             Configuration.
     4740* control-L:                             Formatting.
     4741* conventions for makefiles:             Makefile Conventions.
     4742* corba:                                 Graphical Interfaces.
     4743* credits for manuals:                   Manual Credits.
     4744* data types, and portability:           CPU Portability.
     4745* declaration for system functions:      System Functions.
     4746* documentation:                         Documentation.
     4747* doschk:                                Names.
     4748* downloading this manual:               Preface.
     4749* error messages:                        Semantics.
     4750* error messages, formatting:            Errors.
     4751* exec_prefix:                           Directory Variables.
     4752* expressions, splitting:                Formatting.
     4753* file usage:                            File Usage.
     4754* file-name limitations:                 Names.
     4755* formatting error messages:             Errors.
     4756* formatting source code:                Formatting.
     4757* formfeed:                              Formatting.
     4758* function argument, declaring:          Syntactic Conventions.
     4759* function prototypes:                   Standard C.
     4760* getopt:                                Command-Line Interfaces.
     4761* gettext:                               Internationalization.
     4762* gnome:                                 Graphical Interfaces.
     4763* graphical user interface:              Graphical Interfaces.
     4764* gtk:                                   Graphical Interfaces.
     4765* GUILE:                                 Source Language.
     4766* implicit int:                          Syntactic Conventions.
     4767* impossible conditions:                 Semantics.
     4768* internationalization:                  Internationalization.
     4769* legal aspects:                         Legal Issues.
     4770* legal papers:                          Contributions.
     4771* libexecdir:                            Directory Variables.
     4772* libraries:                             Libraries.
     4773* library functions, and portability:    System Functions.
     4774* license for manuals:                   License for Manuals.
     4775* lint:                                  Syntactic Conventions.
     4776* long option names:                     Option Table.
     4777* long-named options:                    Command-Line Interfaces.
     4778* makefile, conventions for:             Makefile Conventions.
     4779* malloc return value:                   Semantics.
     4780* man pages:                             Man Pages.
     4781* manual structure:                      Manual Structure Details.
     4782* memory allocation failure:             Semantics.
     4783* memory usage:                          Memory Usage.
     4784* message text, and internationalization: Internationalization.
     4785* mmap:                                  Mmap.
     4786* multiple variables in a line:          Syntactic Conventions.
     4787* names of variables, functions, and files: Names.
     4788* NEWS file:                             NEWS File.
     4789* non-POSIX systems, and portability:    System Portability.
     4790* non-standard extensions:               Using Extensions.
     4791* NUL characters:                        Semantics.
     4792* open brace:                            Formatting.
     4793* optional features, configure-time:     Configuration.
     4794* options for compatibility:             Compatibility.
     4795* output device and program's behavior:  User Interfaces.
     4796* packaging:                             Releases.
     4797* portability, and data types:           CPU Portability.
     4798* portability, and library functions:    System Functions.
     4799* portability, between system types:     System Portability.
     4800* POSIX compatibility:                   Compatibility.
     4801* POSIXLY_CORRECT, environment variable: Compatibility.
     4802* post-installation commands:            Install Command Categories.
     4803* pre-installation commands:             Install Command Categories.
     4804* prefix:                                Directory Variables.
     4805* program configuration:                 Configuration.
     4806* program design:                        Design Advice.
     4807* program name and its behavior:         User Interfaces.
     4808* program's canonical name:              Command-Line Interfaces.
     4809* programming languges:                  Source Language.
     4810* proprietary programs:                  Reading Non-Free Code.
     4811* README file:                           Releases.
     4812* references to non-free material:       References.
     4813* releasing:                             Managing Releases.
     4814* sbindir:                               Directory Variables.
     4815* signal handling:                       Semantics.
     4816* spaces before open-paren:              Formatting.
     4817* standard command-line options:         Command-Line Interfaces.
     4818* standards for makefiles:               Makefile Conventions.
     4819* string library functions:              System Functions.
     4820* syntactic conventions:                 Syntactic Conventions.
     4821* table of long options:                 Option Table.
     4822* temporary files:                       Semantics.
     4823* temporary variables:                   Syntactic Conventions.
     4824* texinfo.tex, in a distribution:        Releases.
     4825* TMPDIR environment variable:           Semantics.
     4826* trademarks:                            Trademarks.
     4827* where to obtain standards.texi:        Preface.
     4828
    37804829
    37814830
    37824831Tag Table:
    3783 Node: Top962
    3784 Node: Preface1505
    3785 Node: Intellectual Property2532
    3786 Node: Reading Non-Free Code2907
    3787 Node: Contributions4639
    3788 Node: Design Advice6633
    3789 Node: Compatibility7150
    3790 Node: Using Extensions8661
    3791 Node: ANSI C10163
    3792 Node: Source Language11399
    3793 Node: Program Behavior12892
    3794 Node: Semantics13601
    3795 Node: Libraries17355
    3796 Node: Errors18590
    3797 Node: User Interfaces19813
    3798 Node: Option Table26559
    3799 Node: Memory Usage40648
    3800 Node: Writing C41642
    3801 Node: Formatting42483
    3802 Node: Comments45755
    3803 Node: Syntactic Conventions49053
    3804 Node: Names51991
    3805 Node: System Portability53727
    3806 Node: CPU Portability55503
    3807 Node: System Functions57664
    3808 Node: Internationalization62768
    3809 Node: Mmap65916
    3810 Node: Documentation66621
    3811 Node: GNU Manuals67179
    3812 Node: Manual Structure Details71066
    3813 Node: NEWS File72396
    3814 Node: Change Logs73077
    3815 Node: Change Log Concepts73794
    3816 Node: Style of Change Logs75562
    3817 Node: Simple Changes77116
    3818 Node: Conditional Changes78307
    3819 Node: Man Pages79684
    3820 Node: Reading other Manuals81303
    3821 Node: Managing Releases82087
    3822 Node: Configuration82823
    3823 Node: Makefile Conventions89763
    3824 Node: Makefile Basics90443
    3825 Node: Utilities in Makefiles93612
    3826 Node: Command Variables95748
    3827 Node: Directory Variables99249
    3828 Node: Standard Targets110126
    3829 Ref: Standard Targets-Footnote-1120565
    3830 Node: Install Command Categories120665
    3831 Node: Releases125238
     4832Node: Top689
     4833Node: Preface1392
     4834Node: Legal Issues3611
     4835Node: Reading Non-Free Code4074
     4836Node: Contributions5797
     4837Node: Trademarks7946
     4838Node: Design Advice9004
     4839Node: Source Language9587
     4840Node: Compatibility11594
     4841Node: Using Extensions13217
     4842Node: Standard C14788
     4843Node: Conditional Compilation17186
     4844Node: Program Behavior18480
     4845Node: Semantics19398
     4846Node: Libraries24086
     4847Node: Errors25326
     4848Node: User Interfaces27102
     4849Node: Graphical Interfaces28702
     4850Node: Command-Line Interfaces29732
     4851Node: Option Table35798
     4852Node: Memory Usage50802
     4853Node: File Usage51822
     4854Node: Writing C52565
     4855Node: Formatting53414
     4856Node: Comments57472
     4857Node: Syntactic Conventions60770
     4858Node: Names64177
     4859Node: System Portability66381
     4860Node: CPU Portability68761
     4861Node: System Functions72012
     4862Node: Internationalization77214
     4863Node: Mmap80362
     4864Node: Documentation81067
     4865Node: GNU Manuals82171
     4866Node: Doc Strings and Manuals87223
     4867Node: Manual Structure Details88771
     4868Node: License for Manuals90184
     4869Node: Manual Credits91153
     4870Node: Printed Manuals91541
     4871Node: NEWS File92222
     4872Node: Change Logs92894
     4873Node: Change Log Concepts93643
     4874Node: Style of Change Logs95498
     4875Node: Simple Changes97544
     4876Node: Conditional Changes98779
     4877Node: Indicating the Part Changed100192
     4878Node: Man Pages100710
     4879Node: Reading other Manuals102329
     4880Node: Managing Releases103113
     4881Node: Configuration103875
     4882Node: Makefile Conventions110775
     4883Node: Makefile Basics111576
     4884Node: Utilities in Makefiles114741
     4885Node: Command Variables116877
     4886Node: Directory Variables120445
     4887Node: Standard Targets131330
     4888Ref: Standard Targets-Footnote-1142581
     4889Node: Install Command Categories142681
     4890Node: Releases147254
     4891Node: References151337
     4892Node: Copying This Manual153621
     4893Node: GNU Free Documentation License153835
     4894Node: Index173521
    38324895
    38334896End Tag Table
Note: See TracChangeset for help on using the changeset viewer.