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
35
36
37
38
39
40
41
42
43
44
|
$NetBSD: patch-an,v 1.1 2008/09/05 05:27:31 dholland Exp $
--- tool/ifdef/get.c~ 2005-05-06 04:49:09.000000000 -0400
+++ tool/ifdef/get.c 2008-09-05 00:43:19.000000000 -0400
@@ -2575,7 +2575,7 @@ struct G__param *libp;
{
char temp[ONELINE],temp1[ONELINE];
FILE *fopen();
- int fp;
+ long fp;
if(strcmp(funcname,"printf")==0) {
/* para[0]:description, para[1~paran-1]: */
@@ -2596,18 +2596,18 @@ struct G__param *libp;
if(strcmp(funcname,"fclose")==0) {
/* para[0]:filepointer */
- sprintf(result7,"%d",fclose((FILE*)atoi(libp->para[0])));
+ sprintf(result7,"%d",fclose((FILE*)atol(libp->para[0])));
return(1);
}
if(strcmp(funcname,"fgets")==0) {
/* parameter[0]:varname, para[1]:nchar,para[2]:filepointer */
- fp=atoi(libp->para[2]);
+ fp=atol(libp->para[2]);
sprintf(result7,"%ld"
,(long)fgets(temp,atoi(libp->para[1]),(FILE*)fp));
G__letvariable(libp->parameter[0]
,G__add_quotation(temp),&G__global,G__local);
- sprintf(temp,"%d",fp);
+ sprintf(temp,"%ld",fp);
G__letvariable(libp->parameter[1],temp,&G__global,G__local);
return(1);
}
@@ -2615,7 +2615,7 @@ struct G__param *libp;
if(strcmp(funcname,"fprintf")==0) {
/* parameter[0]:pointer ,parameter[1]:description, para[2~paran-1]: */
G__charformatter(result7,1,libp);
- fprintf((FILE*)atoi(libp->para[0]),"%s",result7);
+ fprintf((FILE*)atol(libp->para[0]),"%s",result7);
strcpy(result7,"");
return(1);
}
|