Statistics
| Branch: | Revision:

streamers / out-stream.c @ 54b631d9

History | View | Annotate | Download (347 Bytes)

1
#include <unistd.h>
2
#include <stdint.h>
3
#include <stdio.h>
4

    
5
#include "out-stream.h"
6
#include "dbg.h"
7

    
8
static int outfd = 1;
9

    
10
void chunk_write(int id, const uint8_t *data, int size)
11
{
12
#ifdef DEBUG
13
#define buff_size 8 // HACK!
14
    fprintf(stderr, "\tOut Chunk[%d] - %d: %s\n", id, id % buff_size, data);
15
#else
16
    write(outfd, data, size);
17
#endif
18
}