Nguyen Anh Quynh | 6023ef7 | 2014-04-29 11:21:04 +0800 | [diff] [blame] | 1 | /* Capstone Disassembly Engine */ |
Nguyen Anh Quynh | bfcaba5 | 2015-03-04 17:45:23 +0800 | [diff] [blame] | 2 | /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2015 */ |
Nguyen Anh Quynh | 26ee41a | 2013-11-27 12:11:31 +0800 | [diff] [blame] | 3 | |
| 4 | #ifndef CS_SSTREAM_H_ |
| 5 | #define CS_SSTREAM_H_ |
| 6 | |
Koutheir Attouchi | b914a1b | 2016-04-07 10:35:52 +0200 | [diff] [blame^] | 7 | #include "include/capstone/platform.h" |
| 8 | |
Nguyen Anh Quynh | 26ee41a | 2013-11-27 12:11:31 +0800 | [diff] [blame] | 9 | typedef struct SStream { |
| 10 | char buffer[512]; |
| 11 | int index; |
| 12 | } SStream; |
| 13 | |
| 14 | void SStream_Init(SStream *ss); |
| 15 | |
| 16 | void SStream_concat(SStream *ss, const char *fmt, ...); |
| 17 | |
Nguyen Anh Quynh | b76233c | 2014-06-04 18:31:02 +0800 | [diff] [blame] | 18 | void SStream_concat0(SStream *ss, char *s); |
| 19 | |
Nguyen Anh Quynh | 46a74e5 | 2014-08-25 16:47:12 +0800 | [diff] [blame] | 20 | void printInt64Bang(SStream *O, int64_t val); |
| 21 | |
Nguyen Anh Quynh | 03a1836 | 2014-12-12 22:06:06 +0800 | [diff] [blame] | 22 | void printUInt64Bang(SStream *O, uint64_t val); |
| 23 | |
Nguyen Anh Quynh | 46a74e5 | 2014-08-25 16:47:12 +0800 | [diff] [blame] | 24 | void printInt64(SStream *O, int64_t val); |
| 25 | |
| 26 | void printInt32Bang(SStream *O, int32_t val); |
| 27 | |
| 28 | void printInt32(SStream *O, int32_t val); |
| 29 | |
| 30 | void printUInt32Bang(SStream *O, uint32_t val); |
| 31 | |
| 32 | void printUInt32(SStream *O, uint32_t val); |
| 33 | |
Nguyen Anh Quynh | c109e8e | 2014-11-08 13:58:50 +0800 | [diff] [blame] | 34 | // print number in decimal mode |
| 35 | void printInt32BangDec(SStream *O, int32_t val); |
| 36 | |
Nguyen Anh Quynh | 26ee41a | 2013-11-27 12:11:31 +0800 | [diff] [blame] | 37 | #endif |