Programming Guide



sm_pset

Modifies the value of a global string

#include <smglobs.h
char *sm_pset(int which, char *newval);

which
Specifies the global string to modify with one of these constants:

P_YES
Set the affirmative input that is valid for a field whose keystroke_filter is set to PV_YES_NO. Supply a two-character string that contains the lowercase yes value and the uppercase yes value.

P_NO
Set the negative input that is valid for a field whose keystroke_filter is set to PV_YES_NO. Supply a two-character string that contains the lowercase no value and the uppercase no value.

P_DECIMAL
Set the user's decimal point marker and the operating system's decimal point marker in a two-character string.

P_TERM
Set the terminal type. You must call sm_pset with this argument this before initialization.

P_USER
Set a pointer to a developer-specified region of memory for the current screen. Each screen maintains its own pointer. This pointer is not set by Panther; it is set and maintained by the application.

SP_NAME
Set the name of the active screen.

SP_STATATTR
Set attributes of current status line—a pointer to an array of unsigned short integers.

SP_STATLINE
Set the current text of the status line as a space padded, 255 character string (not including the terminating null).

V_
One of the V_ constants defined in smvideo.h, returns video-related information.

newval
The new value to assign to this global string.

Note: If you supply a V_ constant for which, declare this parameter as a static variable.


Returns

Description

sm_pset lets you modify the contents of the which-specified global string. To get the value of a global string, use sm_pinquire.

Example

/* Set things for "German":   Ja == yes, */
/* Nein == no, and ',' is decimal point. */

void
set_german()
{
sm_pset(P_YES,"jJ");
sm_pset(P_NO,"nN");
sm_pset(P_DECIMAL,",.");
sm_ferr_reset(0, "Jetzt spreche ich Deutsch!");
}

See Also

sm_iset, sm_pinquire