aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/pack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/pack.h')
-rw-r--r--src/plugins/pack.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/plugins/pack.h b/src/plugins/pack.h
new file mode 100644
index 0000000..74bc172
--- /dev/null
+++ b/src/plugins/pack.h
@@ -0,0 +1,60 @@
1/*
2Catlib Copyright Notice
3
4The author of this software is Christopher Adam Telfer
5Copyright (c) 1998, 1999, 2000, 2001, 2002
6by Christopher Adam Telfer. All Rights Reserved.
7
8Permission to use, copy, modify, and distribute this software for any
9purpose without fee is hereby granted, provided that the above copyright
10notice, this paragraph, and the following two paragraphs appear in all
11copies, modifications, and distributions.
12
13IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
14SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
15ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
16THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17
18THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
19LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF
21ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". THE AUTHOR HAS NO
22OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
23MODIFICATIONS.
24
25
26*/
27
28#ifndef __CAT_PACK_H
29#define __CAT_PACK_H
30
31/*
32 "bhwAcslPBHWCSL"
33
34 Small letters: do not convert (not implemented for arrays and P)
35 Captial letters: convert from network byte order to host byte order
36
37 b - byte
38 h - half-word
39 w - word
40 a - array (32-byte unsigned long + that many bytes)
41 c - signed 8 bit value
42 s - signed 16 bit value
43 l - signed 32 bit value
44 x - signed 64 bit value
45 p - (unpack only) value is a pointer to a pointer. Generate the buffer
46 to hold the data.
47 */
48int
49EXTRACTOR_common_cat_unpack (const void *buf,
50 const char *fmt,
51 ...);
52
53struct cat_bvec
54{
55 unsigned long len;
56 void *data;
57};
58
59
60#endif /* __CAT_PACK_H */