summaryrefslogtreecommitdiff
path: root/clients/tui/newt
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-19 14:57:48 +0100
committerThomas Haller <thaller@redhat.com>2016-02-19 17:53:25 +0100
commit8bace23bebcc28396460663203d54aac4ec8ffbf (patch)
tree1655434d48980dbb4a547f6d56a231252aa0181d /clients/tui/newt
parent89d6fa6aa93cdc982992c137f0b694cd339c315c (diff)
downloadNetworkManager-8bace23bebcc28396460663203d54aac4ec8ffbf.tar.gz
all: cleanup includes and let "nm-default.h" include "config.h"
- All internal source files (except "examples", which are not internal) should include "config.h" first. As also all internal source files should include "nm-default.h", let "config.h" be included by "nm-default.h" and include "nm-default.h" as first in every source file. We already wanted to include "nm-default.h" before other headers because it might contains some fixes (like "nm-glib.h" compatibility) that is required first. - After including "nm-default.h", we optinally allow for including the corresponding header file for the source file at hand. The idea is to ensure that each header file is self contained. - Don't include "config.h" or "nm-default.h" in any header file (except "nm-sd-adapt.h"). Public headers anyway must not include these headers, and internal headers are never included after "nm-default.h", as of the first previous point. - Include all internal headers with quotes instead of angle brackets. In practice it doesn't matter, because in our public headers we must include other headers with angle brackets. As we use our public headers also to compile our interal source files, effectively the result must be the same. Still do it for consistency. - Except for <config.h> itself. Include it with angle brackets as suggested by https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
Diffstat (limited to 'clients/tui/newt')
-rw-r--r--clients/tui/newt/nmt-newt-button-box.c2
-rw-r--r--clients/tui/newt/nmt-newt-button.c2
-rw-r--r--clients/tui/newt/nmt-newt-checkbox.c2
-rw-r--r--clients/tui/newt/nmt-newt-component.c2
-rw-r--r--clients/tui/newt/nmt-newt-container.c2
-rw-r--r--clients/tui/newt/nmt-newt-entry-numeric.c2
-rw-r--r--clients/tui/newt/nmt-newt-entry.c2
-rw-r--r--clients/tui/newt/nmt-newt-form.c2
-rw-r--r--clients/tui/newt/nmt-newt-grid.c2
-rw-r--r--clients/tui/newt/nmt-newt-hacks.c2
-rw-r--r--clients/tui/newt/nmt-newt-hacks.h2
-rw-r--r--clients/tui/newt/nmt-newt-label.c2
-rw-r--r--clients/tui/newt/nmt-newt-listbox.c2
-rw-r--r--clients/tui/newt/nmt-newt-popup.c2
-rw-r--r--clients/tui/newt/nmt-newt-section.c2
-rw-r--r--clients/tui/newt/nmt-newt-separator.c2
-rw-r--r--clients/tui/newt/nmt-newt-stack.c2
-rw-r--r--clients/tui/newt/nmt-newt-textbox.c2
-rw-r--r--clients/tui/newt/nmt-newt-toggle-button.c2
-rw-r--r--clients/tui/newt/nmt-newt-utils.c3
-rw-r--r--clients/tui/newt/nmt-newt-widget.c2
21 files changed, 20 insertions, 23 deletions
diff --git a/clients/tui/newt/nmt-newt-button-box.c b/clients/tui/newt/nmt-newt-button-box.c
index 4fba1daf92..5341c76a54 100644
--- a/clients/tui/newt/nmt-newt-button-box.c
+++ b/clients/tui/newt/nmt-newt-button-box.c
@@ -29,7 +29,7 @@
* within each of the two sections.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/clients/tui/newt/nmt-newt-button.c b/clients/tui/newt/nmt-newt-button.c
index 00dbcd79a4..c797e22221 100644
--- a/clients/tui/newt/nmt-newt-button.c
+++ b/clients/tui/newt/nmt-newt-button.c
@@ -23,7 +23,7 @@
* #NmtNewtButton implements a button widget.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nmt-newt-button.h"
#include "nmt-newt-utils.h"
diff --git a/clients/tui/newt/nmt-newt-checkbox.c b/clients/tui/newt/nmt-newt-checkbox.c
index 69d9920a46..af7724b248 100644
--- a/clients/tui/newt/nmt-newt-checkbox.c
+++ b/clients/tui/newt/nmt-newt-checkbox.c
@@ -23,7 +23,7 @@
* #NmtNewtCheckbox implements a checkbox widget.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nmt-newt-checkbox.h"
#include "nmt-newt-utils.h"
diff --git a/clients/tui/newt/nmt-newt-component.c b/clients/tui/newt/nmt-newt-component.c
index 98f6df63f0..034d6d2d34 100644
--- a/clients/tui/newt/nmt-newt-component.c
+++ b/clients/tui/newt/nmt-newt-component.c
@@ -24,7 +24,7 @@
* wrap a (single) #newtComponent.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nmt-newt-component.h"
#include "nmt-newt-form.h"
diff --git a/clients/tui/newt/nmt-newt-container.c b/clients/tui/newt/nmt-newt-container.c
index 03f677fbdc..927f187e86 100644
--- a/clients/tui/newt/nmt-newt-container.c
+++ b/clients/tui/newt/nmt-newt-container.c
@@ -26,7 +26,7 @@
* #NmtNewtGrid is the most generic container type.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/clients/tui/newt/nmt-newt-entry-numeric.c b/clients/tui/newt/nmt-newt-entry-numeric.c
index 416b4b79bb..b79f056a61 100644
--- a/clients/tui/newt/nmt-newt-entry-numeric.c
+++ b/clients/tui/newt/nmt-newt-entry-numeric.c
@@ -26,7 +26,7 @@
* #NmtNewtEntryValidator functions, so you should not set your own.
*/
-#include "config.h"
+#include "nm-default.h"
#include <stdlib.h>
diff --git a/clients/tui/newt/nmt-newt-entry.c b/clients/tui/newt/nmt-newt-entry.c
index 7c92d00ada..2715a7389f 100644
--- a/clients/tui/newt/nmt-newt-entry.c
+++ b/clients/tui/newt/nmt-newt-entry.c
@@ -26,7 +26,7 @@
* See also #NmtNewtEntryNumeric, for numeric-only entries.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/clients/tui/newt/nmt-newt-form.c b/clients/tui/newt/nmt-newt-form.c
index ce401e2550..835c1aba7d 100644
--- a/clients/tui/newt/nmt-newt-form.c
+++ b/clients/tui/newt/nmt-newt-form.c
@@ -24,7 +24,7 @@
* "form" (aka dialog) to the user.
*/
-#include "config.h"
+#include "nm-default.h"
#include <fcntl.h>
#include <string.h>
diff --git a/clients/tui/newt/nmt-newt-grid.c b/clients/tui/newt/nmt-newt-grid.c
index ac96733452..4333e0dc6f 100644
--- a/clients/tui/newt/nmt-newt-grid.c
+++ b/clients/tui/newt/nmt-newt-grid.c
@@ -40,7 +40,7 @@
* must be implemented by the container...
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/clients/tui/newt/nmt-newt-hacks.c b/clients/tui/newt/nmt-newt-hacks.c
index 2d9b1725ae..5f69643a5f 100644
--- a/clients/tui/newt/nmt-newt-hacks.c
+++ b/clients/tui/newt/nmt-newt-hacks.c
@@ -24,7 +24,7 @@
* functions that were added after 0.52.15.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nmt-newt-hacks.h"
diff --git a/clients/tui/newt/nmt-newt-hacks.h b/clients/tui/newt/nmt-newt-hacks.h
index ba8464af0d..d4eb3fd2b0 100644
--- a/clients/tui/newt/nmt-newt-hacks.h
+++ b/clients/tui/newt/nmt-newt-hacks.h
@@ -19,8 +19,6 @@
#ifndef NMT_NEWT_HACKS_H
#define NMT_NEWT_HACKS_H
-#include "config.h"
-
#include <newt.h>
#ifndef HAVE_NEWTCOMPONENTGETSIZE
diff --git a/clients/tui/newt/nmt-newt-label.c b/clients/tui/newt/nmt-newt-label.c
index 9c4df8ed4e..f9aed8a3dd 100644
--- a/clients/tui/newt/nmt-newt-label.c
+++ b/clients/tui/newt/nmt-newt-label.c
@@ -25,7 +25,7 @@
* See also #NmtNewtTextbox, for multiline.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/clients/tui/newt/nmt-newt-listbox.c b/clients/tui/newt/nmt-newt-listbox.c
index e450df9123..15a89b0b94 100644
--- a/clients/tui/newt/nmt-newt-listbox.c
+++ b/clients/tui/newt/nmt-newt-listbox.c
@@ -31,7 +31,7 @@
* presses Return on a selection.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nmt-newt-listbox.h"
#include "nmt-newt-form.h"
diff --git a/clients/tui/newt/nmt-newt-popup.c b/clients/tui/newt/nmt-newt-popup.c
index f7813063ed..e171e15370 100644
--- a/clients/tui/newt/nmt-newt-popup.c
+++ b/clients/tui/newt/nmt-newt-popup.c
@@ -26,7 +26,7 @@
* #NmtNewtForm containing an #NmtNewtListbox to select from.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nmt-newt-popup.h"
#include "nmt-newt-form.h"
diff --git a/clients/tui/newt/nmt-newt-section.c b/clients/tui/newt/nmt-newt-section.c
index 1a5035fc09..38152c96db 100644
--- a/clients/tui/newt/nmt-newt-section.c
+++ b/clients/tui/newt/nmt-newt-section.c
@@ -35,7 +35,7 @@
* extent of the section.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/clients/tui/newt/nmt-newt-separator.c b/clients/tui/newt/nmt-newt-separator.c
index 07deb1af90..0317069a59 100644
--- a/clients/tui/newt/nmt-newt-separator.c
+++ b/clients/tui/newt/nmt-newt-separator.c
@@ -25,7 +25,7 @@
* between widgets in containers that don't implement padding.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nmt-newt-separator.h"
diff --git a/clients/tui/newt/nmt-newt-stack.c b/clients/tui/newt/nmt-newt-stack.c
index d94bdebffc..3abf00b199 100644
--- a/clients/tui/newt/nmt-newt-stack.c
+++ b/clients/tui/newt/nmt-newt-stack.c
@@ -29,7 +29,7 @@
* children.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/clients/tui/newt/nmt-newt-textbox.c b/clients/tui/newt/nmt-newt-textbox.c
index 3d297160d3..73794f5eb3 100644
--- a/clients/tui/newt/nmt-newt-textbox.c
+++ b/clients/tui/newt/nmt-newt-textbox.c
@@ -24,7 +24,7 @@
* word-wrapping.
*/
-#include "config.h"
+#include "nm-default.h"
#include <string.h>
diff --git a/clients/tui/newt/nmt-newt-toggle-button.c b/clients/tui/newt/nmt-newt-toggle-button.c
index ec4d9aca51..5397bfec75 100644
--- a/clients/tui/newt/nmt-newt-toggle-button.c
+++ b/clients/tui/newt/nmt-newt-toggle-button.c
@@ -23,7 +23,7 @@
* #NmtNewtToggleButton implements a two-state toggle button.
*/
-#include "config.h"
+#include "nm-default.h"
#include "nmt-newt-toggle-button.h"
diff --git a/clients/tui/newt/nmt-newt-utils.c b/clients/tui/newt/nmt-newt-utils.c
index 841144d8e6..a8541829de 100644
--- a/clients/tui/newt/nmt-newt-utils.c
+++ b/clients/tui/newt/nmt-newt-utils.c
@@ -21,14 +21,13 @@
* @short_description: Utility functions
*/
-#include "config.h"
+#include "nm-default.h"
#include <errno.h>
#include <stdarg.h>
#include <unistd.h>
#include <sys/wait.h>
-#include "nm-default.h"
#include "nmt-newt-utils.h"
static void
diff --git a/clients/tui/newt/nmt-newt-widget.c b/clients/tui/newt/nmt-newt-widget.c
index 24c94db940..5602c062d3 100644
--- a/clients/tui/newt/nmt-newt-widget.c
+++ b/clients/tui/newt/nmt-newt-widget.c
@@ -34,7 +34,7 @@
* FIXME: need RTL support
*/
-#include "config.h"
+#include "nm-default.h"
#include "nmt-newt-widget.h"
#include "nmt-newt-form.h"