summaryrefslogtreecommitdiff
path: root/doc/scripts
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-10-22 17:27:57 +0200
committerSimon Josefsson <simon@josefsson.org>2008-10-22 17:27:57 +0200
commita71df0a23d8bbd17e30fb0d527df087e8cf28f10 (patch)
treea9b38c0d9a316525613b788a5974573f7f9f5444 /doc/scripts
parent8b228ee855c608c333dc470b9daa9693f99e137a (diff)
downloadgnutls-a71df0a23d8bbd17e30fb0d527df087e8cf28f10.tar.gz
Sync gdoc with libidn for license fixes.
Diffstat (limited to 'doc/scripts')
-rwxr-xr-xdoc/scripts/gdoc68
1 files changed, 30 insertions, 38 deletions
diff --git a/doc/scripts/gdoc b/doc/scripts/gdoc
index 09b154a4c5..c00f0cd252 100755
--- a/doc/scripts/gdoc
+++ b/doc/scripts/gdoc
@@ -1,23 +1,28 @@
#!/usr/bin/perl
-## Copyright (c) 2002, 2003, 2004, 2005, 2006 Simon Josefsson ##
-## added -texinfo, -listfunc ##
-## man page revamp ##
-## various improvements ##
-## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
-## hacked to allow -tex option --nmav ##
-## ##
-## This software falls under the GNU Public License. Please read ##
-## the COPYING file for more information ##
-
+## Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Simon Josefsson
+## added -texinfo, -listfunc
+## man page revamp
+## various improvements
+## Copyright (c) 2001, 2002 Nikos Mavrogiannopoulos
+## added -tex
+## Copyright (c) 1998 Michael Zucchi
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-# This will read a 'c' file and scan for embedded comments in the
-# style of gnome comments (+minor extensions - see below).
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# This program is modified by Nikos Mavroyanopoulos, for the gnutls
-# project.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Note: This only supports 'c'.
+# This will read a C source code file and scan for embedded comments
+# in the style of gnome comments (+minor extensions - see below).
# usage:
# gdoc [ -docbook | -html | -text | -man | -tex | -texinfo | -listfunc ]
@@ -306,24 +311,6 @@ sub repstr {
$return;
}
-sub output_highlight {
- my $contents = join "\n", @_;
- my $line;
-
- foreach $pattern (keys %highlights) {
-# print "scanning pattern $pattern ($highlights{$pattern})\n";
- $contents =~ s:$pattern:repstr($pattern, $highlights{$pattern}, $1, $2, $3, $4):gse;
- }
- foreach $line (split "\n", $contents) {
- if ($line eq ""){
- print $lineprefix, $blankline;
- } else {
- print $lineprefix, $line;
- }
- print "\n";
- }
-}
-
sub just_highlight {
my $contents = join "\n", @_;
my $line;
@@ -345,6 +332,10 @@ sub just_highlight {
return $ret;
}
+sub output_highlight {
+ print (just_highlight (@_));
+}
+
# output in texinfo
sub output_texinfo {
my %args = %{$_[0]};
@@ -628,7 +619,9 @@ sub output_man {
print ".SH ARGUMENTS\n";
foreach $parameter (@{$args{'parameterlist'}}) {
print ".IP \"".$args{'parametertypes'}{$parameter}." ".$parameter."\" 12\n";
- output_highlight($args{'parameters'}{$parameter});
+ $param = $args{'parameters'}{$parameter};
+ $param =~ s/-/\\-/g;
+ output_highlight($param);
}
foreach $section (@{$args{'sectionlist'}}) {
print ".SH \"" . uc($section) . "\"\n";
@@ -647,9 +640,9 @@ sub output_man {
print "Copyright \\(co ". $args{'copyright'} . ".\n";
if ($args{'verbatimcopying'}) {
print ".br\n";
- print "Permission is granted to make and distribute verbatim copies of this\n";
- print "manual provided the copyright notice and this permission notice are\n";
- print "preserved on all copies.\n";
+ print "Copying and distribution of this file, with or without modification,\n";
+ print "are permitted in any medium without royalty provided the copyright\n";
+ print "notice and this notice are preserved.\n";
}
}
@@ -902,4 +895,3 @@ foreach $file (@ARGV) {
}
}
}
-