home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d7xx / d702 / indent.lha / Indent / Indent.lha / indent-1.4Projects < prev    next >
Text File  |  1992-06-10  |  3KB  |  95 lines

  1. * Someone requested an option to keep cases statments all on one line.
  2.  
  3. Consider an option to produce "char* c" rather than  "char *c"
  4.  
  5. *  There is no way to specify that a unary & (as in address-of
  6.    operator) not preceed it's argument by a space.
  7. [rms: I agree that is a desirable mode we should support somehow.]
  8.  
  9.  
  10. *  It would be nice to have a different line length for comments than
  11.    for code.
  12. [rms: I agree that is a desirable mode we should support somehow.
  13. It should not be terribly hard.]
  14.  
  15.  
  16. *  Indent gets confused by a multiple "C" statements nested in a macro:
  17.  
  18.    This line:
  19.  
  20.     CHECK_ZERO(rpmsg->rip_res, tracef(" reserved fields not zero"); break );
  21.  
  22.    yields these errors:
  23.  
  24.     ../rip.c: 115: Unbalanced parens
  25.     ../rip.c: 115: Line broken
  26.     ../rip.c: 115: Extra )
  27.  
  28. [rms: Code like this appears in other programs too.
  29. For example, toplev.c in GCC.  So it is important not to get too upset
  30. when things like this appear in the input.]
  31.  
  32.  
  33. Add a new option specifying how goto labels are indented.
  34.  
  35. Make it so that the line numbers indent reports are the real line
  36. numbers (currently it is often off by a few).
  37.  
  38. Error recover should probably be enhanced.  At a minimum, "indent
  39. foo.c" should not overwrite foo.c when it gets an error.  Fancy error
  40. recover is probably not worth the effort because indent is pretty
  41. fast.  Stopping after the first error might be more helpful than the
  42. current error cascades.
  43.  
  44. Make the -nss option cause
  45.   while (foo)
  46.     ;
  47. This is the real alternative to 
  48.   while (foo) ;
  49.  
  50. Look at all the undocumented options, and determine which of them are
  51. bug-free enough that they should be documented.
  52.  
  53.     1) Is it possible to control how indent puts white space *within*
  54. an expression?  I notice that "(x*y<5)" comes out like "(x * y < 5)".  Can
  55. I configure "indent" to put spaces around "the following list of characters"
  56. and do not put spaces around "the following list of characters"?  I.E. Can
  57. I make it put spaces around "< > + - || &&" and *not* put spaces around
  58. "* / ^ &", etc. ?
  59.  
  60.  
  61. Consider leaving the spacing between the preprocessor
  62. # and the "if", "endif", etc. and indent that line as if it were
  63. a regular if () in C.
  64.  
  65. Thus, given
  66.  
  67. main()
  68. {
  69.     int x = 1, y = 1, z = 1;
  70.     if (x)
  71.     if (y)
  72.         if (z)
  73. #        ifdef FOO
  74.             printf("hello\n");
  75. #        else FOO
  76.             printf("world\n");
  77. #        endif FOO
  78. }
  79.  
  80.  
  81.  
  82. main()
  83. {
  84.     int             x = 1, y = 1, z = 1;
  85.     if (x)
  86.     if (y)
  87.         if (z)
  88. #               ifdef FOO
  89.             printf("hello\n");
  90. #               else    /* FOO */
  91.             printf("world\n");
  92. #               endif    /* FOO */
  93. }
  94.  
  95.