annotate src/dmbstr.h @ 1090:e0fb6fa1c689

Cosmetic.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 02 Mar 2015 20:28:25 +0200
parents 27d041472c8f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
412
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * DMLib
413
a7ab6bf5b012 Correct the file header comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 412
diff changeset
3 * -- Simple bitstream I/O functions
412
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 * Programmed and designed by Matti 'ccr' Hamalainen
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 * (C) Copyright 2012 Tecnic Software productions (TNSP)
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 */
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 #ifndef DMBSTR_H
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 #define DMBSTR_H
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 #include "dmlib.h"
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
1085
f4626ee57dad Add missing C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
12
f4626ee57dad Add missing C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
13 #ifdef __cplusplus
f4626ee57dad Add missing C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
14 extern "C" {
f4626ee57dad Add missing C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
15 #endif
f4626ee57dad Add missing C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
16
f4626ee57dad Add missing C++ guard.
Matti Hamalainen <ccr@tnsp.org>
parents: 812
diff changeset
17
800
c63e24f9aa9a Modularize bitstream reader.
Matti Hamalainen <ccr@tnsp.org>
parents: 413
diff changeset
18 typedef struct _DMBitStreamContext
412
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 {
1089
27d041472c8f Cleanup, rename some variables, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 1085
diff changeset
20 void *fp;
1090
e0fb6fa1c689 Cosmetic.
Matti Hamalainen <ccr@tnsp.org>
parents: 1089
diff changeset
21
1089
27d041472c8f Cleanup, rename some variables, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 1085
diff changeset
22 BOOL (*putByte)(struct _DMBitStreamContext *ctx, Uint8 val);
800
c63e24f9aa9a Modularize bitstream reader.
Matti Hamalainen <ccr@tnsp.org>
parents: 413
diff changeset
23
1089
27d041472c8f Cleanup, rename some variables, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 1085
diff changeset
24 int outBuf, outBitCount, outByteCount;
800
c63e24f9aa9a Modularize bitstream reader.
Matti Hamalainen <ccr@tnsp.org>
parents: 413
diff changeset
25 } DMBitStreamContext;
412
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
800
c63e24f9aa9a Modularize bitstream reader.
Matti Hamalainen <ccr@tnsp.org>
parents: 413
diff changeset
28 void dmInitBitStreamContext(DMBitStreamContext *ctx);
1090
e0fb6fa1c689 Cosmetic.
Matti Hamalainen <ccr@tnsp.org>
parents: 1089
diff changeset
29 int dmFlushBitStream(DMBitStreamContext *ctx);
e0fb6fa1c689 Cosmetic.
Matti Hamalainen <ccr@tnsp.org>
parents: 1089
diff changeset
30
800
c63e24f9aa9a Modularize bitstream reader.
Matti Hamalainen <ccr@tnsp.org>
parents: 413
diff changeset
31 BOOL dmPutBits(DMBitStreamContext *ctx, const int val, const int n);
1090
e0fb6fa1c689 Cosmetic.
Matti Hamalainen <ccr@tnsp.org>
parents: 1089
diff changeset
32
800
c63e24f9aa9a Modularize bitstream reader.
Matti Hamalainen <ccr@tnsp.org>
parents: 413
diff changeset
33
c63e24f9aa9a Modularize bitstream reader.
Matti Hamalainen <ccr@tnsp.org>
parents: 413
diff changeset
34 int dmInitBitStreamFILE(DMBitStreamContext *ctx, FILE *fp);
412
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 #ifdef __cplusplus
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 }
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 #endif
24548dba1eb6 Add simple bitstream writing functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 #endif // DMBSTR_H