*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> msg_display (1)              



NAME    [Toc]    [Back]

     msgc, msg_window, msg_string, msg_clear, msg_standout, msg_standend,
     msg_display, msg_display_add, msg_prompt, msg_prompt_add,
     msg_prompt_noecho, msg_table_add - simple message list compiler

SYNOPSIS    [Toc]    [Back]

     msgc [-o name] file

     #include "msg_defs.h"

     msg_window(WINDOW *window);

     const char *
     msg_string(msg msg_no);




     msg_display(msg msg_no, ...);

     msg_display_add(msg msg_no, ...);

     msg_prompt(msg msg_no, const char *def, char *val, int max_chars, ...);

     msg_prompt_add(msg msg_no, const char *def, char *val, int max_chars,

     msg_prompt_noecho(msg msg_no, const char *def, char *val, int max_chars,

     msg_table_add(msg msg_no, ...);

DESCRIPTION    [Toc]    [Back]

     This implements a curses based message display system.  A source file
     that lists messages with associated names is given to msgc and produces
     both a .c and a .h file that implement the menu system.  The standard
     root name of the files is msg_defs.  The -o name can be used to specify a
     different root name.

ENVIRONMENT    [Toc]    [Back]

     MSGDEF  Can be set to point to a different set of definition files for
             msgc.  The current location defaults to /usr/share/misc.

FILES    [Toc]    [Back]



     The format is very simple.  Each message is started with the word
     `message' followed by the name of the message.  The body of the message
     is next and is started by a { and closed by a }.  The braces are not part
     of the message.  Everything, including newlines between the braces are
     part of the message.

MESSAGE FUNCTIONS    [Toc]    [Back]

     The defined messages are used through calls routines that manipulate the
     messages.  You first need to set the curses(3) environment up and then
     tell the message system which window to use for displaying message by
     calling the function msg_window().

     All variable argument lists in the functions are used as are arguments to
     sprintf.  The messages may have sprintf conversions in them and the corresponding
 parameters should match.  Messages are identified by name
     using the notation `MENU_name' where ``name'' is the name in the message
     source file.  (The definitions are accessed by including the generated .h
     file into a source file wanting to use the message routines.)

     The function msg_string() just returns a pointer to the actual message
     string.  The functions msg_clear(), msg_standout() and msg_standend()
     respectively clear the message window, set standout mode and clear standout

     The functions msg_display() and msg_display_add() cause a defined message
     to be displayed in the message window and does the requested conversions
     before printing.  The difference is that msg_display() clears the window
     before displaying the message. These functions fill paragraphs for readability.
 The msg_table_add() function behaves like msg_display_add() but
     does not fill text.

     The remaining functions deal with a prompt facility.  A prompt message is
     either taken from the message directory or from a given string.  The message
 is processed with sprintf and then displayed.  If the parameter def
     is non-NULL and not a string of zero length, a default value is printed
     in brackets.  The user is allowed to type in a response.  If the user
     types just the newline character, the default is returned in the value.
     The parameter max_chars is the length of the parameter val, where the
     results are stored.  The parameters def and val may point to the same
     character array.  If the default is chosen, the character array is not
     changed.  The functions msg_echo() and msg_noecho() control whether the
     prompt routine echo or don't echo the input that is typed by the user.

AUTHORS    [Toc]    [Back]

     Philip A. Nelson for Piermont Information Systems Inc.

BSD                           September 26, 1997                           BSD
[ Back ]
 Similar pages
Name OS Title
VkComponentList IRIX A simple list of VkComponent objects
iflList IRIX simple doubly-linked list
VkMsgFacility IRIX ViewKit simple interface to the ToolTalk message service
lint FreeBSD Lint error message list
ali Tru64 list mail aliases (only available within the message handling system, mh)
show Tru64 show (list) messages (only available within the message handling system, mh)
folders Tru64 list folders and contents (only available within the message handling system, mh)
gss_wrap HP-UX attach a message integrity code (MIC) to a message, and optionally encrypt the message content
gss_unwrap HP-UX verify a message with attached message integrity code (MIC) and decrypt message content if necessary
cc Tru64 C compiler
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service