2002-12-21 16:04:50 +05:30
|
|
|
#ifndef PROCPS_PROC_ESCAPE_H
|
|
|
|
#define PROCPS_PROC_ESCAPE_H
|
|
|
|
|
2015-06-20 03:13:02 +05:30
|
|
|
#include <proc/readproc.h>
|
2016-04-16 12:33:57 +05:30
|
|
|
#include <features.h>
|
2002-12-21 16:04:50 +05:30
|
|
|
|
2015-06-20 03:13:02 +05:30
|
|
|
__BEGIN_DECLS
|
2002-12-21 16:04:50 +05:30
|
|
|
|
2005-01-27 09:38:10 +05:30
|
|
|
#define ESC_STRETCH 1 // since we mangle to '?' this is 1 (would be 4 for octal escapes)
|
|
|
|
|
2002-12-21 16:04:50 +05:30
|
|
|
#define ESC_ARGS 0x1 // try to use cmdline instead of cmd
|
|
|
|
#define ESC_BRACKETS 0x2 // if using cmd, put '[' and ']' around it
|
|
|
|
#define ESC_DEFUNCT 0x4 // mark zombies with " <defunct>"
|
|
|
|
|
2012-01-09 16:14:51 +05:30
|
|
|
extern int escape_strlist(char *__restrict dst, char *__restrict const *__restrict src, size_t n, int *cells);
|
|
|
|
extern int escape_str(char *__restrict dst, const char *__restrict src, int bufsize, int *maxcells);
|
|
|
|
extern int escape_command(char *__restrict const outbuf, const proc_t *__restrict const pp, int bytes, int *cells, unsigned flags);
|
|
|
|
extern int escaped_copy(char *__restrict dst, const char *__restrict src, int bufsize, int *maxroom);
|
2002-12-21 16:04:50 +05:30
|
|
|
|
2015-06-20 03:13:02 +05:30
|
|
|
__END_DECLS
|
2002-12-21 16:04:50 +05:30
|
|
|
#endif
|