+ extern char *optarg;
+ extern int optind;
+ int ch;
+ time_t time();
+
+ while ((ch = getopt(argc, argv, "cfhnv")) != EOF)
+ switch((char)ch) {
+ case 'c':
+ cflg++; break;
+ case 'f':
+ fflg++; break;
+ case 'h': /* undocumented */
+ hflg++; break;
+ case 'n':
+ nflg++; break;
+ case 'v': /* undocumented */
+ vflg++; break;
+ case '?':
+ default:
+ fputs("usage: quot [-cfn] [filesystem ...]\n", stderr);
+ exit(1);
+ }
+ argc -= optind;
+ argv += optind;
+
+ (void)time(&now);
+ setpassent(1);
+ if (argc)
+ for (; *argv; ++argv) {
+ if (check(*argv, (char *)NULL) == 0)
+ report();
+ }
+ else
+ quotall();
+ exit(0);
+}
+
+#include <sys/dir.h>
+#include <fstab.h>
+
+quotall()
+{
+ register struct fstab *fs;
+ register char *cp;
+ char dev[MAXNAMLEN + 10], *rindex();
+
+ while (fs = getfsent()) {
+ if (strcmp(fs->fs_type, FSTAB_RO) &&
+ strcmp(fs->fs_type, FSTAB_RW) &&
+ strcmp(fs->fs_type, FSTAB_RQ))