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
22bf2c67
Commit
22bf2c67
authored
24 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Moved fexist and flength to smbwrap.c
parent
35291e04
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/smbutil.c
+13
-74
13 additions, 74 deletions
src/sbbs3/smbutil.c
with
13 additions
and
74 deletions
src/sbbs3/smbutil.c
+
13
−
74
View file @
22bf2c67
...
@@ -45,9 +45,16 @@
...
@@ -45,9 +45,16 @@
#define findnext(x) _dos_findnext(x)
#define findnext(x) _dos_findnext(x)
#endif
#endif
#include
<ctype.h>
/* isdigit() */
#if defined(_WIN32)
#include
<conio.h>
/* getch() */
#include
<ctype.h>
/* isdigit() */
#include
<conio.h>
/* getch() */
#endif
/* ANSI */
#include
<time.h>
/* time */
#include
"smblib.h"
#include
"smblib.h"
#include
"smbwrap.h"
#include
"crc32.h"
#include
"crc32.h"
#ifdef __WATCOMC__
#ifdef __WATCOMC__
...
@@ -122,74 +129,6 @@ ucrc16(0,&crc);
...
@@ -122,74 +129,6 @@ ucrc16(0,&crc);
return
(
crc
);
return
(
crc
);
}
}
#ifdef _MSC_VER
/****************************************************************************/
/* Checks the disk drive for the existence of a file. Returns 1 if it */
/* exists, 0 if it doesn't. */
/****************************************************************************/
int
fexist
(
char
*
filespec
)
{
long
handle
;
struct
_finddata_t
f
;
if
((
handle
=
_findfirst
(
filespec
,
&
f
))
==-
1
)
return
(
0
);
_findclose
(
handle
);
if
(
f
.
attrib
&
_A_SUBDIR
)
return
(
0
);
return
(
1
);
}
/****************************************************************************/
/* Returns the length of the file in 'filespec' */
/****************************************************************************/
long
flength
(
char
*
filespec
)
{
long
handle
;
struct
_finddata_t
f
;
if
((
handle
=
_findfirst
(
filespec
,
&
f
))
==-
1
)
return
(
-
1L
);
_findclose
(
handle
);
return
(
f
.
size
);
}
#else
/****************************************************************************/
/* Checks the disk drive for the existence of a file. Returns 1 if it */
/* exists, 0 if it doesn't. */
/****************************************************************************/
char
fexist
(
char
*
filespec
)
{
struct
ffblk
f
;
if
(
findfirst
(
filespec
,
&
f
,
0
)
==
0
)
return
(
1
);
return
(
0
);
}
/****************************************************************************/
/* Returns the length of the file in 'filespec' */
/****************************************************************************/
long
flength
(
char
*
filespec
)
{
struct
ffblk
f
;
if
(
findfirst
(
filespec
,
&
f
,
0
)
==
0
)
#ifdef __WATCOMC__
return
(
f
.
size
);
#else
return
(
f
.
ff_fsize
);
#endif
return
(
-
1L
);
}
#endif
/* _MSC_VER */
void
remove_re
(
char
*
str
)
void
remove_re
(
char
*
str
)
{
{
while
(
!
strnicmp
(
str
,
"RE:"
,
3
))
{
while
(
!
strnicmp
(
str
,
"RE:"
,
3
))
{
...
@@ -355,7 +294,7 @@ smb_freemsgmem(&msg);
...
@@ -355,7 +294,7 @@ smb_freemsgmem(&msg);
/****************************************************************************/
/****************************************************************************/
/* Shows the message base header */
/* Shows the message base header */
/****************************************************************************/
/****************************************************************************/
void
showstatus
()
void
showstatus
(
void
)
{
{
int
i
;
int
i
;
...
@@ -388,7 +327,7 @@ printf("last_msg =%lu\n"
...
@@ -388,7 +327,7 @@ printf("last_msg =%lu\n"
/****************************************************************************/
/****************************************************************************/
/* Configure message base header */
/* Configure message base header */
/****************************************************************************/
/****************************************************************************/
void
config
()
void
config
(
void
)
{
{
char
max_msgs
[
128
],
max_crcs
[
128
],
max_age
[
128
],
header_offset
[
128
],
attr
[
128
];
char
max_msgs
[
128
],
max_crcs
[
128
],
max_age
[
128
],
header_offset
[
128
],
attr
[
128
];
int
i
;
int
i
;
...
@@ -1379,8 +1318,8 @@ int main(int argc, char **argv)
...
@@ -1379,8 +1318,8 @@ int main(int argc, char **argv)
int
i
,
j
,
x
,
y
;
int
i
,
j
,
x
,
y
;
#ifdef __TURBOC__
#ifdef __TURBOC__
timezone
=
0
;
/* Fix for Borland C++ EST default */
//
timezone=0; /* Fix for Borland C++ EST default */
daylight
=
0
;
/* Fix for Borland C++ EDT default */
//
daylight=0; /* Fix for Borland C++ EDT default */
#elif defined(__WATCOMC__)
#elif defined(__WATCOMC__)
putenv
(
"TZ=UCT0"
);
/* Fix for Watcom C++ EDT default */
putenv
(
"TZ=UCT0"
);
/* Fix for Watcom C++ EDT default */
#endif
#endif
...
...
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