git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f7c8036
)
Always enforce the "don't show if unavailable" option in format strings.
author
Antoine Cellerier
<dionoea@videolan.org>
Wed, 27 Aug 2008 00:11:07 +0000
(
02:11
+0200)
committer
Antoine Cellerier
<dionoea@videolan.org>
Wed, 27 Aug 2008 00:13:19 +0000
(
02:13
+0200)
src/text/strings.c
patch
|
blob
|
history
diff --git
a/src/text/strings.c
b/src/text/strings.c
index
5d13957
..
2191f73
100644
(file)
--- a/
src/text/strings.c
+++ b/
src/text/strings.c
@@
-638,7
+638,7
@@
char *str_format_time( const char *tformat )
d += len; \
free( string ); \
} \
d += len; \
free( string ); \
} \
- else
\
+ else
if( !b_empty_if_na )
\
{ \
*(dst+d) = '-'; \
d++; \
{ \
*(dst+d) = '-'; \
d++; \
@@
-655,8
+655,8
@@
char *str_format_time( const char *tformat )
char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
const char *s = string;
char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
const char *s = string;
-
int b_is_format = 0
;
-
int b_empty_if_na = 0
;
+
bool b_is_format = false
;
+
bool b_empty_if_na = false
;
char buf[10];
int i_size = strlen( string ) + 1; /* +1 to store '\0' */
char *dst = strdup( string );
char buf[10];
int i_size = strlen( string ) + 1; /* +1 to store '\0' */
char *dst = strdup( string );
@@
-938,7
+938,7
@@
char *__str_format_meta( vlc_object_t *p_object, const char *string )
break;
case ' ':
break;
case ' ':
- b_empty_if_na =
1
;
+ b_empty_if_na =
true
;
break;
default:
break;
default:
@@
-947,12
+947,12
@@
char *__str_format_meta( vlc_object_t *p_object, const char *string )
break;
}
if( *s != ' ' )
break;
}
if( *s != ' ' )
- b_is_format =
0
;
+ b_is_format =
false
;
}
else if( *s == '$' )
{
}
else if( *s == '$' )
{
- b_is_format =
1
;
- b_empty_if_na =
0
;
+ b_is_format =
true
;
+ b_empty_if_na =
false
;
}
else
{
}
else
{