-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdump.h
42 lines (37 loc) · 1.37 KB
/
dump.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
/*
* Copyright (C) 2002 John Todd Larason <jtl@molehill.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef DUMP_H
#define DUMP_H
#include "rtv.h"
#include <stdlib.h>
#include <stdio.h>
struct mapping
{
u32 value;
char * name;
};
void dump_set_file(FILE * out);
void dump_group_start(char const * groupname);
void dump_group_end(void);
void dump_mapping(char const * tag, u32 value, struct mapping * map);
void dump_bitmapping(char const * tag, u32 value, struct mapping * map);
void dump_time(char const * tag, u32 value);
void dump_string(char const * tag, char const * value);
void dump_u8(char const * tag, u8 value);
void dump_u16(char const * tag, u16 value);
void dump_u32(char const * tag, u32 value);
void dump_u64(char const * tag, u64 value);
void dump_buffer(char const * tag, u8 const * buffer, size_t len);
char const * lookup_mapping(u32 value, struct mapping * map);
#endif