12.07.2015 Views

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

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.

NAMESYNOPSISsm_err_reset - display an error message and reset the status linevoid sm_err_reset (message)char *message;DESCRIPTIONThe message is displayed on the status line until you acknowledge it by pressinga key. If message is too long to fit on the status line, it is displayed in awindow instead. The exact behavior of error message acknowledgement is governedby sm_er_options. The initial message attribute is set by sm_ch_emsgatt, anddefaults to blinking.This function turns the cursor on before displaying the message, and forces offthe global flag sm_do_not_display. It is similar to sm_emsg, which does not turnon the cursor, and to sm_quiet_err, which inserts a constant string (normally"ERROR:") before the message.Several percent escapes provide control over the content and presentation ofstatus messages. They are interpreted by sm_d_msg_line, which is eventuallycalled by everything that puts text on the status line (including field statustext). The character following the percent sign must be in upper-case; this isto avoid conflict with the percent escapes used by printf and its variants.Certain percent escapes (%W, for instance; see below) must appear at thebeginning of the message, i.e. before anything except perhaps another percentescape......If a string of the form %Annnn appears anywhere in the message, thehexadecimal number nnnn is interpreted as a display attribute to beapplied to the remainder of the message. The table below gives thenumeric values of the logical display attributes you will need toconstruct embedded attributes. If you want a digit to appearimmediately after the attribute change, pad the attribute to 4 digitswith leading zeroes; if the following character is not a legal hexdigit, leading zeroes are unnecessary.If a string of the form %KKEYNAME appears anywhere in the message,KEYNAME is interpreted as a logical key mnemonic, and the wholeexpression is replaced with the key label string defined for that keyin the key translation file. If there is no label, the %K is strippedout and the mnemonic remains. Key mnemonics are defined in smkeys.h ;it is of course the name, not the number, that you want here. Themnemonic must be in upper-case.If %N appears anywhere in the message, the latter will be presented ina pop-up window rather than on the status line, and all occurrences of%N will be replaced by newlines.If the message begins with a %B, <strong>JYACC</strong> <strong>FORMAKER</strong> will beep the terminal(using sm_bel) before issuing the message.If the message begins with %W, it will be presented in a pop-up windowinstead of on the status line. The window will appear near the bottomcenter of the screen, unless it would obscure the current field by sodoing; in that case, it will appear near the top. If the messagebegins with %MU or %MD, and is passed to one of the error messagedisplay functions, <strong>JYACC</strong> <strong>FORMAKER</strong> will ignore the default error messageacknowledgement flag and process (for %MU) or discard (for %MD) thenext character typed.

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

Saved successfully!

Ooh no, something went wrong!