date and time created 88/12/14 16:21:47 by marc
[unix-history] / usr / src / usr.bin / fstat / fstat.c
index da1cc5f..23529fd 100644 (file)
@@ -3,11 +3,16 @@
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at Berkeley. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
@@ -17,7 +22,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)fstat.c    5.11 (Berkeley) %G%";
+static char sccsid[] = "@(#)fstat.c    5.13 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -68,12 +73,12 @@ static char sccsid[] = "@(#)fstat.c 5.11 (Berkeley) %G%";
 #define        WD      -1
 
 typedef struct devs {
 #define        WD      -1
 
 typedef struct devs {
-       struct devs     *next;
-       dev_t   dev;
-       int     inum;
-       char    *name;
+       struct devs *next;
+       dev_t dev;
+       int inum;
+       char *name;
 } DEVS;
 } DEVS;
-DEVS   *devs;
+DEVS *devs;
 
 static struct nlist nl[] = {
        { "_proc" },
 
 static struct nlist nl[] = {
        { "_proc" },
@@ -87,24 +92,24 @@ static struct nlist nl[] = {
        { "" },
 };
 
        { "" },
 };
 
-struct proc    *mproc;
-struct pte     *Usrptma, *usrpt;
+struct proc *mproc;
+struct pte *Usrptma, *usrpt;
 
 union {
 
 union {
-       struct  user user;
-       char    upages[UPAGES][NBPG];
+       struct user user;
+       char upages[UPAGES][NBPG];
 } user;
 
 } user;
 
-extern int     errno;
-static int     fflg, vflg;
-static int     kmem, mem, nproc, swap;
-static char    *uname;
+extern int errno;
+static int fflg, vflg;
+static int kmem, mem, nproc, swap;
+static char *uname;
 
 
-off_t  lseek();
+off_t lseek();
 
 main(argc, argv)
 
 main(argc, argv)
-       int     argc;
-       char    **argv;
+       int argc;
+       char **argv;
 {
        extern char *optarg;
        extern int optind;
 {
        extern char *optarg;
        extern int optind;
@@ -241,7 +246,7 @@ getu()
 static
 dotext()
 {
 static
 dotext()
 {
-       struct text     text;
+       struct text text;
 
        (void)lseek(kmem, (off_t)mproc->p_textp, L_SET);
        if (read(kmem, (char *) &text, sizeof(text)) != sizeof(text)) {
 
        (void)lseek(kmem, (off_t)mproc->p_textp, L_SET);
        if (read(kmem, (char *) &text, sizeof(text)) != sizeof(text)) {
@@ -255,7 +260,7 @@ dotext()
 static
 itrans(ftype, g, fno)
        int ftype, fno;
 static
 itrans(ftype, g, fno)
        int ftype, fno;
-       struct inode    *g;             /* if ftype is inode */
+       struct inode *g;                /* if ftype is inode */
 {
        struct inode inode;
        dev_t idev;
 {
        struct inode inode;
        dev_t idev;