/usr/include/distorm64/wstring.h is in libdistorm64-dev 1.7.30-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 46 47 48 | /*
wstring.h
Copyright (C) 2003-2008 Gil Dabah, http://ragestorm.net/distorm/
This library is licensed under the BSD license. See the file COPYING.
*/
#ifndef WSTRING_H
#define WSTRING_H
#include "../config.h"
/* Make sure the buffer isn't overflowed. */
#define MAX_TEXT_SIZE (60)
typedef struct {
unsigned int pos;
int8_t p[MAX_TEXT_SIZE];
} _WString;
/*
* Warning, this macro should be used only when the compiler knows the size of string in advance!
* This macro is used in order to spare the call to strlen when the strings are known already.
* Note: sizeof includes NULL terminated character.
*/
#define strcat_WSN(s, t) strcatlen_WS((s), (t), sizeof((t))-1)
#define strcpy_WSN(s, t) strcpylen_WS((s), (t), sizeof((t))-1)
void _FASTCALL_ strcpy_WS(_WString* s, const int8_t* buf);
void _FASTCALL_ strcpylen_WS(_WString* s, const int8_t* buf, unsigned int len);
void _FASTCALL_ strcatlen_WS(_WString* s, const int8_t* buf, unsigned int len);
_INLINE_ void strclear_WS(_WString* s)
{
s->p[0] = '\0';
s->pos = 0;
}
_INLINE_ void chrcat_WS(_WString* s, uint8_t ch)
{
s->p[s->pos] = ch;
s->p[s->pos + 1] = '\0';
s->pos += 1;
}
#endif /* WSTRING_H */
|