01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MESSAGE ( 3T ) ( AT&T UNIX PC only ) MESSAGE ( 3T )<br />

NAME<br />

message - display error and help messages<br />

SYNOPSIS<br />

#include <br />

int message(mtype, hfile, htitle, format [, arg ] ••• )<br />

int mtype;<br />

char *hfile, *htitle, *format;<br />

int exhelp(hfile, htitle)<br />

char *hfile, *htitle;<br />

DESCRIPTION<br />

Message formats the passed message a Ia print! and displays the<br />

message in a window that message creates. The message is<br />

automatically wrapped to fit within the dimensions of the window,<br />

and may contain embedded newlines. Message then waits for user<br />

input and returns the character read to the caller.<br />

Mtype can have one of the following values:<br />

MTJ:IELP Displays help message<br />

MT_ERROR Displays error message<br />

MT_POPUP Displays a popup window<br />

MT_QUIT Displays error message with cancel<br />

option<br />

MT_CONFIRM Displays confirmation message<br />

MT_INFO Displays informational message<br />

All message types except MT_POPUP display the available<br />

choices (ENTER, CANCL, or HELP) and beep any other keys.<br />

The MTJNFO message type takes the first line of the message<br />

and uses it as the window label.<br />

When HELP is selected, message executes uahelp , passing it hfile<br />

and htitle as the help file name and initial help display title. Message<br />

then waits for uahelp to return. If hfile is NULL, then the<br />

HELP choice is not offered or accepted.<br />

Ezhelp executes uahelp directly, without going through an intermediate<br />

help display. In both cases, if hfile is a full path name<br />

then it is passed to uahelp as is, otherwise the pathname<br />

Jusrflibfua is assumed.<br />

EXAMPLES<br />

To print an error message when a file isn't found:<br />

message(MT_ERROR, "ua.hlp", "<strong>System</strong> errors",<br />

"%s not found", name);<br />

If the user presses the Help key in response to this message, then<br />

uahelp will display the page on system errors in the user agent<br />

help file.<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!