Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin Clean up #includes in progress(1).



details:   https://anonhg.NetBSD.org/src/rev/8fc79a4b83c9
branches:  trunk
changeset: 779920:8fc79a4b83c9
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jun 27 22:07:36 2012 +0000

description:
Clean up #includes in progress(1).

Sort them, omit needless ones, and add omitted needful ones.

Omissions revealed by pilfering the code and trying to build it on
Mac OS X.  We ought to have a better way to reveal these omissions...

diffstat:

 usr.bin/ftp/progressbar.c   |   7 ++++---
 usr.bin/progress/progress.c |  17 ++++-------------
 2 files changed, 8 insertions(+), 16 deletions(-)

diffs (72 lines):

diff -r c2f7afdb6ae1 -r 8fc79a4b83c9 usr.bin/ftp/progressbar.c
--- a/usr.bin/ftp/progressbar.c Wed Jun 27 22:04:02 2012 +0000
+++ b/usr.bin/ftp/progressbar.c Wed Jun 27 22:07:36 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: progressbar.c,v 1.21 2009/04/12 10:18:52 lukem Exp $   */
+/*     $NetBSD: progressbar.c,v 1.22 2012/06/27 22:07:36 riastradh Exp $       */
 
 /*-
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -31,14 +31,15 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: progressbar.c,v 1.21 2009/04/12 10:18:52 lukem Exp $");
+__RCSID("$NetBSD: progressbar.c,v 1.22 2012/06/27 22:07:36 riastradh Exp $");
 #endif /* not lint */
 
 /*
  * FTP User Program -- Misc support routines
  */
+#include <sys/param.h>
 #include <sys/types.h>
-#include <sys/param.h>
+#include <sys/time.h>
 
 #include <err.h>
 #include <errno.h>
diff -r c2f7afdb6ae1 -r 8fc79a4b83c9 usr.bin/progress/progress.c
--- a/usr.bin/progress/progress.c       Wed Jun 27 22:04:02 2012 +0000
+++ b/usr.bin/progress/progress.c       Wed Jun 27 22:07:36 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: progress.c,v 1.19 2011/09/16 15:39:28 joerg Exp $ */
+/*     $NetBSD: progress.c,v 1.20 2012/06/27 22:07:36 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,32 +31,23 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: progress.c,v 1.19 2011/09/16 15:39:28 joerg Exp $");
+__RCSID("$NetBSD: progress.c,v 1.20 2012/06/27 22:07:36 riastradh Exp $");
 #endif                         /* not lint */
 
 #include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <sys/time.h>
+#include <sys/stat.h>
 #include <sys/wait.h>
-#include <netinet/in.h>
-#include <arpa/ftp.h>
 
 #include <err.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <glob.h>
-#include <signal.h>
 #include <inttypes.h>
 #include <limits.h>
-#include <netdb.h>
+#include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <termios.h>
-#include <time.h>
-#include <tzfile.h>
 #include <unistd.h>
 
 #define GLOBAL                 /* force GLOBAL decls in progressbar.h to be



Home | Main Index | Thread Index | Old Index