summaryrefslogtreecommitdiff
path: root/src/shared.h
blob: 56f0a703eebf62a58751fe49aacd66762911251f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#include <stdio.h>
#include <stdbool.h>
#include <time.h>

__attribute__ ((__format__(printf, 1, 2)))
void error(const char* format, ...);

FILE* get_file(const char* path, const char* type);
long int get_number(const char* text);

bool streql(const char* a, const char* b);
bool prefix(const char* pre, const char* str);

void print_file_size(size_t bytes);
void print_date_time(time_t mills);