]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: correct formatting style in a header
authorJim Meyering <meyering@redhat.com>
Mon, 28 Mar 2011 05:57:51 +0000 (07:57 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 28 Mar 2011 09:51:35 +0000 (11:51 +0200)
* src/find-mount-point.h: Move "*" to where it belongs.
Move "const", too.
* src/find-mount-point.c: Move "const" to conform.
* src/Makefile.am (sc_tight_scope): Allow `*'s before the function name.
Use perl's -l option and drop the \n after (and quotes around) $1.

src/Makefile.am
src/find-mount-point.c
src/find-mount-point.h

index bf1d60a8869fc0ab99ef6fc58f1cd470ff3b912c..5bd71d25877357932f59d6b729f9d4bda0e22025 100644 (file)
@@ -727,7 +727,8 @@ sc_tight_scope: $(bin_PROGRAMS)
        ( printf 'main\nusage\n_.*\n';                                  \
          grep -h -A1 '^extern .*[^;]$$' $$src                          \
            | grep -vE '^(extern |--)' | sed 's/ .*//';                 \
-         perl -ne '/^extern (?:enum )?\S+ (\S*) \(/ and print "$$1\n"' $$hdr; \
+         perl -lne '/^extern (?:enum )?\S+ \**(\S*) \(/ and print $$1' \
+               $$hdr;                                                  \
        ) | $(ASSORT) -u | sed 's/^/^/;s/$$/$$/' > $$t;                 \
        nm -e *.$(OBJEXT)                                               \
            | sed -n 's/.* T //p'                                       \
@@ -736,7 +737,7 @@ sc_tight_scope: $(bin_PROGRAMS)
          { echo 'the above functions should have static scope' 1>&2;   \
            exit 1; } || : ;                                            \
        ( printf '^program_name$$\n';                                   \
-         perl -ne '/^extern .*?\**(\w+);/ and print "^$$1\$$\n"'       \
+         perl -lne '/^extern .*?\**(\w+);/ and print "^$$1\$$"'        \
            $$hdr *.h ) | $(ASSORT) -u > $$t;                           \
        nm -e *.$(OBJEXT)                                               \
            | sed -n 's/.* [BD] //p'                                    \
index 48dc42304d01f0787efce98d1c6907f5aa49e1ce..30e51227ce4a5e12b2d469865b2523e99360fc57 100644 (file)
    Give a diagnostic and return NULL if unable to determine the mount point.
    Exit if unable to restore current working directory.  */
 extern char *
-find_mount_point (const char *file, const struct stat *file_stat)
+find_mount_point (char const *file, struct stat const *file_stat)
 {
   struct saved_cwd cwd;
   struct stat last_stat;
-  char *mp = NULL;             /* The malloced mount point.  */
+  char *mp = NULL;             /* The malloc'd mount point.  */
 
   if (save_cwd (&cwd) != 0)
     {
index 956cc38791cc401b9bd6a7e5e2be4105f8ec7af4..04c4c34d49ab7b39b4656f8464deb6abc066794a 100644 (file)
@@ -14,4 +14,4 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-extern char* find_mount_point (const char *, const struct stat *);
+extern char *find_mount_point (char const *, struct stat const *);