Am 21.06.22 um 05:09 schrieb Jim Pazarena:
> I did not file a bug report .
> But I had hopes that after a month passed , someone , perhaps even the
> maintainer , this issue would have been corrected .
> 
> Alas .
> 
> I can't be the only one that wants to pretty up their source , and uses 
> gindent
> to do it . So is no one concerned that this utility fails to compile ?

I do not use gindent, but I have looked into the build issue.

There is parens_indent as local variable in dump_line_code(), which
is only initialized and updated, but never used, and there is the
global array parser_state_tos->paren_indents[], and that is actually
used.

Without trying to get a deep understanding of the code, I can only
assume that the local variable has been found to not suffice to
determine the correct indentation value, and that it has been
replaced by the array, but without removal of the now unused local
variable.

I can update the port to not define and update parens_indent, but
since I do not use that port and since I do not have the time and
motivation to analyze the logic used, I can only point out how to
make the port build, but will not commit the patch.


If you want to give the patch a try you can save the attached file
as devel/gindent/files/patch-src_output.c, replacing that file.

I have only commented out the code that causes the build to break.
A commit-ready patch would remove those lines from the sources.


If this patch works for you after some testing, I'll update the
patch to allow an official package to be built again.

Regards, STefan
--- src/output.c.orig   2018-09-05 16:47:56 UTC
+++ src/output.c
@@ -74,7 +74,7 @@ RCSTAG_CC ("$Id$");
 
 RCSTAG_CC ("$Id$");
 
-static FILE            * output       = NULL;
+FILE                   * output       = NULL;
 static BOOLEAN           inhibited    = 0;
 static buf_break_st_ty * buf_break_list = NULL;
 buf_break_st_ty * buf_break = NULL;
@@ -840,7 +840,7 @@ static void dump_line_code(
     BOOLEAN * pbreak_line,
     int       target_col_break)
 {
-   int paren_level   = 0;
+//   int paren_level   = 0;
 
    if (s_code != e_code)
    {                       /* print code section, if any */
@@ -928,7 +928,7 @@ static void dump_line_code(
 
          *pcur_col = count_columns (*pcur_col, s_code, NULL_CHAR);
 
-         paren_level += count_parens(s_code);
+//         paren_level += count_parens(s_code);
 
          s_code[buf_break->offset] = c;
 

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to