Create a branch for header work.

svn path=/branches/header-work/; revision=45691
This commit is contained in:
Timo Kreuzer 2010-02-26 22:57:55 +00:00
parent 14fe274b1c
commit 9ea495ba33
19538 changed files with 0 additions and 1063950 deletions

View file

@ -0,0 +1,6 @@
/* $Id$
*/
#include "tcscat.h"
/* EOF */

View file

@ -0,0 +1,6 @@
/* $Id$
*/
#include "tcschr.h"
/* EOF */

View file

@ -0,0 +1,6 @@
/* $Id$
*/
#include "tcscmp.h"
/* EOF */

View file

@ -0,0 +1,6 @@
/* $Id$
*/
#include "tcscpy.h"
/* EOF */

View file

@ -0,0 +1,6 @@
/* $Id$
*/
#include "tcslen.h"
/* EOF */

View file

@ -0,0 +1,6 @@
/* $Id$
*/
#include "tcsncat.h"
/* EOF */

View file

@ -0,0 +1,6 @@
/* $Id$
*/
#include "tcsncmp.h"
/* EOF */

View file

@ -0,0 +1,6 @@
/* $Id$
*/
#include "tcsncpy.h"
/* EOF */

View file

@ -0,0 +1,6 @@
/* $Id$
*/
#include "tcsnlen.h"
/* EOF */

View file

@ -0,0 +1,6 @@
/* $Id$
*/
#include "tcsrchr.h"
/* EOF */

View file

@ -0,0 +1,59 @@
/* $Id$
*/
#ifndef __TCHAR_INC_S__
#define __TCHAR_INC_S__
#ifdef _UNICODE
#define _tcscat _wcscat
#define _tcschr _wcschr
#define _tcscmp _wcscmp
#define _tcscpy _wcscpy
#define _tcslen _wcslen
#define _tcsncat _wcsncat
#define _tcsncmp _wcsncmp
#define _tcsncpy _wcsncpy
#define _tcsnlen _wcsnlen
#define _tcsrchr _wcsrchr
#define _tscas scasw
#define _tlods lodsw
#define _tstos stosw
#define _tsize $2
#define _treg(_O_) _O_ ## x
#define _tdec(_O_) sub $2, _O_
#define _tinc(_O_) add $2, _O_
#else
#define _tcscat _strcat
#define _tcschr _strchr
#define _tcscmp _strcmp
#define _tcscpy _strcpy
#define _tcslen _strlen
#define _tcsncat _strncat
#define _tcsncmp _strncmp
#define _tcsncpy _strncpy
#define _tcsnlen _strnlen
#define _tcsrchr _strrchr
#define _tscas scasb
#define _tlods lodsb
#define _tstos stosb
#define _tsize $1
#define _treg(_O_) _O_ ## l
#define _tdec(_O_) dec _O_
#define _tinc(_O_) inc _O_
#endif
#endif
/* EOF */

View file

@ -0,0 +1,32 @@
/* $Id$
*/
#include "tchar.h"
.globl _tcscat
_tcscat:
push %esi
push %edi
mov 0x0C(%esp), %edi
mov 0x10(%esp), %esi
xor %eax, %eax
mov $-1, %ecx
cld
repne _tscas
_tdec(%edi)
.L1:
_tlods
_tstos
test %_treg(a), %_treg(a)
jnz .L1
mov 0x0C(%esp), %eax
pop %edi
pop %esi
ret
/* EOF */

View file

@ -0,0 +1,30 @@
/* $Id$
*/
#include "tchar.h"
.globl _tcschr
_tcschr:
push %esi
mov 0x8(%esp), %esi
mov 0xC(%esp), %edx
cld
.L1:
_tlods
cmp %_treg(a), %_treg(d)
je .L2
test %_treg(a), %_treg(a)
jnz .L1
mov _tsize, %esi
.L2:
mov %esi, %eax
_tdec(%eax)
pop %esi
ret
/* EOF */

View file

@ -0,0 +1,34 @@
/* $Id$
*/
#include "tchar.h"
.globl _tcscmp
_tcscmp:
push %esi
push %edi
mov 0x0C(%esp), %esi
mov 0x10(%esp), %edi
xor %eax, %eax
cld
.L1:
_tlods
_tscas
jne .L2
test %eax, %eax
jne .L1
xor %eax, %eax
jmp .L3
.L2:
sbb %eax, %eax
or $1, %al
.L3:
pop %edi
pop %esi
ret
/* EOF */

View file

@ -0,0 +1,27 @@
/* $Id$
*/
#include "tchar.h"
.globl _tcscpy
_tcscpy:
push %esi
push %edi
mov 0x0C(%esp), %edi
mov 0x10(%esp), %esi
cld
.L1:
_tlods
_tstos
test %_treg(a), %_treg(a)
jnz .L1
mov 0x0C(%esp), %eax
pop %edi
pop %esi
ret
/* EOF */

View file

@ -0,0 +1,29 @@
/* $Id$
*/
#include "tchar.h"
.globl _tcslen
_tcslen:
push %edi
mov 0x8(%esp), %edi
xor %eax, %eax
test %edi,%edi
jz _tcslen_end
mov $-1, %ecx
cld
repne _tscas
not %ecx
dec %ecx
mov %ecx, %eax
_tcslen_end:
pop %edi
ret
/* EOF */

View file

@ -0,0 +1,42 @@
/* $Id$
*/
#include "tchar.h"
.globl _tcsncat
_tcsncat:
push %esi
push %edi
mov 0x0C(%esp), %edi
mov 0x10(%esp), %esi
cld
xor %eax, %eax
mov $-1, %ecx
repne _tscas
_tdec(%edi)
mov 0x14(%esp),%ecx
.L1:
dec %ecx
js .L2
_tlods
_tstos
test %_treg(a), %_treg(a)
jne .L1
jmp .L3
.L2:
xor %eax, %eax
_tstos
.L3:
mov 0x0C(%esp), %eax
pop %edi
pop %esi
ret
/* EOF */

View file

@ -0,0 +1,40 @@
/* $Id$
*/
#include "tchar.h"
.globl _tcsncmp
_tcsncmp:
push %esi
push %edi
mov 0x0C(%esp), %esi /* s1 */
mov 0x10(%esp), %edi /* s2 */
mov 0x14(%esp), %ecx /* n */
xor %eax,%eax
cld
.L1:
dec %ecx
js .L2
_tlods
_tscas
jne .L3
test %eax, %eax
jne .L1
.L2:
xor %eax, %eax
jmp .L4
.L3:
sbb %eax, %eax
or $1, %al
.L4:
pop %edi
pop %esi
ret
/* EOF */

View file

@ -0,0 +1,34 @@
/* $Id$
*/
#include "tchar.h"
.globl _tcsncpy
_tcsncpy:
push %esi
push %edi
mov 0x0C(%esp), %edi /* s1 */
mov 0x10(%esp), %esi /* s2 */
mov 0x14(%esp), %ecx /* n */
xor %eax, %eax
cld
.L1:
dec %ecx
js .L2
_tlods
_tstos
test %_treg(a), %_treg(a)
jnz .L1
rep _tstos
.L2:
mov 0x0C(%esp), %eax
pop %edi
pop %esi
ret
/* EOF */

View file

@ -0,0 +1,30 @@
/* $Id$
*/
#include "tchar.h"
.globl _tcsnlen
_tcsnlen:
push %edi
mov 0x8(%esp), %edi
mov 0xC(%esp), %ecx
xor %eax, %eax
test %ecx, %ecx
jz .L1
mov %ecx, %edx
cld
repne _tscas
sete %al
sub %ecx, %edx
sub %eax, %edx
mov %edx, %eax
.L1:
pop %edi
ret
/* EOF */

View file

@ -0,0 +1,31 @@
/* $Id$
*/
#include "tchar.h"
.globl _tcsrchr
_tcsrchr:
push %esi
mov 0x8(%esp), %esi
mov 0xC(%esp), %edx
cld
mov _tsize, %ecx
.L1:
_tlods
cmp %_treg(a), %_treg(d)
jne .L2
mov %esi, %ecx
.L2:
test %_treg(a), %_treg(a)
jnz .L1
mov %ecx, %eax
_tdec(%eax)
pop %esi
ret
/* EOF */

View file

@ -0,0 +1,7 @@
/* $Id$
*/
#define _UNICODE
#include "tcscat.h"
/* EOF */

View file

@ -0,0 +1,7 @@
/* $Id$
*/
#define _UNICODE
#include "tcschr.h"
/* EOF */

View file

@ -0,0 +1,7 @@
/* $Id$
*/
#define _UNICODE
#include "tcscmp.h"
/* EOF */

View file

@ -0,0 +1,7 @@
/* $Id$
*/
#define _UNICODE
#include "tcscpy.h"
/* EOF */

View file

@ -0,0 +1,7 @@
/* $Id$
*/
#define _UNICODE
#include "tcslen.h"
/* EOF */

View file

@ -0,0 +1,7 @@
/* $Id$
*/
#define _UNICODE
#include "tcsncat.h"
/* EOF */

View file

@ -0,0 +1,7 @@
/* $Id$
*/
#define _UNICODE
#include "tcsncmp.h"
/* EOF */

View file

@ -0,0 +1,7 @@
/* $Id$
*/
#define _UNICODE
#include "tcsncpy.h"
/* EOF */

View file

@ -0,0 +1,7 @@
/* $Id$
*/
#define _UNICODE
#include "tcsnlen.h"
/* EOF */

View file

@ -0,0 +1,7 @@
/* $Id$
*/
#define _UNICODE
#include "tcsrchr.h"
/* EOF */