openbsd-ports/graphics/xv/patches/patch-ab
1998-03-21 05:38:13 +00:00

81 lines
2.4 KiB
Plaintext

*** vdcomp.c.orig Thu Dec 22 14:34:47 1994
--- vdcomp.c Sat Jan 31 22:54:41 1998
***************
*** 108,114 ****
!defined(bsd43) && \
!defined(aux) && \
!defined(__bsdi__) && \
! !defined(sequent)
# if defined(hp300) || defined(hp800) || defined(NeXT)
# include <sys/malloc.h> /* it's in 'sys' on HPs and NeXT */
--- 108,116 ----
!defined(bsd43) && \
!defined(aux) && \
!defined(__bsdi__) && \
! !defined(sequent) && \
! !defined(__FreeBSD__) && \
! !defined(__OpenBSD__)
# if defined(hp300) || defined(hp800) || defined(NeXT)
# include <sys/malloc.h> /* it's in 'sys' on HPs and NeXT */
***************
*** 429,438 ****
{
short shortint;
typedef long off_t;
if (inname[0] == ' ') {
printf("\nEnter name of file to be decompressed: ");
! gets (inname);
}
if (host == 1 | host == 2) {
--- 431,443 ----
{
short shortint;
typedef long off_t;
+ char *s;
if (inname[0] == ' ') {
printf("\nEnter name of file to be decompressed: ");
! fgets (inname, sizeof(inname), stdin);
! if ((s = strchr(inname, '\n')) != NULL)
! *s = '\0';
}
if (host == 1 | host == 2) {
***************
*** 474,486 ****
printf("\n 3. VICAR format.");
printf("\n 4. Unlabelled binary array.\n");
printf("\n Enter format number:");
! gets(inname);
output_format = atoi(inname);
} while (output_format < 1 || output_format > 4);
if (outname[0] == ' ') {
printf("\nEnter name of uncompressed output file: ");
! gets (outname);
}
return(host);
--- 479,495 ----
printf("\n 3. VICAR format.");
printf("\n 4. Unlabelled binary array.\n");
printf("\n Enter format number:");
! fgets (inname, sizeof(inname), stdin);
! if ((s = strchr(inname, '\n')) != NULL)
! *s = '\0';
output_format = atoi(inname);
} while (output_format < 1 || output_format > 4);
if (outname[0] == ' ') {
printf("\nEnter name of uncompressed output file: ");
! fgets (outname, sizeof(outname), stdin);
! if ((s = strchr(outname, '\n')) != NULL)
! *s = '\0';
}
return(host);