httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@decus.org (Rodent of Unusual Size)
Subject [POLL] Style guide enhancement/clarification
Date Wed, 16 Jul 1997 13:38:58 GMT
    Okey, as Ben suggested, let's do this more formally.  (Rather along
    the lines of the [STATUS] messages.)  Current status of opinions:

    1. Conventions for casting syntax:

       a) "(char *)foo"
          +1: Alexei, Dean, Ben

       b) "(char*)foo"
          +1: 

       c) "(char *) foo"
          +1: Ken

    2. Conventions for Boolean negation syntax:

       a) "!expression"
          +1: Alexei, Jim

       b) "! expression"
          +1: Ken

    3. Conventions for simple if, while, and for blocks:

       a) if (exp) statement;
          +1: 

       b) if (exp)
              statement;
          +1: Ben (implicitly from [4])

       c) if (exp) {
    	      statement;
	  }
          +1: Ken (always)

    4. Conventions for simple else-if blocks:

       a) else if (exp) statement;
          +1: 

       b) else if (exp)
              statement;
          +1: Alexei (see [c]), Ben

       c) else if (exp) {
    	      statement;
	  }
	  +1: Ken, Alexei (see [b])

       d) else {
              if (exp) {
    	          statement;
	      }
	  }
          +1: 

    5. Conventions for wrapping long (>80 column) routine
       definitions/invocations:

       a) foo_func (a, b,
              c, d)
          +1: 

       b) foo_func
              (a, b, c, d)
          +1: 

       c) foo_func
          (
    	      a,
    	      b,
    	      c,
    	      d
	  )
          +1: 

       d) foo_func
              (
    	          a,
    	          b,
    	          c,
    	          d
	      )
          +1: Ken

    5. Conventions for wrapping long expressions:

       a) if (a && (b || c) && d) { # i.e., no wrapping)
          +1: 

       b) if (a &&		    # wrap only when you have to,
              (b || c) && d) {	    # operators wherever
          +1: 

       c) if (a			    # wrap only when you have to,
              && (b || c) && d) {   # operators at bol
          +1: Dean (with minor reservations)

       d) if (			    # one term per line, operators at end
              a &&
    	      (b || c) &&
    	      d
	     ) {
          +1: Ken (see also [e])

       e) if (			    # one term per line, operators at bol
              a
    	      && (b || c)
    	      && d
	     ) {
          +1: Ken (see also [d])

    Opinions?

    #ken    :-)}

Mime
View raw message