1 #ifndef PROCPS_PROC_ESCAPE_H 2 #define PROCPS_PROC_ESCAPE_H 3 4 //#include <stdio.h> 5 #include <sys/types.h> 6 #include "procps.h" 7 #include "readproc.h" 8 9 EXTERN_C_BEGIN 10 11 #define ESC_ARGS 0x1 // try to use cmdline instead of cmd 12 #define ESC_BRACKETS 0x2 // if using cmd, put '[' and ']' around it 13 #define ESC_DEFUNCT 0x4 // mark zombies with " <defunct>" 14 15 extern int escape_strlist(char *restrict dst, const char *restrict const *restrict src, size_t n); 16 extern int escape_str(char *restrict dst, const char *restrict src, int bufsize, int maxglyphs); 17 extern int octal_escape_str(char *restrict dst, const char *restrict src, size_t n); 18 extern int simple_escape_str(char *restrict dst, const char *restrict src, size_t n); 19 20 extern int escape_command(char *restrict const outbuf, const proc_t *restrict const pp, int bytes, int glyphs, unsigned flags); 21 22 EXTERN_C_END 23 #endif 24