/* * msgs.h * * Handling message files * * © 1994-1998 Straylight */ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Steel library. * * Steel 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, or (at your option) * any later version. * * Steel 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 Steel. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __msgs_h #define __msgs_h /*----- Implementation limits ---------------------------------------------* * * These limits are not enforced. Woe betides anyone who oversteps them. */ #define msgs_TAG_MAX 20 #define msgs_MSG_MAX 1024 #define msgs_VARIANT_MAX 10 /*----- Functions ---------------------------------------------------------*/ /* * void msgs_init(void) * * Use * Loads the messages file `Messages' using msgs_readfile. */ void msgs_init(void); /* * void msgs_readfile(char *name) * * Use * Merges the file named into the current messages. Duplicates are likely * to cause problems, so try to avoid them. The file is found using the * res_findname mechanism. * * Parameters * char *name == pointer to the name of the messages file */ void msgs_readfile(char *name); /* * char *msgs_lookup(char *tag) * * Use * Looks up a message given its tag. The tag may optionally be followed by * a default string, which is returned if the message is not found. If no * default is supplied, and the message tag is not found, the tag is * returned. * * Parameters * char *tag == pointer to tag string to find */ char *msgs_lookup(char *tag); /* * void msgs_delete(void) * * Use * Removes all messages from memory. */ void msgs_delete(void); #endif