]> andersk Git - moira.git/blobdiff - clients/userreg/display.c
Replaced all the EQUEL with ESQL. A few lines may not be proper
[moira.git] / clients / userreg / display.c
index cf65a86fe47610cc72c63cf9991fef5ee9a754ec..7a2147f674076108b12cfde65e4356d2d7e57004 100644 (file)
@@ -20,12 +20,12 @@ static char *rcsid_display_c = "$Header$";
 #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
@@ -337,22 +337,23 @@ display_text_line (line)
 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) {
@@ -361,11 +362,14 @@ char *filename;
   }
 
   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);
 }
 
This page took 0.028849 seconds and 4 git commands to generate.