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
5079d2ee
Commit
5079d2ee
authored
20 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
truncsp() and truncnl() are now part of genwrap.c (since STRERROR needs
truncsp() on Win32 anyway).
parent
f0550f24
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/xpdev/dat_file.c
+0
-2
0 additions, 2 deletions
src/xpdev/dat_file.c
src/xpdev/genwrap.c
+28
-0
28 additions, 0 deletions
src/xpdev/genwrap.c
src/xpdev/genwrap.h
+5
-0
5 additions, 0 deletions
src/xpdev/genwrap.h
src/xpdev/ini_file.c
+0
-2
0 additions, 2 deletions
src/xpdev/ini_file.c
with
33 additions
and
4 deletions
src/xpdev/dat_file.c
+
0
−
2
View file @
5079d2ee
...
@@ -41,8 +41,6 @@
...
@@ -41,8 +41,6 @@
#include
<stdlib.h>
/* malloc */
#include
<stdlib.h>
/* malloc */
#include
<string.h>
/* strdup */
#include
<string.h>
/* strdup */
#include
"truncsp.c"
/* truncsp() and truncnl() */
/***********************************/
/***********************************/
/* CSV (Comma Separated Value) API */
/* CSV (Comma Separated Value) API */
/***********************************/
/***********************************/
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/genwrap.c
+
28
−
0
View file @
5079d2ee
...
@@ -416,3 +416,31 @@ clock_t DLLCALL msclock(void)
...
@@ -416,3 +416,31 @@ clock_t DLLCALL msclock(void)
return
((
clock_t
)(
usecs
/
(
1000000
/
MSCLOCKS_PER_SEC
)));
return
((
clock_t
)(
usecs
/
(
1000000
/
MSCLOCKS_PER_SEC
)));
}
}
#endif
#endif
/****************************************************************************/
/* Truncates all white-space chars off end of 'str' (needed by STRERRROR) */
/****************************************************************************/
char
*
DLLCALL
truncsp
(
char
*
str
)
{
unsigned
c
;
c
=
strlen
(
str
);
while
(
c
&&
(
str
[
c
-
1
]
==
' '
||
str
[
c
-
1
]
==
'\t'
||
str
[
c
-
1
]
==
'\r'
||
str
[
c
-
1
]
==
'\n'
))
c
--
;
str
[
c
]
=
0
;
return
(
str
);
}
/****************************************************************************/
/* Truncates carriage-return and line-feed chars off end of 'str' */
/****************************************************************************/
char
*
DLLCALL
truncnl
(
char
*
str
)
{
unsigned
c
;
c
=
strlen
(
str
);
while
(
c
&&
(
str
[
c
-
1
]
==
'\r'
||
str
[
c
-
1
]
==
'\n'
))
c
--
;
str
[
c
]
=
0
;
return
(
str
);
}
This diff is collapsed.
Click to expand it.
src/xpdev/genwrap.h
+
5
−
0
View file @
5079d2ee
...
@@ -171,6 +171,11 @@ extern "C" {
...
@@ -171,6 +171,11 @@ extern "C" {
#endif
#endif
#endif
#endif
/* Truncate white-space chars off end of string */
DLLEXPORT
char
*
DLLCALL
truncsp
(
char
*
str
);
/* Truncate new-line chars off end of string */
DLLEXPORT
char
*
DLLCALL
truncnl
(
char
*
str
);
#if defined(__unix__)
#if defined(__unix__)
#define STRERROR(x) strerror(x)
#define STRERROR(x) strerror(x)
#else
#else
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/ini_file.c
+
0
−
2
View file @
5079d2ee
...
@@ -54,8 +54,6 @@
...
@@ -54,8 +54,6 @@
static
ini_style_t
default_style
;
static
ini_style_t
default_style
;
#include
"truncsp.c"
/* truncsp() and truncnl() */
static
char
*
section_name
(
char
*
p
)
static
char
*
section_name
(
char
*
p
)
{
{
char
*
tp
;
char
*
tp
;
...
...
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