/* message.c for !ResCreate  */


#include "main.h"

MessagesFD mbl;
static char mess[512];  /* should be big enough */



/*
 * Lookup tag in message file, returning pointer to the string - this is a
 *  read-only area.
 *
 * If there's an error, just return a pointer to the original tag.
 */

char *message_lookup (char *tag)

{
    char *res = NULL;
    int len;
             
    if (_swix (MessageTrans_Lookup, I0|I1|I2|I3|I4|I5|I6|I7|O2|O3,
                      &mbl, tag, mess, 511, 0, 0, 0, 0, &res, &len) != NULL)
        return tag;

    res[len] = 0;
    return res;
}
