Commit Graph

155 Commits

Author SHA1 Message Date
Fish (David B. Trout)
d094e4f3c6 Carry over into SDL Hyperion some recent Aethra fixes:
. Fix compiler warnings on macOS.
. Fix compiler warnings on GCC 12.

. Use performance cores on Apple Silicon. (Enrico Sorichetti)

. Save maxprio/minprio in sysblk so impl() doesn't clobber them. (Tyler Mitchell)
. Handle non-GNU Linuxes properly. (Tyler Mitchell)
. getprotobyname: some Linuxes want "tcp" not "TCP". (Tyler Mitchell)
. Fix for occasional crash on exit. (Tyler Mitchell):

  In POSIX, detach_thread() is neither needed nor valid
  after a return from join_thread(). When the latter returns,
  the thread has exited and its resources are released,
  so detach_thread() not only is not needed, but references
  deallocated resources. This can be harmless, but not always.
2024-01-24 13:17:39 -08:00
Soldier of FORTRAN
ebd74c0411 Adding JSON APIs to the HTTP server (#578)
* adding json_header function declaration

* adding javascript mimetype and json_header function

* adding multiple JSON APIs to the hercules web server to enable easier user interaction and to provide a better user web based interface

* updating comments to match current formatting

* replace tab indentation with spaces
2023-06-28 00:44:56 -07:00
Rhialto The M
8175ad07bc Fix UB when calling ctype functions. (#570)
Compiling Hercules with gcc 10 produces many warnings like this one:
```
  CC       hao.lo
In file included from /usr/include/ctype.h:97,
                 from hstdinc.h:117,
                 from hao.c:17:
hao.c: In function 'hao_message':
hao.c:812:37: warning: array subscript has type 'char' [-Wchar-subscripts]
  812 |                         if (isdigit(p[2]))
      |                             ^
```
Gcc should really present these as compile time errors, since each and every
one represents a potential case of Undefined Behaviour.
I changed (almost) all of these calls, except a few where the parameter was an
int that just came from a getc()-type function.
2023-06-12 11:43:50 -07:00
Fish (David B. Trout)
cc72ae5ab3 SECURITY: add cautions to HTTP Server doc, don't log passwords 2023-06-10 17:55:02 -07:00
Fish (David B. Trout)
45647959f6 Cleanup http_command 2023-06-10 17:51:52 -07:00
Fish (David B. Trout)
1e3e84b488 Fix http server "function may return local variable" warning 2021-11-08 18:58:10 -08:00
Fish (David B. Trout)
cba56356fc Fix most Mac print format warnings regarding thread id 2019-04-09 23:24:32 -07:00
Fish (David B. Trout)
7276a40e60 Revert "Fix day-one bug in http server:"
This reverts commit 6eb72c94ef.
2018-09-23 13:11:18 -07:00
Fish (David B. Trout)
6eb72c94ef Fix day-one bug in http server:
I can find no rhyme or reason why '+' signs should be translated into ' ' blanks!  This bug has been in httpserv.c ever since Jan first created httpserv.c back in 2002!
2018-09-21 14:06:18 -07:00
Fish (David B. Trout)
6c3d42e269 Thread name constants 2018-07-24 05:56:40 -07:00
Fish (David B. Trout)
3d02efac2b simplify get/set_thread_priority macro use 2018-07-08 12:46:27 -07:00
Fish (David B. Trout)
fcf32e9b17 Fix crash in 'start_cmd_cpu' when "runtest start" syntax used. 2018-04-01 20:52:20 -07:00
Fish (David B. Trout)
4f1b20b622 Make DYNAMIC_LOAD, BUILD_SHARED, EXTERNALGUI permanent. 2018-03-08 13:27:42 -08:00
Fish (David B. Trout)
4c6bb26105 HDL cleanup part 1:
typedefs, variable and function renames, struct cleanup, header reorganization, function rewrites, etc.
2018-03-08 13:27:38 -08:00
Fish (David B. Trout)
2c44efc3b1 Add "Q Public License" banner to files that are missing it 2018-03-08 13:27:34 -08:00
Fish (David B. Trout)
4e53af01b6 Begin HDL cleanup 2018-03-08 13:27:32 -08:00
Fish (David B. Trout)
9a915d0ddc (cosmetic) 2018-03-08 13:25:59 -08:00
Fish (David B. Trout)
d816e9e33a Make OPTION_HTTP_SERVER permanent 2018-03-08 13:25:57 -08:00
Fish (David B. Trout)
26d69416e7 Uppercase HHC02203 and HHC02204 command settings/results 2017-05-27 03:33:40 -07:00
Fish (David B. Trout)
75384f8cfc (cosmetic) 2017-05-27 03:33:40 -07:00
Fish (David B. Trout)
6b5e721065 strlcpy/strlcat ==> STRLCPY/STRLCAT 2017-05-14 23:52:31 -07:00
Gert Caers
93c9f367ce Fix webserver scrambling of command input 2015-03-24 14:12:14 -07:00
Fish (David B. Trout)
0316c4f294 More set thread priority tweaking:
1. Move SETMODE calls into hthreads functions.
2. Issue message that identifies source statement that failed.
2014-01-13 02:01:39 -08:00
Fish (David B. Trout)
a7c8ce6ce8 correct set priority handling 2014-01-03 13:54:14 -08:00
Roger Bowler
04fc103aa8 Reinstate copyright attributions 2013-09-07 12:09:02 +02:00
Fish (David B. Trout)
53a22fc429 (silence gcc cast warning) 2013-05-26 10:12:39 -07:00
Fish (David B. Trout)
01bcccca8f Correct the signatures of created thread functions 2013-05-26 09:19:08 -07:00
Jan Jaeger
439bdbca92 Remove subversion $Id$ tag
Update copyright statement to 2012
2012-03-24 18:41:51 +11:00
Jan Jaeger
85beb7e9dc QDIO Thin Interrupts
git-svn-id: file:///home/jj/hercules.svn/trunk@7726 956126f8-22a0-4046-8f4a-272fa8102e63
2011-08-28 11:41:48 +00:00
Paul Gorlinsky
31c9a99803 Remove LOGMSG macro. Change LOGMSG to logmsg. Rename log_msg() to logmsg().
git-svn-id: file:///home/jj/hercules.svn/trunk@7688 956126f8-22a0-4046-8f4a-272fa8102e63
2011-08-12 23:28:17 +00:00
Paul Gorlinsky
2c2eaf37dc Restore code regressed by latest changes.
git-svn-id: file:///home/jj/hercules.svn/trunk@7678 956126f8-22a0-4046-8f4a-272fa8102e63
2011-08-09 02:00:07 +00:00
Jan Jaeger
032e72e79b Revert to lowercase logmsg()
git-svn-id: file:///home/jj/hercules.svn/trunk@7669 956126f8-22a0-4046-8f4a-272fa8102e63
2011-08-07 00:09:14 +00:00
Paul Gorlinsky
47f306d108 Revert bzero(d,s) to memset(d,0,s).
git-svn-id: file:///home/jj/hercules.svn/trunk@7604 956126f8-22a0-4046-8f4a-272fa8102e63
2011-07-22 19:23:35 +00:00
Paul Gorlinsky
1a68ab747f Revert bzero(d,s) to memset(d,0,s).
git-svn-id: file:///home/jj/hercules.svn/trunk@7603 956126f8-22a0-4046-8f4a-272fa8102e63
2011-07-22 17:17:13 +00:00
Paul Gorlinsky
9083dcf949 Add inline bzero function. Change memset(x, 0, l) to bzero(x, l)
git-svn-id: file:///home/jj/hercules.svn/trunk@7601 956126f8-22a0-4046-8f4a-272fa8102e63
2011-07-20 01:49:14 +00:00
Paul Gorlinsky
03a4560910 Update Copyright notices to 2011.
git-svn-id: file:///home/jj/hercules.svn/trunk@7593 956126f8-22a0-4046-8f4a-272fa8102e63
2011-07-18 22:19:10 +00:00
Fish (David B Trout)
4c60697db2 Fix file opens to open files in non-multi-write-shared mode
(Windows-only for now; non-Windows yet to be implemented)

git-svn-id: file:///home/jj/hercules.svn/trunk@7431 956126f8-22a0-4046-8f4a-272fa8102e63
2011-04-21 02:17:35 +00:00
Paul Gorlinsky
9081b644c7 Function logmsg() renamed to log_msg(). LOGMSG define added. All logmsg calls changed to LOGMSG.
git-svn-id: file:///home/jj/hercules.svn/trunk@7333 956126f8-22a0-4046-8f4a-272fa8102e63
2011-02-23 03:48:52 +00:00
Jan Jaeger
708779a9cb Various build fixes
git-svn-id: file:///home/jj/hercules.svn/trunk@7138 956126f8-22a0-4046-8f4a-272fa8102e63
2010-11-27 09:46:38 +00:00
Paul Gorlinsky
bda9b07f50 race condition with http_root
git-svn-id: file:///home/jj/hercules.svn/trunk@7057 956126f8-22a0-4046-8f4a-272fa8102e63
2010-11-06 01:19:11 +00:00
Paul Gorlinsky
0699879fea race condition with http_root
git-svn-id: file:///home/jj/hercules.svn/trunk@7050 956126f8-22a0-4046-8f4a-272fa8102e63
2010-11-05 03:34:13 +00:00
Paul Gorlinsky
b1e38feb12 Porting warnings... mainsize allocation enhancements K,G,M,T designation. S370 minimum is 64K, non-S370 minimum is 1M
git-svn-id: file:///home/jj/hercules.svn/trunk@7021 956126f8-22a0-4046-8f4a-272fa8102e63
2010-11-01 01:57:10 +00:00
Paul Gorlinsky
103837eb0c Message cleanup
git-svn-id: file:///home/jj/hercules.svn/trunk@6978 956126f8-22a0-4046-8f4a-272fa8102e63
2010-10-26 04:44:08 +00:00
Paul Gorlinsky
332f1cc653 Message cleanup
git-svn-id: file:///home/jj/hercules.svn/trunk@6973 956126f8-22a0-4046-8f4a-272fa8102e63
2010-10-25 21:49:42 +00:00
Paul Gorlinsky
8171d54d2c Dont remove from hdl_rmsc when shutting down.
git-svn-id: file:///home/jj/hercules.svn/trunk@6940 956126f8-22a0-4046-8f4a-272fa8102e63
2010-10-19 00:18:29 +00:00
Jan Jaeger
59c6347ba7 remove strtok_r related warning messages
git-svn-id: file:///home/jj/hercules.svn/trunk@6911 956126f8-22a0-4046-8f4a-272fa8102e63
2010-10-15 19:28:23 +00:00
Paul Gorlinsky
32b0e2189b Porting correction for initializing http_serv struct.
git-svn-id: file:///home/jj/hercules.svn/trunk@6908 956126f8-22a0-4046-8f4a-272fa8102e63
2010-10-15 17:08:30 +00:00
Paul Gorlinsky
3a4667d7a0 Cleanup Unix porting issues
git-svn-id: file:///home/jj/hercules.svn/trunk@6907 956126f8-22a0-4046-8f4a-272fa8102e63
2010-10-15 16:46:32 +00:00
Paul Gorlinsky
55e4b60037 snprintf buffer overflow checks. qports http port display restored. SRVPRIO for server thread priority.
git-svn-id: file:///home/jj/hercules.svn/trunk@6889 956126f8-22a0-4046-8f4a-272fa8102e63
2010-10-14 01:37:56 +00:00
Paul Gorlinsky
b9ebc28e1e Server Message Cleanup
git-svn-id: file:///home/jj/hercules.svn/trunk@6867 956126f8-22a0-4046-8f4a-272fa8102e63
2010-10-12 03:33:39 +00:00