1 /* MEMRCHR.H (c) Copyright Volker Bandke, 2003 */ 2 /* Hercules Right to Left memory scan header file */ 3 4 /*-------------------------------------------------------------------*/ 5 /* Scans the memory block and reports the last occurrence of */ 6 /* the specified byte in the buffer. Returns a pointer to */ 7 /* the byte if found, or NULL if not found. */ 8 /*-------------------------------------------------------------------*/ 9 10 11 #ifndef MEMRCHR_H 12 #define MEMRCHR_H 13 14 #include "hercules.h" 15 #ifndef _MEMRCHR_C_ 16 #ifndef _HUTIL_DLL_ 17 #define MEM_DLL_IMPORT DLL_IMPORT 18 #else /* _HUTIL_DLL_ */ 19 #define MEM_DLL_IMPORT extern 20 #endif /* _HUTIL_DLL_ */ 21 #else 22 #define MEM_DLL_IMPORT DLL_EXPORT 23 #endif 24 25 #if !defined(HAVE_MEMRCHR) // (only if we need it) 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif /*__cplusplus*/ 30 MEM_DLL_IMPORT void *memrchr(const void *buf, int c, size_t num); 31 32 #ifdef __cplusplus 33 } 34 #endif /*__cplusplus*/ 35 36 #endif // !defined(HAVE_MEMRCHR) 37 38 #endif // MEMRCHR_H 39