]> PatchyGit - patchyircd.git/commitdiff
s/.h/.hpp/g
authorEgor <egor@patchysicp.xyz>
Fri, 13 Jun 2025 06:11:44 +0000 (09:11 +0300)
committerEgor <egor@patchysicp.xyz>
Fri, 13 Jun 2025 06:11:44 +0000 (09:11 +0300)
24 files changed:
Makefile.am
src/admin.cpp
src/admin.hpp [moved from src/admin.h with 100% similarity]
src/common.hpp [moved from src/common.h with 99% similarity]
src/crypt_blowfish.cpp
src/crypt_blowfish.hpp [moved from src/crypt_blowfish.h with 100% similarity]
src/irc.cpp
src/irc.hpp [moved from src/irc.h with 97% similarity]
src/ircfmt.cpp
src/ircfmt.hpp [moved from src/ircfmt.h with 99% similarity]
src/job.cpp
src/job.hpp [moved from src/job.h with 100% similarity]
src/main.cpp
src/map.cpp
src/map.hpp [moved from src/map.h with 99% similarity]
src/net.cpp
src/net.hpp [moved from src/net.h with 100% similarity]
src/netpoll.cpp
src/netpoll.hpp [moved from src/netpoll.h with 100% similarity]
src/passwd.cpp
src/passwd.hpp [moved from src/passwd.h with 100% similarity]
src/setpass.cpp
src/util.cpp
src/util.hpp [moved from src/util.h with 100% similarity]

index df0a2e1..647c157 100644 (file)
@@ -3,21 +3,21 @@
 ACLOCAL_AMFLAGS=--install
 bin_PROGRAMS = ircd setpass
 ircd_SOURCES = \
-       src/admin.cpp          src/admin.h          \
-                              src/common.h         \
-       src/crypt_blowfish.cpp src/crypt_blowfish.h \
-       src/irc.cpp            src/irc.h            \
-       src/ircfmt.cpp         src/ircfmt.h         \
-       src/job.cpp            src/job.h            \
-       src/map.cpp            src/map.h            \
-       src/net.cpp            src/net.h            \
-       src/netpoll.cpp        src/netpoll.h        \
-       src/passwd.cpp         src/passwd.h         \
-       src/util.cpp           src/util.h           \
+       src/admin.cpp          src/admin.hpp          \
+                              src/common.hpp         \
+       src/crypt_blowfish.cpp src/crypt_blowfish.hpp \
+       src/irc.cpp            src/irc.hpp            \
+       src/ircfmt.cpp         src/ircfmt.hpp         \
+       src/job.cpp            src/job.hpp            \
+       src/map.cpp            src/map.hpp            \
+       src/net.cpp            src/net.hpp            \
+       src/netpoll.cpp        src/netpoll.hpp        \
+       src/passwd.cpp         src/passwd.hpp         \
+       src/util.cpp           src/util.hpp           \
        src/main.cpp
 setpass_SOURCES = \
-       src/crypt_blowfish.cpp src/crypt_blowfish.h \
-       src/passwd.cpp         src/passwd.h         \
+       src/crypt_blowfish.cpp src/crypt_blowfish.hpp \
+       src/passwd.cpp         src/passwd.hpp         \
        src/setpass.cpp
 AM_CXXFLAGS = $(LIBUV_CFLAGS) $(LIBTLS_CFLAGS) $(LUA_CFLAGS)
 LDADD = $(LIBUV_LIBS) $(LIBTLS_LIBS) $(LUA_LIBS)
@@ -51,12 +51,12 @@ valgrind: ircd
 
 .PHONY: pch
 if ENABLE_PCH
-MOSTLYCLEANFILES = common.h.@PCHEXT@
-AM_CPPFLAGS = -Winvalid-pch `test -f common.h.@PCHEXT@ && printf @PCHOPT@ "common.h"`
-common.h.@PCHEXT@: src/common.h
+MOSTLYCLEANFILES = common.hpp.@PCHEXT@
+AM_CPPFLAGS = -Winvalid-pch `test -f common.hpp.@PCHEXT@ && printf @PCHOPT@ "common.hpp"`
+common.hpp.@PCHEXT@: src/common.hpp
        $(AM_V_GEN)$(RM) $@; $(CXXCOMPILE) -x c++-header -o $@ $<
-pch: common.h.@PCHEXT@
-pch.mk: common.h.@PCHEXT@
+pch: common.hpp.@PCHEXT@
+pch.mk: common.hpp.@PCHEXT@
        @: >pch.mk
 -include pch.mk
 endif
index ac1409b..ff93fa0 100644 (file)
@@ -1,11 +1,11 @@
 // Copyright (c) 2023-2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
+#include "common.hpp"
 #ifdef HAVE_LUA
-#include "admin.h"
-#include "irc.h"
-#include "ircfmt.h"
-#include "passwd.h"
+#include "admin.hpp"
+#include "irc.hpp"
+#include "ircfmt.hpp"
+#include "passwd.hpp"
 #include <lua.hpp>
 static lua_State *GL = 0;
 
similarity index 100%
rename from src/admin.h
rename to src/admin.hpp
similarity index 99%
rename from src/common.h
rename to src/common.hpp
index da14adc..7140936 100644 (file)
@@ -40,7 +40,7 @@ struct tls;
 #endif
 #include <uv.h>
 
-#include "map.h"
+#include "map.hpp"
 
 #define MAX_NICKLEN 32
 #define MAX_CHANLEN 33
index 7159654..5c07789 100644 (file)
@@ -1,8 +1,8 @@
 // Copyright (c) 1998-2014 Solar Designer
 // Copyright (c) 2005-2020 Rich Felker, et al.
 // SPDX-License-Identifier: MIT
-#include "common.h"
-#include "crypt_blowfish.h"
+#include "common.hpp"
+#include "crypt_blowfish.hpp"
 /* Modified by Rich Felker in for inclusion in musl libc, based on
  * Solar Designer's second size-optimized version sent to the musl
  * mailing list. */
similarity index 100%
rename from src/crypt_blowfish.h
rename to src/crypt_blowfish.hpp
index 685bd60..47a2bbd 100644 (file)
@@ -1,12 +1,12 @@
 // Copyright (c) 2022, 2024 Sam Smith
 // Copyright (c) 2022-2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
-#include "irc.h"
-#include "ircfmt.h"
-#include "passwd.h"
-#include "job.h"
-#include "admin.h"
+#include "common.hpp"
+#include "irc.hpp"
+#include "ircfmt.hpp"
+#include "passwd.hpp"
+#include "job.hpp"
+#include "admin.hpp"
 std::vector<char> databuf;
 clientmap client_map = {};
 channelmap channel_map = {};
similarity index 97%
rename from src/irc.h
rename to src/irc.hpp
index 5b1ed10..065ba0e 100644 (file)
--- a/src/irc.h
@@ -3,8 +3,8 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef IRC_H_
 #define IRC_H_
-#include "net.h"
-#include "util.h"
+#include "net.hpp"
+#include "util.hpp"
 #define is_registered(cl) ((cl)->regstate == REG_REGISTERED)
 void sendbuf_monitor(const char *nick, int cookie, int positive, int negative);
 const char *format_umodes(struct client_data *cl);
index 2744c09..98fc9b1 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (c) 2022-2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
-#include "ircfmt.h"
+#include "common.hpp"
+#include "ircfmt.hpp"
 static const char *format_prefixes(struct client_data *client, struct client_data *cl, struct channel *chan) {
        if (!chan) return "";
        int o = is_chanop(chan, cl);
similarity index 99%
rename from src/ircfmt.h
rename to src/ircfmt.hpp
index ac3deb0..7b9601d 100644 (file)
@@ -2,7 +2,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef IRCFMT_H_
 #define IRCFMT_H_
-#include "irc.h"
+#include "irc.hpp"
 void msg_away(struct client_data *src);
 void msg_nick(struct client_data *src, const char *newnick);
 void msg_ping(const char *token);
index 45e252f..fb0cdc4 100644 (file)
@@ -1,8 +1,8 @@
 // Copyright (c) 2024-2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
-#include "job.h"
-#include "passwd.h"
+#include "common.hpp"
+#include "job.hpp"
+#include "passwd.hpp"
 
 struct jobent {
        struct client_data *client;
similarity index 100%
rename from src/job.h
rename to src/job.hpp
index 0198938..6a7253f 100644 (file)
@@ -1,12 +1,12 @@
 // Copyright (c) 2022 Sam Smith
 // Copyright (c) 2022-2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
-#include "net.h"
-#include "netpoll.h"
-#include "irc.h"
-#include "job.h"
-#include "admin.h"
+#include "common.hpp"
+#include "net.hpp"
+#include "netpoll.hpp"
+#include "irc.hpp"
+#include "job.hpp"
+#include "admin.hpp"
 
 static int is_running = 1;
 
index 7ece2c3..0ed59c8 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (c) 2023, 2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
-#include "map.h"
+#include "common.hpp"
+#include "map.hpp"
 static int ent_find(map_base *root, const char *key, int *found)
 {
        auto it = std::partition_point(root->ptr, root->ptr + root->len,
similarity index 99%
rename from src/map.h
rename to src/map.hpp
index 69e2fee..243e504 100644 (file)
--- a/src/map.h
@@ -2,7 +2,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 #ifndef MAP_H_
 #define MAP_H_
-#include "util.h"
+#include "util.hpp"
 
 /* A map abstract data type with following properties:
  * - keys are lexicographically-sorted unique NUL-terminated strings
index 047a381..a8d3da7 100644 (file)
@@ -1,13 +1,13 @@
 // Copyright (c) 2022 Sam Smith
 // Copyright (c) 2022-2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
-#include "net.h"
-#include "netpoll.h"
-#include "irc.h"
-#include "ircfmt.h"
-#include "job.h"
-#include "admin.h"
+#include "common.hpp"
+#include "net.hpp"
+#include "netpoll.hpp"
+#include "irc.hpp"
+#include "ircfmt.hpp"
+#include "job.hpp"
+#include "admin.hpp"
 void update_poll_reg(struct client_data *cl)
 {
        if (cl->fd == -1)
similarity index 100%
rename from src/net.h
rename to src/net.hpp
index 3bfcb41..eea2810 100644 (file)
@@ -1,8 +1,8 @@
 // Copyright (c) 2023-2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
-#include "netpoll.h"
-#include "util.h"
+#include "common.hpp"
+#include "netpoll.hpp"
+#include "util.hpp"
 
 #define container_of(ptr, type, member) ((type *)((char *)(ptr) - offsetof(type, member)))
 
similarity index 100%
rename from src/netpoll.h
rename to src/netpoll.hpp
index c45a896..65bdce0 100644 (file)
@@ -1,8 +1,8 @@
 // Copyright (c) 2022-2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
-#include "passwd.h"
-#include "crypt_blowfish.h"
+#include "common.hpp"
+#include "passwd.hpp"
+#include "crypt_blowfish.hpp"
 char *password_crypt(const char *key, const char *setting)
 {
        static char output[128];
similarity index 100%
rename from src/passwd.h
rename to src/passwd.hpp
index 6638184..4aa4b41 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (c) 2022-2023, 2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
-#include "passwd.h"
+#include "common.hpp"
+#include "passwd.hpp"
 
 char *read_password(const char *prompt)
 {
index a732aed..011bafc 100644 (file)
@@ -1,8 +1,8 @@
 // Copyright (c) 2022 Sam Smith
 // Copyright (c) 2022-2025 Egor
 // SPDX-License-Identifier: GPL-2.0-or-later
-#include "common.h"
-#include "util.h"
+#include "common.hpp"
+#include "util.hpp"
 static void append_strn(std::vector<char> *v, const char *s, int len) {
        v->insert(v->end(), s, s+len);
 }
similarity index 100%
rename from src/util.h
rename to src/util.hpp