X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Futil.h;h=a148ebbc5887b4790ab343a60a6d08f82408dab7;hb=409bc9c33e99d5bb1e04d01bf3c75854d3a5dc7e;hp=284035c33b15703354319caf72719bbb1bb7ec33;hpb=8511dd1871fdea1ba0c63baa5becf0ede1658007;p=elogind.git diff --git a/src/shared/util.h b/src/shared/util.h index 284035c33..a148ebbc5 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -90,6 +90,8 @@ union dirent_storage { #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m" #define ANSI_HIGHLIGHT_OFF "\x1B[0m" +bool is_efiboot(void); + usec_t now(clockid_t clock); dual_timestamp* dual_timestamp_get(dual_timestamp *ts); @@ -598,3 +600,16 @@ int parse_timestamp(const char *t, usec_t *usec); void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, int (*compar) (const void *, const void *, void *), void *arg); + +bool is_locale_utf8(void); + +typedef enum DrawSpecialChar { + DRAW_TREE_VERT, + DRAW_TREE_BRANCH, + DRAW_TREE_RIGHT, + DRAW_TRIANGULAR_BULLET, + _DRAW_SPECIAL_CHAR_MAX +} DrawSpecialChar; +const char *draw_special_char(DrawSpecialChar ch); + +char *strreplace(const char *text, const char *old_string, const char *new_string);