Commit graph

128 commits

Author SHA1 Message Date
David Kinder
8cb89aa3f9 Fix Windows implementation of Platform::rsync 2022-04-28 06:44:25 +01:00
Graham Nelson
fd6efb886e Fixed buffer overrun error in regular expression matching 2022-04-26 23:48:42 +01:00
Graham Nelson
04343a64a5 Allowed parameter-less preprocessor macro definitions 2022-04-25 16:46:46 +01:00
Graham Nelson
0cc1077c47 Using new-style readme scripts 2022-04-23 23:41:01 +01:00
Graham Nelson
7b90e88dab Tidied up preprocessor code 2022-04-23 16:13:47 +01:00
Graham Nelson
517341513a Using new-style gitignore scripts 2022-04-23 14:08:38 +01:00
Graham Nelson
3adb9a7dfa Scanning directories in alphabetical order 2022-04-19 22:06:18 +01:00
Graham Nelson
4110147ef6
Merge pull request #2 from ptomato/linux-fixes
More Linux fixes
2022-04-14 23:43:53 +01:00
David Kinder
675b231539 More consistent logic on Windows for when to treat a system() command as Unix-like or not 2022-04-14 14:41:23 +01:00
David Kinder
97b84360ea Reduce core count by one to leave one CPU core idle by default 2022-04-14 08:43:07 +01:00
Philip Chimento
9f982e5c95 Mark strings as const when they underlie streams
In the family of functions that create a text stream from a string (e.g.,
Streams::open_from_ISO_string, Str::new_from_ISO_string) we can mark the
input string as const since it is not supposed to be modified.

I ran into this when experimenting with trying to create a text stream
from the output of "getenv" which is "const char *". I ended up not
needing that, but this seems like a good change nonetheless.
2022-04-13 22:51:33 -07:00
Graham Nelson
f57cde99e8 Merge branch 'master' of https://github.com/ganelson/inweb 2022-04-13 23:44:23 +01:00
Graham Nelson
395fc19c2f Minor debugging log changes to avoid compiler warnings 2022-04-13 23:42:22 +01:00
David Kinder
76958ef34a Temporary work-around for Windows to run clang under Cygwin 2022-04-11 20:39:51 +01:00
Graham Nelson
fac68c3d8c Marking Errors::internal_error_handler as _Noreturn 2022-04-10 16:39:42 +01:00
Philip Chimento
436901adb6 Fix semver comparison with different numbers of prerelease elements
By my reading of the semantic versioning spec, the sense of the comparison
of the number of prerelease version segments has to be reversed when one
of those numbers is zero.

In other words, zero prerelease segments takes precedence over any nonzero
number, but any nonzero number takes precedence over any lower nonzero
number.

Example given in the specification:
1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta <
  1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0.

I had two failing test cases in foundation-test; in one case, the blessed
output seemed to be wrong, whereas the other case made this fix necessary.
2022-04-07 22:34:51 -07:00
Philip Chimento
92e5d195b8 Fix possible strncpy no-op
There's a possible execution path here, where extindex is equal to 0 at
the time it's used as the count parameter in strncpy. GCC warns about this
because it leaves the destination string unchanged while the programmer
may expect it to be 0-terminated.

In this case it's OK because we write a 0 to the string directly
afterwards, but still we can silence the warning and avoid a no-op call
to strncpy by checking the count first.
2022-04-07 21:33:43 -07:00
Philip Chimento
658833d167 Include stdint.h for uint32_t
Without including stdint.h, the compiler chokes on uint32_t. I assume that
on other platforms, another header must be pulling it in already, but on
GCC on Linux, it's not. However, stdint.h should be safe to include on all
platforms as it's part of C99.
2022-04-07 21:33:43 -07:00
Graham Nelson
89bb595c34 Bug fix to handle relative pathnames edge case 2022-04-07 22:38:41 +01:00
Graham Nelson
a882bf208e Fixed bug in deleting elements from linked lists 2022-04-05 12:15:52 +01:00
Graham Nelson
464e855c50 Fixed bug in weaving links to named sections of colony members 2022-04-04 18:29:56 +01:00
Graham Nelson
40582edfca Added new (html) inclusion feature 2022-04-04 00:00:46 +01:00
Graham Nelson
59d3e6beb9 Minor speed optimisations following profiling of inform7 2022-03-23 23:02:07 +00:00
Graham Nelson
23180b41f8 Minor bug fix 2022-03-11 11:15:49 +00:00
Graham Nelson
a8e6c508ac Added md5 hashing of binary files 2022-03-05 21:36:26 +00:00
Graham Nelson
df15511d7e Bug fix for semantic versioning with prerelease modifiers 2022-02-13 22:33:19 +00:00
Graham Nelson
fbead7a233 Added simple tangler to foundation module 2021-11-28 23:33:48 +00:00
Graham Nelson
69da61fe56 Added ctags support 2021-08-11 12:01:50 +01:00
Graham Nelson
7875f3e7e6 Added feature for extract files 2021-08-10 16:15:43 +01:00
Graham Nelson
796d71d80d Added cache for prototype HTML, Javascript and CSS files 2021-07-07 23:44:18 +01:00
Graham Nelson
f720db9559 Added error message for unlocated C functions 2021-04-25 09:52:39 +01:00
David Kinder
a6bb5c1b6c Simple Win32 implementation of rsync() 2021-03-08 15:33:33 +00:00
Graham Nelson
3fd3a1d19d Made command-line errors flush stdout and stderr 2021-03-01 19:26:25 +00:00
Graham Nelson
6360a9d97e Tiny change only 2021-02-26 09:05:48 +00:00
Graham Nelson
cf069124de Minor improvements 2021-02-20 15:24:41 +00:00
Graham Nelson
9e08ae75ab Better linked list support in foundation 2021-02-14 11:00:17 +00:00
Graham Nelson
71dd2f4c62 Minor CSS improvements 2020-08-24 21:22:23 +01:00
Graham Nelson
d87ad97a04 Added invisible paragraph numbering option 2020-08-19 22:24:28 +01:00
Graham Nelson
74ac3c3ccd Tweak to cross-reference links CSS 2020-08-16 18:39:53 +01:00
Graham Nelson
62d102e7bf Documented Platform::get_core_count 2020-07-18 08:44:10 +01:00
David Kinder
86ce0d6d6d Implement Platform::get_core_count() for Windows 2020-07-17 14:44:36 +01:00
Graham Nelson
df60434564 Added Platform::get_core_count 2020-07-16 21:08:24 +01:00
David Kinder
e5acc71bae Windows implementation of system() uses either a Unix sh or the Windows cmd.exe, depending on the command line 2020-07-14 15:49:08 +01:00
Graham Nelson
2a5b282143 Further work on wchar_t portability 2020-07-08 15:58:20 +01:00
David Kinder
a35c5a68e5 Escape shell command line correctly on Windows 2020-07-07 17:36:10 +01:00
Graham Nelson
157af5bb16 New file-system separator character convention, makefile includes foundation-test 2020-07-06 23:01:05 +01:00
David Kinder
8d01f1c01c Set Windows console output locale if possible 2020-07-05 19:56:15 +01:00
Graham Nelson
d4769f3455 Refactoring Foundation::start 2020-07-05 15:33:00 +01:00
Graham Nelson
eea1c1780b Merge branch 'master' of https://github.com/ganelson/inweb 2020-07-05 10:36:11 +01:00
Graham Nelson
14048ead24 More care over wchar_t and snprintf 2020-07-05 10:35:31 +01:00