Skip to content

Commit

Permalink
Fix build and includes after moving sources (#2119)
Browse files Browse the repository at this point in the history
This is part 2 of #2119. The parent commit only moved files to retain
their correct history, this commit fixes all the includes and build files.

Signed-off-by: Tin Švagelj <[email protected]>
  • Loading branch information
Caellian committed Jan 5, 2025
1 parent 916d416 commit 050e965
Show file tree
Hide file tree
Showing 130 changed files with 612 additions and 570 deletions.
280 changes: 159 additions & 121 deletions src/CMakeLists.txt

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions src/common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,38 +47,38 @@
#include "config.h"
#include "conky.h"
#include "core.h"
#include "fs.h"
#include "data/fs.h"
#include "logging.h"
#include "misc.h"
#include "net_stat.h"
#include "specials.h"
#include "temphelper.h"
#include "timeinfo.h"
#include "top.h"
#include "data/misc.h"
#include "data/network/net_stat.h"
#include "content/specials.h"
#include "content/temphelper.h"
#include "data/timeinfo.h"
#include "data/top.h"

#if defined(_POSIX_C_SOURCE) && !defined(__OpenBSD__) && !defined(__HAIKU__)
#include <wordexp.h>
#endif

/* check for OS and include appropriate headers */
#if defined(__linux__)
#include "linux.h"
#include "data/os/linux.h"
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include "freebsd.h"
#include "data/os/freebsd.h"
#elif defined(__DragonFly__)
#include "dragonfly.h"
#include "data/os/dragonfly.h"
#elif defined(__OpenBSD__)
#include "openbsd.h"
#include "data/os/openbsd.h"
#elif defined(__NetBSD__)
#include "netbsd.h"
#include "data/os/netbsd.h"
#elif defined(__APPLE__) && defined(__MACH__)
#include "darwin.h" // strings.h
#include "data/os/darwin.h" // strings.h
#endif

#include "update-cb.hh"

#ifdef BUILD_CURL
#include "ccurl_thread.h"
#include "data/network/ccurl_thread.h"
#endif /* BUILD_CURL */

/* folds a string over top of itself, like so:
Expand Down
4 changes: 2 additions & 2 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#include <optional>
#include <string>

#include "setting.hh"
#include "text_object.h"
#include "lua/setting.hh"
#include "content/text_object.h"

char *readfile(const char *filename, int *total_read, char showerror);

Expand Down
8 changes: 4 additions & 4 deletions src/conky-imlib2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include "conky-imlib2.h"

#include "common.h"
#include "display-output.hh"
#include "output/display-output.hh"
#include "logging.h"
#include "text_object.h"
#include "content/text_object.h"

#include <Imlib2.h>
#include <climits>
Expand All @@ -35,8 +35,8 @@
#include <cstring>
#include <ctime>

#include "x11-settings.h"
#include "x11.h"
#include "lua/x11-settings.h"
#include "output/x11.h"

struct image_list_s {
char name[1024];
Expand Down
4 changes: 2 additions & 2 deletions src/conky-imlib2.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#ifndef _CONKY_IMBLI2_H_
#define _CONKY_IMBLI2_H_

#include "setting.hh"
#include "text_object.h"
#include "lua/setting.hh"
#include "content/text_object.h"

#include <array>

Expand Down
64 changes: 32 additions & 32 deletions src/conky.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@
#endif /* HAVE_DIRENT_H */

#include "common.h"
#include "text_object.h"
#include "content/text_object.h"

#ifdef BUILD_WAYLAND
#include "wl.h"
#include "output/wl.h"
#endif /* BUILD_WAYLAND */

#ifdef BUILD_X11
#include "x11-settings.h"
#include "x11.h"
#include "lua/x11-settings.h"
#include "output/x11.h"

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wvariadic-macros"
Expand All @@ -101,57 +101,57 @@
#endif /* BUILD_RSS */

/* local headers */
#include "colours.h"
#include "content/colours.hh"
#include "core.h"
#include "diskio.h"
#include "exec.h"
#include "data/exec.h"
#include "data/hardware/diskio.h"
#ifdef BUILD_GUI
#include "fonts.h"
#include "gui.h"
#include "lua/fonts.h"
#include "output/gui.h"
#endif /* BUILD_GUI */
#include "fs.h"
#include "data/fs.h"
#ifdef BUILD_ICONV
#include "iconv_tools.h"
#include "data/iconv_tools.h"
#endif /* BUILD_ICONV */
#include "llua.h"
#include "content/specials.h"
#include "content/temphelper.h"
#include "content/template.h"
#include "data/network/mail.h"
#include "data/network/net_stat.h"
#include "data/timeinfo.h"
#include "data/top.h"
#include "logging.h"
#include "mail.h"
#include "nc.h"
#include "net_stat.h"
#include "specials.h"
#include "temphelper.h"
#include "template.h"
#include "timeinfo.h"
#include "top.h"
#include "lua/llua.h"
#include "output/nc.h"

#ifdef BUILD_MYSQL
#include "mysql.h"
#include "data/mysql.h"
#endif /* BUILD_MYSQL */
#ifdef BUILD_NVIDIA
#include "nvidia.h"
#include "data/hardware/nvidia.h"
#endif /* BUILD_NVIDIA */
#ifdef BUILD_CURL
#include "ccurl_thread.h"
#include "data/network/ccurl_thread.h"
#endif /* BUILD_CURL */

#include "display-output.hh"
#include "lua-config.hh"
#include "setting.hh"
#include "lua/lua-config.hh"
#include "lua/setting.hh"
#include "output/display-output.hh"

/* check for OS and include appropriate headers */
#if defined(__linux__)
#include "linux.h"
#include "data/os/linux.h"
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include "freebsd.h"
#include "data/os/freebsd.h"
#elif defined(__DragonFly__)
#include "dragonfly.h"
#include "data/os/dragonfly.h"
#elif defined(__OpenBSD__)
#include "openbsd.h"
#include "data/os/openbsd.h"
#elif defined(__NetBSD__)
#include "netbsd.h"
#include "data/os/netbsd.h"
#endif

#include "gradient.h"
#include "content/gradient.hh"

#ifdef BUILD_OLD_CONFIG
#include "convertconf.h"
Expand Down
20 changes: 10 additions & 10 deletions src/conky.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
#include <filesystem>
#include <memory>

#include "colours.h"
#include "content/colours.hh"
#include "common.h" /* at least for struct dns_data */
#include "luamm.hh"
#include "lua/luamm.hh"

#if defined(HAS_MCHECK_H)
#include <mcheck.h>
Expand Down Expand Up @@ -76,35 +76,35 @@ char *strndup(const char *s, size_t n);
struct text_object;

#ifdef BUILD_HDDTEMP
#include "hddtemp.h"
#include "data/hardware/hddtemp.h"
#endif /* BUILD_HDDTEMP */

#ifdef BUILD_MOC
#include "moc.h"
#include "data/audio/moc.h"
#endif /* BUILD_MOC */

#ifdef BUILD_MPD
#include "mpd.h"
#include "data/audio/mpd.h"
#endif /* BUILD_MPD */

#ifdef BUILD_MYSQL
#include "mysql.h"
#include "data/mysql.h"
#endif /* BUILD_MYSQL */

#ifdef BUILD_PORT_MONITORS
#include "tcp-portmon.h"
#include "data/network/tcp-portmon.h"
#endif

#ifdef BUILD_XMMS2
#include "xmms2.h"
#include "data/audio/xmms2.h"
#endif /* BUILD_XMMS2 */

#ifdef BUILD_APCUPSD
#include "apcupsd.h"
#include "data/hardware/apcupsd.h"
#endif /* BUILD_APCUPSD */

/* sony support */
#include "sony.h"
#include "data/hardware/sony.h"

/* A size for temporary, static buffers to use when
* one doesn't know what to choose. Defaults to 256. */
Expand Down
4 changes: 2 additions & 2 deletions src/content/algebra.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#include <cstring>
#include <memory>
#include "config.h"
#include "conky.h"
#include "logging.h"
#include "../conky.h"
#include "../logging.h"

/* find the operand in the given expression
* returns the index of the first op character or -1 on error
Expand Down
2 changes: 1 addition & 1 deletion src/content/colour-names-stub.hh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <cstdint>

#include "logging.h"
#include "../logging.h"

struct rgb {
const char *name;
Expand Down
4 changes: 2 additions & 2 deletions src/content/colours.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
*
*/

#include "colours.h"
#include "colours.hh"

#include "logging.h"
#include "../logging.h"

#include <cstdio>
#include <optional>
Expand Down
4 changes: 2 additions & 2 deletions src/content/combine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

#include <vector>

#include "core.h"
#include "logging.h"
#include "../core.h"
#include "../logging.h"
#include "text_object.h"

struct combine_data {
Expand Down
8 changes: 4 additions & 4 deletions src/content/gradient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "gradient.h"
#include "colours.h"
#include "conky.h"
#include "logging.h"
#include "gradient.hh"
#include "../conky.h"
#include "../logging.h"
#include "colours.hh"

namespace conky {
gradient_factory::gradient_factory(int width, Colour first_colour,
Expand Down
2 changes: 1 addition & 1 deletion src/content/gradient.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define _GRADIENT_H

#include <memory>
#include "colours.h"
#include "colours.hh"

namespace conky {
class gradient_factory {
Expand Down
10 changes: 5 additions & 5 deletions src/content/scroll.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
*
*/
#include <vector>
#include "colours.h"
#include "conky.h"
#include "core.h"
#include "display-output.hh"
#include "logging.h"
#include "../conky.h"
#include "../core.h"
#include "../logging.h"
#include "../output/display-output.hh"
#include "colours.hh"
#include "specials.h"
#include "text_object.h"

Expand Down
18 changes: 9 additions & 9 deletions src/content/specials.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "conky.h"
#include "../conky.h"
#ifdef BUILD_GUI
#include "fonts.h"
#include "gui.h"
#include "../lua/fonts.h"
#include "../output/gui.h"
#endif /* BUILD_GUI */
#include <cmath>
#include "logging.h"
#include "nc.h"
#include "../logging.h"
#include "../output/nc.h"
#include "specials.h"
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif /* HAVE_SYS_PARAM_H */
#include <algorithm>
#include <map>
#include <sstream>
#include "colours.h"
#include "common.h"
#include "conky.h"
#include "display-output.hh"
#include "../common.h"
#include "../conky.h"
#include "../output/display-output.hh"
#include "colours.hh"

struct special_node *specials = nullptr;

Expand Down
2 changes: 1 addition & 1 deletion src/content/specials.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define _SPECIALS_H

#include <tuple>
#include "colours.h"
#include "colours.hh"

/* special stuff in text_buffer */

Expand Down
2 changes: 1 addition & 1 deletion src/content/temphelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <cstdlib>
#include <cstring>
#include "config.h"
#include "conky.h"
#include "../conky.h"

template <>
conky::lua_traits<TEMP_UNIT>::Map conky::lua_traits<TEMP_UNIT>::map = {
Expand Down
Loading

0 comments on commit 050e965

Please sign in to comment.