Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4ab1558d
Commit
4ab1558d
authored
Jan 22, 2001
by
Jon Griffiths
Committed by
Alexandre Julliard
Jan 22, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Remove <string.h> from winnt.h.
- ntdll: complete crt functions, prevent libc imports, fix sscanf.
parent
7a6bad8f
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
274 additions
and
17 deletions
+274
-17
dplobby.c
dlls/dplayx/dplobby.c
+1
-0
msvcrt.h
dlls/msvcrt/msvcrt.h
+2
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+16
-16
string.c
dlls/ntdll/string.c
+88
-0
wcstring.c
dlls/ntdll/wcstring.c
+157
-0
wgl.c
dlls/opengl32/wgl.c
+1
-0
setupx_main.c
dlls/setupapi/setupx_main.c
+1
-0
lstr.c
dlls/user/lstr.c
+1
-0
user_main.c
dlls/user/user_main.c
+1
-0
aspi.c
dlls/winaspi/aspi.c
+1
-0
http.c
dlls/wininet/http.c
+1
-0
protocol.c
dlls/wsock32/protocol.c
+1
-0
winnt.h
include/winnt.h
+0
-1
pe_image.c
loader/pe_image.c
+1
-0
import.c
tools/winebuild/import.c
+1
-0
main.c
tools/winebuild/main.c
+1
-0
No files found.
dlls/dplayx/dplobby.c
View file @
4ab1558d
...
...
@@ -5,6 +5,7 @@
* <presently under construction - contact hunnise@nortelnetworks.com>
*
*/
#include <string.h>
#include "winerror.h"
#include "winnt.h"
#include "winreg.h"
...
...
dlls/msvcrt/msvcrt.h
View file @
4ab1558d
...
...
@@ -8,6 +8,8 @@
#include "winerror.h"
#include "winnls.h"
#include <stdarg.h>
#include <ctype.h>
#include <string.h>
/* Files */
#define MSVCRT_EOF -1
...
...
dlls/ntdll/ntdll.spec
View file @
4ab1558d
...
...
@@ -884,11 +884,11 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem
@ cdecl _ftol() NTDLL__ftol
@ cdecl _itoa(long ptr long) _itoa
@ cdecl _ltoa(long ptr long) _ltoa
@
stub _
memccpy
@
cdecl _memccpy(ptr ptr long long)
memccpy
@ cdecl _memicmp(str str long) _memicmp
@ varargs _snprintf(ptr long ptr) snprintf
@
stub
_snwprintf
@
stub
_splitpath
@
varargs _snwprintf(wstr long wstr)
_snwprintf
@
cdecl _splitpath(str str str str str)
_splitpath
@ cdecl _strcmpi(str str) strcasecmp
@ cdecl _stricmp(str str) strcasecmp
@ cdecl _strlwr(str) _strlwr
...
...
@@ -901,14 +901,14 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem
@ cdecl _wcslwr(wstr) NTDLL__wcslwr
@ cdecl _wcsnicmp(wstr wstr long) NTDLL__wcsnicmp
@ cdecl _wcsupr(wstr) NTDLL__wcsupr
@
stub
abs
@
stub
atan
@
cdecl -noimport abs(long)
abs
@
cdecl -noimport atan(double)
atan
@ cdecl -noimport atoi(str) atoi
@ cdecl -noimport atol(str) atol
@
stub
ceil
@
cdecl -noimport ceil(double)
ceil
@ cdecl -noimport cos(double) cos
@
stub
fabs
@
stub
floor
@
cdecl -noimport fabs(double)
fabs
@
cdecl -noimport floor(double)
floor
@ cdecl isalpha(long) isalpha
@ cdecl isdigit(long) isdigit
@ cdecl islower(long) islower
...
...
@@ -918,8 +918,8 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem
@ cdecl iswalpha(long) NTDLL_iswalpha
@ cdecl iswctype(long long) NTDLL_iswctype
@ cdecl isxdigit(long) isxdigit
@
stub
labs
@
stub
log
@
cdecl -noimport labs(long)
labs
@
cdecl -noimport log(double)
log
@ cdecl mbstowcs(ptr str long) NTDLL_mbstowcs
@ cdecl -noimport memchr(ptr long long) memchr
@ cdecl -noimport memcmp(ptr ptr long) memcmp
...
...
@@ -929,9 +929,9 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem
@ cdecl -noimport pow(double double) pow
@ cdecl -noimport qsort(ptr long long ptr) qsort
@ cdecl -noimport sin(double) sin
@ varargs sprintf(str str) sprintf
@
stub
sqrt
@ varargs
sscanf(
) sscanf
@ varargs
-noimport
sprintf(str str) sprintf
@
cdecl -noimport sqrt(double)
sqrt
@ varargs
-noimport sscanf(str str
) sscanf
@ cdecl -noimport strcat(str str) strcat
@ cdecl -noimport strchr(str long) strchr
@ cdecl -noimport strcmp(str str) strcmp
...
...
@@ -946,13 +946,13 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem
@ cdecl -noimport strspn(str str) strspn
@ cdecl -noimport strstr(str str) strstr
@ cdecl -noimport strtol(str ptr long) strtol
@
stub
swprintf
@
stub
tan
@
varargs swprintf(wstr wstr) NTDLL_
swprintf
@
cdecl -noimport tan(double)
tan
@ cdecl tolower(long) tolower
@ cdecl toupper(long) toupper
@ cdecl towlower(long) NTDLL_towlower
@ cdecl towupper(long) NTDLL_towupper
@ cdecl vsprintf(ptr str ptr) vsprintf
@ cdecl
-noimport
vsprintf(ptr str ptr) vsprintf
@ cdecl wcscat(wstr wstr) NTDLL_wcscat
@ cdecl wcschr(wstr long) NTDLL_wcschr
@ cdecl wcscmp(wstr wstr) NTDLL_wcscmp
...
...
dlls/ntdll/string.c
View file @
4ab1558d
...
...
@@ -2,6 +2,7 @@
* NTDLL string functions
*
* Copyright 2000 Alexandre Julliard
* Copyright 2000 Jon Griffiths
*/
#include "config.h"
...
...
@@ -92,3 +93,90 @@ LPSTR __cdecl _itoa( int x, LPSTR buf, INT radix )
{
return
_ltoa
(
x
,
buf
,
radix
);
}
/*********************************************************************
* _splitpath (NTDLL)
*/
void
__cdecl
_splitpath
(
const
char
*
inpath
,
char
*
drv
,
char
*
dir
,
char
*
fname
,
char
*
ext
)
{
/* Modified PD code from 'snippets' collection. */
char
ch
,
*
ptr
,
*
p
;
char
pathbuff
[
MAX_PATH
],
*
path
=
pathbuff
;
strcpy
(
pathbuff
,
inpath
);
/* convert slashes to backslashes for searching */
for
(
ptr
=
(
char
*
)
path
;
*
ptr
;
++
ptr
)
if
(
'/'
==
*
ptr
)
*
ptr
=
'\\'
;
/* look for drive spec */
if
(
'\0'
!=
(
ptr
=
strchr
(
path
,
':'
)))
{
++
ptr
;
if
(
drv
)
{
strncpy
(
drv
,
path
,
ptr
-
path
);
drv
[
ptr
-
path
]
=
'\0'
;
}
path
=
ptr
;
}
else
if
(
drv
)
*
drv
=
'\0'
;
/* find rightmost backslash or leftmost colon */
if
(
NULL
==
(
ptr
=
strrchr
(
path
,
'\\'
)))
ptr
=
(
strchr
(
path
,
':'
));
if
(
!
ptr
)
{
ptr
=
(
char
*
)
path
;
/* no path */
if
(
dir
)
*
dir
=
'\0'
;
}
else
{
++
ptr
;
/* skip the delimiter */
if
(
dir
)
{
ch
=
*
ptr
;
*
ptr
=
'\0'
;
strcpy
(
dir
,
path
);
*
ptr
=
ch
;
}
}
if
(
NULL
==
(
p
=
strrchr
(
ptr
,
'.'
)))
{
if
(
fname
)
strcpy
(
fname
,
ptr
);
if
(
ext
)
*
ext
=
'\0'
;
}
else
{
*
p
=
'\0'
;
if
(
fname
)
strcpy
(
fname
,
ptr
);
*
p
=
'.'
;
if
(
ext
)
strcpy
(
ext
,
p
);
}
/* Fix pathological case - Win returns ':' as part of the
* directory when no drive letter is given.
*/
if
(
drv
&&
drv
[
0
]
==
':'
)
{
*
drv
=
'\0'
;
if
(
dir
)
{
pathbuff
[
0
]
=
':'
;
pathbuff
[
1
]
=
'\0'
;
strcat
(
pathbuff
,
dir
);
strcpy
(
dir
,
pathbuff
);
}
}
}
dlls/ntdll/wcstring.c
View file @
4ab1558d
...
...
@@ -2,13 +2,16 @@
* NTDLL wide-char functions
*
* Copyright 2000 Alexandre Julliard
* Copyright 2000 Jon Griffiths
*/
#include "config.h"
#include <ctype.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
...
...
@@ -334,3 +337,157 @@ LPWSTR __cdecl _ultow(ULONG value, LPWSTR string, INT radix)
*
sp
=
0
;
return
string
;
}
/* INTERNAL: Wide char snprintf
* If you fix a bug in this function, fix it in msvcrt/wcs.c also!
*/
static
int
__cdecl
NTDLL_vsnwprintf
(
WCHAR
*
str
,
unsigned
int
len
,
const
WCHAR
*
format
,
va_list
valist
)
{
unsigned
int
written
=
0
;
const
WCHAR
*
iter
=
format
;
char
bufa
[
256
],
fmtbufa
[
64
],
*
fmta
;
TRACE
(
"(%d,%s)
\n
"
,
len
,
debugstr_w
(
format
));
while
(
*
iter
)
{
while
(
*
iter
&&
*
iter
!=
(
WCHAR
)
L'%'
)
{
if
(
written
++
>=
len
)
return
-
1
;
*
str
++
=
*
iter
++
;
}
if
(
*
iter
==
(
WCHAR
)
L'%'
)
{
fmta
=
fmtbufa
;
*
fmta
++
=
*
iter
++
;
while
(
*
iter
==
(
WCHAR
)
L'0'
||
*
iter
==
(
WCHAR
)
L'+'
||
*
iter
==
(
WCHAR
)
L'-'
||
*
iter
==
(
WCHAR
)
L' '
||
*
iter
==
(
WCHAR
)
L'0'
||
*
iter
==
(
WCHAR
)
L'*'
||
*
iter
==
(
WCHAR
)
L'#'
)
{
if
(
*
iter
==
(
WCHAR
)
L'*'
)
{
char
*
buffiter
=
bufa
;
int
fieldlen
=
va_arg
(
valist
,
int
);
sprintf
(
buffiter
,
"%d"
,
fieldlen
);
while
(
*
buffiter
)
*
fmta
++
=
*
buffiter
++
;
}
else
*
fmta
++
=
*
iter
;
iter
++
;
}
while
(
isdigit
(
*
iter
))
*
fmta
++
=
*
iter
++
;
if
(
*
iter
==
(
WCHAR
)
L'.'
)
{
*
fmta
++
=
*
iter
++
;
if
(
*
iter
==
(
WCHAR
)
L'*'
)
{
char
*
buffiter
=
bufa
;
int
fieldlen
=
va_arg
(
valist
,
int
);
sprintf
(
buffiter
,
"%d"
,
fieldlen
);
while
(
*
buffiter
)
*
fmta
++
=
*
buffiter
++
;
}
else
while
(
isdigit
(
*
iter
))
*
fmta
++
=
*
iter
++
;
}
if
(
*
iter
==
(
WCHAR
)
L'h'
||
*
iter
==
(
WCHAR
)
L'l'
)
{
*
fmta
++
=
*
iter
++
;
*
fmta
++
=
*
iter
++
;
}
switch
(
*
iter
)
{
case
(
WCHAR
)
L's'
:
{
static
const
WCHAR
none
[]
=
{
'('
,
'n'
,
'u'
,
'l'
,
'l'
,
')'
,
0
};
const
WCHAR
*
wstr
=
va_arg
(
valist
,
const
WCHAR
*
);
const
WCHAR
*
striter
=
wstr
?
wstr
:
none
;
while
(
*
striter
)
{
if
(
written
++
>=
len
)
return
-
1
;
*
str
++
=
*
striter
++
;
}
iter
++
;
break
;
}
case
(
WCHAR
)
L'c'
:
if
(
written
++
>=
len
)
return
-
1
;
*
str
++
=
va_arg
(
valist
,
WCHAR
);
iter
++
;
break
;
default:
{
/* For non wc types, use system sprintf and append to wide char output */
/* FIXME: for unrecognised types, should ignore % when printing */
char
*
bufaiter
=
bufa
;
if
(
*
iter
==
(
WCHAR
)
L'p'
)
sprintf
(
bufaiter
,
"%08lX"
,
va_arg
(
valist
,
long
));
else
{
*
fmta
++
=
*
iter
;
*
fmta
=
'\0'
;
sprintf
(
bufaiter
,
fmtbufa
,
va_arg
(
valist
,
void
*
));
}
while
(
*
bufaiter
)
{
if
(
written
++
>=
len
)
return
-
1
;
*
str
++
=
*
bufaiter
++
;
}
iter
++
;
break
;
}
}
}
}
if
(
written
>=
len
)
return
-
1
;
*
str
++
=
(
WCHAR
)
L'\0'
;
return
(
int
)
written
;
}
/***********************************************************************
* _snwprintf (NTDLL)
*/
int
__cdecl
_snwprintf
(
WCHAR
*
str
,
unsigned
int
len
,
const
WCHAR
*
format
,
...)
{
int
retval
;
va_list
valist
;
va_start
(
valist
,
format
);
retval
=
NTDLL_vsnwprintf
(
str
,
len
,
format
,
valist
);
va_end
(
valist
);
return
retval
;
}
/***********************************************************************
* NTDLL_swprintf (NTDLL)
*/
int
__cdecl
NTDLL_swprintf
(
WCHAR
*
str
,
const
WCHAR
*
format
,
...)
{
int
retval
;
va_list
valist
;
va_start
(
valist
,
format
);
retval
=
NTDLL_vsnwprintf
(
str
,
INT_MAX
,
format
,
valist
);
va_end
(
valist
);
return
retval
;
}
dlls/opengl32/wgl.c
View file @
4ab1558d
...
...
@@ -4,6 +4,7 @@
*/
#include <stdlib.h>
#include <string.h>
#include "wine/exception.h"
...
...
dlls/setupapi/setupx_main.c
View file @
4ab1558d
...
...
@@ -43,6 +43,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "winreg.h"
#include "wine/winuser16.h"
#include "setupx16.h"
...
...
dlls/user/lstr.c
View file @
4ab1558d
...
...
@@ -10,6 +10,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
...
...
dlls/user/user_main.c
View file @
4ab1558d
...
...
@@ -2,6 +2,7 @@
* USER initialization code
*/
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
...
...
dlls/winaspi/aspi.c
View file @
4ab1558d
...
...
@@ -31,6 +31,7 @@ HKEY_DYN_DATA
#include <dirent.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include "debugtools.h"
#include "winreg.h"
...
...
dlls/wininet/http.c
View file @
4ab1558d
...
...
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include "internet.h"
...
...
dlls/wsock32/protocol.c
View file @
4ab1558d
...
...
@@ -7,6 +7,7 @@
#include "config.h"
#include <stdio.h>
#include <string.h>
#include "winbase.h"
#include "debugtools.h"
#include "heap.h"
...
...
include/winnt.h
View file @
4ab1558d
...
...
@@ -11,7 +11,6 @@
#ifndef RC_INVOKED
#include <ctype.h>
#include <string.h>
#include <stddef.h>
#endif
...
...
loader/pe_image.c
View file @
4ab1558d
...
...
@@ -29,6 +29,7 @@
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
#include <string.h>
#include "wine/winbase16.h"
#include "winerror.h"
#include "snoop.h"
...
...
tools/winebuild/import.c
View file @
4ab1558d
...
...
@@ -8,6 +8,7 @@
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "config.h"
#include "winnt.h"
...
...
tools/winebuild/main.c
View file @
4ab1558d
...
...
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include "config.h"
#include "winnt.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment