Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
181d1906
Commit
181d1906
authored
11 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
stm: Remove unused, useless and not-to-be-used strndup.
Addresses issue #275.
parent
f1081f40
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
stm/std.h
+0
-1
0 additions, 1 deletion
stm/std.h
stm/string0.c
+0
-11
0 additions, 11 deletions
stm/string0.c
teensy/std.h
+0
-1
0 additions, 1 deletion
teensy/std.h
with
0 additions
and
13 deletions
stm/std.h
+
0
−
1
View file @
181d1906
...
...
@@ -13,7 +13,6 @@ void *memset(void *s, int c, size_t n);
size_t
strlen
(
const
char
*
str
);
int
strcmp
(
const
char
*
s1
,
const
char
*
s2
);
int
strncmp
(
const
char
*
s1
,
const
char
*
s2
,
size_t
n
);
char
*
strndup
(
const
char
*
s
,
size_t
n
);
char
*
strcpy
(
char
*
dest
,
const
char
*
src
);
char
*
strcat
(
char
*
dest
,
const
char
*
src
);
char
*
strchr
(
const
char
*
s
,
int
c
);
...
...
This diff is collapsed.
Click to expand it.
stm/string0.c
+
0
−
11
View file @
181d1906
...
...
@@ -78,17 +78,6 @@ int strncmp(const char *s1, const char *s2, size_t n) {
else
return
0
;
}
char
*
strndup
(
const
char
*
s
,
size_t
n
)
{
size_t
len
=
strlen
(
s
);
if
(
n
>
len
)
{
n
=
len
;
}
char
*
s2
=
malloc
(
n
+
1
);
memcpy
(
s2
,
s
,
n
);
s2
[
n
]
=
'\0'
;
return
s2
;
}
char
*
strcpy
(
char
*
dest
,
const
char
*
src
)
{
char
*
d
=
dest
;
while
(
*
src
)
{
...
...
This diff is collapsed.
Click to expand it.
teensy/std.h
+
0
−
1
View file @
181d1906
...
...
@@ -13,7 +13,6 @@ void *memset(void *s, int c, size_t n);
int
strlen
(
const
char
*
str
);
int
strcmp
(
const
char
*
s1
,
const
char
*
s2
);
int
strncmp
(
const
char
*
s1
,
const
char
*
s2
,
size_t
n
);
char
*
strndup
(
const
char
*
s
,
size_t
n
);
char
*
strcpy
(
char
*
dest
,
const
char
*
src
);
char
*
strcat
(
char
*
dest
,
const
char
*
src
);
...
...
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