libgrapheme

grapheme cluster utility library
git clone git://git.suckless.org/libgrapheme
Log | Files | Refs | LICENSE

util.h (471B)


      1 /* See LICENSE file for copyright and license details. */
      2 #ifndef UTIL_H
      3 #define UTIL_H
      4 
      5 #include <stddef.h>
      6 #include <stdint.h>
      7 
      8 #define LEN(x) (sizeof (x) / sizeof *(x))
      9 
     10 struct range {
     11 	uint32_t lower;
     12 	uint32_t upper;
     13 };
     14 
     15 void parse_input(int (*process_line)(char **, size_t, char *));
     16 int cp_parse(const char *, uint32_t *);
     17 int range_parse(const char *, struct range *);
     18 void range_list_append(struct range **, size_t *, const struct range *);
     19 
     20 #endif /* UTIL_H */