summaryrefslogtreecommitdiff
path: root/textproc/helpdeco/patches/patch-ab
blob: 2bc747c736c3d3f5ee0349470984572d0db17c53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-ab,v 1.2 2004/09/22 17:00:33 ben Exp $

--- zapres.c.orig	Fri Sep 13 20:52:50 1996
+++ zapres.c
@@ -17,8 +17,10 @@ commercially. No fees may be charged on 
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <dir.h>
+#include <sys/types.h>
+#include <sys/dir.h>
 #include <string.h>
+#include "compat.h"
 
 int backup(FILE *f,char *oldname)
 {
@@ -31,7 +33,7 @@ int backup(FILE *f,char *oldname)
     int result=0;
 
     _splitpath(oldname,drive,dir,fname,ext);
-    _makepath(path,drive,dir,fname,".BAK");
+    _makepath(path,drive,dir,fname,".bak");
     bak=fopen(path,"wb");
     if(bak)
     {
@@ -102,7 +104,7 @@ int main(int argc,char *argv[])
     else for(i=1;i<b;i++)
     {
 	_splitpath(argv[i],drive,dir,fname,ext);
-	if(!ext[0]) strcpy(ext,".BMP");
+	if(!ext[0]) strcpy(ext,".bmp");
 	_makepath(path,drive,dir,fname,ext);
 	f=fopen(path,"r+b");
 	if(f)