1
0
mirror of https://github.com/gryf/gryf-overlay.git synced 2025-12-22 05:47:59 +01:00

initial import

This commit is contained in:
root
2010-02-09 21:25:29 +01:00
commit b2719dc011
1080 changed files with 41656 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
MD5 674bf4d9ba231c331938d8e394b05507 ruby-locale-0.2.tar.gz 1275
RMD160 5ce60fec6236cfe3f2e6b03dbc88f49ed77158de ruby-locale-0.2.tar.gz 1275
SHA256 5c82d0bf69d0b9d54d42e23d91da4babc0891eb393d54449eefc0280a121850e ruby-locale-0.2.tar.gz 1275

View File

@@ -0,0 +1,27 @@
--- ruby-locale-0.2/rblocale.c 2000-04-14 06:20:58.000000000 +0200
+++ ruby-locale-0.2_p/rblocale.c 2008-01-31 21:47:47.000000000 +0100
@@ -31,6 +31,16 @@
return ret == NULL ? Qnil : rb_str_new2(ret);
}
+VALUE
+locale_get( self, category )
+ VALUE self, category;
+{
+ char *ret;
+
+ ret = setlocale(NUM2INT(category), NULL );
+ return ret == NULL ? Qnil : rb_str_new2(ret);
+}
+
void Init_locale()
{
char *curr_locale;
@@ -44,6 +54,7 @@
}
rb_define_module_function(mLocale, "set", locale_set, 2);
+ rb_define_module_function(mLocale, "get", locale_get, 1);
rb_define_const(mLocale, "ALL", INT2FIX(LC_ALL));
rb_define_const(mLocale, "COLLATE", INT2FIX(LC_COLLATE));