58 lines
2.0 KiB
Plaintext
58 lines
2.0 KiB
Plaintext
$OpenBSD: patch-musicout_c,v 1.2 2010/05/19 16:18:28 espie Exp $
|
|
--- musicout.c.orig Wed Jan 5 05:39:27 1994
|
|
+++ musicout.c Wed May 19 18:17:37 2010
|
|
@@ -58,6 +58,8 @@ musicout.c
|
|
#include "common.h"
|
|
#include "decoder.h"
|
|
|
|
+#include <stdlib.h>
|
|
+
|
|
/********************************************************************
|
|
/*
|
|
/* This part contains the MPEG I decoder for Layers I & II.
|
|
@@ -78,6 +80,8 @@ musicout.c
|
|
/*
|
|
/*********************************************************************/
|
|
|
|
+static void usage();
|
|
+
|
|
/* Global variable definitions for "musicout.c" */
|
|
|
|
char *programName;
|
|
@@ -139,7 +143,7 @@ typedef double VE[2][HAN_SIZE];
|
|
if(argc==1) { /* no command line args -> interact */
|
|
do {
|
|
printf ("Enter encoded file name <required>: ");
|
|
- gets (encoded_file_name);
|
|
+ fgets (encoded_file_name, MAX_NAME_SIZE-1, stdin);
|
|
if (encoded_file_name[0] == NULL_CHAR)
|
|
printf ("Encoded file name is required. \n");
|
|
} while (encoded_file_name[0] == NULL_CHAR);
|
|
@@ -151,7 +155,7 @@ typedef double VE[2][HAN_SIZE];
|
|
printf ("Enter MPEG decoded file name <%s%s>: ", encoded_file_name,
|
|
DFLT_OPEXT);
|
|
#endif
|
|
- gets (decoded_file_name);
|
|
+ fgets (decoded_file_name, MAX_NAME_SIZE-1,stdin);
|
|
if (decoded_file_name[0] == NULL_CHAR) {
|
|
#ifdef MS_DOS
|
|
/* replace old extension with new one, 92-08-19 shn */
|
|
@@ -164,7 +168,7 @@ typedef double VE[2][HAN_SIZE];
|
|
|
|
printf(
|
|
"Do you wish to write an AIFF compatible sound file ? (y/<n>) : ");
|
|
- gets(t);
|
|
+ fgets(t, 49, stdin);
|
|
if (*t == 'y' || *t == 'Y') need_aiff = TRUE;
|
|
else need_aiff = FALSE;
|
|
if (need_aiff)
|
|
@@ -173,7 +177,7 @@ typedef double VE[2][HAN_SIZE];
|
|
|
|
printf(
|
|
"Do you wish to exit (last chance before decoding) ? (y/<n>) : ");
|
|
- gets(t);
|
|
+ fgets(t, 49, stdin);
|
|
if (*t == 'y' || *t == 'Y') exit(0);
|
|
}
|
|
else { /* interpret CL Args */
|