5 * Copyright (C) 1999 by the Massachusetts Institute of Technology
6 * For copying and distribution information, please see the file
10 #include <mit-copyright.h>
13 #include "mrclient-internal.h"
24 static char *mrcl_message = NULL;
26 void mrcl_set_message(char *fmt, ...)
35 for (args = 0, p = strstr(fmt, "%s"); p; p = strstr(p + 2, "%s"))
38 /* Measure the output string. */
39 len = strlen(fmt) + 1;
43 p = va_arg(ap, char *);
48 /* Malloc and print */
49 mrcl_message = malloc(len);
53 vsprintf(mrcl_message, fmt, ap);
58 char *mrcl_get_message(void)
63 void mrcl_clear_message(void)
69 void mrcl_com_err(char *whoami)
72 com_err(whoami, 0, "%s", mrcl_message);