8 char achFormat[90], *pszFormat;
9 char achHourZero[8], *pszHourZero;
10 char achTimeMark[8], *pszTimeMark;
11 char achTimeMarkPos[8], *pszTimeMarkPos;
12 int use_timemark, timemark_prefix;
20 achFormat,
sizeof(achFormat) - 1 );
21 if( pszFormat!=
NULL ) {
22 size_t uiNameSize = strlen(pszFormat);
23 if( uiNameSize < len ) {
24 strcpy( buffer, pszFormat );
34 achTimeMarkPos,
sizeof(achTimeMarkPos) );
36 achTimeMark,
sizeof(achTimeMark) );
38 achHourZero,
sizeof(achHourZero) );
42 use_timemark = ( pszTimeMark!=
NULL && atoi( pszTimeMark )==1 );
43 timemark_prefix = ( pszTimeMarkPos!=
NULL && atoi( pszTimeMarkPos )==1 );
45 if( use_timemark && timemark_prefix ) {
46 strcpy( achFormat + i,
"AM/PM " );
50 if( pszHourZero!=
NULL && atoi( pszHourZero )==1 ) {
52 strcpy( achFormat + i,
"HH:" );
54 strcpy( achFormat + i,
"hh:" );
58 strcpy( achFormat + i,
"mm:ss" );
61 if( use_timemark && !timemark_prefix ) {
62 strcpy( achFormat + i,
" AM/PM" );