projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use inheritance for trace descriptor and positions
[babeltrace.git]
/
formats
/
ctf
/
types
/
string.c
diff --git
a/formats/ctf/types/string.c
b/formats/ctf/types/string.c
index 125e7b3b484814b3b3620044d006357b8df02c3f..ac25e1adc4c5eb81bf5262110adf602e394bea67 100644
(file)
--- a/
formats/ctf/types/string.c
+++ b/
formats/ctf/types/string.c
@@
-20,53
+20,57
@@
#include <limits.h> /* C99 limits */
#include <string.h>
#include <limits.h> /* C99 limits */
#include <string.h>
-void ctf_string_copy(struct stream_pos *
dest, struct stream_pos *
src,
- const struct
type_string *string_type
)
+void ctf_string_copy(struct stream_pos *
pdest, struct stream_pos *p
src,
+ const struct
declaration_string *string_declaration
)
{
{
+ struct ctf_stream_pos *dest = ctf_pos(pdest);
+ struct ctf_stream_pos *src = ctf_pos(psrc);
size_t len;
char *destaddr, *srcaddr;
size_t len;
char *destaddr, *srcaddr;
-
align_pos(src, string_type
->p.alignment);
- srcaddr = get_pos_addr(src);
+
ctf_align_pos(src, string_declaration
->p.alignment);
+ srcaddr =
ctf_
get_pos_addr(src);
len = strlen(srcaddr) + 1;
if (dest->dummy)
goto end;
len = strlen(srcaddr) + 1;
if (dest->dummy)
goto end;
-
align_pos(dest, string_type
->p.alignment);
- destaddr = get_pos_addr(dest);
+
ctf_align_pos(dest, string_declaration
->p.alignment);
+ destaddr =
ctf_
get_pos_addr(dest);
strcpy(destaddr, srcaddr);
end:
strcpy(destaddr, srcaddr);
end:
- move_pos(dest, len);
- move_pos(src, len);
+
ctf_
move_pos(dest, len);
+
ctf_
move_pos(src, len);
}
}
-void ctf_string_read(char **dest, struct stream_pos *src,
- const struct
type_string *string_type
)
+void ctf_string_read(char **dest, struct stream_pos *
p
src,
+ const struct
declaration_string *string_declaration
)
{
{
+ struct ctf_stream_pos *src = ctf_pos(psrc);
size_t len;
char *srcaddr;
size_t len;
char *srcaddr;
-
align_pos(src, string_type
->p.alignment);
- srcaddr = get_pos_addr(src);
+
ctf_align_pos(src, string_declaration
->p.alignment);
+ srcaddr =
ctf_
get_pos_addr(src);
len = strlen(srcaddr) + 1;
*dest = g_realloc(*dest, len);
strcpy(*dest, srcaddr);
len = strlen(srcaddr) + 1;
*dest = g_realloc(*dest, len);
strcpy(*dest, srcaddr);
- move_pos(src, len);
+
ctf_
move_pos(src, len);
}
}
-void ctf_string_write(struct stream_pos *dest, const char *src,
- const struct
type_string *string_type
)
+void ctf_string_write(struct stream_pos *
p
dest, const char *src,
+ const struct
declaration_string *string_declaration
)
{
{
+ struct ctf_stream_pos *dest = ctf_pos(pdest);
size_t len;
char *destaddr;
size_t len;
char *destaddr;
-
align_pos(dest, string_type
->p.alignment);
+
ctf_align_pos(dest, string_declaration
->p.alignment);
len = strlen(src) + 1;
if (dest->dummy)
goto end;
len = strlen(src) + 1;
if (dest->dummy)
goto end;
- destaddr = get_pos_addr(dest);
+ destaddr =
ctf_
get_pos_addr(dest);
strcpy(destaddr, src);
end:
strcpy(destaddr, src);
end:
- move_pos(dest, len);
+
ctf_
move_pos(dest, len);
}
void ctf_string_free_temp(char *string)
}
void ctf_string_free_temp(char *string)
This page took
0.023841 seconds
and
4
git commands to generate.