EXTRACT COMMENTS PROGRAM GETRNO PROG NAME GETRNO FILE

0 EXTRACT FROM THE PROTOCOL OF THE GOVERNMENT SESSION
0 RESOLUTION RE STANDARD SECURITY EXTRACT FROM THE MINUTES
163 APUNTES DE HISTORIA DEL PENSAMIENTO ECONÓMICO EXTRACTADOS DEL

17 NIGERIA EXTRACTIVE INDUSTRIES TRANSPARENCY INITIATIVE (NEITI) REQUEST FOR
18 APUNTES DE HISTORIA DEL PENSAMIENTO ECONÓMICO EXTRACTADOS DEL
19 WHICH SPM METHOD SHOULD BE USED TO EXTRACT


Extract Comments Program GETRNO 


                Prog. Name      : GETRNO 
                File Name       : GETRNO.PAS 
                Programmer      : S. G. Smith 
                Version         : 1 
                Rev. 0 Date     : 10 September 1982 
                Current Rev No. : 0 
                Latest Rev Date : 
         



        1.0  Description 

        This program extracts flagged comment fields from a source  file
        and sends them to a RUNOFF source file.  



        2.0  Other Resources Required 




        2.1  Runtime 

        In manual input mode only, the file DK:HEADER.RNO.  

        In command file input mode, the command file, formatted as  des-
        cribed under "Operation".  



        2.2  Compile Time 

        These files must be present on device SRC:  
         
                GETRNO.PAS      Main source file 
                GETGLO.PAS      Globals for all source files 
                STRING.DEC      Procedure declarations for string 
                                functions        
                 



        2.3  Link Time 

         
                GETRNO.OBJ      Main source 
                OUTRNO.OBJ      Procedure WriteRunoffFile 
                STRING.OBJ      String functions 
                SY:PASCAL.OBJ   Normal PASCAL compiler library 


                                                                  PAGE 2
Extract Comments Program GETRNO 


        3.0  Operation 

        GETRNO is started by RUN GETRNO.  The program will prompt for  a
        command  file  name.   If you enter a name, the output filename,
        the header filename, and the input filenames will be taken  from
        that  file.   If you enter a blank line, the program will prompt
        you for the names of the output and input files, and the  header
        information will be taken from the file DK:HEADER.RNO.  The pro-
        gram will keep asking for more source files until  you  enter  a
        blank line.  

        On all input files, the extension MUST be one of the  following:
         
                .RNO            RUNOFF/General Text 
                .MAC            MACRO 
                .SAL            SAL11 
                .ASM            MC6809 
                .S09            MC6809 
                .PAS            PASCAL 
                .FOR            FORTRAN 
                .FLX            FLEX 


        If the extension is not one of the above, the program will print
        a warning message and continue.  



        4.0  Command File Format 


        The files MUST be in the order listed.  Blank lines ARE signifi-
        cant.  
         
                <Start of file> 
                Output file name        (the default type is .RNO) 
                Header file name 
                Input file name 
                        . 
                        . 
                        . 
                Input file name 
                Blank line 

        On all input files, the extension MUST be one of the  following:
         
                .RNO            RUNOFF/General Text 
                .MAC            MACRO 
                .SAL            SAL11 
                .ASM            MC6809 
                .S09            MC6809 
                .PAS            PASCAL 
                .FOR            FORTRAN 
                .FLX            FLEX 
         


                                                                  PAGE 3
Extract Comments Program GETRNO 


        If the extension is not one of the above, the program will print
        a warning message and continue.  Input is terminated by entering
        a blank line.  



        5.0  Header file  

        The header file contains the initial setup to pass to RUNOFF and
        a  .TITLE  command,  if  desired.   This file is a normal RUNOFF
        source file, and the first thing in the file must be a "+"  com-
        mand to enable GETRNO to send it to the output file.  



        6.0  Source File Structure 

        Commands start in the first column of the comment (regardless of
        where  the  comment occurs on the line).  The first character of
        the command is one of the commands listed  below.   The  options
        available with each command are shown after the command.  
         
        FORMATTER COMMANDS: 
         
        "+"     '+' turns an option on or increments a counter 
         
                '+ '    Start Output.  Any text becomes a subtitle. 
                        If text is present, it starts a new page. 
                +L, +l  Literal Output On.  On => comment text is 
                        passed  directly 
                +H, +h  Increment the current header level by 1. 
         
        "-"     '-' turns an option off or decrements a counter 
         
                '- '    Start/Stop Output 
                -L, -l  Literal Output On/Off.  On => comment text is 
                        passed  directly 
                -H, -h  Decrement the current header level by 1 
         
        ";"     ';'     Immediate literal indicator.  The line will 
                        appear "as is" in the output. 
         
        "!"     '!'     indicates a general command that doesn't change 
                        any status 
         
                '!.'    indicates a RUNOFF command. It is passed 
                        directly out. 
         
                !Hn, !hn        Set header level to N.  Valid values are
         
                                1..5 
         
        " "     x       If the first character of a comment line is 
                        blank and the second is any nonblank character, 
                        then the rest of the line is passed to a header 


                                                                  PAGE 4
Extract Comments Program GETRNO 


                        command at the current header level. 
         
        Blank comment lines are passed out directly.  



        7.0  Bugs 




        7.1  Main routine 

        The filename input is awkward.  



        7.2  PASCAL Input 

        GETRNO cannot handle completely general comments.  Problems hap-
        pen when two or more seperate comments are on a line, and when a
        quoted string contains an opening comment character.  In  gener-
        al, the last comment opening character on a line is the only one
        that is used.  

        The routine to convert a PASCAL "PROGRAM" statement into a title
        command to RUNOFF doesn't work at all.  



        7.3  FOR, COM 

        Not currently implemented.  



        7.4  WriteRunoffFile (In file OUTRNO) 

        The handling of blank lines is awkward.  



        8.0  Changes : 



                                                                  PAGE 5
Procedure to write lines to a RUNOFF file 


                Prog. Name      : GETRNO 
                File Name       : OUTRNO.PAS 
                Programmer      : S. G. Smith 
                Version         : 1 
                Rev 0 Date      : 10 September 1982 
                Current Rev     : 0 
                Date            : 



        8.1  Description 

        This procedure takes lines from a source  file  (opened  by  the
        main  program),  formats  them  as  appropriate, and sends them,
        along with any other required data,  to  a  RUNOFF  source  file
        (which has also been opened by the main program.  



        8.2  Declaration : 

        PROCEDURE Write_Runoff_File(FUNCTION Strip_Com(VAR S :   String)
        :  BOOLEAN);  


        The FUNCTION passed to this procedure takes a raw  line  of  the
        source  file and truncates it so that it contains only the "com-
        ment" portion of the line.  If there was any comment portion  to
        return,  it  returns  the  value TRUE;  otherwise it returns the
        value FALSE.  



        8.3  Bugs : 




        8.4  Changes :  



1ÈRE S LES COLORANTS EXTRACTION SÉPARATION IDENTIFICATION ET
2 EXTRACTIVE RESERVES BUILDING NATURAL ASSETS IN THE BRAZILIAN
24 INTERACTIVE TEACHING METHODS [EXTRACT FROM CHAPTER 13 OF


Tags: getrno prog., : getrno, getrno, program, extract, comments