Your message dated Sun, 27 Jan 2019 22:04:21 +0000
with message-id <e1gnsxn-0003mv...@fasolo.debian.org>
and subject line Bug#657461: fixed in indent 2.2.12-1
has caused the Debian Bug report #657461,
regarding add --fix-nested-comments option
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
657461: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657461
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: indent
Version: 2.2.11-1
Severity: wishlist
Tags: patch upstream

The patch attached to add an option to fix nested comments by replacing
'/*' with ' *'.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-rc7-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages indent depends on:
ii  dpkg          1.16.1.2      
ii  install-info  4.13a.dfsg.1-4
ii  libc6         2.13-7        

indent recommends no packages.

indent suggests no packages.

-- no debconf information
Description: add an option to fix nested comments
 Added -fnc/--fix-nested comment option which tries to fix nested comments
 by replacing '/*' inside comments by a space followed by '*'. By default,
 this option is turned off.
Author: Andrew O. Shadura <bugzi...@tut.by>
Last-Update: 2012-01-26

--- a/src/comments.c
+++ b/src/comments.c
@@ -59,6 +59,9 @@
  * `format_col1_comments'           ("fc1"):  Format comments which
  *     begin in column 1.
  *
+ * `fix_nested_comments'            ("fnc"):  Fix comments which
+ *     have nested opening sequences
+ *
  * `unindent_displace'              ("d"):  The hanging indentation for
  *     comments which do not appear to the right of code.
  *
@@ -190,6 +193,15 @@
         /* We have reached the end of the comment, and it's all on
          * this line. */
 
+         if (settings.fix_nested_comments)
+         {
+            if ((*buf_ptr == '*') && (*(buf_ptr - 1) == '/'))
+            {
+               *(e_com - 1) = ' ';
+               *e_com = '*';
+            }
+         }
+
          if ((*buf_ptr == '*') && (*(buf_ptr + 1) == '/'))
          {
             if (buf_ptr == buf_end)
--- a/src/args.c
+++ b/src/args.c
@@ -158,6 +158,7 @@
 static int exp_eei  = 0;
 static int exp_fc1  = 0;
 static int exp_fca  = 0;
+static int exp_fnc  = 0;
 static int exp_gnu  = 0;
 static int exp_hnl  = 0;
 static int exp_i    = 0;
@@ -314,6 +315,7 @@
     {"hnl",     PRO_BOOL,                            true,       ON, 
&settings.honour_newlines,                  &exp_hnl},
     {"h",       PRO_FUNCTION,                           0, ONOFF_NA, (int *) 
usage,                              &exp_version},
     {"gnu",     PRO_SETTINGS,                           0, ONOFF_NA, 
GNU_SETTINGS_STRING,                        &exp_gnu},
+    {"fnc",     PRO_BOOL,                           false,       ON, 
&settings.fix_nested_comments,              &exp_fnc},
     {"fca",     PRO_BOOL,                            true,       ON, 
&settings.format_comments,                  &exp_fca},
     {"fc1",     PRO_BOOL,                            true,       ON, 
&settings.format_col1_comments,             &exp_fc1},
     {"eei",     PRO_BOOL,                           false,       ON, 
&settings.extra_expression_indent,          &exp_eei},
@@ -433,6 +435,7 @@
     {"h",       PRO_FUNCTION,                           0, ONOFF_NA, (int *) 
usage,                              &exp_version},
     /* This is now the default. */
     {"gnu",     PRO_SETTINGS,                           0, ONOFF_NA, 
GNU_SETTINGS_STRING,                        &exp_gnu},
+    {"fnc",     PRO_BOOL,                           false,       ON, 
&settings.fix_nested_comments,              &exp_fnc},
     {"fca",     PRO_BOOL,                           false,       ON, 
&settings.format_comments,                  &exp_fca},
     {"fc1",     PRO_BOOL,                           false,       ON, 
&settings.format_col1_comments,             &exp_fc1},
     {"eei",     PRO_BOOL,                           false,       ON, 
&settings.extra_expression_indent,          &exp_eei},
@@ -548,6 +551,7 @@
     {"honour-newlines",                             "hnl"},
     {"help",                                        "h"},
     {"gnu-style",                                   "gnu"},
+    {"fix-nested-comments",                         "fnc"},
     {"format-first-column-comments",                "fc1"},
     {"format-all-comments",                         "fca"},
     {"extra-expression-indentation",                "eei"},
--- a/src/indent.h
+++ b/src/indent.h
@@ -268,6 +268,7 @@
     int lineup_to_parens;    /*!<  if true, continued code within parens will 
be lined up to the open paren */
     int honour_newlines;     /*!<  True when positions at which we read a 
newline in the input file, should get
                               * a high priority to break long lines at. */
+    int fix_nested_comments; /*!<  If nested comments are to be fixed */
     int format_comments; /*!<  If any comments are to be reformatted */
     int format_col1_comments; /*!<  If comments which start in column 1 are to 
be magically reformatted */
     int extra_expression_indent;     /*!<  True if continuation lines from the 
expression part of "if(e)",
--- a/doc/indent.texinfo
+++ b/doc/indent.texinfo
@@ -653,6 +653,12 @@
 duration of that comment.  The margin is not respected if the comment is
 not being formatted.
 
+@kindex -fnc
+@kindex --fix-nested-comments
+If the @option{-fnc} option is specified, all comments with @samp{/*}
+embedded will have that character sequence replaced by a space followed
+by the character @samp{*} thus eliminating nesting.
+
 @kindex -d@var{n}
 @kindex --line-comments-indentation@var{n}
 If the comment begins a line (i.e., there is no program text to its
@@ -1752,6 +1758,11 @@
 Do not disable all formatting of comments.@*
 @xref{Comments}.
 
+@item -fnc
+@itemx --fix-nested-comments
+Fix nested comments.@*
+@xref{Comments}.
+
 @item -gnu
 @itemx --gnu-style
 Use GNU coding style.  This is the default.@*

--- End Message ---
--- Begin Message ---
Source: indent
Source-Version: 2.2.12-1

We believe that the bug you reported is fixed in the latest version of
indent, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 657...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Vila <sanv...@debian.org> (supplier of updated indent package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 27 Jan 2019 22:35:20 +0100
Source: indent
Architecture: source
Version: 2.2.12-1
Distribution: unstable
Urgency: low
Maintainer: Santiago Vila <sanv...@debian.org>
Changed-By: Santiago Vila <sanv...@debian.org>
Closes: 228112 349065 487517 657461 726105 865677 916199
Changes:
 indent (2.2.12-1) unstable; urgency=low
 .
   * New upstream release. Closes: #916199.
     This is now maintained upstream by Andrej Shadura.
   * Drop all debian/patches/*, not required anymore.
   * Should fix '*' in function declaration. Closes: #228112.
   * Should fix double const after C++ function declaration. Closes: #349065.
   * Should improve support for gettext macros. Closes: #487517.
   * New option --fix-nested-comments. Closes: #657461.
   * Should not change !! to ! ! anymore when using -linux. Closes: #726105.
   * Should now cross-build. Closes: #865677.
   * Rules-Requires-Root: no.
Checksums-Sha1:
 36783e19c275da879687c9f2d8844c4d57402f64 1390 indent_2.2.12-1.dsc
 eecb3d7e78516d846af70e7bc86aabac9b92399c 620280 indent_2.2.12.orig.tar.xz
 d280f8b35975b8df52cd391411559234b5b97de7 5948 indent_2.2.12-1.debian.tar.xz
 9ae2b38a123edf27551aa324e0c184acab82ea84 4896 indent_2.2.12-1_source.buildinfo
Checksums-Sha256:
 e802796b98203d047d819685801bd970b20a6525836b35c5a9fd119eb7cf176d 1390 
indent_2.2.12-1.dsc
 b745a5dfc68f86a483d7f96dc1cda7aafd1e78ecba3c7d8ad304709e91e1defb 620280 
indent_2.2.12.orig.tar.xz
 d3ac4770ff8a0de2497a44c2a2d3e57521efb748620793bf531499565c50c5ea 5948 
indent_2.2.12-1.debian.tar.xz
 d62fde0178001f6517549001f78abba0c64d9a4c2bede1056b123610c9ed529e 4896 
indent_2.2.12-1_source.buildinfo
Files:
 235cbcac6f3c8e67d8c2ddf55ee33a3e 1390 devel optional indent_2.2.12-1.dsc
 9cba859a8b1958baa2e3dce1dadb37db 620280 devel optional 
indent_2.2.12.orig.tar.xz
 85039d044a9c085d5a506ff9ad66dd74 5948 devel optional 
indent_2.2.12-1.debian.tar.xz
 aa435f822003c88ec252181c36d9a3af 4896 devel optional 
indent_2.2.12-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE1Uw7+v+wQt44LaXXQc5/C58bizIFAlxOKC4ACgkQQc5/C58b
izL00wf/Zm/3/RhTtw5rZ6s+9YDbDRoqBmbY2v1a06rWF0+rFRLHpGm1mKgwKwOf
/VNSkobY+7a/SNda/rzWgHdDT+ekcAXh4VBc3UiG51BNOl9RTjauupDgLnccEVUt
mepPmLP2btWupN1mSAaHy1HIySV3miQbQYFMLo9/QlcO3eVu7ZPpFP5jy76iLqLT
pUYIDuw/4MCoUcAun//CF/KHshpONhCi1nx5Pa9rFsEidtlH1QIPalQUmvgvbnpQ
kqVLrcPR9TnpCPIniySTrfeAu53I3LSUkAgFtH9P2QHIQgMRCJSwEfCox3ZROaEL
x0lVS45qFVrvIqoPBXjVU3c1yXBVBQ==
=lz9b
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to