#pragma once #include "types.h" #include #include #include #define _(x) gettext(x) void pdebug(lm_ctx_t *ctx, const char *func, const char *fmt, ...); bool parse_host(char *addr, char *host, uint16_t *port); bool contains(char *str, char s); bool eq(char *s1, char *s2); bool is_letter(char c); bool is_digit(char c); bool copy_to_buffer(void *buffer, void *src, size_t size, ssize_t *total, ssize_t *used); bool copy_from_buffer(void *dst, void *buffer, size_t size, ssize_t *total, ssize_t *used); bool extract_archive(char *dst, char *src); bool is_pkg_name_valid(char *name); bool exists(char *path); bool is_file(char *path); bool is_dir(char *path); bool can_read(char *path); bool can_write(char *path);