Sort the declarations of global variables.

This commit is contained in:
Garance A Drosehn 2004-03-29 00:12:03 +00:00
parent 4857f240e1
commit de800cd4f8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=127537

View File

@ -80,21 +80,36 @@ __FBSDID("$FreeBSD$");
#define W_SEP " \t" /* "Whitespace" list separators */
#define T_SEP "," /* "Terminate-element" list separators */
static KINFO *kinfo;
#ifdef LAZY_PS
#define DEF_UREAD 0;
#define OPT_LAZY_f "f"
#else
#define DEF_UREAD 1; /* Always do the more-expensive read. */
#define OPT_LAZY_f /* I.e., the `-f' option is not added. */
#endif
int cflag; /* -c */
int eval; /* Exit value */
time_t now; /* Current time(3) value */
int rawcpu; /* -C */
int sumrusage; /* -S */
int termwidth; /* Width of the screen (0 == infinity). */
int totwidth; /* Calculated-width of requested variables. */
struct varent *vhead;
int eval; /* exit value */
int cflag; /* -c */
int optfatal; /* Fatal error parsing some list-option */
int rawcpu; /* -C */
int sumrusage; /* -S */
int termwidth; /* width of screen (0 == infinity) */
int totwidth; /* calculated width of requested variables */
static int forceuread = DEF_UREAD; /* Do extra work to get u-area. */
static kvm_t *kd;
static KINFO *kinfo;
static int needcomm; /* -o "command" */
static int needenv; /* -e */
static int needuser; /* -o "user" */
static int optfatal; /* Fatal error parsing some list-option. */
time_t now; /* current time(3) value */
static enum sort { DEFAULT, SORTMEM, SORTCPU } sortby = DEFAULT;
struct listinfo;
typedef int addelem_rtn(struct listinfo *_inf, const char *elem);
typedef int addelem_rtn(struct listinfo *_inf, const char *_elem);
struct listinfo {
int count;
@ -111,18 +126,6 @@ struct listinfo {
};
};
static int needuser, needcomm, needenv;
#ifdef LAZY_PS
static int forceuread = 0;
#define OPT_LAZY_f "f"
#else
static int forceuread = 1;
#define OPT_LAZY_f /* Ie, the `-f' option is not added. */
#endif
static enum sort { DEFAULT, SORTMEM, SORTCPU } sortby = DEFAULT;
static int addelem_gid(struct listinfo *, const char *);
static int addelem_pid(struct listinfo *, const char *);
static int addelem_tty(struct listinfo *, const char *);
@ -150,8 +153,6 @@ static char ufmt[] = "user,pid,%cpu,%mem,vsz,rss,tt,state,start,time,command";
static char vfmt[] = "pid,state,time,sl,re,pagein,vsz,rss,lim,tsiz,%cpu,%mem,command";
static char Zfmt[] = "label";
static kvm_t *kd;
#define PS_ARGS "AaCc" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ"
int