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
aa592e35
Commit
aa592e35
authored
11 months ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Create replace_chars(), a wrapper for REPLACE_CHARS()
The iteration variable (p) is created on the stack.
parent
bf757d69
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!455
Update branch with changes from master
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sbbs3/str_util.c
+12
-2
12 additions, 2 deletions
src/sbbs3/str_util.c
src/sbbs3/str_util.h
+1
-0
1 addition, 0 deletions
src/sbbs3/str_util.h
with
13 additions
and
2 deletions
src/sbbs3/str_util.c
+
12
−
2
View file @
aa592e35
...
...
@@ -649,8 +649,18 @@ char* replace_named_values(const char* src
*
p
=
0
;
/* terminate string in destination buffer */
return
(
buf
);
}
}
/****************************************************************************/
/****************************************************************************/
char
*
replace_chars
(
char
*
str
,
char
c1
,
char
c2
)
{
char
*
p
;
REPLACE_CHARS
(
str
,
c1
,
c2
,
p
);
return
str
;
}
/****************************************************************************/
/* Condense consecutive white-space chars in a string to single spaces */
/****************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/str_util.h
+
1
−
0
View file @
aa592e35
...
...
@@ -44,6 +44,7 @@ DLLEXPORT char * ascii_str(uchar* str);
DLLEXPORT
char
*
replace_named_values
(
const
char
*
src
,
char
*
buf
,
size_t
buflen
,
const
char
*
escape_seq
,
named_string_t
*
string_list
,
named_int_t
*
int_list
,
bool
case_sensitive
);
DLLEXPORT
char
*
replace_chars
(
char
*
str
,
char
c1
,
char
c2
);
DLLEXPORT
char
*
condense_whitespace
(
char
*
str
);
DLLEXPORT
char
exascii_to_ascii_char
(
uchar
ch
);
DLLEXPORT
char
*
convert_ansi
(
const
char
*
src
,
char
*
dest
,
size_t
,
int
width
,
bool
ice_color
);
...
...
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