2002-12-21 16:04:50 +05:30
|
|
|
#ifndef PROCPS_PROC_ESCAPE_H
|
|
|
|
#define PROCPS_PROC_ESCAPE_H
|
|
|
|
|
|
|
|
//#include <stdio.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include "procps.h"
|
|
|
|
#include "readproc.h"
|
|
|
|
|
|
|
|
EXTERN_C_BEGIN
|
|
|
|
|
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>"
|
|
|
|
|
2005-01-06 02:41:21 +05:30
|
|
|
extern int escape_strlist(char *restrict dst, const char *restrict const *restrict src, size_t n, int *cells);
|
2004-11-05 02:20:59 +05:30
|
|
|
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);
|
2011-05-18 14:03:44 +05:30
|
|
|
extern int escaped_copy(char *restrict dst, const char *restrict src, int bufsize, int *maxroom);
|
2002-12-21 16:04:50 +05:30
|
|
|
|
|
|
|
EXTERN_C_END
|
|
|
|
#endif
|