diff options
| author | Fuwn <[email protected]> | 2022-02-03 10:54:07 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-02-03 10:54:07 +0000 |
| commit | 30dd11d0c9654ee890497aa249fca7e4e732fc47 (patch) | |
| tree | 1dcaa6829dca46bb8ed9d61ad590582b643193a9 /include | |
| parent | feat(viv): implement `VIV_split` for future use (diff) | |
| download | viv-30dd11d0c9654ee890497aa249fca7e4e732fc47.tar.xz viv-30dd11d0c9654ee890497aa249fca7e4e732fc47.zip | |
fix: move to c99
Diffstat (limited to 'include')
| -rw-r--r-- | include/viv/cli.h | 4 | ||||
| -rw-r--r-- | include/viv/flag.h | 2 | ||||
| -rw-r--r-- | include/viv/ssl.h | 3 | ||||
| -rw-r--r-- | include/viv/viv.h | 4 |
4 files changed, 10 insertions, 3 deletions
diff --git a/include/viv/cli.h b/include/viv/cli.h index 727fa53..3445fcc 100644 --- a/include/viv/cli.h +++ b/include/viv/cli.h @@ -8,11 +8,11 @@ #include <stdio.h> -static const char *CLI_help = "usage: %s [option] <hostname> [port]\n" +/* static const char *CLI_help = "usage: %s [option] <hostname> [port]\n" "options:\n" " -c, --cert print the received certificates\n" " -h, --help you are here\n" - " -v, --version print viv's version information\n"; + " -v, --version print viv's version information\n"; */ typedef enum { CLI_option_SHOW_CERTS = (1 << 0), diff --git a/include/viv/flag.h b/include/viv/flag.h index b52f941..cdd7c16 100644 --- a/include/viv/flag.h +++ b/include/viv/flag.h @@ -5,6 +5,8 @@ #ifndef FLAG_H_ #define FLAG_H_ +#define static_assert _Static_assert + #include <assert.h> #include <stdio.h> #include <stdlib.h> diff --git a/include/viv/ssl.h b/include/viv/ssl.h index 6d4ace2..8e11d39 100644 --- a/include/viv/ssl.h +++ b/include/viv/ssl.h @@ -6,6 +6,9 @@ #pragma once +/* https://stackoverflow.com/a/11405862/14452787 */ +#define h_addr h_addr_list[0] + #include <openssl/ssl.h> /* Definitions within this header will be prefixed by VIV_SSL opposed to just diff --git a/include/viv/viv.h b/include/viv/viv.h index 82c7583..bbb608c 100644 --- a/include/viv/viv.h +++ b/include/viv/viv.h @@ -8,10 +8,12 @@ typedef void(*split_fn)(const char *, int, void *); -static const char *VIV_version = "1.0.0"; +/* static const char *VIV_version = "1.0.0"; */ int VIV_exit(int, const char *, ...); /* http://www.martinbroadhurst.com/split-a-string-in-c.html */ void VIV_split(const char *, char, split_fn, void *); +char *strsep(char **__restrict, const char *__restrict); + #endif /* VIV_VIV_H */ |