[pan] Take <glib.h> out of extern "C"



commit 52b299e58be270c882eb584e196c06ea2782c0fb
Author: Olaf Seibert <rhialto falu nl>
Date:   Mon Apr 5 16:11:49 2021 +0200

    Take <glib.h> out of extern "C"
    
    and do the same for other <glib/*.h> files.

 pan/data-impl/article-filter.cc   | 5 +----
 pan/data-impl/data-impl.cc        | 2 +-
 pan/data-impl/data-io.cc          | 4 ++--
 pan/data-impl/groups.cc           | 2 +-
 pan/data-impl/headers.cc          | 2 +-
 pan/data-impl/profiles.cc         | 4 ++--
 pan/data-impl/server.cc           | 6 ++----
 pan/data/article-cache.cc         | 4 ++--
 pan/data/article-cache.h          | 4 +---
 pan/data/cert-store.cc            | 2 --
 pan/data/encode-cache.cc          | 4 ++--
 pan/data/encode-cache.h           | 4 +---
 pan/general/e-util.cc             | 4 ++--
 pan/general/file-util.cc          | 4 ++--
 pan/general/file-util.h           | 4 ++--
 pan/general/macros.h              | 5 +----
 pan/general/text-match.cc         | 4 ++--
 pan/gui/dl-headers-ui.cc          | 4 ++--
 pan/gui/group-prefs-dialog.cc     | 4 ++--
 pan/gui/group-prefs.cc            | 2 +-
 pan/gui/prefs-file.cc             | 2 +-
 pan/gui/prefs.cc                  | 6 ++----
 pan/gui/server-ui.cc              | 4 ++--
 pan/gui/task-pane.cc              | 4 ++--
 pan/gui/url.cc                    | 6 ++----
 pan/tasks/nntp.cc                 | 6 ++----
 pan/tasks/nzb.cc                  | 4 +---
 pan/tasks/socket-impl-main.cc     | 5 +----
 pan/tasks/socket-impl-openssl.h   | 5 +----
 pan/tasks/socket.cc               | 4 +---
 pan/usenet-utils/filter-info.cc   | 6 ++----
 pan/usenet-utils/message-check.cc | 2 --
 pan/usenet-utils/rules-info.cc    | 6 ++----
 pan/usenet-utils/text-massager.cc | 2 --
 34 files changed, 49 insertions(+), 87 deletions(-)
---
diff --git a/pan/data-impl/article-filter.cc b/pan/data-impl/article-filter.cc
index b06d0c2d..f424738d 100644
--- a/pan/data-impl/article-filter.cc
+++ b/pan/data-impl/article-filter.cc
@@ -25,10 +25,7 @@
 #include <gmime/gmime.h>
 
 //#include <glib/gprintf.h>
-extern "C"
-{
-  #include <glib.h>
-}
+#include <glib.h>
 
 #include "article-filter.h"
 
diff --git a/pan/data-impl/data-impl.cc b/pan/data-impl/data-impl.cc
index 88012ccf..215be61b 100644
--- a/pan/data-impl/data-impl.cc
+++ b/pan/data-impl/data-impl.cc
@@ -24,8 +24,8 @@
 #include <config.h>
 extern "C" {
   #include <glib/gi18n.h>
-  #include <glib.h> // for g_build_filename
 }
+#include <glib.h> // for g_build_filename
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
 #include <pan/general/log.h>
diff --git a/pan/data-impl/data-io.cc b/pan/data-impl/data-io.cc
index bea1a90b..d938634b 100644
--- a/pan/data-impl/data-io.cc
+++ b/pan/data-impl/data-io.cc
@@ -27,9 +27,9 @@ extern "C" {
   #include <sys/types.h> // for chmod
   #include <sys/stat.h> // for chmod
   #include <unistd.h>
-  #include <glib.h>
-  #include <glib/gi18n.h>
 }
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
 #include <pan/general/line-reader.h>
diff --git a/pan/data-impl/groups.cc b/pan/data-impl/groups.cc
index 244feb92..da0183a0 100644
--- a/pan/data-impl/groups.cc
+++ b/pan/data-impl/groups.cc
@@ -29,9 +29,9 @@
 #include <vector>
 
 #include <glib.h>
+#include <glib/gi18n.h>
 extern "C" {
   #include <unistd.h>
-  #include <glib/gi18n.h>
 }
 
 #include <pan/general/debug.h>
diff --git a/pan/data-impl/headers.cc b/pan/data-impl/headers.cc
index f8c4466a..16d5672c 100644
--- a/pan/data-impl/headers.cc
+++ b/pan/data-impl/headers.cc
@@ -25,10 +25,10 @@
 #include <string>
 #include <cmath>
 #include <glib.h>
+#include <glib/gi18n.h>
 extern "C" {
   #include <sys/types.h> // for chmod
   #include <sys/stat.h> // for chmod
-  #include <glib/gi18n.h>
 }
 #include <pan/general/debug.h>
 #include <pan/general/log.h>
diff --git a/pan/data-impl/profiles.cc b/pan/data-impl/profiles.cc
index e999fdaf..a6e6bb51 100644
--- a/pan/data-impl/profiles.cc
+++ b/pan/data-impl/profiles.cc
@@ -26,9 +26,9 @@
 extern "C" {
   #include <sys/types.h> // for chmod
   #include <sys/stat.h> // for chmod
-  #include <glib.h>
-  #include <glib/gi18n.h>
 }
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <pan/general/debug.h>
 #include <pan/general/string-view.h>
 #include <pan/general/file-util.h>
diff --git a/pan/data-impl/server.cc b/pan/data-impl/server.cc
index 9ea55d41..b23782f6 100644
--- a/pan/data-impl/server.cc
+++ b/pan/data-impl/server.cc
@@ -25,10 +25,8 @@
 #include <map>
 #include <set>
 #include <vector>
-extern "C" {
-  #include <glib.h> // for GMarkup
-  #include <glib/gi18n.h>
-}
+#include <glib.h> // for GMarkup
+#include <glib/gi18n.h>
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
 #include <pan/general/log.h>
diff --git a/pan/data/article-cache.cc b/pan/data/article-cache.cc
index 18551538..2b973440 100644
--- a/pan/data/article-cache.cc
+++ b/pan/data/article-cache.cc
@@ -27,10 +27,10 @@ extern "C"
   #include <unistd.h>
   #include <dirent.h>
 
-  #include <glib.h>
-  #include <glib/gi18n.h>
   #include <gmime/gmime.h>
 }
+#include <glib.h>
+#include <glib/gi18n.h>
 
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
diff --git a/pan/data/article-cache.h b/pan/data/article-cache.h
index 2ac722b5..1304bfeb 100644
--- a/pan/data/article-cache.h
+++ b/pan/data/article-cache.h
@@ -22,9 +22,7 @@
 
 #include <map>
 #include <vector>
-extern "C" {
-  #include <glib.h> // for guint64
-}
+#include <glib.h> // for guint64
 #include <pan/general/string-view.h>
 #include <pan/general/quark.h>
 
diff --git a/pan/data/cert-store.cc b/pan/data/cert-store.cc
index 340fc8b7..f6cd46e2 100644
--- a/pan/data/cert-store.cc
+++ b/pan/data/cert-store.cc
@@ -34,10 +34,8 @@
 #include <iostream>
 #include <string>
 
-extern "C" {
 #include <glib/gi18n.h>
 #include <glib.h>
-}
 
 #include <pan/general/debug.h>
 #include <pan/general/e-util.h>
diff --git a/pan/data/encode-cache.cc b/pan/data/encode-cache.cc
index 3a82ea99..eecd1d19 100644
--- a/pan/data/encode-cache.cc
+++ b/pan/data/encode-cache.cc
@@ -29,10 +29,10 @@ extern "C"
   #include <unistd.h>
   #include <dirent.h>
 
-  #include <glib.h>
-  #include <glib/gi18n.h>
   #include <gmime/gmime.h>
 }
+#include <glib.h>
+#include <glib/gi18n.h>
 
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
diff --git a/pan/data/encode-cache.h b/pan/data/encode-cache.h
index 8bbd5301..1affc0c3 100644
--- a/pan/data/encode-cache.h
+++ b/pan/data/encode-cache.h
@@ -22,9 +22,7 @@
 
 #include <map>
 #include <vector>
-extern "C" {
-  #include <glib.h> // for guint64
-}
+#include <glib.h> // for guint64
 #include <pan/general/string-view.h>
 #include <pan/general/quark.h>
 
diff --git a/pan/general/e-util.cc b/pan/general/e-util.cc
index af5ccd0b..62879eef 100644
--- a/pan/general/e-util.cc
+++ b/pan/general/e-util.cc
@@ -26,9 +26,9 @@
 #include <ctime>
 extern "C" {
   #include <ctype.h>
-  #include <glib.h>
-  #include <glib/gi18n.h>
 }
+#include <glib.h>
+#include <glib/gi18n.h>
 #include "debug.h"
 #include "e-util.h"
 
diff --git a/pan/general/file-util.cc b/pan/general/file-util.cc
index 02e9ed1e..9efa2695 100644
--- a/pan/general/file-util.cc
+++ b/pan/general/file-util.cc
@@ -27,12 +27,12 @@ extern "C"
   #include <unistd.h>
   #include <sys/stat.h>
   #include <sys/types.h>
-  #include <glib.h>
-  #include <glib/gi18n.h>
   #ifndef G_OS_WIN32
     #include <pwd.h>
   #endif
 }
+#include <glib.h>
+#include <glib/gi18n.h>
 
 #include "debug.h"
 #include "log.h"
diff --git a/pan/general/file-util.h b/pan/general/file-util.h
index c125c8d3..8c67639e 100644
--- a/pan/general/file-util.h
+++ b/pan/general/file-util.h
@@ -25,9 +25,9 @@
 extern "C" {
   #include <stddef.h>
   #include <stdio.h>
-  #include <glib.h>
-  #include <glib/gstdio.h>
 }
+#include <glib.h>
+#include <glib/gstdio.h>
 #include <pan/general/string-view.h>
 
 #define g_freopen freopen
diff --git a/pan/general/macros.h b/pan/general/macros.h
index 6dcf908d..b16230f9 100644
--- a/pan/general/macros.h
+++ b/pan/general/macros.h
@@ -63,9 +63,6 @@
 ***  g_assert
 **/
 
-extern "C"
-{
-  #include <glib.h>
-}
+#include <glib.h>
 
 #endif
diff --git a/pan/general/text-match.cc b/pan/general/text-match.cc
index fcacbe2d..d390de0d 100644
--- a/pan/general/text-match.cc
+++ b/pan/general/text-match.cc
@@ -20,9 +20,9 @@
 #include <config.h>
 extern "C" {
   #include <ctype.h>
-  #include <glib.h>
-  #include <glib/gi18n.h>
 }
+#include <glib.h>
+#include <glib/gi18n.h>
 #include "debug.h"
 #include "log.h"
 #include "text-match.h"
diff --git a/pan/gui/dl-headers-ui.cc b/pan/gui/dl-headers-ui.cc
index 5841651a..cfc536d5 100644
--- a/pan/gui/dl-headers-ui.cc
+++ b/pan/gui/dl-headers-ui.cc
@@ -18,9 +18,9 @@
  */
 
 #include <config.h>
+#include <glib.h>
+#include <glib/gi18n.h>
 extern "C" {
-  #include <glib.h>
-  #include <glib/gi18n.h>
   #include "gtk-compat.h"
 }
 #include <pan/general/macros.h>
diff --git a/pan/gui/group-prefs-dialog.cc b/pan/gui/group-prefs-dialog.cc
index 677b07a9..69837469 100644
--- a/pan/gui/group-prefs-dialog.cc
+++ b/pan/gui/group-prefs-dialog.cc
@@ -18,9 +18,9 @@
  */
 
 #include <config.h>
+#include <glib/gi18n.h>
+#include <glib.h>
 extern "C" {
-  #include <glib/gi18n.h>
-  #include <glib.h>
   #include "gtk-compat.h"
 #ifdef HAVE_GTKSPELL
   #include <enchant/enchant.h>
diff --git a/pan/gui/group-prefs.cc b/pan/gui/group-prefs.cc
index 3e9851ba..b06a9499 100644
--- a/pan/gui/group-prefs.cc
+++ b/pan/gui/group-prefs.cc
@@ -21,8 +21,8 @@ extern "C" {
   #include <config.h>
   #include <sys/types.h> // chmod
   #include <sys/stat.h> // chmod
-  #include <glib.h>
 }
+#include <glib.h>
 #include <iostream>
 #include <fstream>
 #include <pan/general/file-util.h>
diff --git a/pan/gui/prefs-file.cc b/pan/gui/prefs-file.cc
index bde7ef3a..64c540fb 100644
--- a/pan/gui/prefs-file.cc
+++ b/pan/gui/prefs-file.cc
@@ -24,8 +24,8 @@
 extern "C" {
   #include <sys/types.h> // for chmod
   #include <sys/stat.h> // for chmod
-  #include <glib.h>
 }
+#include <glib.h>
 #include <pan/general/file-util.h>
 #include "prefs-file.h"
 
diff --git a/pan/gui/prefs.cc b/pan/gui/prefs.cc
index fdbd9085..64dd8da9 100644
--- a/pan/gui/prefs.cc
+++ b/pan/gui/prefs.cc
@@ -23,10 +23,8 @@
 #include <iostream>
 #include <sstream>
 #include <string>
-extern "C" {
-  #include <glib.h>
-  #include <glib/gi18n.h>
-}
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <pan/general/debug.h>
 #include <pan/general/log.h>
 #include <pan/general/macros.h>
diff --git a/pan/gui/server-ui.cc b/pan/gui/server-ui.cc
index b42bc185..684ea0c4 100644
--- a/pan/gui/server-ui.cc
+++ b/pan/gui/server-ui.cc
@@ -21,9 +21,9 @@
 #include <cstdlib>
 #include <cstring>
 #include <climits>
+#include <glib.h>
+#include <glib/gi18n.h>
 extern "C" {
-  #include <glib.h>
-  #include <glib/gi18n.h>
   #include "gtk-compat.h"
 }
 
diff --git a/pan/gui/task-pane.cc b/pan/gui/task-pane.cc
index 4f77922b..1c302f92 100644
--- a/pan/gui/task-pane.cc
+++ b/pan/gui/task-pane.cc
@@ -18,9 +18,9 @@
  */
 
 #include <config.h>
+#include <glib.h>
+#include <glib/gi18n.h>
 extern "C" {
-  #include <glib.h>
-  #include <glib/gi18n.h>
   #include "gtk-compat.h"
 }
 #include <pan/general/e-util.h>
diff --git a/pan/gui/url.cc b/pan/gui/url.cc
index e1173ae8..94ffb52b 100644
--- a/pan/gui/url.cc
+++ b/pan/gui/url.cc
@@ -20,10 +20,8 @@
 #include <config.h>
 #include <iostream>
 #include <string>
-extern "C" {
-  #include <glib.h>
-  #include <glib/gi18n.h>
-};
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <pan/general/log.h>
 #include "url.h"
 
diff --git a/pan/tasks/nntp.cc b/pan/tasks/nntp.cc
index ceb1574c..71c5cf1b 100644
--- a/pan/tasks/nntp.cc
+++ b/pan/tasks/nntp.cc
@@ -22,10 +22,8 @@
 #include <cstdarg>
 #include <cstdlib> // abort, atoi, strtoul
 #include <cstdio> // snprintf
-extern "C" {
-  #include <glib.h>
-  #include <glib/gi18n.h>
-}
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <pan/general/debug.h>
 #include <pan/general/log.h>
 #include <pan/general/messages.h>
diff --git a/pan/tasks/nzb.cc b/pan/tasks/nzb.cc
index af890e5e..14df6f60 100644
--- a/pan/tasks/nzb.cc
+++ b/pan/tasks/nzb.cc
@@ -24,9 +24,7 @@
 #include <sstream>
 #include <string>
 #include <map>
-extern "C" {
-  #include <glib.h>
-}
+#include <glib.h>
 #include <pan/general/debug.h>
 #include <pan/general/file-util.h>
 #include <pan/general/log.h>
diff --git a/pan/tasks/socket-impl-main.cc b/pan/tasks/socket-impl-main.cc
index c33edfdf..688183c8 100644
--- a/pan/tasks/socket-impl-main.cc
+++ b/pan/tasks/socket-impl-main.cc
@@ -30,10 +30,7 @@
 //#include <glib/giochannel.h>
 //#include <glib/gstring.h>
 
-extern "C"
-{
-  #include <glib.h>
-}
+#include <glib.h>
 
 #include <pan/tasks/socket.h>
 
diff --git a/pan/tasks/socket-impl-openssl.h b/pan/tasks/socket-impl-openssl.h
index e48cbae6..eea41d41 100644
--- a/pan/tasks/socket-impl-openssl.h
+++ b/pan/tasks/socket-impl-openssl.h
@@ -27,10 +27,7 @@
 #include <string>
 //#include <glib/giochannel.h>
 //#include <glib/gstring.h>
-extern "C"
-{
-  #include <glib.h>
-}
+#include <glib.h>
 
 #include <pan/general/debug.h>
 #include <pan/general/quark.h>
diff --git a/pan/tasks/socket.cc b/pan/tasks/socket.cc
index 78d53fb7..2c7a28d2 100644
--- a/pan/tasks/socket.cc
+++ b/pan/tasks/socket.cc
@@ -21,9 +21,7 @@
 #include <cstdarg>
 #include <ctime>
 #include <cmath>
-extern "C" {
-  #include <glib.h>
-}
+#include <glib.h>
 #include <pan/general/debug.h>
 #include <pan/general/string-view.h>
 #include "socket.h"
diff --git a/pan/usenet-utils/filter-info.cc b/pan/usenet-utils/filter-info.cc
index f464428d..6b1a5c95 100644
--- a/pan/usenet-utils/filter-info.cc
+++ b/pan/usenet-utils/filter-info.cc
@@ -18,10 +18,8 @@
  */
 
 #include <config.h>
-extern "C" {
-  #include <glib.h>
-  #include <glib/gi18n.h>
-}
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <pan/general/macros.h>
 #include "filter-info.h"
 
diff --git a/pan/usenet-utils/message-check.cc b/pan/usenet-utils/message-check.cc
index a5115569..461ce86c 100644
--- a/pan/usenet-utils/message-check.cc
+++ b/pan/usenet-utils/message-check.cc
@@ -21,9 +21,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <glib.h>
-extern "C" {
 #include <glib/gi18n.h>
-}
 #include <pan/general/debug.h>
 #include <pan/general/macros.h>
 #include <pan/general/string-view.h>
diff --git a/pan/usenet-utils/rules-info.cc b/pan/usenet-utils/rules-info.cc
index 1c03adc6..91e78bec 100644
--- a/pan/usenet-utils/rules-info.cc
+++ b/pan/usenet-utils/rules-info.cc
@@ -22,10 +22,8 @@
 
 
 #include <config.h>
-extern "C" {
-  #include <glib.h>
-  #include <glib/gi18n.h>
-}
+#include <glib.h>
+#include <glib/gi18n.h>
 #include <pan/general/macros.h>
 #include "rules-info.h"
 
diff --git a/pan/usenet-utils/text-massager.cc b/pan/usenet-utils/text-massager.cc
index 4fcd8d5c..15a818b4 100644
--- a/pan/usenet-utils/text-massager.cc
+++ b/pan/usenet-utils/text-massager.cc
@@ -22,9 +22,7 @@
 #include <map>
 #include <cstring>
 #include <glib.h>
-extern "C" {
 #include <glib/gi18n.h>
-}
 #include "text-massager.h"
 #include <pan/general/log.h>
 #include <pan/general/e-util.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]