Remove (unused) strncpy.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@653 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2003-08-09 09:35:18 +00:00
parent 9a3da2b737
commit 8a7b83ab63
4 changed files with 0 additions and 59 deletions

View File

@ -52,7 +52,6 @@ segment HMA_TEXT
; fmemcpy(void FAR *dest, void FAR *src, int count)
; memset(void *dest, int ch, int count);
; fmemset(void FAR *dest, int ch, int count);
; fstrncpy(void FAR*dest, void FAR *src, int count);
; strcpy (void *dest, void *src);
; fstrcpy (void FAR*dest, void FAR *src);
; strlen (void *dest);
@ -222,37 +221,6 @@ pascal_return:
add sp,bx
jmp cx
;***************************************************************
%if 0
nix pascal - still untested
global _fstrncpy
_fstrncpy:
call pascal_setup
; Get the source pointer, ss
lds si,[bp+8]
; and the destination pointer, d
les di,[bp+4]
mov cx,[bp+12]
jcxz pascal_return
;; dec cx
; jcxz store_one_byte
strncpy_loop: lodsb
stosb
test al,al
loopnz strncpy_loop
store_one_byte: xor al,al
; the spec for strncpy() would require
; rep stosb
; to fill remaining part of buffer
stosb
jmp short pascal_return
%endif
;*****************************************************************
; fstrcpy (void FAR*dest, void FAR *src);

View File

@ -53,13 +53,6 @@ VOID fstrcpy(REG BYTE FAR * d, REG CONST BYTE FAR * s)
*d = '\0';
}
VOID fstrncpy(BYTE FAR * d, BYTE CONST FAR * s, REG size_t n)
{
while (*s && n--)
*d++ = *s++;
*d = '\0';
}
VOID * memcpy(REG VOID * d, REG CONST VOID * s, REG size_t n)
{
char *cd = d;

View File

@ -282,12 +282,10 @@ void put_string(const char *s);
size_t /* ASMCFUNC */ ASMPASCAL strlen(const char * s);
size_t /* ASMCFUNC */ ASMPASCAL fstrlen(const char FAR * s);
char FAR * /*ASMCFUNC*/ ASMPASCAL _fstrcpy(char FAR * d, const char FAR * s);
char * /*ASMCFUNC*/ ASMPASCAL strncpy(char * d, const char * s, size_t l);
int /*ASMCFUNC*/ ASMPASCAL strcmp(const char * d, const char * s);
int /*ASMCFUNC*/ ASMPASCAL fstrcmp(const char FAR * d, const char FAR * s);
int /*ASMCFUNC*/ ASMPASCAL fstrncmp(const char FAR * d, const char FAR * s, size_t l);
int /*ASMCFUNC*/ ASMPASCAL strncmp(const char * d, const char * s, size_t l);
void /*ASMCFUNC*/ ASMPASCAL fstrncpy(char FAR * d, const char FAR * s, size_t l);
char * /*ASMCFUNC*/ ASMPASCAL strchr(const char * s, int c);
char FAR * /*ASMCFUNC*/ ASMPASCAL fstrchr(const char FAR * s, int c);
void FAR * /*ASMCFUNC*/ ASMPASCAL fmemchr(const void FAR * s, int c, size_t n);

View File

@ -59,16 +59,6 @@ VOID _fstrcpy(REG BYTE FAR * d, REG BYTE FAR * s)
*d = 0;
}
char *strncpy(register char *d, register const char *s, size_t l)
{
size_t idx = 1;
char *tmp = d;
while (*s != 0 && idx++ <= l)
*d++ = *s++;
*d = 0;
return tmp;
}
int strcmp(REG CONST BYTE * d, REG CONST BYTE * s)
{
while (*s != '\0' && *d != '\0')
@ -119,14 +109,6 @@ COUNT fstrncmp(REG BYTE FAR * d, REG BYTE FAR * s, COUNT l)
return *d - *s;
}
VOID fstrncpy(REG BYTE FAR * d, REG BYTE FAR * s, COUNT l)
{
COUNT idx = 1;
while (*s != 0 && idx++ <= l)
*d++ = *s++;
*d = 0;
}
char *strchr(const char * s, int c)
{
REG CONST BYTE *p;