libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 19/25] syntax-check: fix violations and re-enable sc_space_tab.


From: Gary V. Vaughan
Subject: [PATCH 19/25] syntax-check: fix violations and re-enable sc_space_tab.
Date: Tue, 15 Nov 2011 19:53:57 +0700

* cfg.mk (local-checks-to-fix): Remove sc_space_tab from list of
disabled checks.
(exclude_file_name_regexp--sc_space_tab): Don't flag space-tab
sequences in diff files as an error.
* Makefile.am, libltdl/Makefile.in, libltdl/config/general.m4sh,
libltdl/config/ltmain.m4sh, libltdl/loaders/dyld.c,
libltdl/ltdl.h, libltdl/m4/ltoptions.m4, libltdl/slist.c,
libtoolize.m4sh, tests/demo/dlmain.c, tests/depdemo/main.c,
tests/libtoolize.at, tests/lt_dladvise.at,
tests/pdemo/longer_file_name_dlmain.c, tests/sh.test,
tests/static.at, tests/stresstest.at, tests/template.at: Fix
space-tab sequences by reversing them in regexps, and deleting
leading spaces in indentation.

Signed-off-by: Gary V. Vaughan <address@hidden>
---
 Makefile.am                           |    2 +-
 build-aux/general.m4sh                |    2 +-
 build-aux/ltmain.m4sh                 |    2 +-
 cfg.mk                                |    2 +-
 libltdl/loaders/dyld.c                |    4 ++--
 libltdl/loaders/shl_load.c            |    8 ++++----
 libltdl/ltdl.h                        |    2 +-
 libltdl/ltdl.mk                       |    2 +-
 libltdl/slist.c                       |    2 +-
 libtoolize.m4sh                       |    2 +-
 m4/ltoptions.m4                       |    2 +-
 tests/demo/dlmain.c                   |    6 +++---
 tests/depdemo/main.c                  |    2 +-
 tests/libtoolize.at                   |    2 +-
 tests/lt_dladvise.at                  |    2 +-
 tests/pdemo/longer_file_name_dlmain.c |    6 +++---
 tests/sh.test                         |   20 ++++++++++----------
 tests/static.at                       |    4 ++--
 tests/stresstest.at                   |    4 ++--
 tests/template.at                     |   12 ++++++------
 20 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 97de896..8953b6e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -578,7 +578,7 @@ $(readme): FORCE
          $(SHELL) $(edit_readme_alpha) '$@'; \
        fi
 
-git_commit_count = git log --pretty=oneline |wc -l |$(SED) 's,[        ],,g'
+git_commit_count = git log --pretty=oneline |wc -l |$(SED) 's,[         ],,g'
 
 dist-hook: $(changelog) $(dotversion) $(readme)
 ## Arrange so that .tarball-version appears only in the distribution
diff --git a/build-aux/general.m4sh b/build-aux/general.m4sh
index 34940f7..44eccec 100644
--- a/build-aux/general.m4sh
+++ b/build-aux/general.m4sh
@@ -68,7 +68,7 @@ exit_status=$EXIT_SUCCESS
 # Make sure IFS has a sensible default
 lt_nl='
 '
-IFS="  $lt_nl"
+IFS="   $lt_nl"
 
 dirname="s,/[^/]*$,,"
 basename="s,^.*/,,"
diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh
index a47e444..b8eafde 100644
--- a/build-aux/ltmain.m4sh
+++ b/build-aux/ltmain.m4sh
@@ -349,7 +349,7 @@ dnl SHORT   LONG                           DEFAULT          
      INIT
 dnl ----------------------------------------------------------------------
 M4SH_GETOPTS(
   [n],         [--dry-run|--dryrun],           [],                     [],
-  [],          [--config],                     [],                     [
+  [],          [--config],                     [],                     [
        func_config],
   [;],         [--dlopen|-dlopen],             [],                     [],
   [],          [--preserve-dup-deps],          [],                     [],
diff --git a/cfg.mk b/cfg.mk
index 82ab8c6..7823394 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -42,7 +42,6 @@ local-checks-to-fix =                         \
        sc_prohibit_always_true_header_tests    \
        sc_require_config_h                     \
        sc_require_config_h_first               \
-       sc_space_tab                            \
        sc_trailing_blank                       \
        sc_useless_cpp_parens
 
@@ -65,3 +64,4 @@ exclude_file_name_regexp--sc_prohibit_strcmp = \
   ^(doc/libtool.texi|tests/.*demo/.*\.c)$$
 exclude_file_name_regexp--sc_prohibit_test_minus_ao = \
   ^m4/libtool.m4$$
+exclude_file_name_regexp--sc_space_tab = \.diff$$
diff --git a/libltdl/loaders/dyld.c b/libltdl/loaders/dyld.c
index b139d6c..4f7a433 100644
--- a/libltdl/loaders/dyld.c
+++ b/libltdl/loaders/dyld.c
@@ -240,8 +240,8 @@ vm_open (lt_user_data loader_data, const char *filename,
     {
     case NSObjectFileImageSuccess:
       module = NSLinkModule (ofi, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR
-                                           | NSLINKMODULE_OPTION_PRIVATE
-                                           | NSLINKMODULE_OPTION_BINDNOW);
+                                           | NSLINKMODULE_OPTION_PRIVATE
+                                           | NSLINKMODULE_OPTION_BINDNOW);
       NSDestroyObjectFileImage (ofi);
 
       if (module)
diff --git a/libltdl/loaders/shl_load.c b/libltdl/loaders/shl_load.c
index 5a09d87..8a45ee0 100644
--- a/libltdl/loaders/shl_load.c
+++ b/libltdl/loaders/shl_load.c
@@ -103,11 +103,11 @@ get_vtable (lt_user_data loader_data)
  *
  * Optionally:
  * BIND_FIRST     - Place the library at the head of the symbol search
- *                  order.
+ *                  order.
  * BIND_NONFATAL   - The default BIND_IMMEDIATE behavior is to treat all
- *                  unsatisfied symbols as fatal.  This flag allows
- *                  binding of unsatisfied code symbols to be deferred
- *                  until use.
+ *                  unsatisfied symbols as fatal.  This flag allows
+ *                  binding of unsatisfied code symbols to be deferred
+ *                  until use.
  *                  [Perl: For certain libraries, like DCE, deferred
  *                  binding often causes run time problems. Adding
  *                  BIND_NONFATAL to BIND_IMMEDIATE still allows
diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h
index 749a54d..824f201 100644
--- a/libltdl/ltdl.h
+++ b/libltdl/ltdl.h
@@ -57,7 +57,7 @@ LT_SCOPE int      lt_dlexit           (void);
 LT_SCOPE int       lt_dladdsearchdir    (const char *search_dir);
 LT_SCOPE int       lt_dlinsertsearchdir (const char *before,
                                                  const char *search_dir);
-LT_SCOPE int       lt_dlsetsearchpath   (const char *search_path);
+LT_SCOPE int       lt_dlsetsearchpath   (const char *search_path);
 LT_SCOPE const char *lt_dlgetsearchpath         (void);
 LT_SCOPE int       lt_dlforeachfile     (
                        const char *search_path,
diff --git a/libltdl/ltdl.mk b/libltdl/ltdl.mk
index bc31f62..dd3fc62 100644
--- a/libltdl/ltdl.mk
+++ b/libltdl/ltdl.mk
@@ -97,7 +97,7 @@ EXTRA_LTLIBRARIES            += libltdl/dlopen.la \
 
 libltdl_dlopen_la_SOURCES      = libltdl/loaders/dlopen.c
 libltdl_dlopen_la_LDFLAGS      = -module -avoid-version
-libltdl_dlopen_la_LIBADD       = $(LIBADD_DLOPEN)
+libltdl_dlopen_la_LIBADD       = $(LIBADD_DLOPEN)
 
 libltdl_dld_link_la_SOURCES    = libltdl/loaders/dld_link.c
 libltdl_dld_link_la_LDFLAGS    = -module -avoid-version
diff --git a/libltdl/slist.c b/libltdl/slist.c
index 5c2e9e1..189c2c3 100644
--- a/libltdl/slist.c
+++ b/libltdl/slist.c
@@ -229,7 +229,7 @@ slist_reverse (SList *slist)
       next             = slist->next;
       slist->next      = result;
       result           = slist;
-      slist            = next;
+      slist            = next;
     }
 
   return result;
diff --git a/libtoolize.m4sh b/libtoolize.m4sh
index 81349d0..e337461 100644
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
@@ -86,7 +86,7 @@ M4SH_VERBATIM([[
       --debug|--no-warn|--quiet|--verbose)
                envopts="${envopts+$envopts }$opt"                        ;;
       --*)     env_warning="${env_warning+$env_warning
-}unrecognized environment option \`$opt'"                                ;;
+}unrecognized environment option \`$opt'"                                ;;
       *)       func_fatal_help "garbled LIBTOOLIZE_OPTIONS near \`$opt'" ;;
     esac
   done
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 5d9acd8..301b0a3 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -81,7 +81,7 @@ m4_if([$1],[LT_INIT],[
   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-                  [_LT_ENABLE_FAST_INSTALL])
+                  [_LT_ENABLE_FAST_INSTALL])
   ])
 ])# _LT_SET_OPTIONS
 
diff --git a/tests/demo/dlmain.c b/tests/demo/dlmain.c
index 8c8be09..495ae7c 100644
--- a/tests/demo/dlmain.c
+++ b/tests/demo/dlmain.c
@@ -54,13 +54,13 @@ main ()
         const char *name = s->name;
         printf ("found symbol: %s\n", name);
         if (!strcmp ("hello", name))
-         phello = (int(*)())s->address;
+         phello = (int(*)())s->address;
         else if (!strcmp ("foo", name))
-         pfoo = (int(*)())s->address;
+         pfoo = (int(*)())s->address;
         else if (!strcmp ("nothing", name))
 #ifndef _WIN32
          /* In an ideal world we could do this... */
-         pnothing = (int*)s->address;
+         pnothing = (int*)s->address;
 #else /* !_WIN32 */
          /* In an ideal world a shared lib would be able to export data */
          pnothing = (int*)&nothing;
diff --git a/tests/depdemo/main.c b/tests/depdemo/main.c
index c4569b3..73e4db0 100644
--- a/tests/depdemo/main.c
+++ b/tests/depdemo/main.c
@@ -42,7 +42,7 @@ main (int argc, char **argv)
   if (var_l1 + var_l2 + var_l4 != 20)
        {
        printf("var_l1(%d) + var_l2(%d) + var_l4(%d) != 
20\n",var_l1,var_l2,var_l4);
-       return 1;
+       return 1;
        }
   return 0;
 }
diff --git a/tests/libtoolize.at b/tests/libtoolize.at
index 030ece7..70ba941 100644
--- a/tests/libtoolize.at
+++ b/tests/libtoolize.at
@@ -713,7 +713,7 @@ func_serial ()
     my_filename="$1"
     my_macro_regex="$2"
     my_sed_serial='
-       /^# serial [1-9][0-9.]*[        ]*'"$my_macro_regex"'[  ]*$/ {
+       /^# serial [1-9][0-9.]*[         ]*'"$my_macro_regex"'[  ]*$/ {
            s,^# serial \([1-9][0-9.]*\).*$,\1,
            q
        }
diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at
index 5ae9fbd..48cf5e9 100644
--- a/tests/lt_dladvise.at
+++ b/tests/lt_dladvise.at
@@ -174,7 +174,7 @@ hint_global (void)
 
       /* Don't attempt to load moddepend unless modglobal was successfully
          loaded and the symglobal hint was taken, and the system allows to
-        have undefined symbols.  */
+        have undefined symbols.  */
       if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS)
         {
           hint_ext ();
diff --git a/tests/pdemo/longer_file_name_dlmain.c 
b/tests/pdemo/longer_file_name_dlmain.c
index ad223dc..73caa78 100644
--- a/tests/pdemo/longer_file_name_dlmain.c
+++ b/tests/pdemo/longer_file_name_dlmain.c
@@ -54,13 +54,13 @@ main (int argc, char **argv)
         const char *name = s->name;
         printf ("found symbol: %s\n", name);
         if (!strcmp ("hello", name))
-         phello = (int(*)())s->address;
+         phello = (int(*)())s->address;
         else if (!strcmp ("foo", name))
-         pfoo = (int(*)())s->address;
+         pfoo = (int(*)())s->address;
         else if (!strcmp ("nothing", name))
 #ifndef _WIN32
          /* In an ideal world we could do this... */
-         pnothing = (int*)s->address;
+         pnothing = (int*)s->address;
 #else /* !_WIN32 */
          /* In an ideal world a shared lib would be able to export data */
          pnothing = (int*)&nothing;
diff --git a/tests/sh.test b/tests/sh.test
index 3382dad..5c6d675 100755
--- a/tests/sh.test
+++ b/tests/sh.test
@@ -31,37 +31,37 @@
 status=$EXIT_SUCCESS
 
 # Check for bad binary operators.
-if $EGREP -n -e 'if[   ]+["'\'']?\$[^  ]+[     ]+(=|-[lg][te]|-eq|-ne)' 
$scripts; then
+if $EGREP -n -e 'if[    ]+["'\'']?\$[^  ]+[     ]+(=|-[lg][te]|-eq|-ne)' 
$scripts; then
   echo "use \`if test \$something =' instead of \`if \$something ='"
   status=$EXIT_FAILURE
 fi
 
 # Check for bad unary operators.
-if $EGREP -n -e 'if[   ]+-' $scripts; then
+if $EGREP -n -e 'if[    ]+-' $scripts; then
   echo "use \`if test -X' instead of \`if -X'"
   status=$EXIT_FAILURE
 fi
 
 # Check for using `[' instead of `test'.
-if $EGREP -n -e 'if[   ]+\[' $scripts; then
+if $EGREP -n -e 'if[    ]+\[' $scripts; then
   echo "use \`if test' instead of \`if ['"
   status=$EXIT_FAILURE
 fi
 
 # Check for using test X... instead of test "X...
-if $EGREP -n -e 'test[         ]+(![   ])?(-.[         ]+)?X' $scripts; then
+if $EGREP -n -e 'test[  ]+(![   ])?(-.[         ]+)?X' $scripts; then
   echo "use \`test \"X...\"' instead of \`test X'"
   status=$EXIT_FAILURE
 fi
 
 # Check for using test $... instead of test "$...
-if $EGREP -n -e 'test[         ]+(![   ])?(-.[         ]+)?X?\$' $scripts; then
+if $EGREP -n -e 'test[  ]+(![   ])?(-.[         ]+)?X?\$' $scripts; then
   echo "use \`test \"\$...\"' instead of \`test \$'"
   status=$EXIT_FAILURE
 fi
 
 # Never use test -e.
-if $EGREP -n -e 'test[         ]+(![   ])?-e' $scripts; then
+if $EGREP -n -e 'test[  ]+(![   ])?-e' $scripts; then
   echo "use \`test -f' instead of \`test -e'"
   status=$EXIT_FAILURE
 fi
@@ -80,7 +80,7 @@ if $EGREP -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | 
\
 fi
 
 # Check for using set -- instead of set dummy
-if $EGREP -n -e 'set[  ]+--[   ]+' $scripts; then
+if $EGREP -n -e 'set[   ]+--[   ]+' $scripts; then
   echo "use \`set dummy ...' instead of \`set -- ...'"
   status=$EXIT_FAILURE
 fi
@@ -89,7 +89,7 @@ fi
 for s in $scripts
 do
   if $SED -n '
-      /set[    ][      ]*dummy/{
+      /set[     ][      ]*dummy/{
          /set.*dummy.*;.*shift/d
          N
          /\n.*shift/D
@@ -107,7 +107,7 @@ do
   if $SED -n '
       /^func_.*(/{
          N
-         /^func_[^     ]* ()\n{$/d
+         /^func_[^      ]* ()\n{$/d
          p
       }' "$s" 2>&1 | $EGREP .; then
     echo "Function definitions should look like this in $s:
@@ -124,7 +124,7 @@ done
 for s in "$abs_macro_dir/libtool.m4"
 do
   if $SED -n '/case \$cc_basename in/,/esac/ {
-             /^[       ]*[a-zA-Z][a-zA-Z0-9+]*[^*][    ]*)/p
+             /^[        ]*[a-zA-Z][a-zA-Z0-9+]*[^*][    ]*)/p
              }'  $s 2>&1 | $EGREP .; then
     echo "\$cc_basename matches should include a trailing \`*' in $s."
     status=$EXIT_FAILURE
diff --git a/tests/static.at b/tests/static.at
index dfa4c42..6072d77 100644
--- a/tests/static.at
+++ b/tests/static.at
@@ -301,8 +301,8 @@ for withdep in no yes; do
              [0], [ignore], [ignore])
     dnl # This usually fails.  So don't do it.
     dnl AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123b$EXEEXT 
m.$OBJEXT \
-    dnl         -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3],
-    dnl         [0], [ignore], [ignore])
+    dnl                 -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3],
+    dnl                 [0], [ignore], [ignore])
   fi
 
   ### install the programs.
diff --git a/tests/stresstest.at b/tests/stresstest.at
index 9568d49..c9caee2 100644
--- a/tests/stresstest.at
+++ b/tests/stresstest.at
@@ -273,12 +273,12 @@ do
          esac
 
          LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o 
"$rel"main$EXEEXT "$rel"main$mst.lo "$rel"sub2/liba.la],
-                  [0],[ignore],[ignore])
+                  [0],[ignore],[ignore])
          LT_AT_EXEC_CHECK([./main],[0])
          for l10 in '' '-export-symbols dlselfsyms'
          do
            LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o 
"$rel"sub3/dlself$EXEEXT "$rel"sub3/dlself$mst.lo "$rel"sub2/liba.la sub/b.lo 
-dlopen self $l10],
-                    [0],[ignore],[ignore])
+                    [0],[ignore],[ignore])
            LT_AT_EXEC_CHECK([./sub3/dlself],[0])
          done
        done
diff --git a/tests/template.at b/tests/template.at
index 1729778..74e1cfd 100644
--- a/tests/template.at
+++ b/tests/template.at
@@ -218,12 +218,12 @@ case $compiler_c_o in
 yes)
   main_o=sub/main.$OBJEXT
   AT_CHECK([$CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp],
-          [0], [ignore], [ignore])
+          [0], [ignore], [ignore])
   ;;
 *)
   main_o=main.$OBJEXT
   AT_CHECK([$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp],
-          [0], [ignore], [ignore])
+          [0], [ignore], [ignore])
   ;;
 esac
 
@@ -270,17 +270,17 @@ LT_AT_EXEC_CHECK([./sub/main])
 if $noskip; then
 
   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo],
-        [0], [ignore], [ignore])
+        [0], [ignore], [ignore])
   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
sub/main$EXEEXT $main_o lib2/libb.la],
-        [0], [ignore], [ignore])
+        [0], [ignore], [ignore])
   LT_AT_EXEC_CHECK([./sub/main])
 fi
 # both installed
 if $noskip; then
   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar],
-        [0], [ignore], [ignore])
+        [0], [ignore], [ignore])
   AT_CHECK([$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o 
sub/main$EXEEXT $main_o lib2/libb.la],
-        [0], [ignore], [ignore])
+        [0], [ignore], [ignore])
   LT_AT_EXEC_CHECK([./sub/main])
 fi
 
-- 
1.7.7.3

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]