/**************************************************************************** | | (C) Copyright 1985, 1991, 1993, 1996 Novell, Inc. | All Rights Reserved. | | This program is free software; you can redistribute it and/or | modify it under the terms of version 2 of the GNU General Public | License as published by the Free Software Foundation. | | This program is distributed in the hope that it will be useful, | but WITHOUT ANY WARRANTY; without even the implied warranty of | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | GNU General Public License for more details. | | You should have received a copy of the GNU General Public License | along with this program; if not, contact Novell, Inc. | | To contact Novell about this file by physical or electronic mail, | you may find current contact information at www.novell.com | |*************************************************************************** | | NetWare Advance File Services (NSS) module | |--------------------------------------------------------------------------- | | $Author: stoner $ | $Date: 2006-08-10 04:54:20 +0530 (Thu, 10 Aug 2006) $ | | $RCSfile$ | $Revision: 1473 $ | |--------------------------------------------------------------------------- | This module is used to: | Internal NSS Library string include file | | WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! | | This header file should ONLY be used for NSS internal development. | This includes Semantic Agents (SA) and Loadable Storage Services (LSS). | Any other use may cause conflicts which NSS will NOT fix. +-------------------------------------------------------------------------*/ #ifndef _NSS_STRING_H_ #define _NSS_STRING_H_ #ifdef __linux__ #if defined(MARS_NWE_NWNSS_USERSPACE) && !defined(__KERNEL__) #include_next #include #define stricmp(p1,p2) strcasecmp(p1,p2) #define strnicmp(p1,p2,p3) strncasecmp(p1,p2,p3) #elif defined(__KERNEL__) #include "linux/string.h" #define bzero(p1,p2) LB_bzero(p1,p2) #define stricmp(p1,p2) LB_stricmp(p1,p2) #else #include "sys/../string.h" #define stricmp(p1,p2) strcasecmp(p1,p2) #endif #define strmcpy(p1,p2,p3) LB_strmcpy(p1,p2,p3) #define memlset(p1,p2,p3) LB_memlset(p1,p2,p3) #define strupr(p1) LB_strupr(p1) #define memicmp(p1,p2,p3) LB_memicmp(p1,p2,p3) int LB_memicmp( const void *__s1, const void *__s2, size_t __n ); char *LB_strupr( char *__string ); void *LB_memlset( void *__dest, long __l, size_t __n); char *LB_strmcpy( char *__s1, const char *__s2, size_t __n ); #ifdef __KERNEL__ int LB_stricmp( const char *__s1, const char *__s2 ); void LB_bzero( void *__s, size_t __n ); #endif void CMovFast( void* dest, void* source, int byteCount); void CMovFastCache( void* dest, void* source, int byteCount); #else #ifndef _XSTRING_H_ #include #endif #ifdef __cplusplus extern "C" { #endif /* Undefine standard string operations so we can use the NSS versions */ #undef memchr //PJT #undef memcmp #undef memcpy #undef memmove #undef memset #undef memlset #undef strcat #undef strchr #undef strcmp //#undef strcoll #undef strcpy //PJT #undef strlen #undef strmcpy #undef strncmp #undef strncpy #undef strnicmp #undef strrchr #undef strstr #undef memicmp #undef stricmp #undef strlwr #undef strrev #undef strset #undef strupr /*------------------------------------------------------------------------- * Macros that translate standard C library names to our internal NSS * names. *-------------------------------------------------------------------------*/ /* standard string operations */ #define memchr(p1,p2,p3) LB_memchr(p1,p2,p3) //PJT #define memcmp(p1,p2,p3) LB_memcmp(p1,p2,p3) #define memcpy(p1,p2,p3) LB_memcpy(p1,p2,p3) #define memmove(p1,p2,p3) LB_memmove(p1,p2,p3) #define memset(p1,p2,p3) LB_memset(p1,p2,p3) #define memlset(p1,p2,p3) LB_memlset(p1,p2,p3) #define strcat(p1,p2) LB_strcat(p1,p2) #define strchr(p1,p2) LB_strchr(p1,p2) #define strcmp(p1,p2) LB_strcmp(p1,p2) //#define strcoll(p1,p2) LB_strcoll(p1,p2) #define strcpy(p1,p2) LB_strcpy(p1,p2) //PJT #define strlen(p1) LB_strlen(p1) #define strmcpy(p1,p2,p3) LB_strmcpy(p1,p2,p3) #define strncmp(p1,p2,p3) LB_strncmp(p1,p2,p3) #define strncpy(p1,p2,p3) LB_strncpy(p1,p2,p3) #define strnicmp(p1,p2,p3) LB_strnicmp(p1,p2,p3) #define strrchr(p1,p2) LB_strrchr(p1,p2) #define strstr(p1,p2) LB_strstr(p1,p2) #define memicmp(p1,p2,p3) LB_memicmp(p1,p2,p3) #define stricmp(p1,p2) LB_stricmp(p1,p2) #define strlwr(p1) LB_strlwr(p1) #define strrev(p1) LB_strrev(p1) #define strset(p1,p2) LB_strset(p1,p2) #define strupr(p1) LB_strupr(p1) /*------------------------------ NSS Routines -----------------------------*/ //#define LPSTRCPY(p1,p2) LB_LPSTRCPY(p1,p2) #define bzero(p1,p2) LB_bzero(p1,p2) void CMovFast( void* dest, void* source, int byteCount); void CMovFastCache( void* dest, void* source, int byteCount); /*------------------------------ Exported by Others -----------------------*/ extern char *strerror(int); extern char *strncat(char *, const char *, size_t); extern char *strtok(char *, const char *); #ifdef __cplusplus } #endif #endif // #else #ifdef __linux__ #endif /* _NSS_STRING_H_ */