diff options
| author | Syndamia <kamen@syndamia.com> | 2023-12-08 17:20:59 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2023-12-08 17:20:59 +0200 |
| commit | d64b669582fcd274b64d95e7f546ecbe35dc1082 (patch) | |
| tree | 451ed43da00d6b3a4bc05936440bdde894f54aff /util.h | |
| parent | 699cef84b11d43ac23b6bc7b1b605aa8c53f35b6 (diff) | |
| download | pico-web-d64b669582fcd274b64d95e7f546ecbe35dc1082.tar pico-web-d64b669582fcd274b64d95e7f546ecbe35dc1082.tar.gz pico-web-d64b669582fcd274b64d95e7f546ecbe35dc1082.zip | |
[browser] Cleaned up and reorganized code
Diffstat (limited to 'util.h')
| -rw-r--r-- | util.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3,9 +3,12 @@ #include <inttypes.h> #include <sds/sds.h> +#include <arpa/inet.h> #include <regex.h> -uint16_t inet_atop(const char *port); +uint16_t atop(const char *port); +struct in_addr aton(const char* cp, int* output); + void herr(int output, const char* funcName); void herrc(int output, const char* funcName); @@ -13,5 +16,6 @@ sds gsub(sds str, const regex_t* regex, const char* repl); sds gsub_getm(sds str, const regex_t *regex, const char* repl, int* *matches, int *matchesCount); int digits(int num); +#define clear_arr(arr) memset(arr, 0, sizeof(arr)/sizeof(*arr)) #endif |
