On Wed, Feb 17, 2016 at 04:14:22PM +0100, Jakub Jelinek wrote:
> On Wed, Feb 17, 2016 at 04:11:44PM +0100, Marek Polacek wrote:
> > On Wed, Feb 17, 2016 at 06:08:14PM +0300, Ilya Verbin wrote:
> > > > This line is too long.  But you could have just done
> > > 
> > > My editor shows exactly 80 chars.
> > 
> > The maximum is 79.
> 
> Well, check_GNU_style.sh complains just about one line, and then
> a prototype.
> 
> Lines should not exceed 80 characters.
> 193:+extern tree finish_omp_clauses                  (tree, bool, bool = 
> false, bool = false);
> 252:+                      error ("linear clause applied to non-integral 
> non-pointer "

Maybe it should be fixed with this then.  Because
<https://www.gnu.org/prep/standards/standards.html#Formatting> says
"Please keep the length of source lines to 79 characters or less, for maximum
readability in the widest range of environments."

diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh
index ac54ed0..485f4de 100755
--- a/contrib/check_GNU_style.sh
+++ b/contrib/check_GNU_style.sh
@@ -169,16 +169,16 @@ col (){
 
        # Remove line number prefix and patch modifier '+'.
        # Expand tabs to spaces according to tab positions.
-       # Keep long lines, make short lines empty.  Print the part past 80 chars
-       # in red.
+       # Keep long lines, make short lines empty.  Print the part past 79
+       # chars in red.
        cat "$tmp" \
            | sed 's/^[0-9]*:+//' \
            | expand \
            | awk '{ \
-                    if (length($0) > 80) \
+                    if (length($0) > 79) \
                       printf "%s\033[1;31m%s\033[0m\n", \
-                             substr($0,1,80), \
-                             substr($0,81); \
+                             substr($0,1,79), \
+                             substr($0,80); \
                     else \
                       print "" \
                   }' \
@@ -201,7 +201,7 @@ col (){
     done
 }
 
-col 'Lines should not exceed 80 characters.'
+col 'Lines should not exceed 79 characters.'
 
 g 'Blocks of 8 spaces should be replaced with tabs.' \
     ' {8}'

        Marek

Reply via email to