Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
38b69092
Commit
38b69092
authored
Feb 27, 2011
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReadDelimitedText to return number of bytes consumed, not copied
parent
d3c8084a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
string.cpp
common/string.cpp
+5
-5
kicad_string.h
include/kicad_string.h
+2
-1
No files found.
common/string.cpp
View file @
38b69092
...
...
@@ -14,7 +14,7 @@ int ReadDelimitedText( char* aDest, const char* aSource, int aDestSize )
return
0
;
bool
inside
=
false
;
c
har
*
start
=
aDest
;
c
onst
char
*
start
=
aSource
;
char
*
limit
=
aDest
+
aDestSize
-
1
;
char
cc
;
...
...
@@ -48,7 +48,7 @@ int ReadDelimitedText( char* aDest, const char* aSource, int aDestSize )
*
aDest
=
0
;
return
a
Dest
-
start
;
return
a
Source
-
start
;
}
...
...
include/kicad_string.h
View file @
38b69092
...
...
@@ -24,7 +24,8 @@ char* strlower( char* Text );
* @param aDest is the destination byte buffer.
* @param aSource is the source bytes as a C string.
* @param aDestSize is the size of the destination byte buffer.
* @return int - the number of bytes extracted.
* @return int - the number of bytes read from source, which may be more than
* the number copied, due to escaping of double quotes and the escape byte itself.
*/
int
ReadDelimitedText
(
char
*
aDest
,
const
char
*
aSource
,
int
aDestSize
);
...
...
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