mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-31 12:13:10 +00:00
Oops. Undo that last 'const' change. It expects similar changes to some
other files that I am not ready to commit yet...
This commit is contained in:
parent
db6e0b8b03
commit
bdbc9a5cb9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130896
@ -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 *);
|
||||
|
22
bin/ps/fmt.c
22
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)
|
||||
|
Loading…
Reference in New Issue
Block a user