Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
0c0b039c
Commit
0c0b039c
authored
7 years ago
by
Kostyantyn Vorobyov
Committed by
Julien Signoles
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
New functionality in the string module of RTL
parent
73ef7e4f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/e-acsl/share/e-acsl/e_acsl_string.h
+22
-7
22 additions, 7 deletions
src/plugins/e-acsl/share/e-acsl/e_acsl_string.h
with
22 additions
and
7 deletions
src/plugins/e-acsl/share/e-acsl/e_acsl_string.h
+
22
−
7
View file @
0c0b039c
...
@@ -40,13 +40,18 @@
...
@@ -40,13 +40,18 @@
#define E_ACSL_STD_STRING_H
#define E_ACSL_STD_STRING_H
#ifndef E_ACSL_NO_COMPILER_BUILTINS
#ifndef E_ACSL_NO_COMPILER_BUILTINS
# define memset __builtin_memset
# define memset __builtin_memset
# define memcmp __builtin_memcmp
# define memcmp __builtin_memcmp
# define memcpy __builtin_memcpy
# define memcpy __builtin_memcpy
# define memmove __builtin_memmove
# define memmove __builtin_memmove
# define strlen __builtin_strlen
# define strncat __builtin_strncat
# define strcmp __builtin_strcmp
# define strcat __builtin_strcat
# define strncmp __builtin_strncmp
# define strlen __builtin_strlen
# define strcmp __builtin_strcmp
# define strncmp __builtin_strncmp
# define strcpy __builtin_strcpy
# define strncpy __builtin_strncpy
# define strchr __builtin_strchr
#else
#else
# include <string.h>
# include <string.h>
#endif
#endif
...
@@ -128,4 +133,14 @@ static int zeroed_out(const void *p, size_t size) {
...
@@ -128,4 +133,14 @@ static int zeroed_out(const void *p, size_t size) {
}
}
return
!
memcmp
(
pc
,
&
zeroblock
,
rem
);
return
!
memcmp
(
pc
,
&
zeroblock
,
rem
);
}
}
/** \brief Count the number of occurrences of char `c` in a string `s` */
static
int
charcount
(
const
char
*
s
,
char
c
)
{
int
count
=
0
;
while
((
s
=
strchr
(
s
,
c
))
!=
NULL
)
{
count
++
;
s
++
;
}
return
count
;
}
#endif
#endif
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