Author: miguel
Date: 2006-09-18 06:46:31 -0400 (Mon, 18 Sep 2006)
New Revision: 65570
Modified:
trunk/mono/eglib/TODO
trunk/mono/eglib/src/Makefile.am
trunk/mono/eglib/src/gunicode.c
Log:
More updates
Modified: trunk/mono/eglib/TODO
===================================================================
--- trunk/mono/eglib/TODO 2006-09-18 10:29:06 UTC (rev 65569)
+++ trunk/mono/eglib/TODO 2006-09-18 10:46:31 UTC (rev 65570)
@@ -24,7 +24,7 @@
1 g_win32_getlocale
* String manipulation
- 1 g_filename_from_utf8
+ 1 g_filename_from_utf8 [LIMITATION: UTF8 only today]
1 g_ascii_strdown
4 g_strdown
10 g_strlcpy
Modified: trunk/mono/eglib/src/Makefile.am
===================================================================
--- trunk/mono/eglib/src/Makefile.am 2006-09-18 10:29:06 UTC (rev 65569)
+++ trunk/mono/eglib/src/Makefile.am 2006-09-18 10:46:31 UTC (rev 65570)
@@ -26,7 +26,8 @@
gpattern.c \
gdir.c \
gmarkup.c \
- gutf8.c
+ gutf8.c \
+ gunicode.c
libeglib_la_CFLAGS = -Wall -Werror -D_FORTIFY_SOURCE=2
Modified: trunk/mono/eglib/src/gunicode.c
===================================================================
--- trunk/mono/eglib/src/gunicode.c 2006-09-18 10:29:06 UTC (rev 65569)
+++ trunk/mono/eglib/src/gunicode.c 2006-09-18 10:46:31 UTC (rev 65570)
@@ -25,17 +25,21 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <stdio.h>
+#include <glib.h>
GUnicodeType
g_unichar_type (gunichar c)
{
- g_abort ("g_unichar_type is not implemented");
+ g_error ("g_unichar_type is not implemented");
+ return 0;
}
gunichar
g_unichar_tolower (gunichar c)
{
- g_abort ("g_unichar_type is not implemented");
+ g_error ("g_unichar_type is not implemented");
+ return 0;
}
gchar *
@@ -43,5 +47,23 @@
const gchar *to_codeset, const gchar *from_codeset,
gsize *bytes_read, gsize *bytes_written, GError **error)
{
- g_abort ("g_convert is not supposed in eglib");
+ g_error ("g_convert is not supposed in eglib");
+ return NULL;
}
+
+/*
+ * This is broken, and assumes an UTF8 system, but will do for eglib's first
user
+ */
+gchar *
+g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read,
gsize *bytes_written, GError **error)
+{
+ char *res;
+
+ if (len == -1)
+ len = strlen (utf8string);
+
+ res = g_malloc (len + 1);
+ strcpy (res, utf8string);
+ return res;
+}
+
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches