]> diplodocus.org Git - nmh/blobdiff - sbr/read_switch.c
Print port number in the connection error message
[nmh] / sbr / read_switch.c
index 8553001aba64a72d2d53c56745b39cd9fa4bda0b..1c3e851e4b5a08a218b76451c8d1fc2d0144b2ac 100644 (file)
@@ -1,13 +1,13 @@
-
-/*
- * read_switch.c -- prompt the user for an answer from the list
+/* read_switch.c -- prompt the user for an answer from the list
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information.
  */
 
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information.
  */
 
-#include <h/mh.h>
+#include "h/mh.h"
+#include "read_switch.h"
+#include "smatch.h"
 
 
 int
 
 
 int
@@ -19,7 +19,7 @@ read_switch (const char *prompt, const struct swit *ansp)
     char ansbuf[BUFSIZ];
 
     for (;;) {
     char ansbuf[BUFSIZ];
 
     for (;;) {
-       printf ("%s", prompt);
+       fputs(prompt, stdout);
        fflush (stdout);
        cp = ansbuf;
        while ((i = getchar ()) != '\n') {
        fflush (stdout);
        cp = ansbuf;
        while ((i = getchar ()) != '\n') {