247 lines
6.1 KiB
C
247 lines
6.1 KiB
C
/****************************************************************************
|
|
|
|
|
| (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: vandana $
|
|
| $Date: 2005-08-10 01:03:51 +0530 (Wed, 10 Aug 2005) $
|
|
|
|
|
| $RCSfile$
|
|
| $Revision: 1177 $
|
|
|
|
|
|---------------------------------------------------------------------------
|
|
| This module is used to:
|
|
| These are NSS versions of the standard STRING operations. All of
|
|
| our versions are prefaced with LB_.
|
|
|
|
|
| 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 _XSTRING_H_
|
|
#define _XSTRING_H_
|
|
|
|
#ifndef _SIZE_T
|
|
# include <size_t.h>
|
|
#endif
|
|
|
|
#ifdef NULL
|
|
#undef NULL
|
|
#endif
|
|
#define NULL 0
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void *LB_memchr(
|
|
const void *__s,
|
|
int __c,
|
|
size_t __n );
|
|
|
|
//PJT int LB_memcmp(
|
|
//PJT const void *__s1,
|
|
//PJT const void *__s2,
|
|
//PJT size_t __n );
|
|
|
|
void *LB_memcpy(
|
|
void *__dest,
|
|
const void *__src,
|
|
size_t __n);
|
|
|
|
void *LB_memmove(
|
|
void *__dest,
|
|
const void *__src,
|
|
size_t __n);
|
|
|
|
void *LB_memset(
|
|
void *__dest,
|
|
int __c,
|
|
size_t __n);
|
|
|
|
void *LB_memlset(
|
|
void *__dest,
|
|
long __l,
|
|
size_t __n);
|
|
|
|
char *LB_strcat(
|
|
char *__s1,
|
|
const char *__s2);
|
|
|
|
char *LB_strchr(
|
|
const char *__s,
|
|
int __c);
|
|
|
|
int LB_strcmp(
|
|
const char *__s1,
|
|
const char *__s2);
|
|
|
|
//int LB_strcoll(
|
|
// const char *__s1,
|
|
// const char *__s2);
|
|
|
|
char *LB_strcpy(
|
|
char *__s1,
|
|
const char *__s2);
|
|
|
|
//size_t LB_strcspn(
|
|
// const char *__s1,
|
|
// const char *__s2);
|
|
|
|
//char *LB_strerror(
|
|
// int __errnum);
|
|
|
|
//PJT size_t LB_strlen(
|
|
//PJT const char *__s);
|
|
|
|
char *LB_strmcpy(
|
|
char *__s1,
|
|
const char *__s2,
|
|
size_t __n);
|
|
|
|
int LB_strncmp(
|
|
const char *s1,
|
|
const char *s2,
|
|
size_t n);
|
|
|
|
char *LB_strncpy(
|
|
char *__s1,
|
|
const char *__s2,
|
|
size_t __n );
|
|
|
|
int LB_strnicmp(
|
|
const char *s1,
|
|
const char *s2,
|
|
size_t n);
|
|
|
|
//char *LB_strpbrk(
|
|
// const char *__s1,
|
|
// const char *__s2);
|
|
|
|
char *LB_strrchr(
|
|
const char *__s,
|
|
int __c);
|
|
|
|
//size_t LB_strspn(
|
|
// const char *__s1,
|
|
// const char *__s2);
|
|
|
|
char *LB_strstr(
|
|
const char *__s1,
|
|
const char *__s2);
|
|
|
|
//char *LB_strtok(
|
|
// char *__s1,
|
|
// const char *__s2);
|
|
|
|
//size_t LB_strxfrm(
|
|
// char *__s1,
|
|
// const char *__s2,
|
|
// size_t __n);
|
|
|
|
int LB_memicmp(
|
|
const void *__s1,
|
|
const void *__s2,
|
|
size_t __n);
|
|
|
|
//int LB_strcmpi(
|
|
// const char *__s1,
|
|
// const char *__s2);
|
|
|
|
//char *LB_strdup(
|
|
// const char *__string);
|
|
|
|
int LB_stricmp(
|
|
const char *__s1,
|
|
const char *__s2);
|
|
|
|
//char *LB_strlist( char *, const char *, ...);
|
|
|
|
char *LB_strlwr(
|
|
char *__string);
|
|
|
|
char *LB_strrev(
|
|
char *__string);
|
|
|
|
char *LB_strset(
|
|
char *__string,
|
|
int __c);
|
|
|
|
char *LB_strupr(
|
|
char *__string);
|
|
|
|
|
|
//#ifdef __INLINE_FUNCTIONS__
|
|
//
|
|
//void *_inline_memchr(const void *__s,int __c, size_t __n);
|
|
//int _inline_memcmp(const void *__s1,const void *__s2,size_t __n);
|
|
//void *_inline_memcpy(void *__s1,const void *__s2,size_t __n);
|
|
//void *_inline_memset(void *__s,int __c,size_t __n);
|
|
//char *_inline_strcat(char *__s1,const char *__s2);
|
|
//int _inline_strcmp(const char *__s1,const char *__s2);
|
|
//char *_inline_strcpy(char *__s1,const char *__s2);
|
|
//size_t _inline_strlen(const char *__s);
|
|
//char *_inline_strchr(const char *__s,int __c);
|
|
//
|
|
//#define memchr(p,c,n) _inline_memchr(p,c,n)
|
|
//#define memcmp(p1,p2,n) _inline_memcmp(p1,p2,n)
|
|
//#define memcpy(p1,p2,n) _inline_memcpy(p1,p2,n)
|
|
//#define memset(p,c,n) _inline_memset(p,c,n)
|
|
//#define strcat(p1,p2) _inline_strcat(p1,p2)
|
|
//#define strcmp(p1,p2) _inline_strcmp(p1,p2)
|
|
//#define strcpy(p1,p2) _inline_strcpy(p1,p2)
|
|
//#define strlen(p1) _inline_strlen(p1)
|
|
//#define strchr(p1,p2) _inline_strchr(p1,p2)
|
|
//
|
|
//#endif /* __INLINE_FUNCTIONS__ */
|
|
|
|
/*------------------------------ NSS Routines -----------------------------*/
|
|
|
|
#define LB_LPSTRCPY(dest, src) \
|
|
(LB_memcpy((dest), (src), (BYTE)(*(src))+1))
|
|
|
|
void LB_bzero(
|
|
void *__s,
|
|
size_t __n);
|
|
|
|
extern int isPattern(char *p);
|
|
extern int isMatch(char *p, char *s);
|
|
|
|
/* Functions for manipulating strings sepearted by '.'. */
|
|
extern int dotcmp (const char *s, const char *t);
|
|
extern int dotlen (const char *s);
|
|
|
|
/* Functions for guid to/from hex string conversion */
|
|
extern int hex2guid (const char *hex, void *guid);
|
|
extern int guid2hex (const void *guid, char *hex);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _XSTRING_H_ */
|