diff options
| author | drowe67 <[email protected]> | 2023-07-20 08:59:48 +0930 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-20 08:59:48 +0930 |
| commit | 06d4c11e699b0351765f10398abb4f663a984f36 (patch) | |
| tree | 33e22af0814c5b6c3d676f096ae8c2ac8a3ed9f0 /src/varicode.h | |
| parent | 6588e77f38bdebd7adffe091b22e7760d95d0ccb (diff) | |
| parent | 4d6c143c0abec15e1d6ed1fd95d36f80e6cb7df8 (diff) | |
Merge pull request #3 from drowe67/dr-cleanup21.2.0
Cleanup Part 2
Diffstat (limited to 'src/varicode.h')
| -rw-r--r-- | src/varicode.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/varicode.h b/src/varicode.h index d9fb441..d4b378a 100644 --- a/src/varicode.h +++ b/src/varicode.h @@ -27,22 +27,25 @@ extern "C" { #endif -#define VARICODE_MAX_BITS (10+2) /* max varicode bits for each ascii character */ - /* 10 bits for code plus 2 0 bits for inter-character space */ +#define VARICODE_MAX_BITS \ + (10 + 2) /* max varicode bits for each ascii character */ + /* 10 bits for code plus 2 0 bits for inter-character space */ struct VARICODE_DEC { - int state; - int n_zeros; - int v_len; - unsigned short packed; - int code_num; - int n_in; - int in[2]; + int state; + int n_zeros; + int v_len; + unsigned short packed; + int code_num; + int n_in; + int in[2]; }; -int varicode_encode(short varicode_out[], char ascii_in[], int max_out, int n_in, int code_num); +int varicode_encode(short varicode_out[], char ascii_in[], int max_out, + int n_in, int code_num); void varicode_decode_init(struct VARICODE_DEC *dec_states, int code_num); -int varicode_decode(struct VARICODE_DEC *dec_states, char ascii_out[], short varicode_in[], int max_out, int n_in); +int varicode_decode(struct VARICODE_DEC *dec_states, char ascii_out[], + short varicode_in[], int max_out, int n_in); void varicode_set_code_num(struct VARICODE_DEC *dec_states, int code_num); #ifdef __cplusplus |
