--- src/bin/sconvert.c.~1~	Mon Sep 14 18:30:41 1992
+++ src/bin/sconvert.c	Tue Jun  2 22:06:32 1998
@@ -42,6 +42,7 @@
 {
     char *sf, *af;
     char buf[BSIZE_SP];
+    char *p;
     char t, f;
     struct plot *pl;
     int i;
@@ -80,19 +81,47 @@
 
         case 1: printf("Input file: ");
             (void) fflush(stdout);
-            (void) gets(buf);
+	    if ( fgets(buf, sizeof buf, stdin) == 0 ) {
+	        buf[ 0 ] = 0;
+	    } else {
+		p = strchr( buf, '\n' );
+		if ( p ) {
+		    *p = 0;
+		}
+	    }
             sf = copy(buf);
             printf("Input type: ");
             (void) fflush(stdout);
-            (void) gets(buf);
+	    if ( fgets(buf, sizeof buf, stdin) == 0 ) {
+	        buf[ 0 ] = 0;
+	    } else {
+		p = strchr( buf, '\n' );
+		if ( p ) {
+		    *p = 0;
+		}
+	    }
             f = buf[0];
             printf("Output file: ");
             (void) fflush(stdout);
-            (void) gets(buf);
+	    if ( fgets(buf, sizeof buf, stdin) == 0 ) {
+	        buf[ 0 ] = 0;
+	    } else {
+		p = strchr( buf, '\n' );
+		if ( p ) {
+		    *p = 0;
+		}
+	    }
             af = copy(buf);
             printf("Output type: ");
             (void) fflush(stdout);
-            (void) gets(buf);
+	    if ( fgets(buf, sizeof buf, stdin) == 0 ) {
+	        buf[ 0 ] = 0;
+	    } else {
+		p = strchr( buf, '\n' );
+		if ( p ) {
+		    *p = 0;
+		}
+	    }
             t = buf[0];
             break;
         default:
