From 67245eec7192abdc1dd0dc2510c1f6c77df89bd0 Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 8 Sep 2001 14:17:53 +0000 Subject: * eval.c (rb_thread_restore_context): save current value of lastline and lastmatch in the thread struct for later restore. * eval.c (rb_thread_save_context): restore lastline and lastmatch. * numeric.c (flo_to_s): should handle negative float value. * class.c (rb_include_module): should check whole ancestors to avoid duplicate module inclusion. * string.c (trnext): should check backslash before updating "now" position. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dir.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'dir.c') diff --git a/dir.c b/dir.c index 3d3ca48fe4..f21051587e 100644 --- a/dir.c +++ b/dir.c @@ -75,6 +75,13 @@ char *strchr _((char*,char)); #define downcase(c) (nocase && ISUPPER(c) ? tolower(c) : (c)) +#ifndef CharNext /* defined as CharNext[AW] on Windows. */ +# if defined(DJGPP) +# define CharNext(p) ((p) + mblen(p, MB_CUR_MAX)) +# else +# define CharNext(p) ((p) + 1) +# endif +#endif #if defined DOSISH #define isdirsep(c) ((c) == '/' || (c) == '\\') static char * @@ -84,7 +91,7 @@ find_dirsep(s) while (*s) { if (isdirsep(*s)) return s; - s++; + s = CharNext(s); } return 0; } -- cgit v1.2.3