-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathmemrchr.h
45 lines (37 loc) · 1.61 KB
/
memrchr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* MEMRCHR.H (c) Copyright Roger Bowler, 2006-2012 */
/* Hercules Right to Left memory scan */
/* */
/* Released under "The Q Public License Version 1" */
/* (http://www.hercules-390.org/herclic.html) as modifications to */
/* Hercules. */
/************************************************************************/
/* */
/* memrchr -- Right to Left memory scan */
/* */
/* Scans the memory block and reports the last occurrence of */
/* the specified byte in the buffer. Returns a pointer to */
/* the byte if found, or NULL if not found. */
/* */
/************************************************************************/
#ifndef MEMRCHR_H
#define MEMRCHR_H
#include "hercules.h"
#ifndef _MEMRCHR_C_
#ifndef _HUTIL_DLL_
#define MEM_DLL_IMPORT DLL_IMPORT
#else /* _HUTIL_DLL_ */
#define MEM_DLL_IMPORT extern
#endif /* _HUTIL_DLL_ */
#else
#define MEM_DLL_IMPORT DLL_EXPORT
#endif
#if !defined(HAVE_MEMRCHR) // (only if we need it)
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
MEM_DLL_IMPORT void *memrchr(const void *buf, int c, size_t num);
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif // !defined(HAVE_MEMRCHR)
#endif // MEMRCHR_H