Programming Guide |
Modifies the value of a global string
#include <smglobs.hchar *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 toPV_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 toPV_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 insmvideo.h
, returns video-related information.newval
- The new value to assign to this global string.
Note: If you supply a
V_
constant forwhich
, declare this parameter as a static variable.
- · A pointer to a buffer with the old contents of the array specified by
which
. The buffer's maximum size of 255 bytes, including the null terminator.
sm_pset
lets you modify the contents of thewhich
-specified global string. To get the value of a global string, use sm_pinquire.
/* 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!");
}