#include "userreg.h"
#define DESC_WIDTH 18
-#define HEADER "*** Project Athena User Registration ***"
+#define HEADER "*** Athena User Account Registration ***"
#if defined(vax) || defined(mips)
#define HELP " Press the key above RETURN to delete a character. Press Ctrl-C to start over."
#endif
#ifndef HELP
-#define HELP " Press backspace to delete a character. Press Ctrl-C to start over."
+#define HELP " Press backspace to delete a character. Press Ctrl-C to start over."
#endif
#define BORDER_CHAR '-'
#define MIN_COLS 80
char *line;
{
if (line) {
- waddstr (displayw, line);
- waddch (displayw, '\n');
- wrefresh (displayw);
- }
- else {
- werase (displayw);
+ waddstr (displayw, line);
+ waddch (displayw, '\n');
+ } else {
+ werase (displayw);
}
wrefresh (displayw);
}
-/* Display_text displays a canned message from a file */
-display_text (filename)
+/* Display_text displays a canned message from a file. The string
+ * will get imbedded in any %s's in the text.
+ */
+display_text(filename, string)
char *filename;
+char *string;
{
FILE * fp;
- char buf[100];
+ char buf[100], buf1[110];
werase (displayw);
if ((fp = fopen (filename, "r")) == NULL) {
}
while (fgets (buf, 100, fp)) {
- /* get rid of the newline */
- buf[strlen (buf) - 1] = 0;
- display_text_line (buf);
+ /* get rid of the newline */
+ buf[strlen (buf) - 1] = 0;
+ sprintf(buf1, buf, string);
+ waddstr(displayw, buf1);
+ waddch(displayw, '\n');
}
+ wrefresh(displayw);
fclose (fp);
}