whitespace clean up.
authorBenoît Dejean <bdejean@src.gnome.org>
Wed, 9 Jun 2004 18:52:21 +0000 (18:52 +0000)
committerBenoît Dejean <bdejean@src.gnome.org>
Wed, 9 Jun 2004 18:52:21 +0000 (18:52 +0000)
* *.{c,h} : whitespace clean up.

svn path=/trunk/; revision=3450

15 files changed:
support/canonicalize.c
support/error.c
support/findme.c
support/findme.h
support/getopt.c
support/getopt1.c
support/popt-gnome.h
support/poptconfig.c
support/popthelp.c
support/poptint.h
support/poptparse.c
support/strerror.c
support/strtod.c
support/system.h
support/vasprintf.c

index a04a0ec..2ff2284 100644 (file)
@@ -189,7 +189,7 @@ realpath (const char *name, char *resolved)
       set_errno (EINVAL);
       return NULL;
     }
-       
+
   return canonicalize (name, resolved);
 }
 
index b0264bc..3e77b31 100644 (file)
@@ -169,7 +169,7 @@ error (status, errnum, message, va_alist)
   if (status)
     exit (status);
 }
-\f
+
 /* Sometimes we want to have at most one error per line.  This
    variable controls whether this mode is selected or not.  */
 int error_one_per_line;
index 6d1b41c..36d0447 100644 (file)
@@ -1,5 +1,5 @@
 /* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
+   file accompanying popt source distributions, available from
    ftp://ftp.redhat.com/pub/code/popt */
 
 #include "system.h"
@@ -31,7 +31,7 @@ const char * findProgramPath(const char * argv0) {
        if (!access(buf, X_OK))
            return buf;
 
-       if (chptr) 
+       if (chptr)
            start = chptr + 1;
        else
            start = NULL;
index 5e93963..066e228 100644 (file)
@@ -1,5 +1,5 @@
 /* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
+   file accompanying popt source distributions, available from
    ftp://ftp.redhat.com/pub/code/popt */
 
 #ifndef H_FINDME
index 3199925..c1a384f 100644 (file)
@@ -20,7 +20,7 @@
    License along with the GNU C Library; see the file COPYING.LIB.  If not,
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
-\f
+
 /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
    Ditto for AIX 3.2 and <stdlib.h>.  */
 #ifndef _NO_PROTO
@@ -188,7 +188,7 @@ static enum
 
 /* Value of POSIXLY_CORRECT environment variable.  */
 static char *posixly_correct;
-\f
+
 #ifdef __GNU_LIBRARY__
 /* We want to avoid inclusion of string.h with non-GNU libraries
    because there are many ways it can cause trouble.
@@ -230,7 +230,7 @@ extern int strlen (const char *);
 #endif /* __GNUC__ */
 
 #endif /* not __GNU_LIBRARY__ */
-\f
+
 /* Handle permutation of arguments.  */
 
 /* Describe the part of ARGV that contains non-options that have
@@ -443,7 +443,7 @@ _getopt_initialize (argc, argv, optstring)
 
   return optstring;
 }
-\f
+
 /* Scan elements of ARGV (whose length is ARGC) for option characters
    given in OPTSTRING.
 
@@ -967,7 +967,7 @@ getopt (argc, argv, optstring)
 }
 
 #endif /* Not ELIDE_CODE.  */
-\f
+
 #ifdef TEST
 
 /* Compile with -DTEST to make an executable for use in testing
index 4aa8de6..f60f121 100644 (file)
@@ -16,7 +16,7 @@
    License along with the GNU C Library; see the file COPYING.LIB.  If not,
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
-\f
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -91,7 +91,7 @@ getopt_long_only (argc, argv, options, long_options, opt_index)
 
 
 #endif /* Not ELIDE_CODE.  */
-\f
+
 #ifdef TEST
 
 #include <stdio.h>
index 5046fad..1f7aa90 100644 (file)
@@ -1,5 +1,5 @@
 /* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
+   file accompanying popt source distributions, available from
    ftp://ftp.redhat.com/pub/code/popt */
 
 #ifndef H_POPT
@@ -19,8 +19,8 @@ extern "C" {
 #define POPT_ARG_LONG          3
 #define POPT_ARG_INCLUDE_TABLE 4       /* arg points to table */
 #define POPT_ARG_CALLBACK      5       /* table-wide callback... must be
-                                          set first in table; arg points 
-                                          to callback, descrip points to 
+                                          set first in table; arg points
+                                          to callback, descrip points to
                                           callback data to pass */
 #define POPT_ARG_INTL_DOMAIN    6       /* set the translation domain
                                           for this table and any
@@ -77,10 +77,10 @@ typedef struct poptContext_s * poptContext;
 typedef struct poptOption * poptOption;
 #endif
 
-enum poptCallbackReason { POPT_CALLBACK_REASON_PRE, 
+enum poptCallbackReason { POPT_CALLBACK_REASON_PRE,
                          POPT_CALLBACK_REASON_POST,
                          POPT_CALLBACK_REASON_OPTION };
-typedef void (*poptCallbackType)(poptContext con, 
+typedef void (*poptCallbackType)(poptContext con,
                                 enum poptCallbackReason reason,
                                 const struct poptOption * opt,
                                 const char * arg, const void * data);
@@ -104,7 +104,7 @@ void poptFreeContext( /*@only@*/ poptContext con);
 int poptStuffArgs(poptContext con, /*@keep@*/ const char ** argv);
 int poptAddAlias(poptContext con, struct poptAlias alias, int flags);
 int poptReadConfigFile(poptContext con, const char * fn);
-/* like above, but reads /etc/popt and $HOME/.popt along with environment 
+/* like above, but reads /etc/popt and $HOME/.popt along with environment
    vars */
 int poptReadDefaultConfig(poptContext con, int useEnv);
 /* argv should be freed -- this allows ', ", and \ quoting, but ' is treated
index 7a1a4c2..094d588 100644 (file)
@@ -1,5 +1,5 @@
 /* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
+   file accompanying popt source distributions, available from
    ftp://ftp.redhat.com/pub/code/popt */
 
 #include "system.h"
@@ -12,7 +12,7 @@ static void configLine(poptContext con, char * line) {
     char * entryType;
     char * longName = NULL;
     char shortName = '\0';
-    
+
     if (strncmp(line, con->appName, nameLength)) return;
     line += nameLength;
     if (!*line || !isspace(*line)) return;
@@ -49,7 +49,7 @@ static void configLine(poptContext con, char * line) {
 
        con->execs[con->numExecs].shortName = shortName;
        con->execs[con->numExecs].script = xstrdup(line);
-       
+
        con->numExecs++;
     }
 }
@@ -64,7 +64,7 @@ int poptReadConfigFile(poptContext con, const char * fn) {
     if (fd < 0) {
        if (errno == ENOENT)
            return 0;
-       else 
+       else
            return POPT_ERROR_ERRNO;
     }
 
@@ -98,8 +98,8 @@ int poptReadConfigFile(poptContext con, const char * fn) {
          case '\\':
            *dst++ = *chptr++;
            if (chptr < end) {
-               if (*chptr == '\n') 
-                   dst--, chptr++;     
+               if (*chptr == '\n')
+                   dst--, chptr++;
                    /* \ at the end of a line does not insert a \n */
                else
                    *dst++ = *chptr++;
index c36ecea..dae3d94 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
 
 /* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
+   file accompanying popt source distributions, available from
    ftp://ftp.redhat.com/pub/code/popt */
 
 #include "system.h"
@@ -9,7 +9,7 @@
 
 static void displayArgs(poptContext con,
                /*@unused@*/ enum poptCallbackReason foo,
-               struct poptOption * key, 
+               struct poptOption * key,
                /*@unused@*/ const char * arg, /*@unused@*/ void * data) {
     if (key->shortName== '?')
        poptPrintHelp(con, stdout, 0);
@@ -53,7 +53,7 @@ getArgDescrip(const struct poptOption * opt, const char *translation_domain)
     return POPT_("ARG");
 }
 
-static void singleOptionHelp(FILE * f, int maxLeftCol, 
+static void singleOptionHelp(FILE * f, int maxLeftCol,
                             const struct poptOption * opt,
                             const char *translation_domain) {
     int indentLength = maxLeftCol + 5;
@@ -70,7 +70,7 @@ static void singleOptionHelp(FILE * f, int maxLeftCol,
 
     if (opt->longName && opt->shortName)
        sprintf(left, "-%c, --%s", opt->shortName, opt->longName);
-    else if (opt->shortName) 
+    else if (opt->shortName)
        sprintf(left, "-%c", opt->shortName);
     else if (opt->longName)
        sprintf(left, "--%s", opt->longName);
@@ -83,7 +83,7 @@ static void singleOptionHelp(FILE * f, int maxLeftCol,
     if (help)
        fprintf(f,"  %-*s   ", maxLeftCol, left);
     else {
-       fprintf(f,"  %s\n", left); 
+       fprintf(f,"  %s\n", left);
        goto out;
     }
 
@@ -113,7 +113,7 @@ static int maxArgWidth(const struct poptOption * opt,
     int max = 0;
     int this;
     const char * s;
-    
+
     while (opt->longName || opt->shortName || opt->arg) {
        if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
            this = maxArgWidth(opt->arg, translation_domain);
@@ -133,11 +133,11 @@ static int maxArgWidth(const struct poptOption * opt,
 
        opt++;
     }
-    
+
     return max;
 }
 
-static void singleTableHelp(FILE * f, const struct poptOption * table, 
+static void singleTableHelp(FILE * f, const struct poptOption * table,
                            int left,
                            const char *translation_domain) {
     const struct poptOption * opt;
@@ -145,7 +145,7 @@ static void singleTableHelp(FILE * f, const struct poptOption * table,
 
     opt = table;
     while (opt->longName || opt->shortName || opt->arg) {
-       if ((opt->longName || opt->shortName) && 
+       if ((opt->longName || opt->shortName) &&
            !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
            singleOptionHelp(f, left, opt, translation_domain);
        opt++;
@@ -157,7 +157,7 @@ static void singleTableHelp(FILE * f, const struct poptOption * table,
            sub_transdom = getTableTranslationDomain(opt->arg);
            if(!sub_transdom)
                sub_transdom = translation_domain;
-           
+
            if (opt->descrip)
                fprintf(f, "\n%s\n", D_(sub_transdom, opt->descrip));
 
@@ -195,7 +195,7 @@ void poptPrintHelp(poptContext con, FILE * f, /*@unused@*/ int flags) {
     singleTableHelp(f, con->options, leftColWidth, NULL);
 }
 
-static int singleOptionUsage(FILE * f, int cursor, 
+static int singleOptionUsage(FILE * f, int cursor,
                             const struct poptOption * opt,
                             const char *translation_domain) {
     int len = 3;
@@ -204,7 +204,7 @@ static int singleOptionUsage(FILE * f, int cursor,
     const char * argDescrip = getArgDescrip(opt, translation_domain);
 
     if (opt->shortName) {
-       if (!(opt->argInfo & POPT_ARG_MASK)) 
+       if (!(opt->argInfo & POPT_ARG_MASK))
            return cursor;      /* we did these already */
        len++;
        *shortStr = opt->shortName;
@@ -216,13 +216,13 @@ static int singleOptionUsage(FILE * f, int cursor,
 
     if (len == 3) return cursor;
 
-    if (argDescrip) 
+    if (argDescrip)
        len += strlen(argDescrip) + 1;
 
     if ((cursor + len) > 79) {
        fprintf(f, "\n       ");
        cursor = 7;
-    } 
+    }
 
     fprintf(f, " [-%s%s%s%s]", opt->shortName ? "" : "-", item,
            argDescrip ? (opt->shortName ? " " : "=") : "",
@@ -234,15 +234,15 @@ static int singleOptionUsage(FILE * f, int cursor,
 static int singleTableUsage(FILE * f, int cursor, const struct poptOption * table,
                     const char *translation_domain) {
     const struct poptOption * opt;
-    
+
     opt = table;
     while (opt->longName || opt->shortName || opt->arg) {
         if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN)
            translation_domain = (const char *)opt->arg;
-       else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) 
+       else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE)
            cursor = singleTableUsage(f, cursor, opt->arg,
                                      translation_domain);
-       else if ((opt->longName || opt->shortName) && 
+       else if ((opt->longName || opt->shortName) &&
                 !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
          cursor = singleOptionUsage(f, cursor, opt, translation_domain);
 
@@ -252,7 +252,7 @@ static int singleTableUsage(FILE * f, int cursor, const struct poptOption * tabl
     return cursor;
 }
 
-static int showShortOptions(const struct poptOption * opt, FILE * f, 
+static int showShortOptions(const struct poptOption * opt, FILE * f,
                            char * str) {
     char s[300];               /* this is larger then the ascii set, so
                                   it should do just fine */
@@ -270,7 +270,7 @@ static int showShortOptions(const struct poptOption * opt, FILE * f,
            showShortOptions(opt->arg, f, str);
 
        opt++;
-    } 
+    }
 
     if (s != str || !*s)
        return 0;
index 1688095..623b6b4 100644 (file)
@@ -1,5 +1,5 @@
 /* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
+   file accompanying popt source distributions, available from
    ftp://ftp.redhat.com/pub/code/popt */
 
 #ifndef H_POPTINT
index 65c948b..8ed33a4 100644 (file)
@@ -1,5 +1,5 @@
 /* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
+   file accompanying popt source distributions, available from
    ftp://ftp.redhat.com/pub/code/popt */
 
 #include "system.h"
@@ -20,7 +20,7 @@ int poptDupArgv(int argc, const char **argv,
            return POPT_ERROR_NOARG;
        nb += strlen(argv[i]) + 1;
     }
-       
+
     dst = malloc(nb);
     argv2 = (void *) dst;
     dst += (argc + 1) * sizeof(*argv);
index f8fff57..5590cca 100644 (file)
@@ -670,7 +670,7 @@ strerror (errnoval)
       /* In range, and a valid message.  Just return the message. */
       msg = (char *) sys_errlist[errnoval];
     }
-  
+
   return (msg);
 }
 
index c86c73d..4fd3d4e 100644 (file)
@@ -39,12 +39,12 @@ strtod (str, ptr)
 
   if (ptr == (char **)0)
     return atof (str);
-  
+
   p = str;
-  
+
   while (isspace (*p))
     ++p;
-  
+
   if (*p == '+' || *p == '-')
     ++p;
 
index 0f888f4..659ebb2 100644 (file)
@@ -7,7 +7,7 @@
 #include <fcntl.h>
 #include <limits.h>
 
-#if HAVE_MCHECK_H 
+#if HAVE_MCHECK_H
 #include <mcheck.h>
 #endif
 
@@ -25,7 +25,7 @@
 #include <libc.h>
 #endif
 
-/* AIX requires this to be the first thing in the file.  */ 
+/* AIX requires this to be the first thing in the file.  */
 #ifndef __GNUC__
 # if HAVE_ALLOCA_H
 #  include <alloca.h>
index 64e06b8..12c37ad 100644 (file)
@@ -153,7 +153,7 @@ asprintf
   va_end (args);
 
   return done;
-} 
+}
 
 #ifdef TEST
 void