1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-30 21:49:25 +00:00
freebsd-ports/archivers/hpack.non-usa.only/files/patch-al
Steve Price b8eafda329 Honor PREFIX and split up patches one patch for each file.
PR:		12056
Submitted by:	Nick Hibma <nick.hibma@jrc.it>
1999-12-29 08:52:12 +00:00

26 lines
836 B
Plaintext

--- archive.c.orig Tue Jun 29 05:27:52 1993
+++ archive.c Tue Dec 28 20:01:38 1999
@@ -326,12 +326,22 @@
void getFileName( char *fileName )
{
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+ int len;
+#endif
hprintf( MESG_s_ALREADY_EXISTS_ENTER_NEW_NAME, fileName );
/* Nasty input routine - should check for illegal chars and suchlike.
Will also overflow if anyone enters more than 16K chars */
hflush( stdout );
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
hgets( ( char * ) mrglBuffer );
+#else /* gets depricated in FreeBSD */
+ fgets( mrglBuffer, MAX_PATH, stdin );
+ len = strlen(mrglBuffer);
+ if (mrglBuffer[len - 1] == '\n')
+ mrglBuffer[len - 1] = '\0';
+#endif
mrglBuffer[ MAX_PATH - 1 ] = '\0';
strcpy( fileName, ( char * ) mrglBuffer );