Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
7e9f61e3
Commit
7e9f61e3
authored
Nov 11, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cdh_Strcpy added for copying into the same buffer
parent
910f41b7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
src/lib/co/src/co_cdh.c
src/lib/co/src/co_cdh.c
+13
-0
src/lib/co/src/co_cdh.h
src/lib/co/src/co_cdh.h
+2
-0
No files found.
src/lib/co/src/co_cdh.c
View file @
7e9f61e3
...
...
@@ -2567,6 +2567,19 @@ cdh_NoCaseStrncmp (
(
isalpha
(
*
t
)
?
((
*
t
)
&
~
(
1
<<
5
))
:
*
t
);
}
//! Copy string char by char to allow overlapping source and target buffers
char
*
cdh_Strcpy
(
char
*
dest
,
const
char
*
src
)
{
const
char
*
s
;
char
*
t
;
for
(
s
=
src
,
t
=
dest
;
*
s
;
s
++
,
t
++
)
*
t
=
*
s
;
*
t
=
0
;
return
dest
;
}
//! Copy string, and cut of if the string is to long with ending '...'
/*!
For example the string '0123456789' will return the string '0123...' when
...
...
src/lib/co/src/co_cdh.h
View file @
7e9f61e3
...
...
@@ -1015,6 +1015,8 @@ cdh_NoCaseStrncmp (
size_t
n
);
char
*
cdh_Strcpy
(
char
*
dest
,
const
char
*
src
);
int
cdh_StrncpyCutOff
(
char
*
s
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment