Go to the documentation of this file.
27 #ifndef UTIL_H_INCLUDED
28 #define UTIL_H_INCLUDED
42 #define UTIL_MAX_PATH MAX_PATH
46 #define UTIL_MAX_PATH PATH_MAX
49 extern bool clipboard_set_text(
char *text);
50 extern bool clipboard_get_text(
char *text,
size_t text_sz);
51 extern bool sys_is_admin(
bool *isadmin);
52 extern bool sys_runas_admin(
char *path);
53 extern bool sys_self_exe(
char *path,
size_t pathsz);
54 extern bool sys_self_elevate(
void);
55 extern bool sys_perm_grant(
char *path);
56 extern FILE* sys_fopen_force(
char *path,
char *mode);
57 extern bool sys_appdata_path(
char *path,
size_t pathsz);
58 extern uint64_t sys_monotime(
void);
60 extern char*
util_strsep(
char **pinputstr,
const char *delim);
61 extern size_t util_strlncat(
char *dst,
const char *src,
size_t dst_size,
size_t nchars);
62 extern size_t util_strlcpy(
char *dst,
const char *src,
size_t dst_size);
63 extern size_t util_strlcat(
char *dst,
const char *src,
size_t dst_size);
64 extern void util_strrep(
char *out,
size_t outsz,
char *in,
char *findstr,
char *replacestr);
68 extern bool reg_read_key(
char *key,
char *val,
void *buf,
size_t buflen);
76 #endif // UTIL_H_INCLUDED