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
|
diff -Nurp wvstreams-4.5.orig/ipstreams/wvaddr.cc wvstreams-4.5/ipstreams/wvaddr.cc
--- wvstreams-4.5.orig/ipstreams/wvaddr.cc 2008-07-14 21:11:35.000000000 +0200
+++ wvstreams-4.5/ipstreams/wvaddr.cc 2009-06-19 16:39:37.757382441 +0200
@@ -538,7 +538,7 @@ WvIPNet::WvIPNet(const WvIPNet &_net)
// If the netmask is not specified, it will default to all 1's.
void WvIPNet::string_init(const char string[])
{
- char *maskptr;
+ const char *maskptr;
int bits;
uint32_t imask;
diff -Nurp wvstreams-4.5.orig/utils/strutils.cc wvstreams-4.5/utils/strutils.cc
--- wvstreams-4.5.orig/utils/strutils.cc 2008-10-21 21:39:21.000000000 +0200
+++ wvstreams-4.5/utils/strutils.cc 2009-06-19 16:36:48.959741828 +0200
@@ -315,7 +315,7 @@ WvString url_decode(WvStringParm str, bo
const char *iptr;
char *optr;
- char *idx1, *idx2;
+ const char *idx1, *idx2;
static const char hex[] = "0123456789ABCDEF";
WvString in, intmp(str), out;
@@ -967,7 +967,7 @@ WvString afterstr(WvStringParm line, WvS
if (!line || !a)
return WvString::null;
- char *loc = strstr(line, a);
+ const char *loc = strstr(line, a);
if (loc == 0)
return "";
@@ -984,8 +984,8 @@ WvString beforestr(WvStringParm line, Wv
return WvString::null;
WvString ret = line;
- ret.unique();
- char *loc = strstr(ret, a);
+ ret.unique();
+ char *loc = strstr(ret.edit(), a);
if (loc == 0)
return line;
diff -Nurp wvstreams-4.5.orig/utils/verstring.cc wvstreams-4.5/utils/verstring.cc
--- wvstreams-4.5.orig/utils/verstring.cc 2008-07-14 21:11:35.000000000 +0200
+++ wvstreams-4.5/utils/verstring.cc 2009-06-19 16:37:02.021698602 +0200
@@ -147,7 +147,7 @@ bool is_new_ver(unsigned int ver)
bool is_new_verstr(const char *str)
{
- char *p = strchr(str, '.');
+ const char *p = strchr(str, '.');
if (p && strchr(p+1, '.'))
return true;
|