mirror of
https://git.disroot.org/80486DX2-66/polonium.git
synced 2024-12-27 07:30:23 +05:30
30 lines
527 B
C
30 lines
527 B
C
|
#ifndef _FILE_TYPE_H
|
||
|
#define _FILE_TYPE_H
|
||
|
|
||
|
#include <stdbool.h>
|
||
|
#include <stdint.h>
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
#include "common.h"
|
||
|
|
||
|
#include "ends_with.h"
|
||
|
|
||
|
/* enums */
|
||
|
enum file_types {
|
||
|
FILE_TYPE_AUTO, // default value
|
||
|
FILE_TYPE_BINARY,
|
||
|
FILE_TYPE_TEXT,
|
||
|
FILE_TYPE_BMP,
|
||
|
FILE_TYPE_WAV
|
||
|
};
|
||
|
|
||
|
/* typedefs */
|
||
|
typedef enum file_types file_type_t;
|
||
|
|
||
|
/* function definitions */
|
||
|
file_type_t determine_file_type(FILE* f, const char* file_name);
|
||
|
const char* file_type_to_string(file_type_t type);
|
||
|
|
||
|
#endif /* _FILE_TYPE_H */
|