Resend: implement _ismbcalpha, _ismbcalnum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Let me know if there's any reason this didn't make it in.
Of course, I will do my best to fix any problems.

License: X11

ChangeLog: 

* msvcrt: mbcs.c, msvcrt.spec;
  Greg Turner <gmturner007@ameritech.net>
- implement _ismbcalpha, _ismbcalnum

-- 
gmt

"War is an ugly thing, but not the ugliest of things;
the decayed and degraded state of moral and patriotic
feeling which thinks that nothing is worth war is much
worse. A man who has nothing for which he is willing
to fight; nothing he cares about more than his own
personal safety; is a miserable creature who has no
chance of being free, unless made and kept so by the
exertions of better persons than himself."

-- John Stuart Mill

diff -ur -x CVS -x 'bigdif*' ../wine.test/dlls/msvcrt/mbcs.c ./dlls/msvcrt/mbcs.c
--- ../wine.test/dlls/msvcrt/mbcs.c     2002-10-29 12:41:45.000000000 -0600
+++ ./dlls/msvcrt/mbcs.c        2002-11-12 16:29:37.000000000 -0600
@@ -563,6 +563,31 @@
 }
 
 /*********************************************************************
+ *              _ismbcalpha (MSVCRT.@)
+ */
+int _ismbcalpha(unsigned int ch)
+{
+  if (ch < 0x100)
+    return ((0x41 <= ch && ch <= 0x5a) ||
+            (0x61 <= ch && ch <= 0x7a) ||
+            /* Japanese/Katakana, CP 932 */
+            (0xa6 <= ch && ch <= 0xdf));
+  else
+    {
+      FIXME("Handle MBC chars\n");
+      return 0;
+    }
+}
+
+/*********************************************************************
+ *              _ismbcalnum (MSVCRT.@)
+ */
+int _ismbcalnum(unsigned int ch)
+{
+  return (_ismbcdigit(ch) || _ismbcalpha(ch));
+}
+
+/*********************************************************************
  *              _ismbcspace (MSVCRT.@)
  */
 int _ismbcspace(unsigned int c)
diff -ur -x CVS -x 'bigdif*' ../wine.test/dlls/msvcrt/msvcrt.spec ./dlls/msvcrt/msvcrt.spec
--- ../wine.test/dlls/msvcrt/msvcrt.spec        2002-11-04 21:30:27.000000000 -0600
+++ ./dlls/msvcrt/msvcrt.spec   2002-11-12 16:29:37.000000000 -0600
@@ -291,8 +291,8 @@
 @ stub _ismbbprint #(long)
 @ stub _ismbbpunct #(long)
 @ cdecl _ismbbtrail(long) _ismbbtrail
-@ stub _ismbcalnum #(long)
-@ stub _ismbcalpha #(long)
+@ cdecl _ismbcalnum(long) _ismbcalnum
+@ cdecl _ismbcalpha(long) _ismbcalpha
 @ cdecl _ismbcdigit(long) _ismbcdigit
 @ stub _ismbcgraph #(long)
 @ cdecl _ismbchira(long) _ismbchira


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux