home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cidsam.zip / API.TXT next >
Text File  |  1993-06-28  |  29KB  |  724 lines

  1.  
  2.  
  3. SAMPLE RESPONSE FILE CODE
  4.  
  5. Introduction
  6.  
  7. The sample code in this package shows how CID response files can be
  8. read and parsed, and how response file processing is used in a CID 
  9. installation program.  The samples are organized like this:
  10.  
  11.     o  Low-level file and parsing APIs.  These routines handle the
  12.        basic file and parsing services needed to use response files.
  13.        They can be used to build higher-level services.
  14.  
  15.        These routines make only minimal assumptions about the nature
  16.        of the response files.  The routines can be modified for another
  17.        set of assumptions, but for this example the assumptions are
  18.  
  19.  
  20.         -       Blank lines and lines in which the first non-blank
  21.                 character is '*' or ';' (asterisk or semicolon) are
  22.                 comment lines.  Their contents are ignored.
  23.  
  24.         -       Response file data lines consist of a _keyword_ and a
  25.                 _value_, seperated by an equal ('=') sign.
  26.  
  27.                 The _keyword_ begins with the first non-blank character
  28.                 in the line and ends with the last non-blank character
  29.                 before the equal sign.  Blank characters and equal signs
  30.                 are not valid in a keyword.
  31.  
  32.                 The _value_ begins with the first non-blank character to
  33.                 the right of the equal sign and ends with the last non-blank
  34.                 character in the line.
  35.  
  36.                 There can be only one keyword/value pair per line.
  37.  
  38.         -       _Values_ can be of two types: _strings_ and _lists_.
  39.  
  40.                 A _string_ is any character sequence to the right of the
  41.                 equal sign.  The only illegal string is a single left
  42.                 parenthesis '('.
  43.  
  44.                 A _list_ is a sequence of keyword/value pairs.  The start
  45.                 of a list is indicated by a single left parenthesis to the
  46.                 right of the equal sign.  The end of a list is indicated by
  47.                 a right parenthesis on a line by itself. The following is 
  48.                 an example of a keyword with a _list_ value:
  49.  
  50.                     MyList = (
  51.                                ListValue.1 = orange
  52.                                ListValue.2 = red
  53.                                MyImbeddedList = (
  54.                                                   ImbeddedListValue.1 = Cabbage
  55.                                                   ImbeddedListValue.2 = Sprouts
  56.                                                   ImneddedListValue.3 = Kale
  57.                                                 )
  58.                                ListValue.3 = green
  59.                              )
  60.  
  61.        These low-level APIs are discussed in detail under "RFIO Routines" below.
  62.  
  63. [Introduction]   1
  64.  
  65.  
  66.     o  Higher-level APIs for processing response files.  These routines use
  67.        the low-level APIs to provide a simple interface for application 
  68.        programs. They make further assumptions. Again, the routines can 
  69.        be modified to change these assumptions.
  70.  
  71.         -       The keyword 'include' (in any case) has special meaning.
  72.                 When it is found in a response file, the value (a _string_)
  73.                 is the name of another response file that is to be 
  74.                 immediately opened and processed.  If the response file
  75.                 A.RSP contains the lines
  76.  
  77.                         keywordA1 = value1
  78.                         keywordA2 = value2
  79.                         include   = B.RSP
  80.                         keywordA3 = value3
  81.  
  82.                 and the response file B.RSP contains the lines
  83.  
  84.                         keywordB1 = XXX
  85.                         keywordB2 = ZZZ
  86.  
  87.                 then the high-level APIs will process the response files
  88.                 as if they were a single file containing
  89.  
  90.                         keywordA1 = value1
  91.                         keywordA2 = value2
  92.                         keywordA3 = value3
  93.                         keywordB1 = XXX
  94.                         keywordB2 = ZZZ
  95.  
  96.                 If a fully-qualified path is specified for the _value_,
  97.                 then that file is used.  If a relative path is specified,
  98.                 it is searched for on
  99.  
  100.                         The current working directory
  101.                         Each path in the current environment PATH variable
  102.                         Each path in the current enviornment DPATH variable
  103.  
  104.         -       Errors are to be logged to a certain log file from a certain
  105.                 message file.  The error handling assumptions are discussed 
  106.                 in more detail under "Error Handling" below.
  107.  
  108.        The high-level APIs are discussed in detail under "HLRFIO Routines" 
  109.        below.
  110.  
  111.     o  Sample applications.  Three complete programs that use the APIs 
  112.        discussed above are provided.  They are
  113.  
  114.         -       SAMPLE1.  This is a very simple application that creates
  115.                 a file to put Response File information into the process
  116.                 environment.
  117.  
  118.         -       SAMPLE2.  This is a more complicated example that enforces
  119.                 some common Response File rules and deals with _list_ type
  120.                 values.
  121.  
  122.         -       SAMPLE3.  This example deals with Named Lists, a technique
  123.                 that allows response file (as defined above) to handle
  124.                 variable-length tables.
  125.  
  126. [Introduction]     2
  127.  
  128.  
  129.     o  A complete CID installation program, written in REXX.  This program is
  130.        based on working code, and can be used as a template for a CID
  131.        install program.  Unlike the samples discussed above, however, it will
  132.        probably not run as-is on your workstation.  It uses several programs
  133.        that are not included with this package of samples.  For the most part,
  134.        you would need to write your own versions of these programs anyway.
  135.        Two of the programs are included in this package for reference.  The
  136.        are
  137.  
  138.         -       GETBOOTD.  This little program returns an integer that 
  139.                 represents the drive from which the workstation was last
  140.                 booted.
  141.  
  142.         -       CHKLVL.  This program checks the release level of programs
  143.                 that record their release information in ibmlvl.ini.
  144.  
  145.     o  A make file.
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187. [Introduction]     3
  188.  
  189.  
  190. HLRFIO Routines
  191.  
  192. The high-level Response File APIs provide a simple interface to response files
  193. that meet the assumptions listed above.  Many response file programs need only
  194. two of the routines -- RFOpen() and RFGetNextKeywordInFile().  The routines
  195. are all in module HLRFIO.C (and HLRFIO.OBJ) and are collectively referred to
  196. as the "HLRFIO routines."
  197.  
  198. The HLRFIO routines fall into three categories:
  199.  
  200.         - File handling routines
  201.  
  202.                 RFOpen() opens a response file and readies it for processing.
  203.  
  204.                 RFClose() closes the response file.  Normally it is not
  205.                 necessary to call this routine.
  206.  
  207.         - Response File parsing routines
  208.  
  209.                 RFGetNextKeyword() returns the next keyword/value pair.
  210.  
  211.                 RFGetNextKwdInList() returns the next keyword/value pair
  212.                 from a _list_ type value.
  213.  
  214.         - List handling routine
  215.  
  216.                 RFCopyList() makes a memory copy of a _list_ value.
  217.  
  218. To use any of the HLRFIO routines in your program, include the header file
  219. hlrfio.h and link your program with HLRFIO.OBJ.
  220.  
  221.      UINT RFOpen(char *pszFilename)
  222.  
  223.          This routine opens the file pszFilename as a response file.
  224.          It returns 0 (RFH0) for success, 3 (RFHERR) for failure.
  225.  
  226.          Use this routine to open the first or 'main' response file.
  227.          Subsequent opens of included response file are done under the
  228.          covers and do not require your any action by your program.
  229.  
  230.          Example:
  231.  
  232.               rc = RFOpen("My.rsp");
  233.               if (rc == RFH0)
  234.                 <proceed>
  235.  
  236.      UINT RFClose(void)
  237.  
  238.          This function closes a response file.  RFClose is not required 
  239.          unless the caller wants to free resources (memory and file 
  240.          handles) in use by rfio.  A call to RFOpen automatically closes 
  241.          down any previously open Response File, so there is no need to call 
  242.          RFClose() between Response Files.  This function always returns RFH0.
  243.  
  244.  
  245.  
  246. [HLRFIO Routines]      4
  247.  
  248.  
  249.      UINT RFGetNextKeyword(char **ppszKeyword, char **ppszValue,
  250.                            UINT *puiType)
  251.  
  252.          This function stores pointers to the next keyword and value, and 
  253.          stores an indicator of the type of value (string or list) (RFHLIST
  254.          and RFHSTRING respectively).
  255.  
  256.          Do not issue a free() against *ppxzKeyword or *ppszValue.
  257.          If you need a copy of the keyword and/or value, make one.
  258.          The values will be erased and the space they take up will be
  259.          freed on the next call to RFGetNextKeyword().
  260.  
  261.          This function returns RF0 as long as everything is OK,
  262.          RFEOF when the last keyword and value have already been returned,
  263.          or RFERR when a fatal error has occured.
  264.  
  265.          Example:
  266.  
  267.               char *keyword, *value;
  268.               unsigned int  type;
  269.  
  270.               while (RFGetNextKeyword(&keyword, &value, &type) == RFH0)
  271.                  <process the keyword/value pair>
  272.  
  273.      UINT RFGetNextKwdInList(char **ppszStart, char **ppszKeyword,
  274.                              char **ppszValue, UINT *puiType)
  275.  
  276.          This functions parses out the keywords and values from inside
  277.          a _list_ value.  The variable *ppszStart keeps track of where
  278.          you are within the list.  Before the first call, set
  279.          *ppszStart to the address of the list; on subsequent calls,
  280.          the value will be automatically updated.
  281.  
  282.          Otherwise, this call works like RFGetNextKeyword, returning
  283.          the next keyword, value and type. Like RFGetNextKeyword, it 
  284.          returns RF0 as long as everything is OK, RFEOF when the last 
  285.          keyword and value have already been returned, or RFERR when a 
  286.          fatal error has occured.
  287.  
  288.          Example:
  289.  
  290.               char *keyword, *value;
  291.               char *listPosition, *listKeyword, *listValue;
  292.               char *listCopy;
  293.               unsigned int type, listType;
  294.  
  295.               rc = RFGetNextKeyword(&keyword, &value, &type);
  296.               if (rc == RFH0)
  297.                 if (type = RFHLIST)
  298.                   {
  299.                     <we want to make a copy of the value here: see below>
  300.                     listPosition = listCopy;
  301.                     while (RFGetNextKwdInList(&listPosition, &listKeyword,
  302.                                               &listValue, &listType);
  303.                        < process the keyword/value pair from the list>
  304.                   }
  305.  
  306. [HLRFIO Routines]     5
  307.  
  308.  
  309.      VOID *RFCopyList(void *from)
  310.  
  311.          This routine makes a copy of the _list_ value pointed to by "from".
  312.          The copy is persistant.  The memory it takes up can be released
  313.          by issuing a free() on the value returned from this function.
  314.  
  315.          Take care that the "from" value is really a _list_ type value.
  316.          The routine makes a copy of everything from "from" to the next
  317.          occurance of two adjacent null characters.
  318.  
  319.          The reason for having this routine is that _values_ returned from
  320.          RFGetNextKeyword() are not permanent.  The memory they occupy is
  321.          freed on the next call to RFGetNextKeyword or RFGetNextKwdInList.
  322.          So if we want to manipulate the list, we need to make our own
  323.          private copy.
  324.  
  325.          Example:
  326.  
  327.               char *keyword, *value;
  328.               char *listPosition, *listKeyword, *listValue;
  329.               char *listCopy;
  330.               unsigned int type, listType;
  331.  
  332.               rc = RFGetNextKeyword(&keyword, &value, &type);
  333.               if (rc == RFH0)
  334.                 if (type = RFHLIST)
  335.                   {
  336.                     listCopy = RHCopyList(value); // Make private copy of list
  337.                     listPosition = listCopy;
  338.                     while (RFGetNextKwdInList(&listPosition, &listKeyword,
  339.                                               &listValue, &listType);
  340.                        < process the keyword/value pair from the list>
  341.                     free(listCopy);    // Free space used for private copy
  342.                   }
  343.  
  344.      void *RFMergeLists(void *List1, void *List2)
  345.  
  346.         This routine merges two _list_ type values into a single list.
  347.         The two lists passed to this routine should be persistant copies.
  348.         The resulting list is also persistant.  It may be freed with a
  349.         free() call when no longer needed.
  350.  
  351.         When the lists are merged, the routine assumes that List2 contains
  352.         the most current information.  All the contents of List2 are copied
  353.         to the merged list, then, for any keywords in List1 that do not
  354.         also appear in List2, the keyword and value are copied to the merged
  355.         list.
  356.  
  357.         Imbedded lists are not merged recursively.  Any list value in List2
  358.         will replace the corresponding imbedded list from List1.
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365. [HLRFIO Routines]     6
  366.  
  367.  
  368. RFIO Routines
  369.  
  370. The low-level Response File APIs provide a more flexible but more 
  371. complicated way to manipulate Response Files.  Their main purpose is to 
  372. provide building blocks for higher level code like the HLRFIO routines.  
  373. These routines are all in module RFIO.C and are referred to as the RFIO 
  374. Routines below.  Because HLRFIO uses the RFIO routines, if you need to 
  375. change any of the assumptions about response file structure you will 
  376. probably need to make changes to the RFIO routines.  
  377.  
  378. The RFIO Routines fall into three catagories:
  379.  
  380.         -       File Open and Close Routines
  381.  
  382.                         RF_Open_File() opens and returns a handle for a 
  383.                         response file.
  384.  
  385.                         RF_Close_FIle() closes a response file and returns
  386.                         the  previous handle, if any.
  387.  
  388.         -       Routines for handling included response files
  389.  
  390.                         RF_Create_Root_Ise() creates a structure used to
  391.                         control included response file.  It is called once,
  392.                         before the first RF_Open_File().
  393.  
  394.                         RF_Get_Current_File_Name() returns the name of the
  395.                         current active response file.
  396.  
  397.                         RF_Get_Current_RFHANDLE() returns the handle of the
  398.                         current active response file.
  399.  
  400.         -       Sequential File I/O routines
  401.  
  402.                         RF_Get_Next_Kwd_In_File() extracts the next keyword/
  403.                         value pair from the current file.
  404.  
  405.                         RF_Get_Next_Kwd_In_List() extracts the next keyword/
  406.                         value pair from a _list_ type value.
  407.  
  408.                         RF_Get_Next_Wanted_Keyword_In_File() extracts the
  409.                         next occurance of a particular keyword or keywords
  410.                         in the file.
  411.  
  412. To use any of the RFIO routines in a program, include the header file rfioe.h
  413. and link to RFIO.OBJ.
  414.  
  415.      RFHANDLE RF_Open_File (
  416.                               char *filename,   // The name of the resp file
  417.                               RFISP root_isp    // Pointer to the root of the
  418.                                                 // include stack
  419.                               int  *DosRc       // Where to put DOS rtrn code
  420.                            );
  421.     
  422.  
  423.  
  424.  
  425. [RFIO Routines]     7
  426.  
  427.  
  428.          RF_Open_File returns a handle that can be used with the other RF
  429.          commands on success, or (RFHANDLE)NULL when there is an error.
  430.          In the case of an error, errno is put at *DosRc;
  431.          DosRc is unchanged if the operation is successfull.
  432.     
  433.          filename points to an asciiz string containing the path and name of
  434.          the response file.  RF_Open_File does not presume a particular
  435.          file suffix, so you have to give the whole thing  i.e. \sd\myrf.rsp
  436.          RF_Open_File first tries DosFindFirst on the file spec.  If it is
  437.          not found, and the filespec is relative, then each unit of DPATH is
  438.          searched.  If still not found, each unit of PATH is searched.
  439.          The file name is allowed to be ambiguous, but only the first 
  440.          occurance found is returned.
  441.     
  442.          root_isp is a pointer to a structure of type RFIS, which is used to
  443.          handle the imbedding of included files.  A call to RF_Open_File
  444.          preserves the handle of the file previously opened by RF_Open_File
  445.          when it returns the new handle.  RF_Close_File returns the previous
  446.          handle, it there was one.  So RF_Open and RF_Close can be used 
  447.          together to painlessly process imbedded references to other files.
  448.  
  449.          RF_Open_File checks for include file loops.  If an open is issued
  450.          for file that is already in the include stack,  it will be ignored;
  451.          the current RFHANDLE will be returned with no error indication.
  452.     
  453.          The question arises what should the caller do if she is trying to
  454.          open an imbed file and NULL (file not found) is returned.  Normally,
  455.          this will be a fatal error.  If the caller wants to recover and
  456.          resume processing, however, she can call RF_Get_Current_RFHANDLE()
  457.          to get the handle of the file that included the imbed; then resume
  458.          processing.
  459.     
  460.     
  461.      RFHANDLE RF_Close_File  (
  462.                               RFHANDLE rfh    // Value returned from open
  463.                               RFISP root_isp  // Pointer to root of include
  464.                                               //   stack
  465.                              );
  466.     
  467.            RF_Close_File closes the response file.
  468.     
  469.          rfh is the RFHANDLE to be close.  Close looks in the include stack,
  470.          and closes the file associated with rfh and all files below it on
  471.          the stack (normally, rfh will probably be at the bottom of the
  472.          stack).
  473.     
  474.          root_isp is a pointer to the root entry of the include stack.
  475.     
  476.          RF_Close_File returns the RFHANDLE that was in effect when rfh
  477.          was opened, or (RFHANDLE)NULL if rfh was the first file opened.
  478.     
  479.      RFISP RF_Create_Root_ISE (void);
  480.     
  481.          This routine creates the root imbed (a.k.a. include) stack entry.
  482.          A user of RFIO calls it exactly once, before the exection of the
  483.          first RF_Open_File call.  It returns a value passed to all subsequent
  484.          Open and Close calls.  On an out-of-memory condition, it returns
  485.          (RFISP)NULL.
  486.     
  487. [RFIO Routines]     8
  488.  
  489.  
  490.      char *RF_Get_Current_File_Name(
  491.                                   RFISP root_isp;
  492.                                   );
  493.     
  494.           This routine returns a pointer to the full name by which the
  495.           currently active response file was found.  You need to free()
  496.           the string after you use it.
  497.     
  498.           If there is no response file currently open, or if there is an
  499.           out-of-memory condition, NULL is returned.
  500.     
  501.      char *RF_Get_Current_RFHANDLE(
  502.                                  RFISP root_isp;
  503.                                  );
  504.     
  505.           This routine returns the RFHANDLE of the currently active
  506.           response file.
  507.     
  508.           If there is no response file currently open, NULL is returned.
  509.  
  510.  
  511.      int RF_Get_Next_Kwd_In_File (
  512.                                   RFHANDLE rfh,  // Value returned from open
  513.                                   char **kwp,    // Where to put the pointer 
  514.                                                  // to the key word.
  515.                                   char **valp,   // Where to put the pointer 
  516.                                                  // to the value.
  517.                                   int *valtypep  // Where to put the type of 
  518.                                                  // value
  519.                                      );          // (0 = string; 1 = list)
  520.     
  521.          This function reads the next response file entry, parses it, 
  522.          creates a place to put the pieces, and puts the pieces there.  It
  523.          returns pointers to the keyword string and the value string; both the
  524.          strings are null-terminated.  Comment lines and blank lines are
  525.          skipped. In the case of a list, a pointer to the whole list is
  526.          returned.
  527.     
  528.          rfh is the handle returned from the RF_Open_File call.
  529.     
  530.          kwp is the address of a character pointer where the routine will put
  531.          the address of the keyword string.
  532.     
  533.          valp is the address of a character pointer where the routine will put
  534.          the address of the value string.
  535.     
  536.          valtypep is a pointer to an integer where the routine will put the 
  537.          type of value returned.  0 if a simple value string, or 1 if a 
  538.          list.
  539.     
  540.          Returns
  541.              RF0          to indicate success
  542.              RFOOS        to indicate an out-of-memory condition
  543.              RFEOF        to indicate end-of-file
  544.              RFERR        if their is an I/O error or other DOS error.
  545.                           The OS error code is stuffed at *valtypep.
  546.              RFSYNTAX     to indicate a Response File syntax error
  547.                           You can get the file name with a call to
  548.                           RF_Get_Current_File_Name().
  549. [RFIO Routines]     9
  550.  
  551.     
  552.                           The offending line at *valp, and the line number at 
  553.                           *type.
  554.     
  555.      int RF_Get_Next_Kwd_In_List(
  556.                                   char **start,  // val returned from
  557.                                                  // RF_Get_Next_Kwd_In_File()
  558.                                   char **kwp,    // Where to put the pointer 
  559.                                                  // to the key word.
  560.                                   char **valp,   // Where to put the pointer 
  561.                                                  // to the value.
  562.                                   int *valtypep  // Where to put the type of 
  563.                                                  // value
  564.                                      );          // (0 = string; 1 = list)
  565.  
  566.          This is like RF_Get_Next_Kwd_In_File() except that it works on lists
  567.          in memory.  Instead of an RFHANDLE, it takes a double char pointer 
  568.          that keeps track of where it is in the list.
  569.          It is used to sequentially parse list values returned from
  570.          RF_Get_Next_Kwd_In_File().
  571.     
  572.          start is a pointer to a char pointer.  On
  573.          the first invocation, the caller must set it to the valp parameter
  574.          returned by RF_Get_Next_Kwd_In_File().  On subsequent calls, it is a 
  575.          value set by this routine.  The caller should not modify this value 
  576.          after setting it to valp.
  577.     
  578.          Note that nested lists are supported.
  579.     
  580.          This routine returns the same values as RF_Get_Next_Keyword_In_List.
  581.          When RFEOF is returned, it really means that end-of-list has been
  582.          reached.
  583.     
  584.      int RF_Get_Next_Wanted_Kwd_In_File(
  585.                                   RFHANDLE rfh,  // Value returned from open
  586.                                   char **kwdlist,// A pointer to an array of
  587.                                                  // character pointers.  Each
  588.                                                  // element of the array 
  589.                                                  // points to a string that
  590.                                                  // contains the name 
  591.                                                  // of a keyword of interest.
  592.                                   char **kwp,    // Where to put the pointer 
  593.                                                  // to the key word.
  594.                                   char **valp,   // Where to put the pointer 
  595.                                                  // to the value.
  596.                                   int *valtypep  // Where to put the type of 
  597.                                                  // value
  598.                                   );             // (0 = string; 1 = list)
  599.     
  600.          This routine works just lie RF_Get_Next_Kwd_In_File() except that you
  601.          can restrict the keywords returned to those you specify.  The keywords
  602.          to be returned are pointed to by kwdlist.  This variable should point
  603.          to a vector of pointers to strings that contains the names of keywords
  604.          of interest.  The strings must be asciiz;  the last element in the 
  605.          vector of pointers must be NULL.
  606.     
  607.          Here's an example:
  608.  
  609. [RFIO Routines]     10
  610.  
  611.     
  612.            char *kwdvector[] = {
  613.                                  "kwd1",
  614.                                  "keyword2",
  615.                                  "kword3",
  616.                                  NULL
  617.                                }
  618.            while (RF_Get_Next_Wanted_Kwd_In_File(rfh, kwdvector, kwp, valp,
  619.                                                             typep) != RFEOF)
  620.              {
  621.                <process your keyword>
  622.                free(kwp);
  623.                free(valp);
  624.              }
  625.  
  626.  
  627.  
  628.          This routine returnes the same values as RF_Get_Next_Wanted_Kwd_In_File.
  629.          RFEOF means the last matching keyword has already been returned.
  630.  
  631.  
  632. Error Handling
  633.  
  634. The part of this sample code that is least likely to suit your needs is the
  635. error handling.  The code that handles errors is in a seperate module,
  636. CIDLOG.C.  The interface to the error handling routine is fairly standard.
  637. The call is
  638.  
  639.          CID_Log(MessageNumber, ...)
  640.  
  641. where a variable number (0 to 10) pointers to asciiz strings can be passed as
  642. optional parameters.  But message numbers and the behavior of the error handling
  643. routine will probably have to change for your particular application.
  644.  
  645. The message numbers are defined in hlrfio.h.  Suggested message text is in
  646. respfile.msg (source in respfile.txt).
  647.  
  648.  
  649.  
  650. Sample Code Files in This Package
  651.  
  652. The following files of sample code are included.
  653.  
  654.         makefile                A make file for all the code in this package.
  655.                                 When run, it generates
  656.  
  657.                                         respfile.msg
  658.                                         sample1.exe
  659.                                         sample2.exe
  660.                                         sample3.exe
  661.  
  662. [Files in This Package]     11
  663.  
  664.  
  665.                                         getbootd.exe
  666.                                         chklvl.exe
  667.  
  668.         respfile.msg            An OS/2 message file containing the error
  669.                                 messages emitted by the Response File APIs.
  670.  
  671.         respfile.txt            Source for respfile.msg
  672.  
  673.         cidlog.c                Source for the error logging routine.
  674.  
  675.         cidlog.h                Header file for the error logging routine.
  676.  
  677.         findfile.c              Source for the routine that searches for
  678.                                 response files across the PATH and DPATH.
  679.  
  680.         findfile.h              Corresponding header file.
  681.  
  682.         hlrfio.c                Source for the high-level Response File APIs
  683.  
  684.         hlrfio.h                Corresponding header file.
  685.  
  686.         rfio.c                  Source for the low-level Response File APIs
  687.  
  688.         rfio.h                  Corresponding header file.
  689.  
  690.         sample1.c               A simple example using the high level APIs to 
  691.                                 process a response file.  When compiled and 
  692.                                 linked, it is a working program.
  693.  
  694.         sample1.def             Linker def file for sample1
  695.  
  696.         sample2.c               A more complex example.  Also a working program.
  697.  
  698.         sample2.def             Linker def file for sample2
  699.  
  700.         sample3.c               A more complex example yet.  Also a working 
  701.                                 program.
  702.  
  703.         sample3.def             Linker def file for sample3
  704.  
  705.         sampinst.cmd            A REXX command file that implements a full
  706.                                 CID install
  707.  
  708.         getbootd.c              A program to find out what drive was
  709.                                 last booted from.
  710.  
  711.         getboot.def
  712.  
  713.         chklvl.c                A program to find out the installed level
  714.                                 of a package.
  715.  
  716.         chklvl.def
  717.  
  718.         test.rsp                Test response file to be used with the
  719.                                 sample programs.
  720.  
  721.  
  722.  
  723. [Files in This Package]     12
  724.