Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
libdvbpsi
Commits
d7ca3502
Commit
d7ca3502
authored
Jul 19, 2015
by
Daniel Kamil Kozar
Committed by
Jean-Paul Saman
Jan 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce real checks for carray types
Signed-off-by:
Jean-Paul Saman
<
jpsaman@videolan.org
>
parent
8fd0468c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
2 deletions
+56
-2
misc/dr.xml
misc/dr.xml
+2
-0
misc/dr.xsl
misc/dr.xsl
+11
-0
misc/test_dr.c
misc/test_dr.c
+41
-0
misc/test_dr.h
misc/test_dr.h
+2
-2
No files found.
misc/dr.xml
View file @
d7ca3502
...
...
@@ -305,10 +305,12 @@
s_decoded.i_event_name_length = 0;
</begin>
</insert>
<carray
name=
"i_iso_639_code"
/>
<array
name=
"i_text"
len_name=
"i_text_length"
min_size=
"0"
max_size=
"248"
/>
</descriptor>
<descriptor
name=
"short event (both)"
sname=
"short_event"
fname=
"ShortEvent"
msuffix=
"2"
>
<carray
name=
"i_iso_639_code"
/>
<array
name=
"i_text"
len_name=
"i_text_length"
min_size=
"0"
max_size=
"124"
/>
<array
name=
"i_event_name"
len_name=
"i_event_name_length"
min_size=
"0"
max_size=
"124"
/>
</descriptor>
...
...
misc/dr.xsl
View file @
d7ca3502
...
...
@@ -169,6 +169,17 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
BOZO_end_array
</xsl:template>
<xsl:template
match=
"carray"
mode=
"check"
>
/* check
<xsl:value-of
select=
"@name"
/>
*/
<xsl:apply-templates
select=
".."
mode=
"init"
/>
i_loop_count = 0;
BOZO_begin_array(
<xsl:value-of
select=
"@name"
/>
)
BOZO_DOJOB(
<xsl:value-of
select=
"../@fname"
/>
);
i_err = memcmp(s_decoded.
<xsl:value-of
select=
"@name"
/>
,
p_new_decoded->
<xsl:value-of
select=
"@name"
/>
,
sizeof(s_decoded.
<xsl:value-of
select=
"@name"
/>
));
BOZO_end_array
</xsl:template>
<xsl:template
match=
"insert"
mode=
"check"
>
<xsl:value-of
select=
"check"
/>
</xsl:template>
...
...
misc/test_dr.c
View file @
d7ca3502
...
...
@@ -1911,6 +1911,19 @@ static int main_short_event_0(void)
BOZO_START
(
short
event
(
event_name
));
/* check i_iso_639_code */
s_decoded
.
i_text_length
=
0
;
BOZO_fill_array
(
s_decoded
.
i_iso_639_code
,
sizeof
(
s_decoded
.
i_iso_639_code
));
BOZO_init_array
(
i_event_name_length
);
i_loop_count
=
0
;
BOZO_begin_array
(
i_iso_639_code
)
BOZO_DOJOB
(
ShortEvent
);
i_err
=
memcmp
(
s_decoded
.
i_iso_639_code
,
p_new_decoded
->
i_iso_639_code
,
sizeof
(
s_decoded
.
i_iso_639_code
));
BOZO_end_array
/* check i_event_name */
s_decoded
.
i_text_length
=
0
;
...
...
@@ -1938,9 +1951,23 @@ static int main_short_event_1(void)
BOZO_START
(
short
event
(
i_text
));
/* check i_iso_639_code */
s_decoded
.
i_event_name_length
=
0
;
BOZO_fill_array
(
s_decoded
.
i_iso_639_code
,
sizeof
(
s_decoded
.
i_iso_639_code
));
BOZO_init_array
(
i_text_length
);
i_loop_count
=
0
;
BOZO_begin_array
(
i_iso_639_code
)
BOZO_DOJOB
(
ShortEvent
);
i_err
=
memcmp
(
s_decoded
.
i_iso_639_code
,
p_new_decoded
->
i_iso_639_code
,
sizeof
(
s_decoded
.
i_iso_639_code
));
BOZO_end_array
/* check i_text */
s_decoded
.
i_event_name_length
=
0
;
BOZO_fill_array
(
s_decoded
.
i_iso_639_code
,
sizeof
(
s_decoded
.
i_iso_639_code
));
BOZO_init_array
(
i_text_length
);
BOZO_begin_array
(
i_text
)
BOZO_loop_array_begin
(
i_text
,
i_text_length
,
0
)
...
...
@@ -1964,7 +1991,20 @@ static int main_short_event_2(void)
BOZO_START
(
short
event
(
both
));
/* check i_iso_639_code */
BOZO_fill_array
(
s_decoded
.
i_iso_639_code
,
sizeof
(
s_decoded
.
i_iso_639_code
));
BOZO_init_array
(
i_text_length
);
BOZO_init_array
(
i_event_name_length
);
i_loop_count
=
0
;
BOZO_begin_array
(
i_iso_639_code
)
BOZO_DOJOB
(
ShortEvent
);
i_err
=
memcmp
(
s_decoded
.
i_iso_639_code
,
p_new_decoded
->
i_iso_639_code
,
sizeof
(
s_decoded
.
i_iso_639_code
));
BOZO_end_array
/* check i_text */
BOZO_fill_array
(
s_decoded
.
i_iso_639_code
,
sizeof
(
s_decoded
.
i_iso_639_code
));
BOZO_init_array
(
i_text_length
);
BOZO_init_array
(
i_event_name_length
);
BOZO_begin_array
(
i_text
)
...
...
@@ -1977,6 +2017,7 @@ static int main_short_event_2(void)
BOZO_end_array
/* check i_event_name */
BOZO_fill_array
(
s_decoded
.
i_iso_639_code
,
sizeof
(
s_decoded
.
i_iso_639_code
));
BOZO_init_array
(
i_text_length
);
BOZO_init_array
(
i_event_name_length
);
BOZO_begin_array
(
i_event_name
)
...
...
misc/test_dr.h
View file @
d7ca3502
...
...
@@ -148,10 +148,10 @@ static void BOZO_fill_array(void *a, size_t len)
s_decoded.len_name = i_loop_count;
#define BOZO_loop_array_end(name, max_len) \
} while(!i_err && i_loop_count < max_len); \
fprintf(stdout, "\r iteration count: %22"PRI64d, i_loop_count);
} while(!i_err && i_loop_count < max_len);
#define BOZO_end_array \
fprintf(stdout, "\r iteration count: %22"PRI64d, i_loop_count); \
if(i_err) \
fprintf(stdout, " FAILED !!!\n"); \
else \
...
...
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