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"
23 static char *mrcl_message = NULL;
25 void mrcl_set_message(char *fmt, ...)
34 for (args = 0, p = strstr(fmt, "%s"); p; p = strstr(p + 2, "%s"))
37 /* Measure the output string. */
38 len = strlen(fmt) + 1;
42 p = va_arg(ap, char *);
47 /* Malloc and print */
48 mrcl_message = malloc(len);
52 vsprintf(mrcl_message, fmt, ap);
57 char *mrcl_get_message(void)
62 void mrcl_clear_message(void)
68 void mrcl_com_err(char *whoami)
71 com_err(whoami, 0, "%s", mrcl_message);