summaryrefslogtreecommitdiff
path: root/src/lib9
diff options
context:
space:
mode:
authorKen Thompson <ken@golang.org>2008-07-07 15:00:12 -0700
committerKen Thompson <ken@golang.org>2008-07-07 15:00:12 -0700
commitb0ccba63152e1d808eba5541401e24fb46f1ac61 (patch)
tree0295be480da241d63a69ef7b9064671cefae368f /src/lib9
parente67ffa4377582dc4183689a176560075b930a136 (diff)
downloadgo-b0ccba63152e1d808eba5541401e24fb46f1ac61.tar.gz
remove incorrect (!) consts
-r SVN=126198
Diffstat (limited to 'src/lib9')
-rw-r--r--src/lib9/utf/utf.h12
-rw-r--r--src/lib9/utf/utfrrune.c4
-rw-r--r--src/lib9/utf/utfrune.c6
3 files changed, 11 insertions, 11 deletions
diff --git a/src/lib9/utf/utf.h b/src/lib9/utf/utf.h
index 22d418436..ff5193ad4 100644
--- a/src/lib9/utf/utf.h
+++ b/src/lib9/utf/utf.h
@@ -68,7 +68,7 @@ int chartorune(Rune* r, const char* s);
// n bytes of s. If the UTF sequence is incomplete within n bytes,
// charntorune will set *r to Runeerror and return 0. If it is complete
// but not in UTF format, it will set *r to Runeerror and return 1.
-//
+//
// Added 2004-09-24 by Wei-Hwa Huang
int charntorune(Rune* r, const char* s, int n);
@@ -123,7 +123,7 @@ int utfnlen(const char* s, long n);
// byte terminating a string is considered to be part of the string s.
// (cf. strchr)
-const char* utfrune(const char* s, Rune r);
+/*const*/ char* utfrune(const char* s, Rune r);
// utfrrune returns a pointer to the last occurrence of rune r in the
@@ -131,7 +131,7 @@ const char* utfrune(const char* s, Rune r);
// byte terminating a string is considered to be part of the string s.
// (cf. strrchr)
-const char* utfrrune(const char* s, Rune r);
+/*const*/ char* utfrrune(const char* s, Rune r);
// utfutf returns a pointer to the first occurrence of the UTF string
@@ -152,7 +152,7 @@ char* utfecpy(char *s1, char *es1, const char *s2);
// These functions are rune-string analogues of the corresponding
// functions in strcat (3).
-//
+//
// These routines first appeared in Plan 9.
// SEE ALSO
// memmove (3)
@@ -205,8 +205,8 @@ Rune totitlerune(Rune r);
// isupperrune tests for upper case characters, including Unicode
// upper case letters and targets of the toupper mapping. islowerrune
-// and istitlerune are defined analogously.
-
+// and istitlerune are defined analogously.
+
int isupperrune(Rune r);
int islowerrune(Rune r);
int istitlerune(Rune r);
diff --git a/src/lib9/utf/utfrrune.c b/src/lib9/utf/utfrrune.c
index c0b89f5c6..95d2a9d8a 100644
--- a/src/lib9/utf/utfrrune.c
+++ b/src/lib9/utf/utfrrune.c
@@ -16,7 +16,7 @@
#include "utf.h"
#include "utfdef.h"
-const
+/* const - removed for go code */
char*
utfrrune(const char *s, Rune c)
{
@@ -32,7 +32,7 @@ utfrrune(const char *s, Rune c)
c1 = *(uchar*)s;
if(c1 < Runeself) { /* one byte rune */
if(c1 == 0)
- return s1;
+ return (char*)s1;
if(c1 == c)
s1 = s;
s++;
diff --git a/src/lib9/utf/utfrune.c b/src/lib9/utf/utfrune.c
index 913783f37..b4017d26c 100644
--- a/src/lib9/utf/utfrune.c
+++ b/src/lib9/utf/utfrune.c
@@ -16,7 +16,7 @@
#include "utf.h"
#include "utfdef.h"
-const
+/* const - removed for go code */
char*
utfrune(const char *s, Rune c)
{
@@ -33,13 +33,13 @@ utfrune(const char *s, Rune c)
if(c1 == 0)
return 0;
if(c1 == c)
- return s;
+ return (char*)s;
s++;
continue;
}
n = chartorune(&r, s);
if(r == c)
- return s;
+ return (char*)s;
s += n;
}
return 0;