[PATCH] msvcrt

Gerard Patel gerard.patel at nerim.net
Sat Nov 10 12:14:37 CST 2001


2 unrelated changes - the only relation is allowing Eudora Light 3.06 to start
without 'native' msvcrt.

- implement mbscspn mostly as a stub
- reimplement mktime (the tm structure is not constant and is longer under
Linux than
 under Windows)

ChangeLog:

	* dlls/msvcrt/msvcrt.spec, time.c, mbcs.c
                implement mbscspn and mktime
-------------- next part --------------
Index: dlls/msvcrt/mbcs.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/mbcs.c,v
retrieving revision 1.13
diff -u -r1.13 mbcs.c
--- dlls/msvcrt/mbcs.c	2001/09/17 19:02:21	1.13
+++ dlls/msvcrt/mbcs.c	2001/11/10 15:30:51
@@ -72,6 +72,15 @@
 }
 
 /*********************************************************************
+ *		_mbscspn(MSVCRT.@)
+ */
+int _mbscspn(const char *str, const char *cmp)
+{
+   FIXME("don't handle double character case\n");
+   return strcspn(str, cmp);
+}
+
+/*********************************************************************
  *		_mbsicmp(MSVCRT.@)
  */
 int _mbsicmp(const char *str, const char *cmp)
Index: dlls/msvcrt/msvcrt.spec
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/msvcrt.spec,v
retrieving revision 1.24
diff -u -r1.24 msvcrt.spec
--- dlls/msvcrt/msvcrt.spec	2001/09/17 19:02:21	1.24
+++ dlls/msvcrt/msvcrt.spec	2001/11/10 15:30:51
@@ -357,7 +357,7 @@
 @ cdecl _mbscmp(str str) _mbscmp
 @ stub _mbscoll #(str str)
 @ cdecl _mbscpy(ptr str) strcpy
-@ stub _mbscspn #(str str)
+@ cdecl _mbscspn (str str) _mbscspn
 @ cdecl _mbsdec(ptr ptr) _mbsdec
 @ cdecl _mbsdup(str) _strdup
 @ cdecl _mbsicmp(str str) _mbsicmp
@@ -675,7 +675,7 @@
 @ cdecl memcpy(ptr ptr long) memcpy
 @ cdecl memmove(ptr ptr long) memmove
 @ cdecl memset(ptr long long) memset
-@ cdecl mktime(ptr) mktime
+@ cdecl mktime(ptr) MSVCRT_mktime
 @ cdecl modf(double ptr) modf
 @ cdecl perror(str) MSVCRT_perror
 @ cdecl pow(double double) pow
Index: dlls/msvcrt/time.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/time.c,v
retrieving revision 1.5
diff -u -r1.5 time.c
--- dlls/msvcrt/time.c	2001/04/23 18:22:33	1.5
+++ dlls/msvcrt/time.c	2001/11/10 15:30:51
@@ -33,6 +33,23 @@
 }
 
 /**********************************************************************
+ *		mktime (MSVCRT.@)
+ */
+MSVCRT_time_t MSVCRT_mktime(struct MSVCRT_tm *t)
+{
+  struct tm aa;
+
+  aa.tm_sec = t->tm_sec;
+  aa.tm_min = t->tm_min;
+  aa.tm_hour = t->tm_hour;
+  aa.tm_mday = t->tm_mday;
+  aa.tm_mon = t->tm_mon;
+  aa.tm_year = t->tm_year;
+  aa.tm_isdst = t->tm_isdst;
+  return mktime(&aa);
+}
+
+/**********************************************************************
  *		_strdate (MSVCRT.@)
  */
 char* _strdate(char* date)
-------------- next part --------------



More information about the wine-patches mailing list