#ifndef __STRING_LOADED #define __STRING_LOADED 1 /**************************************************************************** ** ** - String Handling ** ***************************************************************************** ** Header introduced by the ANSI C Standard ***************************************************************************** ** ** Copyright 2000 Compaq Computer Corporation ** ** Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office. ** ** Confidential computer software. Valid license from Compaq required for ** possession, use or copying. Consistent with FAR 12.211 and 12.212, ** Commercial Computer Software, Computer Software Documentation, and ** Technical Data for Commercial Items are licensed to the U.S. Government ** under vendor's standard commercial license. ** ****************************************************************************** */ #pragma __nostandard #include #ifdef __cplusplus extern "C" { #endif #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 32 #endif /* ** Create 'public' typedefs, structure definitions, and definitions which are ** in this header file which are either not sensitive to pointer size or are ** required to be short pointers. */ #ifndef __SIZE_T # define __SIZE_T 1 typedef __size_t size_t; #endif #ifndef NULL # define NULL __NULL #endif /* ** At this point in the processing, we are done defining those things which ** must always be short pointers. If the user has used the /pointer_size ** qualifier, we will allow long pointers to be used in function calls ** regardless of whether they have specified short or long pointers. */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size 64 #endif /* ** The following functions have interfaces of XXX, _XXX32, and _XXX64 due only ** to the fact that the return argument is a pointer that is relative to one ** of the arguments. */ #if __INITIAL_POINTER_SIZE == 32 #pragma __pointer_size 32 #endif void *memchr (const void *__s, int __c, __size_t __n); void *memcpy (void *__s1, __const_void_ptr64 __s2, __size_t __n); void *memmove (void *__s1, __const_void_ptr64 __s2, __size_t __n); void *memset (void *__s, int __c, __size_t __n); char *strcat (char *__s1, __const_char_ptr64 __s2); char *strchr (const char *__s, int __c); char *strcpy (char *__s1, __const_char_ptr64 __s2); char *strncat (char *__s1, __const_char_ptr64 __s2, __size_t __n); char *strncpy (char *__s1, __const_char_ptr64 __s2, __size_t __n); char *strpbrk (const char *__s1, __const_char_ptr64 __s2); char *strrchr (const char *__s, int __c); char *strstr (const char *__s1, __const_char_ptr64 __s2); char *strtok (char *__s1, __const_char_ptr64 __s2); #if __INITIAL_POINTER_SIZE == 32 #pragma __pointer_size 64 #endif #if __INITIAL_POINTER_SIZE && !defined _ANSI_C_SOURCE && __CRTL_VER >= 70000000 # pragma __pointer_size 32 void *_memchr32 (const void *__s, int __c, __size_t __n); void *_memcpy32 (void *__s1, __const_void_ptr64 __s2, __size_t __n); void *_memmove32 (void *__s1, __const_void_ptr64 __s2, __size_t __n); void *_memset32 (void *__s, int __c, __size_t __n); char *_strcat32 (char *__s1, __const_char_ptr64 __s2); char *_strchr32 (const char *__s, int __c); char *_strcpy32 (char *__s1, __const_char_ptr64 __s2); char *_strncat32 (char *__s1, __const_char_ptr64 __s2, __size_t __n); char *_strncpy32 (char *__s1, __const_char_ptr64 __s2, __size_t __n); char *_strpbrk32 (const char *__s1, __const_char_ptr64 __s2); char *_strrchr32 (const char *__s, int __c); char *_strstr32 (const char *__s1, __const_char_ptr64 __s2); char *_strtok32 (char *__s1, __const_char_ptr64 __s2); # pragma __pointer_size 64 void *_memchr64 (const void *__s, int __c, __size_t __n); void *_memcpy64 (void *__s1, const void *__s2, __size_t __n); void *_memmove64 (void *__s1, const void *__s2, __size_t __n); void *_memset64 (void *__s, int __c, __size_t __n); char *_strcat64 (char *__s1, const char *__s2); char *_strchr64 (const char *__s, int __c); char *_strcpy64 (char *__s1, const char *__s2); char *_strncat64 (char *__s1, const char *__s2, __size_t __n); char *_strncpy64 (char *__s1, const char *__s2, __size_t __n); char *_strpbrk64 (const char *__s1, const char *__s2); char *_strrchr64 (const char *__s, int __c); char *_strstr64 (const char *__s1, const char *__s2); char *_strtok64 (char *__s1, const char *__s2); #endif /* ** The following functions have only a single interface regardless of the ** pointer size in effect. The parameters can accept both 32 bit and 64 ** bit addresses. */ int memcmp (const void *__s1, const void *__s2, __size_t __n); int strcmp (const char *__s1, const char *__s2); int strcoll (const char *__s1, const char *__s2); int strncmp (const char *__s1, const char *__s2, __size_t __n); __size_t strcspn (const char *__s1, const char *__s2); __size_t strlen (const char *__s); __size_t strspn (const char *__s1, const char *__s2); __size_t strxfrm (char *__s1, const char *__s2, __size_t __n); #if !defined _ANSI_C_SOURCE && __CRTL_VER >= 60200000 __size_t strnlen (const char *__s, __size_t __n); #endif /* ** The following function has a different prototype based on whether or ** not we are compiling in strict ANSI C compatibility mode. */ #if defined _ANSI_C_SOURCE __char_ptr32 strerror(int __errnum); #else __char_ptr32 strerror(int __errnum, ...); #endif /* ** X/Open extensions */ #if defined _XOPEN_SOURCE || !defined _ANSI_C_SOURCE # if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 32 # endif # if __CRTL_VER >= 70000000 void *memccpy(void *, __const_void_ptr64, int, __size_t); # endif #endif /* ** X/Open extended */ #if defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE # if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 32 # endif # if __CRTL_VER >= 70000000 char *strdup(__const_char_ptr64); # endif #endif /* ** BSD 4.4 extensions. strsep is specified by BSD 4.4 but X/Open ** There is not currently a feature test macro defined for BSD44 */ #if !defined _ANSI_C_SOURCE && __CRTL_VER >= 70000000 # if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 32 # endif char *strsep(char **, __const_char_ptr64); # if __INITIAL_POINTER_SIZE # pragma __pointer_size 32 char *_strsep32(char **, __const_char_ptr64); # pragma __pointer_size 64 char *_strsep64(char **, const char *); # endif #endif /* ** DEC C Extensions ** X/Open extended specifies that bcmp, bcopy, bzero, ffs, strcasecmp ** strncasecmp, index and rindex appear in . ** X/Open extended specifies that basename and dirname appear in */ #if !defined _ANSI_C_SOURCE && __CRTL_VER >= 70000000 # if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 64 # endif int bcmp (const void * __s1, const void * __s2, __size_t __n); void (bcopy) (const void * __s1, void * __s2, __size_t __n); void (bzero) (void * __s1, __size_t __n); int ffs (int); int strcasecmp(const char *, const char *); int strncasecmp(const char *, const char *, __size_t); # if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 32 # endif char *index(const char *, int); char *rindex(const char *, int); char *basename(char *); char *dirname(char *); # if __INITIAL_POINTER_SIZE # pragma __pointer_size 32 char *_strdup32(__const_char_ptr64); void *_memccpy32(void *, __const_void_ptr64, int, __size_t); char *_basename32(char *); char *_dirname32(char *); char *_index32(const char *, int); char *_rindex32(const char *, int); # pragma __pointer_size 64 char *_strdup64(const char *); void *_memccpy64(void *, const void *, int, __size_t); char *_basename64(char *); char *_dirname64(char *); char *_index64(const char *, int); char *_rindex64(const char *, int); # endif #endif /* ** DEC C Performance (Builtins) ** ** Certain DEC C functions are available as compiler builtins. Using ** the builtins offer performance improvements and are enabled here ** for all programs including this header file. ** ** In a 64 bit OpenVMS environment, the builtins accept and return 64 bit ** pointers. We will explicitly use casts */ #if defined(__ALPHA) #if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 32 #endif void * __MEMCPY (void *__s1, const void *__s2, __size_t __n); void * __MEMMOVE (void *__s1, const void *__s2, __size_t __n); void * __MEMSET (void *__s, int __c, __size_t __n); # if (__DECC_VER > 50600000) __size_t __STRLEN (const char *__s); char * __STRCPY (char *__s1, const char *__s2); # endif # define memcpy(__x, __y, __z) __MEMCPY(__x, __y, __z) # define memmove(__x, __y, __z) __MEMMOVE(__x, __y, __z) # define memset(__x, __y, __z) __MEMSET(__x, __y, __z) # if (__DECC_VER > 50600000) # define strlen(__x) __STRLEN(__x) # define strcpy(__x, __y) __STRCPY(__x, __y) # endif # if !defined _ANSI_C_SOURCE && __CRTL_VER >= 70000000 /* BSD byte string extensions */ # define bcopy(__x, __y, __z) __MEMMOVE(__y, __x, __z) # define bzero(__x, __y) __MEMSET(__x, 0, __y) # endif #if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 64 #endif #endif /* ** DEC C RTL Performance (Linkages) ** ** Certain DEC C RTL functions are defined with linkages declared ** which gives the compiler more information as to register usage in ** the implementation. */ #if defined(__ALPHA) && defined(__DECC) # pragma __linkage __str_link1 = (\ __notused(__r1,__r2,__r3,__r4,__r5,__r6,__r7,__r8,__r9,__r10,__r11,\ __r12,__r13,__r14,__r15,__r17,__r18,__r19,__r20,__r21,__r22,\ __r23,__r24,__r25,__r29,\ __f0,__f1,__f2,__f3,__f4,__f5,__f6,__f7,__f8,__f9,__f10,\ __f11,__f12,__f13,__f14,__f15,__f16,__f17,__f18,__f19,__f20,\ __f21,__f22,__f23,__f24,__f25,__f26,__f27,__f28,__f29,__f30),\ __notneeded(__ai)) # pragma __linkage __str_link2 = (\ __notused(__r1,__r2,__r3,__r4,__r5,__r6,__r7,__r8,__r9,__r10,__r11,\ __r12,__r13,__r14,__r15,__r22,__r23,__r24,__r25,__r29,\ __f0,__f1,__f2,__f3,__f4,__f5,__f6,__f7,__f8,__f9,__f10,\ __f11,__f12,__f13,__f14,__f15,__f16,__f17,__f18,__f19,__f20,\ __f21,__f22,__f23,__f24,__f25,__f26,__f27,__f28,__f29,__f30),\ __notneeded(__ai)) # pragma __linkage __str_link3 = (\ __notused(__r2,__r3,__r4,__r5,__r6,__r7,__r8,__r9,__r10,__r11,__r12,\ __r13,__r14,__r15,__r18,__r19,__r20,__r21,__r22,__r23,__r24,\ __r25,__r29,\ __f0,__f1,__f2,__f3,__f4,__f5,__f6,__f7,__f8,__f9,__f10,\ __f11,__f12,__f13,__f14,__f15,__f16,__f17,__f18,__f19,__f20,\ __f21,__f22,__f23,__f24,__f25,__f26,__f27,__f28,__f29,__f30),\ __notneeded(__ai)) # if (__DECC_VER > 50600000) # pragma __use_linkage __str_link2 (strcmp) # pragma __use_linkage __str_link3 (strnlen) # else # pragma __use_linkage __str_link1 (strlen) # pragma __use_linkage __str_link2 (strcpy, strcmp) # pragma __use_linkage __str_link3 (strnlen) # endif #endif /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __STRING_LOADED */ #ifndef __STRINGS_LOADED #define __STRINGS_LOADED 1 #pragma __nostandard #include #if __CRTL_VER >= 70000000 /* Supported beginning in OpenVMS V7.0 */ /**************************************************************************** ** ** - String Handling ** ***************************************************************************** ** Header introduced by the X/Open CAE Specification, Issue 4, Version 2 ***************************************************************************** ** ** Copyright 2000 Compaq Computer Corporation ** ** Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office. ** ** Confidential computer software. Valid license from Compaq required for ** possession, use or copying. Consistent with FAR 12.211 and 12.212, ** Commercial Computer Software, Computer Software Documentation, and ** Technical Data for Commercial Items are licensed to the U.S. Government ** under vendor's standard commercial license. ** ****************************************************************************** */ #ifdef __cplusplus extern "C" { #endif #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 64 #endif /* ** Create 'public' typedefs, structure definitions, and definitions which are ** in this header file which are either not sensitive to pointer size or are ** required to be short pointers. */ #ifndef __SIZE_T # define __SIZE_T 1 typedef __size_t size_t; #endif /* ** X/Open extended definitions which accept 32 or 64 bit pointers */ int bcmp (const void * __s1, const void * __s2, __size_t __n); void (bcopy) (const void * __s1, void * __s2, __size_t __n); void (bzero) (void * __s1, __size_t __n); int ffs (int); int strcasecmp (const char *, const char *); int strncasecmp (const char *, const char *, __size_t); /* ** The following functions have interfaces of XXX, _XXX32, and _XXX64 due only ** to the fact that the return argument is a pointer that is relative to one ** of the arguments. */ #if __INITIAL_POINTER_SIZE == 32 #pragma __pointer_size 32 #endif char *index (const char *, int); char *rindex (const char *, int); #if __INITIAL_POINTER_SIZE == 32 #pragma __pointer_size 64 #endif /* ** DEC C extensions (64-bit interfaces are extensions) */ #if __INITIAL_POINTER_SIZE && !defined _XOPEN_SOURCE_EXTENDED # pragma __pointer_size 32 char *_index32 (const char *, int); char *_rindex32 (const char *, int); # pragma __pointer_size 64 char *_index64 (const char *, int); char *_rindex64 (const char *, int); #endif /* ** DEC C Performance (Builtins) ** ** Certain DEC C functions are available as compiler builtins. Using ** the builtins offer performance improvements and are enabled here ** for all programs including this header file. */ #if defined(__ALPHA) # if __INITIAL_POINTER_SIZE == 32 # pragma __pointer_size 32 # endif void *__MEMMOVE (void *__s1, const void *__s2, __size_t __n); void *__MEMSET (void *__s, int __c, __size_t __n); # define bcopy(__x, __y, __z) __MEMMOVE(__y, __x, __z) # define bzero(__x, __y) __MEMSET(__x, 0, __y) #endif /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #endif /* OpenVMS V7.0 */ #pragma __standard #endif /* __STRINGS_LOADED */