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
0b377649
Commit
0b377649
authored
24 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Created getfname function to return pointer to filename portion of a path string.
parent
5976a64b
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/sbbs3/filedat.c
+15
-0
15 additions, 0 deletions
src/sbbs3/filedat.c
src/sbbs3/sbbs.h
+2
-1
2 additions, 1 deletion
src/sbbs3/sbbs.h
with
17 additions
and
1 deletion
src/sbbs3/filedat.c
+
15
−
0
View file @
0b377649
...
...
@@ -543,6 +543,21 @@ char* DLLCALL padfname(char *filename, char *str)
return
(
str
);
}
char
*
DLLCALL
getfname
(
char
*
path
)
{
char
*
fname
;
fname
=
strrchr
(
path
,
'\\'
);
if
(
fname
==
NULL
)
fname
=
strrchr
(
path
,
'/'
);
if
(
fname
!=
NULL
)
fname
++
;
else
fname
=
path
;
return
(
fname
);
}
/****************************************************************************/
/* Turns FILE .EXT into FILE.EXT */
/****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/sbbs.h
+
2
−
1
View file @
0b377649
...
...
@@ -522,7 +522,7 @@ public:
bool
removefcdt
(
file_t
*
f
);
bool
movefile
(
file_t
*
f
,
int
newdir
);
char
*
getfilespec
(
char
*
str
);
int
delfiles
(
char
*
path
,
char
*
spec
);
u
int
delfiles
(
char
*
path
,
char
*
spec
);
bool
checkfname
(
char
*
fname
);
bool
addtobatdl
(
file_t
*
f
);
...
...
@@ -694,6 +694,7 @@ extern "C" {
DLLEXPORT
BOOL
DLLCALL
removefiledat
(
scfg_t
*
cfg
,
file_t
*
f
);
DLLEXPORT
BOOL
DLLCALL
addfiledat
(
scfg_t
*
cfg
,
file_t
*
f
);
DLLEXPORT
BOOL
DLLCALL
findfile
(
scfg_t
*
cfg
,
uint
dirnum
,
char
*
filename
);
DLLEXPORT
char
*
DLLCALL
getfname
(
char
*
path
);
DLLEXPORT
char
*
DLLCALL
padfname
(
char
*
filename
,
char
*
str
);
DLLEXPORT
char
*
DLLCALL
unpadfname
(
char
*
filename
,
char
*
str
);
DLLEXPORT
BOOL
DLLCALL
rmuserxfers
(
scfg_t
*
cfg
,
int
fromuser
,
int
destuser
,
char
*
fname
);
...
...
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