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
04a8eda9
Commit
04a8eda9
authored
Oct 17, 2000
by
Andreas Mohr
Committed by
Alexandre Julliard
Oct 17, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented old Win 2.x string functions.
parent
cb4ff8c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
4 deletions
+52
-4
kernel.spec
dlls/kernel/kernel.spec
+4
-4
kernel_main.c
dlls/kernel/kernel_main.c
+48
-0
No files found.
dlls/kernel/kernel.spec
View file @
04a8eda9
...
...
@@ -83,10 +83,10 @@ owner kernel32
75 stub OpenPathName
76 stub DeletePathName
# Reserved*: old Win 2.x functions now moved to USER (Win 3.0+)
77
stub Reserved1 #
AnsiNext16
78
stub Reserved2 #
AnsiPrev16
79
stub Reserved3 #
AnsiUpper16
80
stub Reserved4 #
AnsiLower16
77
pascal Reserved1(segptr) KERNEL_
AnsiNext16
78
pascal Reserved2(segptr segptr) KERNEL_
AnsiPrev16
79
pascal Reserved3(segstr) KERNEL_
AnsiUpper16
80
pascal Reserved4(segstr) KERNEL_
AnsiLower16
81 pascal16 _lclose(word) _lclose16
82 pascal16 _lread(word segptr word) WIN16_lread
83 pascal16 _lcreat(str word) _lcreat16
...
...
dlls/kernel/kernel_main.c
View file @
04a8eda9
...
...
@@ -3,6 +3,7 @@
*/
#include <assert.h>
#include <ctype.h>
#include "winbase.h"
#include "wine/winbase16.h"
...
...
@@ -111,3 +112,50 @@ BOOL WINAPI MAIN_KernelInit( HINSTANCE hinst, DWORD reason, LPVOID reserved )
* Entry point for kernel functions that do nothing.
*/
LONG
WINAPI
KERNEL_nop
(
void
)
{
return
0
;
}
/***************************************************************************
*
* Win 2.x string functions now moved to USER
*
* We rather want to implement them here instead of doing Callouts
*/
SEGPTR
WINAPI
KERNEL_AnsiNext16
(
SEGPTR
current
)
{
return
(
*
(
char
*
)
PTR_SEG_TO_LIN
(
current
))
?
current
+
1
:
current
;
}
SEGPTR
WINAPI
KERNEL_AnsiPrev16
(
SEGPTR
start
,
SEGPTR
current
)
{
return
(
current
==
start
)
?
start
:
current
-
1
;
}
SEGPTR
WINAPI
KERNEL_AnsiUpper16
(
SEGPTR
strOrChar
)
{
/* uppercase only one char if strOrChar < 0x10000 */
if
(
HIWORD
(
strOrChar
))
{
char
*
s
=
PTR_SEG_TO_LIN
(
strOrChar
);
while
(
*
s
)
{
*
s
=
toupper
(
*
s
);
s
++
;
}
return
strOrChar
;
}
else
return
toupper
((
char
)
strOrChar
);
}
SEGPTR
WINAPI
KERNEL_AnsiLower16
(
SEGPTR
strOrChar
)
{
/* lowercase only one char if strOrChar < 0x10000 */
if
(
HIWORD
(
strOrChar
))
{
char
*
s
=
PTR_SEG_TO_LIN
(
strOrChar
);
while
(
*
s
)
{
*
s
=
tolower
(
*
s
);
s
++
;
}
return
strOrChar
;
}
else
return
tolower
((
char
)
strOrChar
);
}
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