PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: /Output[Next]: /Pack

Switch /OutHeader:Spec

This is a PPWIZARD command line switch. You can set up your own default switches in the "PPWIZARD_OPTIONS" environment variable or in project files.

For some output extensions or file types PPWIZARD automatically outputs a header at the start of the file. You can turn this off, on, or tweek the output using this switch.

The first and last characters of the "Spec" defines the delimiter being used to delimit the following values:

  1. Extension
    The extension (without a dot) that you are modifying the header for. Specify this in UPPER case unless the case is significant (as it would be in Unix). You can also use "*" to apply this rule to all files that don't have a specific rule.

  2. Start of Comment Block
    The line that begins the comments.

  3. Start of Middle Lines
    The characters that begin a line between the start and end lines.

  4. End of Comment Block
    The line that ends the comments.

Note that if the last 3 values (start/middle/end) are empty or missing then the comment is turned off.

If the start value starts with '@' and there is no middle or end then this indicates that a file should be read to create a header. The included header is basically just like any other included file but I recommend that its only task be to take care of the header. If your header file included conditional generation of the header based on the extension of the output file then it could make sense to use a "*" rule. This allows you to have full control over the contents of the header.

Examples

The following shows how header comments in files with the extension ".REX" can be turned off:

    /OutHeader:~/REX/~
    

The following shows how header comments in files with the extension ".VBS" can be specified:

    /OutHeader:~$VBS$'{x20}===============$'{x20}$'{x20}===============$~
    

The following shows how a file can be included to produce a custom header (it can perform any required commands):

    /OutHeader:~/VBS/@OutHeader.H/~
    

The following is an example of what the "OutHeader.H" file could look like:

    ;--- What is the extension of the output file -------------------------------
    #NextId
    #DefineRexx ''
       ;---- Get extension (if not unix then make upper case) -------------------
       @@Extn = _filespec('EXTN', '<?OutputFile>');
       #if ['<?OpSys>' <> 'UNIX']
           @@Extn = translate(@@Extn);    ;;Make upper case
       #endif
    
       ;---- Want a comment? ---
       @@Line = copies('+*', 30);
       select
           ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           when @@EXTN = "HTM" | @@EXTN = "HTML" then
           ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           do
               ;--- HTML ---
               @@WantCmt = 'Y'
               @@Start   = '<!--<?NewLine>' || @@Line;
               @@End     =  @@Line || '<?NewLine>-->';
               @@Line    = ''
           end;
           ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           when @@EXTN = "VBS" then
           ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           do
               ;--- VB SCRIPT ---
               @@WantCmt = 'Y'
               @@Start   = "'" || @@Line;
               @@End     =  @@Start;
               @@Line    = "'"
           end;
           ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           when @@EXTN = "REX" | '<?ProcessingMode>' = 'REXX' then
           ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           do
               ;--- REXX ---
               @@WantCmt = 'Y'
               @@Start   = '/* ' || @@Line;
               @@End     = ' * ' || @@Line || '*/';
               @@Line    = ' *'
           end;
           ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           otherwise
           ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
               @@WantCmt = 'N'
       end
    #DefineRexx
    
    
    ;--- Exit if we don't want to generate a output header for this EXTN ---
    #if    [@@WantCmt = 'N']
           #eof 1
    #endif
    
    
    ;--- Generate the output comment ---
    <??@@Start>
    <??@@Line> Generator   : PPWIZARD version <?Version> under <?OpSysSpecific>
    <??@@Line>             : FREE tool for Windows, OS/2, DOS and UNIX by <?PpwizardAuthor> (<?PpwizardAuthorEmail>)
    <??@@Line>             : <?PpwizardHomePage>
    <??@@Line> Time        : <?CompileTime>
    <??@@Line> Input File  : <?InputFile>
    <??@@Line> Output File : <?OutputFile>
    <??@@End>
    


[Top][Contents][Search][Prev]: /Output[Next]: /Pack

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Thursday January 17 2002 at 6:27pm