prompts.h

Prompt block management
Prompt (or message) blocks are effectively configuration files. In their source form, they contain hierarchies of options or messages that are output to the user. In their compiled form, they are reduced to key-value pairs. This header file allows you to read these key-value pairs and act on them.

Keys aren't really keys, they're integer indices into the file. However, the prompt block indexer is nice enough to make a header file with definitions for each of those numeric indices. The symbolic names it chooses are the same as the symbolic names of the options themselves.

The low-level, compiled prompt block format is bound to change soon, so I won't go into much detail just yet.

By the way, the name `prompt block' originates from the Major BBS. Even on Major, it was somewhat inaccurate, as prompt blocks didn't just contain prompts.

Original banner, legalese and change history follow.


 *****************************************************************************
 **                                                                         **
 **  FILE:     prompts.h                                                    **
 **  AUTHORS:  Alexios                                                      **
 **  REVISION: A, June 94                                                   **
 **  PURPOSE:  Interface to prompts.c                                       **
 **            files.                                                       **
 **  NOTES:                                                                 **
 **  LEGALESE:                                                              **
 **                                                                         **
 **  This program is free software; you  can redistribute it and/or modify  **
 **  it under the terms of the GNU  General Public License as published by  **
 **  the Free Software Foundation; either version 2 of the License, or (at  **
 **  your option) any later version.                                        **
 **                                                                         **
 **  This program is distributed  in the hope  that it will be useful, but  **
 **  WITHOUT    ANY WARRANTY;   without  even  the    implied warranty  of  **
 **  MERCHANTABILITY or  FITNESS FOR  A PARTICULAR  PURPOSE.   See the GNU  **
 **  General Public License for more details.                               **
 **                                                                         **
 **  You  should have received a copy   of the GNU  General Public License  **
 **  along with    this program;  if   not, write  to  the   Free Software  **
 **  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.              **
 **                                                                         **
 *****************************************************************************


 *
 * $Id: prompts.h,v 1.3 2001/04/22 14:49:04 alexios Exp $
 *
 * $Log: prompts.h,v $
 * Revision 1.3  2001/04/22 14:49:04  alexios
 * Merged in leftover 0.99.2 changes and additional bug fixes.
 *
 * Revision 0.5  1998/12/27 15:19:19  alexios
 * Added the message block magic number.
 *
 * Revision 0.4  1997/11/06 20:03:39  alexios
 * Added GPL legalese to the top of this file.
 *
 * Revision 0.3  1997/11/05 10:52:05  alexios
 * Removed definitions of xlgetmsg() and xlgetmsglang(), since
 * emud now performs all translations on the fly.
 *
 * Revision 0.2  1997/09/01 10:25:46  alexios
 * Added macros to call getmsglang() and getmsg() and translate
 * the returned string according to the currently set
 * xlation_table.
 *
 * Revision 0.1  1997/08/26 15:48:53  alexios
 * First registered revision. Adequate.
 *
 *
 *


o promptblock
A prompt block descriptor.
o promptblock_t
Proper way to define a prompt block.
o msg_cur
The currently active block
o msg_last
The `other' block
o msg_sys
The system block
o msg_langnames
Names of all the languages supported
o msg_numlangs
The number of defined languages.
o msg_init
Initialise prompt subsystem.
o msg_open
Open a prompt block.
o msg_set
Set the current prompt block.
o msg_reset
Return to the last prompt block used.
o msg_getl
Access a prompt by index and language.
o msg_getl_bot
Low level function to access a prompt by ID and language.
o msg_get
Access a prompt by index.
o msg_getunitl
Get the name of a unit.
o msg_getunit
Get the name of a unit in the current language.
o msg_close
Close a prompt block
o msg_long
Parse a long int in a prompt.
o msg_hex
Parse a base-16 unsigned int in a prompt.
o msg_int
Parse an int in a prompt.
o msg_bool
Parse a yes/no configuration prompt.
o msg_char
Parse a single-character configuration prompt.
o msg_string
Copy a configuration prompt to a string.
o msg_token
Extract a token from a configuration prompt.
o msg_setlanguage
Set the active language.
Author:
Alexios

Alphabetic index



This page was generated with the help of DOC++.