7 * The magic to find a '\0' in a long int is taken from the glibc.
8 * See sysdeps/generic/strlen.c in the glibc sources to have the
10 * Actually it also finds 0x80, that's why we double check when
11 * HAS_ZERO() finds something.
13 #define INIT_MAGIC() \
15 himagic = 0x80808080L; \
16 lomagic = 0x01010101L; \
18 if (sizeof(gulong) > 4) { \
20 himagic = ((himagic << 16) << 16) | himagic; \
21 lomagic = ((lomagic << 16) << 16) | lomagic; \
22 magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; \
24 magic_bits = 0x7efefeffL; \
27 #define HAS_ZERO(longint) ((((longint) + magic_bits) ^ ~longint) & ~magic_bits)
29 const gchar
*filename_to_utf8(const gchar
* str
);
30 gchar
*clean_filename(const gchar
* filename
);