Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jun 2018 13:40:59 +0000 (UTC)
From:      Piotr Pawel Stefaniak <pstef@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334556 - head/usr.bin/indent
Message-ID:  <201806031340.w53DexRQ000755@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pstef
Date: Sun Jun  3 13:40:58 2018
New Revision: 334556
URL: https://svnweb.freebsd.org/changeset/base/334556

Log:
  indent(1): remove undocumented and rather useless option (-ps)
  
  It's used to treat the "->" access operator as a binary operator and put
  space characters around it.

Modified:
  head/usr.bin/indent/args.c
  head/usr.bin/indent/indent_globs.h
  head/usr.bin/indent/lexi.c

Modified: head/usr.bin/indent/args.c
==============================================================================
--- head/usr.bin/indent/args.c	Sun Jun  3 10:53:10 2018	(r334555)
+++ head/usr.bin/indent/args.c	Sun Jun  3 13:40:58 2018	(r334556)
@@ -154,7 +154,6 @@ struct pro {
     {"npcs", PRO_BOOL, false, OFF, &proc_calls_space},
     {"npro", PRO_SPECIAL, 0, IGN, 0},
     {"npsl", PRO_BOOL, true, OFF, &procnames_start_line},
-    {"nps", PRO_BOOL, false, OFF, &pointer_as_binop},
     {"nsac", PRO_BOOL, false, OFF, &space_after_cast},
     {"nsc", PRO_BOOL, true, OFF, &star_comment_cont},
     {"nsob", PRO_BOOL, false, OFF, &swallow_optional_blanklines},
@@ -162,7 +161,6 @@ struct pro {
     {"nv", PRO_BOOL, false, OFF, &verbose},
     {"pcs", PRO_BOOL, false, ON, &proc_calls_space},
     {"psl", PRO_BOOL, true, ON, &procnames_start_line},
-    {"ps", PRO_BOOL, false, ON, &pointer_as_binop},
     {"sac", PRO_BOOL, false, ON, &space_after_cast},
     {"sc", PRO_BOOL, true, ON, &star_comment_cont},
     {"sob", PRO_BOOL, false, ON, &swallow_optional_blanklines},

Modified: head/usr.bin/indent/indent_globs.h
==============================================================================
--- head/usr.bin/indent/indent_globs.h	Sun Jun  3 10:53:10 2018	(r334555)
+++ head/usr.bin/indent/indent_globs.h	Sun Jun  3 13:40:58 2018	(r334556)
@@ -136,7 +136,6 @@ char       *be_save;		/* similarly saved value of buf_
 
 
 int         found_err;
-int         pointer_as_binop;
 int         blanklines_after_declarations;
 int         blanklines_before_blockcomments;
 int         blanklines_after_procs;

Modified: head/usr.bin/indent/lexi.c
==============================================================================
--- head/usr.bin/indent/lexi.c	Sun Jun  3 10:53:10 2018	(r334555)
+++ head/usr.bin/indent/lexi.c	Sun Jun  3 13:40:58 2018	(r334556)
@@ -546,11 +546,9 @@ stop_lit:
 	else if (*buf_ptr == '>') {
 	    /* check for operator -> */
 	    *e_token++ = *buf_ptr++;
-	    if (!pointer_as_binop) {
-		unary_delim = false;
-		code = unary_op;
-		ps.want_blank = false;
-	    }
+	    unary_delim = false;
+	    code = unary_op;
+	    ps.want_blank = false;
 	}
 	break;			/* buffer overflow will be checked at end of
 				 * switch */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806031340.w53DexRQ000755>