Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
e801dc08
Commit
e801dc08
authored
24 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
glob routines are now only declared ifndef __unix__
parent
45483a41
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/sbbswrap.h
+48
-44
48 additions, 44 deletions
src/sbbs3/sbbswrap.h
with
48 additions
and
44 deletions
src/sbbs3/sbbswrap.h
+
48
−
44
View file @
e801dc08
...
...
@@ -38,48 +38,6 @@
#ifndef _SBBSWRAP_H
#define _SBBSWRAP_H
#ifdef _MSC_VER
#include
"msdirent.h"
#else
#include
<dirent.h>
/* POSIX directory functions */
#endif
#ifdef __unix__
#include
<glob.h>
/* POSIX.2 directory pattern matching function */
#else
typedef
struct
{
size_t
gl_pathc
;
/* Count of paths matched so far */
char
**
gl_pathv
;
/* List of matched pathnames. */
size_t
gl_offs
;
/* Slots to reserve in 'gl_pathv'. */
}
glob_t
;
/* Bits set in the FLAGS argument to `glob'. */
#define GLOB_ERR (1 << 0)
/* Return on read errors. */
#define GLOB_MARK (1 << 1)
/* Append a slash to each name. */
#define GLOB_NOSORT (1 << 2)
/* Don't sort the names. */
#define GLOB_DOOFFS (1 << 3)
/* Insert PGLOB->gl_offs NULLs. */
#define GLOB_NOCHECK (1 << 4)
/* If nothing matches, return the pattern. */
#define GLOB_APPEND (1 << 5)
/* Append to results of a previous call. */
#define GLOB_NOESCAPE (1 << 6)
/* Backslashes don't quote metacharacters. */
#define GLOB_PERIOD (1 << 7)
/* Leading `.' can be matched by metachars. */
#define GLOB_MAGCHAR (1 << 8)
/* Set in gl_flags if any metachars seen. */
#define GLOB_ALTDIRFUNC (1 << 9)
/* Use gl_opendir et al functions. */
#define GLOB_BRACE (1 << 10)
/* Expand "{a,b}" to "a" "b". */
#define GLOB_NOMAGIC (1 << 11)
/* If no magic chars, return the pattern. */
#define GLOB_TILDE (1 << 12)
/* Expand ~user and ~ to home directories. */
#define GLOB_ONLYDIR (1 << 13)
/* Match only directories. */
#define GLOB_TILDE_CHECK (1 << 14)
/* Like GLOB_TILDE but return an error
if the user name is not available. */
/* Error returns from `glob'. */
#define GLOB_NOSPACE 1
/* Ran out of memory. */
#define GLOB_ABORTED 2
/* Read error. */
#define GLOB_NOMATCH 3
/* No matches found. */
#define GLOB_NOSYS 4
/* Not implemented. */
#endif
#include
"gen_defs.h"
/* ulong */
#ifdef DLLEXPORT
...
...
@@ -109,6 +67,54 @@ typedef struct
extern
"C"
{
#endif
#ifdef _MSC_VER
#include
"msdirent.h"
#else
#include
<dirent.h>
/* POSIX directory functions */
#endif
#ifdef __unix__
#include
<glob.h>
/* POSIX.2 directory pattern matching function */
#else
/* glob-compatible findfirst/findnext wrapper */
typedef
struct
{
size_t
gl_pathc
;
/* Count of paths matched so far */
char
**
gl_pathv
;
/* List of matched pathnames. */
size_t
gl_offs
;
/* Slots to reserve in 'gl_pathv'. */
}
glob_t
;
/* Bits set in the FLAGS argument to `glob'. */
#define GLOB_ERR (1 << 0)
/* Return on read errors. */
#define GLOB_MARK (1 << 1)
/* Append a slash to each name. */
#define GLOB_NOSORT (1 << 2)
/* Don't sort the names. */
#define GLOB_DOOFFS (1 << 3)
/* Insert PGLOB->gl_offs NULLs. */
#define GLOB_NOCHECK (1 << 4)
/* If nothing matches, return the pattern. */
#define GLOB_APPEND (1 << 5)
/* Append to results of a previous call. */
#define GLOB_NOESCAPE (1 << 6)
/* Backslashes don't quote metacharacters. */
#define GLOB_PERIOD (1 << 7)
/* Leading `.' can be matched by metachars. */
#define GLOB_MAGCHAR (1 << 8)
/* Set in gl_flags if any metachars seen. */
#define GLOB_ALTDIRFUNC (1 << 9)
/* Use gl_opendir et al functions. */
#define GLOB_BRACE (1 << 10)
/* Expand "{a,b}" to "a" "b". */
#define GLOB_NOMAGIC (1 << 11)
/* If no magic chars, return the pattern. */
#define GLOB_TILDE (1 << 12)
/* Expand ~user and ~ to home directories. */
#define GLOB_ONLYDIR (1 << 13)
/* Match only directories. */
#define GLOB_TILDE_CHECK (1 << 14)
/* Like GLOB_TILDE but return an error
if the user name is not available. */
/* Error returns from `glob'. */
#define GLOB_NOSPACE 1
/* Ran out of memory. */
#define GLOB_ABORTED 2
/* Read error. */
#define GLOB_NOMATCH 3
/* No matches found. */
#define GLOB_NOSYS 4
/* Not implemented. */
DLLEXPORT
int
DLLCALL
glob
(
const
char
*
pattern
,
int
flags
,
void
*
unused
,
glob_t
*
);
DLLEXPORT
void
DLLCALL
globfree
(
glob_t
*
);
#endif
/***************/
/* OS-specific */
/***************/
...
...
@@ -220,8 +226,6 @@ extern "C" {
/* General file system wrappers for all platforms and compilers */
DLLEXPORT
int
DLLCALL
glob
(
const
char
*
pattern
,
int
flags
,
void
*
unused
,
glob_t
*
);
DLLEXPORT
void
DLLCALL
globfree
(
glob_t
*
);
DLLEXPORT
long
DLLCALL
fdate
(
char
*
filename
);
DLLEXPORT
BOOL
DLLCALL
isdir
(
char
*
filename
);
DLLEXPORT
int
DLLCALL
getfattr
(
char
*
filename
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment