diff options
author | John Ankarström <john@ankarstrom.se> | 2022-02-15 16:36:42 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-02-15 16:36:42 +0100 |
commit | 2e5ea298da89df79fc057ad46253e5a9d860e7e3 (patch) | |
tree | 617c323b90588fc4d75b9dd53d602d79e96f7c8f | |
parent | 52fb337856497cb151081f3738e7cfa4bc2883bd (diff) | |
download | EpisodeBrowser-2e5ea298da89df79fc057ad46253e5a9d860e7e3.tar.gz |
Combine header files.
Some older UNIX programs are organized like this,
and I think it gives a very good overview over the code.
See troff for an example.
-rw-r--r-- | c/common.h | 5 | ||||
-rw-r--r-- | c/datalistview.c | 2 | ||||
-rw-r--r-- | c/datalistview.h | 5 | ||||
-rw-r--r-- | c/defs.h | 27 | ||||
-rw-r--r-- | c/episodelistview.c | 5 | ||||
-rw-r--r-- | c/episodelistview.h | 7 | ||||
-rw-r--r-- | c/listview.c | 2 | ||||
-rw-r--r-- | c/listview.h | 4 | ||||
-rw-r--r-- | c/main.c | 6 | ||||
-rw-r--r-- | c/main.h | 4 | ||||
-rw-r--r-- | c/resource.h | 6 |
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); @@ -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 |