Opens a libraryint sm_l_open(char *lib_name);
- The name of the library to open. Panther searches for
lib_namein the current directory, then along the path given to
sm_initcrt, and finally along the path defined by
sm_l_opento open a library before you use a JPL module, a menu, or a screen that is in that library.
sm_l_openopens a library in these steps:
- Allocates space in which to store information about the library.
- Leaves the library file open, and returns a descriptor that identifies the library. You can use this descriptor to explicitly search a single library—for example, to find a screen in a specific library with sm_l_window.
If you define the SMFLIBS variable in your setup file as a list of library names, Panther automatically calls
sm_l_openfor those libraries.
Panther has no limit on the number of libraries you can have open at the same time. Note that some systems have severe limits on memory or simultaneously open files.
/* Prompt for the name of a library until a
* valid one is found. Assume the memory-resident
* screen contains one field for entering the library
* name, with suitable instructions. */int ld;
extern char libquery;
if (sm_d_form(libquery) < 0)
sm_d_msg_line("Please enter the name of your library.");
} while ((ld = sm_l_open(sm_fptr (1))) < 0);
sm_form, sm_jplcall, sm_jplpublic, sm_l_close, sm_window