Changeset 609 for branches/GNU/src/binutils/etc/standards.info
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/etc/standards.info
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 This is standards.info, produced by makeinfo version 4. 0from1 This is standards.info, produced by makeinfo version 4.3 from 2 2 ./standards.texi. 3 3 … … 7 7 8 8 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. 9 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 10 11 Permission is granted to copy, distribute and/or modify this document 12 under the terms of the GNU Free Documentation License, Version 1.1 or 13 any later version published by the Free Software Foundation; with no 14 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover 15 Texts. A copy of the license is included in the section entitled "GNU 16 Free Documentation License". 24 17 25 18 … … 29 22 ******* 30 23 31 Last updated March 13, 1998.24 Last updated February 14, 2002. 32 25 33 26 * Menu: 34 27 35 28 * Preface:: About the GNU Coding Standards 36 * Intellectual Property::Keeping Free Software Free29 * Legal Issues:: Keeping Free Software Free 37 30 * Design Advice:: General Program Design 38 31 * Program Behavior:: Program Behavior for All Programs … … 40 33 * Documentation:: Documenting Programs 41 34 * 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 40 File: standards.info, Node: Preface, Next: Legal Issues, Prev: Top, Up: Top 45 41 46 42 About the GNU Coding Standards … … 55 51 state reasons for writing in a certain way. 56 52 53 This release of the GNU Coding Standards was last updated February 54 14, 2002. 55 56 If you did not obtain this file directly from the GNU project and 57 recently, please check for a newer version. You can ftp the GNU Coding 58 Standards from any GNU FTP host in the directory `/pub/gnu/standards/'. 59 The GNU Coding Standards are available there in several different 60 formats: `standards.text', `standards.info', and `standards.dvi', as 61 well as the Texinfo "source" which is divided in two files: 62 `standards.texi' and `make-stds.texi'. The GNU Coding Standards are 63 also available on the GNU World Wide Web server: 64 `http://www.gnu.org/prep/standards_toc.html'. 65 57 66 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 68 suggested new wording for it; our time is limited. We prefer a context 69 diff to the `standards.texi' or `make-stds.texi' files, but if you 70 don't have those files, please mail your suggestion anyway. 71 72 These standards cover the minimum of what is important when writing a 73 GNU package. Likely, the needs for additional standards will come up. 74 Sometimes, you might suggest that such standards be added to this 75 document. If you think your standards would be generally useful, please 76 do suggest them. 77 78 You should also set standards for your package on many questions not 79 addressed or not firmly specified here. The most important point is to 80 be self-consistent--try to stick to the conventions you pick, and try 81 to document them as much as possible. That way, your program will be 82 more maintainable by others. 83 84 85 File: standards.info, Node: Legal Issues, Next: Design Advice, Prev: Preface, Up: Top 68 86 69 87 Keeping Free Software Free 70 88 ************************** 71 89 72 This node discusses how you can make sure that GNU software remains73 unencumbered.90 This node discusses how you can make sure that GNU software avoids 91 legal difficulties, and other related issues. 74 92 75 93 * Menu: … … 77 95 * Reading Non-Free Code:: Referring to Proprietary Programs 78 96 * 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 100 File: standards.info, Node: Reading Non-Free Code, Next: Contributions, Up: Legal Issues 82 101 83 102 Referring to Proprietary Programs … … 116 135 117 136 118 File: standards.info, Node: Contributions, Prev: Reading Non-Free Code, Up: Intellectual Property137 File: standards.info, Node: Contributions, Next: Trademarks, Prev: Reading Non-Free Code, Up: Legal Issues 119 138 120 139 Accepting Contributions 121 140 ======================= 122 141 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 143 Foundation, then when someone else sends you a piece of code to add to 144 the program, we need legal papers to use it--just as we asked you to 145 sign papers initially. _Each_ person who makes a nontrivial 146 contribution to a program must sign some sort of legal papers in order 147 for us to have clear title to the program; the main author alone is not 148 enough. 128 149 129 150 So, before adding in any contributions from other people, please tell … … 140 161 text, so we need legal papers for all kinds. 141 162 163 We know it is frustrating to ask for legal papers; it's frustrating 164 for us as well. But if you don't wait, you are going out on a limb--for 165 example, what if the contributor's employer won't sign a disclaimer? 166 You might have to take that code out again! 167 142 168 You don't need papers for changes of a few lines here or there, since 143 169 they are not significant for copyright purposes. Also, you don't need 144 170 papers 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! 171 which you use. For example, if someone send you one implementation, but 172 you write a different implementation of the same idea, you don't need to 173 get papers. 152 174 153 175 The very worst thing is if you forget to tell us about the other … … 160 182 161 183 162 File: standards.info, Node: Design Advice, Next: Program Behavior, Prev: Intellectual Property, Up: Top 184 File: standards.info, Node: Trademarks, Prev: Contributions, Up: Legal Issues 185 186 Trademarks 187 ========== 188 189 Please do not include any trademark acknowledgements in GNU software 190 packages or documentation. 191 192 Trademark acknowledgements are the statements that such-and-such is a 193 trademark of so-and-so. The GNU Project has no objection to the basic 194 idea of trademarks, but these acknowledgements feel like kowtowing, so 195 we 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 198 avoid using them in ways which a reader might read as naming or labeling 199 our 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 202 compiler". The latter is meant to be short for the former, but it does 203 not explicitly state the relationship, so it could be misinterpreted as 204 using "Objective C" as a label for the compiler rather than for the 205 language. 206 207 208 File: standards.info, Node: Design Advice, Next: Program Behavior, Prev: Legal Issues, Up: Top 163 209 164 210 General Program Design … … 170 216 * Menu: 171 217 218 * Source Language:: Which languges to use. 172 219 * Compatibility:: Compatibility with other implementations 173 220 * 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 225 File: standards.info, Node: Source Language, Next: Compatibility, Up: Design Advice 226 227 Which Languages to Use 228 ====================== 229 230 When you want to use a language that gets compiled and runs at high 231 speed, the best language to use is C. Using another language is like 232 using a non-standard feature: it will cause trouble for users. Even if 233 GCC supports the other language, users may find it inconvenient to have 234 to install the compiler for that other language in order to build your 235 program. For example, if you write your program in C++, people will 236 have 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 239 people know C, so more people will find it easy to read and modify the 240 program if it is written in C. 241 242 So in general it is much better to use C, rather than the comparable 243 alternatives. 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 258 interpreter for a language that is higher level than C. Often much of 259 the program is written in that language, too. The Emacs editor 260 pioneered this technique. 261 262 The standard extensibility interpreter for GNU software is GUILE, 263 which implements the language Scheme (an especially clean and simple 264 dialect of Lisp). `http://www.gnu.org/software/guile/'. We don't 265 reject programs written in other "scripting languages" such as Perl and 266 Python, but using GUILE is very important for the overall consistency of 267 the GNU system. 268 269 270 File: standards.info, Node: Compatibility, Next: Using Extensions, Prev: Source Language, Up: Design Advice 179 271 180 272 Compatibility with Other Implementations … … 183 275 With occasional exceptions, utility programs and libraries for GNU 184 276 should be upward compatible with those in Berkeley Unix, and upward 185 compatible with ANSI C if ANSI C specifies their behavior, and upward186 compatible with POSIX if POSIX specifies their behavior.277 compatible with Standard C if Standard C specifies their behavior, and 278 upward compatible with POSIX if POSIX specifies their behavior. 187 279 188 280 When these standards conflict, it is useful to offer compatibility 189 281 modes for each of them. 190 282 191 ANSI C and POSIX prohibit many kinds of extensions. Feel free to192 make the extensions anyway, and include a `--ansi', `--posix', or283 Standard C and POSIX prohibit many kinds of extensions. Feel free 284 to make the extensions anyway, and include a `--ansi', `--posix', or 193 285 `--compatible' option to turn them off. However, if the extension has 194 286 a significant chance of breaking any real programs or scripts, then it 195 is not really upward compatible. Try to redesign its interface. 287 is not really upward compatible. So you should try to redesign its 288 interface to make it upward compatible. 196 289 197 290 Many GNU programs suppress extensions that conflict with POSIX if the … … 206 299 feature as well. (There is a free `vi' clone, so we offer it.) 207 300 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 302 is any precedent for them. 303 304 305 File: standards.info, Node: Using Extensions, Next: Standard C, Prev: Compatibility, Up: Design Advice 212 306 213 307 Using Non-standard Features … … 233 327 234 328 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. 329 as Emacs) which run on a great variety of systems. Using GNU 330 extensions in such programs would make many users unhappy, so we don't 331 do that. 237 332 238 333 Another exception is for programs that are used as part of … … 240 335 order to bootstrap the GNU compilation facilities. If these require 241 336 the 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, 337 installed already. That would be extremely troublesome in certain 338 cases. 339 340 341 File: standards.info, Node: Standard C, Next: Conditional Compilation, Prev: Using Extensions, Up: Design Advice 342 343 Standard C and Pre-Standard C 344 ============================= 345 346 1989 Standard C is widespread enough now that it is ok to use its 347 features 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 351 features 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 354 programs, so if you know how to do that, feel free. If a program you 355 are maintaining has such support, you should try to keep it working. 356 357 To support pre-standard C, instead of writing function definitions in 358 standard prototype form, 260 359 261 360 int … … 263 362 ... 264 363 265 write the definition in pre- ANSIstyle like this,364 write the definition in pre-standard style like this, 266 365 267 366 int … … 275 374 276 375 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. 376 benefit of prototypes in all the files where the function is called. 377 And once you have the declaration, you normally lose nothing by writing 378 the function definition in the pre-standard style. 379 380 This technique does not work for integer types narrower than `int'. 381 If you think of an argument as being of a type narrower than `int', 382 declare it as `int' instead. 383 384 There are a few special cases where this technique is hard to use. 385 For 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 387 some machines; but you cannot use `int' instead, because `dev_t' is 388 wider than `int' on some machines. There is no type you can safely use 389 on all machines in a non-standard definition. The only way to support 390 non-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 392 may not be worth the trouble. 393 394 In order to support pre-standard compilers that do not recognize 395 prototypes, 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 405 File: standards.info, Node: Conditional Compilation, Prev: Standard C, Up: Design Advice 406 407 Conditional Compilation 408 ======================= 409 410 When supporting configuration options already known when building 411 your program we prefer using `if (... )' over conditional compilation, 412 as in the former case the compiler is able to perform more extensive 413 checking 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 431 both cases, and we have been using similar techniques with good success 432 in several projects. 433 434 While this is not a silver bullet solving all portability problems, 435 following this policy would have saved the GCC project alone many person 436 hours if not days per year. 437 438 In the case of function-like macros like `REVERSIBLE_CC_MODE' in GCC 439 which cannot be simply used in `if( ...)' statements, there is an easy 440 workaround. Simply introduce another macro `HAS_REVERSIBLE_CC_MODE' as 441 in 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 321 448 322 449 … … 326 453 ********************************* 327 454 328 This node describes how to write robust software. It also describes329 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 456 also describes general standards for error messages, the command line 457 interface, and how libraries should behave. 331 458 332 459 * Menu: … … 335 462 * Libraries:: Library behavior 336 463 * 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 339 468 * Memory Usage:: When and how to care about memory needs 469 * File Usage:: Which files to use, and where 340 470 341 471 … … 354 484 nonprinting characters _including those with codes above 0177_. The 355 485 only sensible exceptions would be utilities specifically intended for 356 interface to certain types of printers that can't handle those 357 characters. 486 interface to certain types of terminals or printers that can't handle 487 those characters. Whenever possible, try to make programs work 488 properly with sequences of bytes that represent multibyte characters, 489 using encodings such as UTF-8 and others. 358 490 359 491 Check every system call for an error return, unless you know you … … 395 527 these are less likely to work compatibly. If you need to find all the 396 528 files 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. 529 These 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 536 make a program portable. If you use `signal', then on GNU/Linux 537 systems running GNU libc version 1, you should include `bsd/signal.h' 538 instead of `signal.h', so as to get BSD behavior. It is up to you 539 whether to support systems where `signal' has only the USG behavior, or 540 give up on them. 402 541 403 542 In error checks that detect "impossible" conditions, just abort. … … 419 558 instead of `/tmp'. 420 559 560 In addition, be aware that there is a possible security problem when 561 creating temporary files in world-writable directories. In C, you can 562 avoid this problem by creating temporary files in this manner: 563 564 fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0600); 565 566 or by using the `mkstemps' function from libiberty. 567 568 In bash, use `set -C' to avoid this problem. 569 421 570 422 571 File: standards.info, Node: Libraries, Next: Errors, Prev: Semantics, Up: Program Behavior … … 442 591 443 592 External symbols that are not documented entry points for the user 444 should have names beginning with `_'. The y should also contain the445 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.593 should have names beginning with `_'. The `_' should be followed by 594 the chosen name prefix for the library, to prevent collisions with 595 other libraries. These can go in the same files with user entry points 596 if you like. 448 597 449 598 Static functions and variables can be used as you like and need not … … 460 609 SOURCE-FILE-NAME:LINENO: MESSAGE 461 610 611 If you want to mention the column number, use this format: 612 613 SOURCE-FILE-NAME:LINENO:COLUMN: MESSAGE 614 615 Line numbers should start from 1 at the beginning of the file, and 616 column numbers should start from 1 at the beginning of the line. (Both 617 of these conventions are chosen for compatibility.) Calculate column 618 numbers assuming that space and all ASCII printing characters have 619 equal width, and assuming tab stops every 8 columns. 620 462 621 Error messages from other noninteractive programs should look like 463 622 this: … … 470 629 471 630 when 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 472 635 473 636 In an interactive program (one that is reading commands from a … … 487 650 488 651 489 File: standards.info, Node: User Interfaces, Next: Option Table, Prev: Errors, Up: Program Behavior490 491 Standards for Command Line Interfaces492 ================================== ===652 File: standards.info, Node: User Interfaces, Next: Graphical Interfaces, Prev: Errors, Up: Program Behavior 653 654 Standards for Interfaces Generally 655 ================================== 493 656 494 657 Please don't make the behavior of a utility depend on the name used … … 502 665 type of output device it is used with. Device independence is an 503 666 important principle of the system's design; do not compromise it merely 504 to save someone from typing an option now and then. 667 to save someone from typing an option now and then. (Variation in error 668 message syntax when using a terminal is ok, because that is a side issue 669 that people do not depend on.) 505 670 506 671 If you think one behavior is most useful when the output is to a … … 518 683 format. 519 684 685 686 File: standards.info, Node: Graphical Interfaces, Next: Command-Line Interfaces, Prev: User Interfaces, Up: Program Behavior 687 688 Standards for Graphical Interfaces 689 ================================== 690 691 When you write a program that provides a graphical user interface, 692 please make it work with X Windows and the GTK toolkit unless the 693 functionality 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 697 functionality. (In many cases, the graphical user interface can be a 698 separate program which invokes the command-line program.) This is so 699 that the same jobs can be done from scripts. 700 701 Please also consider providing a CORBA interface (for use from 702 GNOME), a library interface (for use from C), and perhaps a 703 keyboard-driven console interface (for use by users from console mode). 704 Once you are doing the work to provide the functionality and the 705 graphical interface, these won't be much extra work. 706 707 708 File: standards.info, Node: Command-Line Interfaces, Next: Option Table, Prev: Graphical Interfaces, Up: Program Behavior 709 710 Standards for Command Line Interfaces 711 ===================================== 712 520 713 It is a good idea to follow the POSIX guidelines for the 521 714 command-line options of a program. The easiest way to do this is to use … … 548 741 549 742 `--version' 550 This option should direct the program to information about its551 name, version, origin and legal status, all on standard output,552 and then exit successfully. Other options and arguments should be553 ignored once this is seen, and the program should not perform its554 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. 555 748 556 749 The first line is meant to be easy for a program to parse; the … … 620 813 appeared in the first line. 621 814 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 622 827 `--help' 623 828 This option should output brief documentation for how to invoke the … … 632 837 633 838 634 File: standards.info, Node: Option Table, Next: Memory Usage, Prev: UserInterfaces, Up: Program Behavior839 File: standards.info, Node: Option Table, Next: Memory Usage, Prev: Command-Line Interfaces, Up: Program Behavior 635 840 636 841 Table of Long Options … … 640 845 incomplete, but we aim to list all the options that a new program might 641 846 want 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 we643 can update the table.847 please send <bug-standards@gnu.org> a list of them, with their 848 meanings, so we can update the table. 644 849 645 850 `after-date' … … 691 896 `-n' in `wdiff'. 692 897 898 `background' 899 For server programs, run in the background. 900 693 901 `backward-search' 694 902 `-B' in `ctags'. … … 810 1018 `dereference-args' 811 1019 `-D' in `du'. 1020 1021 `device' 1022 Specify an I/O device (special file name). 812 1023 813 1024 `diacritics' … … 941 1152 `-F' in `shar'. 942 1153 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 943 1158 `format' 944 1159 Used in `ls', `time', and `ptx'. … … 986 1201 `-q' in `ls'. 987 1202 1203 `html' 1204 In `makeinfo', output HTML. 1205 988 1206 `idle' 989 1207 `-u' in `who'. … … 1042 1260 `info' 1043 1261 `-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. 1044 1266 1045 1267 `initial' … … 1059 1281 `-p' in `shar'. 1060 1282 1283 `iso-8601' 1284 Used in `date' 1285 1061 1286 `jobs' 1062 1287 `-j' in Make. … … 1292 1517 `-F' in `gprof'. 1293 1518 1519 `options' 1520 `-o' in `getopt', `fdlist', `fdmount', `fdmountd', and `fdumount'. 1521 1294 1522 `output' 1295 1523 In various programs, specify the output file name. … … 1375 1603 `prompt' 1376 1604 `-p' in `ed'. 1605 1606 `proxy' 1607 Specify an HTTP proxy. 1377 1608 1378 1609 `query-user' … … 1501 1732 `-s' in `ls'. 1502 1733 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 1503 1740 `sort' 1504 1741 Used in `ls'. … … 1598 1835 Used in `ls' and `touch'. 1599 1836 1837 `timeout' 1838 Specify how long to wait before giving up on some operation. 1839 1600 1840 `to-stdout' 1601 1841 `-O' in `tar'. … … 1687 1927 1688 1928 1689 File: standards.info, Node: Memory Usage, Prev: Option Table, Up: Program Behavior1929 File: standards.info, Node: Memory Usage, Next: File Usage, Prev: Option Table, Up: Program Behavior 1690 1930 1691 1931 Memory Usage 1692 1932 ============ 1693 1933 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 1935 making any effort to reduce memory usage. For example, if it is 1936 impractical for other reasons to operate on files more than a few meg 1937 long, it is reasonable to read entire input files into core to operate 1938 on them. 1698 1939 1699 1940 However, for programs such as `cat' or `tail', that can usefully … … 1709 1950 1710 1951 1952 File: standards.info, Node: File Usage, Prev: Memory Usage, Up: Program Behavior 1953 1954 File Usage 1955 ========== 1956 1957 Programs should be prepared to operate when `/usr' and `/etc' are 1958 read-only file systems. Thus, if the program manages log files, lock 1959 files, backup files, score files, or any other files which are modified 1960 for 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 1964 configuration information; it is reasonable for a program to modify 1965 files in `/etc' when its job is to update the system configuration. 1966 Also, if the user explicitly asks to modify one file in a directory, it 1967 is reasonable for the program to store other files in the same 1968 directory. 1969 1970 1711 1971 File: standards.info, Node: Writing C, Next: Documentation, Prev: Program Behavior, Up: Top 1712 1972 … … 1722 1982 * Comments:: Commenting Your Work 1723 1983 * Syntactic Conventions:: Clean Use of C Constructs 1724 * Names:: Naming Variables and Functions1984 * Names:: Naming Variables, Functions, and Files 1725 1985 * System Portability:: Portability between different operating systems 1726 1986 * CPU Portability:: Supporting the range of CPU types … … 1753 2013 } 1754 2014 1755 or, if you want to use ANSI C, format the definition like this: 2015 or, if you want to use Standard C syntax, format the definition like 2016 this: 1756 2017 1757 2018 static char * … … 1761 2022 } 1762 2023 1763 In ANSI C, if the arguments don't fit nicely on one line, splitit1764 like this:2024 In Standard C, if the arguments don't fit nicely on one line, split 2025 it like this: 1765 2026 1766 2027 int … … 1769 2030 ... 1770 2031 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 2033 of C formatting style, which is also the default style of the `indent' 2034 program 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 2040 causes no problems for users if two different programs have different 2041 formatting styles. 2042 2043 But whatever style you use, please use it consistently, since a 2044 mixture of styles within one program tends to look ugly. If you are 2045 contributing changes to an existing program, please follow the style of 2046 that program. 2047 2048 For the body of the function, our recommended style looks like this: 1772 2049 1773 2050 if (x < foo (y, z)) … … 1808 2085 Insert extra parentheses so that Emacs will indent the code properly. 1809 2086 For example, the following indentation looks nice if you do it by hand, 1810 but Emacs would mess it up:1811 2087 1812 2088 v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 1813 2089 + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000; 1814 2090 1815 But adding a set of parentheses solves the problem: 2091 but Emacs would alter it. Adding a set of parentheses produces 2092 something that looks equally nice, and which Emacs will preserve: 1816 2093 1817 2094 v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 … … 1917 2194 ========================= 1918 2195 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 2197 should explicitly declare all arguments to functions, and you should 2198 declare functions to return `int' rather than omitting the `int'. 2199 2200 Some programmers like to use the GCC `-Wall' option, and change the 2201 code whenever it issues a warning. If you want to do this, then do. 2202 Other programmers prefer not to use `-Wall', because it gives warnings 2203 for valid and legitimate code which they do not want to change. If you 2204 want to do this, then do. The compiler should be your servant, not 2205 your master. 1921 2206 1922 2207 Declarations of external functions and functions to appear later in … … 2019 2304 File: standards.info, Node: Names, Next: System Portability, Prev: Syntactic Conventions, Up: Writing C 2020 2305 2021 Naming Variables and Functions2022 ============================== 2306 Naming Variables, Functions, and Files 2307 ====================================== 2023 2308 2024 2309 The names of global variables and functions in a program serve as … … 2031 2316 within one context, where (presumably) comments explain their purpose. 2032 2317 2318 Try to limit your use of abbreviations in symbol names. It is ok to 2319 make a few abbreviations, explain what they mean, and then use them 2320 frequently, but don't use lots of obscure abbreviations. 2321 2033 2322 Please use underscores to separate words in a name, so that the Emacs 2034 2323 word commands can be useful within them. Stick to lower case; reserve … … 2050 2339 `enum' rather than `#define'. GDB knows about enumeration constants. 2051 2340 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 2342 conflict the files were loaded onto an MS-DOS file system which 2343 shortens 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 2346 14 characters or less, to avoid file name conflicts if they are read 2347 into older System V systems. Please preserve this feature in the 2348 existing GNU programs that have it, but there is no need to do this in 2349 new GNU programs. `doschk' also reports file names longer than 14 2350 characters. 2057 2351 2058 2352 … … 2067 2361 2068 2362 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. 2363 kernel, compiled with the GNU C compiler, on various types of CPU. So 2364 the kinds of portability that are absolutely necessary are quite 2365 limited. But it is important to support Linux-based GNU systems, since 2366 they 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 2370 to. Supporting a variety of Unix-like systems is desirable, although 2371 not paramount. It is usually not too hard, so you may as well do it. 2372 But you don't have to consider it an obligation, if it does turn out to 2373 be hard. 2078 2374 2079 2375 The easiest way to achieve portability to most Unix-like systems is … … 2087 2383 2088 2384 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. 2385 Macintosh, VMS, and MVS, supporting them is often a lot of work. When 2386 that is the case, it is better to spend your time adding features that 2387 will be useful on GNU and GNU/Linux, rather than on supporting other 2388 incompatible systems. 2389 2390 It is a good idea to define the "feature test macro" `_GNU_SOURCE' 2391 when compiling your C files. When you compile on GNU or GNU/Linux, 2392 this will enable the declarations of GNU library extension functions, 2393 and that will usually give you a compiler error message if you define 2394 the same function names in some other way in your program. (You don't 2395 have to actually _use_ these functions, if you prefer to make the 2396 program more portable to other systems.) 2397 2398 But whether or not you use these GNU extensions, you should avoid 2399 using their names for any other meanings. Doing so would make it hard 2400 to move your code into other GNU programs. 2097 2401 2098 2402 … … 2109 2413 GNU. 2110 2414 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 2417 example, 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 2423 counterexample: 64-bit programs on Microsoft Windows IA-64. We will 2424 leave it to those who want to port GNU programs to that environment to 2425 figure out how to do it. 2426 2427 Predefined file-size types like `off_t' are an exception: they are 2428 longer than `long' on many platforms, so code like the above won't work 2429 with them. One way to print an `off_t' value portably is to print its 2430 digits yourself, one by one. 2431 2111 2432 Don't assume that the address of an `int' object is also the address 2112 2433 of its least-significant byte. This is false on big-endian machines. … … 2121 2442 between pointers of various types, or between pointers and integers. 2122 2443 On most machines, there's no difference anyway. As for the few 2123 machines where there is a difference, all of them support ANSI C, so2124 you can use prototypes (conditionalized to be active only in ANSI C) to 2125 make the code work on those systems.2444 machines where there is a difference, all of them support Standard C 2445 prototypes, so you can use prototypes (perhaps conditionalized to be 2446 active only in Standard C) to make the code work on those systems. 2126 2447 2127 2448 In certain cases, it is ok to pass integer and pointer arguments … … 2132 2453 error (s, a1, a2, a3) 2133 2454 char *s; 2134 int a1, a2,a3;2455 char *a1, *a2, *a3; 2135 2456 { 2136 2457 fprintf (stderr, "error: "); … … 2138 2459 } 2139 2460 2140 In practice, this works on all machines, and it is much simpler than any 2461 In practice, this works on all machines, since a pointer is generally 2462 the widest possible kind of argument; it is much simpler than any 2141 2463 "correct" alternative. Be sure _not_ to use a prototype for such 2142 2464 functions. 2143 2465 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 2470 reduce portability, and in most programs they are easy to avoid. In the 2471 cases where casting pointers to integers is essential--such as, a Lisp 2472 interpreter which stores type information as well as an address in one 2473 word--you'll have to make explicit provisions to handle different word 2474 sizes. You will also need to make provision for systems in which the 2475 normal range of addresses you can get from `malloc' starts far away 2476 from zero. 2150 2477 2151 2478 … … 2155 2482 ======================== 2156 2483 2157 C implementations differ substantially. ANSI C reduces but does not2158 eliminate the incompatibilities; meanwhile, many users wish to compile 2159 GNU software with pre-ANSI compilers. This chapter gives2160 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 of2484 C implementations differ substantially. Standard C reduces but does 2485 not eliminate the incompatibilities; meanwhile, many GNU packages still 2486 support pre-standard compilers because this is not hard to do. This 2487 chapter gives recommendations for how to use the more-or-less standard C 2488 library functions to avoid unnecessary loss of portability. 2489 2490 * Don't use the return value of `sprintf'. It returns the number of 2164 2491 characters written on some systems, but not on all systems. 2492 2493 * Be aware that `vfprintf' is not always available. 2165 2494 2166 2495 * `main' should be declared to return type `int'. It should … … 2182 2511 2183 2512 * 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. 2186 2516 2187 2517 * In particular, don't unconditionally declare `malloc' or `realloc'. … … 2211 2541 usual way. 2212 2542 2213 That causes less of a problem than you might think. The newer ANSI2214 st ring functions should be avoided anyway because many systems2215 s till don't support them. The string functions you can use are2216 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: 2217 2547 2218 2548 strcpy strncpy strcat strncat … … 2240 2570 You should pick a single pair of names and use it throughout your 2241 2571 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 *'. On2244 systems which don't support those names, define them as macros in2245 t erms of the other pair. For example, here is what to put at the2246 beginning of your file (or in a header) if you want to use the2247 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: 2248 2578 2249 2579 #ifndef HAVE_STRCHR … … 2366 2696 ******************** 2367 2697 2698 A GNU program should ideally come with full free documentation, 2699 adequate for both reference and tutorial purposes. If the package can 2700 be programmed or extended, the documentation should cover programming or 2701 extending it, as well as just using it. 2702 2368 2703 * Menu: 2369 2704 2370 2705 * GNU Manuals:: Writing proper manuals. 2706 * Doc Strings and Manuals:: Compiling doc strings doesn't make a manual. 2371 2707 * 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. 2372 2711 * NEWS File:: NEWS files supplement manuals. 2373 2712 * Change Logs:: Recording Changes … … 2377 2716 2378 2717 2379 File: standards.info, Node: GNU Manuals, Next: Manual Structure Details, Up: Documentation2718 File: standards.info, Node: GNU Manuals, Next: Doc Strings and Manuals, Up: Documentation 2380 2719 2381 2720 GNU Manuals 2382 2721 =========== 2383 2722 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 2724 formatting language. Every GNU package should (ideally) have 2725 documentation in Texinfo both for reference and for learners. Texinfo 2726 makes it possible to produce a good quality formatted book, using TeX, 2727 and to generate an Info file. It is also possible to generate HTML 2728 output from Texinfo source. See the Texinfo manual, either the 2729 hardcopy, or the on-line version available through `info' or the Emacs 2730 Info subsystem (`C-h i'). 2731 2732 Nowadays some other formats such as Docbook and Sgmltexi can be 2733 converted automatically into Texinfo. It is ok to produce the Texinfo 2734 documentation by conversion this way, as long as it gives good results. 2388 2735 2389 2736 Programmers often find it most natural to structure the documentation … … 2414 2761 the whole subject clearer. 2415 2762 2416 The manual which discusses a program should document all of the2417 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 of2763 The manual which discusses a program should certainly document all of 2764 the program's command-line options and all of its commands. It should 2765 give examples of their use. But don't organize the manual as a list of 2419 2766 features. Instead, organize it logically, by subtopics. Address the 2420 2767 questions that a user will ask when thinking about the job that the … … 2425 2772 and for reading straight through (appendixes aside). A GNU manual 2426 2773 should give a good introduction to a beginner reading through from the 2427 start, and should also provide all the details that hackers want. 2774 start, and should also provide all the details that hackers want. The 2775 Bison manual is a good example of this--please take a look at it to see 2776 what we mean. 2428 2777 2429 2778 That is not as hard as it first sounds. Arrange each chapter as a … … 2439 2788 Bison manual provides a good example of how to do this. 2440 2789 2790 To serve as a reference, a manual should have an Index that list all 2791 the functions, variables, options, and important concepts that are part 2792 of the program. One combined Index should do for a short manual, but 2793 sometimes for a complex package it is better to use multiple indices. 2794 The Texinfo manual includes advice on preparing good index entries, see 2795 *Note Making Index Entries: (texinfo)Index Entries, and see *Note 2796 Defining the Entries of an Index: (texinfo)Indexing Commands. 2797 2441 2798 Don't use Unix man pages as a model for how to write GNU 2442 2799 documentation; most of them are terse, badly structured, and give 2443 2800 inadequate 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. 2801 course, some exceptions.) Also, Unix man pages use a particular format 2802 which is different from what we use in GNU manuals. 2803 2804 Please include an email address in the manual for where to report 2805 bugs _in the manual_. 2446 2806 2447 2807 Please do not use the term "pathname" that is used in Unix 2448 2808 documentation; use "file name" (two words) instead. We use the term 2449 "path" only for search paths, which are lists of filenames.2809 "path" only for search paths, which are lists of directory names. 2450 2810 2451 2811 Please do not use the term "illegal" to refer to erroneous input to a 2452 2812 computer 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 2816 File: standards.info, Node: Doc Strings and Manuals, Next: Manual Structure Details, Prev: GNU Manuals, Up: Documentation 2817 2818 Doc Strings and Manuals 2819 ======================= 2820 2821 Some programming systems, such as Emacs, provide a documentation 2822 string for each function, command or variable. You may be tempted to 2823 write a reference manual by compiling the documentation strings and 2824 writing a little additional text to go around them--but you must not do 2825 it. That approach is a fundamental mistake. The text of well-written 2826 documentation strings will be entirely wrong for a manual. 2827 2828 A documentation string needs to stand alone--when it appears on the 2829 screen, there will be no other text to introduce or explain it. 2830 Meanwhile, it can be rather informal in style. 2831 2832 The text describing a function or variable in a manual must not stand 2833 alone; it appears in the context of a section or subsection. Other text 2834 at the beginning of the section should explain some of the concepts, and 2835 should often make some general points that apply to several functions or 2836 variables. The previous descriptions of functions and variables in the 2837 section will also have given information about the topic. A description 2838 written to stand alone would repeat some of that information; this 2839 redundance looks bad. Meanwhile, the informality that is acceptable in 2840 a documentation string is totally unacceptable in a manual. 2841 2842 The only good way to use documentation strings in writing a good 2843 manual is to use them as a source of information for writing good text. 2844 2845 2846 File: standards.info, Node: Manual Structure Details, Next: License for Manuals, Prev: Doc Strings and Manuals, Up: Documentation 2457 2847 2458 2848 Manual Structure Details … … 2465 2855 number for the manual in both of these places. 2466 2856 2467 Each program documented in the manual should shouldhave a node named2857 Each program documented in the manual should have a node named 2468 2858 `PROGRAM Invocation' or `Invoking PROGRAM'. This node (together with 2469 2859 its subnodes, if any) should describe the program's command line … … 2476 2866 to as the node for this purpose, regardless of the node's actual name. 2477 2867 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 2869 menu item in order to find the relevant text, so it is essential for 2870 every Texinfo file to have one. 2480 2871 2481 2872 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 2873 for each program described in the manual. 2874 2875 2876 File: standards.info, Node: License for Manuals, Next: Manual Credits, Prev: Manual Structure Details, Up: Documentation 2877 2878 License for Manuals 2879 =================== 2880 2881 Please use the GNU Free Documentation License for all GNU manuals 2882 that are more than a few pages long. Likewise for a collection of short 2883 documents--you only need one copy of the GNU FDL for the whole 2884 collection. For a single short document, you can use a very permissive 2885 non-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 2888 of how to employ the GFDL. 2889 2890 Note that it is not obligatory to include a copy of the GNU GPL or 2891 GNU LGPL in a manual whose license is neither the GPL nor the LGPL. It 2892 can be a good idea to include the program's license in a large manual; 2893 in a short manual, whose size would be increased considerably by 2894 including the program's license, it is probably better not to include 2895 it. 2896 2897 2898 File: standards.info, Node: Manual Credits, Next: Printed Manuals, Prev: License for Manuals, Up: Documentation 2899 2900 Manual Credits 2901 ============== 2902 2903 Please credit the principal human writers of the manual as the 2904 authors, on the title page of the manual. If a company sponsored the 2905 work, thank the company in a suitable place in the manual, but do not 2906 cite the company as an author. 2907 2908 2909 File: standards.info, Node: Printed Manuals, Next: NEWS File, Prev: Manual Credits, Up: Documentation 2910 2911 Printed Manuals 2912 =============== 2913 2914 The FSF publishes some GNU manuals in printed form. To encourage 2915 sales of these manuals, the on-line versions of the manual should 2916 mention at the very start that the printed manual is available and 2917 should point at information for getting it--for instance, with a link 2918 to the page <http://www.gnu.org/order/order.html>. This should not be 2919 included 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 2922 the user can print out the manual from the sources. 2923 2924 2925 File: standards.info, Node: NEWS File, Next: Change Logs, Prev: Printed Manuals, Up: Documentation 2486 2926 2487 2927 The NEWS File … … 2519 2959 * Simple Changes:: 2520 2960 * Conditional Changes:: 2961 * Indicating the Part Changed:: 2521 2962 2522 2963 … … 2538 2979 Another alternative is to record change log information with a 2539 2980 version control system such as RCS or CVS. This can be converted 2540 automatically to a `ChangeLog' file. 2981 automatically to a `ChangeLog' file using `rcs2log'; in Emacs, the 2982 command `C-x v a' (`vc-update-change-log') does the job. 2541 2983 2542 2984 There's no need to describe the full purpose of the changes or how … … 2563 3005 -------------------- 2564 3006 2565 Here are some examples of change log entries: 2566 3007 Here are some simple examples of change log entries, starting with 3008 the header line that says who made the change and when, followed by 3009 descriptions of specific changes. (These examples are drawn from Emacs 3010 and GCC.) 3011 3012 1998-08-17 Richard Stallman <rms@gnu.org> 3013 2567 3014 * register.el (insert-register): Return nil. 2568 3015 (jump-to-register): Likewise. … … 2594 3041 name and the asterisk when successive entries are in the same file. 2595 3042 3043 Break long lists of function names by closing continued lines with 3044 `)', rather than `,', and opening the continuation with `(' as in this 3045 example: 3046 3047 * keyboard.c (menu_bar_items, tool_bar_items) 3048 (Fexecute_extended_command): Deal with `keymap' property. 3049 2596 3050 2597 3051 File: standards.info, Node: Simple Changes, Next: Conditional Changes, Prev: Style of Change Logs, Up: Change Logs … … 2604 3058 2605 3059 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 no2607 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." 3060 fashion, and you change all the callers of the function to use the new 3061 calling sequence, there is no need to make individual entries for all 3062 the callers that you changed. Just write in the entry for the function 3063 being called, "All callers changed"--like this: 2610 3064 2611 3065 * keyboard.c (Fcommand_execute): New arg SPECIAL. … … 2624 3078 2625 3079 2626 File: standards.info, Node: Conditional Changes, Prev: Simple Changes, Up: Change Logs3080 File: standards.info, Node: Conditional Changes, Next: Indicating the Part Changed, Prev: Simple Changes, Up: Change Logs 2627 3081 2628 3082 Conditional Changes … … 2658 3112 2659 3113 (gethostname) [!HAVE_SOCKETS]: Replace with winsock version. 3114 3115 3116 File: standards.info, Node: Indicating the Part Changed, Prev: Conditional Changes, Up: Change Logs 3117 3118 Indicating the Part Changed 3119 --------------------------- 3120 3121 Indicate the part of a function which changed by using angle brackets 3122 enclosing an indication of what the changed part does. Here is an entry 3123 for a change in the part of the function `sh-while-getopts' that deals 3124 with `sh' commands: 3125 3126 * progmodes/sh-script.el (sh-while-getopts) <sh>: Handle case that 3127 user-specified option string is empty. 2660 3128 2661 3129 … … 2712 3180 2713 3181 2714 File: standards.info, Node: Managing Releases, Prev: Documentation, Up: Top3182 File: standards.info, Node: Managing Releases, Next: References, Prev: Documentation, Up: Top 2715 3183 2716 3184 The Release Process … … 2728 3196 2729 3197 * Configuration:: How Configuration Should Work 2730 * Makefile Conventions:: 3198 * Makefile Conventions:: Makefile Conventions 2731 3199 * Releases:: Making Releases 2732 3200 … … 2834 3302 options are for. 2835 3303 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 is2841 obsolete; users should use `--with-gnu-as' instead.2842 2843 `--x'2844 The target machine has the X Window System installed. This is2845 obsolete; users should use `--with-x' instead.2846 2847 3304 All `configure' scripts should accept all of these "detail" options, 2848 3305 whether or not they make any difference to the particular package at … … 2858 3315 2859 3316 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. 3317 cross-compilation. In such a case, the host and target machines for the 3318 program may be different. 3319 3320 The `configure' script should normally treat the specified type of 3321 system as both the host and the target, thus producing a program which 3322 works for the same type of machine that it runs on. 3323 3324 To configure a cross-compiler, cross-assembler, or what have you, you 3325 should specify a target different from the host, using the configure 3326 option `--target=TARGETTYPE'. The syntax for TARGETTYPE is the same as 3327 for 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 3332 the `--target' option, because configuring an entire operating system 3333 for cross-operation is not a meaningful operation. 2871 3334 2872 3335 Bootstrapping a cross-compiler requires compiling it on a machine 2873 3336 other 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. 3337 configuration option `--build=BUILDTYPE' for specifying the 3338 configuration on which you will compile them, but the configure script 3339 should normally guess the build machine type (using `config.guess'), so 3340 this option is probably not necessary. The host and target types 3341 normally default from the build type, so in bootstrapping a 3342 cross-compiler you must specify them both explicitly. 2881 3343 2882 3344 Some programs have ways of configuring themselves automatically. If … … 2891 3353 2892 3354 This node describes conventions for writing the Makefiles for GNU 2893 programs. 3355 programs. Using Automake will help you write a Makefile that follows 3356 these conventions. 2894 3357 2895 3358 * Menu: 2896 3359 2897 * Makefile Basics:: 2898 * Utilities in Makefiles:: 2899 * Command Variables:: 2900 * Directory Variables:: 2901 * Standard Targets:: 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 2902 3365 * Install Command Categories:: Three categories of commands in the `install' 2903 3366 rule: normal, pre-install and post-install. … … 2944 3407 2945 3408 will fail when the build directory is not the source directory, because 2946 `foo.man' and `sedscript' are in the thesource directory.3409 `foo.man' and `sedscript' are in the source directory. 2947 3410 2948 3411 When using GNU `make', relying on `VPATH' to find the source file … … 3095 3558 3096 3559 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: 3560 and `INSTALL_DATA'. (The default for `INSTALL_PROGRAM' should be 3561 `$(INSTALL)'; the default for `INSTALL_DATA' should be `${INSTALL} -m 3562 644'.) Then it should use those variables as the commands for actual 3563 installation, for executables and nonexecutables respectively. Use 3564 these variables as follows: 3101 3565 3102 3566 $(INSTALL_PROGRAM) foo $(bindir)/foo … … 3126 3590 is easy to install in a nonstandard place. The standard names for these 3127 3591 variables are described below. They are based on a standard filesystem 3128 layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and3129 other modern operating systems.3592 layout; variants of it are used in SVR4, 4.4BSD, GNU/Linux, Ultrix v4, 3593 and other modern operating systems. 3130 3594 3131 3595 These two variables set the root for the installation. All the other … … 3141 3605 3142 3606 Running `make install' with a different value of `prefix' from the 3143 one used to build the program should NOTrecompile the program.3607 one used to build the program should _not_ recompile the program. 3144 3608 3145 3609 `exec_prefix' … … 3155 3619 3156 3620 Running `make install' with a different value of `exec_prefix' 3157 from the one used to build the program should NOTrecompile the3621 from the one used to build the program should _not_ recompile the 3158 3622 program. 3159 3623 … … 3452 3916 `install-strip' 3453 3917 Like `install', but strip the executable files while installing 3454 them. In many cases, the definition of this target can be very3455 simple:3918 them. In simple cases, this target can use the `install' target in 3919 a simple way: 3456 3920 3457 3921 install-strip: 3458 3922 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ 3459 3923 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. 3460 3932 3461 3933 Normally we do not recommend stripping an executable unless you … … 3562 4034 in it, and then `tar' that subdirectory. 3563 4035 3564 Compress the tar file filewith `gzip'. For example, the actual4036 Compress the tar file with `gzip'. For example, the actual 3565 4037 distribution file for GCC version 1.40 is called `gcc-1.40.tar.gz'. 3566 4038 … … 3597 4069 $(mandir) 3598 4070 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 3599 4081 This rule should not modify the directories where compilation is 3600 4082 done. It should do nothing but create installation directories. … … 3727 4209 never changed automatically; non-source files are produced from source 3728 4210 files by programs under the control of the Makefile. 4211 4212 The distribution should contain a file named `README' which gives 4213 the name of the package, and a general description of what it does. It 4214 is also good to explain the purpose of each of the first-level 4215 subdirectories in the package, if there are any. The `README' file 4216 should either state the version number of the package, or refer to where 4217 in the package it can be found. 4218 4219 The `README' file should refer to the file `INSTALL', which should 4220 contain an explanation of the installation procedure. 4221 4222 The `README' file should also refer to the file which contains the 4223 copying 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'. 3729 4226 3730 4227 Naturally, all the source files must be in the distribution. It is … … 3778 4275 know what other files to get. 3779 4276 4277 4278 File: standards.info, Node: References, Next: Copying This Manual, Prev: Managing Releases, Up: Top 4279 4280 References to Non-Free Software and Documentation 4281 ************************************************* 4282 4283 A GNU program should not recommend use of any non-free program. We 4284 can't stop some people from writing proprietary programs, or stop other 4285 people from using them, but we can and should avoid helping to 4286 advertise them to new potential customers. Proprietary software is a 4287 social and ethical problem, and the point of GNU is to solve that 4288 problem. 4289 4290 When a non-free program or system is well known, you can mention it 4291 in passing--that is harmless, since users who might want to use it 4292 probably already know about it. For instance, it is fine to explain 4293 how to build your package on top of some non-free operating system, or 4294 how to use it together with some widely used non-free program. 4295 4296 However, you should give only the necessary information to help those 4297 who already use the non-free program to use your program with it--don't 4298 give, or refer to, any further information about the proprietary 4299 program, and don't imply that the proprietary program enhances your 4300 program, or that its existence is in any way a good thing. The goal 4301 should be that people already using the proprietary program will get 4302 the advice they need about how to use your free program, while people 4303 who don't already use the proprietary program will not see anything to 4304 lead them to take an interest in it. 4305 4306 If a non-free program or system is obscure in your program's domain, 4307 your program should not mention or support it at all, since doing so 4308 would tend to popularize the non-free program more than it popularizes 4309 your program. (You cannot hope to find many additional users among the 4310 users of Foobar if the users of Foobar are few.) 4311 4312 A GNU package should not refer the user to any non-free documentation 4313 for free software. Free documentation that can be included in free 4314 operating systems is essential for completing the GNU system, so it is 4315 a major focus of the GNU Project; to recommend use of documentation 4316 that we are not allowed to use in GNU would undermine the efforts to 4317 get documentation that we can include. So GNU packages should never 4318 recommend non-free documentation. 4319 4320 4321 File: standards.info, Node: Copying This Manual, Next: Index, Prev: References, Up: Top 4322 4323 Copying This Manual 4324 ******************* 4325 4326 * Menu: 4327 4328 * GNU Free Documentation License:: License for copying this manual 4329 4330 4331 File: standards.info, Node: GNU Free Documentation License, Up: Copying This Manual 4332 4333 GNU 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 4678 ADDENDUM: 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 4682 the License in the document and put the following copyright and license 4683 notices 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" 4695 instead of saying which ones are invariant. If you have no Front-Cover 4696 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being 4697 LIST"; likewise for Back-Cover Texts. 4698 4699 If your document contains nontrivial examples of program code, we 4700 recommend releasing these examples in parallel under your choice of 4701 free software license, such as the GNU General Public License, to 4702 permit their use in free software. 4703 4704 4705 File: standards.info, Node: Index, Prev: Copying This Manual, Up: Top 4706 4707 Index 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 3780 4829 3781 4830 3782 4831 Tag 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 4832 Node: Top689 4833 Node: Preface1392 4834 Node: Legal Issues3611 4835 Node: Reading Non-Free Code4074 4836 Node: Contributions5797 4837 Node: Trademarks7946 4838 Node: Design Advice9004 4839 Node: Source Language9587 4840 Node: Compatibility11594 4841 Node: Using Extensions13217 4842 Node: Standard C14788 4843 Node: Conditional Compilation17186 4844 Node: Program Behavior18480 4845 Node: Semantics19398 4846 Node: Libraries24086 4847 Node: Errors25326 4848 Node: User Interfaces27102 4849 Node: Graphical Interfaces28702 4850 Node: Command-Line Interfaces29732 4851 Node: Option Table35798 4852 Node: Memory Usage50802 4853 Node: File Usage51822 4854 Node: Writing C52565 4855 Node: Formatting53414 4856 Node: Comments57472 4857 Node: Syntactic Conventions60770 4858 Node: Names64177 4859 Node: System Portability66381 4860 Node: CPU Portability68761 4861 Node: System Functions72012 4862 Node: Internationalization77214 4863 Node: Mmap80362 4864 Node: Documentation81067 4865 Node: GNU Manuals82171 4866 Node: Doc Strings and Manuals87223 4867 Node: Manual Structure Details88771 4868 Node: License for Manuals90184 4869 Node: Manual Credits91153 4870 Node: Printed Manuals91541 4871 Node: NEWS File92222 4872 Node: Change Logs92894 4873 Node: Change Log Concepts93643 4874 Node: Style of Change Logs95498 4875 Node: Simple Changes97544 4876 Node: Conditional Changes98779 4877 Node: Indicating the Part Changed100192 4878 Node: Man Pages100710 4879 Node: Reading other Manuals102329 4880 Node: Managing Releases103113 4881 Node: Configuration103875 4882 Node: Makefile Conventions110775 4883 Node: Makefile Basics111576 4884 Node: Utilities in Makefiles114741 4885 Node: Command Variables116877 4886 Node: Directory Variables120445 4887 Node: Standard Targets131330 4888 Ref: Standard Targets-Footnote-1142581 4889 Node: Install Command Categories142681 4890 Node: Releases147254 4891 Node: References151337 4892 Node: Copying This Manual153621 4893 Node: GNU Free Documentation License153835 4894 Node: Index173521 3832 4895 3833 4896 End Tag Table -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.