<div dir="ltr"><div>I think this is a good idea. I was able to build and run crossfire server with minimal changes on the cpp-buld branch.</div><div><br></div><div>Here's my small patch:</div><div>- fix building in a 'build' directory</div><div>- Add 'build' to .gitignore</div><div>- Fix .gitignore to ignore the .cpp version of common/arch_types_valid.c</div><div><br></div><div>diff --git a/.gitignore b/.gitignore<br>index cdb60bf9..bec59837 100644<br>--- a/.gitignore<br>+++ b/.gitignore<br>@@ -517,7 +517,8 @@<br> /utils/ylwrap<br> Makefile<br> Makefile.in<br>-common/arch_types_valid.c<br>+build<br>+common/arch_types_valid.cpp<br> cov-int/<br> cscope.*<br> doc/playbook/handbook.idx<br>diff --git a/common/Makefile.am b/common/Makefile.am<br>index 9b08a564..682c0f5c 100644<br>--- a/common/Makefile.am<br>+++ b/common/Makefile.am<br>@@ -74,7 +74,7 @@ libcross_a_SOURCES = \<br>        utils.cpp<br> <br> loader.cpp:<br>-       $(LEX) -i -o loader.cpp loader.l<br>+       $(LEX) -i -o loader.cpp $(top_srcdir)/common/loader.l<br> <br> EXTRA_DIST = README is_valid_types_gen.py<br> AM_CPPFLAGS = -I$(top_srcdir)/include -DDATADIR=\"$(pkgdatadir)\" -DCONFDIR=\"$(pkgconfdir)\" \<br>diff --git a/random_maps/Makefile.am b/random_maps/Makefile.am<br>index 65e1b3d9..7562133b 100644<br>--- a/random_maps/Makefile.am<br>+++ b/random_maps/Makefile.am<br>@@ -29,7 +29,7 @@ EXTRA_DIST = \<br>        main.cpp<br> <br> reader.cpp:<br>-       $(LEX) -P rm -o reader.cpp reader.l<br>+       $(LEX) -P rm -o reader.cpp $(top_srcdir)/random_maps/reader.l<br> <br> AM_CPPFLAGS = -I$(top_srcdir)/include -I${top_srcdir}/include/random_maps</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 27, 2022 at 9:46 AM Nicolas Weeger <<a href="mailto:nicolas.weeger@laposte.net">nicolas.weeger@laposte.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello.<br>
<br>
<br>
I just pushed branch "cpp-build" which changes all .c files to .cpp files. The <br>
only other changes are what was required for correctly building (adding some <br>
casts, renaming a few variables, things like that).<br>
<br>
Functionally, everything is the same.<br>
<br>
<br>
I'd like to merge those changes to master, but well, I'd like to get opinions <br>
before.<br>
<br>
<br>
I don't plan on migrating to a full C++ code base with classes, inheritance & <br>
other things, the current code is fine.<br>
<br>
I do plan to use C++ to replace some home-grown things (lists handling mostly <br>
- for new code, I don't want to always have to realloc() and check size, a <br>
std::vector is enough for that), and to solve issues with object* items being <br>
free'd while still referenced (with our nice check on "count == saved_count" <br>
here and there urgh).<br>
<br>
<br>
<br>
Regards<br>
<br>
<br>
Nicolas_______________________________________________<br>
crossfire mailing list<br>
<a href="mailto:crossfire@metalforge.org" target="_blank">crossfire@metalforge.org</a><br>
<a href="http://mailman.metalforge.org/mailman/listinfo/crossfire" rel="noreferrer" target="_blank">http://mailman.metalforge.org/mailman/listinfo/crossfire</a><br>
IRC: <a href="http://crossfire.real-time.com/irc/index.html" rel="noreferrer" target="_blank">http://crossfire.real-time.com/irc/index.html</a><br>
Discord: <a href="http://crossfire.real-time.com/discord/index.html" rel="noreferrer" target="_blank">http://crossfire.real-time.com/discord/index.html</a><br>
Project Site: <a href="https://sourceforge.net/projects/crossfire/" rel="noreferrer" target="_blank">https://sourceforge.net/projects/crossfire/</a><br>
Wiki: <a href="http://wiki.cross-fire.org/" rel="noreferrer" target="_blank">http://wiki.cross-fire.org/</a><br>
Website: <a href="http://crossfire.real-time.com" rel="noreferrer" target="_blank">http://crossfire.real-time.com</a><br>
</blockquote></div>