Skip to content

Commit

Permalink
Massive change to all C sources:
Browse files Browse the repository at this point in the history
*) All function definitions in ANSI style
*) K&R compatible signature in terminal API functions: no char or BOOLEAN args!
*) All trailing whitespace removed.
broeker committed Jul 1, 2004
1 parent bd3fdc0 commit a3ea2b2
Showing 205 changed files with 23,442 additions and 24,390 deletions.
13,230 changes: 8 additions & 13,222 deletions ChangeLog

Large diffs are not rendered by default.

13,222 changes: 13,222 additions & 0 deletions ChangeLog.0

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion PATCHLEVEL
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1
2
8 changes: 4 additions & 4 deletions config/term_pc.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $Id: term_pc.h,v 1.3 2004/04/13 17:23:30 broeker Exp $
* $Id: term_pc.h,v 1.4 2004/07/01 17:10:02 broeker Exp $
*
*/

@@ -39,9 +39,9 @@
* term.h: terminal support definitions
* Edit this file depending on the set of terminals you wish to support.
* Comment out the terminal types that you don't want or don't have, and
* uncomment those that you want included. Be aware that some terminal
* types (eg, SUN, UNIXPLOT) will require changes in the makefile
* LIBS definition.
* uncomment those that you want included. Be aware that some terminal
* types (eg, SUN, UNIXPLOT) will require changes in the makefile
* LIBS definition.
*/

/*
8 changes: 4 additions & 4 deletions docs/checkdoc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static char *RCSid() { return RCSid("$Id: checkdoc.c,v 1.12 2004/04/13 17:23:30 broeker Exp $"); }
static char *RCSid() { return RCSid("$Id: checkdoc.c,v 1.13 2004/07/01 17:10:03 broeker Exp $"); }
#endif

/* GNUPLOT - checkdoc.c */
@@ -35,14 +35,14 @@ static char *RCSid() { return RCSid("$Id: checkdoc.c,v 1.12 2004/04/13 17:23:30
]*/

/*
* checkdoc -- check a doc file for correctness of first column.
* checkdoc -- check a doc file for correctness of first column.
*
* Prints out lines that have an illegal first character.
* First character must be space, digit, or ?, @, #, %,
* First character must be space, digit, or ?, @, #, %,
* or line must be empty.
*
* usage: checkdoc [docfile]
* Modified by Russell Lang from hlp2ms.c by Thomas Williams
* Modified by Russell Lang from hlp2ms.c by Thomas Williams
*
* Original version by David Kotz used the following one line script!
* sed -e '/^$/d' -e '/^[ 0-9?@#%]/d' gnuplot.doc
4 changes: 2 additions & 2 deletions docs/doc2gih.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static char *RCSid() { return RCSid("$Id: doc2gih.c,v 1.13 2004/04/13 17:23:30 broeker Exp $"); }
static char *RCSid() { return RCSid("$Id: doc2gih.c,v 1.14 2004/07/01 17:10:03 broeker Exp $"); }
#endif

/* GNUPLOT - doc2gih.c */
@@ -40,7 +40,7 @@ static char *RCSid() { return RCSid("$Id: doc2gih.c,v 1.13 2004/04/13 17:23:30 b
*
* This involves stripping all lines with a leading digit or
* a leading @, #, or %.
* Modified by Russell Lang from hlp2ms.c by Thomas Williams
* Modified by Russell Lang from hlp2ms.c by Thomas Williams
*
* usage: doc2gih [file.doc [file.gih]]
*
6 changes: 3 additions & 3 deletions docs/doc2hlp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static char *RCSid() { return RCSid("$Id: doc2hlp.c,v 1.14 2004/04/13 17:23:30 broeker Exp $"); }
static char *RCSid() { return RCSid("$Id: doc2hlp.c,v 1.15 2004/07/01 17:10:03 broeker Exp $"); }
#endif

/* GNUPLOT - doc2hlp.c */
@@ -35,12 +35,12 @@ static char *RCSid() { return RCSid("$Id: doc2hlp.c,v 1.14 2004/04/13 17:23:30 b
]*/

/*
* doc2hlp.c -- program to convert Gnuplot .DOC format to
* doc2hlp.c -- program to convert Gnuplot .DOC format to
* VMS help (.HLP) format.
*
* This involves stripping all lines with a leading ?,
* @, #, or %.
* Modified by Russell Lang from hlp2ms.c by Thomas Williams
* Modified by Russell Lang from hlp2ms.c by Thomas Williams
*
* usage: doc2hlp [file.doc [file.hlp]]
*
6 changes: 3 additions & 3 deletions docs/doc2ipf.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static char *RCSid() { return RCSid("$Id: doc2ipf.c,v 1.16 2004/04/13 17:23:30 broeker Exp $"); }
static char *RCSid() { return RCSid("$Id: doc2ipf.c,v 1.17 2004/07/01 17:10:03 broeker Exp $"); }
#endif

/* GNUPLOT - doc2ipf.c */
@@ -38,7 +38,7 @@ static char *RCSid() { return RCSid("$Id: doc2ipf.c,v 1.16 2004/04/13 17:23:30 b
* doc2ipf.c -- program to convert Gnuplot .DOC format to OS/2
* ipfc (.inf/.hlp) format.
*
* Modified by Roger Fearick from doc2rtf by M Castro
* Modified by Roger Fearick from doc2rtf by M Castro
*
* usage: doc2ipf gnuplot.doc gnuplot.ipf
*
@@ -267,7 +267,7 @@ process_line(char *line, FILE *b)
break;

case '.':
/* Makes code less readable but fixes warnings like
/* Makes code less readable but fixes warnings like
<..\docs\gnuplot.ipf:6546> Warning 204: Invalid macro [.gnuplot_iris4d]
which seems to be triggered by a '.' character in the first column?! */
strcpy(line2+j, "&per.");
4 changes: 2 additions & 2 deletions docs/doc2ms.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static char *RCSid() { return RCSid("$Id: doc2ms.c,v 1.16 2004/04/13 17:23:30 broeker Exp $"); }
static char *RCSid() { return RCSid("$Id: doc2ms.c,v 1.17 2004/07/01 17:10:03 broeker Exp $"); }
#endif

/* GNUPLOT - doc2ms.c */
@@ -36,7 +36,7 @@ static char *RCSid() { return RCSid("$Id: doc2ms.c,v 1.16 2004/04/13 17:23:30 br

/*
* doc2ms.c -- program to convert Gnuplot .DOC format to *roff -ms document
* From hlp2ms by Thomas Williams
* From hlp2ms by Thomas Williams
*
* Modified by Russell Lang, 2nd October 1989
* to make vms help level 1 and 2 create the same ms section level.
36 changes: 18 additions & 18 deletions docs/doc2rnh.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static char *RCSid() { return RCSid("$Id: doc2rnh.c,v 1.14 2004/04/13 17:23:30 broeker Exp $"); }
static char *RCSid() { return RCSid("$Id: doc2rnh.c,v 1.15 2004/07/01 17:10:03 broeker Exp $"); }
#endif

/* GNUPLOT - doc2rnh.c */
@@ -35,12 +35,12 @@ static char *RCSid() { return RCSid("$Id: doc2rnh.c,v 1.14 2004/04/13 17:23:30 b
]*/

/*
* doc2rnh.c -- program to convert Gnuplot .DOC format to
* doc2rnh.c -- program to convert Gnuplot .DOC format to
* Digital Standard Runoff for VMS HELP files
* (gnuplot.doc, including the terminal documentation
* is no longer formated for VMS HELP by default)
*
* From hlp2ms by Thomas Williams
*
* From hlp2ms by Thomas Williams
*
* Modified by Russell Lang, 2nd October 1989
* to make vms help level 1 and 2 create the same ms section level.
@@ -51,14 +51,14 @@ static char *RCSid() { return RCSid("$Id: doc2rnh.c,v 1.14 2004/04/13 17:23:30 b
* Adapted from doc2ms.c (the unix 'runoff' text-processor)
* by Lucas Hart 3/97
*
* right margin is adjusted two spaces for each level to compensate
* right margin is adjusted two spaces for each level to compensate
* for the indentation by VMS HELP
*
* the page width can be adjusted by changing the value of DSR_RM
* the page width can be adjusted by changing the value of DSR_RM
* usage: $ MCR []doc2rnh gnuplot.doc gnuplot.rnh
* $ RUNOFF gnuplot.rnh
*
*
*
*/

#ifdef HAVE_CONFIG_H
@@ -187,18 +187,18 @@ process_line(char *line, FILE *b)
* other than period (command indicator) in first column
*
* However, for ease of maintainence, two tables have sublevels
* and descriptions, corresponding to the printed table entries,
* and descriptions, corresponding to the printed table entries,
* encapsulated by the table markers. Therefore we need to
* do some more work.
*
* Doc2hlp just ignores the table headings and treats
* lower levels irrespectively, but we need to break
* the level designators out of the table format.
* the level designators out of the table format.
*
* The first entry in a table will have either
* The first entry in a table will have either
* - a level number in the first column => remainder of text in
* table is help text
* - spaces in the first two columns => rest of text is literal
* table is help text
* - spaces in the first two columns => rest of text is literal
* to be placed in table format
*
*/
@@ -276,7 +276,7 @@ section(char *line, FILE *b)
{
int sh_i;
static int old = 1;
/*
/*
(void) sscanf(line,"%d",&sh_i);
*
* check to make sure this works with terminals also
@@ -296,7 +296,7 @@ section(char *line, FILE *b)
}
/* added by dfk to capitalize section headers */
/* Header name starts at [2] */
/* omit for online documentation
/* omit for online documentation
* if (islower(line[2]))
* line[2] = toupper(line[2]);
*/
@@ -309,7 +309,7 @@ section(char *line, FILE *b)

/*
* dummy function in case we need to convert some characters in
* output string ala doc2tex and doc2ms
* output string ala doc2tex and doc2ms
*/

void
@@ -318,11 +318,11 @@ putrnh(char *s, FILE *file)
(void) fputs(s, file);
}

/*
/*
* LBR$OUTPUT_HELP treats spaces and "/"s as list separators for topics,
* but they are used in gnuplot.doc for the printed docs; convert to
* "_" and "|" Modeled after section heading conversions in doc2tex
* and doc2ms.
* "_" and "|" Modeled after section heading conversions in doc2tex
* and doc2ms.
*
*/

4 changes: 2 additions & 2 deletions docs/doc2rtf.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static char *RCSid() { return RCSid("$Id: doc2rtf.c,v 1.13 2004/04/13 17:23:30 broeker Exp $"); }
static char *RCSid() { return RCSid("$Id: doc2rtf.c,v 1.14 2004/07/01 17:10:03 broeker Exp $"); }
#endif

/* GNUPLOT - doc2rtf.c */
@@ -40,7 +40,7 @@ static char *RCSid() { return RCSid("$Id: doc2rtf.c,v 1.13 2004/04/13 17:23:30 b
*
* This involves stripping all lines with a leading digit or
* a leading @, #, or %.
* Modified by Maurice Castro from doc2gih.c by Thomas Williams
* Modified by Maurice Castro from doc2gih.c by Thomas Williams
*
* usage: doc2rtf file.doc file.rtf [-d]
*
40 changes: 20 additions & 20 deletions docs/doc2tex.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static char *RCSid() { return RCSid("$Id: doc2tex.c,v 1.16 2004/04/13 17:23:30 broeker Exp $"); }
static char *RCSid() { return RCSid("$Id: doc2tex.c,v 1.17 2004/07/01 17:10:03 broeker Exp $"); }
#endif

/* GNUPLOT - doc2tex.c */
@@ -36,8 +36,8 @@ static char *RCSid() { return RCSid("$Id: doc2tex.c,v 1.16 2004/04/13 17:23:30 b

/*
* doc2tex.c -- program to convert Gnuplot .DOC format to LaTeX document
* Also will work for VMS .HLP files.
* Modified by Russell Lang from hlp2ms.c by Thomas Williams
* Also will work for VMS .HLP files.
* Modified by Russell Lang from hlp2ms.c by Thomas Williams
* Extended by David Kotz to support quotes ("), backquotes, tables.
* Extended by Jens Emmerich to handle '_', '---', paired single
* quotes. Changed "-handling. Added pre/post-verbatim hooks.
@@ -50,7 +50,7 @@ static char *RCSid() { return RCSid("$Id: doc2tex.c,v 1.16 2004/04/13 17:23:30 b
*
* typical usage for GNUPLOT:
*
* doc2tex gnuplot.doc gnuplot.tex
* doc2tex gnuplot.doc gnuplot.tex
* latex gnuplot.tex ; latex gnuplot.tex
*/

@@ -178,32 +178,32 @@ process_line( char *line, FILE *b)
/* convert '^ <a href="#xxx"></a> to '\ref{xxx}' */
/* convert '^ <a name="xxx"></a> to '\label{xxx}' */
switch (line[3]) {
case 'a':{
case 'a':{
switch (line[5]) {
case 'h':{
case 'h':{
if (line[11] == '#') {
fputs("{\\bf ",b);
parsed = 0;
parsed = 0;
for (i = 12; (c = line[i]) != '"'; i++) {
string[i-12] = c;
}
}
string[i-12]= NUL;
i++;i++;
for ( ; i < initlen-5; i++) {
fputc(line[i],b);
}
fputs(" (p.~\\pageref{",b);
fputs(" (p.~\\pageref{",b);
fputs(string,b);
fputs("})}} ",b);
inhref = FALSE;
} else {
} else {
inhref = TRUE;
if (strstr(line,"</a>") == NULL){
fputs("\\par\\hskip2.7em\\href{",b);
} else {
fputs("\\href{",b);
}
parsed = 0;
parsed = 0;
for (i = 11; i < initlen-1 ; i++){
c = line[i];
if (c == '"') {
@@ -220,22 +220,22 @@ process_line( char *line, FILE *b)
inhref = FALSE;
} else {
fputc(c,b);
}
}
}
}
}
break;
}
case 'n': {
case 'n': {
fputs("\\label{",b);
for (i = 11; (c = *(line +i)) != '"'; i++) {
fputc(c,b);
}
fputs("}\n",b);
break;
}
default:
default:
break;
}
}
break;
}
case '/':
@@ -326,7 +326,7 @@ section(char *line, FILE *b)
break;
case 6:
(void) fprintf(b, "\\paragraph{");
break;
break;
default:
break;

@@ -398,7 +398,7 @@ puttex( char *str, FILE *file)
(void) fputs(" (p.~\\pageref{", file);
(void) fputs(string, file);
(void) fputs("})", file);
/* see = FALSE; */
/* see = FALSE; */
}
(void) fputs("}", file);
inquote = FALSE;
@@ -408,7 +408,7 @@ puttex( char *str, FILE *file)
string[i] = c;
}
string[i] = NUL;
inquote = TRUE;
inquote = TRUE;
}
break;
case '_': /* emphasised text ? */
@@ -428,7 +428,7 @@ puttex( char *str, FILE *file)
case 's': /* find backquote after 'see' {see `} */
case 'S':
(void) fputc(ch, file);
if ( str[0] == 'e' && str[1] == 'e' && isspace(str[2])){
if ( str[0] == 'e' && str[1] == 'e' && isspace(str[2])){
see = TRUE;
}
break;
Loading

0 comments on commit a3ea2b2

Please sign in to comment.