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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
diff -ru quote.c~ quote.c
--- quote.c~ Sun Jan 2 20:01:43 2005
+++ quote.c Sun Jan 2 20:04:39 2005
@@ -9,7 +9,7 @@
{
const char *source = from;
char *target = to;
- unsigned int remaining = length;
+ unsigned size_t remaining = length;
while (remaining > 0)
{
@@ -146,9 +146,9 @@
unsigned char *
PQunescapeBytea2(const unsigned char *strtext, size_t *retbuflen)
{
- size_t strtextlen, buflen;
+ size_t strtextlen, buflen, i, j;
unsigned char *buffer, *tmpbuf;
- int i, j, byte;
+ int byte;
if (strtext == NULL) {
return NULL;
@@ -393,7 +393,7 @@
{
char *result;
char *dest;
- int max_len = 0, i;
+ size_t max_len = 0, i;
/* We are going to retun a quote_bytea() for backwards compat but
we warn first */
@@ -483,7 +483,7 @@
void
dequote_char(string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
/* TODO: chop_blanks if requested */
*retlen = strlen(string);
@@ -493,7 +493,7 @@
void
dequote_varchar (string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
*retlen = strlen(string);
}
@@ -503,7 +503,7 @@
void
dequote_bytea(string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
char *s, *p;
int c1,c2,c3;
@@ -542,7 +542,7 @@
void
dequote_sql_binary (string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
/* We are going to retun a dequote_bytea(), JIC */
warn("Use of SQL_BINARY invalid in dequote()");
@@ -556,7 +556,7 @@
void
dequote_bool (string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
switch(*string){
case 'f': *string = '0'; break;
|