* syscalls.cc (getw): Remove redundant implementation.
(putw): Ditto. (wcscmp): Ditto. (wcslen): Ditto. (memccpy): Ditto.
This commit is contained in:
parent
61c44b72d4
commit
88d6787f07
|
@ -1,3 +1,11 @@
|
||||||
|
2007-08-12 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* syscalls.cc (getw): Remove redundant implementation.
|
||||||
|
(putw): Ditto.
|
||||||
|
(wcscmp): Ditto.
|
||||||
|
(wcslen): Ditto.
|
||||||
|
(memccpy): Ditto.
|
||||||
|
|
||||||
2007-08-12 Corinna Vinschen <corinna@vinschen.de>
|
2007-08-12 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* ntdll.h: Add descriptive comments to special Rtl functions.
|
* ntdll.h: Add descriptive comments to special Rtl functions.
|
||||||
|
|
|
@ -2736,45 +2736,6 @@ __assertfail ()
|
||||||
exit (99);
|
exit (99);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int
|
|
||||||
getw (FILE *fp)
|
|
||||||
{
|
|
||||||
int w, ret;
|
|
||||||
ret = fread (&w, sizeof (int), 1, fp);
|
|
||||||
return ret != 1 ? EOF : w;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" int
|
|
||||||
putw (int w, FILE *fp)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
ret = fwrite (&w, sizeof (int), 1, fp);
|
|
||||||
if (feof (fp) || ferror (fp))
|
|
||||||
return -1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" int
|
|
||||||
wcscmp (const wchar_t *s1, const wchar_t *s2)
|
|
||||||
{
|
|
||||||
while (*s1 && *s1 == *s2)
|
|
||||||
{
|
|
||||||
s1++;
|
|
||||||
s2++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (* (unsigned short *) s1) - (* (unsigned short *) s2);
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" size_t
|
|
||||||
wcslen (const wchar_t *s1)
|
|
||||||
{
|
|
||||||
int l = 0;
|
|
||||||
while (s1[l])
|
|
||||||
l++;
|
|
||||||
return l;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: to do this right, maybe work out the usoft va_list machine
|
/* FIXME: to do this right, maybe work out the usoft va_list machine
|
||||||
and use wsvprintfW instead?
|
and use wsvprintfW instead?
|
||||||
*/
|
*/
|
||||||
|
@ -2797,23 +2758,6 @@ vhangup ()
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" _PTR
|
|
||||||
memccpy (_PTR out, const _PTR in, int c, size_t len)
|
|
||||||
{
|
|
||||||
const char *inc = (char *) in;
|
|
||||||
char *outc = (char *) out;
|
|
||||||
|
|
||||||
while (len)
|
|
||||||
{
|
|
||||||
char x = *inc++;
|
|
||||||
*outc++ = x;
|
|
||||||
if (x == c)
|
|
||||||
return outc;
|
|
||||||
len --;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
setpriority (int which, id_t who, int value)
|
setpriority (int which, id_t who, int value)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue