Hi Raphaël, On Thu, Oct 2, 2014 at 4:13 AM, Raphaël HALIMI <[email protected]> wrote: > Perl and Python outputs are still wrong - in another way. This time, it > repeats the "def" string (" => " in Perl) each time a line is indented: > > raph@arche:~$ lsdvd -Op Star\ Trek\ TOS\ S1D1.iso > our %lsdvd = ( > => device => 'Star Trek TOS S1D1.iso', > => => title => 'EU_109920', > => => vmg_id => 'DVDVIDEO-VMG', > => => provider_id => 'EU_109920', > => => track => [ > => => { > => => => => ix => 1, > => => => => length => 2903.640, > => => => => vts_id => 'DVDVIDEO-VTS', > => => => }, > => => => { > => => => => ix => 2, > > etc, etc. > > Python output has the same problem. XML output is fine. > > Attached is a patch that completely replaces the old > fix_printf_FTBFS.patch found in debian/patches. Please send such patches to upstream as well, seen as Cc in this mail. This project has a new upstream, said to be active and responsive. This way it can be integrated to the next upstream version, maybe released soon.
Thanks for your collaboration, Laszlo/GCS
Description: add format definitions to printf's gcc is strict since upstream release, doesn't allow printf's without the format string. Author: Laszlo Boszormenyi (GCS) <[email protected]> Last-Update: 2014-04-28 --- --- a/ocode.c +++ b/ocode.c @@ -3,7 +3,7 @@ /* Simple helper macros for generating Perl structures */ -#define INDENT { int i; for(i=0; i<_lvl; i++) printf(syntax->indent); } +#define INDENT { int i; for(i=0; i<_lvl; i++) printf("%s", syntax->indent); } #define DEF DEF_ #define ADEF ADEF_ #define HASH HASH_ @@ -96,7 +96,7 @@ va_start(argp, format); vprintf(format, argp); va_end(argp); - printf(syntax->def_sep); + printf("%s", syntax->def_sep); } static void HASH_(char *name) { @@ -104,7 +104,7 @@ if (name) { printf((_lvl ? syntax->hash_inner : syntax->hash_outer), name); } else { - printf(syntax->hash_anon); + printf("%s", syntax->hash_anon); } _lvl_return[_lvl] = _lvl ? syntax->return_hash_inner : syntax->return_hash_outer; ++_lvl; @@ -127,13 +127,13 @@ va_start(argp, format); vprintf(format, argp); va_end(argp); - printf(syntax->adef_sep); + printf("%s", syntax->adef_sep); } static void RETURN_() { _lvl--; INDENT; - printf(_lvl_return[_lvl]); + printf("%s", _lvl_return[_lvl]); } static void START_() {

