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
45
46
47
48
49
|
$NetBSD: patch-ag,v 1.1 2001/10/20 18:52:38 reinoud Exp $
--- ../sqlite/tool/lemon.c.orig Sun Sep 16 01:07:32 2001
+++ ../sqlite/tool/lemon.c
@@ -1305,7 +1305,7 @@
/*
** Return a pointer to the next structure in the linked list.
*/
-#define NEXT(A) (*(char**)(((int)A)+offset))
+#define NEXT(A) (*(char**)(((char *)A)+offset))
/*
** Inputs:
@@ -1383,7 +1383,7 @@
char *ep;
char *set[LISTSIZE];
int i;
- offset = (int)next - (int)list;
+ offset = (char *)next - (char *)list;
for(i=0; i<LISTSIZE; i++) set[i] = 0;
while( list ){
ep = list;
@@ -1531,7 +1531,7 @@
if( *end ){
if( err ){
fprintf(err,"%sillegal character in floating-point argument.\n",emsg);
- errline(i,((int)end)-(int)argv[i],err);
+ errline(i, (int) (end-argv[i]),err);
}
errcnt++;
}
@@ -1542,7 +1542,7 @@
if( *end ){
if( err ){
fprintf(err,"%sillegal character in integer argument.\n",emsg);
- errline(i,((int)end)-(int)argv[i],err);
+ errline(i, (int) (end-argv[i]),err);
}
errcnt++;
}
@@ -2625,7 +2625,7 @@
cp = strrchr(lemp->filename,'.');
if( cp ){
- sprintf(buf,"%.*s.lt",(int)cp-(int)lemp->filename,lemp->filename);
+ sprintf(buf,"%.*s.lt",cp-lemp->filename,lemp->filename);
}else{
sprintf(buf,"%s.lt",lemp->filename);
}
|