hello.texi 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. \input texinfo @c -*-texinfo-*-
  2. @c %**start of header
  3. @setfilename hello.info
  4. @include version.texi
  5. @settitle GNU Hello @value{VERSION}
  6. @c %**end of header
  7. @copying
  8. This manual is for GNU Hello (version @value{VERSION}, @value{UPDATED}),
  9. which prints a friendly greeting (and serves as an example GNU package).
  10. Copyright @copyright{} 1992, 1993, 1996, 2002, 2005, 2006, 2007, 2008
  11. Free Software Foundation, Inc.
  12. @quotation
  13. Permission is granted to copy, distribute and/or modify this document
  14. under the terms of the GNU Free Documentation License, Version 1.2 or
  15. any later version published by the Free Software Foundation; with no
  16. Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
  17. Texts. A copy of the license is included in the section entitled
  18. ``GNU Free Documentation License''.
  19. @end quotation
  20. @end copying
  21. @c If your manual is published on paper by the FSF, it should include
  22. @c the standard FSF Front-Cover and Back-Cover Texts, as given in
  23. @c maintain.texi.
  24. @c Define a new index for options.
  25. @defcodeindex op
  26. @c Combine everything into one index (arbitrarily chosen to be the
  27. @c concept index).
  28. @syncodeindex op cp
  29. @dircategory Basics
  30. @direntry
  31. * Hello: (hello). Hello, GNU world.
  32. @end direntry
  33. @titlepage
  34. @title GNU Hello
  35. @subtitle for version @value{VERSION}, @value{UPDATED}
  36. @author GNU Hello Developers (@email{bug-hello@@gnu.org})
  37. @page
  38. @vskip 0pt plus 1filll
  39. @insertcopying
  40. @end titlepage
  41. @contents
  42. @ifnottex
  43. @node Top
  44. @top GNU Hello
  45. This manual is for GNU Hello (version @value{VERSION}, @value{UPDATED}).
  46. @end ifnottex
  47. @menu
  48. * Overview:: General purpose and information.
  49. * Sample output:: Sample output from @command{hello}.
  50. * Invoking hello:: How to run @command{hello}.
  51. * Reporting bugs:: Sending bug reports and feature suggestions.
  52. * GNU Free Documentation License:: Copying and sharing this documentation.
  53. * Concept index:: Index of concepts.
  54. @end menu
  55. @node Overview
  56. @chapter Overview
  57. @cindex greetings
  58. @cindex overview
  59. The GNU @command{hello} program
  60. (@url{http://www.gnu.org/software/hello/}) produces a familiar,
  61. friendly greeting. It allows nonprogrammers to use a classic computer
  62. science tool which would otherwise be unavailable to them. Because it
  63. is protected by the GNU General Public License, users are free (in
  64. perpetuity) to share and change it.
  65. @cindex joke, not
  66. Not to spoil the joke, but of course the practical purpose of GNU
  67. Hello is to serve as a minimal example of a GNU package. So, although
  68. most manuals don't need to discuss the implementation of the programs
  69. they document, that is part of the goal here.
  70. @cindex GNU coding standards
  71. @cindex GNU maintainer standards
  72. @cindex standards, GNU coding
  73. @cindex standards, GNU maintainer
  74. First, GNU Hello follows the GNU coding standards
  75. (@pxref{Top,,Preface,standards, GNU Coding Standards}) and GNU
  76. maintainer standards (@pxref{Top,,Preface,maintain, Information for
  77. GNU Maintainers}). These are the basic documents which all GNU
  78. packages should adhere to.
  79. The Hello package also implements recommended development practices
  80. not embodied in the standards, using other GNU packages and features:
  81. @itemize @bullet
  82. @item
  83. @cindex Automake
  84. @cindex Autoconf
  85. It uses Automake (@pxref{Top,,Introduction,Automake,GNU Automake}) and
  86. hence also Autoconf (@pxref{Top,,Introduction,Autoconf,GNU Autoconf})
  87. for configuration.
  88. @item
  89. @cindex Gnulib
  90. It uses Gnulib (@pxref{Top,,Gnulib,gnulib,GNU Gnulib}) to enhance
  91. portability and avoid duplication of common sources.
  92. @item
  93. @cindex Gettext
  94. GNU Gettext (@pxref{Top,,Introduction,gettext,GNU Gettext}) is used
  95. for internationalization support. Hello's greeting has been translated
  96. into many languages.
  97. @item
  98. @opindex --help
  99. Internally, Hello uses the GNU @code{getopt_long} function
  100. (@pxref{Getopt Long Options,,,libc,GNU C Library}) to parse options,
  101. thus supporting GNU-style long options such as @option{--help}.
  102. @item
  103. @cindex Help2man
  104. Man pages are generated with GNU @code{help2man}
  105. (@pxref{Top,,Overview,help2man,GNU @code{help2man}}) from the
  106. @option{--help} output. This relieves the maintainers of the burden
  107. of maintaining man documentation separately, yet provides a reasonable
  108. overview for man devotees.
  109. @item
  110. @cindex Texinfo
  111. Finally, Texinfo (@pxref{Top,,Introduction,texinfo,Texinfo}) is the
  112. documentation format for this manual. It supports output in Info,
  113. HTML, PDF, DVI, plain text, XML, and other formats.
  114. @end itemize
  115. GNU Hello is implemented in C. GNU Gettext contains ``hello world''
  116. examples in a variety of other programming languages; see the Gettext
  117. home page at @url{http://www.gnu.org/software/gettext/}.
  118. @cindex authors
  119. @cindex Haertel, Mike
  120. @cindex MacKenzie, David
  121. @cindex Brittenson, Jan
  122. @cindex Hannum, Charles
  123. @cindex McGrath, Roland
  124. @cindex Friedman, Noah
  125. @cindex Eichwalder, Karl
  126. @cindex King, The
  127. @cindex Berry, Karl
  128. GNU Hello was written by Mike Haertel, David MacKenzie, Jan
  129. Brittenson, Charles Hannum, Roland McGrath, Noah Friedman, Karl
  130. Eichwalder, Karl Berry, and @w{The King}.
  131. @node Sample output
  132. @chapter Sample output
  133. @cindex sample output
  134. @cindex examples
  135. Here are some realistic examples of running GNU Hello.
  136. This is the output of the command @samp{hello}:
  137. @example
  138. Hello, world!
  139. @end example
  140. This is the output of the command @samp{hello --traditional}:
  141. @example
  142. hello, world
  143. @end example
  144. This is the output of the command @samp{hello --greeting=hi}:
  145. @example
  146. hi
  147. @end example
  148. @node Invoking hello
  149. @chapter Invoking @command{hello}
  150. @cindex invoking
  151. @cindex options
  152. @cindex usage
  153. @cindex help
  154. The format for running the @command{hello} program is:
  155. @example
  156. hello @var{option} @dots{}
  157. @end example
  158. With no options, @command{hello} prints the greeting @samp{Hello,
  159. world!}.
  160. @command{hello} supports the following options:
  161. @table @option
  162. @item --greeting=@var{text}
  163. @itemx -g @var{text}
  164. @opindex --greeting
  165. @opindex -g
  166. Output @var{text} instead of the default greeting.
  167. @item --help
  168. @itemx -h
  169. @opindex --help
  170. @opindex -h
  171. Print an informative help message on standard output and exit
  172. successfully.
  173. @cindex environment variables, help for
  174. For the @option{--help} output of GNU programs, it's strongly
  175. encouraged to include a brief (one or two sentences) description of
  176. what the program does, as well as the synopsis of how to run the
  177. program. Any environment variables which affect execution should also
  178. be mentioned (Hello doesn't have any).
  179. @item --next-generation
  180. @itemx -n
  181. @opindex --next-generation
  182. @opindex -n
  183. Output @samp{Hello, world!}, but possibly including box-drawing
  184. characters or other fancy stuff, especially in translated locales.
  185. (If you would like to volunteer to translate messages for GNU packages,
  186. please see @url{http://translationproject.org}.)
  187. @item --traditional
  188. @itemx -t
  189. @opindex --traditional
  190. @opindex -t
  191. @cindex traditional
  192. @cindex modern
  193. Output the traditional greeting message @samp{hello, world}.
  194. @item --version
  195. @itemx -v
  196. @opindex --version
  197. @opindex -v
  198. Print the version number and licensing information of Hello on
  199. standard output and then exit successfully.
  200. @end table
  201. If more than one of the greeting options (@option{-g}, @option{-n},
  202. @option{-t}, and their long-named equivalents) is specified, whichever
  203. comes last takes precedence.
  204. @node Reporting bugs
  205. @chapter Reporting bugs
  206. @cindex bug reporting
  207. @cindex problems
  208. @cindex reporting bugs
  209. To report bugs or suggest enhancements for GNU Hello, please
  210. send electronic mail to @email{bug-hello@@gnu.org}.
  211. @cindex checklist for bug reports
  212. For bug reports, please include enough information for the maintainers
  213. to reproduce the problem. Generally speaking, that means:
  214. @itemize @bullet
  215. @item The version numbers of Hello (which you can find by running
  216. @w{@samp{hello --version}}) and any other program(s) or
  217. manual(s) involved.
  218. @item Hardware and operating system names and versions.
  219. @item The contents of any input files necessary to reproduce the bug.
  220. @item The expected behavior and/or output.
  221. @item A description of the problem and samples of any erroneous output.
  222. @item Options you gave to @command{configure} other than specifying
  223. installation directories.
  224. @item Anything else that you think would be helpful.
  225. @end itemize
  226. When in doubt whether something is needed or not, include it. It's
  227. better to include too much than to leave out something important.
  228. @cindex patches, contributing
  229. Patches are welcome; if possible, please make them with @samp{@w{diff
  230. -c}} (@pxref{Top,, Overview, diff, Comparing and Merging Files}) and
  231. include @file{ChangeLog} entries (@pxref{Change Log,,, emacs, The GNU
  232. Emacs Manual}). Please follow the existing coding style.
  233. @node GNU Free Documentation License
  234. @appendix GNU Free Documentation License
  235. @include fdl-hello.texi
  236. @node Concept index
  237. @unnumbered Concept index
  238. @printindex cp
  239. @bye