Skip to content

Commit

Permalink
misc: remove unused mstrtime()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémi Denis-Courmont committed Jan 9, 2016
1 parent 1fa9bf9 commit c5369f0
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 26 deletions.
1 change: 0 additions & 1 deletion include/vlc_mtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
/*****************************************************************************
* Prototypes
*****************************************************************************/
VLC_API char * mstrtime( char *psz_buffer, mtime_t date );
VLC_API char * secstotimestr( char *psz_buffer, int32_t secs );

/*****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion src/check_symbols
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cat libvlccore.sym | grep -v \
-e '^config_' -e '^module_' -e '^var_' \
-e '^date_' -e '^sdp_' -e '^plane_' \
-e '^us_' -e '^utf8_' -e '^xml_' -e '^str_format_' -e '^GetLang_' \
-e '^m[a-z]*$' -e '^[A-Z][a-z]*Charset$' -e 'MD5$' \
-e '^m\(date\|sleep\|wait\)$' -e '^[A-Z][a-z]*Charset$' -e 'MD5$' \
-e '^NTPtime64$' -e '^secstotimestr$' \
&& exit 1

Expand Down
1 change: 0 additions & 1 deletion src/libvlccore.sym
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ vlc_vaLog
vlc_strerror
vlc_strerror_c
msleep
mstrtime
mwait
net_Accept
net_AcceptSingle
Expand Down
23 changes: 0 additions & 23 deletions src/misc/mtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,6 @@
# include <sys/time.h>
#endif

/**
* Return a date in a readable format
*
* This function converts a mtime date into a string.
* psz_buffer should be a buffer long enough to store the formatted
* date.
* \param date to be converted
* \param psz_buffer should be a buffer at least MSTRTIME_MAX_SIZE characters
* \return psz_buffer is returned so this can be used as printf parameter.
*/
char *mstrtime( char *psz_buffer, mtime_t date )
{
static const mtime_t ll1000 = 1000, ll60 = 60, ll24 = 24;

snprintf( psz_buffer, MSTRTIME_MAX_SIZE, "%02d:%02d:%02d-%03d.%03d",
(int) (date / (ll1000 * ll1000 * ll60 * ll60) % ll24),
(int) (date / (ll1000 * ll1000 * ll60) % ll60),
(int) (date / (ll1000 * ll1000) % ll60),
(int) (date / ll1000 % ll1000),
(int) (date % ll1000) );
return( psz_buffer );
}

/**
* Convert seconds to a time in the format h:mm:ss.
*
Expand Down

0 comments on commit c5369f0

Please sign in to comment.