]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - include/mangle.h
2 * No copyright is claimed. This code is in the public domain; do with
5 #ifndef UTIL_LINUX_MANGLE_H
6 #define UTIL_LINUX_MANGLE_H
9 * Functions for \oct encoding used in mtab/fstab/swaps/etc.
12 extern char *mangle(const char *s
);
14 extern void unmangle_to_buffer(const char *s
, char *buf
, size_t len
);
15 extern size_t unhexmangle_to_buffer(const char *s
, char *buf
, size_t len
);
17 extern char *unmangle(const char *s
, const char **end
);
19 static inline void unmangle_string(char *s
)
22 unmangle_to_buffer(s
, s
, strlen(s
) + 1);
25 static inline void unhexmangle_string(char *s
)
28 unhexmangle_to_buffer(s
, s
, strlen(s
) + 1);
31 #endif /* UTIL_LINUX_MANGLE_H */