Reformatage : indent -kr $(find . -name '*.c') $(find . -name '*.h')

This commit is contained in:
Sebastien Lugan
2004-04-29 13:10:05 +00:00
parent 4f83e82a74
commit ec9bd9f6a4
29 changed files with 7411 additions and 6598 deletions

View File

@@ -27,20 +27,20 @@
#include "raw.h"
unsigned char raw_c; /* temporary buffer where bits are coded or decoded */
unsigned int raw_ct; /* number of bits already read or free to write */
unsigned int raw_lenmax; /* maximum length to decode */
unsigned int raw_len; /* length decoded */
unsigned char *raw_bp; /* pointer to the current position in the buffer */
unsigned char *raw_start; /* pointer to the start of the buffer */
unsigned char *raw_end; /* pointer to the end of the buffer */
unsigned char raw_c; /* temporary buffer where bits are coded or decoded */
unsigned int raw_ct; /* number of bits already read or free to write */
unsigned int raw_lenmax; /* maximum length to decode */
unsigned int raw_len; /* length decoded */
unsigned char *raw_bp; /* pointer to the current position in the buffer */
unsigned char *raw_start; /* pointer to the start of the buffer */
unsigned char *raw_end; /* pointer to the end of the buffer */
/*
* Return the number of bytes already encoded.
*/
int raw_numbytes()
{
return raw_bp - raw_start;
return raw_bp - raw_start;
}
/*
@@ -51,11 +51,11 @@ int raw_numbytes()
*/
void raw_init_dec(unsigned char *bp, int len)
{
raw_start = bp;
raw_lenmax = len;
raw_len = 0;
raw_c = 0;
raw_ct = 0;
raw_start = bp;
raw_lenmax = len;
raw_len = 0;
raw_c = 0;
raw_ct = 0;
}
/*
@@ -63,19 +63,19 @@ void raw_init_dec(unsigned char *bp, int len)
*/
int raw_decode()
{
int d;
if (raw_ct == 0) {
raw_ct = 8;
if (raw_len == raw_lenmax)
raw_c = 0xff;
else {
if (raw_c == 0xff)
raw_ct = 7;
raw_c = *(raw_start + raw_len);
raw_len++;
}
int d;
if (raw_ct == 0) {
raw_ct = 8;
if (raw_len == raw_lenmax)
raw_c = 0xff;
else {
if (raw_c == 0xff)
raw_ct = 7;
raw_c = *(raw_start + raw_len);
raw_len++;
}
raw_ct--;
d = (raw_c >> raw_ct) & 0x01;
return d;
}
raw_ct--;
d = (raw_c >> raw_ct) & 0x01;
return d;
}