Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/compat/precompose_utf8.h # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / compat / precompose_utf8.h` 48 lines ยท 1459 bytes Raw Blame History 1 #ifndef PRECOMPOSE_UNICODE_H 2 #define PRECOMPOSE_UNICODE_H 3 4 #include 5 #include 6 #include 7 #include 8 9 10 typedef struct dirent_prec_psx { 11 ino_t d_ino; /* Posix */ 12 size_t max_name_len; /* See below */ 13 unsigned char d_type; /* available on all systems git runs on */ 14 15 /* 16 * See http://pubs.opengroup.org/onlinepubs/`9699919799`/basedefs/dirent.h.html 17 * Start with room for NAME_MAX + 1 bytes, but keep d_name as a 18 * flexible array. Some systems have NAME_MAX=255 while strlen(d_name) 19 * from readdir() may return 508 or 510 bytes. Grow the allocation as 20 * needed in precompose_utf8_readdir(). 21 */ 22 char d_name[FLEX_ARRAY]; 23 } dirent_prec_psx; 24 25 26 typedef struct { 27 iconv_t ic_precompose; 28 DIR *dirp; 29 struct dirent_prec_psx *dirent_nfc; 30 } PREC_DIR; 31 32 const char *precompose_argv_prefix(int argc, const char **argv, const char *prefix); 33 const char *precompose_string_if_needed(const char *in); 34 void probe_utf8_pathname_composition(void); 35 36 PREC_DIR *precompose_utf8_opendir(const char *dirname); 37 struct dirent_prec_psx *precompose_utf8_readdir(PREC_DIR *dirp); 38 int precompose_utf8_closedir(PREC_DIR *dirp); 39 40 #ifndef PRECOMPOSE_UNICODE_C 41 #define dirent dirent_prec_psx 42 #define opendir(n) precompose_utf8_opendir(n) 43 #define readdir(d) precompose_utf8_readdir(d) 44 #define closedir(d) precompose_utf8_closedir(d) 45 #define DIR PREC_DIR 46 #endif /* PRECOMPOSE_UNICODE_C */ 47 48 #endif /* PRECOMPOSE_UNICODE_H */