/*
|
/*
|
string.h -- String manipulation
|
string.h -- String manipulation
|
Implements (some) of the standard string routines
|
Implements (some) of the standard string routines
|
Copyright (C) 2002 Richard Herveille, rherveille@opencores.org
|
Copyright (C) 2002 Richard Herveille, rherveille@opencores.org
|
|
|
This file is part of OpenRISC 1000 Reference Platform Monitor (ORPmon)
|
This file is part of OpenRISC 1000 Reference Platform Monitor (ORPmon)
|
|
|
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
(at your option) any later version
|
(at your option) any later version
|
|
|
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
GNU General Public License for more details.
|
GNU General Public License for more details.
|
|
|
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
*/
|
*/
|
|
|
#ifndef __STRING_H
|
#ifndef __STRING_H
|
#define __STRING_H
|
#define __STRING_H
|
#include <stddef.h>
|
#include <stddef.h>
|
|
|
/* Basic string functions */
|
/* Basic string functions */
|
extern size_t strlen(const char *s);
|
extern size_t strlen(const char *s);
|
extern char *strcpy(char *dest, const char *src);
|
extern char *strcpy(char *dest, const char *src);
|
extern char *strncpy(char *dest, const char *src, size_t n);
|
extern char *strncpy(char *dest, const char *src, size_t n);
|
extern char *strcat(char *dest, const char *src);
|
extern char *strcat(char *dest, const char *src);
|
extern char *strncat(char *dest, const char *src, size_t n);
|
extern char *strncat(char *dest, const char *src, size_t n);
|
extern int strcmp(const char *s1, const char *s2);
|
extern int strcmp(const char *s1, const char *s2);
|
extern int strncmp(const char *s1, const char *s2, size_t n);
|
extern int strncmp(const char *s1, const char *s2, size_t n);
|
extern char *strchr(const char *s, int c);
|
extern char *strchr(const char *s, int c);
|
extern char *strrchr(const char *s, int c);
|
extern char *strrchr(const char *s, int c);
|
|
|
/* Basic mem functions */
|
/* Basic mem functions */
|
extern void *memcpy(void *dest, const void *src, size_t n);
|
extern void *memcpy(void *dest, const void *src, size_t n);
|
extern unsigned char memcpy_crc(void *dest, const void *src, size_t n);
|
extern unsigned char memcpy_crc(void *dest, const void *src, size_t n);
|
extern void *memmove(void *dest, void *src, size_t n);
|
extern void *memmove(void *dest, void *src, size_t n);
|
extern int memcmp(const void *s1, const void *s2, size_t n);
|
extern int memcmp(const void *s1, const void *s2, size_t n);
|
extern void *memchr(const void *s, char c, size_t n);
|
extern void *memchr(const void *s, char c, size_t n);
|
extern void *memset(void *d, int c, size_t n);
|
extern void *memset(void *d, int c, size_t n);
|
|
|
#endif
|
#endif
|
|
|