Add .gitattributes and .gitignore files and normalize line endings in the repository (#10)

This commit is contained in:
Colin Finck 2017-10-04 20:37:32 +02:00 committed by GitHub
parent c609406c2f
commit 9ebf43567d
309 changed files with 66975 additions and 66873 deletions

View file

@ -1,35 +1,35 @@
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcscat
.code
FUNC _tcscat
FPO 0, 2, 2, 2, 0, FRAME_FPO
push esi
push edi
mov edi, [esp + 12]
mov esi, [esp + 16]
xor eax, eax
mov ecx, -1
cld
repne _tscas
_tdec(edi)
.L1:
_tlods
_tstos
test _treg(a), _treg(a)
jnz .L1
mov eax, [esp + 12]
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcscat
.code
FUNC _tcscat
FPO 0, 2, 2, 2, 0, FRAME_FPO
push esi
push edi
mov edi, [esp + 12]
mov esi, [esp + 16]
xor eax, eax
mov ecx, -1
cld
repne _tscas
_tdec(edi)
.L1:
_tlods
_tstos
test _treg(a), _treg(a)
jnz .L1
mov eax, [esp + 12]
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */

View file

@ -1,32 +1,32 @@
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcschr
.code
FUNC _tcschr
FPO 0, 2, 1, 1, 0, FRAME_FPO
push esi
mov esi, [esp + 8]
mov edx, [esp + 12]
cld
.L1:
_tlods
cmp _treg(d), _treg(a)
je .L2
test _treg(a), _treg(a)
jnz .L1
mov esi, _tsize
.L2:
mov eax, esi
_tdec(eax)
pop esi
ret
ENDFUNC
END
/* EOF */
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcschr
.code
FUNC _tcschr
FPO 0, 2, 1, 1, 0, FRAME_FPO
push esi
mov esi, [esp + 8]
mov edx, [esp + 12]
cld
.L1:
_tlods
cmp _treg(d), _treg(a)
je .L2
test _treg(a), _treg(a)
jnz .L1
mov esi, _tsize
.L2:
mov eax, esi
_tdec(eax)
pop esi
ret
ENDFUNC
END
/* EOF */

View file

@ -1,37 +1,37 @@
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcscmp
.code
FUNC _tcscmp
FPO 0, 2, 2, 2, 0, FRAME_FPO
push esi
push edi
mov esi, [esp + 12]
mov edi, [esp + 16]
xor eax, eax
cld
.L1:
_tlods
_tscas
jne .L2
test eax, eax
jne .L1
xor eax, eax
jmp .L3
.L2:
sbb eax, eax
or al, 1
.L3:
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcscmp
.code
FUNC _tcscmp
FPO 0, 2, 2, 2, 0, FRAME_FPO
push esi
push edi
mov esi, [esp + 12]
mov edi, [esp + 16]
xor eax, eax
cld
.L1:
_tlods
_tscas
jne .L2
test eax, eax
jne .L1
xor eax, eax
jmp .L3
.L2:
sbb eax, eax
or al, 1
.L3:
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */

View file

@ -1,31 +1,31 @@
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcscpy
.code
FUNC _tcscpy
FPO 0, 2, 2, 2, 0, FRAME_FPO
push esi
push edi
mov edi, [esp + 12]
mov esi, [esp + 16]
cld
.L1:
_tlods
_tstos
test _treg(a), _treg(a)
jnz .L1
mov eax, [esp + 12]
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcscpy
.code
FUNC _tcscpy
FPO 0, 2, 2, 2, 0, FRAME_FPO
push esi
push edi
mov edi, [esp + 12]
mov esi, [esp + 16]
cld
.L1:
_tlods
_tstos
test _treg(a), _treg(a)
jnz .L1
mov eax, [esp + 12]
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */

View file

@ -1,45 +1,45 @@
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcslen
.code
FUNC _tcslen
FPO 0, 1, 1, 1, 0, FRAME_FPO
/* Save edi and eflags (according to the x86 ABI, we don't need to do that
but since the native function doesn't change the direction flag, we don't
either */
push edi
pushfd
/* Load the string pointer into edi */
mov edi, [esp + 12]
/* Set eax to 0, since we want to compare with 0 */
xor eax, eax
/* Set ecx to -1 (i.e. 0xFFFFFFFF) */
mov ecx, -1
/* Clear direction flag */
cld
/* Now compare the characters until a 0 is found */
repne _tscas
/* Calculate the count. For n characters, we do (n + 1) comparisons. Initial
value of ecx was -1, so end value of ecx is (-1 - (n + 1)) = -(n + 2).
=> n = -ecx - 2 = ~ecx - 1 */
not ecx
lea eax, [ecx - 1]
/* Restore eflags/edi and return the result */
popfd
pop edi
ret
ENDFUNC
END
/* EOF */
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcslen
.code
FUNC _tcslen
FPO 0, 1, 1, 1, 0, FRAME_FPO
/* Save edi and eflags (according to the x86 ABI, we don't need to do that
but since the native function doesn't change the direction flag, we don't
either */
push edi
pushfd
/* Load the string pointer into edi */
mov edi, [esp + 12]
/* Set eax to 0, since we want to compare with 0 */
xor eax, eax
/* Set ecx to -1 (i.e. 0xFFFFFFFF) */
mov ecx, -1
/* Clear direction flag */
cld
/* Now compare the characters until a 0 is found */
repne _tscas
/* Calculate the count. For n characters, we do (n + 1) comparisons. Initial
value of ecx was -1, so end value of ecx is (-1 - (n + 1)) = -(n + 2).
=> n = -ecx - 2 = ~ecx - 1 */
not ecx
lea eax, [ecx - 1]
/* Restore eflags/edi and return the result */
popfd
pop edi
ret
ENDFUNC
END
/* EOF */

View file

@ -1,45 +1,45 @@
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcsncat
.code
FUNC _tcsncat
FPO 0, 3, 2, 2, 0, FRAME_FPO
push esi
push edi
mov edi, [esp + 12]
mov esi, [esp + 16]
cld
xor eax, eax
mov ecx, -1
repne _tscas
_tdec(edi)
mov ecx, [esp + 20]
.L1:
dec ecx
js .L2
_tlods
_tstos
test _treg(a), _treg(a)
jne .L1
jmp .L3
.L2:
xor eax, eax
_tstos
.L3:
mov eax, [esp + 12]
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcsncat
.code
FUNC _tcsncat
FPO 0, 3, 2, 2, 0, FRAME_FPO
push esi
push edi
mov edi, [esp + 12]
mov esi, [esp + 16]
cld
xor eax, eax
mov ecx, -1
repne _tscas
_tdec(edi)
mov ecx, [esp + 20]
.L1:
dec ecx
js .L2
_tlods
_tstos
test _treg(a), _treg(a)
jne .L1
jmp .L3
.L2:
xor eax, eax
_tstos
.L3:
mov eax, [esp + 12]
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */

View file

@ -1,43 +1,43 @@
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcsncmp
.code
FUNC _tcsncmp
FPO 0, 3, 2, 2, 0, FRAME_FPO
push esi
push edi
mov esi, [esp + 12] /* s1 */
mov edi, [esp + 16] /* s2 */
mov ecx, [esp + 20] /* 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 al, 1
.L4:
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcsncmp
.code
FUNC _tcsncmp
FPO 0, 3, 2, 2, 0, FRAME_FPO
push esi
push edi
mov esi, [esp + 12] /* s1 */
mov edi, [esp + 16] /* s2 */
mov ecx, [esp + 20] /* 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 al, 1
.L4:
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */

View file

@ -1,37 +1,37 @@
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcsncpy
.code
FUNC _tcsncpy
FPO 0, 3, 2, 2, 0, FRAME_FPO
push esi
push edi
mov edi, [esp + 12] /* s1 */
mov esi, [esp + 16] /* s2 */
mov ecx, [esp + 20] /* n */
xor eax, eax
cld
.L1:
dec ecx
js .L2
_tlods
_tstos
test _treg(a), _treg(a)
jnz .L1
rep _tstos
.L2:
mov eax, [esp + 12]
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcsncpy
.code
FUNC _tcsncpy
FPO 0, 3, 2, 2, 0, FRAME_FPO
push esi
push edi
mov edi, [esp + 12] /* s1 */
mov esi, [esp + 16] /* s2 */
mov ecx, [esp + 20] /* n */
xor eax, eax
cld
.L1:
dec ecx
js .L2
_tlods
_tstos
test _treg(a), _treg(a)
jnz .L1
rep _tstos
.L2:
mov eax, [esp + 12]
pop edi
pop esi
ret
ENDFUNC
END
/* EOF */

View file

@ -1,33 +1,33 @@
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcsnlen
.code
FUNC _tcsnlen
FPO 0, 2, 1, 1, 0, FRAME_FPO
push edi
mov edi, [esp + 8]
mov ecx, [esp + 12]
xor eax, eax
test ecx, ecx
jz .L1
mov edx, ecx
cld
repne _tscas
sete al
sub edx, ecx
sub edx, eax
mov eax, edx
.L1:
pop edi
ret
ENDFUNC
END
/* EOF */
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcsnlen
.code
FUNC _tcsnlen
FPO 0, 2, 1, 1, 0, FRAME_FPO
push edi
mov edi, [esp + 8]
mov ecx, [esp + 12]
xor eax, eax
test ecx, ecx
jz .L1
mov edx, ecx
cld
repne _tscas
sete al
sub edx, ecx
sub edx, eax
mov eax, edx
.L1:
pop edi
ret
ENDFUNC
END
/* EOF */

View file

@ -1,34 +1,34 @@
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcsrchr
.code
FUNC _tcsrchr
FPO 0, 2, 1, 1, 0, FRAME_FPO
push esi
mov esi, [esp + 8]
mov edx, [esp + 12]
cld
mov ecx, _tsize
.L1:
_tlods
cmp _treg(d), _treg(a)
jne .L2
mov ecx, esi
.L2:
test _treg(a), _treg(a)
jnz .L1
mov eax, ecx
_tdec(eax)
pop esi
ret
ENDFUNC
END
/* EOF */
#include "tchar.h"
#include <asm.inc>
PUBLIC _tcsrchr
.code
FUNC _tcsrchr
FPO 0, 2, 1, 1, 0, FRAME_FPO
push esi
mov esi, [esp + 8]
mov edx, [esp + 12]
cld
mov ecx, _tsize
.L1:
_tlods
cmp _treg(d), _treg(a)
jne .L2
mov ecx, esi
.L2:
test _treg(a), _treg(a)
jnz .L1
mov eax, ecx
_tdec(eax)
pop esi
ret
ENDFUNC
END
/* EOF */