home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / ppwizard.zip / debug.ih < prev    next >
Text File  |  1999-11-20  |  3KB  |  80 lines

  1. ;----------------------------------------------------------------------------
  2. ;     MODULE NAME:   DEBUG.IH
  3. ;
  4. ;         $Author:   Dennis_Bareis  $
  5. ;       $Revision:   1.0  $
  6. ;           $Date:   20 Nov 1999 13:11:20  $
  7. ;        $Logfile:   E:/DB/PVCS.IT/OS2/PPWIZARD/DEBUG.IHV  $
  8. ;
  9. ;     DESCRIPTION:   This is a simple header to make it easier to add
  10. ;                    debug comments into your generated HTML.
  11. ;
  12. ;                    The basic theory behind this header is that you do not
  13. ;                    want any (or many) comments in your generated HTML code
  14. ;                    however while developing your code you find it handy to
  15. ;                    generate HTML comments so you can see whats happening.
  16. ;
  17. ;                    You can add as many ppwizard comments as you like,
  18. ;                    as you can see these start with ';' and will not appear
  19. ;                    in the html, the comment macros in this header appear
  20. ;                    in the generated html only if debuf mode is on (see
  21. ;                    "/debug").
  22. ;
  23. ;                    See the end of this file for some example HTML using
  24. ;                    the macros.
  25. ;----------------------------------------------------------------------------
  26.  
  27. ;--- Make sure only included once! ------------------------------------------
  28. #ifdef   HEADER_DEBUG_IH
  29.          #eof 1                      ;;Already included
  30. #endif
  31. #define  HEADER_DEBUG_IH  99.324
  32. #require 99.313
  33.  
  34.  
  35. ;--- Outputs HTML comment only when debug is on -----------------------------
  36. #define _HtmlOutputIfDebugIsOn     \
  37.         #if ['<?DebugOn>' = 'Y']  -\
  38.             {$Text}<?NewLine>     -\
  39.         #endif
  40.  
  41.  
  42. ;--- Use these in your HTML -------------------------------------------------
  43. #define HtmlDebugComment           \
  44.         <$_HtmlOutputIfDebugIsOn Text=^<?NewLine><!--- {$Text} --->^>
  45. #define HtmlDebugNL                \
  46.         <$_HtmlOutputIfDebugIsOn Text=^^>
  47. #define HtmlHereIAm                \
  48.         <$_HtmlOutputIfDebugIsOn Text=^<?NewLine><!--- Now at line <?InputComponentLine> of <?InputComponent> --->^>
  49.  
  50.  
  51.  
  52.  
  53. ;---[ END OF DEBUG HEADER CODE] ---------------------------------------------
  54. #eof                   ;;Stop header processing (ignore this line)
  55.  
  56.  
  57.  
  58.  
  59.  
  60. *****************************************************************************
  61. *****[ EXAMPLE HTML ]********************************************************
  62. *****************************************************************************
  63. #include "debug.ih"    ;;Load this header
  64.  
  65. <$HtmlHereIAm>
  66. <HTML>
  67.  
  68. <$HtmlDebugComment Text="Defining HEAD of HTML">
  69. <HEAD>
  70. </HEAD>
  71.  
  72. <$HtmlDebugComment Text="Defining BODY of HTML">
  73. <BODY>
  74.  
  75. <$HtmlDebugComment Text="Defining FOOTER of HTML">
  76. <HR>A Footer
  77. </BODY>
  78. </HTML>
  79. <$HtmlHereIAm>
  80.