
reader(1)                    Khoros                     reader(1)

PROGRAM
     reader - The purpose of Ghostreader is to update Program
     Specification File (*.prog file) so that it is consistent
     with the C source code and man pages of an application pro-
     gram that was originally generated with ghostwriter.  The
     SOURCE of information for ghostreader is from marked seg-
     ments of the *.c, *.h, l*.c, *.1, and *.3 files. The DESTI-
     NATION of extracted information is the *.prog file, where
     '*' is the name of the program in question.

SYNTAX
     reader

     -name          name of program to update *.prog file for

     [-config]      use configuration file?

     [-lib]         use lib file?

     [-man3]        use man3 file?

     [-install]     install output?

     [-format]      formatting (0 = none, 1 = nroff)

     [-prog]        use old .prog file?

     [-force]       force output?

     [-V]           Gives the version for reader

     [-U]           Gives the usage for reader

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called reader.ans or
                    file1

     [-a [file1]]   Uses reader.ans or file1 as the answer file

DESCRIPTION
     Ghostreader is explained in detail in Chapter 5 of the
     Khoros Programmer's Manual; the information given there will
     not be repeated here, so you are referred to that document.
     For reference purposes, a detailed explanation of each argu-
     ment to ghostreader is as follows:

     name:     Name of the PS file to be re-created

     config:   Provide a value of True (1) if a configuration
               file, *.conf, is to be used with ghostreader.
               Configuration files are explained in detail in
               Chapter 5 of the Khoros Programmer's Manual.  Note
               that if a configuration file is to be used, it
               MUST exist in the local ". directory where ghos-
               treader is executed.

     lib:      Provide a value of False (0) if no library file is
               to be used to generate the PS file;  ie, use [-lib
               0] if you used [-lib 0] with ghostwriter earlier.
               Note that not all programs need a library file.

     man3:     Provide a value of False (0) if [-lib] is also
               specified as False (0).  Any program that does not
               have a library file has no need for a man3 file.

     install:  Provide a value of True (1) if the *.prog file
               created by ghostreader is to be installed at the
               location specified by the configuration file.
               Note that a value of True (1) should ONLY be pro-
               vided for [-install] when a value of True (1) is
               also provided for [-config].

     format:   Provide a value of 0 ONLY if nroff is not avail-
               able on your system.  The default value of 1
               (indicating use of nroff) should otherwise be
               used.  No other values for [-format] are available
               at this time.

     prog:     Provide a value of 0 ONLY if the old PS file has
               been corrupted in some way.

     force:    If [-force] is specified as True (1), the PS file
               generated by ghostreader will automatically over-
               write an existing file by the same name;  the user
               will not be prompted before the *.prog file is
               clobbered.

REQUIRED ARGUMENTS
     -name  type: string
            desc: name of program to update *.prog file for

OPTIONAL ARGUMENTS
     -config
            type: boolean
            desc: use configuration file?
            default: false

     -lib   type: boolean
            desc: use lib file?
            default: true

     -man3  type: boolean
            desc: use man3 file?
            default: true

     -install
            type: boolean
            desc: install output?
            default: false

     -format
            type: integer
            desc: formatting (0 = none, 1 = nroff)
            default: 1
            bounds: 0 < [-format] < 1

     -prog  type: boolean
            desc: use old .prog file?
            default: true

     -force type: boolean
            desc: force output?
            default: false

EXAMPLES
     % ghostreader -name vadd

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lreader(3)
     ghostwriter(1) and CHAPTER 5 OF THE KHOROS PROGRAMMER'S
     MANUAL

RESTRICTIONS
     Will not work properly if any of the any of the tags that
     are inserted into generated C code by ghostwriter are
     deleted.  These tags are necessary for ghostreader to
     operate correctly; If you make any change to the begin or
     end tags, ghostreader will no longer be able to update the
     .prog file for that text block. These tags will appear as
     the begin and end keys, within comments.  For example, the
     tags marking the text block inserted into the main for the
     main library call might look like:

     /* -main_library_call */
     if (!(our_library_routine(image1, image2)))
     {
         fprintf(stderr, "Cannot perform function0);
         exit(1);
     }
     /* -main_library_call_end */

     Also, do not change the format of the man files in any way.
     There are two reasons for this.  Like the tags inserted into
     C code to mark text blocks, certain automatically generated
     lines in the man pages are used as keys to mark the begin-
     ning and ending of text blocks.  If you accidentally change
     or delete one of these, ghostreader will no longer be able
     to update the .prog file with these text blocks that appear
     in the man pages. The other reason is because the man pages
     are generated the way they are to conform to the Khoros Sys-
     tem standard.  One of the main goals of ghostreader and
     ghostwriter is to enforce these standards.  Therefore, if
     you change the format of the man files, your modifications
     will be counter-productive to the objectives of the code-
     generating tools that were written to aid you.

     Use the [-format] option consistently.  The default value of
     this option, which is provided with both ghostreader and
     ghostwriter, is for NROFF formatting.  Best results will be
     gained when the text blocks in the .prog file which are not
     C code have nroff commands inserted where they will make the
     text look nice. If you do not wish to format text blocks
     with nroff, the [-format 0] option should be specified, to
     indicate that no formatting is desired. Either way, it is
     STRONGLY suggested that the user be consistent with ghos-
     treader and ghostwriter.  If the nroff formatting is used
     with ghostreader, it should also be used with ghostwriter.If
     no formatting is used with ghostwriter, no formatting should
     be used with ghostreader.  If format types are mixed, the
     .prog file will become increasingly messy, and strange
     things might start happening.

COPYRIGHT
     Copyright 1991, University of New Mexico.  All rights
     reserved.

Khoros                    Release: 1.0                          1

