aboutsummaryrefslogtreecommitdiff
path: root/src/common.h
blob: fba45cd5242bc8635037d354600d19143b705e64 (plain)
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
#ifndef COMMON_H
#define COMMON_H

#include <stddef.h>
#include <stdint.h>

#define ARRAY_LEN(arr) sizeof(arr) / sizeof(arr[0])

#define WINE_API "https://lutris.net/api/runners/wine"
#define DXVK_API "https://api.github.com/repos/lutris/dxvk/releases"
#define INSTALLER_API "https://lutris.net/api/installers/"

#define USER_AGENT NAME "/" VERSION

#define USAGE_STR "Usage: " NAME

struct MemoryStruct {
    uint8_t* memory;
    size_t size;
};

struct Command {
    char* name;
    int (*func)(int, char**);
    char* description;
};

void print_help(const struct Command*, size_t);

#endif