- Timestamp:
- Apr 10, 2003, 12:28:07 PM (22 years ago)
- Location:
- trunk/src/msvcrt
- Files:
-
- 5 added
- 1 deleted
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/msvcrt/LICENSE.TXT
r9655 r10005 1 $Id: LICENSE.TXT,v 1. 2 2003-01-10 13:13:48sandervl Exp $1 $Id: LICENSE.TXT,v 1.3 2003-04-10 10:27:59 sandervl Exp $ 2 2 This is an additional Odin license agreement. 3 3 It supercedes the main Odin license, but is only valid in -
trunk/src/msvcrt/console.c
r9633 r10005 29 29 #include "mtdll.h" 30 30 31 #include <stdio.h> 32 #include <string.h> 33 31 34 #include "wine/debug.h" 32 35 36 33 37 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); 34 35 38 36 39 … … 74 77 * _cputs (MSVCRT.@) 75 78 */ 76 int _cputs(const char* str)79 int MSVCRT__cputs(const char* str) 77 80 { 78 81 DWORD count; … … 90 93 * _getch (MSVCRT.@) 91 94 */ 92 int _getch(void)95 int MSVCRT__getch(void) 93 96 { 94 97 int retval = MSVCRT_EOF; … … 135 138 * _putch (MSVCRT.@) 136 139 */ 137 int _putch(int c)140 int MSVCRT__putch(int c) 138 141 { 139 142 int retval = MSVCRT_EOF; … … 149 152 * _getche (MSVCRT.@) 150 153 */ 151 int _getche(void)154 int MSVCRT__getche(void) 152 155 { 153 156 int retval; 154 157 LOCK_CONSOLE; 155 retval = _getch();158 retval = MSVCRT__getch(); 156 159 if (retval != MSVCRT_EOF) 157 retval = _putch(retval);160 retval = MSVCRT__putch(retval); 158 161 UNLOCK_CONSOLE; 159 162 return retval; … … 163 166 * _cgets (MSVCRT.@) 164 167 */ 165 char* _cgets(char* str)168 char* MSVCRT__cgets(char* str) 166 169 { 167 170 char *buf = str + 2; 168 171 int c; 169 172 str[1] = 0; /* Length */ 173 dprintf(("MSVCRT: _cgets")); 170 174 /* FIXME: No editing of string supported */ 171 175 LOCK_CONSOLE; 172 176 do 173 177 { 174 if (str[1] >= str[0] || (str[1]++, c = _getche()) == MSVCRT_EOF || c == '\n')178 if (str[1] >= str[0] || (str[1]++, c = MSVCRT__getche()) == MSVCRT_EOF || c == '\n') 175 179 break; 176 180 *buf++ = c & 0xff; … … 184 188 * _ungetch (MSVCRT.@) 185 189 */ 186 int _ungetch(int c)190 int MSVCRT__ungetch(int c) 187 191 { 188 192 int retval = MSVCRT_EOF; … … 197 201 * _kbhit (MSVCRT.@) 198 202 */ 199 int _kbhit(void)203 int MSVCRT__kbhit(void) 200 204 { 201 205 int retval = 0; 202 206 dprintf(("MSVCRT: kbhit()")); 203 207 LOCK_CONSOLE; 204 208 if (__MSVCRT_console_buffer != MSVCRT_EOF) … … 235 239 * _cprintf (MSVCRT.@) 236 240 */ 237 int _cprintf(const char* format, ...)241 int MSVCRT__cprintf(const char* format, ...) 238 242 { 239 243 char buf[2048], *mem = buf; 240 244 int written, resize = sizeof(buf), retval; 241 245 va_list valist; 242 246 dprintf(("MSVCRT: _cprintf %s",format)); 243 247 va_start( valist, format ); 244 248 /* There are two conventions for snprintf failing: … … 259 263 va_end(valist); 260 264 LOCK_CONSOLE; 261 retval = _cputs( mem );265 retval = MSVCRT__cputs( mem ); 262 266 UNLOCK_CONSOLE; 263 267 if (mem != buf) -
trunk/src/msvcrt/cpp.c
r9633 r10005 22 22 #include "msvcrt/eh.h" 23 23 #include "msvcrt/stdlib.h" 24 24 #include <string.h> 25 25 #include "wine/debug.h" 26 26 27 27 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); 28 29 28 30 29 typedef void (*v_table_ptr)(); … … 100 99 void MSVCRT_exception_ctor(exception * _this, const char ** name) 101 100 { 102 TRACE(" (%p %s)\n",_this,*name);101 TRACE("MSVCRT: exception_ctor (%p %s)\n",_this,*name); 103 102 _this->vtable = exception_vtable; 104 103 _this->name = *name; … … 112 111 void MSVCRT_exception_copy_ctor(exception * _this, const exception * rhs) 113 112 { 114 TRACE(" (%p %p)\n",_this,rhs);113 TRACE("MSVCRT: exception_copy_ctor (%p %p)\n",_this,rhs); 115 114 if (_this != rhs) 116 115 memcpy (_this, rhs, sizeof (*_this)); … … 123 122 void MSVCRT_exception_default_ctor(exception * _this) 124 123 { 125 TRACE(" (%p)\n",_this);124 TRACE("MSVCRT: exception_default_ctor (%p)\n",_this); 126 125 _this->vtable = exception_vtable; 127 126 _this->name = ""; … … 134 133 void MSVCRT_exception_dtor(exception * _this) 135 134 { 136 TRACE(" (%p)\n",_this);135 TRACE("MSVCRT: exception_dtor(%p)\n",_this); 137 136 } 138 137 … … 500 499 { 501 500 /* Note: cppobj _isn't_ a type_info, we use that struct for its vtable ptr */ 502 TRACE(" (%p)\n",cppobj);501 TRACE("MSVCRT: ___RTCastToVoid (%p)\n",cppobj); 503 502 504 503 /* Casts to void* simply cast to the base object */ -
trunk/src/msvcrt/cppexcept.c
r9633 r10005 25 25 #ifdef __WIN32OS2__ 26 26 #include <emxheader.h> 27 #include <string.h> 27 28 #include "winbase.h" 28 29 #else … … 38 39 #include "wine/debug.h" 39 40 41 #include "cppexcept.h" 42 40 43 WINE_DEFAULT_DEBUG_CHANNEL(seh); 41 42 #define CXX_FRAME_MAGIC 0x1993052043 #define CXX_EXCEPTION 0xe06d736344 45 typedef struct __type_info46 {47 void *vtable;48 void *data;49 char name[1];50 } type_info;51 52 /* the exception frame used by CxxFrameHandler */53 typedef struct __cxx_exception_frame54 {55 EXCEPTION_FRAME frame; /* the standard exception frame */56 int trylevel;57 DWORD ebp;58 } cxx_exception_frame;59 60 /* info about a single catch {} block */61 typedef struct __catchblock_info62 {63 UINT flags; /* flags (see below) */64 type_info *type_info; /* C++ type caught by this block */65 int offset; /* stack offset to copy exception object to */66 void (*handler)(); /* catch block handler code */67 } catchblock_info;68 #define TYPE_FLAG_CONST 169 #define TYPE_FLAG_VOLATILE 270 #define TYPE_FLAG_REFERENCE 871 72 /* info about a single try {} block */73 typedef struct __tryblock_info74 {75 int start_level; /* start trylevel of that block */76 int end_level; /* end trylevel of that block */77 int catch_level; /* initial trylevel of the catch block */78 int catchblock_count; /* count of catch blocks in array */79 catchblock_info *catchblock; /* array of catch blocks */80 } tryblock_info;81 82 /* info about the unwind handler for a given trylevel */83 typedef struct __unwind_info84 {85 int prev; /* prev trylevel unwind handler, to run after this one */86 void (*handler)(); /* unwind handler */87 } unwind_info;88 89 /* descriptor of all try blocks of a given function */90 typedef struct __cxx_function_descr91 {92 UINT magic; /* must be CXX_FRAME_MAGIC */93 UINT unwind_count; /* number of unwind handlers */94 unwind_info *unwind_table; /* array of unwind handlers */95 UINT tryblock_count; /* number of try blocks */96 tryblock_info *tryblock; /* array of try blocks */97 UINT unknown[3];98 } cxx_function_descr;99 100 /* complete information about a C++ type */101 typedef struct __cxx_type_info102 {103 UINT flags; /* flags (see CLASS_* flags below) */104 type_info *type_info; /* C++ type info */105 int this_offset; /* offset of base class this pointer from start of object */106 int vbase_descr; /* offset of virtual base class descriptor */107 int vbase_offset; /* offset of this pointer offset in virtual base class descriptor */108 size_t size; /* object size */109 void (*copy_ctor)(); /* copy constructor */110 } cxx_type_info;111 #define CLASS_IS_SIMPLE_TYPE 1112 #define CLASS_HAS_VIRTUAL_BASE_CLASS 4113 114 /* table of C++ types that apply for a given object */115 typedef struct __cxx_type_info_table116 {117 UINT count; /* number of types */118 cxx_type_info *info[1]; /* array of types */119 } cxx_type_info_table;120 121 typedef DWORD (*cxx_exc_custom_handler)( PEXCEPTION_RECORD, cxx_exception_frame*,122 PCONTEXT, struct __EXCEPTION_FRAME**,123 cxx_function_descr*, int nested_trylevel,124 EXCEPTION_FRAME *nested_frame, DWORD unknown3 );125 126 /* type information for an exception object */127 typedef struct __cxx_exception_type128 {129 UINT flags; /* TYPE_FLAG flags */130 void (*destructor)(); /* exception object destructor */131 cxx_exc_custom_handler custom_handler; /* custom handler for this exception */132 cxx_type_info_table *type_info_table; /* list of types for this exception object */133 } cxx_exception_type;134 135 44 136 45 #ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */ … … 170 79 171 80 172 static void dump_type( c xx_type_info *type )81 static void dump_type( const cxx_type_info *type ) 173 82 { 174 83 DPRINTF( "flags %x type %p", type->flags, type->type_info ); 175 if (type->type_info) DPRINTF( " (%p %s)", type->type_info-> data, type->type_info->name);84 if (type->type_info) DPRINTF( " (%p %s)", type->type_info->name, type->type_info->mangled ); 176 85 DPRINTF( " offset %d vbase %d,%d size %d copy ctor %p\n", type->this_offset, 177 86 type->vbase_descr, type->vbase_offset, type->size, type->copy_ctor ); 178 87 } 179 88 180 static void dump_exception_type( c xx_exception_type *type )181 { 182 inti;89 static void dump_exception_type( const cxx_exception_type *type ) 90 { 91 UINT i; 183 92 184 93 DPRINTF( "exception type:\n" ); … … 192 101 } 193 102 194 static void dump_function_descr( cxx_function_descr *descr, cxx_exception_type *info ) 195 { 196 int i, j; 103 static void dump_function_descr( const cxx_function_descr *descr, const cxx_exception_type *info ) 104 { 105 UINT i; 106 int j; 197 107 198 108 DPRINTF( "function descr:\n" ); … … 216 126 DPRINTF( " %d: flags %x offset %d handler %p type %p", 217 127 j, ptr->flags, ptr->offset, ptr->handler, ptr->type_info ); 218 if (ptr->type_info) DPRINTF( " (%p %s)", ptr->type_info-> data, ptr->type_info->name);128 if (ptr->type_info) DPRINTF( " (%p %s)", ptr->type_info->name, ptr->type_info->mangled ); 219 129 DPRINTF( "\n" ); 220 130 } … … 223 133 224 134 /* compute the this pointer for a base class of a given type */ 225 static void *get_this_pointer( c xx_type_info *type, void *object )135 static void *get_this_pointer( const cxx_type_info *type, void *object ) 226 136 { 227 137 void *this_ptr; … … 242 152 243 153 /* check if the exception type is caught by a given catch block, and return the type that matched */ 244 static c xx_type_info *find_caught_type( cxx_exception_type *exc_type, catchblock_info *catchblock )154 static const cxx_type_info *find_caught_type( cxx_exception_type *exc_type, catchblock_info *catchblock ) 245 155 { 246 156 UINT i; … … 248 158 for (i = 0; i < exc_type->type_info_table->count; i++) 249 159 { 250 c xx_type_info *type = exc_type->type_info_table->info[i];160 const cxx_type_info *type = exc_type->type_info_table->info[i]; 251 161 252 162 if (!catchblock->type_info) return type; /* catch(...) matches any type */ 253 163 if (catchblock->type_info != type->type_info) 254 164 { 255 if (strcmp( catchblock->type_info-> name, type->type_info->name)) continue;165 if (strcmp( catchblock->type_info->mangled, type->type_info->mangled )) continue; 256 166 } 257 167 /* type is the same, now check the flags */ … … 268 178 /* copy the exception object where the catch block wants it */ 269 179 static void copy_exception( void *object, cxx_exception_frame *frame, 270 catchblock_info *catchblock, c xx_type_info *type )180 catchblock_info *catchblock, const cxx_type_info *type ) 271 181 { 272 182 void **dest_ptr; 273 183 274 if (!catchblock->type_info || !catchblock->type_info-> name[0]) return;184 if (!catchblock->type_info || !catchblock->type_info->mangled[0]) return; 275 185 if (!catchblock->offset) return; 276 186 dest_ptr = (void **)((char *)&frame->ebp + catchblock->offset); … … 357 267 cxx_exception_type *info ) 358 268 { 359 int i, j; 269 UINT i; 270 int j; 360 271 void *addr, *object = (void *)rec->ExceptionInformation[1]; 361 272 struct catch_func_nested_frame nested_frame; … … 374 285 { 375 286 catchblock_info *catchblock = &tryblock->catchblock[j]; 376 c xx_type_info *type = find_caught_type( info, catchblock );287 const cxx_type_info *type = find_caught_type( info, catchblock ); 377 288 if (!type) continue; 378 289 … … 497 408 * _CxxThrowException (MSVCRT.@) 498 409 */ 499 void _CxxThrowException( void *object, c xx_exception_type *type )410 void _CxxThrowException( void *object, const cxx_exception_type *type ) 500 411 { 501 412 DWORD args[3]; … … 506 417 RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args ); 507 418 } 419 420 /********************************************************************* 421 * __CxxDetectRethrow (MSVCRT.@) 422 */ 423 BOOL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) 424 { 425 PEXCEPTION_RECORD rec; 426 427 if (!ptrs) 428 return FALSE; 429 430 rec = ptrs->ExceptionRecord; 431 432 if (rec->ExceptionCode == CXX_EXCEPTION && 433 rec->NumberParameters == 3 && 434 rec->ExceptionInformation[0] == CXX_FRAME_MAGIC && 435 rec->ExceptionInformation[2]) 436 { 437 ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; 438 return TRUE; 439 } 440 return (msvcrt_get_thread_data()->exc_record == rec); 441 } 442 443 /********************************************************************* 444 * __CxxQueryExceptionSize (MSVCRT.@) 445 */ 446 unsigned int __CxxQueryExceptionSize(void) 447 { 448 return sizeof(cxx_exception_type); 449 } -
trunk/src/msvcrt/ctype.c
r9633 r10005 19 19 */ 20 20 #include "msvcrt.h" 21 21 #include <ctype.h> 22 22 #include "msvcrt/ctype.h" 23 23 24 24 25 #include "wine/debug.h" … … 82 83 int _isctype(int c, int type) 83 84 { 85 dprintf(("MSVCRT: _isctype %d %d",c, type)); 84 86 if (c >= -1 && c <= 255) 85 87 return MSVCRT__pctype[c] & type; -
trunk/src/msvcrt/data.c
r9633 r10005 22 22 #else 23 23 #include <emxheader.h> 24 #include <math.h> 25 #include <string.h> 24 26 #endif 25 27 26 28 #include "wine/port.h" 27 29 28 #include <math.h>29 30 #include "msvcrt.h" 30 31 … … 69 70 int MSVCRT_timezone; 70 71 int MSVCRT_app_type; 72 char MSVCRT_pgm[MAX_PATH]; 73 char* MSVCRT__pgmptr = 0; 71 74 72 75 /* Get a snapshot of the current environment … … 147 150 * __p___argc (MSVCRT.@) 148 151 */ 149 int* __p___argc(void) { return &MSVCRT___argc; }152 int* __p___argc(void) { dprintf(("MSVCRT: Query of p__argc")); return &MSVCRT___argc; } 150 153 151 154 /*********************************************************************** 152 155 * __p__commode (MSVCRT.@) 153 156 */ 154 unsigned int* __p__commode(void) { return &MSVCRT__commode; } 157 unsigned int* __p__commode(void) { dprintf(("MSVCRT: Query of p__commode")); return &MSVCRT__commode; } 158 159 /*********************************************************************** 160 * __p__pgmptr (MSVCRT.@) 161 */ 162 char** __p__pgmptr(void) { return &MSVCRT__pgmptr; } 155 163 156 164 /*********************************************************************** 157 165 * __p__fmode (MSVCRT.@) 158 166 */ 159 unsigned int* __p__fmode(void) { return &MSVCRT__fmode; }167 unsigned int* __p__fmode(void) { dprintf(("MSVCRT: Query of p__fmode")); return &MSVCRT__fmode; } 160 168 161 169 /*********************************************************************** 162 170 * __p__osver (MSVCRT.@) 163 171 */ 164 unsigned int* __p__osver(void) { return &MSVCRT__osver; }172 unsigned int* __p__osver(void) { dprintf(("MSVCRT: Query of p__osver")); return &MSVCRT__osver; } 165 173 166 174 /*********************************************************************** 167 175 * __p__winmajor (MSVCRT.@) 168 176 */ 169 unsigned int* __p__winmajor(void) { return &MSVCRT__winmajor; }177 unsigned int* __p__winmajor(void) { dprintf(("MSVCRT: Query of p__winmajor")); return &MSVCRT__winmajor; } 170 178 171 179 /*********************************************************************** 172 180 * __p__winminor (MSVCRT.@) 173 181 */ 174 unsigned int* __p__winminor(void) { return &MSVCRT__winminor; }182 unsigned int* __p__winminor(void) { dprintf(("MSVCRT: Query of p__winminor")); return &MSVCRT__winminor; } 175 183 176 184 /*********************************************************************** 177 185 * __p__winver (MSVCRT.@) 178 186 */ 179 unsigned int* __p__winver(void) { return &MSVCRT__winver; }187 unsigned int* __p__winver(void) { dprintf(("MSVCRT: Query of p__winver")); return &MSVCRT__winver; } 180 188 181 189 /********************************************************************* 182 190 * __p__acmdln (MSVCRT.@) 183 191 */ 184 char** __p__acmdln(void) { return &MSVCRT__acmdln; }192 char** __p__acmdln(void) { dprintf(("MSVCRT: Query of p__acmdln")); return &MSVCRT__acmdln; } 185 193 186 194 /********************************************************************* 187 195 * __p__wcmdln (MSVCRT.@) 188 196 */ 189 MSVCRT_wchar_t** __p__wcmdln(void) { return &MSVCRT__wcmdln; }197 MSVCRT_wchar_t** __p__wcmdln(void) { dprintf(("MSVCRT: Query of p__wcmdln")); return &MSVCRT__wcmdln; } 190 198 191 199 /********************************************************************* 192 200 * __p___argv (MSVCRT.@) 193 201 */ 194 char*** __p___argv(void) { return &MSVCRT___argv; }202 char*** __p___argv(void) { dprintf(("MSVCRT: Query of p__argv")); return &MSVCRT___argv; } 195 203 196 204 /********************************************************************* 197 205 * __p___wargv (MSVCRT.@) 198 206 */ 199 MSVCRT_wchar_t*** __p___wargv(void) { return &MSVCRT___wargv; }207 MSVCRT_wchar_t*** __p___wargv(void) { dprintf(("MSVCRT: Query of p__wargv")); return &MSVCRT___wargv; } 200 208 201 209 /********************************************************************* … … 204 212 char*** __p__environ(void) 205 213 { 214 dprintf(("MSVCRT: Query of p__environ")); 206 215 if (!MSVCRT__environ) 207 216 MSVCRT__environ = msvcrt_SnapshotOfEnvironmentA(NULL); … … 214 223 MSVCRT_wchar_t*** __p__wenviron(void) 215 224 { 225 dprintf(("MSVCRT: Query of p__wenviron")); 216 226 if (!MSVCRT__wenviron) 217 227 MSVCRT__wenviron = msvcrt_SnapshotOfEnvironmentW(NULL); … … 222 232 * __p___initenv (MSVCRT.@) 223 233 */ 224 char*** __p___initenv(void) { return &MSVCRT___initenv; }234 char*** __p___initenv(void) { dprintf(("MSVCRT: Query of p__initenv")); return &MSVCRT___initenv; } 225 235 226 236 /********************************************************************* 227 237 * __p___winitenv (MSVCRT.@) 228 238 */ 229 MSVCRT_wchar_t*** __p___winitenv(void) { return &MSVCRT___winitenv; }239 MSVCRT_wchar_t*** __p___winitenv(void) { dprintf(("MSVCRT: Query of p__winitenv")); return &MSVCRT___winitenv; } 230 240 231 241 /********************************************************************* 232 242 * __p__timezone (MSVCRT.@) 233 243 */ 234 int* __p__timezone(void) { return &MSVCRT_timezone; }244 int* __p__timezone(void) { dprintf(("MSVCRT: Query of p__timezone")); return &MSVCRT_timezone; } 235 245 236 246 /* INTERNAL: Create a wide string from an ascii string */ … … 238 248 { 239 249 const size_t len = strlen(str) + 1 ; 250 dprintf(("MSVCRT: wstrdupa %s",str)); 240 251 MSVCRT_wchar_t *wstr = MSVCRT_malloc(len* sizeof (MSVCRT_wchar_t)); 241 252 if (!wstr) … … 252 263 static WCHAR **__wine_main_wargv = NULL; 253 264 char *argv[255]; 254 255 extern char* strtok(char*,const char*);256 265 257 266 static void set_library_argv( char **incargv) … … 313 322 DWORD version; 314 323 315 MSVCRT__acmdln = _strdup( GetCommandLineA() );324 MSVCRT__acmdln = MSVCRT__strdup( GetCommandLineA() ); 316 325 MSVCRT__wcmdln = wstrdupa(MSVCRT__acmdln); 317 326 #ifdef __WIN32OS2__ … … 342 351 MSVCRT_timezone = 0; 343 352 344 /* FIXME: set app type for Winelib apps */345 346 353 MSVCRT___initenv= msvcrt_SnapshotOfEnvironmentA(NULL); 347 354 MSVCRT___winitenv= msvcrt_SnapshotOfEnvironmentW(NULL); 348 355 356 MSVCRT_pgm[0] = '\0'; 357 GetModuleFileNameA(0, MSVCRT_pgm, sizeof(MSVCRT_pgm)/sizeof(MSVCRT_pgm[0])); 358 MSVCRT__pgmptr = MSVCRT_pgm; 349 359 } 350 360 -
trunk/src/msvcrt/dir.c
r9633 r10005 23 23 #ifdef __WIN32OS2__ 24 24 #include <emxheader.h> 25 #include <stdlib.h> 26 #include <string.h> 27 #include <ctype.h> 25 28 #include <winbase.h> 26 29 #else … … 90 93 * _chdir (MSVCRT.@) 91 94 */ 92 int _chdir(const char * newdir)95 int MSVCRT__chdir(const char * newdir) 93 96 { 94 97 if (!SetCurrentDirectoryA(newdir)) … … 116 119 * _chdrive (MSVCRT.@) 117 120 */ 118 int _chdrive(int newdrive)121 int MSVCRT__chdrive(int newdrive) 119 122 { 120 123 char buffer[3] = "A:"; … … 219 222 * _getcwd (MSVCRT.@) 220 223 */ 221 char* _getcwd(char * buf, int size)224 char* MSVCRT__getcwd(char * buf, int size) 222 225 { 223 226 char dir[MAX_PATH]; … … 230 233 { 231 234 if (size < 0) 232 return _strdup(dir);235 return MSVCRT__strdup(dir); 233 236 return msvcrt_strndup(dir,size); 234 237 } … … 271 274 * _getdrive (MSVCRT.@) 272 275 */ 273 int _getdrive(void)276 int MSVCRT__getdrive(void) 274 277 { 275 278 char buffer[MAX_PATH]; … … 282 285 * _getdcwd (MSVCRT.@) 283 286 */ 284 char* _getdcwd(int drive, char * buf, int size)287 char* MSVCRT__getdcwd(int drive, char * buf, int size) 285 288 { 286 289 static char* dummy; … … 288 291 TRACE(":drive %d(%c), size %d\n",drive, drive + 'A' - 1, size); 289 292 290 if (!drive || drive == _getdrive())291 return _getcwd(buf,size); /* current */293 if (!drive || drive == MSVCRT__getdrive()) 294 return MSVCRT__getcwd(buf,size); /* current */ 292 295 else 293 296 { … … 312 315 TRACE(":returning '%s'\n", dir); 313 316 if (!buf) 314 return _strdup(dir); /* allocate */317 return MSVCRT__strdup(dir); /* allocate */ 315 318 316 319 strcpy(buf,dir); … … 328 331 TRACE(":drive %d(%c), size %d\n",drive, drive + 'A' - 1, size); 329 332 330 if (!drive || drive == _getdrive())333 if (!drive || drive == MSVCRT__getdrive()) 331 334 return _wgetcwd(buf,size); /* current */ 332 335 else … … 388 391 * _mkdir (MSVCRT.@) 389 392 */ 390 int _mkdir(const char * newdir)393 int MSVCRT__mkdir(const char * newdir) 391 394 { 392 395 if (CreateDirectoryA(newdir,NULL)) … … 410 413 * _rmdir (MSVCRT.@) 411 414 */ 412 int _rmdir(const char * dir)415 int MSVCRT__rmdir(const char * dir) 413 416 { 414 417 if (RemoveDirectoryA(dir)) … … 439 442 MSVCRT_wchar_t pathbuff[MAX_PATH],*path=pathbuff; 440 443 441 TRACE(" :splittingpath %s\n",debugstr_w(path));444 TRACE("MSVCRT: _wsplitpath %s\n",debugstr_w(path)); 442 445 /* FIXME: Should be an strncpyW or something */ 443 446 strcpyW(pathbuff, inpath); … … 586 589 if (q > r) 587 590 { 588 591 strcpy(q, p + 3); 589 592 s = q; 590 593 } … … 622 625 * _fullpath (MSVCRT.@) 623 626 */ 624 char * _fullpath(char * absPath, const char* relPath, unsigned int size)627 char *MSVCRT__fullpath(char * absPath, const char* relPath, unsigned int size) 625 628 { 626 629 char drive[5],dir[MAX_PATH],file[MAX_PATH],ext[MAX_PATH]; … … 631 634 632 635 if (!relPath || !*relPath) 633 return _getcwd(absPath, size);636 return MSVCRT__getcwd(absPath, size); 634 637 635 638 if (size < 4) … … 639 642 } 640 643 641 TRACE(" :resolving relativepath '%s'\n",relPath);644 TRACE("MSVCRT: _fullpath '%s'\n",relPath); 642 645 643 646 _splitpath(relPath, drive, dir, file, ext); … … 670 673 671 674 if (!absPath) 672 return _strdup(res);675 return MSVCRT__strdup(res); 673 676 strcpy(absPath,res); 674 677 return absPath; … … 678 681 * _makepath (MSVCRT.@) 679 682 */ 680 VOID _makepath(char * path, const char * drive,683 VOID MSVCRT__makepath(char * path, const char * drive, 681 684 const char *directory, const char * filename, 682 685 const char * extension ) … … 767 770 * _searchenv (MSVCRT.@) 768 771 */ 769 void _searchenv(const char* file, const char* env, char *buf)772 void MSVCRT__searchenv(const char* file, const char* env, char *buf) 770 773 { 771 774 char*envVal, *penv; … … 824 827 } while(1); 825 828 } 829 830 MSVCRT_wchar_t* _wfullpath(MSVCRT_wchar_t* absPath,const MSVCRT_wchar_t* relPath,MSVCRT(size_t) size) 831 { 832 MSVCRT_wchar_t ch; 833 char asciiabsPath[280], asciirelPath[280]; 834 835 TRACE("MSVCRT: _wfullpath %s %d\n", debugstr_w(relPath),size); 836 837 WideCharToMultiByte(CP_ACP, 0, relPath, -1, (LPSTR)asciirelPath, 280, NULL, NULL); 838 839 MSVCRT__fullpath(asciiabsPath, asciirelPath, size); 840 841 MultiByteToWideChar(CP_ACP, 0, asciiabsPath, -1, absPath, size); 842 843 return absPath; 844 } -
trunk/src/msvcrt/emxheader.h
r9633 r10005 2 2 #define _EMXSTDDEF_H 3 3 4 #if !defined (_SIZE_T)5 #define _SIZE_T6 typedef unsigned long size_t;7 #endif8 9 #ifndef __time_t10 #define __time_t11 typedef long time_t;12 #endif13 14 #ifndef __tm_t15 #define __tm_t16 struct tm17 {18 int tm_sec; /* seconds after the minute [0-61] */19 int tm_min; /* minutes after the hour [0-59] */20 int tm_hour; /* hours since midnight [0-23] */21 int tm_mday; /* day of the month [1-31] */22 int tm_mon; /* months since January [0-11] */23 int tm_year; /* years since 1900 */24 int tm_wday; /* days since Sunday [0-6] */25 int tm_yday; /* days since January 1 [0-365] */26 int tm_isdst; /* Daylight Saving Time flag */27 };28 #endif29 30 typedef struct _div_t31 {32 int quot; /* quotient of integer division */33 int rem; /* remainder of integer division */34 } div_t;35 36 typedef struct _ldiv_t37 {38 long int quot; /* quotient of long integer division */39 long int rem; /* remainder of long integer division */40 } ldiv_t;41 42 div_t div( int, int );43 ldiv_t ldiv( long int, long int );44 45 #define STDIN_FILENO 046 #define STDOUT_FILENO 147 #define STDERR_FILENO 248 49 /* more file._flag flags, but these conflict with Unix */50 #define _IOFBF 0x000051 #define _IONBF 0x000452 #define _IOLBF 0x004053 54 #define EOF (-1)55 #define FILENAME_MAX 26056 #define FOPEN_MAX 2057 #define L_tmpnam 26058 59 #define BUFSIZ 51260 61 #ifndef SEEK_SET62 #define SEEK_SET 063 #define SEEK_CUR 164 #define SEEK_END 265 #endif66 4 67 5 #define __ASM_NAME(name) "_" name -
trunk/src/msvcrt/environ.c
r9633 r10005 23 23 #ifdef __WIN32OS2__ 24 24 #include <winbase.h> 25 #include <string.h> 25 26 #endif 26 27 … … 44 45 unsigned int length=strlen(name); 45 46 47 dprintf(("MSVCRT: %s",name)); 48 46 49 for (pp = environ; (*pp); pp = pp + strlen(pp) +1) 47 50 { … … 49 52 if ((pos) && ((pos - pp) == length)) 50 53 { 51 if (! strncasecmp(pp,name,length)) break;54 if (!_strnicmp(pp,name,length)) break; 52 55 } 53 56 } … … 71 74 MSVCRT_wchar_t* pp,*pos = NULL; 72 75 unsigned int length=strlenW(name); 76 77 dprintf(("MSVCRT: _wgetenv %s",debugstr_w(name))); 73 78 74 79 for (pp = environ; (*pp); pp = pp + strlenW(pp) + 1) … … 95 100 * _putenv (MSVCRT.@) 96 101 */ 97 int _putenv(const char *str)102 int MSVCRT__putenv(const char *str) 98 103 { 99 104 char name[256], value[512]; -
trunk/src/msvcrt/errno.c
r9633 r10005 38 38 void MSVCRT__set_errno(int err) 39 39 { 40 int * errno = MSVCRT__errno();41 unsigned long *doserrno = __doserrno();42 40 int *msv_errno = MSVCRT__errno(); 41 unsigned long *doserrno = MSVCRT_doserrno(); 42 43 43 *doserrno = err; 44 44 … … 46 46 { 47 47 #define ERR_CASE(oserr) case oserr: 48 #define ERR_MAPS(oserr,crterr) case oserr:* errno = crterr;break;48 #define ERR_MAPS(oserr,crterr) case oserr:*msv_errno = crterr;break; 49 49 ERR_CASE(ERROR_ACCESS_DENIED) 50 50 ERR_CASE(ERROR_NETWORK_ACCESS_DENIED) … … 91 91 /* Remaining cases map to EINVAL */ 92 92 /* FIXME: may be missing some errors above */ 93 * errno = MSVCRT_EINVAL;93 *msv_errno = MSVCRT_EINVAL; 94 94 } 95 95 } … … 100 100 int* MSVCRT__errno(void) 101 101 { 102 return &msvcrt_get_thread_data()->errno; 102 dprintf(("MSVCRT: __errno %d",msvcrt_get_thread_data()->msv_errno)); 103 return &msvcrt_get_thread_data()->msv_errno; 103 104 } 104 105 105 106 /********************************************************************* 106 * __doserrno (MSVCRT.@)107 * MSVCRT_doserrno (MSVCRT.@) 107 108 */ 108 unsigned long* __doserrno(void)109 unsigned long* MSVCRT_doserrno(void) 109 110 { 111 dprintf(("MSVCRT: _doserrno %d",msvcrt_get_thread_data()->doserrno)); 110 112 return &msvcrt_get_thread_data()->doserrno; 111 113 } … … 122 124 * _strerror (MSVCRT.@) 123 125 */ 124 char* _strerror(const char* err)126 char* MSVCRT__strerror(const char* err) 125 127 { 126 128 static char strerrbuff[256]; /* FIXME: Per thread, nprintf */ 127 sprintf(strerrbuff,"%s: %s\n",err,MSVCRT_strerror(msvcrt_get_thread_data()-> errno));129 sprintf(strerrbuff,"%s: %s\n",err,MSVCRT_strerror(msvcrt_get_thread_data()->msv_errno)); 128 130 return strerrbuff; 129 131 } … … 134 136 void MSVCRT_perror(const char* str) 135 137 { 136 _cprintf("%s: %s\n",str,MSVCRT_strerror(msvcrt_get_thread_data()->errno));138 MSVCRT__cprintf("%s: %s\n",str,MSVCRT_strerror(msvcrt_get_thread_data()->msv_errno)); 137 139 } -
trunk/src/msvcrt/except.c
r9633 r10005 28 28 #ifdef __WIN32OS2__ 29 29 #include <emxheader.h> 30 #include <stdlib.h> 31 #include <string.h> 30 32 #include <winbase.h> 31 33 #else … … 40 42 #include "msvcrt.h" 41 43 44 #include "msvcrt/stdlib.h" 42 45 #include "msvcrt/setjmp.h" 43 46 #include "excpt.h" … … 144 147 EXCEPTION_FRAME reg; 145 148 146 TRACE(" (%p,%d,%d)\n",frame, frame->trylevel, trylevel);149 TRACE("MSVCRT: _local_unwind2 (%p,%d,%d)\n",frame, frame->trylevel, trylevel); 147 150 148 151 /* Register a handler in case of a nested exception */ … … 195 198 PSCOPETABLE pScopeTable; 196 199 197 TRACE(" exception %lx flags=%lx at %p handler=%p %p %p semi-stub\n",200 TRACE("MSVCRT: exception %lx flags=%lx at %p handler=%p %p %p semi-stub\n", 198 201 rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, 199 202 frame->handler, context, dispatcher); … … 290 293 #endif 291 294 { 292 TRACE(" (%p)\n",jmp);295 TRACE("MSVCRT: _setjmp (%p)\n",jmp); 293 296 jmp->Ebp = context->Ebp; 294 297 jmp->Ebx = context->Ebx; … … 316 319 #endif 317 320 { 318 TRACE(" (%p,%d)\n",jmp,nb_args);321 TRACE("MSVCRT: _setjmp3 (%p,%d)\n",jmp,nb_args); 319 322 jmp->Ebp = context->Ebp; 320 323 jmp->Ebx = context->Ebx; … … 359 362 unsigned long cur_frame = 0; 360 363 361 TRACE(" (%p,%d)\n", jmp, retval);364 TRACE("MSVCRT: longjmp (%p,%d)\n", jmp, retval); 362 365 363 366 cur_frame=(unsigned long)NtCurrentTeb()->except; … … 404 407 #endif /* i386 */ 405 408 409 406 410 /********************************************************************* 407 411 * signal (MSVCRT.@) … … 409 413 void* MSVCRT_signal(int sig, MSVCRT_sig_handler_func func) 410 414 { 411 FIXME("(%d %p):stub\n", sig, func);412 return (void*)-1;413 } 415 dprintf(("MSVCRT: signal(%d %p): NOT COMPLETE\n", sig, func)); 416 return SIG_IGN_W; 417 } -
trunk/src/msvcrt/exit.c
r9633 r10005 23 23 #include "msvcrt/stdlib.h" 24 24 #include "mtdll.h" 25 25 #include "winuser.h" 26 #include <string.h> 26 27 #include "wine/debug.h" 27 28 … … 37 38 38 39 extern int MSVCRT_app_type; 40 extern char *MSVCRT__pgmptr; 41 42 static LPCSTR szMsgBoxTitle = "Wine C++ Runtime Library"; 39 43 40 44 /* INTERNAL: call atexit functions */ … … 92 96 void MSVCRT__exit(int exitcode) 93 97 { 94 TRACE(" (%d)\n", exitcode);98 TRACE("MSVCRT: _exit (%d)\n", exitcode); 95 99 ExitProcess(exitcode); 96 100 } 97 101 102 /* Print out an error message with an option to debug */ 103 static void DoMessageBox(LPCSTR lead, LPCSTR message) 104 { 105 MSGBOXPARAMSA msgbox; 106 char text[2048]; 107 INT ret; 108 109 _snprintf(text,sizeof(text),"%s\n\nProgram: %s\n%s\n\n" 110 "Press OK to exit the program, or Cancel to start the Wine debugger.\n ", 111 lead, MSVCRT__pgmptr, message); 112 113 msgbox.cbSize = sizeof(msgbox); 114 msgbox.hwndOwner = GetActiveWindow(); 115 msgbox.hInstance = 0; 116 msgbox.lpszText = text; 117 msgbox.lpszCaption = szMsgBoxTitle; 118 msgbox.dwStyle = MB_OKCANCEL|MB_ICONERROR; 119 msgbox.lpszIcon = NULL; 120 msgbox.dwContextHelpId = 0; 121 msgbox.lpfnMsgBoxCallback = NULL; 122 msgbox.dwLanguageId = LANG_NEUTRAL; 123 124 ret = MessageBoxIndirectA(&msgbox); 125 if (ret == IDCANCEL) 126 DebugBreak(); 127 } 128 98 129 /********************************************************************* 99 130 * _amsg_exit (MSVCRT.@) … … 101 132 void MSVCRT__amsg_exit(int errnum) 102 133 { 103 TRACE(" (%d)\n", errnum);134 TRACE("MSVCRT: _amsg_exit (%d)\n", errnum); 104 135 /* FIXME: text for the error number. */ 105 136 if (MSVCRT_app_type == 2) 106 137 { 107 /* FIXME: MsgBox */ 108 } 109 _cprintf("\nruntime error R60%d\n",errnum); 138 char text[32]; 139 sprintf(text, "Error: R60%d",errnum); 140 DoMessageBox("Runtime error!", text); 141 } 142 else 143 MSVCRT__cprintf("\nruntime error R60%d\n",errnum); 110 144 MSVCRT__exit(255); 111 145 } … … 116 150 void MSVCRT_abort(void) 117 151 { 118 TRACE(" (void)\n");152 TRACE("MSVCRT: _abort"); 119 153 if (MSVCRT_app_type == 2) 120 154 { 121 /* FIXME: MsgBox */ 122 } 123 _cputs("\nabnormal program termination\n"); 155 DoMessageBox("Runtime error!", "abnormal program termination"); 156 } 157 else 158 MSVCRT__cputs("\nabnormal program termination\n"); 124 159 MSVCRT__exit(3); 125 160 } … … 130 165 void MSVCRT__assert(const char* str, const char* file, unsigned int line) 131 166 { 132 TRACE(" (%s,%s,%d)\n",str,file,line);167 TRACE("MSVCRT: _assert (%s,%s,%d)\n",str,file,line); 133 168 if (MSVCRT_app_type == 2) 134 169 { 135 /* FIXME: MsgBox */ 136 } 137 _cprintf("Assertion failed: %s, file %s, line %d\n\n",str,file, line); 138 MSVCRT_abort(); 170 char text[2048]; 171 _snprintf(text, sizeof(text), "File: %s\nLine: %d\n\nEpression: \"%s\"", file, line, str); 172 DoMessageBox("Assertion failed!", text); 173 } 174 else 175 MSVCRT__cprintf("Assertion failed: %s, file %s, line %d\n\n",str, file, line); 176 MSVCRT__exit(3); 139 177 } 140 178 … … 144 182 void MSVCRT__c_exit(void) 145 183 { 146 TRACE(" (void)\n");184 TRACE("MSVCRT: _c_exit (void)\n"); 147 185 /* All cleanup is done on DLL detach; Return to caller */ 148 186 } … … 153 191 void MSVCRT__cexit(void) 154 192 { 155 TRACE(" (void)\n");193 TRACE("MSVCRT: _cexit (void)\n"); 156 194 /* All cleanup is done on DLL detach; Return to caller */ 157 195 } … … 160 198 * _onexit (MSVCRT.@) 161 199 */ 162 _onexit_t _onexit(_onexit_t func)163 { 164 TRACE(" (%p)\n",func);200 _onexit_t MSVCRT__onexit(_onexit_t func) 201 { 202 TRACE("MSVCRT: _onexit (%p)\n",func); 165 203 166 204 if (!func) … … 196 234 void MSVCRT_exit(int exitcode) 197 235 { 198 TRACE(" (%d)\n",exitcode);236 TRACE("MSVCRT: _exit (%d)\n",exitcode); 199 237 LOCK_EXIT; 200 238 __MSVCRT__call_atexit(); … … 208 246 int MSVCRT_atexit(void (*func)(void)) 209 247 { 210 TRACE(" (%p)\n", func);211 return _onexit((_onexit_t)func) == (_onexit_t)func ? 0 : -1;248 TRACE("MSVCRT: _atexit (%p)\n", func); 249 return MSVCRT__onexit((_onexit_t)func) == (_onexit_t)func ? 0 : -1; 212 250 } 213 251 … … 218 256 void _purecall(void) 219 257 { 220 TRACE(" (void)\n");258 TRACE("MSVCRT: _purecall (void)\n"); 221 259 MSVCRT__amsg_exit( 25 ); 222 260 } -
trunk/src/msvcrt/file.c
r9633 r10005 23 23 #ifdef __WIN32OS2__ 24 24 #include <emxheader.h> 25 /* thanks to stupid unistd.h in win dir! */ 26 #include <emxruntime\unistd.h> 25 27 #include <winbase.h> 26 28 #else … … 29 31 #endif 30 32 33 #include <stdlib.h> 34 #include <stdio.h> 35 #include <ctype.h> 36 #include <string.h> 31 37 #include <time.h> 32 #include <stdio.h> 33 #ifdef HAVE_UNISTD_H 34 # include <unistd.h> 35 #endif 38 36 39 37 40 #include "winternl.h" 41 #include "debugstr.h" 38 42 #include "msvcrt.h" 39 43 #include "msvcrt/errno.h" … … 82 86 83 87 /* INTERNAL: process umask */ 84 static int MSVCRT_ umask = 0;88 static int MSVCRT__umask = 0; 85 89 86 90 /* INTERNAL: Static buffer for temp file name */ … … 124 128 { 125 129 WARN(":fd (%d) - no handle!\n",fd); 126 * __doserrno() = 0;130 *MSVCRT_doserrno() = 0; 127 131 *MSVCRT__errno() = MSVCRT_EBADF; 128 132 return INVALID_HANDLE_VALUE; … … 177 181 static MSVCRT_FILE* msvcrt_alloc_fp(int fd) 178 182 { 179 TRACE(" :fd (%d) allocating FILE*\n",fd);183 TRACE("MSVCRT: fd (%d) allocating FILE*\n",fd); 180 184 if (fd < 0 || fd >= MSVCRT_fdend || 181 185 MSVCRT_handles[fd] == INVALID_HANDLE_VALUE) 182 186 { 183 187 WARN(":invalid fd %d\n",fd); 184 * __doserrno() = 0;188 *MSVCRT_doserrno() = 0; 185 189 *MSVCRT__errno() = MSVCRT_EBADF; 186 190 return NULL; … … 227 231 void msvcrt_free_io(void) 228 232 { 229 _fcloseall();230 _close(0);231 _close(1);232 _close(2);233 MSVCRT__fcloseall(); 234 MSVCRT__close(0); 235 MSVCRT__close(1); 236 MSVCRT__close(2); 233 237 } 234 238 … … 238 242 if(file->_bufsiz) { 239 243 int cnt=file->_ptr-file->_base; 240 if(cnt>0 && _write(file->_file, file->_base, cnt) != cnt) {244 if(cnt>0 && MSVCRT__write(file->_file, file->_base, cnt) != cnt) { 241 245 return MSVCRT_EOF; 242 246 } … … 268 272 MSVCRT_FILE *__p__iob(void) 269 273 { 274 dprintf(("MSVCRT: __p__iob request")); 270 275 return &MSVCRT__iob[0]; 271 276 } … … 274 279 * _access (MSVCRT.@) 275 280 */ 276 int _access(const char *filename, int mode)281 int MSVCRT__access(const char *filename, int mode) 277 282 { 278 283 DWORD attr = GetFileAttributesA(filename); 279 284 280 TRACE(" (%s,%d) %ld\n",filename,mode,attr);285 TRACE("MSVCRT _access (%s,%d) %ld\n",filename,mode,attr); 281 286 282 287 if (!filename || attr == 0xffffffff) … … 300 305 DWORD attr = GetFileAttributesW(filename); 301 306 302 TRACE(" (%s,%d) %ld\n",debugstr_w(filename),mode,attr);307 TRACE("MSVCRT: _waccess (%s,%d) %ld\n",debugstr_w(filename),mode,attr); 303 308 304 309 if (!filename || attr == 0xffffffff) … … 318 323 * _chmod (MSVCRT.@) 319 324 */ 320 int _chmod(const char *path, int flags)325 int MSVCRT__chmod(const char *path, int flags) 321 326 { 322 327 DWORD oldFlags = GetFileAttributesA(path); 328 329 dprintf(("MSVCRT: _chmod %s",path)); 323 330 324 331 if (oldFlags != 0x0FFFFFFFF) … … 341 348 DWORD oldFlags = GetFileAttributesW(path); 342 349 350 dprintf(("MSVCRT: _wchmod %s",debugstr_w(path))); 351 343 352 if (oldFlags != 0x0FFFFFFFF) 344 353 { … … 356 365 * _unlink (MSVCRT.@) 357 366 */ 358 int _unlink(const char *path)359 { 360 TRACE(" (%s)\n",path);367 int MSVCRT__unlink(const char *path) 368 { 369 TRACE("MSVCRT: _unlink (%s)\n",path); 361 370 if(DeleteFileA(path)) 362 371 return 0; … … 382 391 * _close (MSVCRT.@) 383 392 */ 384 int _close(int fd)393 int MSVCRT__close(int fd) 385 394 { 386 395 HANDLE hand = msvcrt_fdtoh(fd); 387 396 388 TRACE(" :fd (%d) handle (%p)\n",fd,hand);397 TRACE("MSVCRT: _close fd (%d) handle (%p)\n",fd,hand); 389 398 if (hand == INVALID_HANDLE_VALUE) 390 399 return -1; … … 413 422 { 414 423 TRACE("deleting temporary file '%s'\n",MSVCRT_tempfiles[fd]); 415 _unlink(MSVCRT_tempfiles[fd]);424 MSVCRT__unlink(MSVCRT_tempfiles[fd]); 416 425 MSVCRT_free(MSVCRT_tempfiles[fd]); 417 426 MSVCRT_tempfiles[fd] = NULL; 418 427 } 419 428 420 TRACE(" :ok\n");429 TRACE("MSVCRT: _close ok\n"); 421 430 return 0; 422 431 } … … 429 438 HANDLE hand = msvcrt_fdtoh(fd); 430 439 431 TRACE(" :fd (%d) handle (%p)\n",fd,hand);440 TRACE("MSVCRT: _commit fd (%d) handle (%p)\n",fd,hand); 432 441 if (hand == INVALID_HANDLE_VALUE) 433 442 return -1; … … 458 467 HANDLE hand = msvcrt_fdtoh(fd); 459 468 460 TRACE(" :fd (%d) handle (%p)\n",fd,hand);469 TRACE("MSVCRT: _eof fd (%d) handle (%p)\n",fd,hand); 461 470 462 471 if (hand == INVALID_HANDLE_VALUE) … … 483 492 * _fcloseall (MSVCRT.@) 484 493 */ 485 int _fcloseall(void)494 int MSVCRT__fcloseall(void) 486 495 { 487 496 int num_closed = 0, i; 497 498 dprintf(("MSVCRT: _fcloseall")); 488 499 489 500 for (i = 3; i < MSVCRT_fdend; i++) 490 501 if (MSVCRT_handles[i] != INVALID_HANDLE_VALUE) 491 502 { 492 _close(i);503 MSVCRT__close(i); 493 504 num_closed++; 494 505 } … … 506 517 HANDLE hand = msvcrt_fdtoh(fd); 507 518 508 TRACE(" :fd (%d) handle (%p)\n",fd,hand);519 TRACE("MSVCRT: _lseeki64 fd (%d) handle (%p)\n",fd,hand); 509 520 if (hand == INVALID_HANDLE_VALUE) 510 521 return -1; … … 516 527 } 517 528 518 TRACE(" :fd (%d) to 0x%08lx%08lx pos %s\n",529 TRACE("MSVCRT: _lseek fd (%d) to 0x%08lx%08lx pos %s\n", 519 530 fd,hoffset,(long)offset, 520 531 (whence==SEEK_SET)?"SEEK_SET": … … 549 560 * _lseek (MSVCRT.@) 550 561 */ 551 LONG _lseek(int fd, LONG offset, int whence)562 LONG MSVCRT__lseek(int fd, LONG offset, int whence) 552 563 { 553 564 return _lseeki64(fd, offset, whence); … … 565 576 HANDLE hand = msvcrt_fdtoh(fd); 566 577 567 TRACE(" :fd (%d) handle (%p)\n",fd,hand);578 TRACE("MSVCRT: _locking fd (%d) handle (%p)\n",fd,hand); 568 579 if (hand == INVALID_HANDLE_VALUE) 569 580 return -1; … … 597 608 ret = LockFile(hand, cur_locn, 0L, nbytes, 0L); 598 609 if (ret) break; 599 sleep (1);610 Sleep (1); 600 611 } 601 612 } … … 613 624 void MSVCRT_rewind(MSVCRT_FILE* file) 614 625 { 615 TRACE(" :file (%p) fd (%d)\n",file,file->_file);626 TRACE("MSVCRT: rewind file (%p) fd (%d)\n",file,file->_file); 616 627 MSVCRT_fseek(file, 0L, SEEK_SET); 617 628 MSVCRT_clearerr(file); … … 621 632 * _fdopen (MSVCRT.@) 622 633 */ 623 MSVCRT_FILE* _fdopen(int fd, const char *mode)634 MSVCRT_FILE* MSVCRT__fdopen(int fd, const char *mode) 624 635 { 625 636 MSVCRT_FILE* file = msvcrt_alloc_fp(fd); 626 637 627 TRACE(" :fd (%d) mode (%s) FILE* (%p)\n",fd,mode,file);638 TRACE("MSVCRT: _fdopen fd (%d) mode (%s) FILE* (%p)\n",fd,mode,file); 628 639 629 640 return file; … … 637 648 MSVCRT_FILE* file = msvcrt_alloc_fp(fd); 638 649 639 TRACE(" :fd (%d) mode (%s) FILE* (%p)\n",fd,debugstr_w(mode),file);650 TRACE("MSVCRT: _wfdopen fd (%d) mode (%s) FILE* (%p)\n",fd,debugstr_w(mode),file); 640 651 if (file) 641 652 MSVCRT_rewind(file); … … 647 658 * _filelength (MSVCRT.@) 648 659 */ 649 LONG _filelength(int fd) 650 { 651 LONG curPos = _lseek(fd, 0, SEEK_CUR); 660 LONG MSVCRT__filelength(int fd) 661 { 662 LONG curPos = MSVCRT__lseek(fd, 0, SEEK_CUR); 663 664 dprintf(("MSVCRT: _filelength")); 665 652 666 if (curPos != -1) 653 667 { 654 LONG endPos = _lseek(fd, 0, SEEK_END);668 LONG endPos = MSVCRT__lseek(fd, 0, SEEK_END); 655 669 if (endPos != -1) 656 670 { 657 671 if (endPos != curPos) 658 _lseek(fd, curPos, SEEK_SET);672 MSVCRT__lseek(fd, curPos, SEEK_SET); 659 673 return endPos; 660 674 } … … 666 680 * _fileno (MSVCRT.@) 667 681 */ 668 int _fileno(MSVCRT_FILE* file)669 { 670 TRACE(" :FILE* (%p) fd (%d)\n",file,file->_file);682 int MSVCRT__fileno(MSVCRT_FILE* file) 683 { 684 TRACE("MSVCRT: _fileno FILE* (%p) fd (%d)\n",file,file->_file); 671 685 return file->_file; 672 686 } … … 675 689 * _flushall (MSVCRT.@) 676 690 */ 677 int _flushall(void)691 int MSVCRT__flushall(void) 678 692 { 679 693 int num_flushed = 0, i = 3; 694 695 dprintf(("MSVCRT: _flushall")); 680 696 681 697 while(i < MSVCRT_fdend) … … 707 723 HANDLE hand = msvcrt_fdtoh(fd); 708 724 709 TRACE(" :fd (%d) stat (%p)\n",fd,buf);725 TRACE("MSVCRT: _fstati64 fd (%d) stat (%p)\n",fd,buf); 710 726 if (hand == INVALID_HANDLE_VALUE) 711 727 return -1; … … 722 738 if (!GetFileInformationByHandle(hand, &hfi)) 723 739 { 724 WARN(" :failed-last error (%ld)\n",GetLastError());740 WARN("MSVCRT: _fstati64 failed-last error (%ld)\n",GetLastError()); 725 741 MSVCRT__set_errno(ERROR_INVALID_PARAMETER); 726 742 return -1; … … 735 751 return 0; 736 752 } 753 737 754 738 755 /********************************************************************* … … 810 827 * _isatty (MSVCRT.@) 811 828 */ 812 int _isatty(int fd)829 int MSVCRT__isatty(int fd) 813 830 { 814 831 HANDLE hand = msvcrt_fdtoh(fd); … … 948 965 949 966 950 oflags |= _O_BINARY; /* FIXME: Default to text */ 951 952 if (oflags & _O_TEXT) 953 { 954 /* Dont warn when writing */ 955 if (ioflag & GENERIC_READ) 956 FIXME(":TEXT node not implemented\n"); 957 oflags &= ~_O_TEXT; 958 } 959 967 if (oflags & _O_BINARY) 968 ioflag |= _O_BINARY; 969 else if (oflags & _O_TEXT) 970 ioflag |= _O_TEXT; 971 else if (*__p__fmode() & _O_BINARY) 972 ioflag |= _O_BINARY; 973 else 974 ioflag |= _O_TEXT; /* default to TEXT*/ 975 960 976 switch( shflags ) 961 977 { … … 1001 1017 { 1002 1018 if (oflags & _O_TEMPORARY) 1003 MSVCRT_tempfiles[fd] = _strdup(path);1019 MSVCRT_tempfiles[fd] = MSVCRT__strdup(path); 1004 1020 if (ioflag & MSVCRT__IOAPPEND) 1005 _lseek(fd, 0, FILE_END);1021 MSVCRT__lseek(fd, 0, FILE_END); 1006 1022 } 1007 1023 … … 1037 1053 * _open (MSVCRT.@) 1038 1054 */ 1039 int _open( const char *path, int flags, ... )1055 int MSVCRT__open( const char *path, int flags, ... ) 1040 1056 { 1041 1057 va_list ap; 1042 int pmode; 1043 1044 va_start(ap, flags); 1045 pmode = va_arg(ap, int); 1046 va_end(ap); 1047 1048 return MSVCRT__sopen( path, flags, _SH_DENYNO, pmode ); 1058 1059 if (flags & _O_CREAT) 1060 { 1061 int pmode; 1062 va_start(ap, flags); 1063 pmode = va_arg(ap, int); 1064 va_end(ap); 1065 return MSVCRT__sopen( path, flags, _SH_DENYNO, pmode ); 1066 } 1067 else 1068 return MSVCRT__sopen( path, flags, _SH_DENYNO); 1049 1069 } 1050 1070 … … 1065 1085 if (patha && WideCharToMultiByte(CP_ACP,0,path,len,patha,len,NULL,NULL)) 1066 1086 { 1067 int retval = _open(patha,flags,pmode);1087 int retval = MSVCRT__open(patha,flags,pmode); 1068 1088 MSVCRT_free(patha); 1069 1089 return retval; … … 1077 1097 * _creat (MSVCRT.@) 1078 1098 */ 1079 int _creat(const char *path, int flags)1099 int MSVCRT__creat(const char *path, int flags) 1080 1100 { 1081 1101 int usedFlags = (flags & _O_TEXT)| _O_CREAT| _O_WRONLY| _O_TRUNC; 1082 return _open(path, usedFlags);1102 return MSVCRT__open(path, usedFlags); 1083 1103 } 1084 1104 … … 1107 1127 * _rmtmp (MSVCRT.@) 1108 1128 */ 1109 int _rmtmp(void)1129 int MSVCRT__rmtmp(void) 1110 1130 { 1111 1131 int num_removed = 0, i; … … 1114 1134 if (MSVCRT_tempfiles[i]) 1115 1135 { 1116 _close(i);1136 MSVCRT__close(i); 1117 1137 num_removed++; 1118 1138 } … … 1126 1146 * _read (MSVCRT.@) 1127 1147 */ 1128 int _read(int fd, void *buf, unsigned int count)1148 int MSVCRT__read(int fd, void *buf, unsigned int count) 1129 1149 { 1130 1150 DWORD num_read; … … 1137 1157 return -1; 1138 1158 1139 if (ReadFile(hand, buf, count, &num_read, NULL)) 1140 { 1141 if (num_read != count && MSVCRT_files[fd]) 1159 if (MSVCRT_flags[fd]& _O_BINARY) 1142 1160 { 1143 TRACE(":EOF\n"); 1144 MSVCRT_flags[fd] |= MSVCRT__IOEOF; 1145 /* 1146 MSVCRT_files[fd]->_flag |= MSVCRT__IOEOF; 1147 */ 1161 if (ReadFile(hand, buf, count, &num_read, NULL)) 1162 { 1163 if (num_read != count && MSVCRT_files[fd]) 1164 { 1165 TRACE(":EOF\n"); 1166 MSVCRT_flags[fd] |= MSVCRT__IOEOF; 1167 /* 1168 MSVCRT_files[fd]->_flag |= MSVCRT__IOEOF; 1169 */ 1170 } 1171 dprintf(("%s\n",debugstr_an(buf,num_read))); 1172 return num_read; 1173 } 1174 TRACE(":failed-last error (%ld)\n",GetLastError()); 1175 if (MSVCRT_files[fd]) 1176 MSVCRT_files[fd]->_flag |= MSVCRT__IOERR; 1177 return -1; 1148 1178 } 1149 return num_read; 1150 } 1151 TRACE(":failed-last error (%ld)\n",GetLastError()); 1152 if (MSVCRT_files[fd]) 1153 MSVCRT_files[fd]->_flag |= MSVCRT__IOERR; 1154 return -1; 1179 else 1180 { 1181 char cc, *s=(char*)buf,* buf_start=(char*)buf; 1182 unsigned int i; 1183 1184 for (i = 0 , num_read = 1; i < count && (num_read == 1);) 1185 { 1186 if (ReadFile(hand, &cc, 1, &num_read, NULL)) 1187 if (num_read == 1) 1188 if ((cc != '\r') || MSVCRT_flags[fd] & _O_BINARY) 1189 { 1190 *s++ = (char)cc; 1191 i++; 1192 } 1193 } 1194 if (num_read != 1) 1195 { 1196 TRACE(":EOF\n"); 1197 if (MSVCRT_files[fd]) 1198 MSVCRT_flags[fd] |= MSVCRT__IOEOF; 1199 /* 1200 MSVCRT_files[fd]->_flag |= MSVCRT__IOEOF; 1201 */ 1202 } 1203 1204 if (count > 4) 1205 dprintf(("%s\n",debugstr_an(buf_start, s-buf_start))); 1206 return s-buf_start; 1207 } 1208 return 0; 1155 1209 } 1156 1210 … … 1158 1212 * _getw (MSVCRT.@) 1159 1213 */ 1160 int _getw(MSVCRT_FILE* file)1214 int MSVCRT__getw(MSVCRT_FILE* file) 1161 1215 { 1162 1216 int i; 1163 if ( _read(file->_file, &i, sizeof(int)) != 1)1217 if (MSVCRT__read(file->_file, &i, sizeof(int)) != 1) 1164 1218 return MSVCRT_EOF; 1165 1219 return i; … … 1169 1223 * _setmode (MSVCRT.@) 1170 1224 */ 1171 int _setmode(int fd,int mode) 1172 { 1173 if (mode & _O_TEXT) 1174 FIXME("fd (%d) mode (%d) TEXT not implemented\n",fd,mode); 1175 return 0; 1225 int MSVCRT__setmode(int fd,int mode) 1226 { 1227 int ret = MSVCRT_flags[fd] & (_O_TEXT | _O_BINARY); 1228 if (mode & (~(_O_TEXT|_O_BINARY))) 1229 FIXME("fd (%d) mode (0x%08x) unknown\n",fd,mode); 1230 MSVCRT_flags[fd] &= ~(_O_TEXT|_O_BINARY); 1231 MSVCRT_flags[fd] |= mode & (_O_TEXT | _O_BINARY); 1232 return ret; 1176 1233 } 1177 1234 … … 1202 1259 as drive letter 1203 1260 */ 1204 if (isalpha( *path)&& (*(path+1)==':'))1261 if (isalpha((int)*path) && (*(path+1)==':')) 1205 1262 buf->st_dev = buf->st_rdev = toupper(*path) - 'A'; /* drive num */ 1206 1263 else 1207 buf->st_dev = buf->st_rdev = _getdrive() - 1;1264 buf->st_dev = buf->st_rdev = MSVCRT__getdrive() - 1; 1208 1265 1209 1266 plen = strlen(path); … … 1280 1337 buf->st_dev = buf->st_rdev = toupperW(*path - 'A'); /* drive num */ 1281 1338 else 1282 buf->st_dev = buf->st_rdev = _getdrive() - 1;1339 buf->st_dev = buf->st_rdev = MSVCRT__getdrive() - 1; 1283 1340 1284 1341 plen = strlenW(path); … … 1319 1376 * _tell (MSVCRT.@) 1320 1377 */ 1321 LONG _tell(int fd)1322 { 1323 return _lseek(fd, 0, SEEK_CUR);1378 LONG MSVCRT__tell(int fd) 1379 { 1380 return MSVCRT__lseek(fd, 0, SEEK_CUR); 1324 1381 } 1325 1382 … … 1327 1384 * _tempnam (MSVCRT.@) 1328 1385 */ 1329 char * _tempnam(const char *dir, const char *prefix)1386 char *MSVCRT__tempnam(const char *dir, const char *prefix) 1330 1387 { 1331 1388 char tmpbuf[MAX_PATH]; … … 1335 1392 { 1336 1393 TRACE("got name (%s)\n",tmpbuf); 1337 return _strdup(tmpbuf);1394 return MSVCRT__strdup(tmpbuf); 1338 1395 } 1339 1396 TRACE("failed (%ld)\n",GetLastError()); … … 1361 1418 * _umask (MSVCRT.@) 1362 1419 */ 1363 int _umask(int umask)1364 { 1365 int old_umask = MSVCRT_ umask;1366 TRACE(" (%d)\n",umask);1367 MSVCRT_ umask = umask;1420 int MSVCRT_umask(int umask) 1421 { 1422 int old_umask = MSVCRT__umask; 1423 TRACE("MSVCRT: _umask (%d)\n",umask); 1424 MSVCRT__umask = umask; 1368 1425 return old_umask; 1369 1426 } … … 1372 1429 * _utime (MSVCRT.@) 1373 1430 */ 1374 int _utime(const char* path, struct _utimbuf *t)1375 { 1376 int fd = _open(path, _O_WRONLY | _O_BINARY);1431 int MSVCRT_utime(const char* path, struct _utimbuf *t) 1432 { 1433 int fd = MSVCRT__open(path, _O_WRONLY | _O_BINARY); 1377 1434 1378 1435 if (fd > 0) 1379 1436 { 1380 1437 int retVal = _futime(fd, t); 1381 _close(fd);1438 MSVCRT__close(fd); 1382 1439 return retVal; 1383 1440 } … … 1395 1452 { 1396 1453 int retVal = _futime(fd, t); 1397 _close(fd);1454 MSVCRT__close(fd); 1398 1455 return retVal; 1399 1456 } … … 1404 1461 * _write (MSVCRT.@) 1405 1462 */ 1406 int _write(int fd, const void* buf, unsigned int count)1463 int MSVCRT__write(int fd, const void* buf, unsigned int count) 1407 1464 { 1408 1465 DWORD num_written; … … 1415 1472 #endif 1416 1473 if (hand == INVALID_HANDLE_VALUE) 1417 return -1; 1474 { 1475 *MSVCRT__errno() = MSVCRT_EBADF; 1476 return -1; 1477 } 1418 1478 1419 1479 /* If appending, go to EOF */ 1420 1480 if (MSVCRT_flags[fd] & MSVCRT__IOAPPEND) 1421 _lseek(fd, 0, FILE_END); 1422 1423 if (WriteFile(hand, buf, count, &num_written, NULL) 1424 && (num_written == count)) 1425 return num_written; 1426 1427 TRACE(":failed-last error (%ld)\n",GetLastError()); 1428 if (MSVCRT_files[fd]) 1429 MSVCRT_files[fd]->_flag |= MSVCRT__IOERR; 1430 1481 MSVCRT__lseek(fd, 0, FILE_END); 1482 1483 if (MSVCRT_flags[fd] & _O_BINARY) 1484 { 1485 if (WriteFile(hand, buf, count, &num_written, NULL) 1486 && (num_written >= count)) 1487 return num_written; 1488 TRACE(":failed-last error (%ld)\n",GetLastError()); 1489 if (MSVCRT_files[fd]) 1490 { 1491 MSVCRT_files[fd]->_flag |= MSVCRT__IOERR; 1492 *MSVCRT__errno() = MSVCRT_ENOSPC; 1493 } 1494 } 1495 else 1496 { 1497 char *s=(char*)buf, *buf_start=(char*)buf, *p; 1498 char crlf[]= {'\r','\n'}; 1499 unsigned int i; 1500 DWORD num_to_write; 1501 for (i = 0; i< count && !(MSVCRT_flags[fd] & MSVCRT__IOERR);i++, s++) 1502 { 1503 if (*s == '\n') 1504 { 1505 p = crlf; 1506 num_to_write = 2; 1507 } 1508 else 1509 { 1510 p = s; 1511 num_to_write = 1; 1512 } 1513 if ((WriteFile(hand, p, num_to_write, &num_written, NULL) == 0 ) || (num_written != num_to_write)) 1514 { 1515 TRACE(":failed-last error (%ld) num_written %ld\n",GetLastError(),num_written); 1516 if (MSVCRT_files[fd]) 1517 { 1518 MSVCRT_files[fd]->_flag |= MSVCRT__IOERR; 1519 *MSVCRT__errno() = MSVCRT_ENOSPC; 1520 return s - buf_start; 1521 } 1522 } 1523 } 1524 return s - buf_start; 1525 } 1431 1526 return -1; 1432 1527 } … … 1435 1530 * _putw (MSVCRT.@) 1436 1531 */ 1437 int _putw(int val, MSVCRT_FILE* file)1438 { 1439 return _write(file->_file, &val, sizeof(val)) == 1? val : MSVCRT_EOF;1532 int MSVCRT__putw(int val, MSVCRT_FILE* file) 1533 { 1534 return MSVCRT__write(file->_file, &val, sizeof(val)) == 1? val : MSVCRT_EOF; 1440 1535 } 1441 1536 … … 1455 1550 { 1456 1551 int r; 1457 r= _close(file->_file);1552 r=MSVCRT__close(file->_file); 1458 1553 return ((r==MSVCRT_EOF) || (file->_flag & MSVCRT__IOERR) ? MSVCRT_EOF : 0); 1459 1554 } … … 1481 1576 { 1482 1577 if(!file) { 1483 _flushall();1578 MSVCRT__flushall(); 1484 1579 return 0; 1485 1580 } else { … … 1505 1600 * _fgetchar (MSVCRT.@) 1506 1601 */ 1507 int _fgetchar(void)1602 int MSVCRT__fgetchar(void) 1508 1603 { 1509 1604 return MSVCRT_fgetc(MSVCRT_stdin); … … 1529 1624 if(file->_flag & MSVCRT__IONBF) { 1530 1625 unsigned char c; 1531 if ( _read(file->_file,&c,1) != 1) {1626 if (MSVCRT__read(file->_file,&c,1) != 1) { 1532 1627 file->_flag |= MSVCRT__IOEOF; 1533 1628 return MSVCRT_EOF; … … 1535 1630 return c; 1536 1631 } else { 1537 file->_cnt = _read(file->_file, file->_base, file->_bufsiz);1632 file->_cnt = MSVCRT__read(file->_file, file->_base, file->_bufsiz); 1538 1633 if(file->_cnt<0) file->_cnt = 0; 1539 1634 if(!file->_cnt) { … … 1589 1684 /********************************************************************* 1590 1685 * fgetwc (MSVCRT.@) 1686 * 1687 * In _O_TEXT mode, bultibyte characters are read from the file, dropping 1688 * the CR from CR/LF combinations 1591 1689 */ 1592 1690 MSVCRT_wint_t MSVCRT_fgetwc(MSVCRT_FILE* file) 1593 1691 { 1594 MSVCRT_wchar_t wc; 1595 if (_read(file->_file, &wc, sizeof(wc)) != sizeof(wc)) 1692 char c; 1693 1694 if (file->_flag & _O_BINARY) 1695 { 1696 MSVCRT_wchar_t wc; 1697 if (MSVCRT__read(file->_file, &wc, sizeof(wc)) != sizeof(wc)) 1698 return MSVCRT_WEOF; 1699 return wc; 1700 } 1701 c = MSVCRT_fgetc(file); 1702 if ((*__p___mb_cur_max() > 1) && MSVCRT_isleadbyte(c)) 1703 { 1704 FIXME("Treat Multibyte characters\n"); 1705 } 1706 if (c == MSVCRT_EOF) 1596 1707 return MSVCRT_WEOF; 1597 return wc; 1708 else 1709 return (MSVCRT_wint_t)c; 1598 1710 } 1599 1711 … … 1721 1833 } 1722 1834 1723 fd = _open(path, flags);1835 fd = MSVCRT__open(path, flags); 1724 1836 1725 1837 if (fd < 0) … … 1729 1841 TRACE(":got (%p)\n",file); 1730 1842 if (!file) 1731 _close(fd);1843 MSVCRT__close(fd); 1732 1844 1733 1845 return file; … … 1762 1874 * _fsopen (MSVCRT.@) 1763 1875 */ 1764 MSVCRT_FILE* _fsopen(const char *path, const char *mode, int share)1876 MSVCRT_FILE* MSVCRT__fsopen(const char *path, const char *mode, int share) 1765 1877 { 1766 1878 FIXME(":(%s,%s,%d),ignoring share mode!\n",path,mode,share); … … 1813 1925 } else { 1814 1926 unsigned char cc=c; 1815 return _write(file->_file, &cc, 1) == 1? c : MSVCRT_EOF;1927 return MSVCRT__write(file->_file, &cc, 1) == 1? c : MSVCRT_EOF; 1816 1928 } 1817 1929 } … … 1820 1932 * _fputchar (MSVCRT.@) 1821 1933 */ 1822 int _fputchar(int c)1934 int MSVCRT__fputchar(int c) 1823 1935 { 1824 1936 return MSVCRT_fputc(c, MSVCRT_stdout); … … 1847 1959 return 0; 1848 1960 } 1849 if(rcnt) pread = _read(file->_file,ptr, rcnt);1961 if(rcnt) pread = MSVCRT__read(file->_file,ptr, rcnt); 1850 1962 if (MSVCRT_flags[file->_file] & MSVCRT__IOEOF) 1851 1963 /* expose feof condition in the flags … … 1915 2027 int MSVCRT_fsetpos(MSVCRT_FILE* file, MSVCRT_fpos_t *pos) 1916 2028 { 1917 return _lseek(file->_file,*pos,SEEK_SET);2029 return MSVCRT__lseek(file->_file,*pos,SEEK_SET); 1918 2030 } 1919 2031 … … 1937 2049 file->_flag &= ~(MSVCRT__IOREAD|MSVCRT__IOWRT); 1938 2050 } 1939 return ( _lseek(file->_file,offset,whence) == -1)?-1:0;2051 return (MSVCRT__lseek(file->_file,offset,whence) == -1)?-1:0; 1940 2052 } 1941 2053 … … 1954 2066 } 1955 2067 } 1956 pos = _tell(file->_file);2068 pos = MSVCRT__tell(file->_file); 1957 2069 if(pos == -1) return pos; 1958 2070 return off + pos; … … 1986 2098 int res=msvcrt_flush_buffer(file); 1987 2099 if(!res) { 1988 int pwritten = _write(file->_file, ptr, wrcnt);2100 int pwritten = MSVCRT__write(file->_file, ptr, wrcnt); 1989 2101 if (pwritten <= 0) pwritten=0; 1990 2102 written += pwritten; … … 1999 2111 int MSVCRT_fputs(const char *s, MSVCRT_FILE* file) 2000 2112 { 2001 size_t len = strlen(s); 2002 return MSVCRT_fwrite(s,sizeof(*s),len,file) == len ? 0 : MSVCRT_EOF; 2113 size_t i, len = strlen(s); 2114 if (file->_flag & _O_BINARY) 2115 return MSVCRT_fwrite(s,sizeof(*s),len,file) == len ? 0 : MSVCRT_EOF; 2116 for (i=0; i<len; i++) 2117 if (MSVCRT_fputc(s[i], file) == MSVCRT_EOF) 2118 return MSVCRT_EOF; 2119 return 0; 2003 2120 } 2004 2121 … … 2008 2125 int MSVCRT_fputws(const MSVCRT_wchar_t *s, MSVCRT_FILE* file) 2009 2126 { 2010 size_t len = strlenW(s); 2011 return MSVCRT_fwrite(s,sizeof(*s),len,file) == len ? 0 : MSVCRT_EOF; 2012 } 2127 size_t i, len = strlenW(s); 2128 if (file->_flag & _O_BINARY) 2129 return MSVCRT_fwrite(s,sizeof(*s),len,file) == len ? 0 : MSVCRT_EOF; 2130 for (i=0; i<len; i++) 2131 { 2132 if ((s[i] == L'\n') && (MSVCRT_fputc('\r', file) == MSVCRT_EOF)) 2133 return MSVCRT_WEOF; 2134 if (MSVCRT_fputwc(s[i], file) == MSVCRT_WEOF) 2135 return MSVCRT_WEOF; 2136 } 2137 return 0; 2138 } 2139 2013 2140 2014 2141 /********************************************************************* … … 2239 2366 char *filename = MSVCRT_tmpnam(NULL); 2240 2367 int fd; 2241 fd = _open(filename, _O_CREAT | _O_BINARY | _O_RDWR | _O_TEMPORARY);2368 fd = MSVCRT__open(filename, _O_CREAT | _O_BINARY | _O_RDWR | _O_TEMPORARY); 2242 2369 if (fd != -1) 2243 2370 return msvcrt_alloc_fp(fd); … … 2257 2384 * The code below handles both cases 2258 2385 */ 2259 while ((written = vsnprintf(mem, resize, format, valist)) == -1 || 2386 dprintf(("MSVCRT: vfprintf %p %s",file,format)); 2387 while ((written = _vsnprintf(mem, resize, format, valist)) == -1 || 2260 2388 written > resize) 2261 2389 { … … 2398 2526 return res; 2399 2527 } 2528 2529 /********************************************************************* 2530 * _wstati64 (MSVCRT.@) 2531 */ 2532 int _wstati64(const MSVCRT(wchar_t)* path, struct _stati64 * buf) 2533 { 2534 LPSTR asciipath; 2535 int ret,len; 2536 2537 TRACE("MSVCRT: _wstati64 file (%s) %x buf(%p)\n",debugstr_w(path),sizeof(*buf),buf); 2538 2539 len = WideCharToMultiByte( CP_ACP, 0, path, -1, NULL, 0, 0, NULL); 2540 asciipath = (LPSTR)MSVCRT_malloc(len); 2541 WideCharToMultiByte(CP_ACP, 0, path, -1, asciipath, len, 0, NULL ); 2542 2543 ret = _stati64(asciipath,buf); 2544 2545 MSVCRT_free(asciipath); 2546 2547 return 0; 2548 } -
trunk/src/msvcrt/heap.c
r9633 r10005 23 23 24 24 #include "msvcrt.h" 25 26 #include <string.h> 27 25 28 #include "ms_errno.h" 26 29 … … 43 46 static int MSVCRT_new_mode; 44 47 45 46 48 /********************************************************************* 47 49 * ??2@YAPAXI@Z (MSVCRT.@) … … 50 52 { 51 53 void *retval = HeapAlloc(GetProcessHeap(), 0, size); 52 TRACE(" (%ld) returning %p\n", size, retval);54 TRACE("MSVCRT: operator_new (%ld) returning %p\n", size, retval); 53 55 LOCK_HEAP; 54 56 if(!retval && MSVCRT_new_handler) … … 63 65 void MSVCRT_operator_delete(void *mem) 64 66 { 65 TRACE(" (%p)\n", mem);67 TRACE("MSVCRT: operator_delete (%p)\n", mem); 66 68 HeapFree(GetProcessHeap(), 0, mem); 67 69 } … … 73 75 MSVCRT_new_handler_func MSVCRT__query_new_handler(void) 74 76 { 77 dprintf(("MSVCRT: _query_new_handler")); 75 78 return MSVCRT_new_handler; 76 79 } … … 82 85 int MSVCRT__query_new_mode(void) 83 86 { 87 dprintf(("MSVCRT: _query_new_mode")); 84 88 return MSVCRT_new_mode; 85 89 } … … 91 95 { 92 96 MSVCRT_new_handler_func old_handler; 97 98 dprintf(("MSVCRT: _set_new_mode")); 99 93 100 LOCK_HEAP; 94 101 old_handler = MSVCRT_new_handler; … … 103 110 MSVCRT_new_handler_func MSVCRT_set_new_handler(void *func) 104 111 { 105 TRACE(" (%p)\n",func);112 TRACE("MSVCRT: set_new_handler (%p)\n",func); 106 113 MSVCRT__set_new_handler(NULL); 107 114 return NULL; … … 114 121 { 115 122 int old_mode; 123 TRACE("MSVCRT: set_new_mode (%d)\n",mode); 116 124 LOCK_HEAP; 117 125 old_mode = MSVCRT_new_mode; … … 126 134 int _callnewh(unsigned long size) 127 135 { 136 TRACE("MSVCRT: _callnewh (%d)\n",size); 128 137 if(MSVCRT_new_handler) 129 138 (*MSVCRT_new_handler)(size); … … 136 145 void* _expand(void* mem, MSVCRT_size_t size) 137 146 { 147 TRACE("MSVCRT: _expand (%p)\n",mem); 138 148 return HeapReAlloc(GetProcessHeap(), HEAP_REALLOC_IN_PLACE_ONLY, mem, size); 139 149 } … … 142 152 * _heapchk (MSVCRT.@) 143 153 */ 144 int _heapchk(void) 145 { 154 int MSVCRT__heapchk(void) 155 { 156 TRACE("MSVCRT: _heapchk"); 146 157 if (!HeapValidate( GetProcessHeap(), 0, NULL)) 147 158 { … … 155 166 * _heapmin (MSVCRT.@) 156 167 */ 157 int _heapmin(void) 158 { 168 int MSVCRT__heapmin(void) 169 { 170 TRACE("MSVCRT: _heapmin"); 159 171 if (!HeapCompact( GetProcessHeap(), 0 )) 160 172 { … … 169 181 * _heapwalk (MSVCRT.@) 170 182 */ 171 int _heapwalk(_HEAPINFO* next)183 int MSVCRT__heapwalk(_HEAPINFO* next) 172 184 { 173 185 PROCESS_HEAP_ENTRY phe; 186 187 TRACE("MSVCRT: _heapwalk"); 174 188 175 189 LOCK_HEAP; … … 210 224 * _heapset (MSVCRT.@) 211 225 */ 212 int _heapset(unsigned int value)226 int MSVCRT__heapset(unsigned int value) 213 227 { 214 228 int retval; 215 229 _HEAPINFO heap; 216 230 231 TRACE("MSVCRT: _heapset"); 232 217 233 memset( &heap, 0, sizeof(_HEAPINFO) ); 218 234 LOCK_HEAP; 219 while ((retval = _heapwalk(&heap)) == _HEAPOK)235 while ((retval = MSVCRT__heapwalk(&heap)) == _HEAPOK) 220 236 { 221 237 if (heap._useflag == _FREEENTRY) … … 229 245 * _heapadd (MSVCRT.@) 230 246 */ 231 int _heapadd(void* mem, MSVCRT_size_t size)232 { 233 TRACE(" (%p,%d) unsupported in Win32\n", mem,size);247 int MSVCRT__heapadd(void* mem, MSVCRT_size_t size) 248 { 249 TRACE("MSVCRT: _heapadd (%p,%d) unsupported in Win32\n", mem,size); 234 250 *MSVCRT__errno() = MSVCRT_ENOSYS; 235 251 return -1; … … 239 255 * _msize (MSVCRT.@) 240 256 */ 241 MSVCRT_size_t _msize(void* mem)257 MSVCRT_size_t MSVCRT__msize(void* mem) 242 258 { 243 259 long size = HeapSize(GetProcessHeap(),0,mem); 260 261 TRACE("MSVCRT: _msize (%p)",mem); 262 244 263 if (size == -1) 245 264 { … … 255 274 void* MSVCRT_calloc(MSVCRT_size_t size, MSVCRT_size_t count) 256 275 { 257 return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size * count ); 276 void *ret; 277 ret = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size * count ); 278 TRACE("MSVCRT: calloc (%d,%d) returned %p",size, count, ret); 279 return ret; 258 280 } 259 281 … … 263 285 void MSVCRT_free(void* ptr) 264 286 { 265 dprintf(("MSVCRT _free %x ptr",ptr));287 dprintf(("MSVCRT: free %x ptr",ptr)); 266 288 HeapFree(GetProcessHeap(),0,ptr); 267 289 } … … 269 291 void* MSVCRT(memset)(void* ptr,int fill,MSVCRT(size_t) size) 270 292 { 271 dprintf(("MSVCRT _memset %x(%d bytes) with %d",ptr,size,fill));293 dprintf(("MSVCRT: memset %x(%d bytes) with %d",ptr,size,fill)); 272 294 return memset(ptr,fill,size); 273 295 } … … 276 298 void* MSVCRT(memcpy)(void* ptr,const void* ptr2,MSVCRT(size_t) size) 277 299 { 278 dprintf(("MSVCRT _memcpy %x->%x (%d bytes)",ptr2,ptr,size));300 dprintf(("MSVCRT: memcpy %x->%x (%d bytes)",ptr2,ptr,size)); 279 301 return memcpy(ptr,ptr2,size); 280 302 } … … 287 309 { 288 310 void *ret = HeapAlloc(GetProcessHeap(),0,size); 289 dprintf(("MSVCRT _malloc of %d size returned %x",size,ret));311 dprintf(("MSVCRT: malloc of %d size returned %x",size,ret)); 290 312 if (!ret) 291 313 MSVCRT__set_errno(GetLastError()); … … 298 320 void* MSVCRT_realloc(void* ptr, MSVCRT_size_t size) 299 321 { 300 dprintf(("MSVCRT _realloc %x",ptr));322 dprintf(("MSVCRT: realloc %x",ptr)); 301 323 return HeapReAlloc(GetProcessHeap(), 0, ptr, size); 302 324 } -
trunk/src/msvcrt/locale.c
r9633 r10005 22 22 #else 23 23 #include <emxheader.h> 24 #include <stdlib.h> 25 #include <stdio.h> 26 #include <string.h> 27 #include <ctype.h> 24 28 #endif 25 29 … … 88 92 for (i = 0; i < sizeof(_country_synonyms)/sizeof(char*); i += 2 ) 89 93 { 90 if (! strcasecmp(_country_synonyms[i],name))94 if (!_stricmp(_country_synonyms[i],name)) 91 95 { 92 96 TRACE(":Mapping synonym %s to %s\n",name,_country_synonyms[i+1]); … … 126 130 return 0; 127 131 /* Partial matches are allowed, e.g. "Germ" matches "Germany" */ 128 return ! strncasecmp(cmp, buff, strlen(cmp));132 return !_strnicmp(cmp, buff, strlen(cmp)); 129 133 } 130 134 … … 227 231 { 228 232 /* Special codepage values: OEM & ANSI */ 229 if ( strcasecmp(locale->search_codepage,"OCP"))233 if (_stricmp(locale->search_codepage,"OCP")) 230 234 { 231 235 GetLocaleInfoA(lcid, LOCALE_IDEFAULTCODEPAGE, 232 236 locale->found_codepage, MAX_ELEM_LEN); 233 237 } 234 if ( strcasecmp(locale->search_codepage,"ACP"))238 if (_stricmp(locale->search_codepage,"ACP")) 235 239 { 236 240 GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE, … … 261 265 } 262 266 263 extern int snprintf(char *, int, const char *, ...);264 267 265 268 /* INTERNAL: Set ctype behaviour for a codepage */ … … 315 318 int lc_all = 0; 316 319 317 TRACE(" (%d %s)\n",category,locale);320 TRACE("MSVCRT: setlocale (%d %s)\n",category,locale); 318 321 319 322 if (category < MSVCRT_LC_MIN || category > MSVCRT_LC_MAX) … … 445 448 MSVCRT_current_lc_all_lcid = lcid; 446 449 447 snprintf(MSVCRT_current_lc_all,MAX_LOCALE_LENGTH,"%s_%s.%s",450 _snprintf(MSVCRT_current_lc_all,MAX_LOCALE_LENGTH,"%s_%s.%s", 448 451 lc.found_language,lc.found_country,lc.found_codepage); 449 452 … … 522 525 { 523 526 LOCK_LOCALE; 527 dprintf(("MSVCRT: _setmbcp %d",cp)); 524 528 if (MSVCRT_current_lc_all_cp != cp) 525 529 { … … 535 539 int _getmbcp(void) 536 540 { 541 dprintf(("MSVCRT: _getmbcp")); 537 542 return MSVCRT_current_lc_all_cp; 538 543 } 544 545 /********************************************************************* 546 * __crtLCMapStringA (MSVCRT.@) 547 */ 548 int __crtLCMapStringA( 549 LCID lcid, DWORD mapflags, const char* src, int srclen, char* dst, 550 int dstlen, unsigned int codepage, int xflag 551 ) { 552 FIXME("(lcid %lx, flags %lx, %s(%d), %p(%d), %x, %d), partial stub!\n", 553 lcid,mapflags,src,srclen,dst,dstlen,codepage,xflag); 554 /* FIXME: A bit incorrect. But msvcrt itself just converts its 555 * arguments to wide strings and then calls LCMapStringW 556 */ 557 return LCMapStringA(lcid,mapflags,src,srclen,dst,dstlen); 558 } -
trunk/src/msvcrt/lock.c
r9633 r10005 101 101 void _lock( int locknum ) 102 102 { 103 TRACE( " (%d)\n", locknum );103 TRACE( "MSVCRT: _lock (%d)\n", locknum ); 104 104 105 105 /* If the lock doesn't exist yet, create it */ … … 130 130 void _unlock( int locknum ) 131 131 { 132 TRACE( " (%d)\n", locknum );132 TRACE( "MSVCRT: _unlock (%d)\n", locknum ); 133 133 134 134 LeaveCriticalSection( &(lock_table[ locknum ].crit) ); -
trunk/src/msvcrt/main.c
r9633 r10005 22 22 #include "msvcrt/locale.h" 23 23 #include "msvcrt/stdio.h" 24 24 #include <string.h> 25 25 #include "wine/debug.h" 26 26 … … 47 47 48 48 49 unsigned long _DLL_InitTerm (unsigned long mod_handle,50 unsigned long flag)51 {52 switch (flag)53 {54 case 0:55 if (_CRT_init () != 0)56 return 0;57 __ctordtorInit ();58 59 dllHandle = RegisterLxDll(mod_handle, MSVCRT_Init, 0,0,0,0);60 61 return 1;62 case 1:63 __ctordtorTerm ();64 _CRT_term ();65 66 if(dllHandle) {67 UnregisterLxDll(dllHandle);68 }69 70 return 1;71 default:72 return 0;73 }74 return 1;75 }76 77 49 /********************************************************************* 78 50 * Init … … 90 62 { 91 63 case DLL_PROCESS_ATTACH: 92 64 if (!msvcrt_init_tls()) 93 65 return FALSE; 94 66 msvcrt_init_mt_locks(); -
trunk/src/msvcrt/mainmsvcrt20.c
r9633 r10005 18 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 #include <windows.h> 21 #include <win32type.h> 22 #include <stdlib.h> 23 #include <stdio.h> 24 #include <string.h> 25 #include <odin.h> 26 #include <odinlx.h> 27 #include <misc.h> /*PLF Wed 98-03-18 23:18:15*/ 28 #include <initdll.h> 29 #include <exitlist.h> 30 #include <os2sel.h> 31 20 32 #include "msvcrt.h" 21 33 #define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF) … … 37 49 typedef void (*MSVCRT_free_func)(void*); 38 50 39 int _CRT_init (void);40 void _CRT_term (void);41 void __ctordtorInit (void);42 void __ctordtorTerm (void);43 44 51 static HMODULE dllHandle = 0; 45 52 … … 53 60 { 54 61 case 0: 55 if (_CRT_init () != 0)56 return 0;57 __ctordtorInit ();58 62 59 63 dllHandle = RegisterLxDll(mod_handle, MSVCRT20_Init, 0,0,0,0); 64 return 1; 60 65 61 return 1;62 66 case 1: 63 __ctordtorTerm ();64 _CRT_term ();65 67 66 68 if(dllHandle) { 67 69 UnregisterLxDll(dllHandle); 68 70 } 71 return 1; 69 72 70 return 1;71 73 default: 72 74 return 0; … … 80 82 BOOL WINAPI MSVCRT20_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 81 83 { 82 return MSVCRT_Init(hinstDLL, fdwReason, lpvReserved);84 return TRUE; 83 85 } 84 86 -
trunk/src/msvcrt/mainmsvcrt40.c
r9633 r10005 18 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 21 #include <windows.h> 22 #include <win32type.h> 23 #include <stdlib.h> 24 #include <stdio.h> 25 #include <string.h> 26 #include <odin.h> 27 #include <odinlx.h> 28 #include <misc.h> /*PLF Wed 98-03-18 23:18:15*/ 29 #include <initdll.h> 30 #include <exitlist.h> 31 #include <os2sel.h> 32 20 33 #include "msvcrt.h" 21 34 #define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF) … … 37 50 typedef void (*MSVCRT_free_func)(void*); 38 51 39 int _CRT_init (void);40 void _CRT_term (void);41 void __ctordtorInit (void);42 void __ctordtorTerm (void);43 44 52 static HMODULE dllHandle = 0; 45 53 … … 53 61 { 54 62 case 0: 55 if (_CRT_init () != 0)56 return 0;57 __ctordtorInit ();58 59 63 dllHandle = RegisterLxDll(mod_handle, MSVCRT40_Init, 0,0,0,0); 60 61 return 1; 64 return 1; 62 65 case 1: 63 __ctordtorTerm ();64 _CRT_term ();65 66 66 67 if(dllHandle) { … … 80 81 BOOL WINAPI MSVCRT40_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 81 82 { 82 return MSVCRT_Init(hinstDLL, fdwReason, lpvReserved);83 return TRUE; 83 84 } 84 85 -
trunk/src/msvcrt/math.c
r9633 r10005 20 20 #ifdef __WIN32OS2__ 21 21 #include <emxheader.h> 22 #include <stdlib.h> 23 #include <string.h> 24 #include <math.h> 25 extern double logb(double); 26 extern double scalb(double,double); 22 27 #else 23 28 #include "config.h" … … 29 34 #define __USE_ISOC9X 1 30 35 #define __USE_ISOC99 1 31 #include <math.h> 36 32 37 #ifdef HAVE_IEEEFP_H 33 38 #include <ieeefp.h> … … 43 48 #ifndef finite /* Could be a macro */ 44 49 #ifdef isfinite 45 #define finite(x) isfinite(x) 50 #define finite(x) isfinite(x) 46 51 #else 47 52 #define finite(x) (!isnan(x)) /* At least catch some cases */ … … 135 140 { 136 141 FPU_DOUBLE(x); 142 dprintf(("MSVCRT: _CIacos")); 137 143 if (x < -1.0 || x > 1.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 138 144 return acos(x); … … 145 151 { 146 152 FPU_DOUBLE(x); 153 dprintf(("MSVCRT: _CIacos")); 147 154 if (x < -1.0 || x > 1.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 148 155 return asin(x); … … 155 162 { 156 163 FPU_DOUBLE(x); 164 dprintf(("MSVCRT: _CIacos")); 157 165 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 158 166 return atan(x); … … 165 173 { 166 174 FPU_DOUBLES(x,y); 175 dprintf(("MSVCRT: _CIacos")); 167 176 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 168 177 return atan2(x,y); … … 175 184 { 176 185 FPU_DOUBLE(x); 186 dprintf(("MSVCRT: _CIacos")); 177 187 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 178 188 return cos(x); … … 185 195 { 186 196 FPU_DOUBLE(x); 197 dprintf(("MSVCRT: _CIacos")); 187 198 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 188 199 return cosh(x); … … 195 206 { 196 207 FPU_DOUBLE(x); 208 dprintf(("MSVCRT: _CIacos")); 197 209 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 198 210 return exp(x); … … 205 217 { 206 218 FPU_DOUBLES(x,y); 207 if (!finite(x) || !finite(y)) *MSVCRT__errno() = MSVCRT_EDOM; 219 dprintf(("MSVCRT: _CIfmod %f %f",x,y)); 220 if (!finite(x) || !finite(y)) { *MSVCRT__errno() = MSVCRT_EDOM; dprintf(("ERROR!")); } 221 dprintf(("MSVCRT: _CIfmod returning %f",fmod(x,y))); 208 222 return fmod(x,y); 209 223 } … … 215 229 { 216 230 FPU_DOUBLE(x); 231 dprintf(("MSVCRT: _CIacos")); 217 232 if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 218 233 if (x == 0.0) *MSVCRT__errno() = MSVCRT_ERANGE; … … 226 241 { 227 242 FPU_DOUBLE(x); 243 dprintf(("MSVCRT: _CIacos")); 228 244 if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 229 245 if (x == 0.0) *MSVCRT__errno() = MSVCRT_ERANGE; … … 238 254 double z; 239 255 FPU_DOUBLES(x,y); 256 dprintf(("MSVCRT: _CIacos")); 240 257 /* FIXME: If x < 0 and y is not integral, set EDOM */ 241 258 z = pow(x,y); … … 250 267 { 251 268 FPU_DOUBLE(x); 269 dprintf(("MSVCRT: _CIacos")); 252 270 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 253 271 return sin(x); … … 260 278 { 261 279 FPU_DOUBLE(x); 280 dprintf(("MSVCRT: _CIacos")); 262 281 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 263 282 return sinh(x); … … 270 289 { 271 290 FPU_DOUBLE(x); 291 dprintf(("MSVCRT: _CIacos")); 272 292 if (x < 0.0 || !finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 273 293 return sqrt(x); … … 280 300 { 281 301 FPU_DOUBLE(x); 302 dprintf(("MSVCRT: _CIacos")); 282 303 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 283 304 return tan(x); … … 290 311 { 291 312 FPU_DOUBLE(x); 313 dprintf(("MSVCRT: _CIacos")); 292 314 if (!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM; 293 315 return tanh(x); … … 324 346 int _fpclass(double num) 325 347 { 348 dprintf(("MSVCRT: _fpclass")); 326 349 #if defined(HAVE_FPCLASS) || defined(fpclass) 327 350 switch (fpclass( num )) … … 358 381 * _rotl (MSVCRT.@) 359 382 */ 360 unsigned int _rotl(unsigned int num, int shift)383 unsigned int MSVCRT__rotl(unsigned int num, int shift) 361 384 { 362 385 shift &= 31; … … 369 392 double _logb(double num) 370 393 { 394 dprintf(("MSVCRT: _logb")); 371 395 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM; 372 396 return logb(num); … … 376 400 * _lrotl (MSVCRT.@) 377 401 */ 378 unsigned long _lrotl(unsigned long num, int shift) 379 { 402 unsigned long MSVCRT__lrotl(unsigned long num, int shift) 403 { 404 dprintf(("MSVCRT: _lrotl")); 380 405 shift &= 0x1f; 381 406 return (num << shift) | (num >> (32-shift)); … … 385 410 * _lrotr (MSVCRT.@) 386 411 */ 387 unsigned long _lrotr(unsigned long num, int shift) 388 { 412 unsigned long MSVCRT__lrotr(unsigned long num, int shift) 413 { 414 dprintf(("MSVCRT: _lrotr")); 389 415 shift &= 0x1f; 390 416 return (num >> shift) | (num << (32-shift)); … … 394 420 * _rotr (MSVCRT.@) 395 421 */ 396 unsigned int _rotr(unsigned int num, int shift) 397 { 422 unsigned int MSVCRT__rotr(unsigned int num, int shift) 423 { 424 dprintf(("MSVCRT: _rotr")); 398 425 shift &= 0x1f; 399 426 return (num >> shift) | (num << (32-shift)); … … 406 433 { 407 434 /* Note - Can't forward directly as libc expects y as double */ 435 dprintf(("MSVCRT: _scalb")); 408 436 double dblpower = (double)power; 409 437 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM; … … 414 442 * _matherr (MSVCRT.@) 415 443 */ 416 int _matherr(MSVCRT_exception *e)444 int MSVCRT__matherr(MSVCRT_exception *e) 417 445 { 418 446 if (e) … … 478 506 { 479 507 double z = ldexp(num,exp); 480 508 dprintf(("MSVCRT: ldexpp")); 481 509 if (!finite(z)) 482 510 *MSVCRT__errno() = MSVCRT_ERANGE; … … 489 517 * _cabs (MSVCRT.@) 490 518 */ 491 double _cabs(MSVCRT_complex num) 492 { 519 double MSVCRT__cabs(MSVCRT_complex num) 520 { 521 dprintf(("MSVCRT: _cabs")); 493 522 return sqrt(num.real * num.real + num.imaginary * num.imaginary); 494 523 } … … 499 528 double _chgsign(double num) 500 529 { 530 dprintf(("MSVCRT: _chgsign")); 501 531 /* FIXME: +-infinity,Nan not tested */ 502 532 return -num; … … 506 536 * _control87 (MSVCRT.@) 507 537 */ 508 unsigned int _control87(unsigned int newval, unsigned int mask)538 unsigned int MSVCRT__control87(unsigned int newval, unsigned int mask) 509 539 { 510 540 #if defined(__GNUC__) && defined(__i386__) … … 579 609 { 580 610 #ifdef __i386__ 581 return _control87( newval, mask & ~_EM_DENORMAL );611 return MSVCRT__control87( newval, mask & ~_EM_DENORMAL ); 582 612 #else 583 613 FIXME(":Not Implemented!\n"); … … 589 619 * _copysign (MSVCRT.@) 590 620 */ 591 double _copysign(double num, double sign) 592 { 621 double MSVCRT__copysign(double num, double sign) 622 { 623 dprintf(("MSVCRT: _CIacos")); 593 624 /* FIXME: Behaviour for Nan/Inf? */ 594 625 if (sign < 0.0) … … 602 633 int _finite(double num) 603 634 { 635 dprintf(("MSVCRT: _finite for %f returns %d",num, finite(num)?1:0)); 604 636 return (finite(num)?1:0); /* See comment for _isnan() */ 605 637 } … … 608 640 * _fpreset (MSVCRT.@) 609 641 */ 610 void _fpreset(void)642 void MSVCRT__fpreset(void) 611 643 { 612 644 #if defined(__GNUC__) && defined(__i386__) … … 625 657 * Do the same, as the result may be used in calculations 626 658 */ 659 dprintf(("MSVCRT: _isnan for %f returns %d",num, isnan(num)?1:0)); 627 660 return isnan(num) ? 1 : 0; 628 661 } … … 631 664 * _y0 (MSVCRT.@) 632 665 */ 633 double _y0(double num)666 double MSVCRT__y0(double num) 634 667 { 635 668 double retval; 669 dprintf(("MSVCRT: _CIacos")); 636 670 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM; 637 671 retval = y0(num); … … 647 681 * _y1 (MSVCRT.@) 648 682 */ 649 double _y1(double num)683 double MSVCRT__y1(double num) 650 684 { 651 685 double retval; 686 dprintf(("MSVCRT: _CIacos")); 652 687 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM; 653 688 retval = y1(num); … … 663 698 * _yn (MSVCRT.@) 664 699 */ 665 double _yn(int order, double num)700 double MSVCRT__yn(int order, double num) 666 701 { 667 702 double retval; 703 dprintf(("MSVCRT: _CIacos")); 668 704 if (!finite(num)) *MSVCRT__errno() = MSVCRT_EDOM; 669 705 retval = yn(order,num); … … 679 715 * _nextafter (MSVCRT.@) 680 716 */ 681 double _nextafter(double num, double next)717 double MSVCRT__nextafter(double num, double next) 682 718 { 683 719 double retval; 720 dprintf(("MSVCRT: _CIacos")); 684 721 if (!finite(num) || !finite(next)) *MSVCRT__errno() = MSVCRT_EDOM; 685 retval = nextafter(num,next);722 retval = MSVCRT__nextafter(num,next); 686 723 return retval; 724 } 725 726 /********************************************************************* 727 * _ecvt (MSVCRT.@) 728 */ 729 char *_ecvt( double number, int ndigits, int *decpt, int *sign ) 730 { 731 MSVCRT_thread_data *data = msvcrt_get_thread_data(); 732 char *dec; 733 734 if (!data->efcvt_buffer) 735 data->efcvt_buffer = MSVCRT_malloc( 80 ); /* ought to be enough */ 736 737 _snprintf(data->efcvt_buffer, 80, "%.*e", ndigits /* FIXME wrong */, number); 738 *sign = (number < 0); 739 dec = strchr(data->efcvt_buffer, '.'); 740 *decpt = (dec) ? dec - data->efcvt_buffer : -1; 741 return data->efcvt_buffer; 742 } 743 744 /*********************************************************************** 745 * _fcvt (MSVCRT.@) 746 */ 747 char *_fcvt( double number, int ndigits, int *decpt, int *sign ) 748 { 749 MSVCRT_thread_data *data = msvcrt_get_thread_data(); 750 char *dec; 751 752 if (!data->efcvt_buffer) 753 data->efcvt_buffer = MSVCRT_malloc( 80 ); /* ought to be enough */ 754 755 _snprintf(data->efcvt_buffer, 80, "%.*e", ndigits, number); 756 *sign = (number < 0); 757 dec = strchr(data->efcvt_buffer, '.'); 758 *decpt = (dec) ? dec - data->efcvt_buffer : -1; 759 return data->efcvt_buffer; 760 } 761 762 /*********************************************************************** 763 * _gcvt (MSVCRT.@) 764 * 765 * FIXME: uses both E and F. 766 */ 767 char *MSVCRT__gcvt( double number, int ndigit, char *buff ) 768 { 769 sprintf(buff, "%.*E", ndigit, number); 770 return buff; 687 771 } 688 772 … … 695 779 */ 696 780 #ifdef __i386__ 697 LONGLONGMSVCRT_div(int num, int denom)698 { 699 LONGLONGretval;781 long long MSVCRT_div(int num, int denom) 782 { 783 long long retval; 700 784 div_t dt = div(num,denom); 701 retval = ((LONGLONG)dt.rem << 32) | dt.quot; 785 dprintf(("MSVCRT: div")); 786 retval = ((long long)dt.rem << 32) | dt.quot; 702 787 return retval; 703 788 } … … 731 816 ULONGLONG retval; 732 817 ldiv_t ldt = ldiv(num,denom); 818 dprintf(("MSVCRT: ldiv")); 733 819 retval = ((ULONGLONG)ldt.rem << 32) | (ULONG)ldt.quot; 734 820 return retval; … … 1001 1087 TRACE("(): stub\n"); 1002 1088 } 1089 1090 1091 double MSVCRT_atof (__const__ char * str) 1092 { 1093 double res; 1094 res = atof(str); 1095 dprintf(("MSVCRT: _atof - convert %s - result %f",str,res)); 1096 return res; 1097 } -
trunk/src/msvcrt/mbcs.c
r9633 r10005 35 35 #include "wine/debug.h" 36 36 37 #include <string.h> 38 #include <ctype.h> 39 37 40 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); 38 41 … … 67 70 unsigned char* __p__mbctype(void) 68 71 { 72 dprintf(("MSVCRT: Query for __p__mbctype")); 69 73 return MSVCRT_mbctype; 70 74 } … … 75 79 int* __p___mb_cur_max(void) 76 80 { 81 dprintf(("MSVCRT: Query for __p__mb_cur_max")); 77 82 return &MSVCRT___mb_cur_max; 78 83 } … … 83 88 unsigned int _mbsnextc(const unsigned char* str) 84 89 { 90 dprintf(("MSVCRT: _mbsnextc")); 85 91 if(MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(*str)) 86 92 return *str << 8 | str[1]; … … 93 99 unsigned int _mbctolower(unsigned int c) 94 100 { 101 dprintf(("MSVCRT: _mbctolower")); 95 102 if (MSVCRT_isleadbyte(c)) 96 103 { … … 106 113 unsigned int _mbctoupper(unsigned int c) 107 114 { 115 dprintf(("MSVCRT: _mbctoupper")); 108 116 if (MSVCRT_isleadbyte(c)) 109 117 { … … 119 127 unsigned char* _mbsdec(const unsigned char* start, const unsigned char* cur) 120 128 { 129 dprintf(("MSVCRT: _mbsdec")); 121 130 if(MSVCRT___mb_cur_max > 1) 122 131 return (char *)(_ismbstrail(start,cur-1) ? cur - 2 : cur -1); … … 130 139 unsigned char* _mbsinc(const unsigned char* str) 131 140 { 141 dprintf(("MSVCRT: _mbsinc")); 132 142 if(MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(*str)) 133 143 return (unsigned char*)str + 2; /* MB char */ … … 141 151 unsigned char* _mbsninc(const unsigned char* str, MSVCRT_size_t num) 142 152 { 153 dprintf(("MSVCRT: _mbsninc")); 143 154 if(!str || num < 1) 144 155 return NULL; … … 157 168 unsigned int _mbclen(const unsigned char* str) 158 169 { 170 dprintf(("MSVCRT: _mbclen")); 159 171 return MSVCRT_isleadbyte(*str) ? 2 : 1; 160 172 } … … 165 177 int MSVCRT_mblen(const char* str, MSVCRT_size_t size) 166 178 { 179 dprintf(("MSVCRT: mblen")); 167 180 if (str && *str && size) 168 181 { … … 180 193 MSVCRT_size_t _mbslen(const unsigned char* str) 181 194 { 195 dprintf(("MSVCRT: _mbslen")); 182 196 if(MSVCRT___mb_cur_max > 1) 183 197 { … … 198 212 MSVCRT_size_t _mbstrlen(const char* str) 199 213 { 214 dprintf(("MSVCRT: _mbstrlen")); 200 215 if(MSVCRT___mb_cur_max > 1) 201 216 { … … 219 234 void _mbccpy(unsigned char* dest, const unsigned char* src) 220 235 { 236 dprintf(("MSVCRT: _mbccpy")); 221 237 *dest++ = *src; 222 238 if(MSVCRT___mb_cur_max > 1 && MSVCRT_isleadbyte(*src)) … … 231 247 unsigned char* _mbsncpy(unsigned char* dst, const unsigned char* src, MSVCRT_size_t n) 232 248 { 249 dprintf(("MSVCRT: _mbsncpy")); 233 250 if(!n) 234 251 return dst; … … 254 271 unsigned char* _mbsnbcpy(unsigned char* dst, const unsigned char* src, MSVCRT_size_t n) 255 272 { 273 dprintf(("MSVCRT: _mbsnbcpy")); 256 274 if(!n) 257 275 return dst; … … 288 306 int _mbscmp(const unsigned char* str, const unsigned char* cmp) 289 307 { 308 dprintf(("MSVCRT: _mbscmp")); 290 309 if(MSVCRT___mb_cur_max > 1) 291 310 { … … 308 327 309 328 /********************************************************************* 310 * _mbsicmp(MSVCRT.@) 311 */ 312 int _mbsicmp(const unsigned char* str, const unsigned char* cmp) 329 * _mbsicoll(MSVCRT.@) 330 * FIXME: handle locales. 331 */ 332 int _mbsicoll(const unsigned char* str, const unsigned char* cmp) 313 333 { 314 334 if(MSVCRT___mb_cur_max > 1) … … 332 352 333 353 /********************************************************************* 354 * _mbsicmp(MSVCRT.@) 355 */ 356 int _mbsicmp(const unsigned char* str, const unsigned char* cmp) 357 { 358 dprintf(("MSVCRT: _mbsicmp")); 359 if(MSVCRT___mb_cur_max > 1) 360 { 361 unsigned int strc, cmpc; 362 do { 363 if(!*str) 364 return *cmp ? -1 : 0; 365 if(!*cmp) 366 return 1; 367 strc = _mbctolower(_mbsnextc(str)); 368 cmpc = _mbctolower(_mbsnextc(cmp)); 369 if(strc != cmpc) 370 return strc < cmpc ? -1 : 1; 371 str +=(strc > 255) ? 2 : 1; 372 cmp +=(strc > 255) ? 2 : 1; /* equal, use same increment */ 373 } while(1); 374 } 375 return _stricmp(str, cmp); /* ASCII CP */ 376 } 377 378 /********************************************************************* 334 379 * _mbsncmp(MSVCRT.@) 335 380 */ 336 381 int _mbsncmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len) 337 382 { 383 dprintf(("MSVCRT: _mbsncmp")); 338 384 if(!len) 339 385 return 0; … … 367 413 int _mbsnbcmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len) 368 414 { 415 dprintf(("MSVCRT: _mbsnbcmp")); 369 416 if (!len) 370 417 return 0; … … 412 459 int _mbsnicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len) 413 460 { 461 dprintf(("MSVCRT: _mbsnicmp")); 414 462 /* FIXME: No tolower() for mb strings yet */ 415 463 if(MSVCRT___mb_cur_max > 1) … … 439 487 int _mbsnbicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len) 440 488 { 489 dprintf(("MSVCRT: _mbsnbicmp")); 441 490 if (!len) 442 491 return 0; … … 486 535 unsigned char* _mbschr(const unsigned char* s, unsigned int x) 487 536 { 537 dprintf(("MSVCRT: _mbschr")); 488 538 if(MSVCRT___mb_cur_max > 1) 489 539 { … … 507 557 unsigned char* _mbsrchr(const unsigned char* s, unsigned int x) 508 558 { 559 dprintf(("MSVCRT: _mbsrchr")); 509 560 if(MSVCRT___mb_cur_max > 1) 510 561 { … … 526 577 527 578 /********************************************************************* 579 * _mbstok(MSVCRT.@) 580 * 581 * Find and extract tokens from strings 582 */ 583 unsigned char* _mbstok(unsigned char *str, const unsigned char *delim) 584 { 585 MSVCRT_thread_data *data = msvcrt_get_thread_data(); 586 char *ret; 587 588 if(MSVCRT___mb_cur_max > 1) 589 { 590 unsigned int c; 591 592 if (!str) 593 if (!(str = data->mbstok_next)) return NULL; 594 595 while ((c = _mbsnextc(str)) && _mbschr(delim, c)) { 596 str += c > 255 ? 2 : 1; 597 } 598 if (!*str) return NULL; 599 ret = str++; 600 while ((c = _mbsnextc(str)) && !_mbschr(delim, c)) { 601 str += c > 255 ? 2 : 1; 602 } 603 if (*str) { 604 *str++ = 0; 605 if (c > 255) *str++ = 0; 606 } 607 data->mbstok_next = str; 608 return ret; 609 } 610 return strtok(str, delim); /* ASCII CP */ 611 } 612 613 /********************************************************************* 528 614 * mbtowc(MSVCRT.@) 529 615 */ 530 616 int MSVCRT_mbtowc(MSVCRT_wchar_t *dst, const char* str, MSVCRT_size_t n) 531 617 { 618 dprintf(("MSVCRT: _mbtowc")); 532 619 if(n <= 0 || !str) 533 620 return 0; … … 547 634 unsigned int _mbbtombc(unsigned int c) 548 635 { 636 dprintf(("MSVCRT: _mbbtombc")); 549 637 if(MSVCRT___mb_cur_max > 1 && 550 638 ((c >= 0x20 && c <=0x7e) ||(c >= 0xa1 && c <= 0xdf))) … … 562 650 int _ismbbkana(unsigned int c) 563 651 { 652 dprintf(("MSVCRT: _ismbbkana")); 564 653 /* FIXME: use lc_ctype when supported, not lc_all */ 565 654 if(MSVCRT_current_lc_all_cp == 932) … … 577 666 { 578 667 MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch ); 668 dprintf(("MSVCRT: _ismbcdigit")); 579 669 return (get_char_typeW( wch ) & C1_DIGIT); 580 670 } … … 752 842 753 843 if(MSVCRT___mb_cur_max == 1 || c < 256) 754 return _strset(str, c); /* ASCII CP or SB char */844 return MSVCRT__strset(str, c); /* ASCII CP or SB char */ 755 845 756 846 c &= 0xffff; /* Strip high bits */ … … 768 858 769 859 /********************************************************************* 860 * _mbsnbset(MSVCRT.@) 861 */ 862 unsigned char* _mbsnbset(unsigned char *str, unsigned int c, MSVCRT_size_t len) 863 { 864 unsigned char *ret = str; 865 866 if(!len) 867 return ret; 868 869 if(MSVCRT___mb_cur_max == 1 || c < 256) 870 return _strnset(str, c, len); /* ASCII CP or SB char */ 871 872 c &= 0xffff; /* Strip high bits */ 873 874 while(str[0] && str[1] && (len > 1)) 875 { 876 *str++ = c >> 8; 877 len--; 878 *str++ = c & 0xff; 879 len--; 880 } 881 if(len && str[0]) { 882 /* as per msdn pad with a blank character */ 883 str[0] = ' '; 884 } 885 886 return ret; 887 } 888 889 /********************************************************************* 770 890 * _mbsnset(MSVCRT.@) 771 891 */ … … 778 898 779 899 if(MSVCRT___mb_cur_max == 1 || c < 256) 780 return _strnset(str, c, len); /* ASCII CP or SB char */900 return MSVCRT__strnset(str, c, len); /* ASCII CP or SB char */ 781 901 782 902 c &= 0xffff; /* Strip high bits */ … … 842 962 } 843 963 964 965 /********************************************************************* 966 * _mbsnbcat(MSVCRT.@) 967 */ 968 unsigned char* _mbsnbcat(unsigned char* dst, const unsigned char* src, MSVCRT_size_t len) 969 { 970 if(MSVCRT___mb_cur_max > 1) 971 { 972 char *res = dst; 973 while (*dst) { 974 if (MSVCRT_isleadbyte(*dst++)) { 975 if (*dst) { 976 dst++; 977 } else { 978 /* as per msdn overwrite the lead byte in front of '\0' */ 979 dst--; 980 break; 981 } 982 } 983 } 984 while (*src && len--) *dst++ = *src++; 985 *dst = '\0'; 986 return res; 987 } 988 return strncat(dst, src, len); /* ASCII CP */ 989 } 844 990 845 991 /********************************************************************* -
trunk/src/msvcrt/misc.c
r9633 r10005 21 21 #include "msvcrt.h" 22 22 #include <stdlib.h> 23 23 #include <string.h> 24 #include <math.h> 25 #include "emxheader.h" 24 26 #include "msvcrt/stdlib.h" 25 27 … … 50 52 * _sleep (MSVCRT.@) 51 53 */ 52 void _sleep(unsigned long timeout)54 void MSVCRT__sleep(unsigned long timeout) 53 55 { 54 56 TRACE("_sleep for %ld milliseconds\n",timeout); … … 59 61 * _lfind (MSVCRT.@) 60 62 */ 61 void* _lfind(const void* match, const void* start,63 void* MSVCRT__lfind(const void* match, const void* start, 62 64 unsigned int* array_size, unsigned int elem_size, 63 65 MSVCRT_compar_fn_t cf) 64 66 { 65 67 unsigned int size = *array_size; 68 dprintf(("MSVCRT: _lfind")); 66 69 if (size) 67 70 do … … 77 80 * _lsearch (MSVCRT.@) 78 81 */ 79 void* _lsearch(const void* match, void* start,82 void* MSVCRT__lsearch(const void* match, void* start, 80 83 unsigned int* array_size, unsigned int elem_size, 81 84 MSVCRT_compar_fn_t cf) 82 85 { 83 86 unsigned int size = *array_size; 87 dprintf(("MSVCRT: _lsearch")); 84 88 if (size) 85 89 do … … 96 100 } 97 101 102 98 103 /********************************************************************* 99 104 * _chkesp (MSVCRT.@) 105 * 106 * Trap to a debugger if the value of the stack pointer has changed. 107 * 108 * PARAMS 109 * None. 110 * 111 * RETURNS 112 * Does not return. 113 * 114 * NOTES 115 * This function is available for iX86 only. 116 * 117 * When VC++ generates debug code, it stores the value of the stack pointer 118 * before calling any external function, and checks the value following 119 * the call. It then calls this function, which will trap if the values are 120 * not the same. Usually this means that the prototype used to call 121 * the function is incorrect. It can also mean that the .spec entry has 122 * the wrong calling convention or parameters. 100 123 */ 101 void _chkesp(void) 124 #ifdef __i386__ 125 126 # ifdef __GNUC__ 127 __ASM_GLOBAL_FUNC(_chkesp, 128 "jnz 1f\n\t" 129 "ret\n" 130 "1:\tpushl %ebp\n\t" 131 "movl %esp,%ebp\n\t" 132 "pushl %eax\n\t" 133 "pushl %ecx\n\t" 134 "pushl %edx\n\t" 135 "call " __ASM_NAME("MSVCRT_chkesp_fail") "\n\t" 136 "popl %edx\n\t" 137 "popl %ecx\n\t" 138 "popl %eax\n\t" 139 "popl %ebp\n\t" 140 "ret"); 141 142 void MSVCRT_chkesp_fail(void) 102 143 { 144 ERR("Stack pointer incorrect after last function call - Bad prototype/spec entry?\n"); 145 DebugBreak(); 146 } 103 147 104 } 148 # else /* __GNUC__ */ 149 void _chkesp(void) { } 150 # endif /* __GNUC__ */ 151 152 #endif /* __i386__ */ 153 154 105 155 106 156 #ifdef __WIN32OS2__ … … 116 166 * [GNUC && i386] 117 167 */ 168 double _emx_rint (double); 169 118 170 #if defined(__GNUC__) && defined(__i386__) 119 LONG __cdecl _ftol(void)171 LONGLONG __cdecl _ftol(double fl) 120 172 { 121 173 /* don't just do DO_FPU("fistp",retval), because the rounding 122 174 * mode must also be set to "round towards zero"... */ 123 double fl;124 175 POP_FPU(fl); 125 return (LONG)fl; 176 return (LONGLONG)(fl); 177 126 178 } 127 179 #endif /* defined(__GNUC__) && defined(__i386__) */ -
trunk/src/msvcrt/msvcrt.def
r9677 r10005 4 4 5 5 IMPORTS 6 KERNEL32_threadhandle = KERNEL32.3087 KERNEL32_threadid = KERNEL32.3098 KERNEL32_GetCurrentProcessId = KERNEL32.3079 KERNEL32_GetProcAddress = KERNEL32.37210 KERNEL32_GetLogicalDrives = KERNEL32.34611 6 NTDLL_memicmp = NTDLL.956 12 7 NTDLL_wcsicmp = NTDLL._wcsicmp 13 8 NTDLL_wcsupr = NTDLL._wcsupr 14 WriteLog = KERNEL32.120215 GetCurrentThreadId = KERNEL32.30916 ; Due to problem with _stdcall convention here is a large import table17 ; This is a temporary measure and soon it will be fixed (GCC-3.2)18 ; KERNEL32 imports19 Beep = KERNEL32.11020 CloseHandle = KERNEL32.13721 CreateDirectoryA = KERNEL32.15222 CreateDirectoryW = KERNEL32.15523 CreateFileA = KERNEL32.15824 CreateProcessA = KERNEL32.17125 CreateThread = KERNEL32.17826 DeleteCriticalSection = KERNEL32.18527 DeleteFileA = KERNEL32.18628 DeleteFileW = KERNEL32.18729 DuplicateHandle = KERNEL32.19230 EnterCriticalSection = KERNEL32.19531 EnumResourceLanguagesA = KERNEL32.20032 ExitProcess = KERNEL32.21433 ExitThread = KERNEL32.21534 FindClose = KERNEL32.24635 FindFirstFileA = KERNEL32.25036 FindFirstFileW = KERNEL32.25137 FindNextFileA = KERNEL32.25338 FindNextFileW = KERNEL32.25439 FlushFileBuffers = KERNEL32.26040 FreeEnvironmentStringsA = KERNEL32.26841 FreeEnvironmentStringsW = KERNEL32.26942 FreeLibrary = KERNEL32.27143 GetACP = KERNEL32.27644 GetCPInfo = KERNEL32.28245 GetCommandLineA = KERNEL32.28946 GetConsoleMode = KERNEL32.29747 GetCurrentDirectoryA = KERNEL32.30448 GetCurrentDirectoryW = KERNEL32.30549 GetCurrentProcess = KERNEL32.30650 GetCurrentProcessId = KERNEL32.30751 GetDiskFreeSpaceA = KERNEL32.31552 GetDriveTypeA = KERNEL32.31753 GetDriveTypeW = KERNEL32.31854 GetEnvironmentStringsA = KERNEL32.32055 GetEnvironmentStringsW = KERNEL32.32156 GetExitCodeProcess = KERNEL32.32557 GetFileAttributesA = KERNEL32.32758 GetFileAttributesExA = KERNEL32.87459 GetFileAttributesExW = KERNEL32.87560 GetFileAttributesW = KERNEL32.32861 GetFileInformationByHandle = KERNEL32.32962 GetFileType = KERNEL32.33263 GetFullPathNameA = KERNEL32.33364 GetFullPathNameW = KERNEL32.33465 GetLastError = KERNEL32.34066 GetLocaleInfoA = KERNEL32.34267 GetModuleFileNameA = KERNEL32.34868 GetModuleHandleA = KERNEL32.35069 GetNumberOfConsoleInputEvents = KERNEL32.35770 GetProcessHeap = KERNEL32.37571 GetStdHandle = KERNEL32.39572 GetStringTypeA = KERNEL32.39673 GetStringTypeW = KERNEL32.39974 GetStringTypeExA = KERNEL32.39775 GetTempFileNameA = KERNEL32.41276 GetTempFileNameW = KERNEL32.41377 GetTempPathA = KERNEL32.41478 GetThreadTEB = KERNEL32.123479 GetVersion = KERNEL32.42780 HeapAlloc = KERNEL32.45981 HeapCompact = KERNEL32.46082 HeapFree = KERNEL32.46383 HeapReAlloc = KERNEL32.46584 "HeapSize" = KERNEL32.46785 HeapValidate = KERNEL32.46986 HeapWalk = KERNEL32.47087 InitializeCriticalSection = KERNEL32.47288 IsBadReadPtr = KERNEL32.48089 IsValidCodePage = KERNEL32.48890 LeaveCriticalSection = KERNEL32.49491 LoadLibraryA = KERNEL32.49592 LockFile = KERNEL32.51293 MoveFileExA = KERNEL32.53094 MoveFileExW = KERNEL32.53195 MultiByteToWideChar = KERNEL32.53496 PeekConsoleInputA = KERNEL32.55097 RaiseException = KERNEL32.56798 ReadConsoleInputA = KERNEL32.56999 ReadFile = KERNEL32.577100 RegisterLxDll = KERNEL32.1238101 RemoveDirectoryA = KERNEL32.584102 RemoveDirectoryW = KERNEL32.585103 SetConsoleMode = KERNEL32.628104 SetCurrentDirectoryA = KERNEL32.635105 SetCurrentDirectoryW = KERNEL32.636106 SetEnvironmentVariableA = KERNEL32.641107 SetEnvironmentVariableW = KERNEL32.642108 SetFileAttributesA = KERNEL32.647109 SetFileAttributesW = KERNEL32.648110 SetFilePointer = KERNEL32.649111 SetFileTime = KERNEL32.650112 SetLastError = KERNEL32.654113 SetStdHandle = KERNEL32.663114 Sleep = KERNEL32.679115 TlsAlloc = KERNEL32.689116 TlsFree = KERNEL32.691117 TlsGetValue = KERNEL32.693118 TlsSetValue = KERNEL32.694119 UnhandledExceptionFilter = KERNEL32.702120 UnlockFile = KERNEL32.704121 UnregisterLxDll = KERNEL32.1239122 WaitForSingleObject = KERNEL32.723123 WideCharToMultiByte = KERNEL32.727124 WriteConsoleA = KERNEL32.729125 WriteFile = KERNEL32.738126 casemap_lower = KERNEL32.2008127 casemap_upper = KERNEL32.2007128 lstrcmpiA = KERNEL32.770129 lstrcpy = KERNEL32.772130 lstrlenW = KERNEL32.780131 lstrncmpiA = KERNEL32.887132 lstrncmpiW = KERNEL32.888133 strcmpiW = KERNEL32.2020134 strncmpiW = KERNEL32.2022135 wctype_table = KERNEL32.2006136 9 137 10 ; Other exports 138 CRTDLL_ecvt = ODINCRT.274139 ODINCRT_fcvt = ODINCRT.277140 11 RtlTimeToSecondsSince1970 = NTDLL.559 141 12 RtlSecondsSince1970ToTime = NTDLL.526 … … 194 65 ??4bad_typeid@@QAEAAV0@ABV0@@Z = MSVCRT_bad_typeid_opequals @21 195 66 ??4exception@@QAEAAV0@ABV0@@Z = MSVCRT_exception_opequals @22 196 ??8type_info@@QBEHABV0@@Z = MSVCRT_type_info_opequals_equals@23197 ??9type_info@@QBEHABV0@@Z = MSVCRT_type_info_opnot_equals@2467 ??8type_info@@QBEHABV0@@Z = _MSVCRT_type_info_opequals_equals@8 @23 68 ??9type_info@@QBEHABV0@@Z = _MSVCRT_type_info_opnot_equals@8 @24 198 69 199 70 ??_E__non_rtti_object@@UAEPAXI@Z = MSVCRT___non_rtti_object__unknown_E @26 … … 207 78 ?_set_new_mode@@YAHH@Z = MSVCRT__set_new_mode @34 208 79 ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z = MSVCRT__set_se_translator @35 209 ?name@type_info@@QBEPBDXZ = MSVCRT_type_info_name@36210 ?raw_name@type_info@@QBEPBDXZ = MSVCRT_type_info_raw_name@3780 ?name@type_info@@QBEPBDXZ = _MSVCRT_type_info_name@4 @36 81 ?raw_name@type_info@@QBEPBDXZ = _MSVCRT_type_info_raw_name@4 @37 211 82 ?set_new_handler@@YAP6AXXZP6AXXZ@Z = MSVCRT__set_new_handler @38 212 83 ?set_terminate@@YAP6AXXZP6AXXZ@Z = MSVCRT_set_terminate @39 … … 252 123 __argv = MSVCRT___argv @79 253 124 __dllonexit = __dllonexit @80 254 __doserrno = __doserrno @81125 __doserrno = MSVCRT_doserrno @81 255 126 __getmainargs = __getmainargs @82 256 127 __initenv = MSVCRT___initenv @83 … … 260 131 __lconv_init = __lconv_init @87 261 132 __mb_cur_max = MSVCRT___mb_cur_max @88 133 __crtLCMapStringA @89 262 134 263 135 __p___argc = __p___argc @90 … … 268 140 __p___winitenv = __p___winitenv @95 269 141 __p__acmdln = __p__acmdln @96 270 __p__commode = __p__commode @97 271 __p__environ = __p__environ @98 272 __p__fmode = __p__fmode @99 273 __p__iob = __p__iob @100 274 __p__mbctype = __p__mbctype @101 275 __p__osver = __p__osver @102 276 __p__pctype = __p__pctype @103 277 __p__timezone = __p__timezone @104 278 __p__wcmdln = __p__wcmdln @105 279 __p__wenviron = __p__wenviron @106 280 __p__winmajor = __p__winmajor @107 281 __p__winminor = __p__winminor @108 282 __p__winver = __p__winver @109 283 284 __set_app_type = MSVCRT___set_app_type @111 285 __setlc_active = MSVCRT___setlc_active @112 286 __setusermatherr = MSVCRT___setusermatherr @113 287 288 __threadhandle = KERNEL32_threadhandle @115 289 __threadid = KERNEL32_threadid @116 290 __toascii = MSVCRT___toascii @117 291 __unDName = MSVCRT___unDName @118 292 __unDNameEx = MSVCRT___unDNameEx @119 293 __unguarded_readlc_active = MSVCRT___unguarded_readlc_active @120 294 __wargv = MSVCRT___wargv @121 295 __wgetmainargs =__wgetmainargs @122 296 __winitenv = MSVCRT___winitenv @123 297 _abnormal_termination = _abnormal_termination @124 298 _access = _access @125 299 _acmdln = MSVCRT__acmdln @126 300 _adj_fdiv_m16i @127 301 _adj_fdiv_m32 @128 302 _adj_fdiv_m32i @129 303 _adj_fdiv_m64 @130 304 _adj_fdiv_r @131 305 _adj_fdivr_m16i @132 306 _adj_fdivr_m32 @133 307 _adj_fdivr_m32i @134 308 _adj_fdivr_m64 @135 309 _adj_fpatan @136 310 _adj_fprem @137 311 _adj_fprem1 @138 312 _adj_fptan @139 313 _adjust_fdiv @140 314 _amsg_exit = MSVCRT__amsg_exit @141 315 _assert = MSVCRT__assert @142 316 _beep @143 317 ; We want not EMX one but our own @144 318 _beginthread = MSVCRT_beginthread @145 142 __p__commode = __p__commode @97 143 __p__environ = __p__environ @98 144 __p__fmode = __p__fmode @99 145 __p__iob = __p__iob @100 146 __p__mbctype = __p__mbctype @101 147 __p__osver = __p__osver @102 148 __p__pctype = __p__pctype @103 149 __p__timezone = __p__timezone @104 150 __p__wcmdln = __p__wcmdln @105 151 __p__wenviron = __p__wenviron @106 152 __p__winmajor = __p__winmajor @107 153 __p__winminor = __p__winminor @108 154 __p__winver = __p__winver @109 155 __p__daylight = MSVCRT___p__daylight @110 156 __p__pgmptr @114 157 158 __set_app_type = MSVCRT___set_app_type @111 159 __setlc_active = MSVCRT___setlc_active @112 160 __setusermatherr = MSVCRT___setusermatherr @113 161 162 __threadhandle = MSVCRT_GetCurrentThread @115 163 __threadid = MSVCRT_GetCurrentThreadId @116 164 __toascii = MSVCRT___toascii @117 165 __unDName = MSVCRT___unDName @118 166 __unDNameEx = MSVCRT___unDNameEx @119 167 __unguarded_readlc_active = MSVCRT___unguarded_readlc_active @120 168 __wargv = MSVCRT___wargv @121 169 __wgetmainargs @122 170 __winitenv = MSVCRT___winitenv @123 171 _abnormal_termination = _abnormal_termination @124 172 _access = MSVCRT__access @125 173 _acmdln = MSVCRT__acmdln @126 174 _adj_fdiv_m16i @127 175 _adj_fdiv_m32 @128 176 _adj_fdiv_m32i @129 177 _adj_fdiv_m64 @130 178 _adj_fdiv_r @131 179 _adj_fdivr_m16i @132 180 _adj_fdivr_m32 @133 181 _adj_fdivr_m32i @134 182 _adj_fdivr_m64 @135 183 _adj_fpatan @136 184 _adj_fprem @137 185 _adj_fprem1 @138 186 _adj_fptan @139 187 _adjust_fdiv @140 188 _amsg_exit = MSVCRT__amsg_exit @141 189 _assert = MSVCRT__assert @142 190 _beep @143 191 ; We want not EMX one but our own 192 _beginthread = MSVCRT__beginthread @145 319 193 _beginthreadex @146 320 194 _c_exit = MSVCRT__c_exit @147 321 _cabs @148195 _cabs = MSVCRT__cabs @148 322 196 _callnewh @149 323 197 _cexit = MSVCRT__cexit @150 324 _cgets @151325 _chdir @152326 _chdrive @153198 _cgets = MSVCRT__cgets @151 199 _chdir = MSVCRT__chdir @152 200 _chdrive = MSVCRT__chdrive @153 327 201 _chgsign @154 328 202 _chkesp @155 329 _chmod @156203 _chmod = MSVCRT__chmod @156 330 204 _clearfp @157 331 _close @158205 _close = MSVCRT__close @158 332 206 _commit @159 333 207 _commode = MSVCRT__commode @160 334 _control87 @161208 _control87 = MSVCRT__control87 @161 335 209 _controlfp @162 336 210 _copysign @163 337 _cprintf @164338 _cputs @165339 _creat @166340 _cscanf @167211 _cprintf = MSVCRT__cprintf @164 212 _cputs = MSVCRT__cputs @165 213 _creat = MSVCRT__creat @166 214 _cscanf = MSVCRT__cscanf @167 341 215 _ctype = MSVCRT__ctype @168 342 _cwait @169343 _ecvt = CRTDLL_ecvt@170344 _endthread = MSVCRT_ endthread @171216 _cwait = MSVCRT__cwait @169 217 _ecvt @170 218 _endthread = MSVCRT__endthread @171 345 219 _endthreadex @172 346 220 _environ = MSVCRT__environ @173 … … 349 223 _except_handler2 @176 350 224 _except_handler3 @177 351 _execl @178225 _execl = MSVCRT__execl @178 352 226 ; @ stub _execle #(str str) varargs @179 353 _execlp @180227 _execlp = MSVCRT__execlp @180 354 228 ;# stub _execlpe #(str str) varargs @181 355 _execv @182356 _execve @183357 _execvp 358 _execvpe @185229 _execv = MSVCRT__execv @182 230 _execve = MSVCRT__execve @183 231 _execvp = MSVCRT__execvp @184 232 _execvpe = MSVCRT__execvpe @185 359 233 _exit = MSVCRT__exit @186 360 234 _expand @187 361 _fcloseall @188362 _fcvt = ODINCRT_fcvt@189363 _fdopen @190364 _fgetchar @191235 _fcloseall = MSVCRT__fcloseall @188 236 _fcvt @189 237 _fdopen = MSVCRT__fdopen @190 238 _fgetchar = MSVCRT__fgetchar @191 365 239 _fgetwchar @192 366 240 _filbuf @193 367 241 ;# stub _fileinfo @194 368 _filelength @195242 _filelength = MSVCRT__filelength @195 369 243 ;# stub _filelengthi64 #(long) @196 370 _fileno @197244 _fileno = MSVCRT__fileno @197 371 245 _findclose @198 372 246 _findfirst @199 … … 376 250 _finite @203 377 251 _flsbuf @204 378 _flushall @205252 _flushall = MSVCRT__flushall @205 379 253 _fmode = MSVCRT__fmode @206 380 254 _fpclass @207 381 255 ;# stub _fpieee_flt @208 382 _fpreset @209383 _fputchar @210256 _fpreset = MSVCRT__fpreset @209 257 _fputchar = MSVCRT__fputchar @210 384 258 _fputwchar @211 385 _fsopen @212259 _fsopen = MSVCRT__fsopen @212 386 260 _fstat = MSVCRT__fstat @213 387 261 _fstati64 @214 388 _ftime = MSVCRT_ ftime @215262 _ftime = MSVCRT__ftime @215 389 263 _ftol @216 390 _fullpath @217264 _fullpath = MSVCRT__fullpath @217 391 265 _futime @218 392 _gcvt 266 _gcvt = MSVCRT__gcvt @219 393 267 _get_osfhandle @220 394 268 ;# stub _get_sbh_threshold #() @221 395 _getch @222396 _getche @223397 _getcwd @224398 _getdcwd @225269 _getch = MSVCRT__getch @222 270 _getche = MSVCRT__getche @223 271 _getcwd = MSVCRT__getcwd @224 272 _getdcwd = MSVCRT__getdcwd @225 399 273 _getdiskfree @226 400 _getdllprocaddr = KERNEL32_GetProcAddress@227401 _getdrive @228402 _getdrives = KERNEL32_GetLogicalDrives @229274 _getdllprocaddr @227 275 _getdrive = MSVCRT__getdrive @228 276 _getdrives = MSVCRT_GetLogicalDrives @229 403 277 ;# stub _getmaxstdio #() @230 404 278 _getmbcp @231 405 _getpid = KERNEL32_GetCurrentProcessId @232279 _getpid = MSVCRT_GetCurrentProcessId @232 406 280 ;# stub _getsystime #(ptr) @233 407 _getw @234281 _getw = MSVCRT__getw @234 408 282 _getws = MSVCRT__getws @235 409 283 _global_unwind2 @236 410 _heapadd @237411 _heapchk @238412 _heapmin @239413 _heapset @240284 _heapadd = MSVCRT__heapadd @237 285 _heapchk = MSVCRT__heapchk @238 286 _heapmin = MSVCRT__heapmin @239 287 _heapset = MSVCRT__heapset @240 414 288 ;# stub _heapused #(ptr ptr) @241 415 _heapwalk @242416 _hypot @243289 _heapwalk = MSVCRT__heapwalk @242 290 _hypot @243 417 291 ;# stub _i64toa #(long str long) @244 418 292 ;# stub _i64tow #(long wstr long) @245 … … 423 297 _iob = MSVCRT__iob @250 424 298 425 _isatty 299 _isatty = MSVCRT__isatty @252 426 300 _isctype @253 427 301 ;# stub _ismbbalnum #(long) @254 … … 455 329 _ismbstrail @282 456 330 _isnan @283 457 _itoa 458 _itow 331 _itoa @284 332 _itow @285 459 333 _j0 = j0 @286 460 334 _j1 = j1 @287 461 335 _jn = jn @288 462 _kbhit @289463 _lfind @290336 _kbhit = MSVCRT__kbhit @289 337 _lfind = MSVCRT__lfind @290 464 338 _loaddll @291 465 339 _local_unwind2 @292 … … 468 342 _logb @295 469 343 ;# stub _longjmpex @296 470 _lrotl @297471 _lrotr @298472 _lsearch @299473 _lseek @300344 _lrotl = MSVCRT__lrotl @297 345 _lrotr = MSVCRT__lrotr @298 346 _lsearch = MSVCRT__lsearch @299 347 _lseek = MSVCRT__lseek @300 474 348 _lseeki64 @301 475 349 _ltoa @302 476 350 _ltow @303 477 _makepath @304478 _matherr @305351 _makepath = MSVCRT__makepath @304 352 _matherr = MSVCRT__matherr @305 479 353 _mbbtombc @306 480 354 ;# stub _mbbtype #(long long) @307 … … 500 374 _mbsdup = _strdup @327 501 375 _mbsicmp @328 502 ;# stub _mbsicoll #(str str)@329376 _mbsicoll @329 503 377 _mbsinc @330 504 378 _mbslen @331 505 379 _mbslwr @332 506 ;# stub _mbsnbcat #(str str long)@333380 _mbsnbcat @333 507 381 _mbsnbcmp @334 508 382 _mbsnbcnt @335 … … 511 385 _mbsnbicmp @338 512 386 ;# stub _mbsnbicoll #(str str long) @339 513 ;# stub _mbsnbset #(str long long)@340387 _mbsnbset @340 514 388 _mbsncat @341 515 389 _mbsnccnt @342 … … 529 403 ;# stub _mbsspnp #(str str) @356 530 404 _mbsstr = strstr @357 531 ;# stub _mbstok #(str str)@358405 _mbstok @358 532 406 _mbstrlen @359 533 407 _mbsupr @360 534 _memccpy = _memccpy@361408 _memccpy @361 535 409 _memicmp = NTDLL_memicmp @362 536 _mkdir @363410 _mkdir = MSVCRT__mkdir @363 537 411 _mktemp @364 538 _msize @365412 _msize = MSVCRT__msize @365 539 413 _nextafter @366 540 _onexit @367541 _open @368414 _onexit = MSVCRT__onexit @367 415 _open = MSVCRT__open @368 542 416 _open_osfhandle @369 543 417 ;# stub _osver @370 … … 551 425 ;# stub _popen #(str str) @378 552 426 _purecall @379 553 _putch @380554 _putenv @381555 _putw @382427 _putch = MSVCRT__putch @380 428 _putenv = MSVCRT__putenv @381 429 _putw = MSVCRT__putw @382 556 430 _putws @383 557 431 ;# stub _pwctype @384 558 _read @385559 _rmdir @386560 _rmtmp @387561 _rotl @388562 _rotr @389432 _read = MSVCRT__read @385 433 _rmdir = MSVCRT__rmdir @386 434 _rmtmp = MSVCRT__rmtmp @387 435 _rotl = MSVCRT__rotl @388 436 _rotr = MSVCRT__rotr @389 563 437 _safe_fdiv @390 564 438 _safe_fdivr @391 … … 566 440 _safe_fprem1 @393 567 441 _scalb @394 568 _searchenv @395569 _seh_longjmp_unwind @396442 _searchenv = MSVCRT__searchenv @395 443 _seh_longjmp_unwind = __seh_longjmp_unwind@4 @396 570 444 ;# stub _set_error_mode #(long) @397 571 445 ;# stub _set_sbh_threshold #(long) @398 … … 575 449 ;# stub _setmaxstdio #(long) @402 576 450 _setmbcp @403 577 _setmode @404451 _setmode = MSVCRT__setmode @404 578 452 ;# stub _setsystime #(ptr long) @405 579 _sleep @406580 _snprintf = _snprintf @407581 _snwprintf 453 _sleep = MSVCRT__sleep @406 454 _snprintf = emx__snprintf @407 455 _snwprintf @408 582 456 _sopen = MSVCRT__sopen @409 583 _spawnl = _spawnl @410457 _spawnl = MSVCRT__spawnl @410 584 458 ;# stub _spawnle #(str str) varargs @411 585 _spawnlp @412459 _spawnlp = MSVCRT__spawnlp @412 586 460 ;# stub _spawnlpe #(str str) varargs @413 587 _spawnv @414588 _spawnve @415589 _spawnvp @416590 _spawnvpe @417591 _splitpath @418592 _stat @419593 ;# stub _stati64 #(str ptr)@420461 _spawnv = MSVCRT__spawnv @414 462 _spawnve = MSVCRT__spawnve @415 463 _spawnvp = MSVCRT__spawnvp @416 464 _spawnvpe = MSVCRT__spawnvpe @417 465 _splitpath = emx__splitpath @418 466 _stat = MSVCRT__stat @419 467 _stati64 @420 594 468 _statusfp @421 595 469 _strcmpi = strcasecmp @422 596 _strdate @423597 _strdup @424598 _strerror @425470 _strdate = MSVCRT__strdate @423 471 _strdup = MSVCRT__strdup @424 472 _strerror = MSVCRT__strerror @425 599 473 _stricmp = strcasecmp @426 600 474 ;# stub _stricoll #(str str) @427 601 _strlwr @428475 _strlwr @428 602 476 ;# stub _strncoll #(str str long) @429 603 477 _strnicmp = strncasecmp @430 604 478 ;# stub _strnicoll #(str str long) @431 605 _strnset @432606 _strrev @433607 _strset @434608 _strtime @435609 _strupr 610 _swab @437479 _strnset = MSVCRT__strnset @432 480 _strrev = MSVCRT__strrev @433 481 _strset = MSVCRT__strset @434 482 _strtime = MSVCRT__strtime @435 483 _strupr @436 484 _swab = MSVCRT__swab @437 611 485 _sys_errlist = MSVCRT__sys_errlist @438 612 486 _sys_nerr = MSVCRT__sys_nerr @439 613 _tell @440487 _tell = MSVCRT__tell @440 614 488 ;# stub _telli64 #(long) @441 615 _tempnam @442489 _tempnam = MSVCRT__tempnam @442 616 490 ;# stub _timezone #() @443 617 491 _tolower = MSVCRT__tolower @444 618 492 _toupper = MSVCRT__toupper @445 619 493 ;# stub _tzname @446 620 _tzset @447494 _tzset = emx__tzset @447 621 495 ;# stub _ui64toa #(long str long) @448 622 496 ;# stub _ui64tow #(long wstr long) @449 623 _ultoa @450497 _ultoa @450 624 498 _ultow @451 625 _umask @452626 _ungetch @453627 _unlink @454499 _umask = MSVCRT_umask @452 500 _ungetch = MSVCRT__ungetch @453 501 _unlink = MSVCRT__unlink @454 628 502 _unloaddll @455 629 503 _unlock @456 630 _utime @457631 _vsnprintf = _vsnprintf@458504 _utime = MSVCRT_utime @457 505 _vsnprintf @458 632 506 _vsnwprintf @459 633 507 _waccess @460 … … 666 540 ;# stub _wfreopen #(wstr wstr ptr) @493 667 541 _wfsopen @494 668 ;# stub _wfullpath #(wstr wstr long)@495542 _wfullpath @495 669 543 _wgetcwd @496 670 544 _wgetdcwd @497 … … 683 557 _wremove @510 684 558 _wrename @511 685 _write @512559 _write = MSVCRT__write @512 686 560 _wrmdir @513 687 561 ;# stub _wsearchenv #(wstr wstr wstr) @514 … … 698 572 _wsplitpath @525 699 573 _wstat @526 700 ;# stub _wstati64 #(wstr ptr)@527574 _wstati64 @527 701 575 ;# stub _wstrdate #(wstr) @528 702 576 ;# stub _wstrtime #(wstr) @529 … … 709 583 _wunlink @536 710 584 _wutime @537 711 _y0 @538712 _y1 @539713 _yn @540585 _y0 = MSVCRT__y0 @538 586 _y1 = MSVCRT__y1 @539 587 _yn = MSVCRT__yn @540 714 588 abort = MSVCRT_abort @541 715 abs @542716 acos @543717 asctime @544718 asin @545719 atan @546720 atan2 @547589 abs = emx_abs @542 590 acos = emx_acos @543 591 asctime = emx_asctime @544 592 asin = emx_asin @545 593 atan = emx_atan @546 594 atan2 = emx_atan2 @547 721 595 atexit = MSVCRT_atexit @548 722 atof @549723 atoi 724 atol 725 bsearch @552596 atof = MSVCRT_atof @549 597 atoi @550 598 atol @551 599 bsearch @552 726 600 calloc = MSVCRT_calloc @553 727 ceil @554601 ceil = emx_ceil @554 728 602 clearerr = MSVCRT_clearerr @555 729 603 clock = MSVCRT_clock @556 730 cos @557731 cosh @558732 ctime @559604 cos = emx_cos @557 605 cosh = emx_cosh @558 606 ctime = emx_ctime @559 733 607 difftime = MSVCRT_difftime @560 734 608 div = MSVCRT_div @561 735 609 exit = MSVCRT_exit @562 736 exp 737 fabs @564610 exp = emx_exp @563 611 fabs = emx_fabs @564 738 612 fclose = MSVCRT_fclose @565 739 613 feof = MSVCRT_feof @566 … … 745 619 fgetwc = MSVCRT_fgetwc @572 746 620 fgetws = MSVCRT_fgetws @573 747 floor @574748 fmod @575621 floor = emx_floor @574 622 fmod = emx_fmod @575 749 623 fopen = MSVCRT_fopen @576 750 624 fprintf = MSVCRT_fprintf @577 … … 756 630 free = MSVCRT_free @583 757 631 freopen = MSVCRT_freopen @584 758 frexp = frexp @585632 frexp = emx_frexp @585 759 633 fscanf = MSVCRT_fscanf @586 760 634 fseek = MSVCRT_fseek @587 … … 770 644 getwc = MSVCRT_getwc @597 771 645 getwchar = MSVCRT_getwchar @598 772 gmtime = gmtime @599646 gmtime = emx_gmtime @599 773 647 is_wctype = iswctype @600 774 648 isalnum = MSVCRT_isalnum @601 … … 797 671 iswxdigit = MSVCRT_iswxdigit @624 798 672 isxdigit = MSVCRT_isxdigit @625 799 labs @626673 labs = emx_labs @626 800 674 ldexp = MSVCRT_ldexp @627 801 675 ldiv = MSVCRT_ldiv @628 802 676 ;# stub localeconv #() @629 803 localtime @630804 log @631805 log10 @632677 localtime = emx_localtime @630 678 log = emx_log @631 679 log10 = emx_log10 @632 806 680 longjmp = _MSVCRT_longjmp @633 807 681 malloc = MSVCRT_malloc @634 808 682 mblen = MSVCRT_mblen @635 809 mbstowcs @636683 mbstowcs = emx_mbstowcs @636 810 684 mbtowc = MSVCRT_mbtowc @637 811 memchr @638812 memcmp @639685 memchr = emx_memchr @638 686 memcmp = emx_memcmp @639 813 687 memcpy = MSVCRT_memcpy @640 814 memmove @641688 memmove = emx_memmove @641 815 689 memset = MSVCRT_memset @642 816 690 mktime = MSVCRT_mktime @643 817 modf @644691 modf = emx_modf @644 818 692 perror = MSVCRT_perror @645 819 pow @646693 pow = emx_pow @646 820 694 printf = MSVCRT_printf @647 821 695 putc = MSVCRT_putc @648 … … 824 698 putwc = MSVCRT_fputwc @651 825 699 putwchar =_fputwchar @652 826 qsort @653700 qsort = emx_qsort @653 827 701 ;# stub raise #(long) @654 828 702 rand = MSVCRT_rand @655 … … 836 710 setvbuf = MSVCRT_setvbuf @663 837 711 signal = MSVCRT_signal @664 838 sin @665839 sinh 840 sprintf @667841 sqrt 842 srand 843 sscanf @670844 strcat @671845 strchr @672846 strcmp @673847 strcoll @674848 strcpy @675849 strcspn @676712 sin = emx_sin @665 713 sinh = emx_sinh @666 714 sprintf = emx_sprintf @667 715 sqrt = emx_sqrt @668 716 srand = emx_srand @669 717 sscanf = MSVCRT_sscanf @670 718 strcat = emx_strcat @671 719 strchr = emx_strchr @672 720 strcmp = emx_strcmp @673 721 strcoll = emx_strcoll @674 722 strcpy = emx_strcpy @675 723 strcspn = emx_strcspn @676 850 724 strerror = MSVCRT_strerror @677 851 strftime @678852 strlen @679853 strncat @680854 strncmp @681855 strncpy @682856 strpbrk @683857 strrchr @684858 strspn @685859 strstr @686860 strtod @687861 strtok 862 strtol @689863 strtoul @690864 strxfrm @691725 strftime = emx_strftime @678 726 strlen = emx_strlen @679 727 strncat = emx_strncat @680 728 strncmp = emx_strncmp @681 729 strncpy = emx_strncpy @682 730 strpbrk = emx_strpbrk @683 731 strrchr = emx_strrchr @684 732 strspn = emx_strspn @685 733 strstr = emx_strstr @686 734 strtod = emx_strtod @687 735 strtok = emx_strtok @688 736 strtol = emx_strtol @689 737 strtoul = emx_strtoul @690 738 strxfrm = emx_strxfrm @691 865 739 swprintf @692 866 740 swscanf = MSVCRT_swscanf @693 867 741 system = MSVCRT_system @694 868 tan @695869 tanh 742 tan = emx_tan @695 743 tanh = emx_tanh @696 870 744 time = MSVCRT_time @697 871 745 tmpfile = MSVCRT_tmpfile @698 872 746 tmpnam = MSVCRT_tmpnam @699 873 tolower @700874 toupper @701747 tolower = emx_tolower @700 748 toupper = emx_toupper @701 875 749 towlower @702 876 750 towupper @703 … … 880 754 vfwprintf = MSVCRT_vfwprintf @707 881 755 vprintf = MSVCRT_vprintf @708 882 vsprintf = vsprintf @709756 vsprintf = emx_vsprintf @709 883 757 vswprintf = MSVCRT_vswprintf @710 884 758 vwprintf = MSVCRT_vwprintf @711 … … 910 784 ;# stub __lc_collate_cp @737 911 785 ;# stub __lc_collate_c @738 912 MSVCRT_Init @739 786 -
trunk/src/msvcrt/msvcrt.h
r9633 r10005 32 32 typedef struct __MSVCRT_thread_data 33 33 { 34 int errno;34 int msv_errno; 35 35 unsigned long doserrno; 36 char *mbstok_next; /* next ptr for mbstok() */ 37 char *efcvt_buffer; /* buffer for ecvt/fcvt */ 36 38 terminate_function terminate_handler; 37 39 unexpected_function unexpected_handler; … … 108 110 #define _RT_BANNER 255 109 111 112 /* Signal types */ 113 114 #define SIGINT_W 2 /* interrupt */ 115 #define SIGILL_W 4 /* illegal instruction - invalid function image */ 116 #define SIGFPE_W 8 /* floating point exception */ 117 #define SIGSEGV_W 11 /* segment violation */ 118 #define SIGTERM_W 15 /* Software termination signal from kill */ 119 #define SIGBREAK_W 21 /* Ctrl-Break sequence */ 120 #define SIGABRT_W 22 /* abnormal termination triggered by abort call */ 121 122 #define SIG_DFL_W (void (__cdecl *)(int))0 /* default signal action */ 123 #define SIG_IGN_W (void (__cdecl *)(int))1 /* ignore signal */ 124 #define SIG_SGE_W (void (__cdecl *)(int))3 /* signal gets error */ 125 #define SIG_ACK_W (void (__cdecl *)(int))4 /* acknowledge */ 126 127 /* signal error value (returned by signal call on error) */ 128 129 #define SIG_ERR (void (__cdecl *)(int))-1 /* signal error value */ 130 131 110 132 #endif /* __WINE_MSVCRT_H */ -
trunk/src/msvcrt/msvcrt.mak
r9677 r10005 1 # $Id: msvcrt.mak,v 1. 7 2003-01-15 10:43:16sandervl Exp $1 # $Id: msvcrt.mak,v 1.8 2003-04-10 10:28:03 sandervl Exp $ 2 2 3 3 # … … 13 13 MAKEFILE = msvcrt.mak 14 14 CCENV = EMX 15 WRC_PREFIX_RESOURCE=1 15 16 NOTEXPDEF = 1 16 17 … … 22 23 23 24 !ifndef WMAKE 24 CDEFINES = -I . $(CDEFINES) -DUSE_MSVCRT_PREFIX -D_MT -I$(ODIN32_INCLUDE)\win\msvcrt25 CDEFINES = -I$(ODIN32_INCLUDE)\emxruntime -I. $(CDEFINES) -DUSE_MSVCRT_PREFIX -D_MT -I$(ODIN32_INCLUDE)\win\msvcrt 25 26 !else 26 27 CDEFINES += -DUSE_MSVCRT_PREFIX -D_MT -I$(ODIN32_INCLUDE)\win\msvcrt 27 28 !endif 28 29 29 30 30 # … … 32 32 # 33 33 OBJS = \ 34 $(OBJDIR)\initterm.obj \ 35 $(OBJDIR)\initmsvcrtdll.obj \ 34 36 $(OBJDIR)\ctype.obj \ 35 37 $(OBJDIR)\cpp.obj \ … … 37 39 $(OBJDIR)\console.obj \ 38 40 $(OBJDIR)\data.obj \ 41 $(OBJDIR)\dbgcalls.obj \ 39 42 $(OBJDIR)\dir.obj \ 40 43 $(OBJDIR)\environ.obj \ … … 49 52 $(OBJDIR)\main.obj \ 50 53 $(OBJDIR)\scanf.obj \ 54 $(OBJDIR)\forwarders.obj \ 51 55 $(OBJDIR)\math.obj \ 52 56 $(OBJDIR)\mbcs.obj \ … … 57 61 $(OBJDIR)\time.obj \ 58 62 $(OBJDIR)\wcs.obj \ 59 $(OBJDIR)\rtlbitmap.obj \60 63 $(OBJDIR)\relay2.obj \ 61 64 $(OBJDIR)\$(TARGET)rsrc.obj 62 65 66 LIBS = \ 67 $(ODIN32_LIB_)\EmxSupport\EMXOS2FSRoutines.lib \ 68 $(EMX)\lib\iberty_s.lib \ 69 $(EMX)\lib\gcc-lib\i386-pc-os2-emx\3.2.1\mt\stdcxx.lib \ 70 $(EMX)\lib\c_alias.lib \ 71 $(EMX)\lib\gcc-lib\i386-pc-os2-emx\3.2.1\mt\gcc_eh.lib \ 72 $(EMX)\lib\gcc-lib\i386-pc-os2-emx\3.2.1\mt\gcc.lib \ 73 $(EMX)\lib\mt\c.lib \ 74 $(EMX)\lib\mt\c_dllso.lib \ 75 $(EMX)\lib\mt\sys.lib \ 76 $(EMX)\lib\os2.lib \ 77 $(ODIN32_LIB_)\EmxSupport\ExCRuntime.lib \ 78 $(ODIN32_LIB_)\EmxSupport\ExDllSupport.lib \ 79 $(ODIN32_LIB_)\EmxSupport\m.lib \ 80 $(ODIN32_LIB)\kernel32.lib \ 81 $(ODIN32_LIB)\ntdll.lib \ 82 $(ODIN32_LIB)\user32.lib 63 83 64 84 # … … 69 89 all: $(OBJDIR) $(OBJDIR)\$(TARGET).dll $(TARGET).lib 70 90 71 $(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def 72 $(LD) $(LDFLAGS) -Zso -Zsys $(OBJS) $(TARGET).def -L.\libs -lm\ 73 -liberty_s -o $(OBJDIR)\$(TARGET).dll 74 touch $(OBJDIR)\$(TARGET).map 75 @echo "Illegal Sym File for EMX" > $(OBJDIR)\$(TARGET).sym 91 $(TARGET).lib: 92 implib $(OBJDIR)\$(TARGET).lib msvcrt.def 93 @copy $(OBJDIR)\$(TARGET).lib $(ODIN32_LIB_)\Release 94 @copy $(OBJDIR)\$(TARGET).lib $(ODIN32_LIB_)\Debug 76 95 77 96 # Includes the common rules. … … 79 98 !include $(ODIN32_POST_INC) 80 99 81 $(TARGET).lib:82 implib $(OBJDIR)\$(TARGET).lib msvcrt.def83 @copy $(OBJDIR)\$(TARGET).lib $(ODIN32_LIB_)\Release > nul:84 @copy $(OBJDIR)\$(TARGET).lib $(ODIN32_LIB_)\Debug > nul:85 86 lib: $(TARGET).lib -
trunk/src/msvcrt/msvcrt.spec
r9633 r10005 52 52 @ cdecl ?unexpected@@YAXXZ() MSVCRT_unexpected 53 53 @ cdecl ?what@exception@@UBEPBDXZ(ptr) MSVCRT_what_exception 54 @ cdecl _CIacos() _CIacos55 @ cdecl _CIasin() _CIasin56 @ cdecl _CIatan() _CIatan57 @ cdecl _CIatan2() _CIatan258 @ cdecl _CIcos() _CIcos59 @ cdecl _CIcosh() _CIcosh60 @ cdecl _CIexp() _CIexp61 @ cdecl _CIfmod() _CIfmod62 @ cdecl _CIlog() _CIlog63 @ cdecl _CIlog10() _CIlog1064 @ cdecl _CIpow() _CIpow65 @ cdecl _CIsin() _CIsin66 @ cdecl _CIsinh() _CIsinh67 @ cdecl _CIsqrt() _CIsqrt68 @ cdecl _CItan() _CItan69 @ cdecl _CItanh() _CItanh70 @ cdecl _CxxThrowException(long long) _CxxThrowException71 @ cdecl -i386 -norelay _EH_prolog() _EH_prolog72 @ cdecl _Getdays() _Getdays73 @ cdecl _Getmonths() _Getmonths74 @ cdecl _Getnames() _Getnames54 @ cdecl _CIacos() 55 @ cdecl _CIasin() 56 @ cdecl _CIatan() 57 @ cdecl _CIatan2() 58 @ cdecl _CIcos() 59 @ cdecl _CIcosh() 60 @ cdecl _CIexp() 61 @ cdecl _CIfmod() 62 @ cdecl _CIlog() 63 @ cdecl _CIlog10() 64 @ cdecl _CIpow() 65 @ cdecl _CIsin() 66 @ cdecl _CIsinh() 67 @ cdecl _CIsqrt() 68 @ cdecl _CItan() 69 @ cdecl _CItanh() 70 @ cdecl _CxxThrowException(long long) 71 @ cdecl -i386 -norelay _EH_prolog() 72 @ cdecl _Getdays() 73 @ cdecl _Getmonths() 74 @ cdecl _Getnames() 75 75 @ extern _HUGE MSVCRT__HUGE 76 @ cdecl _Strftime(str long str ptr ptr) _Strftime77 @ cdecl _XcptFilter(long ptr) _XcptFilter78 @ cdecl -register -i386 __CxxFrameHandler(ptr ptr ptr ptr) __CxxFrameHandler79 @ stub __CxxLongjmpUnwind 76 @ cdecl _Strftime(str long str ptr ptr) 77 @ cdecl _XcptFilter(long ptr) 78 @ cdecl -register -i386 __CxxFrameHandler(ptr ptr ptr ptr) 79 @ stub __CxxLongjmpUnwind #(ptr) stdcall 80 80 @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid 81 81 @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast 82 82 @ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid 83 @ stub __STRINGTOLD 83 @ stub __STRINGTOLD #(ptr ptr str long) 84 84 @ extern __argc MSVCRT___argc 85 85 @ extern __argv MSVCRT___argv … … 87 87 @ stub __crtCompareStringA 88 88 @ stub __crtGetLocaleInfoW 89 @ stub __crtLCMapStringA90 @ cdecl __dllonexit(ptr ptr ptr) __dllonexit91 @ cdecl __doserrno() __doserrno89 @ cdecl __crtLCMapStringA(long long str long ptr long long long) 90 @ cdecl __dllonexit(ptr ptr ptr) 91 @ cdecl __doserrno() 92 92 @ stub __fpecode #() 93 @ cdecl __getmainargs(ptr ptr ptr long ptr) __getmainargs93 @ cdecl __getmainargs(ptr ptr ptr long ptr) 94 94 @ extern __initenv MSVCRT___initenv 95 95 @ cdecl __isascii(long) MSVCRT___isascii … … 99 99 @ stub __lc_collate 100 100 @ stub __lc_handle 101 @ cdecl __lconv_init() __lconv_init101 @ cdecl __lconv_init() 102 102 @ extern __mb_cur_max MSVCRT___mb_cur_max 103 @ cdecl __p___argc() __p___argc104 @ cdecl __p___argv() __p___argv105 @ cdecl __p___initenv() __p___initenv106 @ cdecl __p___mb_cur_max() __p___mb_cur_max107 @ cdecl __p___wargv() __p___wargv108 @ cdecl __p___winitenv() __p___winitenv109 @ cdecl __p__acmdln() __p__acmdln103 @ cdecl __p___argc() 104 @ cdecl __p___argv() 105 @ cdecl __p___initenv() 106 @ cdecl __p___mb_cur_max() 107 @ cdecl __p___wargv() 108 @ cdecl __p___winitenv() 109 @ cdecl __p__acmdln() 110 110 @ stub __p__amblksiz #() 111 @ cdecl __p__commode() __p__commode112 @ stub __p__daylight #()111 @ cdecl __p__commode() 112 @ cdecl __p__daylight() MSVCRT___p__daylight 113 113 @ stub __p__dstbias #() 114 @ cdecl __p__environ() __p__environ114 @ cdecl __p__environ() 115 115 @ stub __p__fileinfo #() 116 @ cdecl __p__fmode() __p__fmode117 @ cdecl __p__iob() __p__iob116 @ cdecl __p__fmode() 117 @ cdecl __p__iob() 118 118 @ stub __p__mbcasemap #() 119 @ cdecl __p__mbctype() __p__mbctype120 @ cdecl __p__osver() __p__osver121 @ cdecl __p__pctype() __p__pctype122 @ stub __p__pgmptr #()119 @ cdecl __p__mbctype() 120 @ cdecl __p__osver() 121 @ cdecl __p__pctype() 122 @ cdecl __p__pgmptr() 123 123 @ stub __p__pwctype #() 124 @ cdecl __p__timezone() __p__timezone124 @ cdecl __p__timezone() 125 125 @ stub __p__tzname #() 126 @ cdecl __p__wcmdln() __p__wcmdln127 @ cdecl __p__wenviron() __p__wenviron128 @ cdecl __p__winmajor() __p__winmajor129 @ cdecl __p__winminor() __p__winminor130 @ cdecl __p__winver() __p__winver126 @ cdecl __p__wcmdln() 127 @ cdecl __p__wenviron() 128 @ cdecl __p__winmajor() 129 @ cdecl __p__winminor() 130 @ cdecl __p__winver() 131 131 @ stub __p__wpgmptr #() 132 132 @ stub __pioinfo #() … … 135 135 @ extern __setlc_active MSVCRT___setlc_active 136 136 @ cdecl __setusermatherr(ptr) MSVCRT___setusermatherr 137 @ forward __threadhandlekernel32.GetCurrentThread138 @ forward __threadidkernel32.GetCurrentThreadId137 @ cdecl __threadhandle() kernel32.GetCurrentThread 138 @ cdecl __threadid() kernel32.GetCurrentThreadId 139 139 @ cdecl __toascii(long) MSVCRT___toascii 140 140 @ cdecl __unDName(long str ptr ptr long) MSVCRT___unDName … … 142 142 @ extern __unguarded_readlc_active MSVCRT___unguarded_readlc_active 143 143 @ extern __wargv MSVCRT___wargv 144 @ cdecl __wgetmainargs(ptr ptr ptr long ptr) __wgetmainargs144 @ cdecl __wgetmainargs(ptr ptr ptr long ptr) 145 145 @ extern __winitenv MSVCRT___winitenv 146 @ cdecl _abnormal_termination() _abnormal_termination147 @ cdecl _access(str long) _access146 @ cdecl _abnormal_termination() 147 @ cdecl _access(str long) 148 148 @ extern _acmdln MSVCRT__acmdln 149 @ cdecl _adj_fdiv_m16i() _adj_fdiv_m16i150 @ cdecl _adj_fdiv_m32() _adj_fdiv_m32151 @ cdecl _adj_fdiv_m32i() _adj_fdiv_m32i152 @ cdecl _adj_fdiv_m64() _adj_fdiv_m64153 @ cdecl _adj_fdiv_r() _adj_fdiv_r154 @ cdecl _adj_fdivr_m16i() _adj_fdivr_m16i155 @ cdecl _adj_fdivr_m32() _adj_fdivr_m32156 @ cdecl _adj_fdivr_m32i() _adj_fdivr_m32i157 @ cdecl _adj_fdivr_m64() _adj_fdivr_m64158 @ cdecl _adj_fpatan() _adj_fpatan159 @ cdecl _adj_fprem() _adj_fprem160 @ cdecl _adj_fprem1() _adj_fprem1161 @ cdecl _adj_fptan() _adj_fptan162 @ cdecl _adjust_fdiv() _adjust_fdiv149 @ cdecl _adj_fdiv_m16i() 150 @ cdecl _adj_fdiv_m32() 151 @ cdecl _adj_fdiv_m32i() 152 @ cdecl _adj_fdiv_m64() 153 @ cdecl _adj_fdiv_r() 154 @ cdecl _adj_fdivr_m16i() 155 @ cdecl _adj_fdivr_m32() 156 @ cdecl _adj_fdivr_m32i() 157 @ cdecl _adj_fdivr_m64() 158 @ cdecl _adj_fpatan() 159 @ cdecl _adj_fprem() 160 @ cdecl _adj_fprem1() 161 @ cdecl _adj_fptan() 162 @ cdecl _adjust_fdiv() 163 163 @ stub _aexit_rtn 164 164 @ cdecl _amsg_exit(long) MSVCRT__amsg_exit 165 165 @ cdecl _assert(str str long) MSVCRT__assert 166 @ stub _atodbl 167 @ stub _atoi64 #(str)168 @ stub _atoldbl 169 @ cdecl _beep(long long) _beep170 @ cdecl _beginthread (ptr long ptr) _beginthread171 @ cdecl _beginthreadex (ptr long ptr ptr long ptr) _beginthreadex166 @ stub _atodbl #(ptr str) 167 @ cdecl -ret64 _atoi64(str) ntdll._atoi64 168 @ stub _atoldbl #(ptr str) 169 @ cdecl _beep(long long) 170 @ cdecl _beginthread (ptr long ptr) 171 @ cdecl _beginthreadex (ptr long ptr ptr long ptr) 172 172 @ cdecl _c_exit() MSVCRT__c_exit 173 @ cdecl _cabs(long) _cabs174 @ cdecl _callnewh(long) _callnewh173 @ cdecl _cabs(long) 174 @ cdecl _callnewh(long) 175 175 @ cdecl _cexit() MSVCRT__cexit 176 @ cdecl _cgets(str) _cgets177 @ cdecl _chdir(str) _chdir178 @ cdecl _chdrive(long) _chdrive179 @ cdecl _chgsign( double ) _chgsign180 @ cdecl -i386 _chkesp() _chkesp181 @ cdecl _chmod(str long) _chmod182 @ stub _chsize #(long long)183 @ cdecl _clearfp() _clearfp184 @ cdecl _close(long) _close185 @ cdecl _commit(long) _commit176 @ cdecl _cgets(str) 177 @ cdecl _chdir(str) 178 @ cdecl _chdrive(long) 179 @ cdecl _chgsign( double ) 180 @ cdecl -i386 _chkesp() 181 @ cdecl _chmod(str long) 182 @ cdecl _chsize (long long) 183 @ cdecl _clearfp() 184 @ cdecl _close(long) 185 @ cdecl _commit(long) 186 186 @ extern _commode MSVCRT__commode 187 @ cdecl _control87(long long) _control87188 @ cdecl _controlfp(long long) _controlfp189 @ cdecl _copysign( double double ) _copysign190 @ varargs _cprintf(str) _cprintf191 @ cdecl _cputs(str) _cputs192 @ cdecl _creat(str long) _creat193 @ varargs _cscanf(str) _cscanf187 @ cdecl _control87(long long) 188 @ cdecl _controlfp(long long) 189 @ cdecl _copysign( double double ) 190 @ varargs _cprintf(str) 191 @ cdecl _cputs(str) 192 @ cdecl _creat(str long) 193 @ varargs _cscanf(str) 194 194 @ extern _ctype MSVCRT__ctype 195 @ cdecl _cwait(ptr long long) _cwait196 @ stub_daylight195 @ cdecl _cwait(ptr long long) 196 @ extern _daylight MSVCRT___daylight 197 197 @ stub _dstbias 198 @ stub _dup #(long)199 @ stub _dup2 #(long long)200 @ cdecl _ecvt( double long ptr ptr) ecvt201 @ cdecl _endthread () _endthread202 @ cdecl _endthreadex(long) _endthreadex198 @ cdecl _dup (long) 199 @ cdecl _dup2 (long long) 200 @ cdecl _ecvt(double long ptr ptr) 201 @ cdecl _endthread () 202 @ cdecl _endthreadex(long) 203 203 @ extern _environ MSVCRT__environ 204 @ cdecl _eof(long) _eof204 @ cdecl _eof(long) 205 205 @ cdecl _errno() MSVCRT__errno 206 @ cdecl _except_handler2(ptr ptr ptr ptr) _except_handler2207 @ cdecl _except_handler3(ptr ptr ptr ptr) _except_handler3208 @ varargs _execl(str str) _execl206 @ cdecl _except_handler2(ptr ptr ptr ptr) 207 @ cdecl _except_handler3(ptr ptr ptr ptr) 208 @ varargs _execl(str str) 209 209 @ stub _execle #(str str) varargs 210 @ varargs _execlp(str str) _execlp210 @ varargs _execlp(str str) 211 211 @ stub _execlpe #(str str) varargs 212 @ cdecl _execv(str str) _execv213 @ cdecl _execve(str str str) _execve214 @ cdecl _execvp(str str) _execvp215 @ cdecl _execvpe(str str str) _execvpe212 @ cdecl _execv(str str) 213 @ cdecl _execve(str str str) 214 @ cdecl _execvp(str str) 215 @ cdecl _execvpe(str str str) 216 216 @ cdecl _exit(long) MSVCRT__exit 217 @ cdecl _expand(ptr long) _expand218 @ cdecl _fcloseall() _fcloseall219 @ cdecl _fcvt( double long ptr ptr) fcvt220 @ cdecl _fdopen(long str) _fdopen221 @ cdecl _fgetchar() _fgetchar222 @ cdecl _fgetwchar() _fgetwchar223 @ cdecl _filbuf(ptr) _filbuf217 @ cdecl _expand(ptr long) 218 @ cdecl _fcloseall() 219 @ cdecl _fcvt(double long ptr ptr) 220 @ cdecl _fdopen(long str) 221 @ cdecl _fgetchar() 222 @ cdecl _fgetwchar() 223 @ cdecl _filbuf(ptr) 224 224 @ stub _fileinfo 225 @ cdecl _filelength(long) _filelength225 @ cdecl _filelength(long) 226 226 @ stub _filelengthi64 #(long) 227 @ cdecl _fileno(ptr) _fileno228 @ cdecl _findclose(long) _findclose229 @ cdecl _findfirst(str ptr) _findfirst227 @ cdecl _fileno(ptr) 228 @ cdecl _findclose(long) 229 @ cdecl _findfirst(str ptr) 230 230 @ stub _findfirsti64 #(str ptr) 231 @ cdecl _findnext(long ptr) _findnext231 @ cdecl _findnext(long ptr) 232 232 @ stub _findnexti64 #(long ptr) 233 @ cdecl _finite( double ) _finite234 @ cdecl _flsbuf(long ptr) _flsbuf235 @ cdecl _flushall() _flushall233 @ cdecl _finite( double ) 234 @ cdecl _flsbuf(long ptr) 235 @ cdecl _flushall() 236 236 @ extern _fmode MSVCRT__fmode 237 @ cdecl _fpclass(double) _fpclass238 @ stub _fpieee_flt 239 @ cdecl _fpreset() _fpreset240 @ cdecl _fputchar(long) _fputchar241 @ cdecl _fputwchar(long) _fputwchar242 @ cdecl _fsopen(str str long) _fsopen237 @ cdecl _fpclass(double) 238 @ stub _fpieee_flt #(long ptr ptr) 239 @ cdecl _fpreset() 240 @ cdecl _fputchar(long) 241 @ cdecl _fputwchar(long) 242 @ cdecl _fsopen(str str long) 243 243 @ cdecl _fstat(long ptr) MSVCRT__fstat 244 @ cdecl _fstati64(long ptr) _fstati64245 @ cdecl _ftime(ptr) _ftime246 @ forward _ftolntdll._ftol247 @ cdecl _fullpath(ptr str long) _fullpath248 @ cdecl _futime(long ptr) _futime249 @ cdecl _gcvt( double long str) gcvt250 @ cdecl _get_osfhandle(long) _get_osfhandle244 @ cdecl _fstati64(long ptr) 245 @ cdecl _ftime(ptr) 246 @ cdecl _ftol() ntdll._ftol 247 @ cdecl _fullpath(ptr str long) 248 @ cdecl _futime(long ptr) 249 @ cdecl _gcvt(double long str) 250 @ cdecl _get_osfhandle(long) 251 251 @ stub _get_sbh_threshold #() 252 @ cdecl _getch() _getch253 @ cdecl _getche() _getche254 @ cdecl _getcwd(str long) _getcwd255 @ cdecl _getdcwd(long str long) _getdcwd256 @ cdecl _getdiskfree(long ptr) _getdiskfree257 @ forward _getdllprocaddr kernel32.GetProcAddress258 @ cdecl _getdrive() _getdrive259 @ forward _getdriveskernel32.GetLogicalDrives252 @ cdecl _getch() 253 @ cdecl _getche() 254 @ cdecl _getcwd(str long) 255 @ cdecl _getdcwd(long str long) 256 @ cdecl _getdiskfree(long ptr) 257 @ cdecl _getdllprocaddr(long str long) 258 @ cdecl _getdrive() 259 @ cdecl _getdrives() kernel32.GetLogicalDrives 260 260 @ stub _getmaxstdio #() 261 @ cdecl _getmbcp() _getmbcp262 @ forward _getpidkernel32.GetCurrentProcessId261 @ cdecl _getmbcp() 262 @ cdecl _getpid() kernel32.GetCurrentProcessId 263 263 @ stub _getsystime #(ptr) 264 @ cdecl _getw(ptr) _getw264 @ cdecl _getw(ptr) 265 265 @ cdecl _getws(ptr) MSVCRT__getws 266 @ cdecl _global_unwind2(ptr) _global_unwind2267 @ cdecl _heapadd (ptr long) _heapadd268 @ cdecl _heapchk() _heapchk269 @ cdecl _heapmin() _heapmin270 @ cdecl _heapset(long) _heapset266 @ cdecl _global_unwind2(ptr) 267 @ cdecl _heapadd (ptr long) 268 @ cdecl _heapchk() 269 @ cdecl _heapmin() 270 @ cdecl _heapset(long) 271 271 @ stub _heapused #(ptr ptr) 272 @ cdecl _heapwalk(ptr) _heapwalk272 @ cdecl _heapwalk(ptr) 273 273 @ cdecl _hypot(double double) hypot 274 @ stub _i64toa #(long str long)275 @ stub _i64tow #(long wstr long)276 @ cdecl _initterm(ptr ptr) _initterm274 @ cdecl _i64toa(long long ptr long) ntdll._i64toa 275 @ cdecl _i64tow(long long ptr long) ntdll._i64tow 276 @ cdecl _initterm(ptr ptr) 277 277 @ stub _inp #(long) -i386 278 278 @ stub _inpd #(long) -i386 279 279 @ stub _inpw #(long) -i386 280 280 @ extern _iob MSVCRT__iob 281 @ cdecl _isatty(long) _isatty282 @ cdecl _isctype(long long) _isctype281 @ cdecl _isatty(long) 282 @ cdecl _isctype(long long) 283 283 @ stub _ismbbalnum #(long) 284 284 @ stub _ismbbalpha #(long) 285 285 @ stub _ismbbgraph #(long) 286 286 @ stub _ismbbkalnum #(long) 287 @ cdecl _ismbbkana(long) _ismbbkana287 @ cdecl _ismbbkana(long) 288 288 @ stub _ismbbkprint #(long) 289 289 @ stub _ismbbkpunct #(long) 290 @ cdecl _ismbblead(long) _ismbblead290 @ cdecl _ismbblead(long) 291 291 @ stub _ismbbprint #(long) 292 292 @ stub _ismbbpunct #(long) 293 @ cdecl _ismbbtrail(long) _ismbbtrail294 @ cdecl _ismbcalnum(long) _ismbcalnum295 @ cdecl _ismbcalpha(long) _ismbcalpha296 @ cdecl _ismbcdigit(long) _ismbcdigit297 @ cdecl _ismbcgraph(long) _ismbcgraph298 @ cdecl _ismbchira(long) _ismbchira299 @ cdecl _ismbckata(long) _ismbckata293 @ cdecl _ismbbtrail(long) 294 @ cdecl _ismbcalnum(long) 295 @ cdecl _ismbcalpha(long) 296 @ cdecl _ismbcdigit(long) 297 @ cdecl _ismbcgraph(long) 298 @ cdecl _ismbchira(long) 299 @ cdecl _ismbckata(long) 300 300 @ stub _ismbcl0 #(long) 301 301 @ stub _ismbcl1 #(long) 302 302 @ stub _ismbcl2 #(long) 303 303 @ stub _ismbclegal #(long) 304 @ cdecl _ismbclower(long) _ismbclower305 @ cdecl _ismbcprint(long) _ismbcprint306 @ cdecl _ismbcpunct(long) _ismbcpunct307 @ cdecl _ismbcspace(long) _ismbcspace308 @ cdecl _ismbcsymbol(long) _ismbcsymbol309 @ cdecl _ismbcupper(long) _ismbcupper310 @ cdecl _ismbslead(ptr ptr) _ismbslead311 @ cdecl _ismbstrail(ptr ptr) _ismbstrail312 @ cdecl _isnan( double ) _isnan313 @ forward _itoantdll._itoa314 @ cdecl _itow(long wstr long)_itow304 @ cdecl _ismbclower(long) 305 @ cdecl _ismbcprint(long) 306 @ cdecl _ismbcpunct(long) 307 @ cdecl _ismbcspace(long) 308 @ cdecl _ismbcsymbol(long) 309 @ cdecl _ismbcupper(long) 310 @ cdecl _ismbslead(ptr ptr) 311 @ cdecl _ismbstrail(ptr ptr) 312 @ cdecl _isnan( double ) 313 @ cdecl _itoa(long ptr long) ntdll._itoa 314 @ cdecl _itow(long ptr long) ntdll._itow 315 315 @ cdecl _j0(double) j0 316 316 @ cdecl _j1(double) j1 317 317 @ cdecl _jn(long double) jn 318 @ cdecl _kbhit() _kbhit319 @ cdecl _lfind(ptr ptr ptr long ptr) _lfind320 @ cdecl _loaddll(str) _loaddll321 @ cdecl _local_unwind2(ptr long) _local_unwind2322 @ cdecl _lock(long) _lock323 @ cdecl _locking(long long long) _locking324 @ cdecl _logb( double ) _logb318 @ cdecl _kbhit() 319 @ cdecl _lfind(ptr ptr ptr long ptr) 320 @ cdecl _loaddll(str) 321 @ cdecl _local_unwind2(ptr long) 322 @ cdecl _lock(long) 323 @ cdecl _locking(long long long) 324 @ cdecl _logb( double ) 325 325 @ stub _longjmpex 326 @ cdecl _lrotl(long long) _lrotl327 @ cdecl _lrotr(long long) _lrotr328 @ cdecl _lsearch(ptr ptr long long ptr) _lsearch329 @ cdecl _lseek(long long long) _lseek330 @ cdecl -ret64 _lseeki64(long long long long) _lseeki64331 @ forward _ltoantdll._ltoa332 @ cdecl _ltow(long ptr long) _ltow333 @ cdecl _makepath(str str str str str) _makepath334 @ cdecl _matherr(ptr) _matherr335 @ cdecl _mbbtombc(long) _mbbtombc326 @ cdecl _lrotl(long long) 327 @ cdecl _lrotr(long long) 328 @ cdecl _lsearch(ptr ptr long long ptr) 329 @ cdecl _lseek(long long long) 330 @ cdecl -ret64 _lseeki64(long long long long) 331 @ cdecl _ltoa(long ptr long) ntdll._ltoa 332 @ cdecl _ltow(long ptr long) ntdll._ltow 333 @ cdecl _makepath(str str str str str) 334 @ cdecl _matherr(ptr) 335 @ cdecl _mbbtombc(long) 336 336 @ stub _mbbtype #(long long) 337 337 @ stub _mbcasemap … … 339 339 @ stub _mbcjistojms #(long) 340 340 @ stub _mbcjmstojis #(long) 341 @ cdecl _mbclen(ptr) _mbclen341 @ cdecl _mbclen(ptr) 342 342 @ stub _mbctohira #(long) 343 343 @ stub _mbctokata #(long) 344 @ cdecl _mbctolower(long) _mbctolower344 @ cdecl _mbctolower(long) 345 345 @ stub _mbctombb #(long) 346 @ cdecl _mbctoupper(long) _mbctoupper346 @ cdecl _mbctoupper(long) 347 347 @ stub _mbctype 348 @ stub _mbsbtype #( ptr long)348 @ stub _mbsbtype #(str long) 349 349 @ cdecl _mbscat(str str) strcat 350 @ cdecl _mbschr(str long) _mbschr351 @ cdecl _mbscmp(str str) _mbscmp350 @ cdecl _mbschr(str long) 351 @ cdecl _mbscmp(str str) 352 352 @ stub _mbscoll #(str str) 353 353 @ cdecl _mbscpy(ptr str) strcpy 354 @ cdecl _mbscspn (str str) _mbscspn355 @ cdecl _mbsdec(ptr ptr) _mbsdec354 @ cdecl _mbscspn (str str) 355 @ cdecl _mbsdec(ptr ptr) 356 356 @ cdecl _mbsdup(str) _strdup 357 @ cdecl _mbsicmp(str str) _mbsicmp358 @ stub _mbsicoll #(str str)359 @ cdecl _mbsinc(str) _mbsinc360 @ cdecl _mbslen(str) _mbslen361 @ cdecl _mbslwr(str) _mbslwr362 @ stub _mbsnbcat #(str str long)363 @ cdecl _mbsnbcmp(str str long) _mbsnbcmp364 @ cdecl _mbsnbcnt(ptr long) _mbsnbcnt357 @ cdecl _mbsicmp(str str) 358 @ cdecl _mbsicoll(str str) 359 @ cdecl _mbsinc(str) 360 @ cdecl _mbslen(str) 361 @ cdecl _mbslwr(str) 362 @ cdecl _mbsnbcat (str str long) 363 @ cdecl _mbsnbcmp(str str long) 364 @ cdecl _mbsnbcnt(ptr long) 365 365 @ stub _mbsnbcoll #(str str long) 366 @ cdecl _mbsnbcpy(ptr str long) _mbsnbcpy367 @ cdecl _mbsnbicmp(str str long) _mbsnbicmp366 @ cdecl _mbsnbcpy(ptr str long) 367 @ cdecl _mbsnbicmp(str str long) 368 368 @ stub _mbsnbicoll #(str str long) 369 @ stub _mbsnbset #(str long long)370 @ cdecl _mbsncat(str str long) _mbsncat371 @ cdecl _mbsnccnt(str long) _mbsnccnt372 @ cdecl _mbsncmp(str str long) _mbsncmp373 @ stub _mbsncoll #( ptr str long)374 @ cdecl _mbsncpy(str str long) _mbsncpy375 @ cdecl _mbsnextc(str) _mbsnextc376 @ cdecl _mbsnicmp(str str long) _mbsnicmp369 @ cdecl _mbsnbset(str long long) 370 @ cdecl _mbsncat(str str long) 371 @ cdecl _mbsnccnt(str long) 372 @ cdecl _mbsncmp(str str long) 373 @ stub _mbsncoll #(str str long) 374 @ cdecl _mbsncpy(str str long) 375 @ cdecl _mbsnextc(str) 376 @ cdecl _mbsnicmp(str str long) 377 377 @ stub _mbsnicoll #(str str long) 378 @ cdecl _mbsninc(str long) _mbsninc379 @ cdecl _mbsnset(str long long) _mbsnset380 @ cdecl _mbspbrk(str str) _mbspbrk381 @ cdecl _mbsrchr(str long) _mbsrchr382 @ cdecl _mbsrev(str) _mbsrev383 @ cdecl _mbsset(str long) _mbsset384 @ cdecl _mbsspn(str str) _mbsspn378 @ cdecl _mbsninc(str long) 379 @ cdecl _mbsnset(str long long) 380 @ cdecl _mbspbrk(str str) 381 @ cdecl _mbsrchr(str long) 382 @ cdecl _mbsrev(str) 383 @ cdecl _mbsset(str long) 384 @ cdecl _mbsspn(str str) 385 385 @ stub _mbsspnp #(str str) 386 386 @ cdecl _mbsstr(str str) strstr 387 @ stub _mbstok #(str str)388 @ cdecl _mbstrlen(str) _mbstrlen389 @ cdecl _mbsupr(str) _mbsupr387 @ cdecl _mbstok(str str) 388 @ cdecl _mbstrlen(str) 389 @ cdecl _mbsupr(str) 390 390 @ cdecl _memccpy(ptr ptr long long) memccpy 391 @ forward _memicmpntdll._memicmp392 @ cdecl _mkdir(str) _mkdir393 @ cdecl _mktemp(str) _mktemp394 @ cdecl _msize(ptr) _msize395 @ cdecl _nextafter(double double) _nextafter396 @ cdecl _onexit(ptr) _onexit397 @ varargs _open(str long) _open398 @ cdecl _open_osfhandle(long long) _open_osfhandle391 @ cdecl _memicmp(str str long) ntdll._memicmp 392 @ cdecl _mkdir(str) 393 @ cdecl _mktemp(str) 394 @ cdecl _msize(ptr) 395 @ cdecl _nextafter(double double) 396 @ cdecl _onexit(ptr) 397 @ varargs _open(str long) 398 @ cdecl _open_osfhandle(long long) 399 399 @ stub _osver 400 400 @ stub _outp #(long long) … … 403 403 @ stub _pclose #(ptr) 404 404 @ extern _pctype MSVCRT__pctype 405 @ stub_pgmptr405 @ extern _pgmptr MSVCRT__pgmptr 406 406 @ stub _pipe #(ptr long long) 407 407 @ stub _popen #(str str) 408 @ cdecl _purecall() _purecall409 @ cdecl _putch(long) _putch410 @ cdecl _putenv(str) _putenv411 @ cdecl _putw(long ptr) _putw412 @ cdecl _putws(wstr) _putws408 @ cdecl _purecall() 409 @ cdecl _putch(long) 410 @ cdecl _putenv(str) 411 @ cdecl _putw(long ptr) 412 @ cdecl _putws(wstr) 413 413 @ stub _pwctype 414 @ cdecl _read(long ptr long) _read415 @ cdecl _rmdir(str) _rmdir416 @ cdecl _rmtmp() _rmtmp417 @ cdecl _rotl(long long) _rotl418 @ cdecl _rotr(long long) _rotr419 @ cdecl _safe_fdiv() _safe_fdiv420 @ cdecl _safe_fdivr() _safe_fdivr421 @ cdecl _safe_fprem() _safe_fprem422 @ cdecl _safe_fprem1() _safe_fprem1423 @ cdecl _scalb( double long) _scalb424 @ cdecl _searchenv(str str str) _searchenv425 @ stdcall -i386 _seh_longjmp_unwind(ptr) _seh_longjmp_unwind414 @ cdecl _read(long ptr long) 415 @ cdecl _rmdir(str) 416 @ cdecl _rmtmp() 417 @ cdecl _rotl(long long) 418 @ cdecl _rotr(long long) 419 @ cdecl _safe_fdiv() 420 @ cdecl _safe_fdivr() 421 @ cdecl _safe_fprem() 422 @ cdecl _safe_fprem1() 423 @ cdecl _scalb( double long) 424 @ cdecl _searchenv(str str ptr) 425 @ stdcall -i386 _seh_longjmp_unwind(ptr) 426 426 @ stub _set_error_mode #(long) 427 427 @ stub _set_sbh_threshold #(long) … … 430 430 @ cdecl -register -i386 _setjmp3(ptr long) _MSVCRT__setjmp3 431 431 @ stub _setmaxstdio #(long) 432 @ cdecl _setmbcp(long) _setmbcp433 @ cdecl _setmode(long long) _setmode432 @ cdecl _setmbcp(long) 433 @ cdecl _setmode(long long) 434 434 @ stub _setsystime #(ptr long) 435 @ cdecl _sleep(long) _sleep435 @ cdecl _sleep(long) 436 436 @ varargs _snprintf(str long str) snprintf 437 @ forward _snwprintfntdll._snwprintf437 @ varargs _snwprintf(wstr long wstr) ntdll._snwprintf 438 438 @ varargs _sopen(str long long) MSVCRT__sopen 439 @ varargs _spawnl(long str str) _spawnl440 @ stub _spawnle #( str str) varargs441 @ varargs _spawnlp(long str str) _spawnlp442 @ stub _spawnlpe #( str str) varargs443 @ cdecl _spawnv(long str ptr) _spawnv444 @ cdecl _spawnve(long str ptr ptr) _spawnve445 @ cdecl _spawnvp(long str ptr) _spawnvp446 @ cdecl _spawnvpe(long str ptr ptr) _spawnvpe447 @ forward _splitpathntdll._splitpath439 @ varargs _spawnl(long str str) 440 @ stub _spawnle #(long str str) varargs 441 @ varargs _spawnlp(long str str) 442 @ stub _spawnlpe #(long str str) varargs 443 @ cdecl _spawnv(long str ptr) 444 @ cdecl _spawnve(long str ptr ptr) 445 @ cdecl _spawnvp(long str ptr) 446 @ cdecl _spawnvpe(long str ptr ptr) 447 @ cdecl _splitpath(str ptr ptr ptr ptr) ntdll._splitpath 448 448 @ cdecl _stat(str ptr) MSVCRT__stat 449 @ cdecl _stati64(str ptr) _stati64450 @ cdecl _statusfp() _statusfp449 @ cdecl _stati64(str ptr) 450 @ cdecl _statusfp() 451 451 @ cdecl _strcmpi(str str) strcasecmp 452 @ cdecl _strdate( str) _strdate453 @ cdecl _strdup(str) _strdup454 @ cdecl _strerror(long) _strerror452 @ cdecl _strdate(ptr) 453 @ cdecl _strdup(str) 454 @ cdecl _strerror(long) 455 455 @ cdecl _stricmp(str str) strcasecmp 456 456 @ stub _stricoll #(str str) 457 @ forward _strlwrntdll._strlwr457 @ cdecl _strlwr(str) ntdll._strlwr 458 458 @ stub _strncoll #(str str long) 459 459 @ cdecl _strnicmp(str str long) strncasecmp 460 460 @ stub _strnicoll #(str str long) 461 @ cdecl _strnset(str long long) _strnset462 @ cdecl _strrev(str) _strrev463 @ cdecl _strset(str long) _strset464 @ cdecl _strtime( str) _strtime465 @ forward _struprntdll._strupr466 @ cdecl _swab(str str long) _swab461 @ cdecl _strnset(str long long) 462 @ cdecl _strrev(str) 463 @ cdecl _strset(str long) 464 @ cdecl _strtime(ptr) 465 @ cdecl _strupr(str) ntdll._strupr 466 @ cdecl _swab(str str long) 467 467 @ extern _sys_errlist MSVCRT__sys_errlist 468 468 @ extern _sys_nerr MSVCRT__sys_nerr 469 @ cdecl _tell(long) _tell469 @ cdecl _tell(long) 470 470 @ stub _telli64 #(long) 471 @ cdecl _tempnam(str str) _tempnam472 @ stub _timezone # ()471 @ cdecl _tempnam(str str) 472 @ stub _timezone # extern 473 473 @ cdecl _tolower(long) MSVCRT__tolower 474 474 @ cdecl _toupper(long) MSVCRT__toupper 475 @ stub _tzname 475 @ stub _tzname # extern 476 476 @ cdecl _tzset() tzset 477 @ stub _ui64toa #(long str long)478 @ stub _ui64tow #(long wstr long)479 @ forward _ultoantdll._ultoa480 @ forward _ultowntdll._ultow481 @ cdecl _umask(long) _umask482 @ cdecl _ungetch(long) _ungetch483 @ cdecl _unlink(str) _unlink484 @ cdecl _unloaddll(long) _unloaddll485 @ cdecl _unlock(long) _unlock486 @ cdecl _utime(str ptr) _utime477 @ cdecl _ui64toa(long long ptr long) ntdll._ui64toa 478 @ cdecl _ui64tow(long long ptr long) ntdll._ui64tow 479 @ cdecl _ultoa(long ptr long) ntdll._ultoa 480 @ cdecl _ultow(long ptr long) ntdll._ultow 481 @ cdecl _umask(long) 482 @ cdecl _ungetch(long) 483 @ cdecl _unlink(str) 484 @ cdecl _unloaddll(long) 485 @ cdecl _unlock(long) 486 @ cdecl _utime(str ptr) 487 487 @ cdecl _vsnprintf(ptr long ptr ptr) vsnprintf 488 @ cdecl _vsnwprintf(ptr long wstr long) _vsnwprintf489 @ cdecl _waccess(wstr long) _waccess488 @ cdecl _vsnwprintf(ptr long wstr long) 489 @ cdecl _waccess(wstr long) 490 490 @ stub _wasctime #(ptr) 491 @ cdecl _wchdir(wstr) _wchdir492 @ cdecl _wchmod(wstr long) _wchmod491 @ cdecl _wchdir(wstr) 492 @ cdecl _wchmod(wstr long) 493 493 @ extern _wcmdln MSVCRT__wcmdln 494 @ cdecl _wcreat(wstr long) _wcreat495 @ cdecl _wcsdup(wstr) _wcsdup496 @ forward _wcsicmpntdll._wcsicmp497 @ cdecl _wcsicoll(wstr wstr) _wcsicoll498 @ forward _wcslwrntdll._wcslwr494 @ cdecl _wcreat(wstr long) 495 @ cdecl _wcsdup(wstr) 496 @ cdecl _wcsicmp(wstr wstr) ntdll._wcsicmp 497 @ cdecl _wcsicoll(wstr wstr) 498 @ cdecl _wcslwr(wstr) ntdll._wcslwr 499 499 @ stub _wcsncoll #(wstr wstr long) 500 @ forward _wcsnicmpntdll._wcsnicmp500 @ cdecl _wcsnicmp(wstr wstr long) ntdll._wcsnicmp 501 501 @ stub _wcsnicoll #(wstr wstr long) 502 @ cdecl _wcsnset(wstr long long) _wcsnset503 @ cdecl _wcsrev(wstr) _wcsrev504 @ cdecl _wcsset(wstr long) _wcsset505 @ forward _wcsuprntdll._wcsupr502 @ cdecl _wcsnset(wstr long long) 503 @ cdecl _wcsrev(wstr) 504 @ cdecl _wcsset(wstr long) 505 @ cdecl _wcsupr(wstr) ntdll._wcsupr 506 506 @ stub _wctime #(ptr) 507 507 @ extern _wenviron MSVCRT__wenviron … … 510 510 @ stub _wexeclp #(wstr wstr) varargs 511 511 @ stub _wexeclpe #(wstr wstr) varargs 512 @ stub _wexecv #(wstr wstr)513 @ stub _wexecve #(wstr wstr wstr)514 @ stub _wexecvp #(wstr wstr)515 @ stub _wexecvpe #(wstr wstr wstr)516 @ cdecl _wfdopen(long wstr) _wfdopen517 @ cdecl _wfindfirst(wstr ptr) _wfindfirst512 @ stub _wexecv #(wstr ptr) 513 @ stub _wexecve #(wstr ptr ptr) 514 @ stub _wexecvp #(wstr ptr) 515 @ stub _wexecvpe #(wstr ptr ptr) 516 @ cdecl _wfdopen(long wstr) 517 @ cdecl _wfindfirst(wstr ptr) 518 518 @ stub _wfindfirsti64 #(wstr ptr) 519 @ cdecl _wfindnext(long ptr) _wfindnext519 @ cdecl _wfindnext(long ptr) 520 520 @ stub _wfindnexti64 #(long ptr) 521 @ cdecl _wfopen(wstr wstr) _wfopen521 @ cdecl _wfopen(wstr wstr) 522 522 @ stub _wfreopen #(wstr wstr ptr) 523 @ cdecl _wfsopen(wstr wstr long) _wfsopen524 @ stub _wfullpath #( wstr wstr long)525 @ cdecl _wgetcwd(wstr long) _wgetcwd526 @ cdecl _wgetdcwd(long wstr long) _wgetdcwd527 @ cdecl _wgetenv(wstr) _wgetenv523 @ cdecl _wfsopen(wstr wstr long) 524 @ stub _wfullpath #(ptr wstr long) 525 @ cdecl _wgetcwd(wstr long) 526 @ cdecl _wgetdcwd(long wstr long) 527 @ cdecl _wgetenv(wstr) 528 528 @ extern _winmajor MSVCRT__winmajor 529 529 @ extern _winminor MSVCRT__winminor 530 530 @ extern _winver MSVCRT__winver 531 @ cdecl _wmakepath(wstr wstr wstr wstr wstr) _wmakepath532 @ cdecl _wmkdir(wstr) _wmkdir533 @ cdecl _wmktemp(wstr) _wmktemp534 @ varargs _wopen(wstr long) _wopen531 @ cdecl _wmakepath(wstr wstr wstr wstr wstr) 532 @ cdecl _wmkdir(wstr) 533 @ cdecl _wmktemp(wstr) 534 @ varargs _wopen(wstr long) 535 535 @ stub _wperror #(wstr) 536 @ stub _wpgmptr 536 @ stub _wpgmptr # extern 537 537 @ stub _wpopen #(wstr wstr) 538 @ cdecl _wputenv(wstr) _wputenv539 @ cdecl _wremove(wstr) _wremove540 @ cdecl _wrename(wstr wstr) _wrename541 @ cdecl _write(long ptr long) _write542 @ cdecl _wrmdir(wstr) _wrmdir543 @ stub _wsearchenv #(wstr wstr wstr)538 @ cdecl _wputenv(wstr) 539 @ cdecl _wremove(wstr) 540 @ cdecl _wrename(wstr wstr) 541 @ cdecl _write(long ptr long) 542 @ cdecl _wrmdir(wstr) 543 @ stub _wsearchenv #(wstr wstr ptr) 544 544 @ stub _wsetlocale #(long wstr) 545 545 @ varargs _wsopen (wstr long long) MSVCRT__wsopen … … 548 548 @ stub _wspawnlp #(long wstr wstr) varargs 549 549 @ stub _wspawnlpe #(long wstr wstr) varargs 550 @ stub _wspawnv #(long wstr wstr)551 @ stub _wspawnve #(long wstr wstr wstr)552 @ stub _wspawnvp #(long wstr wstr)553 @ stub _wspawnvpe #(long wstr wstr wstr)554 @ cdecl _wsplitpath(wstr wstr wstr wstr wstr) _wsplitpath555 @ cdecl _wstat(wstr ptr) _wstat550 @ stub _wspawnv #(long wstr ptr) 551 @ stub _wspawnve #(long wstr ptr ptr) 552 @ stub _wspawnvp #(long wstr ptr) 553 @ stub _wspawnvpe #(long wstr ptr ptr) 554 @ cdecl _wsplitpath(wstr wstr wstr wstr wstr) 555 @ cdecl _wstat(wstr ptr) 556 556 @ stub _wstati64 #(wstr ptr) 557 @ stub _wstrdate #( wstr)558 @ stub _wstrtime #( wstr)557 @ stub _wstrdate #(ptr) 558 @ stub _wstrtime #(ptr) 559 559 @ stub _wsystem #(wstr) 560 @ cdecl _wtempnam(wstr wstr) _wtempnam561 @ stub _wtmpnam #( wstr)562 @ forward _wtoi NTDLL._wtoi563 @ stub _wtoi64 #(wstr)564 @ forward _wtol NTDLL._wtol565 @ cdecl _wunlink(wstr) _wunlink566 @ cdecl _wutime(wstr ptr) _wutime567 @ cdecl _y0(double) _y0568 @ cdecl _y1(double) _y1569 @ cdecl _yn(long double ) _yn560 @ cdecl _wtempnam(wstr wstr) 561 @ stub _wtmpnam #(ptr) 562 @ cdecl _wtoi(wstr) ntdll._wtoi 563 @ cdecl _wtoi64(wstr) ntdll._wtoi64 564 @ cdecl _wtol(wstr) ntdll._wtol 565 @ cdecl _wunlink(wstr) 566 @ cdecl _wutime(wstr ptr) 567 @ cdecl _y0(double) 568 @ cdecl _y1(double) 569 @ cdecl _yn(long double ) 570 570 @ cdecl abort() MSVCRT_abort 571 @ cdecl abs(long) abs572 @ cdecl acos(double) acos573 @ cdecl asctime(ptr) asctime574 @ cdecl asin(double) asin575 @ cdecl atan(double) atan576 @ cdecl atan2(double double) atan2571 @ cdecl abs(long) 572 @ cdecl acos(double) 573 @ cdecl asctime(ptr) 574 @ cdecl asin(double) 575 @ cdecl atan(double) 576 @ cdecl atan2(double double) 577 577 @ cdecl atexit(ptr) MSVCRT_atexit 578 @ cdecl atof(str) atof579 @ cdecl atoi(str) atoi580 @ cdecl atol(str) atol581 @ cdecl bsearch(ptr ptr long long ptr) bsearch578 @ cdecl atof(str) 579 @ cdecl atoi(str) 580 @ cdecl atol(str) 581 @ cdecl bsearch(ptr ptr long long ptr) 582 582 @ cdecl calloc(long long) MSVCRT_calloc 583 @ cdecl ceil(double) ceil583 @ cdecl ceil(double) 584 584 @ cdecl clearerr(ptr) MSVCRT_clearerr 585 585 @ cdecl clock() MSVCRT_clock 586 @ cdecl cos(double) cos587 @ cdecl cosh(double) cosh588 @ cdecl ctime(ptr) ctime586 @ cdecl cos(double) 587 @ cdecl cosh(double) 588 @ cdecl ctime(ptr) 589 589 @ cdecl difftime(long long) MSVCRT_difftime 590 590 @ cdecl div(long long) MSVCRT_div 591 591 @ cdecl exit(long) MSVCRT_exit 592 @ cdecl exp(double) exp593 @ cdecl fabs(double) fabs592 @ cdecl exp(double) 593 @ cdecl fabs(double) 594 594 @ cdecl fclose(ptr) MSVCRT_fclose 595 595 @ cdecl feof(ptr) MSVCRT_feof … … 601 601 @ cdecl fgetwc(ptr) MSVCRT_fgetwc 602 602 @ cdecl fgetws(ptr long ptr) MSVCRT_fgetws 603 @ cdecl floor(double) floor604 @ cdecl fmod(double double) fmod603 @ cdecl floor(double) 604 @ cdecl fmod(double double) 605 605 @ cdecl fopen(str str) MSVCRT_fopen 606 606 @ varargs fprintf(ptr str) MSVCRT_fprintf … … 612 612 @ cdecl free(ptr) MSVCRT_free 613 613 @ cdecl freopen(str str ptr) MSVCRT_freopen 614 @ cdecl frexp(double ptr) frexp614 @ cdecl frexp(double ptr) 615 615 @ varargs fscanf(ptr str) MSVCRT_fscanf 616 616 @ cdecl fseek(ptr long long) MSVCRT_fseek … … 626 626 @ cdecl getwc(ptr) MSVCRT_getwc 627 627 @ cdecl getwchar() MSVCRT_getwchar 628 @ cdecl gmtime(ptr) gmtime629 @ forward is_wctypentdll.iswctype628 @ cdecl gmtime(ptr) 629 @ cdecl is_wctype(long long) ntdll.iswctype 630 630 @ cdecl isalnum(long) MSVCRT_isalnum 631 631 @ cdecl isalpha(long) MSVCRT_isalpha … … 640 640 @ cdecl isupper(long) MSVCRT_isupper 641 641 @ cdecl iswalnum(long) MSVCRT_iswalnum 642 @ forward iswalphantdll.iswalpha642 @ cdecl iswalpha(long) ntdll.iswalpha 643 643 @ cdecl iswascii(long) MSVCRT_iswascii 644 644 @ cdecl iswcntrl(long) MSVCRT_iswcntrl 645 @ forward iswctypentdll.iswctype645 @ cdecl iswctype(long long) ntdll.iswctype 646 646 @ cdecl iswdigit(long) MSVCRT_iswdigit 647 647 @ cdecl iswgraph(long) MSVCRT_iswgraph … … 653 653 @ cdecl iswxdigit(long) MSVCRT_iswxdigit 654 654 @ cdecl isxdigit(long) MSVCRT_isxdigit 655 @ cdecl labs(long) labs655 @ cdecl labs(long) 656 656 @ cdecl ldexp( double long) MSVCRT_ldexp 657 657 @ cdecl ldiv(long long) MSVCRT_ldiv 658 658 @ stub localeconv #() 659 @ cdecl localtime(ptr) localtime660 @ cdecl log(double) log661 @ cdecl log10(double) log10659 @ cdecl localtime(ptr) 660 @ cdecl log(double) 661 @ cdecl log10(double) 662 662 @ cdecl -register -i386 longjmp(ptr long) _MSVCRT_longjmp 663 663 @ cdecl malloc(long) MSVCRT_malloc 664 664 @ cdecl mblen(ptr long) MSVCRT_mblen 665 @ forward mbstowcsntdll.mbstowcs665 @ cdecl mbstowcs(ptr str long) ntdll.mbstowcs 666 666 @ cdecl mbtowc(wstr str long) MSVCRT_mbtowc 667 @ cdecl memchr(ptr long long) memchr668 @ cdecl memcmp(ptr ptr long) memcmp669 @ cdecl memcpy(ptr ptr long) memcpy670 @ cdecl memmove(ptr ptr long) memmove671 @ cdecl memset(ptr long long) memset667 @ cdecl memchr(ptr long long) 668 @ cdecl memcmp(ptr ptr long) 669 @ cdecl memcpy(ptr ptr long) 670 @ cdecl memmove(ptr ptr long) 671 @ cdecl memset(ptr long long) 672 672 @ cdecl mktime(ptr) MSVCRT_mktime 673 @ cdecl modf(double ptr) modf673 @ cdecl modf(double ptr) 674 674 @ cdecl perror(str) MSVCRT_perror 675 @ cdecl pow(double double) pow675 @ cdecl pow(double double) 676 676 @ varargs printf(str) MSVCRT_printf 677 677 @ cdecl putc(long ptr) MSVCRT_putc … … 680 680 @ cdecl putwc(long ptr) MSVCRT_fputwc 681 681 @ cdecl putwchar(long) _fputwchar 682 @ cdecl qsort(ptr long long ptr) qsort682 @ cdecl qsort(ptr long long ptr) 683 683 @ stub raise #(long) 684 684 @ cdecl rand() MSVCRT_rand … … 692 692 @ cdecl setvbuf(ptr str long long) MSVCRT_setvbuf 693 693 @ cdecl signal(long long) MSVCRT_signal 694 @ cdecl sin(double) sin695 @ cdecl sinh(double) sinh696 @ varargs sprintf(ptr str) sprintf697 @ cdecl sqrt(double) sqrt698 @ cdecl srand(long) srand694 @ cdecl sin(double) 695 @ cdecl sinh(double) 696 @ varargs sprintf(ptr str) 697 @ cdecl sqrt(double) 698 @ cdecl srand(long) 699 699 @ varargs sscanf(str str) MSVCRT_sscanf 700 @ cdecl strcat(str str) strcat701 @ cdecl strchr(str long) strchr702 @ cdecl strcmp(str str) strcmp703 @ cdecl strcoll(str str) strcoll704 @ cdecl strcpy(ptr str) strcpy705 @ cdecl strcspn(str str) strcspn700 @ cdecl strcat(str str) 701 @ cdecl strchr(str long) 702 @ cdecl strcmp(str str) 703 @ cdecl strcoll(str str) 704 @ cdecl strcpy(ptr str) 705 @ cdecl strcspn(str str) 706 706 @ cdecl strerror(long) MSVCRT_strerror 707 @ cdecl strftime(str long str ptr) strftime708 @ cdecl strlen(str) strlen709 @ cdecl strncat(str str long) strncat710 @ cdecl strncmp(str str long) strncmp711 @ cdecl strncpy(ptr str long) strncpy712 @ cdecl strpbrk(str str) strpbrk713 @ cdecl strrchr(str long) strrchr714 @ cdecl strspn(str str) strspn715 @ cdecl strstr(str str) strstr716 @ cdecl strtod(str ptr) strtod717 @ cdecl strtok(str str) strtok718 @ cdecl strtol(str ptr long) strtol719 @ cdecl strtoul(str ptr long) strtoul720 @ cdecl strxfrm(ptr str long) strxfrm721 @ forward swprintfntdll.swprintf707 @ cdecl strftime(str long str ptr) 708 @ cdecl strlen(str) 709 @ cdecl strncat(str str long) 710 @ cdecl strncmp(str str long) 711 @ cdecl strncpy(ptr str long) 712 @ cdecl strpbrk(str str) 713 @ cdecl strrchr(str long) 714 @ cdecl strspn(str str) 715 @ cdecl strstr(str str) 716 @ cdecl strtod(str ptr) 717 @ cdecl strtok(str str) 718 @ cdecl strtol(str ptr long) 719 @ cdecl strtoul(str ptr long) 720 @ cdecl strxfrm(ptr str long) 721 @ varargs swprintf(wstr wstr) ntdll.swprintf 722 722 @ varargs swscanf(wstr wstr) MSVCRT_swscanf 723 723 @ cdecl system(str) MSVCRT_system 724 @ cdecl tan(double) tan725 @ cdecl tanh(double) tanh724 @ cdecl tan(double) 725 @ cdecl tanh(double) 726 726 @ cdecl time(ptr) MSVCRT_time 727 727 @ cdecl tmpfile() MSVCRT_tmpfile 728 @ cdecl tmpnam( str) MSVCRT_tmpnam729 @ cdecl tolower(long) tolower730 @ cdecl toupper(long) toupper731 @ forward towlowerntdll.towlower732 @ forward towupperntdll.towupper728 @ cdecl tmpnam(ptr) MSVCRT_tmpnam 729 @ cdecl tolower(long) 730 @ cdecl toupper(long) 731 @ cdecl towlower(long) ntdll.towlower 732 @ cdecl towupper(long) ntdll.towupper 733 733 @ cdecl ungetc(long ptr) MSVCRT_ungetc 734 734 @ cdecl ungetwc(long ptr) MSVCRT_ungetwc … … 736 736 @ cdecl vfwprintf(ptr wstr long) MSVCRT_vfwprintf 737 737 @ cdecl vprintf(str long) MSVCRT_vprintf 738 @ cdecl vsprintf(ptr str ptr) vsprintf738 @ cdecl vsprintf(ptr str ptr) 739 739 @ cdecl vswprintf(ptr wstr long) MSVCRT_vswprintf 740 740 @ cdecl vwprintf(wstr long) MSVCRT_vwprintf 741 @ forward wcscatntdll.wcscat742 @ forward wcschrntdll.wcschr743 @ forward wcscmpntdll.wcscmp741 @ cdecl wcscat(wstr wstr) ntdll.wcscat 742 @ cdecl wcschr(wstr long) ntdll.wcschr 743 @ cdecl wcscmp(wstr wstr) ntdll.wcscmp 744 744 @ cdecl wcscoll(wstr wstr) MSVCRT_wcscoll 745 @ forward wcscpyntdll.wcscpy746 @ forward wcscspnntdll.wcscspn747 @ stub wcsftime #( wstr long wstr ptr)748 @ forward wcslenntdll.wcslen749 @ forward wcsncatntdll.wcsncat750 @ forward wcsncmpntdll.wcsncmp751 @ forward wcsncpyntdll.wcsncpy745 @ cdecl wcscpy(ptr wstr) ntdll.wcscpy 746 @ cdecl wcscspn(wstr wstr) ntdll.wcscspn 747 @ stub wcsftime #(ptr long wstr ptr) 748 @ cdecl wcslen(wstr) ntdll.wcslen 749 @ cdecl wcsncat(wstr wstr long) ntdll.wcsncat 750 @ cdecl wcsncmp(wstr wstr long) ntdll.wcsncmp 751 @ cdecl wcsncpy(ptr wstr long) ntdll.wcsncpy 752 752 @ cdecl wcspbrk(wstr wstr) MSVCRT_wcspbrk 753 @ forward wcsrchrntdll.wcsrchr754 @ forward wcsspnntdll.wcsspn755 @ forward wcsstrntdll.wcsstr753 @ cdecl wcsrchr(wstr long) ntdll.wcsrchr 754 @ cdecl wcsspn(wstr wstr) ntdll.wcsspn 755 @ cdecl wcsstr(wstr wstr) ntdll.wcsstr 756 756 @ stub wcstod #(wstr ptr) 757 @ forward wcstokntdll.wcstok758 @ forward wcstolntdll.wcstol759 @ forward wcstombsntdll.wcstombs760 @ forward wcstoulntdll.wcstoul761 @ stub wcsxfrm #( wstr wstr long)757 @ cdecl wcstok(wstr wstr) ntdll.wcstok 758 @ cdecl wcstol(wstr ptr long) ntdll.wcstol 759 @ cdecl wcstombs(ptr ptr long) ntdll.wcstombs 760 @ cdecl wcstoul(wstr ptr long) ntdll.wcstoul 761 @ stub wcsxfrm #(ptr wstr long) 762 762 @ cdecl wctomb(ptr long) MSVCRT_wctomb 763 763 @ varargs wprintf(wstr) MSVCRT_wprintf -
trunk/src/msvcrt/msvcrt20.def
r9655 r10005 1 ; $Id: msvcrt20.def,v 1.1 2 2003-01-10 13:13:49sandervl Exp $1 ; $Id: msvcrt20.def,v 1.13 2003-04-10 10:28:04 sandervl Exp $ 2 2 3 3 ; … … 569 569 ; _dup2 = _dup2 @555 570 570 _ecvt = _ecvt @556 571 _endthread = _endthread@557571 _endthread @557 572 572 _endthreadex = _endthreadex @558 573 573 _environ = _environ @559 -
trunk/src/msvcrt/msvcrt20.mak
r9677 r10005 1 # $Id: msvcrt20.mak,v 1. 7 2003-01-15 10:43:16sandervl Exp $1 # $Id: msvcrt20.mak,v 1.8 2003-04-10 10:28:04 sandervl Exp $ 2 2 3 3 # … … 33 33 $(OBJDIR)\$(TARGET)rsrc.obj 34 34 35 LIBS = \ 36 $(ODIN32_LIB)\msvcrt.lib \ 37 $(ODIN32_LIB)\kernel32.lib \ 38 $(ODIN32_LIB)\ntdll.lib \ 39 $(ODIN32_LIB)\user32.lib \ 40 $(EMX)\lib\mt\c.lib \ 41 $(EMX)\lib\mt\c_dllso.lib \ 42 $(EMX)\lib\mt\sys.lib \ 43 $(EMX)\lib\os2.lib \ 44 45 35 46 # 36 47 # Target name - name of the dll without extention and path. … … 39 50 40 51 all: $(OBJDIR) $(OBJDIR)\$(TARGET).dll $(TARGET).lib 41 42 $(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def43 $(LD) $(LDFLAGS) -Zso -Zsys $(OBJS) $(TARGET).def -L.\libs -lm\44 -L$(OBJDIR) -liberty_s -lmsvcrt -o $(OBJDIR)\$(TARGET).dll45 touch $(OBJDIR)\$(TARGET).map46 @echo "Illegal Sym File for EMX" > $(OBJDIR)\$(TARGET).sym47 52 48 53 $(TARGET).lib: -
trunk/src/msvcrt/msvcrt20.spec
r9655 r10005 1 ; $Id: msvcrt20.spec,v 1. 2 2003-01-10 13:13:49sandervl Exp $1 ; $Id: msvcrt20.spec,v 1.3 2003-04-10 10:28:04 sandervl Exp $ 2 2 3 3 ; -
trunk/src/msvcrt/msvcrt20rsrc.orc
r9655 r10005 1 /* $Id: msvcrt20rsrc.orc,v 1. 4 2003-01-10 13:13:50sandervl Exp $ */1 /* $Id: msvcrt20rsrc.orc,v 1.5 2003-04-10 10:28:05 sandervl Exp $ */ 2 2 3 3 #include "winuser.h" -
trunk/src/msvcrt/msvcrt40.def
r9655 r10005 1 ; $Id: msvcrt40.def,v 1.1 2 2003-01-10 13:13:50sandervl Exp $1 ; $Id: msvcrt40.def,v 1.13 2003-04-10 10:28:05 sandervl Exp $ 2 2 3 3 ; -
trunk/src/msvcrt/msvcrt40.mak
r9677 r10005 1 # $Id: msvcrt40.mak,v 1. 7 2003-01-15 10:43:16sandervl Exp $1 # $Id: msvcrt40.mak,v 1.8 2003-04-10 10:28:05 sandervl Exp $ 2 2 3 3 # … … 33 33 $(OBJDIR)\$(TARGET)rsrc.obj 34 34 35 LIBS = \ 36 $(ODIN32_LIB)\kernel32.lib \ 37 $(ODIN32_LIB)\msvcrt.lib \ 38 $(ODIN32_LIB)\ntdll.lib \ 39 $(ODIN32_LIB)\user32.lib \ 40 $(EMX)\lib\mt\c.lib \ 41 $(EMX)\lib\mt\c_dllso.lib \ 42 $(EMX)\lib\mt\sys.lib \ 43 $(EMX)\lib\os2.lib \ 44 35 45 # 36 46 # Target name - name of the dll without extention and path. … … 39 49 40 50 all: $(OBJDIR) $(OBJDIR)\$(TARGET).dll $(TARGET).lib 41 42 $(OBJDIR)\$(TARGET).dll: $(OBJS) $(TARGET).def43 $(LD) $(LDFLAGS) -Zso -Zsys $(OBJS) $(TARGET).def -L.\libs -lm\44 -L$(OBJDIR) -liberty_s -lmsvcrt -o $(OBJDIR)\$(TARGET).dll45 touch $(OBJDIR)\$(TARGET).map46 @echo "Illegal Sym File for EMX" > $(OBJDIR)\$(TARGET).sym47 51 48 52 $(TARGET).lib: -
trunk/src/msvcrt/msvcrt40rsrc.orc
r9655 r10005 1 /* $Id: msvcrt40rsrc.orc,v 1. 4 2003-01-10 13:13:50sandervl Exp $ */1 /* $Id: msvcrt40rsrc.orc,v 1.5 2003-04-10 10:28:05 sandervl Exp $ */ 2 2 3 3 #include "winuser.h" -
trunk/src/msvcrt/msvcrtrsrc.orc
r9655 r10005 1 /* $Id: msvcrtrsrc.orc,v 1. 4 2003-01-10 13:13:51sandervl Exp $ */1 /* $Id: msvcrtrsrc.orc,v 1.5 2003-04-10 10:28:06 sandervl Exp $ */ 2 2 3 3 #include "winuser.h" -
trunk/src/msvcrt/process.c
r9633 r10005 28 28 #ifdef __WIN32OS2__ 29 29 #include <emxheader.h> 30 #include <string.h> 30 31 #else 31 32 #include "config.h" … … 203 204 * _cwait (MSVCRT.@) 204 205 */ 205 int _cwait(int *status, int pid, int action)206 int MSVCRT__cwait(int *status, int pid, int action) 206 207 { 207 208 HANDLE hPid = (HANDLE)pid; … … 225 226 { 226 227 *MSVCRT__errno() = MSVCRT_ECHILD; 227 * __doserrno() = doserrno;228 *MSVCRT_doserrno() = doserrno; 228 229 } 229 230 else … … 239 240 * or double-quotes. 240 241 */ 241 int _execl(const char* name, const char* arg0, ...)242 int MSVCRT__execl(const char* name, const char* arg0, ...) 242 243 { 243 244 va_list ap; … … 261 262 * or double-quotes. 262 263 */ 263 int _execlp(const char* name, const char* arg0, ...)264 int MSVCRT__execlp(const char* name, const char* arg0, ...) 264 265 { 265 266 va_list ap; … … 268 269 char fullname[MAX_PATH]; 269 270 270 _searchenv(name, "PATH", fullname);271 MSVCRT__searchenv(name, "PATH", fullname); 271 272 272 273 va_start(ap, arg0); … … 286 287 * or double-quotes. 287 288 */ 288 int _execv(const char* name, char* const* argv)289 { 290 return _spawnve(_P_OVERLAY, name, (const char* const*) argv, NULL);289 int MSVCRT__execv(const char* name, char* const* argv) 290 { 291 return MSVCRT__spawnve(_P_OVERLAY, name, (const char* const*) argv, NULL); 291 292 } 292 293 … … 297 298 * or double-quotes. 298 299 */ 299 int _execve(const char* name, char* const* argv, const char* const* envv)300 { 301 return _spawnve(_P_OVERLAY, name, (const char* const*) argv, envv);300 int MSVCRT__execve(const char* name, char* const* argv, const char* const* envv) 301 { 302 return MSVCRT__spawnve(_P_OVERLAY, name, (const char* const*) argv, envv); 302 303 } 303 304 … … 308 309 * or double-quotes. 309 310 */ 310 int _execvpe(const char* name, char* const* argv, const char* const* envv)311 int MSVCRT__execvpe(const char* name, char* const* argv, const char* const* envv) 311 312 { 312 313 char fullname[MAX_PATH]; 313 314 314 _searchenv(name, "PATH", fullname);315 return _spawnve(_P_OVERLAY, fullname[0] ? fullname : name,315 MSVCRT__searchenv(name, "PATH", fullname); 316 return MSVCRT__spawnve(_P_OVERLAY, fullname[0] ? fullname : name, 316 317 (const char* const*) argv, envv); 317 318 } … … 323 324 * or double-quotes. 324 325 */ 325 int _execvp(const char* name, char* const* argv)326 { 327 return _execvpe(name, argv, NULL);326 int MSVCRT__execvp(const char* name, char* const* argv) 327 { 328 return MSVCRT__execvpe(name, argv, NULL); 328 329 } 329 330 … … 334 335 * or double-quotes. 335 336 */ 336 int _spawnl(int flags, const char* name, const char* arg0, ...)337 int MSVCRT__spawnl(int flags, const char* name, const char* arg0, ...) 337 338 { 338 339 va_list ap; … … 356 357 * or double-quotes. 357 358 */ 358 int _spawnlp(int flags, const char* name, const char* arg0, ...)359 int MSVCRT__spawnlp(int flags, const char* name, const char* arg0, ...) 359 360 { 360 361 va_list ap; … … 363 364 char fullname[MAX_PATH]; 364 365 365 _searchenv(name, "PATH", fullname);366 MSVCRT__searchenv(name, "PATH", fullname); 366 367 367 368 va_start(ap, arg0); … … 381 382 * or double-quotes. 382 383 */ 383 int _spawnve(int flags, const char* name, const char* const* argv,384 int MSVCRT__spawnve(int flags, const char* name, const char* const* argv, 384 385 const char* const* envv) 385 386 { … … 409 410 * or double-quotes. 410 411 */ 411 int _spawnv(int flags, const char* name, const char* const* argv)412 { 413 return _spawnve(flags, name, argv, NULL);412 int MSVCRT__spawnv(int flags, const char* name, const char* const* argv) 413 { 414 return MSVCRT__spawnve(flags, name, argv, NULL); 414 415 } 415 416 … … 420 421 * or double-quotes. 421 422 */ 422 int _spawnvpe(int flags, const char* name, const char* const* argv,423 int MSVCRT__spawnvpe(int flags, const char* name, const char* const* argv, 423 424 const char* const* envv) 424 425 { 425 426 char fullname[MAX_PATH]; 426 _searchenv(name, "PATH", fullname);427 return _spawnve(flags, fullname[0] ? fullname : name, argv, envv);427 MSVCRT__searchenv(name, "PATH", fullname); 428 return MSVCRT__spawnve(flags, fullname[0] ? fullname : name, argv, envv); 428 429 } 429 430 … … 434 435 * or double-quotes. 435 436 */ 436 int _spawnvp(int flags, const char* name, const char* const* argv)437 { 438 return _spawnvpe(flags, name, argv, NULL);437 int MSVCRT__spawnvp(int flags, const char* name, const char* const* argv) 438 { 439 return MSVCRT__spawnvpe(flags, name, argv, NULL); 439 440 } 440 441 … … 448 449 449 450 /* Make a writable copy for CreateProcess */ 450 cmdcopy= _strdup(cmd);451 cmdcopy= MSVCRT__strdup(cmd); 451 452 /* FIXME: should probably launch cmd interpreter in COMSPEC */ 452 453 res=msvcrt_spawn(_P_WAIT, NULL, cmdcopy, NULL); … … 477 478 } 478 479 } 480 481 /********************************************************************* 482 * _getdllprocaddr (MSVCRT.@) 483 */ 484 void *_getdllprocaddr(int dll, const char *name, int ordinal) 485 { 486 if (name) 487 { 488 if (ordinal != -1) return NULL; 489 return GetProcAddress( (HMODULE)dll, name ); 490 } 491 if (HIWORD(ordinal)) return NULL; 492 return GetProcAddress( (HMODULE)dll, (LPCSTR)(ULONG_PTR)ordinal ); 493 } -
trunk/src/msvcrt/relay2.S
r9633 r10005 81 81 .stabs "",100,0,0,.Letext 82 82 .Letext: 83 -
trunk/src/msvcrt/scanf.c
r9633 r10005 28 28 #include "msvcrt.h" 29 29 #include "msvcrt/conio.h" 30 #include "msvcrt/ctype.h" 30 31 #include "msvcrt/io.h" 31 32 #include "msvcrt/stdio.h" 32 33 #include "msvcrt/wctype.h" 33 34 #include "wine/debug.h" 34 35 #include <ctype.h> 35 36 WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); 36 37 -
trunk/src/msvcrt/scanf.h
r9633 r10005 34 34 #define _CHAR_ char 35 35 #define _EOF_ MSVCRT_EOF 36 #define _ISSPACE_(c) isspace(c)37 #define _ISDIGIT_(c) isdigit(c)36 #define _ISSPACE_(c) MSVCRT_isspace(c) 37 #define _ISDIGIT_(c) MSVCRT_isdigit(c) 38 38 #define _CONVERT_(c) c /*** FIXME ***/ 39 39 #define _CHAR2DIGIT_(c, base) char2digit((c), (base)) … … 41 41 42 42 #ifdef CONSOLE 43 #define _GETC_(file) _getch()44 #define _UNGETC_(nch, file) _ungetch(nch)45 #define _FUNCTION_ _cscanf(const _CHAR_ *format, ...)43 #define _GETC_(file) MSVCRT__getch() 44 #define _UNGETC_(nch, file) MSVCRT__ungetch(nch) 45 #define _FUNCTION_ MSVCRT__cscanf(const _CHAR_ *format, ...) 46 46 #else 47 47 #ifdef STRING … … 115 115 int w_prefix = 0; 116 116 int prefix_finished = 0; 117 /* int I64_prefix = 0; */117 int I64_prefix = 0; 118 118 format++; 119 119 /* look for leading asterisk, which means 'suppress assignment of … … 139 139 if (*(format + 1) == '6' && 140 140 *(format + 2) == '4') { 141 /* I64_prefix = 1; */141 I64_prefix = 1; 142 142 format += 2; 143 143 FIXME("I64 prefix currently not implemented in fscanf/fwscanf"); … … 222 222 #define _SET_NUMBER_(type) *va_arg(ap, type*) = negative ? -cur : cur 223 223 if (number_signed) { 224 if (l_prefix) _SET_NUMBER_(long int); 224 if (I64_prefix) _SET_NUMBER_(long long); 225 else if (l_prefix) _SET_NUMBER_(long int); 225 226 else if (h_prefix) _SET_NUMBER_(short int); 226 227 else _SET_NUMBER_(int); … … 230 231 negative = 0; 231 232 } 232 if (l_prefix) _SET_NUMBER_(unsigned long int); 233 if (I64_prefix) _SET_NUMBER_(long long); 234 else if (l_prefix) _SET_NUMBER_(unsigned long int); 233 235 else if (h_prefix) 234 236 _SET_NUMBER_(unsigned short int); -
trunk/src/msvcrt/string.c
r9633 r10005 25 25 #include "msvcrt/stdlib.h" 26 26 #include "msvcrt/string.h" 27 27 #include <string.h> 28 28 #include "wine/debug.h" 29 29 … … 51 51 * _strdup (MSVCRT.@) 52 52 */ 53 char* _strdup(const char* str)53 char* MSVCRT__strdup(const char* str) 54 54 { 55 55 char * ret = MSVCRT_malloc(strlen(str)+1); … … 61 61 * _strnset (MSVCRT.@) 62 62 */ 63 char* _strnset(char* str, int value, unsigned int len)63 char* MSVCRT__strnset(char* str, int value, unsigned int len) 64 64 { 65 dprintf(("MSVCRT: _strnset %s %d %d",str, value, len)); 65 66 if (len > 0 && str) 66 67 while (*str && len--) … … 72 73 * _strrev (MSVCRT.@) 73 74 */ 74 char* _strrev(char* str)75 char* MSVCRT__strrev(char* str) 75 76 { 76 77 char * p1; 77 78 char * p2; 79 80 dprintf(("MSVCRT: _strrev %s",str)); 78 81 79 82 if (str && *str) … … 91 94 * _strset (MSVCRT.@) 92 95 */ 93 char* _strset(char* str, int value)96 char* MSVCRT__strset(char* str, int value) 94 97 { 95 98 char *ptr = str; 99 100 dprintf(("MSVCRT: _strset %s %d",str, value)); 101 96 102 while (*ptr) 97 103 *ptr++ = value; … … 103 109 * _swab (MSVCRT.@) 104 110 */ 105 void _swab(char* src, char* dst, int len)111 void MSVCRT__swab(char* src, char* dst, int len) 106 112 { 113 dprintf(("MSVCRT: _swab %s %s %d",src, dst, len)); 114 107 115 if (len > 1) 108 116 { … … 116 124 } 117 125 } 126 127 int MSVCRT_strncmp (const char* a,const char* b,MSVCRT(size_t) c) 128 { 129 dprintf(("MSVCRT: strncmp %s,%s (%d)",a,b,c)); 130 return strncmp(a,b,c); 131 } 132 -
trunk/src/msvcrt/thread.c
r9633 r10005 19 19 */ 20 20 #include "msvcrt.h" 21 21 #include <string.h> 22 22 #include "msvcrt/malloc.h" 23 23 #include "msvcrt/process.h" … … 75 75 * _beginthread (MSVCRT.@) 76 76 */ 77 unsigned long MSVCRT_ beginthread(77 unsigned long MSVCRT__beginthread( 78 78 _beginthread_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */ 79 79 unsigned int stack_size, /* [in] Stack size for new thread or 0 */ … … 115 115 116 116 /********************************************************************* 117 * MSVCRT_ endthread (MSVCRT.@)117 * MSVCRT__endthread (MSVCRT.@) 118 118 */ 119 void MSVCRT_ endthread(void)119 void MSVCRT__endthread(void) 120 120 { 121 TRACE(" (void)\n");121 TRACE("MSVCRT: _endthread(void)\n"); 122 122 123 123 /* FIXME */ … … 131 131 unsigned int retval) /* [in] Thread exit code */ 132 132 { 133 TRACE(" (%d)\n", retval);133 TRACE("MSVCRT: _endthreadex (%d)\n", retval); 134 134 135 135 /* FIXME */ -
trunk/src/msvcrt/time.c
r9633 r10005 23 23 #ifdef __WIN32OS2__ 24 24 #include <emxheader.h> 25 #include <sys/times.h> 25 #include <unistd.h> 26 #include <time.h> 27 #include <sys\times.h> 26 28 #else 27 29 #include "config.h" … … 63 65 { 64 66 MSVCRT_time_t res; 67 dprintf(("MSVCRT: mktime")); 65 68 struct tm tm; 66 69 … … 89 92 * _strdate (MSVCRT.@) 90 93 */ 91 char* _strdate(char* date)94 char* MSVCRT__strdate(char* date) 92 95 { 96 dprintf(("MSVCRT: _strdate")); 93 97 return msvcrt_get_current_time(date,"%m/%d/%y"); 94 98 } … … 97 101 * _strtime (MSVCRT.@) 98 102 */ 99 char* _strtime(char* date)103 char* MSVCRT__strtime(char* date) 100 104 { 105 dprintf(("MSVCRT: _strtime")); 101 106 return msvcrt_get_current_time(date,"%H:%M:%S"); 102 107 } … … 110 115 clock_t res; 111 116 112 times(&alltimes); 117 dprintf(("MSVCRT: clock")); 118 119 emx__times(&alltimes); 113 120 res = alltimes.tms_utime + alltimes.tms_stime + 114 121 alltimes.tms_cutime + alltimes.tms_cstime; … … 124 131 double MSVCRT_difftime(MSVCRT_time_t time1, MSVCRT_time_t time2) 125 132 { 133 dprintf(("MSVCRT: difftime")); 126 134 return (double)(time1 - time2); 127 135 } … … 133 141 { 134 142 MSVCRT_time_t curtime = time(NULL); 143 dprintf(("MSVCRT: time")); 135 144 return buf ? *buf = curtime : curtime; 136 145 } … … 140 149 */ 141 150 #ifdef __WIN32OS2__ 142 void MSVCRT_ ftime(struct _timeb *buf)151 void MSVCRT__ftime(struct _timeb *buf) 143 152 #else 144 153 void _ftime(struct _timeb *buf) 145 154 #endif 146 155 { 156 dprintf(("MSVCRT: _ftime %p",buf)); 147 157 buf->time = MSVCRT_time(NULL); 148 158 buf->millitm = 0; /* FIXME */ … … 150 160 buf->dstflag = 0; 151 161 } 162 163 /********************************************************************* 164 * _daylight (MSVCRT.@) 165 */ 166 int MSVCRT___daylight = 1; /* FIXME: assume daylight */ 167 168 /********************************************************************* 169 * __p_daylight (MSVCRT.@) 170 */ 171 void *MSVCRT___p__daylight(void) 172 { 173 return &MSVCRT___daylight; 174 } -
trunk/src/msvcrt/wcs.c
r9633 r10005 20 20 */ 21 21 #include <limits.h> 22 #include <stdlib.h> 22 23 #include <stdio.h> 24 #include <ctype.h> 25 #include <string.h> 26 23 27 #include "msvcrt.h" 24 28 #include "winnls.h" … … 58 62 { 59 63 MSVCRT_wchar_t* ret = NULL; 64 dprintf(("MSVCRT: _wcsdup %s",debugstr_w(str))); 60 65 if (str) 61 66 { … … 118 123 const MSVCRT_wchar_t *format, va_list valist) 119 124 { 120 /* If you fix a bug in this function, fix it in ntdll/wcstring.c also! */ 121 unsigned int written = 0; 122 const MSVCRT_wchar_t *iter = format; 123 char bufa[256], fmtbufa[64], *fmta; 124 125 TRACE("(%d,%s)\n",len,debugstr_w(format)); 126 127 while (*iter) 128 { 129 while (*iter && *iter != '%') 130 { 131 if (written++ >= len) 132 return -1; 133 *str++ = *iter++; 134 } 135 if (*iter == '%') 136 { 137 fmta = fmtbufa; 138 *fmta++ = *iter++; 139 while (*iter == '0' || 140 *iter == '+' || 141 *iter == '-' || 142 *iter == ' ' || 143 *iter == '0' || 144 *iter == '*' || 145 *iter == '#') 146 { 147 if (*iter == '*') 148 { 149 char *buffiter = bufa; 150 int fieldlen = va_arg(valist, int); 151 sprintf(buffiter, "%d", fieldlen); 152 while (*buffiter) 153 *fmta++ = *buffiter++; 154 } 155 else 156 *fmta++ = *iter; 157 iter++; 158 } 159 160 while (isdigit(*iter)) 161 *fmta++ = *iter++; 162 163 if (*iter == '.') 164 { 165 *fmta++ = *iter++; 166 if (*iter == '*') 167 { 168 char *buffiter = bufa; 169 int fieldlen = va_arg(valist, int); 170 sprintf(buffiter, "%d", fieldlen); 171 while (*buffiter) 172 *fmta++ = *buffiter++; 173 } 174 else 175 while (isdigit(*iter)) 176 *fmta++ = *iter++; 177 } 178 if (*iter == 'h' || 179 *iter == 'l') 180 *fmta++ = *iter++; 181 182 switch (*iter) 183 { 184 case 's': 185 { 186 static const MSVCRT_wchar_t none[] = { '(', 'n', 'u', 'l', 'l', ')', 0 }; 187 const MSVCRT_wchar_t *wstr = va_arg(valist, const MSVCRT_wchar_t *); 188 const MSVCRT_wchar_t *striter = wstr ? wstr : none; 189 while (*striter) 190 { 191 if (written++ >= len) 192 return -1; 193 *str++ = *striter++; 194 } 195 iter++; 196 break; 197 } 198 199 case 'c': 200 if (written++ >= len) 201 return -1; 202 *str++ = (MSVCRT_wchar_t)va_arg(valist, int); 203 iter++; 204 break; 205 206 default: 207 { 208 /* For non wc types, use system sprintf and append to wide char output */ 209 /* FIXME: for unrecognised types, should ignore % when printing */ 210 char *bufaiter = bufa; 211 if (*iter == 'p') 212 sprintf(bufaiter, "%08lX", va_arg(valist, long)); 213 else 214 { 215 *fmta++ = *iter; 216 *fmta = '\0'; 217 if (*iter == 'f') 218 sprintf(bufaiter, fmtbufa, va_arg(valist, double)); 219 else 220 sprintf(bufaiter, fmtbufa, va_arg(valist, void *)); 221 } 222 while (*bufaiter) 223 { 224 if (written++ >= len) 225 return -1; 226 *str++ = *bufaiter++; 227 } 228 iter++; 229 break; 230 } 231 } 232 } 233 } 234 if (written >= len) 235 return -1; 236 *str++ = 0; 237 return (int)written; 125 return vsnprintfW(str, len, format, valist); 238 126 } 239 127 … … 243 131 int MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, va_list args ) 244 132 { 245 return _vsnwprintf( str, INT_MAX, format, args );133 return vsnprintfW( str, INT_MAX, format, args ); 246 134 } 247 135 … … 365 253 } 366 254 367 /*********************************************************************368 * _itow (MSVCRT.@)369 */370 MSVCRT_wchar_t* _itow(int value,MSVCRT_wchar_t* out,int base)371 {372 char buf[64];373 _itoa(value, buf, base);374 MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, buf, -1, out, 128);375 return out;376 }377 378 /*********************************************************************379 * _ltow (MSVCRT.@)380 */381 MSVCRT_wchar_t* _ltow(long value,MSVCRT_wchar_t* out,int base)382 {383 char buf[128];384 _ltoa(value, buf, base);385 MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, buf, -1, out, 128);386 return out;387 }
Note:
See TracChangeset
for help on using the changeset viewer.