What is Superlib ?

Superlib Description by Oasis 

The final version of SuperLib, and now it’s FREEWARE, and it comes with 100% SOURCE CODE and extensive norton guide.

SuperLib is a library of functions for Clipper 5.x.

What makes SuperLib different than other libraries on the marketplace is that is contains a large collection of METAFUNCTIONS. A metafunction is like a pre-packaged mini application, ready to link and run. For instance, SuperLib’s report writer is as simple to use as:

USE
REPORTER()

All of the metafunctions are menu-driven and ready to use without modifications. All SuperLib functions are data independant. All that is required is an open DBF file. SuperLib will determine the field structure and use the current DBF. SuperLib requires no special setup or way of doing things. It works with you, not against you. SuperLib functions will do their best to save/restore all settings as they found them. (such as colors, cursor, screens, etc.)

There are over 300 functions in SuperLib, ranging from the metafunctions down to the granular common component functions such as events and popups. (see the function list below, or the .NG file). This version of SuperLib is 100% mouse aware! All SuperLib functions
are automatically aware of the mouse and respond to the mouse.

SuperLib even contains replacements for Clipper’s READ, MENU TO, ACHOICE and MEMOEDIT functions that are mouse aware. Several functions are provided to help you build mouse awareness into your own functions.

SuperLib is Blinker 3.x, 4.x and Exospace compatible for protected mode programs. SuperLib is 99.9 % pure Clipper code, and uses no Clipper internals, which makes for painless upgrading to future versions of Clipper and the various linkers.

SuperLib is network ready, with all locking already built in. (works fine for single-user too)

There is no registration of SuperLib, since it is now freeware. The author, Gary Prefontaine, is no longer supporting the product. If you need help with this library, please ask on comp.lang.clipper

Thanks, Gary.

http://www.the-oasis.net/files/library/supfree.zip

http://www.the-oasis.net/supfree.htm

SP Color chart

      Top row = Clipper foreground color codes
      Left Column = Clipper background color codes
      Colored Blocks = Numeric color codes (background*16)+foreground

       N   B   G   BG  R   RB  GR  W   +N  +B  +G  +BG +R  +RB +GR +W

  N      0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  
  B     16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  
  G     32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  
  BG    48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  
  R     64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  
  RB    80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  
  GR    96  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111 
  W    112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127

SP Conflicts with other libraries

 Other than naming conflicts, there is no reason that
 SuperLib should conflict with other libraries.  

 a) SuperLib uses no direct screen writing - it is all 
    done through Clipper. 
 b) SuperLib does not take over any interrupts. 
 c) SuperLib uses no Clipper internals.  
 d) SuperLib does not replace the Clipper GET system.

 If, however, another library you are using does any
 of these things,  there may be unpredictable results.

 

SP Changing SuperLib

 If you wish to change the source code to certain
 SUPER.Lib modules and replace them in the SUPER.LIB file,
 you will need access to a library manager.

 The most popular and accessible is LIB.EXE, from
 Microsoft, which comes with many Microsoft compilers.
 You will need version 3.11 or above of LIB.EXE.

 To update the library, do the following:

   1. Change and test the .PRG, .C  or .ASM module.

      for Clipper (PRG) modules, I use:

          CLIPPER <file>  -n  -w

      for  C  (C) modules, I use:  (MSC 5.0)

          CL /c  /AL  /Zl  /Oalt /FPa  /Gs  /Fo<file>.obj <file>.c

      for Assembly (ASM) modules, I use: (MASM 5.10)

          MASM   <file>;

   2. After testing, use the following to replace the module in
      the library with the new .OBJ file:

            LIB SUP??? -+<objectfilename> ;

              or

            LIB SUP???  -+<objectfilename1>+<objectfilename2>;

 The semicolon is important.

 Further documentation will be found in the LIB.EXE
 reference manual.

 

SP Internal Datafile Structures

SCROLLER.DBF

  SMODULE        C       8    Calling Proc
  SFIELD         C       10   Calling variable
  SDESCR         C       25   Description/box title
  SSTRING        C       160  Display expression
  SRETURN        C       75   Return expression
  SDBFILE        C       8    DBF file
  SIND           C       8    Index file

HELP.DBF

  H_MOD          C       10   Calling Proc
  H_VAR          C       10   Calling variable
  H_MEMO         M       10   Help text
  HW_T           N       2    Window top
  HW_L           N       2    Window Left
  HW_B           N       2    Window Bottom
  HW_R           N       2    Window right

PLIST.DBF

  DESC           C      45    Description of list
  LIST           C      200   Delimited string of list

FORM.DBF

  DESCRIPT       C       50   Description of the form
  MEMO_ORIG      M       10   Form letter


TODO.DBF

  CATEGORY       C       10   Category of item
  ITEM           C       60   Item description
  PRIORITY       C       2    Priority of item
  DOBY           D       8    Do by date
  DONE           L       1    Done marker
  LONG_DESC      C       231  Long description

QUERIES.DBF

  DBF            C      12    DBF query built for
  DES            C      30    Description of query
  FQUERY         C      220   Query expression


SFREPORT.DBF

  SF_DBF         C   8    Dbf name
  SF_NDXKEY      C   60   Sort key(index)
  SF_MAJKEY      C   60   Major sort key
  SF_MINKEY      C   60   Minor sort key
  SF_TITLE       C   35   Report name
  SF_MAJTEXT     C   25   Major key text
  SF_MINTEXT     C   25   Minor key text
  SF_WIDTH       N   3    Pg width chrs
  SF_LENGTH      N   3    Pg length lines
  SF_LEFTM       N   2    Left margin
  SF_TOPM        N   2    Top margin
  SF_SPACE       N   1    Line spacing
  SF_PAUSE       L   1    Pause between
  SF_NPLINES     N   1    Lines left
  SF_EJB4        L   1    Eject b4 report
  SF_EJAFT       L   1    Eject aftreport
  SF_EJMAJOR     L   1    Eject on Major
  SF_EJMINOR     L   1    Eject on Minor
  SF_EJGRAND     L   1    Eject b4 Grand
  SF_UNTOTAL     L   1    Underline ttals
  SF_MAJCHR      C   1    Major underline char
  SF_MINCHR      C   1    Minor underline char
  SF_NHEAD       N   1    # header lines
  SF_NFOOT       N   1    # footer lines
  SF_NTITL       N   1    # title lines
  SF_TSEP        C   1    Title separation char
  SF_COLSEP      C   1    Col sep char
  SF_CSEPWID     N   1    Col sep width
  SF_LINESEP     C   1    Line sep char
  SF_NCOLS       N   2    # columns
  SF_FEET        M   10   Footer contents
  SF_HEADS       M   10   Header contents
  SF_STDHEAD     L   1    Use standard header
  SF_DETAILS     M   10   Detail contents
  SF_QUERY       C   100  Last used query
  SF_FULLSUM     C   1    Full / summary
  SF_PRNCODE     C   50   Printer code pre-report
  SF_AFTCODE     C   50   Printer code post-report

CLABEL.DBF

  DESCRIPT       C   60      Description
  WIDTH          N   2       Label width
  SPACESBETW     N   2       Spaces between labels
  LINESBETW      N   2       Lines between labels
  ACROSS         N   2       Labels across
  LMARGIN        N   2       Left margin
  HEIGHT         N   2       Label height (lines)
  SETUPCODE      C   60      Pre print setup code
  EXITCODE       C   60      Post print code
  CONTENTS       M   10      Label contents
  PRNPORT        C   10      Printer port
  SHEETS         L   1       Using hand-fed sheets?
  LBLSPAGE       N   3       Labels per page
  TOPMARG        N   2       Top margin (lines)
  PAUSE          L   1       Pause between pages
  EJECT          L   1       Eject each page
  DBFNAME        C   8       DBF name
COLORS.DBF

  SETNAME        C  40    Set name
  DMAINCOL       C  40    SLS_NORMCOL() setting
  DMAINMENU      C  40    SLS_NORMMENU() setting
  DPOPCOL        C  40    SLS_POPCOL() setting
  DPOPMENU       C  40    SLS_POPMENU() setting
  DFRAME         C  40    SLS_FRAME() setting
  DSHADATT       N   3    SLS_SHADATT() setting
  DSHADPOS       N   1    SLS_SHADPOS() setting
  DEXPLODE       L   1    SLS_XPLODE()  setting

APPOINT.DBF

  DATE           C   8   Appointment date
  TIME           C   5   Appointment time
  DESC           C  65   Description

 

SLOLDS.DBF

  TOPIC C 35
  KEYS  M
  TEXT  M

 

SP Internal Datafiles

 SuperLib uses a number of internal datafiles to store

 such things as queries, reports and colors.

 All of these files have default names - for instance
 queries are stored in QUERIES.DBF by default. SuperLib 3.x
 provides a series of functions to determine internal file names
 and locations.

 All of these functions start with SLSF_ (Super Lib System File )

 Function                 Purpose                Default

 SLSF_REPORT([cNew])      Stored reports         SFREPORT
 SLSF_QUERY([cNew])       Stored queries         QUERIES
 SLSF_FORM([cNew])        FORMLETR() forms       FORM
 SLSF_HELP([cNew])        Help records           HELP
 SLSF_LIST([cNew])        LISTER() definitions   PLIST
 SLSF_SCROLL([cNew])      Lookup definitions     SCROLLER
 SLSF_COLOR([cNew])       Color sets             COLORS
 SLSF_TODO([cNew])        TODOLIST() dbf         TODO
 SLSF_TDN1([cNew])        TODOLIST 1st index     TODO
 SLSF_TDN2([cNew])        TODOLIST 2nd  index    TODOP
 SLSF_TDN3([cNew])        TODOLIST 3rd  index    TODOD
 SLSF_APPT([cNew])        Appointments           APPOINT
 SLSF_LABEL([cNew])       Labels database        CLABELS
 SLSF_OLD([cNew])         O.L.D. doc database    SLOLDS

 Where [cNew] optionally sets the path and/or filename.
 If [cNew] is passed, this is the value returned as
 well.

 For example, to change the default file and place
 where reports are stored when using REPORTER(),

   SLSF_REPORT("c:\hidden\MYREPORT")
              // sets the report file
              // to MYREPORT.DBF in
              // c:\HIDDEN

 These take the place of the following public
 variables in earlier versions of SuperLib:

     _REPORTS   = "SFREPORT"   (for reports)
     _FORMS     = "FORM"       (for form letters)
     _QUERIES   = "QUERIES"    (for queries)
     _LISTER    = "PLIST"      (for lister)
     _TODODBF   = "TODO"       (for todo list)
     _TODONTX1  = "TODO"       (TODO category INDEX)
     _TODONTX2  = "TODOP"      (TODO priority INDEX)
     _TODONTX3  = "TODOD"      (TODO do by INDEX)
     _HELP      = "HELP"       (for help)
     _SCROLLER  = "SCROLLER"   (for scroller)
     _COLORS    = "COLORS"     (for colors)

 COLORS are now stored in a DBF file, rather than a
 .MEM file.

 

SP Mice implementation

Mice and SuperLib

 SuperLib contains a set of mouse and event functions.
 These functions are MOSTLY prefaced with 'RAT' for uniqueness.

 The basic functions are written in assembler (MASM
 5.10) and are in s_mouse.asm. These provide such things as
 testing for a mouse, turning the mouse cursor on, turning it off,
 positioning it.

 Also provided are two approaches to knowing where the
 mouse is and what it is doing. The first is a direct query of
 the mouse's status and position. This is basically, "where is the
 mouse right now, is the right button depressed right now, is the
 left button depressed right now". These are accomplished through
 service 3 of interrupt 33h.

 The second approach is to use service 5 of interrupt
 33h, which 'records' right and left mouse button depresses and
 where the mouse was when these occurred.

 These Clipper functions, contained in s_moose.prg,
 are included to provide a simple event manager to trap both keys
 and mouse events and store them for reference.

 The event manager RAT_EVENT() can be used in place of
 inkey(), and will detect a keypress, a mouse left button press,
 a mouse right button press, or a timeout. The 'event' returns a
 value similiar to inkey(), but adds values of 400 and 500 for
 mouse right and left presses. Functions are provided to find out
 the mouse row and column when the event occurred.

 Two additional functions RAT_READ() and RAT_MENU2()
 are provided which use the mouse and event functions to perform
 a read and a menu to emulation. These are also good examples for
 usage of the mouse and event functions.

 All SuperLib functions are mouse aware, as of version 3.5.

 

SP Printer Issues

 This is how printing is handled by the library
 functions. You need not follow this method except where it is
 imbedded in SuperLib metafunctions.

 The function SLS_PRN() is a SET/RETRIEVE function
 which sets and retrieves the default printer port as a string
 with the default as "LPT1". This function may be called with any
 valid printer port name as a parameter to set a new printer port
 for SuperLib usage.

 Valid values are "LPT1", "LPT2", "LPT3", "COM1",
 "COM2" - anything you could issue a SET PRINTER TO
 <cPort> with.

 Another SET/RETRIEVE function - SLS_PRNC() - points
 to the setting which determines if the printer port will be
 checked for readiness before printing. Passing it a False causes
 it to not check the printer before printing - handy in some
 network situations.

 At print time, LPT* ports are checked for readiness
 via the P_READY() function. (COM ports are not checked for
 readiness.) However, if SLS_PRNC() has been passed a .f., no
 check for readiness is done.

 P_READY() uses the .ASM function ISPRN() to check for
 readiness.

 If the port is not ready, the user is given
 the option to:       Try Again
                      Ignore the Warning
                      Select a Different Printer Port
                      Abort the print request

 If Abort is selected, P_READY() returns false.