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
7aa4720f
Commit
7aa4720f
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Updated function prototypes to use const char* to indicate read-only strings.
parent
b42240c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/xpdev/dirwrap.c
+9
-9
9 additions, 9 deletions
src/xpdev/dirwrap.c
src/xpdev/dirwrap.h
+7
-7
7 additions, 7 deletions
src/xpdev/dirwrap.h
with
16 additions
and
16 deletions
src/xpdev/dirwrap.c
+
9
−
9
View file @
7aa4720f
...
...
@@ -75,7 +75,7 @@
/****************************************************************************/
/* Return the filename portion of a full pathname */
/****************************************************************************/
char
*
DLLCALL
getfname
(
char
*
path
)
char
*
DLLCALL
getfname
(
const
char
*
path
)
{
char
*
fname
;
...
...
@@ -85,7 +85,7 @@ char* DLLCALL getfname(char* path)
if
(
fname
!=
NULL
)
fname
++
;
else
fname
=
path
;
fname
=
(
char
*
)
path
;
return
(
fname
);
}
...
...
@@ -161,7 +161,7 @@ int DLLCALL glob(const char *pattern, int flags, void* unused, glob_t* glob)
glob
->
gl_pathv
=
new_pathv
;
/* build the full pathname */
strcpy
(
path
,
pattern
);
SAFECOPY
(
path
,
pattern
);
p
=
getfname
(
path
);
*
p
=
0
;
strcat
(
path
,
ff
.
name
);
...
...
@@ -271,7 +271,7 @@ void rewinddir(DIR* dir)
/****************************************************************************/
/* Returns the time/date of the file in 'filename' in time_t (unix) format */
/****************************************************************************/
time_t
DLLCALL
fdate
(
char
*
filename
)
time_t
DLLCALL
fdate
(
const
char
*
filename
)
{
struct
stat
st
;
...
...
@@ -287,7 +287,7 @@ time_t DLLCALL fdate(char *filename)
/****************************************************************************/
/* Returns the length of the file in 'filename' */
/****************************************************************************/
long
DLLCALL
flength
(
char
*
filename
)
long
DLLCALL
flength
(
const
char
*
filename
)
{
#if defined(__BORLANDC__) && !defined(__unix__)
/* stat() doesn't work right */
...
...
@@ -324,7 +324,7 @@ long DLLCALL flength(char *filename)
/* Returns TRUE if it exists, FALSE if it doesn't. */
/* 'filespec' may contain wildcards! */
/****************************************************************************/
BOOL
DLLCALL
fexist
(
char
*
filespec
)
BOOL
DLLCALL
fexist
(
const
char
*
filespec
)
{
#if defined(_WIN32)
...
...
@@ -419,7 +419,7 @@ BOOL DLLCALL fexistcase(char *path)
/****************************************************************************/
/* Returns TRUE if the filename specified is a directory */
/****************************************************************************/
BOOL
DLLCALL
isdir
(
char
*
filename
)
BOOL
DLLCALL
isdir
(
const
char
*
filename
)
{
struct
stat
st
;
...
...
@@ -432,7 +432,7 @@ BOOL DLLCALL isdir(char *filename)
/****************************************************************************/
/* Returns the attributes (mode) for specified 'filename' */
/****************************************************************************/
int
DLLCALL
getfattr
(
char
*
filename
)
int
DLLCALL
getfattr
(
const
char
*
filename
)
{
#if defined(_WIN32)
long
handle
;
...
...
@@ -464,7 +464,7 @@ int DLLCALL getfattr(char* filename)
(
LPCTSTR
,
PULARGE_INTEGER
,
PULARGE_INTEGER
,
PULARGE_INTEGER
);
#endif
ulong
DLLCALL
getfreediskspace
(
char
*
path
)
ulong
DLLCALL
getfreediskspace
(
const
char
*
path
)
{
#if defined(_WIN32)
char
root
[
16
];
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/dirwrap.h
+
7
−
7
View file @
7aa4720f
...
...
@@ -162,14 +162,14 @@ extern "C" {
#endif
/* General file system wrappers for all platforms and compilers */
DLLEXPORT
BOOL
DLLCALL
fexist
(
char
*
filespec
);
DLLEXPORT
BOOL
DLLCALL
fexist
(
const
char
*
filespec
);
DLLEXPORT
BOOL
DLLCALL
fexistcase
(
char
*
filespec
);
/* fixes upr/lwr case fname */
DLLEXPORT
long
DLLCALL
flength
(
char
*
filename
);
DLLEXPORT
time_t
DLLCALL
fdate
(
char
*
filename
);
DLLEXPORT
BOOL
DLLCALL
isdir
(
char
*
filename
);
DLLEXPORT
char
*
DLLCALL
getfname
(
char
*
path
);
DLLEXPORT
int
DLLCALL
getfattr
(
char
*
filename
);
DLLEXPORT
ulong
DLLCALL
getfreediskspace
(
char
*
path
);
DLLEXPORT
long
DLLCALL
flength
(
const
char
*
filename
);
DLLEXPORT
time_t
DLLCALL
fdate
(
const
char
*
filename
);
DLLEXPORT
BOOL
DLLCALL
isdir
(
const
char
*
filename
);
DLLEXPORT
char
*
DLLCALL
getfname
(
const
char
*
path
);
DLLEXPORT
int
DLLCALL
getfattr
(
const
char
*
filename
);
DLLEXPORT
ulong
DLLCALL
getfreediskspace
(
const
char
*
path
);
#if defined(__unix__)
DLLEXPORT
void
DLLCALL
_splitpath
(
const
char
*
path
,
char
*
drive
,
char
*
dir
,
...
...
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