home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / DOS_HELP / ENVCAT12.ZIP / FORMDEFS.H < prev   
Encoding:
C/C++ Source or Header  |  1990-11-25  |  2.3 KB  |  54 lines

  1. /* formdefs.h c1989 Mark Gardner,
  2. |                   EEmergent Consulting,
  3. |                   Acton, CA
  4. |                   805-269-1433
  5. */
  6.  
  7. /* definitions to assist formatting the C source code with a more uniform
  8. |  approach to structure and indentation.  See the file FORMRULES.TXT for
  9. |  examples of how these marks should be applied.  They are nul definitions
  10. |  providing visible indent termination, primarily, and allow for structure
  11. |  commenting.
  12. */
  13.  
  14. #define function     /* flags function definition statements           */
  15. #define end_if       /* flags end of 'if' structures                   */
  16. #define ___          /* marks line that continues a previous line      */
  17. #define end_for      /* flags end of 'for' structures                  */
  18. #define end_while    /* flags end of 'while' structures                */
  19. #define end_switch   /* flags end of 'switch' structures               */
  20. #define end_struct   /* flags end of structure definition              */
  21. #define end_union    /* flags end of union definition                  */
  22. #define end_enum     /* flags end of enum list                         */
  23. #define end_case     /* flags end of 'case' structures                 */
  24. #define con_case     /* flags end of 'case' structures                 */
  25. #define end_function /* flags end of functions                         */
  26. #define end_file     /* flags end of source, include, or other file    */
  27. #define end_call     /* flags end of function call for clarity when
  28.                            argument list is long and marginated        */
  29.  
  30. /* The uses of most of these are obvious.  For the two that aren't:
  31. |
  32. |  con_case is used to terminate a case structure that falls through
  33. |  to a subsequent case, instead of end_case, which implies a 'break'.
  34. |
  35. |  ___ (three underbars) is used principally to show continuation of 'if'
  36. |  and 'while' conditions, to maintain indentation of the 'if' or 'while'
  37. |  at its own level for the several consecutive lines required to clearly
  38. |  show the structure of the conditions themselves, e.g,
  39. |
  40. |        if  (      (char_loop_ptr <= LOOPEND)
  41. |        ___     && (loop_err_flag != TRUE)
  42. |        ___  ||     
  43. |        ___        (err_overide == TRUE)
  44. |        ___     && (override_enabled == TRUE)
  45. |        ___ ) {
  46. |            draft_doc2() ;
  47. |            show_end() ;
  48. |        end_if }
  49. |
  50. */
  51.  
  52. end_file
  53.  
  54.