WinCE: strftime eats percent sign when '%i' is used in filename format, leaving just 'i' in place
|Reported by:||leonardohamada||Owned by:|
|Severity:||trivial||Keywords:||xml, osd, display, strings|
When '%i' is used on format for filename for sequential numbering of files within navit.xml, it is replaced by the literal 'i' appended on the resulting file by navit.
On wince, navit compiled with mingw32ce-mk-2013-04-03-amd64 (http://max.kellermann.name/projects/cegcc/) on Arch, this is caused by strftime function omitting the literal '%' sign on the format string, as '%i' has no corresponding expansion by strftime.
Proposed solution 1.
Use double percent sign, '%%i', this should be harmless because it eplicitly tells strftime to output a single '%' sign, leaving a correct '%i' on the format string, that will be replaced by an integer then.
Must be updated in the wiki documentation example as: data="%Y%m%d-%%i.gpx"
Proposed solution 2.
Adjust the source in log.c to the desired behavior.
Please, review this carefully.
Change History (11)
comment:2 Changed 4 years ago by leonardohamada
comment:4 Changed 4 years ago by leonardohamada
comment:5 Changed 4 years ago by leonardohamada
- Resolution set to fixed
- Status changed from new to closed
- Summary changed from on wince, strftime eats percent sign when '%i' is used in filename format, leaving just 'i' in place. to -
comment:6 Changed 4 years ago by sleske
- Resolution fixed deleted
- Status changed from closed to reopened
- Summary changed from - to WinCE: strftime eats percent sign when '%i' is used in filename format, leaving just 'i' in place
Changed 4 years ago by leonardohamada
comment:9 Changed 4 years ago by usul
- Keywords xml osd display strings added
- Milestone set to version 0.5.1