27 lines
688 B
C
27 lines
688 B
C
#ifndef UTILS_H
|
|
#define UTILS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
int prefixMatch(char* pre, char* str);
|
|
int suffixMatch(char* suf, char* str);
|
|
int exactMatch(char* str1, char* str2);
|
|
int hide(char* file_name);
|
|
|
|
void getDisplayName(const char* in_name, char* out_name);
|
|
void getEmuName(const char* in_name, char* out_name);
|
|
|
|
void normalizeNewline(char* line);
|
|
void trimTrailingNewlines(char* line);
|
|
|
|
int exists(char* path);
|
|
void touch(char* path);
|
|
void putFile(char* path, char* contents);
|
|
char* allocFile(char* path); // caller must free
|
|
void getFile(char* path, char* buffer, size_t buffer_size);
|
|
void putInt(char* path, int value);
|
|
int getInt(char* path);
|
|
|
|
uint64_t getMicroseconds(void);
|
|
|
|
#endif
|