summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-07 17:34:17 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-07 17:34:17 -0700
commit3602fb0b7ba2bde9c73610693dbb50534fe42b81 (patch)
tree3a738fc259d6d55cc6b4acbb5ec07c5fe97b9202
parentc1f32dc1d4c1758065468e1f5d34707099f59f33 (diff)
downloadxorg-util-makedepend-3602fb0b7ba2bde9c73610693dbb50534fe42b81.tar.gz
Strip trailing whitespace
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--def.h18
-rw-r--r--ifparser.c26
-rw-r--r--ifparser.h26
-rw-r--r--imakemdep.h4
-rw-r--r--include.c2
-rw-r--r--main.c10
-rw-r--r--makedepend.man32
-rw-r--r--parse.c26
-rw-r--r--pr.c2
9 files changed, 73 insertions, 73 deletions
diff --git a/def.h b/def.h
index b0d0861..5683c1e 100644
--- a/def.h
+++ b/def.h
@@ -76,7 +76,7 @@ in this Software without prior written authorization from The Open Group.
extern int _debugmask;
/*
* debug levels are:
- *
+ *
* 0 show ifn*(def)*,endif
* 1 trace defined/!defined
* 2 show #include
@@ -140,7 +140,7 @@ struct symtab **isdefined(char *symbol, struct inclist *file,
struct symtab **fdefined(char *symbol, struct inclist *file,
struct inclist **srcfile);
struct filepointer *getfile(const char *file);
-void included_by(struct inclist *ip,
+void included_by(struct inclist *ip,
struct inclist *newfile);
struct inclist *newinclude(const char *newfile,
const char *incstring);
@@ -153,17 +153,17 @@ void freefile(struct filepointer *fp);
void define2(char *name, char *val, struct inclist *file);
void define(char *def, struct inclist *file);
void undefine(char *symbol, struct inclist *file);
-int find_includes(struct filepointer *filep,
- struct inclist *file,
- struct inclist *file_red,
+int find_includes(struct filepointer *filep,
+ struct inclist *file,
+ struct inclist *file_red,
int recursion, boolean failOK);
-void recursive_pr_include(struct inclist *head,
+void recursive_pr_include(struct inclist *head,
const char *file,
const char *base);
-void add_include(struct filepointer *filep,
- struct inclist *file,
- struct inclist *file_red,
+void add_include(struct filepointer *filep,
+ struct inclist *file,
+ struct inclist *file_red,
const char *include, int type,
boolean failOK);
diff --git a/ifparser.c b/ifparser.c
index 788fa14..0efa550 100644
--- a/ifparser.c
+++ b/ifparser.c
@@ -1,7 +1,7 @@
/*
*
* Copyright 1992 Network Computing Devices, Inc.
- *
+ *
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
@@ -11,7 +11,7 @@
* without specific, written prior permission. Network Computing Devices makes
* no representations about the suitability of this software for any purpose.
* It is provided ``as is'' without express or implied warranty.
- *
+ *
* NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
@@ -19,19 +19,19 @@
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
- *
+ *
* Author: Jim Fulton
* Network Computing Devices, Inc.
- *
+ *
* Simple if statement processor
*
* This module can be used to evaluate string representations of C language
* if constructs. It accepts the following grammar:
- *
+ *
* EXPRESSION := VALUE
* | VALUE BINOP EXPRESSION
* | VALUE '?' EXPRESSION ':' EXPRESSION
- *
+ *
* VALUE := '(' EXPRESSION ')'
* | '!' VALUE
* | '-' VALUE
@@ -42,7 +42,7 @@
* | # variable '(' variable-list ')'
* | variable
* | number
- *
+ *
* BINOP := '*' | '/' | '%'
* | '+' | '-'
* | '<<' | '>>'
@@ -50,12 +50,12 @@
* | '==' | '!='
* | '&' | '^' | '|'
* | '&&' | '||'
- *
+ *
* The normal C order of precedence is supported.
- *
- *
+ *
+ *
* External Entry Points:
- *
+ *
* ParseIfExpression parse a string for #if
*/
@@ -182,7 +182,7 @@ parse_value (IfParser *g, const char *cp, long *valp)
case '(':
DO (cp = ParseIfExpression (g, cp + 1, valp));
SKIPSPACE (cp);
- if (*cp != ')')
+ if (*cp != ')')
return CALLFUNC(g, handle_error) (g, cp, ")");
return cp + 1; /* skip the right paren */
@@ -273,7 +273,7 @@ parse_value (IfParser *g, const char *cp, long *valp)
cp++;
}
}
-
+
return cp;
}
diff --git a/ifparser.h b/ifparser.h
index 244d4f5..ad809d1 100644
--- a/ifparser.h
+++ b/ifparser.h
@@ -1,7 +1,7 @@
/*
*
* Copyright 1992 Network Computing Devices, Inc.
- *
+ *
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
@@ -11,7 +11,7 @@
* without specific, written prior permission. Network Computing Devices makes
* no representations about the suitability of this software for any purpose.
* It is provided ``as is'' without express or implied warranty.
- *
+ *
* NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
* IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
@@ -19,19 +19,19 @@
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
- *
+ *
* Author: Jim Fulton
* Network Computing Devices, Inc.
- *
+ *
* Simple if statement processor
*
* This module can be used to evaluate string representations of C language
* if constructs. It accepts the following grammar:
- *
+ *
* EXPRESSION := VALUE
* | VALUE BINOP EXPRESSION
* | VALUE '?' EXPRESSION ':' EXPRESSION
- *
+ *
* VALUE := '(' EXPRESSION ')'
* | '!' VALUE
* | '-' VALUE
@@ -39,7 +39,7 @@
* | 'defined' '(' variable ')'
* | variable
* | number
- *
+ *
* BINOP := '*' | '/' | '%'
* | '+' | '-'
* | '<<' | '>>'
@@ -47,12 +47,12 @@
* | '==' | '!='
* | '&' | '^' | '|'
* | '&&' | '||'
- *
+ *
* The normal C order of precedence is supported.
- *
- *
+ *
+ *
* External Entry Points:
- *
+ *
* ParseIfExpression parse a string for #if
*/
@@ -74,8 +74,8 @@ typedef struct _if_parser {
} IfParser;
const char *ParseIfExpression (
- IfParser *,
- const char *,
+ IfParser *,
+ const char *,
long *
);
diff --git a/imakemdep.h b/imakemdep.h
index 6a51914..b8117c8 100644
--- a/imakemdep.h
+++ b/imakemdep.h
@@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group.
*/
-/*
+/*
* This file contains machine-dependent constants for the imake utility.
* When porting imake, read each of the steps below and add in any necessary
* definitions. In general you should *not* edit ccimake.c or imake.c!
@@ -460,7 +460,7 @@ static const struct symtab predefs[] = {
#endif
#if defined (__BUILTIN_VA_ARG_INCR)
{"__BUILTIN_VA_ARG_INCR", "1"},
-#endif
+#endif
/* add any additional symbols before this line */
{NULL, NULL}
};
diff --git a/include.c b/include.c
index 0a4ad2a..d3fa064 100644
--- a/include.c
+++ b/include.c
@@ -116,7 +116,7 @@ remove_dotdot(char *path)
char **fp = cp + 2;
char **tp = cp;
- do
+ do
*tp++ = *fp; /* move all the pointers down */
while (*fp++);
if (cp != components)
diff --git a/main.c b/main.c
index 9520fd1..617191c 100644
--- a/main.c
+++ b/main.c
@@ -356,7 +356,7 @@ main(int argc, char *argv[])
case 'm':
warn_multiple = TRUE;
break;
-
+
/* Ignore -O, -g so we can just pass ${CFLAGS} to
makedepend
*/
@@ -534,7 +534,7 @@ main(int argc, char *argv[])
/*
* eliminate \r chars from file
*/
-static int
+static int
elim_cr(char *buf, int sz)
{
int i,wp;
@@ -650,7 +650,7 @@ char *getnextline(struct filepointer *filep)
}
whitespace = TRUE;
}
-
+
if (*p == '/' && (p+1) < eof && *(p+1) == '*') {
/* Consume C comments */
*(p++) = ' ';
@@ -678,7 +678,7 @@ char *getnextline(struct filepointer *filep)
lineno++;
}
else if (*p == '?' && (p+3) < eof &&
- *(p+1) == '?' &&
+ *(p+1) == '?' &&
*(p+2) == '/' &&
*(p+3) == '\n') {
*(p++) = ' ';
@@ -714,7 +714,7 @@ char *getnextline(struct filepointer *filep)
*(p++) = '\0';
/* punt lines with just # (yacc generated) */
- for (cp = bol+1;
+ for (cp = bol+1;
*cp && (*cp == ' ' || *cp == '\t'); cp++);
if (*cp) goto done;
--p;
diff --git a/makedepend.man b/makedepend.man
index b7ee3de..9ed961a 100644
--- a/makedepend.man
+++ b/makedepend.man
@@ -1,24 +1,24 @@
.\" Copyright (c) 1993, 1994, 1998 The Open Group
-.\"
+.\"
.\" Permission to use, copy, modify, distribute, and sell this software and its
.\" documentation for any purpose is hereby granted without fee, provided that
.\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation.
-.\"
+.\"
.\" The above copyright notice and this permission notice shall be included in
.\" all copies or substantial portions of the Software.
-.\"
+.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-.\" THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
-.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+.\" THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
.\" SOFTWARE.
-.\"
-.\" Except as contained in this notice, the name of The Open Group shall not
-.\" be used in advertising or otherwise to promote the sale, use or other
+.\"
+.\" Except as contained in this notice, the name of The Open Group shall not
+.\" be used in advertising or otherwise to promote the sale, use or other
.\" dealing in this Software without prior written authorization from The
.\" Open Group.
.\"
@@ -166,7 +166,7 @@ This places a definition for
in
.B makedepend's
symbol table.
-Without
+Without
.I =def\|
the symbol becomes defined as ``1''.
.TP 5
@@ -192,7 +192,7 @@ include directory; you can omit the
to simply prevent searching the standard include directories.
.TP 5
.B \-a
-Append the dependencies to the end of the file instead of replacing them.
+Append the dependencies to the end of the file instead of replacing them.
.TP 5
.B \-f\fImakefile\fP
Filename.
@@ -243,20 +243,20 @@ This option enables you to change this width.
.TP 5
.B \-v
Verbose operation.
-This option causes
+This option causes
.B makedepend
to emit the list of files included by each input file.
.TP 5
.B \-m
Warn about multiple inclusion.
-This option causes
+This option causes
.B makedepend
to produce a warning if any input file includes another file more than
-once. In previous versions of
+once. In previous versions of
.B makedepend
this was the default behavior; the default has been changed to better
match the behavior of the C compiler, which does not consider multiple
-inclusion to be an error. This option is provided for backward
+inclusion to be an error. This option is provided for backward
compatibility, and to aid in debugging problems related to multiple
inclusion.
.TP 5
diff --git a/parse.c b/parse.c
index fecebee..65317e2 100644
--- a/parse.c
+++ b/parse.c
@@ -99,8 +99,8 @@ gobble(struct filepointer *filep, struct inclist *file,
/*
* Decide what type of # directive this line is.
*/
-static int
-deftype (char *line, struct filepointer *filep,
+static int
+deftype (char *line, struct filepointer *filep,
struct inclist *file_red, struct inclist *file, int parse_it)
{
register char *p;
@@ -210,7 +210,7 @@ deftype (char *line, struct filepointer *filep,
(*sym) -> s_name,
(*sym) -> s_value));
/* mark file as having included a 'soft include' */
- file->i_flags |= INCLUDED_SYM;
+ file->i_flags |= INCLUDED_SYM;
}
/*
@@ -357,14 +357,14 @@ define2(char *name, char *val, struct inclist *file)
if (s2[-1] == '\0') break;
/* If exact match, set sp and break */
- if (*--s1 == *--s2)
+ if (*--s1 == *--s2)
{
sp = file->i_defs + middle;
break;
}
/* If name > i_defs[middle] ... */
- if (*s1 > *s2)
+ if (*s1 > *s2)
{
below = first;
first = middle + 1;
@@ -433,7 +433,7 @@ slookup(char *symbol, struct inclist *file)
return NULL;
last = file->i_ndefs - 1;
-
+
while (last >= first)
{
/* Fast inline binary search */
@@ -448,13 +448,13 @@ slookup(char *symbol, struct inclist *file)
if (s2[-1] == '\0') break;
/* If exact match, we're done */
- if (*--s1 == *--s2)
+ if (*--s1 == *--s2)
{
return file->i_defs + middle;
}
/* If symbol > i_defs[middle] ... */
- if (*s1 > *s2)
+ if (*s1 > *s2)
{
first = middle + 1;
}
@@ -467,7 +467,7 @@ slookup(char *symbol, struct inclist *file)
return(NULL);
}
-static int
+static int
merge2defines(struct inclist *file1, struct inclist *file2)
{
int i;
@@ -495,7 +495,7 @@ merge2defines(struct inclist *file1, struct inclist *file2)
file2->i_file, file1->i_file));
if (deflen>0)
- {
+ {
/* make sure deflen % SYMTABINC == 0 is still true */
deflen += (SYMTABINC - deflen % SYMTABINC) % SYMTABINC;
i_defs=(struct symtab**)
@@ -530,7 +530,7 @@ merge2defines(struct inclist *file1, struct inclist *file2)
if (file1->i_defs) free(file1->i_defs);
file1->i_defs=i_defs;
file1->i_ndefs=first;
-
+
return 1;
}
}
@@ -549,7 +549,7 @@ undefine(char *symbol, struct inclist *file)
}
int
-find_includes(struct filepointer *filep, struct inclist *file,
+find_includes(struct filepointer *filep, struct inclist *file,
struct inclist *file_red, int recursion, boolean failOK)
{
struct inclist *inclistp;
@@ -661,7 +661,7 @@ find_includes(struct filepointer *filep, struct inclist *file,
warning1(", line %ld: %s\n",
filep->f_line, line);
break;
-
+
case PRAGMA:
case IDENT:
case SCCS:
diff --git a/pr.c b/pr.c
index 20e3432..9a65723 100644
--- a/pr.c
+++ b/pr.c
@@ -36,7 +36,7 @@ extern boolean verbose;
extern boolean show_where_not;
void
-add_include(struct filepointer *filep, struct inclist *file,
+add_include(struct filepointer *filep, struct inclist *file,
struct inclist *file_red, const char *include, int type,
boolean failOK)
{