home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / m / m130 / 1.ddi / RESOURCE.001 / LOOKUP.PO < prev    next >
Encoding:
Text File  |  1991-07-06  |  2.8 KB  |  54 lines

  1. #pragma poco library "lookup.poe"       // this library is required!
  2.  
  3. #define MAXNAMES    500  // limit displayed functions,    300 < MAXNAMES < 5000
  4. #define MAXNAMELEN    50     // limit function name length, 20    < MAXLEN   < 80
  5. #define Success     0
  6.  
  7. void main(void)
  8. {
  9.     ErrCode err;
  10.     err = __lookup__poemain(MAXNAMES, MAXNAMELEN); // entry point to lookup.poe
  11.     if (err != Success) // if a non-successfull error code was returned,
  12.         exit(err);        // exit with that value to force a host error dialog.
  13. }
  14.  
  15. #pragma poco eof    // stop compiling here, no need to 'compile' comments...
  16.  
  17. /*****************************************************************************
  18.  * LOOKUP.POC - Lookup the syntax of a Poco library function.
  19.  *
  20.  *    This program will display a scrolling list of all the functions in the
  21.  *    Poco builtin and specified POE libraries.  A double-click on a function
  22.  *    name in the scrolling list will display the complete function prototype.
  23.  *    The scrolling list also contains a type-in field.  You may type a string
  24.  *    into this field and hit ENTER, and a list of function names containing
  25.  *    your string (in any position within the name) will be displayed.  The
  26.  *    type-in string filtering is case-insensitive; typing "bli" will list
  27.  *    "Blit()", "IconBlit()", and "RubLine()".
  28.  *
  29.  *    This Poco program is associated with module LOOKUP.POE, which provides
  30.  *    the actual lookup processing.  This small Poco program is a stub which
  31.  *    transfers control (and a couple parameters) to the entry point of
  32.  *    the POE module.  The routines within the POE module build and display
  33.  *    the library function list, interact with the user, and return the status
  34.  *    to this program, which then simply exits.
  35.  *
  36.  *    The list will contain the name of each routine in each of the Poco
  37.  *    builtin libraries, and the name of each routine in all loaded POE modules.
  38.  *    If you have favorite libraries of POE functions which you would like to
  39.  *    have included in the lookup lists, simply code a "#pragma poco library"
  40.  *    statement for each of them.  Any number of libraries can be
  41.  *    specified, provided that there are no conflicts in the names of the
  42.  *    functions in the different libraries.  (The need to avoid naming conflicts
  43.  *    is the reason the entry point in lookup.poe has the rather unlikely name
  44.  *    of "__lookup__poemain()".)
  45.  *
  46.  *    If many libraries are included with #pragma statements, it may be
  47.  *    necessary to tweak the MAXNAMES and/or MAXNAMELEN constants.  The
  48.  *    builtin libraries currently contain around 275 functions, so there is
  49.  *    plenty of room for growth in the default values coded.    (Setting
  50.  *    these values too high might result in a failure to obtain the memory
  51.  *    needed to build the function lists.)
  52.  ****************************************************************************/
  53.  
  54.