![]() | Programming Guide | ![]() |
Sets a string variable
char *sm_soption(int option, char *newval);
option- Specifies the variable to set with one of these constants:
SO_EDITOR- Editor to use in JPL windows. Equivalent to SMEDITOR.
SO_LPRINT- The operating system command that is invoked through the local print key (LP). Equivalent to SMLPRINT. Set this option only for character-mode applications.
SO_PATH- Search path for libraries. Equivalent to SMPATH.
SO_LDBLIBNAME- An LDB library to open. Equivalent to SMLDBLIBNAME. Set this option in
jmain.corjxmain.cbefore the call tosm_ldb_init.SO_LDBNAME- An LDB screen to open. Equivalent to SMLDBNAME.
SO_RBCONFIG- Specifies the middleware configuration file for a running application, required to enable a native client connection. Equivalent to SMRBCONFIG. Set
newvalto the full pathname of the middleware configuration file—for example,/usr/myapp/broker.bin.SO_RBHOST- Provides the middleware API with the network addresses of the machines to which a workstation client can connect. Equivalent to SMRBHOST.
SO_RBPORT- Provides the middleware API with the port numbers associated with the machines (SMRBHOST) to which a workstation client can connect. Equivalent to SMRBPORT.
newval- The new value to assign to the
option-specified variable.
- · A pointer to the old value for the specified option or an empty string if the specified option was not set.
sm_soptionlets you change at runtime various application-level variables that are typically defined in the application's environment, its initialization file, or setup files.
char *default_lp;
default_lp = sm_soption(SO_LPRINT, "lp -dny %s");