AZO234 / NP2kai

Neko Project II kai
http://domisan.sakura.ne.jp/article/np2kai/np2kai.html
MIT License
265 stars 62 forks source link

Some updates #24

Closed frank-deng closed 6 years ago

frank-deng commented 6 years ago
  1. Removed some files with unnecessary executable permission under Linux.
  2. Use sscanf() to parse time information of CUE file, so as to correctly handle tracks with time information like below instead of generating a zero-length song:
    FILE "audiocd.dat" BINARY
    TRACK 01 AUDIO
    INDEX 01 0:00:00
    TRACK 02 AUDIO
    INDEX 01 1:59:43
AZO234 commented 6 years ago

Thanks! I think sscan's filter "%2d:%2d:%2d" is better.
And if input is illegal format string, check sscan's return value is EOF, then return 0;

frank-deng commented 6 years ago

Thank you for your suggestion.

frank-deng commented 6 years ago

It seems that under Ubuntu 16.04, sscanf(str, "%2d:%2d:%2d", &m, &s, &f) will return 3 when the format of string is legal, with other return values when string is illegal.

AZO234 commented 6 years ago

Yeah. Nice work!