Skip to content

Commit

Permalink
Improve formatting of manuals.
Browse files Browse the repository at this point in the history
contrib/:
	* texi2pod.pl: Replace @@ before @{ and @}, for @samp{@@}.
	Also escape characters with grave accents, to be fixed ...
	(unmunge): ... here.
	(postprocess): Also handle @/ and @acronym{...}.

gcc/:
	* doc/contrib.texi (Contributors): Allow URL to wrap in PDF
	output.
	* doc/cppopts.texi: Fix markup of index entry.
	* doc/extend.texi (Constructing Calls): Fix markup of
	__builtin_va_arg_pack and __builtin_va_arg_pack_len definition.
	(Conditionals, C++ Comments, Pragmas, Unnamed Fields, Thread-Local)
	(Vague Linkage, C++ Attributes): Fix markup of index entries and
	keywords.
	* doc/invoke.texi (Option Summary): Fix spacing.  Rewrap to
	avoid long lines.
	(C Dialect Options, C++ Dialect Options, Warning Options)
	(Debugging Options, Spec Files, Darwin Options)
	(i386 and x86-64 Options, MIPS Options)
	(RS/6000 and PowerPC Options, Code Gen Options): Fix markup of
	index entries, avoid abbreviations, allow URLs to wrap, avoid
	long lines, avoid overlong pages from long @itemx lists.
	* doc/objc.texi (Garbage Collection): Allow URLs to wrap.
	* doc/standards.texi (Standards): Likewise.
	* doc/trouble.texi (Incompatibilities): Fix markup of index
	entry.

gcc/fortran/:
	* gfortran.texi (Argument list functions): Allow URL to wrap.
	* intrinsic.texi (GETGID, GETPID, GETUID, IMAGE_INDEX)
	(IS_IOSTAT_END, IS_IOSTAT_EOR, NUM_IMAGES, THIS_IMAGE)
	(ISO_FORTRAN_ENV): Fix markup in index entries, and a couple of
	code markups in the text.
	* invoke.texi (Fortran Dialect Options)
	(Error and Warning Options, Directory Options, Code Gen Options):
	Likewise.  Remove @code inside @smallexample.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164533 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
rwild committed Sep 22, 2010
1 parent e62df35 commit 1278672
Show file tree
Hide file tree
Showing 14 changed files with 159 additions and 95 deletions.
7 changes: 7 additions & 0 deletions contrib/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2010-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

* texi2pod.pl: Replace @@ before @{ and @}, for @samp{@@}.
Also escape characters with grave accents, to be fixed ...
(unmunge): ... here.
(postprocess): Also handle @/ and @acronym{...}.

2010-07-02 Sebastian Pop <sebastian.pop@amd.com>

* check_GNU_style.sh: Do not print warning messages when there are
Expand Down
9 changes: 7 additions & 2 deletions contrib/texi2pod.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/perl -w

# Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2001, 2003, 2010 Free Software Foundation, Inc.

# This file is part of GCC.

Expand Down Expand Up @@ -213,10 +213,12 @@

# Now the ones that have to be replaced by special escapes
# (which will be turned back into text by unmunge())
# Replace @@ before @{ and @} in order to parse @samp{@@} correctly.
s/&/&amp;/g;
s/\@\@/&at;/g;
s/\@\{/&lbrace;/g;
s/\@\}/&rbrace;/g;
s/\@\@/&at;/g;
s/\@`\{(.)\}/&$1grave;/g;

# Inside a verbatim block, handle @var, @samp and @url specially.
if ($shift ne "") {
Expand Down Expand Up @@ -391,9 +393,11 @@ sub postprocess
s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g;
s/\@(?:samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g;
s/\@sc\{([^\}]*)\}/\U$1/g;
s/\@acronym\{([^\}]*)\}/\U$1/g;
s/\@file\{([^\}]*)\}/F<$1>/g;
s/\@w\{([^\}]*)\}/S<$1>/g;
s/\@(?:dmn|math)\{([^\}]*)\}/$1/g;
s/\@\///g;

# keep references of the form @ref{...}, print them bold
s/\@(?:ref)\{([^\}]*)\}/B<$1>/g;
Expand Down Expand Up @@ -462,6 +466,7 @@ sub unmunge
# Replace escaped symbols with their equivalents.
local $_ = $_[0];

s/&(.)grave;/E<$1grave>/g;
s/&lt;/E<lt>/g;
s/&gt;/E<gt>/g;
s/&lbrace;/\{/g;
Expand Down
23 changes: 23 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
2010-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

* doc/contrib.texi (Contributors): Allow URL to wrap in PDF
output.
* doc/cppopts.texi: Fix markup of index entry.
* doc/extend.texi (Constructing Calls): Fix markup of
__builtin_va_arg_pack and __builtin_va_arg_pack_len definition.
(Conditionals, C++ Comments, Pragmas, Unnamed Fields, Thread-Local)
(Vague Linkage, C++ Attributes): Fix markup of index entries and
keywords.
* doc/invoke.texi (Option Summary): Fix spacing. Rewrap to
avoid long lines.
(C Dialect Options, C++ Dialect Options, Warning Options)
(Debugging Options, Spec Files, Darwin Options)
(i386 and x86-64 Options, MIPS Options)
(RS/6000 and PowerPC Options, Code Gen Options): Fix markup of
index entries, avoid abbreviations, allow URLs to wrap, avoid
long lines, avoid overlong pages from long @itemx lists.
* doc/objc.texi (Garbage Collection): Allow URLs to wrap.
* doc/standards.texi (Standards): Likewise.
* doc/trouble.texi (Incompatibilities): Fix markup of index
entry.

2010-09-22 Joseph Myers <joseph@codesourcery.com>

* opts-common.c (prune_options): Make static. Work with decoded
Expand Down
2 changes: 1 addition & 1 deletion gcc/doc/contrib.texi
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Janne Blomqvist for contributions to GNU Fortran.
Segher Boessenkool for various fixes.

@item
Hans-J. Boehm for his @uref{http://www.hpl.hp.com/personal/Hans_Boehm/gc/,,
Hans-J. Boehm for his @uref{http://www.hpl.hp.com/@/personal/@/Hans_Boehm/@/gc/,,
garbage collector}, IA-64 libffi port, and other Java work.

@item
Expand Down
4 changes: 2 additions & 2 deletions gcc/doc/cppopts.texi
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ without @samp{-pedantic} but treats as warnings.

@item -M
@opindex M
@cindex make
@cindex dependencies, make
@cindex @command{make}
@cindex dependencies, @command{make}
Instead of outputting the result of preprocessing, output a rule
suitable for @command{make} describing the dependencies of the main
source file. The preprocessor outputs one @command{make} rule containing
Expand Down
30 changes: 15 additions & 15 deletions gcc/doc/extend.texi
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ the containing function. You should specify, for @var{result}, a value
returned by @code{__builtin_apply}.
@end deftypefn

@deftypefn {Built-in Function} __builtin_va_arg_pack ()
@deftypefn {Built-in Function} {} __builtin_va_arg_pack ()
This built-in function represents all anonymous arguments of an inline
function. It can be used only in inline functions which will be always
inlined, never compiled as a separate function, such as those using
Expand All @@ -594,7 +594,7 @@ myprintf (FILE *f, const char *format, ...)
@end smallexample
@end deftypefn

@deftypefn {Built-in Function} __builtin_va_arg_pack_len ()
@deftypefn {Built-in Function} {size_t} __builtin_va_arg_pack_len ()
This built-in function returns the number of anonymous arguments of
an inline function. It can be used only in inline functions which
will be always inlined, never compiled as a separate function, such
Expand Down Expand Up @@ -796,8 +796,8 @@ This example is perfectly equivalent to
x ? x : y
@end smallexample

@cindex side effect in ?:
@cindex ?: side effect
@cindex side effect in @code{?:}
@cindex @code{?:} side effect
@noindent
In this simple case, the ability to omit the middle operand is not
especially useful. When it becomes useful is when the first operand does,
Expand Down Expand Up @@ -3900,7 +3900,7 @@ extension is irrelevant.

@node C++ Comments
@section C++ Style Comments
@cindex //
@cindex @code{//}
@cindex C++ comments
@cindex comments, C++ style

Expand Down Expand Up @@ -12370,7 +12370,7 @@ bit-fields. See the Solaris man page for @code{cmn_err} for more information.
@node Pragmas
@section Pragmas Accepted by GCC
@cindex pragmas
@cindex #pragma
@cindex @code{#pragma}

GCC supports several types of pragmas, primarily in order to compile
code originally written for other compilers. Note that in general
Expand Down Expand Up @@ -12936,8 +12936,8 @@ versions earlier than 4.4.

@node Unnamed Fields
@section Unnamed struct/union fields within structs/unions
@cindex struct
@cindex union
@cindex @code{struct}
@cindex @code{union}

As permitted by ISO C1X and for compatibility with other compilers,
GCC allows you to define
Expand Down Expand Up @@ -12989,7 +12989,7 @@ previously defined structure or union type with a tag.
@section Thread-Local Storage
@cindex Thread-Local Storage
@cindex @acronym{TLS}
@cindex __thread
@cindex @code{__thread}

Thread-local storage (@acronym{TLS}) is a mechanism by which variables
are allocated such that there is one instance of the variable per extant
Expand Down Expand Up @@ -13442,15 +13442,15 @@ vtable will still be emitted in every translation unit which defines it.
Make sure that any inline virtuals are declared inline in the class
body, even if they are not defined there.

@item type_info objects
@cindex type_info
@item @code{type_info} objects
@cindex @code{type_info}
@cindex RTTI
C++ requires information about types to be written out in order to
implement @samp{dynamic_cast}, @samp{typeid} and exception handling.
For polymorphic classes (classes with virtual functions), the type_info
For polymorphic classes (classes with virtual functions), the @samp{type_info}
object is written out along with the vtable so that @samp{dynamic_cast}
can determine the dynamic type of a class object at runtime. For all
other types, we write out the type_info object when it is used: when
other types, we write out the @samp{type_info} object when it is used: when
applying @samp{typeid} to an expression, throwing an object, or
referring to a type in a catch clause or exception specification.

Expand Down Expand Up @@ -13770,7 +13770,7 @@ Some attributes only make sense for C++ programs.

@table @code
@item init_priority (@var{priority})
@cindex init_priority attribute
@cindex @code{init_priority} attribute


In Standard C++, objects defined at namespace scope are guaranteed to be
Expand All @@ -13795,7 +13795,7 @@ Note that the particular values of @var{priority} do not matter; only their
relative ordering.

@item java_interface
@cindex java_interface attribute
@cindex @code{java_interface} attribute

This type attribute informs C++ that the class is a Java interface. It may
only be applied to classes declared within an @code{extern "Java"} block.
Expand Down
Loading

0 comments on commit 1278672

Please sign in to comment.