aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c/common.h5
-rw-r--r--c/datalistview.c2
-rw-r--r--c/datalistview.h5
-rw-r--r--c/defs.h27
-rw-r--r--c/episodelistview.c5
-rw-r--r--c/episodelistview.h7
-rw-r--r--c/listview.c2
-rw-r--r--c/listview.h4
-rw-r--r--c/main.c6
-rw-r--r--c/main.h4
-rw-r--r--c/resource.h6
11 files changed, 36 insertions, 37 deletions
diff --git a/c/common.h b/c/common.h
deleted file mode 100644
index b59b205..0000000
--- a/c/common.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-#include <windows.h>
-
-TCHAR *TSZFromSZ(char *, int);
-int Watched(int);
diff --git a/c/datalistview.c b/c/datalistview.c
index 4980d3b..43cfeb6 100644
--- a/c/datalistview.c
+++ b/c/datalistview.c
@@ -2,7 +2,7 @@
#include <SWI-Prolog.h>
#include "resource.h"
-#include "datalistview.h"
+#include "defs.h"
HWND gDlv_hWnd;
diff --git a/c/datalistview.h b/c/datalistview.h
deleted file mode 100644
index e1e2748..0000000
--- a/c/datalistview.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-#include <windows.h>
-
-void DlvCreate(HWND);
-void DlvShowEpisode(int);
diff --git a/c/defs.h b/c/defs.h
new file mode 100644
index 0000000..67f1d3e
--- /dev/null
+++ b/c/defs.h
@@ -0,0 +1,27 @@
+#ifndef DEFS_H
+#define DEFS_H
+
+#include <windows.h>
+#include <commctrl.h>
+
+/* common.c */
+TCHAR *TSZFromSZ(char *, int);
+int Watched(int);
+
+/* main.c */
+void UpdateLayout(HWND);
+
+/* listview.c */
+HWND LvCreate(HWND, HMENU);
+
+/* episodelistview.c */
+HWND ElvCreate(HWND);
+LRESULT ElvHandleNotify(LPARAM);
+void ElvUpdate(void);
+void ElvUpdateName(NMLISTVIEW *);
+
+/* datalistview.c */
+void DlvCreate(HWND);
+void DlvShowEpisode(int);
+
+#endif
diff --git a/c/episodelistview.c b/c/episodelistview.c
index 82f460a..64644fc 100644
--- a/c/episodelistview.c
+++ b/c/episodelistview.c
@@ -4,10 +4,7 @@
#include <SWI-Prolog.h>
#include "resource.h"
-#include "common.h"
-#include "listview.h"
-#include "episodelistview.h"
-#include "main.h"
+#include "defs.h"
extern HFONT g_GUIFontBold;
diff --git a/c/episodelistview.h b/c/episodelistview.h
deleted file mode 100644
index 8bec69b..0000000
--- a/c/episodelistview.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#pragma once
-#include <windows.h>
-
-HWND ElvCreate(HWND);
-LRESULT ElvHandleNotify(LPARAM);
-void ElvUpdate(void);
-void ElvUpdateName(NMLISTVIEW *);
diff --git a/c/listview.c b/c/listview.c
index 362029f..e38429b 100644
--- a/c/listview.c
+++ b/c/listview.c
@@ -3,7 +3,7 @@
#include <uxtheme.h>
#include "resource.h"
-#include "main.h"
+#include "defs.h"
extern HFONT g_GUIFont;
diff --git a/c/listview.h b/c/listview.h
deleted file mode 100644
index 3ca0cf3..0000000
--- a/c/listview.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-#include <windows.h>
-
-HWND LvCreate(HWND, HMENU);
diff --git a/c/main.c b/c/main.c
index abe6044..80578dc 100644
--- a/c/main.c
+++ b/c/main.c
@@ -1,5 +1,3 @@
-#include "main.h"
-
#include <windows.h>
#include <commctrl.h>
#include <stdio.h>
@@ -7,9 +5,7 @@
#include <SWI-Prolog.h>
#include "resource.h"
-#include "common.h"
-#include "episodelistview.h"
-#include "main.h"
+#include "defs.h"
HFONT g_GUIFont;
HFONT g_GUIFontBold;
diff --git a/c/main.h b/c/main.h
deleted file mode 100644
index 582e906..0000000
--- a/c/main.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-#include <windows.h>
-
-void UpdateLayout(HWND);
diff --git a/c/resource.h b/c/resource.h
index 00176f0..6cab078 100644
--- a/c/resource.h
+++ b/c/resource.h
@@ -1,4 +1,6 @@
-#pragma once
+#ifndef RESOURCE_H
+#define RESOURCE_H
+
#define IDR_MENU 101
#define IDD_ABOUT 201
#define IDC_ABOUTTEXT 301
@@ -6,3 +8,5 @@
#define ID_FILE_EXIT 4001
#define ID_FILE_REFRESH 4002
#define ID_FILE_ABOUT 4011
+
+#endif