Import of pkgsrc-2015Q1

This commit is contained in:
2015-04-22 14:34:26 +02:00
committed by Lionel Sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870550 additions and 795435 deletions

View File

@@ -0,0 +1,42 @@
$NetBSD: patch-vslib_vstring.cpp,v 1.1 2014/06/29 19:43:54 dholland Exp $
Sprinkle const to make more modern C++ compilers happier.
--- vslib/vstring.cpp~ 2002-05-24 16:55:36.000000000 +0000
+++ vslib/vstring.cpp
@@ -412,7 +412,7 @@
{
int sl = strlen( target );
if (startpos >= sl) return -1;
- char* pc = strchr( target + startpos, s );
+ const char* pc = strchr( target + startpos, s );
if( ! pc )
return -1;
return pc - target;
@@ -420,7 +420,7 @@
int str_rfind( const char* target, const char c ) // returns last zero-based position of char, or -1 if not found
{
- char* pc = strrchr( target, c );
+ const char* pc = strrchr( target, c );
if( ! pc )
return -1;
return pc - target;
@@ -430,7 +430,7 @@
{
int sl = strlen( target );
if (startpos >= sl) return -1;
- char* pc = strstr( target + startpos, s );
+ const char* pc = strstr( target + startpos, s );
if( ! pc )
return -1;
return pc - target;
@@ -707,7 +707,7 @@
int sl = strlen( target );
for( z = 0; z < sl; z++ )
{
- char *pc = strchr( from, target[z] );
+ const char *pc = strchr( from, target[z] );
if (pc) target[z] = to[ pc - from ];
}
return target;