diff --git a/refdoc/xml.txt b/refdoc/xml.txt index 38e3c317893414ea0f490763627314cbff07cd92..4c5b500c8ec2ba4f72676441043379aa05a572d6 100644 --- a/refdoc/xml.txt +++ b/refdoc/xml.txt @@ -324,11 +324,12 @@ int <int><min>0</min><max>MAX</max></int> string - A string type can have a numerical width value. + A string type can have a numerical minwidth and/or maxwidth value. + The values can be numbers or identifiers: - string(8) + string(0..255) - <string><width>8</width></string> + <string><minwidth>0</minwidth><maxwidth>255</maxwidth></string> mapping The types of the indices and values are given: diff --git a/src/builtin_functions.c b/src/builtin_functions.c index 539d9ee1f71c875359131b0813afa3d41e7feea9..e89ee297a00c82e3f01fd68cd57491e48073f46e 100644 --- a/src/builtin_functions.c +++ b/src/builtin_functions.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: builtin_functions.c,v 1.638 2007/05/26 18:38:39 mast Exp $ +|| $Id: builtin_functions.c,v 1.639 2007/06/02 04:11:30 mbaehr Exp $ */ #include "global.h" @@ -1471,7 +1471,7 @@ static int generate_zero_type(node *n) * Some wide-strings related functions */ -/*! @decl string(8) string_to_unicode(string s) +/*! @decl string(0..255) string_to_unicode(string s) *! *! Converts a string into an UTF16 compliant byte-stream. *! @@ -1609,7 +1609,7 @@ PMOD_EXPORT void f_string_to_unicode(INT32 args) push_string(out); } -/*! @decl string unicode_to_string(string(8) s) +/*! @decl string unicode_to_string(string(0..255) s) *! *! Converts an UTF16 byte-stream into a string. *! @@ -1768,8 +1768,8 @@ PMOD_EXPORT void f_unicode_to_string(INT32 args) push_string(out); } -/*! @decl string(8) string_to_utf8(string s) - *! @decl string(8) string_to_utf8(string s, int extended) +/*! @decl string(0..255) string_to_utf8(string s) + *! @decl string(0..255) string_to_utf8(string s, int extended) *! *! Converts a string into an UTF-8 compliant byte-stream. *! @@ -1902,8 +1902,8 @@ PMOD_EXPORT void f_string_to_utf8(INT32 args) push_string(out); } -/*! @decl string utf8_to_string(string(8) s) - *! @decl string utf8_to_string(string(8) s, int extended) +/*! @decl string utf8_to_string(string(0..255) s) + *! @decl string utf8_to_string(string(0..255) s, int extended) *! *! Converts an UTF-8 byte-stream into a string. *! @@ -2206,7 +2206,7 @@ PMOD_EXPORT void f_utf8_to_string(INT32 args) push_string(out); } -/*! @decl string(8) __parse_pike_type(string(8) t) +/*! @decl string(0..255) __parse_pike_type(string(0..255) t) */ static void f_parse_pike_type( INT32 args ) { @@ -9191,19 +9191,19 @@ void init_builtin_efuns(void) /* Some Wide-string stuff */ -/* function(string:string(8)) */ +/* function(string:string(0..255)) */ ADD_EFUN("string_to_unicode", f_string_to_unicode, tFunc(tStr,tStr8), OPT_TRY_OPTIMIZE); -/* function(string(8):string) */ +/* function(string(0..255):string) */ ADD_EFUN("unicode_to_string", f_unicode_to_string, tFunc(tStr8,tStr), OPT_TRY_OPTIMIZE); -/* function(string,int|void:string(8)) */ +/* function(string,int|void:string(0..255)) */ ADD_EFUN("string_to_utf8", f_string_to_utf8, tFunc(tStr tOr(tInt,tVoid),tStr8), OPT_TRY_OPTIMIZE); -/* function(string(8),int|void:string) */ +/* function(string(0..255),int|void:string) */ ADD_EFUN("utf8_to_string", f_utf8_to_string, tFunc(tStr8 tOr(tInt,tVoid),tStr), OPT_TRY_OPTIMIZE); diff --git a/src/modules/spider/spider.c b/src/modules/spider/spider.c index dd2c3451f159b0965058178503ac4a8d53d2d16f..b79793a7e3eecf1890e4945351f2c686621cd460 100644 --- a/src/modules/spider/spider.c +++ b/src/modules/spider/spider.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: spider.c,v 1.132 2005/11/12 22:34:52 nilsson Exp $ +|| $Id: spider.c,v 1.133 2007/06/02 04:11:30 mbaehr Exp $ */ #include "global.h" @@ -127,7 +127,7 @@ void f_parse_accessed_database(INT32 args) SIMPLE_TOO_FEW_ARGS_ERROR("parse_accessed_database",1); if ((sp[-args].type != T_STRING) || (sp[-args].u.string->size_shift)) { - Pike_error("Bad argument 1 to parse_accessed_database(string(8)).\n"); + Pike_error("Bad argument 1 to parse_accessed_database(string(0..255)).\n"); } /* Pop all but the first argument */