Re: cvs: php4 /ext/standard string.c
| From: | Jani Taskinen | Date: | Sun, 10 Dec 2000 16:03:01 +0000 |
| Subject: | Re: cvs: php4 /ext/standard string.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-3057@lists.php.net to get a copy of this message | ||
I didn't want to make setlocale() to use these before
asking others. I guess it should be made so that both using
setlocale("LC_ALL","fi"); and setlocale(LC_ALL, "fi");
work ? For backwards compatibility?
Or should we just change it completely and tell people to use the
constants instead of the strings?
--Jani
On Sun, 10 Dec 2000, Jani Taskinen wrote:
>sniper Sun Dec 10 07:55:34 2000 EDT
>
> Modified files:
> /php4/ext/standard string.c
> Log:
> Added constants for locale categories.
>
>Index: php4/ext/standard/string.c
>diff -u php4/ext/standard/string.c:1.168 php4/ext/standard/string.c:1.169
>--- php4/ext/standard/string.c:1.168 Thu Nov 30 17:55:31 2000
>+++ php4/ext/standard/string.c Sun Dec 10 07:55:34 2000
>@@ -18,7 +18,7 @@
> +----------------------------------------------------------------------+
> */
>
>-/* $Id: string.c,v 1.168 2000/12/01 01:55:31 fmk Exp $ */
>+/* $Id: string.c,v 1.169 2000/12/10 15:55:34 sniper Exp $ */
>
> /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
>
>@@ -52,6 +52,17 @@
> REGISTER_LONG_CONSTANT("PATHINFO_DIRNAME", PHP_PATHINFO_DIRNAME, CONST_CS |
> CONST_PERSISTENT);
> REGISTER_LONG_CONSTANT("PATHINFO_BASENAME", PHP_PATHINFO_BASENAME, CONST_CS |
> CONST_PERSISTENT);
> REGISTER_LONG_CONSTANT("PATHINFO_EXTENSION", PHP_PATHINFO_EXTENSION, CONST_CS |
> CONST_PERSISTENT);
>+
>+#ifdef HAVE_LOCALE_H
>+ REGISTER_LONG_CONSTANT("LC_CTYPE", LC_CTYPE, CONST_CS | CONST_PERSISTENT);
>+ REGISTER_LONG_CONSTANT("LC_NUMERIC", LC_NUMERIC, CONST_CS | CONST_PERSISTENT);
>+ REGISTER_LONG_CONSTANT("LC_TIME", LC_TIME, CONST_CS | CONST_PERSISTENT);
>+ REGISTER_LONG_CONSTANT("LC_COLLATE", LC_COLLATE, CONST_CS | CONST_PERSISTENT);
>+ REGISTER_LONG_CONSTANT("LC_MONETARY", LC_MONETARY, CONST_CS | CONST_PERSISTENT);
>+ REGISTER_LONG_CONSTANT("LC_MESSAGES", LC_MESSAGES, CONST_CS | CONST_PERSISTENT);
>+ REGISTER_LONG_CONSTANT("LC_ALL", LC_ALL, CONST_CS | CONST_PERSISTENT);
>+#endif
>+
> }
>
> int php_tag_find(char *tag, int len, char *set);
>
>
>
>