diff options
author | gad <gad@FreeBSD.org> | 2004-06-22 02:15:58 +0000 |
---|---|---|
committer | gad <gad@FreeBSD.org> | 2004-06-22 02:15:58 +0000 |
commit | ed35e71589befee3ddbf8133d0ffa0fd310f9a02 (patch) | |
tree | bdcadd8de00af88003f109c2440605343b38fdc4 /bin/ps | |
parent | f9a5adc8b6fababa9bc8c441edc25ac43f853d26 (diff) | |
download | FreeBSD-src-ed35e71589befee3ddbf8133d0ffa0fd310f9a02.zip FreeBSD-src-ed35e71589befee3ddbf8133d0ffa0fd310f9a02.tar.gz |
Oops. Undo that last 'const' change. It expects similar changes to some
other files that I am not ready to commit yet...
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/extern.h | 2 | ||||
-rw-r--r-- | bin/ps/fmt.c | 22 |
2 files changed, 11 insertions, 13 deletions
diff --git a/bin/ps/extern.h b/bin/ps/extern.h index dd72e20..3642fc9 100644 --- a/bin/ps/extern.h +++ b/bin/ps/extern.h @@ -50,7 +50,7 @@ int donlist(void); void elapsed(KINFO *, VARENT *); void emulname(KINFO *, VARENT *); VARENT *find_varentry(VAR *); -const char *fmt_argv(const char **, const char *, size_t); +const char *fmt_argv(char **, char *, size_t); double getpcpu(const KINFO *); void kvar(KINFO *, VARENT *); void label(KINFO *, VARENT *); diff --git a/bin/ps/fmt.c b/bin/ps/fmt.c index f7c0914..d6e0109 100644 --- a/bin/ps/fmt.c +++ b/bin/ps/fmt.c @@ -51,17 +51,16 @@ __FBSDID("$FreeBSD$"); #include "ps.h" -static const char *cmdpart(const char *); -static const char *shquote(const char **); +static char *cmdpart(char *); +static char *shquote(char **); -static const char * -shquote(const char **argv) +static char * +shquote(char **argv) { long arg_max; static size_t buf_size; size_t len; - const char **p, *src; - char *dst; + char **p, *dst, *src; static char *buf = NULL; if (buf == NULL) { @@ -97,20 +96,19 @@ shquote(const char **argv) return (buf); } -static const char * -cmdpart(const char *arg0) +static char * +cmdpart(char *arg0) { - const char *cp; + char *cp; return ((cp = strrchr(arg0, '/')) != NULL ? cp + 1 : arg0); } const char * -fmt_argv(const char **argv, const char *cmd, size_t maxlen) +fmt_argv(char **argv, char *cmd, size_t maxlen) { size_t len; - const char *ap; - char *cp; + char *ap, *cp; if (argv == NULL || argv[0] == NULL) { if (cmd == NULL) |