home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / nfsrc21.zip / SAVESETS.PRG < prev    next >
Text File  |  1991-08-16  |  2KB  |  84 lines

  1. /*
  2.  * File......: SaveSets.Prg
  3.  * Author....: David Husnian
  4.  * Date......: $Date:   15 Aug 1991 23:05:06  $
  5.  * Revision..: $Revision:   1.2  $
  6.  * Log file..: $Logfile:   E:/nanfor/src/savesets.prv  $
  7.  * 
  8.  * This is an original work by David Husnian and is placed in the
  9.  * public domain.
  10.  *
  11.  * Modification history:
  12.  * ---------------------
  13.  *
  14.  * $Log:   E:/nanfor/src/savesets.prv  $
  15.  * 
  16.  *    Rev 1.2   15 Aug 1991 23:05:06   GLENN
  17.  * Forest Belt proofread/edited/cleaned up doc
  18.  * 
  19.  *    Rev 1.1   12 Apr 1991 00:18:04   GLENN
  20.  * There was a call to SETCENTURY() that should have been FT_SETCENTURY().
  21.  * Another one of those errors that came from testing earlier versions of 
  22.  * a routine before FT_ prefix was added to function names.  Lesson learned.
  23.  * 
  24.  *    Rev 1.0   01 Apr 1991 01:02:10   GLENN
  25.  * Nanforum Toolkit
  26.  *
  27.  *
  28.  */
  29.  
  30.  
  31. /*  $DOC$
  32.  *  $FUNCNAME$
  33.  *     FT_SAVESETS()
  34.  *  $CATEGORY$
  35.  *     Environment
  36.  *  $ONELINER$
  37.  *     Save the status of all the SET command settings
  38.  *  $SYNTAX$
  39.  *     FT_SAVESETS() -> aOldSets
  40.  *  $ARGUMENTS$
  41.  *     None
  42.  *  $RETURNS$
  43.  *     An array containing the values of the supported SETs.
  44.  *  $DESCRIPTION$
  45.  *     This function saves the SET Settings, i.e., it copies them into an
  46.  *     array, aOldSets.  The following SETs are not currently supported:
  47.  *     FILTER, FORMAT, FUNCTION, INDEX, KEYS, MODE, ORDER, PROCEDURE,
  48.  *     RELATION, TYPEAHEAD
  49.  *  $EXAMPLES$
  50.  *     aOldSets := FT_SAVESETS()
  51.  *  $INCLUDE$
  52.  *     SET.CH
  53.  *  $SEEALSO$
  54.  *     FT_RESTSETS() FT_SETCENTURY() 
  55.  *  $END$
  56.  */
  57.  
  58.  
  59. #include "set.ch"
  60.  
  61. #Define FT_EXTRA_SETS    2
  62. #DEFINE FT_SET_CENTURY   _SET_COUNT + 1
  63. #DEFINE FT_SET_BLINK     _SET_COUNT + 2
  64.  
  65. #IFDEF FT_TEST
  66.   FUNCTION MAIN
  67.      LOCAL ASETS := FT_SAVESETS()
  68.      INKEY(0)
  69.      RETURN Nil
  70. #endif
  71.  
  72. FUNCTION  FT_SAVESETS()
  73.  
  74.    LOCAL aOldSets := ARRAY(_SET_COUNT + FT_EXTRA_SETS)
  75.  
  76.    AEVAL(aOldSets, ;
  77.          { | xElement, nElementNo | ;
  78.            aOldSets[nElementNo] := SET(nElementNo) } )
  79.  
  80.    aOldSets[FT_SET_CENTURY] := FT_SETCENTURY()
  81.    aOldSets[FT_SET_BLINK]   := SETBLINK()
  82.  
  83.    RETURN (aOldSets)                    // FT_SaveSets
  84.