]> granicus.if.org Git - procps-ng/commitdiff
fix a few Alpha troubles
authoralbert <>
Sat, 12 Oct 2002 20:32:24 +0000 (20:32 +0000)
committeralbert <>
Sat, 12 Oct 2002 20:32:24 +0000 (20:32 +0000)
top.c
top.h

diff --git a/top.c b/top.c
index 8734e5beba21510067235349857aaef88027d562..1a71dc1e194369332c2f34f553b50239f6d4f4ae 100644 (file)
--- a/top.c
+++ b/top.c
@@ -1012,9 +1012,9 @@ static void configs_read (void)
          if (WINNAMSIZ <= strlen(Winstk[i]->winname)
          || strlen(DEF_FIELDS) != strlen(Winstk[i]->fieldscur))
             std_err(fmtmk(err_rc, RCfile));
-         fscanf(fp, "\twinflags=%d, sortindx=%d, maxtasks=%d \n"
+         fscanf(fp, "\twinflags=%d, sortindx=%u, maxtasks=%d \n"
             , &Winstk[i]->winflags
-            , (int *)&Winstk[i]->sortindx
+            , &Winstk[i]->sortindx
             , &Winstk[i]->maxtasks);
          fscanf(fp, "\tsummclr=%d, msgsclr=%d, headclr=%d, taskclr=%d \n"
             , &Winstk[i]->summclr
diff --git a/top.h b/top.h
index 8b307d0b0053edb1bc8a18842e721acf1f0a7b5b..f09a14471967ec47af95cd1507ef8dc08919fd44 100644 (file)
--- a/top.h
+++ b/top.h
 /*######  Some Typedef's and Enum's  #####################################*/
 
         /* This typedef just ensures consistent 'process flags' handling */
-typedef unsigned char PFLG_t;
+typedef unsigned PFLG_t;
 
         /* These typedefs attempt to ensure consistent 'ticks' handling */
 typedef unsigned long long TICS_t;
@@ -248,14 +248,10 @@ enum pflag {
 typedef struct win {
    struct win *next,                    /* next window in window stack    */
               *prev;                    /* prior window in window stack   */
+   char       *captab [CAPTABMAX];      /* captab needed by show_special  */
    int         winnum,                  /* window's num (array pos + 1)   */
                winlines;                /* task window's rows (volatile)  */
    int         winflags;        /* 'view', 'show' and 'sort' mode flags   */
-   char        grpname   [GRPNAMSIZ],   /* window number:name, printable  */
-               winname   [WINNAMSIZ],   /* window name, user changeable   */
-               fieldscur [PFLAGSSIZ],   /* fields displayed and ordered   */
-               columnhdr [SMLBUFSIZ],   /* column headings for procflags  */
-               colusrnam [USRNAMSIZ];   /* if selected by the 'u' command */
    PFLG_t      procflags [PFLAGSSIZ],   /* fieldscur subset, as enum      */
                sortindx;                /* sort field, as a procflag      */
    int         maxpflgs,        /* number of procflags (upcase fieldscur) */
@@ -265,15 +261,19 @@ typedef struct win {
                msgsclr,                 /*        "       in msgs/pmts    */
                headclr,                 /*        "       in cols head    */
                taskclr;                 /*        "       in task display */
+   int         len_rownorm,     /* lengths of the corresponding terminfo  */
+               len_rowhigh;     /* strings to save mkcol() a strlen call  */
    char        capclr_sum [CLRBUFSIZ],  /* terminfo strings built from    */
                capclr_msg [CLRBUFSIZ],  /*    above clrs (& rebuilt too), */
                capclr_pmt [CLRBUFSIZ],  /*    but NO recurring costs !!!  */
                capclr_hdr [CLRBUFSIZ],     /* note: sum, msg and pmt strs */
                capclr_rowhigh [CLRBUFSIZ], /*    are only used when this  */
                capclr_rownorm [CLRBUFSIZ]; /*    window is the 'Curwin'!  */
-   int         len_rownorm,     /* lengths of the corresponding terminfo  */
-               len_rowhigh;     /* strings to save mkcol() a strlen call  */
-   char       *captab [CAPTABMAX];      /* captab needed by show_special  */
+   char        grpname   [GRPNAMSIZ],   /* window number:name, printable  */
+               winname   [WINNAMSIZ],   /* window name, user changeable   */
+               fieldscur [PFLAGSSIZ],   /* fields displayed and ordered   */
+               columnhdr [SMLBUFSIZ],   /* column headings for procflags  */
+               colusrnam [USRNAMSIZ];   /* if selected by the 'u' command */
 } WIN_t;
         /* ////////////////////////////////////////////////////////////// */