5252#define COLOR_TOKEN L" Color"
5353#define TEXT_TOKEN L" Text"
5454
55- unsigned long DecodeTimeString (wchar_t * string);
55+ unsigned int DecodeTimeString (wchar_t * string);
5656void Parse_Time (wchar_t * string, SubTitleClass* subTitle);
5757void Parse_Duration (wchar_t * string, SubTitleClass* subTitle);
5858void Parse_Position (wchar_t * string, SubTitleClass* subTitle);
@@ -442,7 +442,7 @@ wchar_t* SubTitleParserClass::Get_Next_Line(void)
442442
443443
444444// Convert a time string in the format hh:mm:ss:tt into 1/60 second ticks.
445- unsigned long Decode_Time_String (wchar_t * string)
445+ unsigned int Decode_Time_String (wchar_t * string)
446446{
447447 #define TICKS_PER_SECOND 60
448448 #define TICKS_PER_MINUTE (60 * TICKS_PER_SECOND)
@@ -460,27 +460,27 @@ unsigned long Decode_Time_String(wchar_t* string)
460460 wchar_t * separator = wcschr (ptr, L' :' );
461461 WWASSERT (separator != NULL );
462462 *separator++ = 0 ;
463- unsigned long hours = wcstoul (ptr, NULL , 10 );
463+ unsigned int hours = wcstoul (ptr, NULL , 10 );
464464
465465 // Isolate minutes part
466466 ptr = separator;
467467 separator = wcschr (ptr, L' :' );
468468 WWASSERT (separator != NULL );
469469 *separator++ = 0 ;
470- unsigned long minutes = wcstoul (ptr, NULL , 10 );
470+ unsigned int minutes = wcstoul (ptr, NULL , 10 );
471471
472472 // Isolate seconds part
473473 ptr = separator;
474474 separator = wcschr (ptr, L' :' );
475475 WWASSERT (separator != NULL );
476476 *separator++ = 0 ;
477- unsigned long seconds = wcstoul (ptr, NULL , 10 );
477+ unsigned int seconds = wcstoul (ptr, NULL , 10 );
478478
479479 // Isolate hundredth part (1/100th of a second)
480480 ptr = separator;
481- unsigned long hundredth = wcstoul (ptr, NULL , 10 );
481+ unsigned int hundredth = wcstoul (ptr, NULL , 10 );
482482
483- unsigned long time = (hours * TICKS_PER_HOUR);
483+ unsigned int time = (hours * TICKS_PER_HOUR);
484484 time += (minutes * TICKS_PER_MINUTE);
485485 time += (seconds * TICKS_PER_SECOND);
486486 time += ((hundredth * TICKS_PER_SECOND) / 100 );
@@ -493,7 +493,7 @@ void Parse_Time(wchar_t* param, SubTitleClass* subTitle)
493493{
494494 WWASSERT (param != NULL );
495495 WWASSERT (subTitle != NULL );
496- unsigned long time = Decode_Time_String (param);
496+ unsigned int time = Decode_Time_String (param);
497497 subTitle->Set_Display_Time (time);
498498}
499499
@@ -502,7 +502,7 @@ void Parse_Duration(wchar_t* param, SubTitleClass* subTitle)
502502{
503503 WWASSERT (param != NULL );
504504 WWASSERT (subTitle != NULL );
505- unsigned long time = Decode_Time_String (param);
505+ unsigned int time = Decode_Time_String (param);
506506
507507 if (time > 0 ) {
508508 subTitle->Set_Display_Duration (time);
0 commit comments