summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-02-21 15:50:11 +0100
committerYves Orton <demerphq@gmail.com>2023-04-29 09:09:53 +0200
commit03fadc172637749a774ce276b5499e8da3f64935 (patch)
tree3b064851b8f899edb1bda14165003843fba108da
parent23c413edce303b9cc12de4ea1e38de3ae1002e86 (diff)
downloadperl-03fadc172637749a774ce276b5499e8da3f64935.tar.gz
ext/File-Glob/ - replace "define\t" with "define "
"#define\t" is annoying as it is it 8 spaces wide, so it looks like "#define ", yet will not be found in a grep for "define foo" as the space is actually a tab.
-rw-r--r--ext/File-Glob/Glob.pm2
-rw-r--r--ext/File-Glob/bsd_glob.c82
-rw-r--r--ext/File-Glob/bsd_glob.h36
3 files changed, 60 insertions, 60 deletions
diff --git a/ext/File-Glob/Glob.pm b/ext/File-Glob/Glob.pm
index dc0b3ac208..f7b89f490a 100644
--- a/ext/File-Glob/Glob.pm
+++ b/ext/File-Glob/Glob.pm
@@ -33,7 +33,7 @@ $EXPORT_TAGS{bsd_glob} = [@{$EXPORT_TAGS{glob}}];
our @EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob');
-our $VERSION = '1.39';
+our $VERSION = '1.40';
sub import {
require Exporter;
diff --git a/ext/File-Glob/bsd_glob.c b/ext/File-Glob/bsd_glob.c
index 8fab443d2c..3d402e0b45 100644
--- a/ext/File-Glob/bsd_glob.c
+++ b/ext/File-Glob/bsd_glob.c
@@ -81,9 +81,9 @@ static char sscsid[]= "$OpenBSD: glob.c,v 1.8.10.1 2001/04/10 jason Exp $";
#ifndef MAXPATHLEN
# ifdef PATH_MAX
-# define MAXPATHLEN PATH_MAX
+# define MAXPATHLEN PATH_MAX
# else
-# define MAXPATHLEN 1024
+# define MAXPATHLEN 1024
# endif
#endif
@@ -91,71 +91,71 @@ static char sscsid[]= "$OpenBSD: glob.c,v 1.8.10.1 2001/04/10 jason Exp $";
#ifndef ARG_MAX
# ifdef _SC_ARG_MAX
-# define ARG_MAX (sysconf(_SC_ARG_MAX))
+# define ARG_MAX (sysconf(_SC_ARG_MAX))
# else
# ifdef _POSIX_ARG_MAX
-# define ARG_MAX _POSIX_ARG_MAX
+# define ARG_MAX _POSIX_ARG_MAX
# else
# ifdef WIN32
-# define ARG_MAX 14500 /* from VC's limits.h */
+# define ARG_MAX 14500 /* from VC's limits.h */
# else
-# define ARG_MAX 4096 /* from POSIX, be conservative */
+# define ARG_MAX 4096 /* from POSIX, be conservative */
# endif
# endif
# endif
#endif
-#define BG_DOLLAR '$'
-#define BG_DOT '.'
-#define BG_EOS '\0'
-#define BG_LBRACKET '['
-#define BG_NOT '!'
-#define BG_QUESTION '?'
-#define BG_QUOTE '\\'
-#define BG_RANGE '-'
-#define BG_RBRACKET ']'
-#define BG_SEP '/'
+#define BG_DOLLAR '$'
+#define BG_DOT '.'
+#define BG_EOS '\0'
+#define BG_LBRACKET '['
+#define BG_NOT '!'
+#define BG_QUESTION '?'
+#define BG_QUOTE '\\'
+#define BG_RANGE '-'
+#define BG_RBRACKET ']'
+#define BG_SEP '/'
#ifdef DOSISH
#define BG_SEP2 '\\'
#endif
-#define BG_STAR '*'
-#define BG_TILDE '~'
-#define BG_UNDERSCORE '_'
-#define BG_LBRACE '{'
-#define BG_RBRACE '}'
-#define BG_SLASH '/'
-#define BG_COMMA ','
+#define BG_STAR '*'
+#define BG_TILDE '~'
+#define BG_UNDERSCORE '_'
+#define BG_LBRACE '{'
+#define BG_RBRACE '}'
+#define BG_SLASH '/'
+#define BG_COMMA ','
#ifndef GLOB_DEBUG
-#define M_QUOTE 0x8000
-#define M_PROTECT 0x4000
-#define M_MASK 0xffff
-#define M_ASCII 0x00ff
+#define M_QUOTE 0x8000
+#define M_PROTECT 0x4000
+#define M_MASK 0xffff
+#define M_ASCII 0x00ff
typedef U16 Char;
#else
-#define M_QUOTE 0x80
-#define M_PROTECT 0x40
-#define M_MASK 0xff
-#define M_ASCII 0x7f
+#define M_QUOTE 0x80
+#define M_PROTECT 0x40
+#define M_MASK 0xff
+#define M_ASCII 0x7f
typedef U8 Char;
#endif /* !GLOB_DEBUG */
-#define CHAR(c) ((Char)((c)&M_ASCII))
-#define META(c) ((Char)((c)|M_QUOTE))
-#define M_ALL META('*')
-#define M_END META(']')
-#define M_NOT META('!')
-#define M_ONE META('?')
-#define M_RNG META('-')
-#define M_SET META('[')
-#define ismeta(c) (((c)&M_QUOTE) != 0)
+#define CHAR(c) ((Char)((c)&M_ASCII))
+#define META(c) ((Char)((c)|M_QUOTE))
+#define M_ALL META('*')
+#define M_END META(']')
+#define M_NOT META('!')
+#define M_ONE META('?')
+#define M_RNG META('-')
+#define M_SET META('[')
+#define ismeta(c) (((c)&M_QUOTE) != 0)
static int compare(const void *, const void *);
@@ -204,7 +204,7 @@ my_readdir(DIR *d)
}
# else
-# define my_readdir readdir
+# define my_readdir readdir
# endif
diff --git a/ext/File-Glob/bsd_glob.h b/ext/File-Glob/bsd_glob.h
index 424591c925..cb5dc7825b 100644
--- a/ext/File-Glob/bsd_glob.h
+++ b/ext/File-Glob/bsd_glob.h
@@ -34,7 +34,7 @@
*/
#ifndef _BSD_GLOB_H_
-#define _BSD_GLOB_H_
+#define _BSD_GLOB_H_
/* #include <sys/cdefs.h> */
@@ -59,26 +59,26 @@ typedef struct {
int (*gl_stat)(const char *, Stat_t *);
} glob_t;
-#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
-#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
-#define GLOB_ERR 0x0004 /* Return on error. */
-#define GLOB_MARK 0x0008 /* Append / to matching directories. */
-#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
-#define GLOB_NOSORT 0x0020 /* Don't sort. */
+#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
+#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
+#define GLOB_ERR 0x0004 /* Return on error. */
+#define GLOB_MARK 0x0008 /* Append / to matching directories. */
+#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
+#define GLOB_NOSORT 0x0020 /* Don't sort. */
-#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
-#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
-#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
-#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
-#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
-#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
-#define GLOB_NOCASE 0x1000 /* Treat filenames without regard for case. */
-#define GLOB_ALPHASORT 0x2000 /* Alphabetic, not ASCII sort, like csh. */
-#define GLOB_LIMIT 0x4000 /* Limit pattern match output to ARG_MAX
+#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
+#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
+#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
+#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
+#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
+#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
+#define GLOB_NOCASE 0x1000 /* Treat filenames without regard for case. */
+#define GLOB_ALPHASORT 0x2000 /* Alphabetic, not ASCII sort, like csh. */
+#define GLOB_LIMIT 0x4000 /* Limit pattern match output to ARG_MAX
(usually from limits.h). */
-#define GLOB_NOSPACE (-1) /* Malloc call failed. */
-#define GLOB_ABEND (-2) /* Unignored error. */
+#define GLOB_NOSPACE (-1) /* Malloc call failed. */
+#define GLOB_ABEND (-2) /* Unignored error. */
int bsd_glob(const char *, int, int (*)(const char *, int), glob_t *);
void bsd_globfree(glob_t *);