forked from thegryghost/mlbtv-hls-nexdef
-
Notifications
You must be signed in to change notification settings - Fork 3
/
utils.h
37 lines (28 loc) · 727 Bytes
/
utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef MLB_UTILS
#define MLB_UTILS
#include <stdint.h>
#include <memory.h>
#define SLEEP_1S usleep(1000000);
#define SLEEP_250MS usleep(250000);
#define SLEEP_500MS usleep(500000);
struct textfile_in_memory
{
int pos;
int line_count;
int data_size;
uint8_t *data;
};
typedef struct textfile_in_memory TEXTFILE_IN_MEMORY;
struct textfile_memline
{
int line_num;
char *line_data;
};
typedef struct textfile_memline TEXTFILE_MEMLINE;
int b64decode(char *);
unsigned int htoi (const char *);
int str_to_bytes(char *, unsigned char *, int);
TEXTFILE_IN_MEMORY * memfile_init(char *, int);
char * memfile_getnext_line(TEXTFILE_IN_MEMORY *, int);
int memfile_getline_count(TEXTFILE_IN_MEMORY *);
#endif