Bug#1093234: Perl output (-Op) completely broken
Petter Reinholdtsen (HE12025-02-17):
> Thank you for letting us know. I had a look, and suspec the following
> patch solve your problem with a missing comma.
>
> diff --git a/ocode.c b/ocode.c
> index b41b5cc..0c53740 100644
> --- a/ocode.c
> +++ b/ocode.c
> @@ -142,6 +142,8 @@ static void DEF_(char *name, const char *format, ...) {
> }
>
> static void HASH_(char *name) {
> + if (indef)
> + printf("%s%s", syntax->def_sep, syntax->lbreak);
> inhash = 1;
> indef = 0;
> INDENT;
Hi. Thank you for the suggestion. It makes it better, but not good
enough. But it got me started: it also requires:
--- ocode.c.orig 2025-02-17 20:59:47.873749992 +0100
+++ ocode.c 2025-02-17 21:01:19.959031596 +0100
@@ -40,15 +40,15 @@
"'%s'", // quoteval
"%s => ", // def
",", // def_sep
- "our %%%s = {\n", // hash_outer
+ "our %%%s = (\n", // hash_outer
"%s => {\n", // hash_inner
"{\n", // hash_anon
- "our @%s = [\n", // array_outer
+ "our @%s = (\n", // array_outer
"%s => [\n", // array_inner
",", // adef_sep
- "};\n", // return_hash_outer
+ ");\n", // return_hash_outer
"};\n", // return_lasthash_outer
- "];\n", // return_array_outer
+ ");\n", // return_array_outer
"}", // return_hash_inner
"},\n", // return_lasthash_inner
"]" // return_array_inner
“%h = {…}” is not valid perl, it is either “%h = (…)” or “$h = {…}”. The
old version outputs “our %lsdvd = (”, I strongly suggest to keep
compatible.
I can confirm that with these two patches applied, lsdvd can once again
be used with ffmpeg's tools/dvd2concat.
Thanks.
Regards,
--
Nicolas George
Reply to: