]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - include/mangle.h
1 #ifndef UTIL_LINUX_MANGLE_H
2 #define UTIL_LINUX_MANGLE_H
5 * Functions for \oct encoding used in mtab/fstab/swaps/etc.
8 extern char *mangle(const char *s
);
10 extern void unmangle_to_buffer(const char *s
, char *buf
, size_t len
);
11 extern size_t unhexmangle_to_buffer(const char *s
, char *buf
, size_t len
);
13 extern char *unmangle(const char *s
, const char **end
);
15 static inline void unmangle_string(char *s
)
17 unmangle_to_buffer(s
, s
, strlen(s
) + 1);
20 static inline void unhexmangle_string(char *s
)
22 unhexmangle_to_buffer(s
, s
, strlen(s
) + 1);
25 #endif /* UTIL_LINUX_MANGLE_H */