Art Cancro [Mon, 29 Jan 2024 03:23:03 +0000 (22:23 -0500)]
Changed the BIGMSGS semantics.
We now identify the memory location of the start of message body
during serialization, so we don't have to measure it twice. Then
we store the body in the BIGMSGS table only if the total message
size would exceed 4000 bytes. This assumes that memory and disk
pages are 4096 bytes, so we want to optimize for a single I/O
operation in most cases.
Art Cancro [Fri, 26 Jan 2024 21:51:39 +0000 (16:51 -0500)]
Assert that eMessageText MUST be serialized last.
Also assert that the calculated length of the serialized message
is actually the final length. Either of these conditions not
being true is worth crashing the server so the developer who broke
it knows immediately.
Art Cancro [Wed, 24 Jan 2024 20:19:57 +0000 (10:19 -1000)]
Began refactoring CALDAV REPORT flow of control.
Removed calendar_functions.c and brought some of its code over
to caldav_reports.c so that we can use the same code path for all
three types of REPORTs.
This is motivated by an idea that perhaps the user interface can
use CalDAV as its REST API instead of inventing something new. If
that doesn't work, we needed to finish CalDAV eventually anyway.
Art Cancro [Mon, 8 Jan 2024 15:19:58 +0000 (10:19 -0500)]
START_CHAT_MODE is renamed to SEND_THEN_RECV
This protocol mode began almost 30 years ago when we handled real time chat by
holding a session open and moving data back and forth until told to stop. We
don't do that anymore, but there are several places where a command requires
sending long data in both directions. SEND_THEN_RECV is a better name for this.
Art Cancro [Fri, 5 Jan 2024 19:52:10 +0000 (14:52 -0500)]
That about wraps it up for serv_calendar.c
Seeing this code has really brought me back to the upstairs room
in my old house where I wrote most of it back in 2002-2003. I can
see the sunlight coming in the windows, the color of the carpet,
the little alcove where the computer was, the cat sleeping on top
of the big CRT monitor.
Hopefully the stuff I need to add to it now will be straightforward
since it looks like I really took my time and commented it heavily.
It looks pretty clean, especially now that I've reformatted it with
the new screen width an C99 comments. It does seem a bit WET though.
Art Cancro [Thu, 4 Jan 2024 22:51:08 +0000 (17:51 -0500)]
dammit, learn to spell
Many years ago, someone inserted an enum called eMesageText into the code
and used it all over the place without correcting the spelling. This
commit finally fixes it.
Art Cancro [Thu, 4 Jan 2024 22:47:35 +0000 (17:47 -0500)]
serv_calendar.c: basically reformatting for modern standards
When I wrote this stuff I had a 109 column screen. Now our standard
is 132 columns. Also we are seeking and destroying any place where
spaces were used as indentation. Our code is indented with tabs, the
way God intended.
Art Cancro [Thu, 4 Jan 2024 22:44:14 +0000 (17:44 -0500)]
serv_calendar.c: basically reformatting for modern standards
When I wrote this stuff I had a 109 column screen. Now our standard
is 132 columns. Also we are seeking and destroying any place where
spaces were used as indentation. Our code is indented with tabs, the
way God intended.
Art Cancro [Wed, 3 Jan 2024 18:41:16 +0000 (13:41 -0500)]
dumploadtest.sh: added an exit 0 to the top of the script.
This is a testing script intended for developers. The last thing
we need is for some dumbass to run it without knowing what it does,
and then come to us complaining that it deleted their database.
Art Cancro [Wed, 3 Jan 2024 18:15:24 +0000 (13:15 -0500)]
Grammar change in the license declaration.
Many of the files say "use, duplication, or disclosure ARE subject
to..." but the common phrasing of this statement is apparently "use,
duplication, or disclosure IS subject to..."
We are already taking great delight in the fact that we are using the
GPL without using Stallman's preferred declaration of it. And of course
we call it open source software.
When Steve Jobs died, Richard Stallman said "I'm not glad he's dead,
but I'm glad he's gone." I agreed with him. When Richard Stallman dies,
I will say "I'm not glad he's dead, but I'm glad he's gone." But
when Bill Gates dies, I will be glad he's dead. I will celebrate.
Art Cancro [Tue, 2 Jan 2024 22:00:38 +0000 (17:00 -0500)]
The sooner we can put webcit-classic out to pasture the better.
Between its origin as a shitty web application that I built when I had
no idea what the hell I was doing, to all of the ways other people fucked
it up later, this thing needs to die. As soon as possible.
Art Cancro [Tue, 2 Jan 2024 21:38:07 +0000 (16:38 -0500)]
Utilities displaying a color banner now use line drawing characters to form a box instead of clearing to the end of the line with the background color. The latter does not have the desired effect on all terminals.
Art Cancro [Wed, 27 Dec 2023 18:53:52 +0000 (13:53 -0500)]
calendar_view.c (from webcit-classic) : clean up
Style and comments cleanup. Some of this code is going to get
copied over to WebCit-NG so we need to bring it up to our current
coding standards (K&R, 1TBF, with C99-style comments)
Art Cancro [Fri, 22 Dec 2023 16:10:14 +0000 (11:10 -0500)]
room_functions.c: get_msglist() now returns Array
Previously it returned a long* which contained a list of longs.
Assembling this required the same allocation logic used in our
array class, so now we're just using the array class.
Art Cancro [Mon, 18 Dec 2023 19:26:30 +0000 (14:26 -0500)]
When forwarding an email, pre-load its attachments.
This completes the effort to server-side-preload the attachments from
the original message. They appear as attachments in the forwarded copy
of the message in the composer, using the same API. A lot of effort
went into making the 'attach' and 'forward attachments' functions DRY
with respect to each other.
Art Cancro [Thu, 14 Dec 2023 16:30:52 +0000 (11:30 -0500)]
upload.c: completed the code to reload attachments.
Now we have an API call to load attachments from existing messages
instead of from the browser. This is the server side API. Still need
to integrate it into the client.
Art Cancro [Wed, 13 Dec 2023 03:15:17 +0000 (22:15 -0500)]
view_mail.js: more improvements to mail forwarding
* "Fwd:" instead of "Re:"
* The "--- forwarded message ---" po string is carried over from webcit-classic
* Make the editor aware that a message is being forwarded
* TODO: load attachments from the message being forwarded
Art Cancro [Wed, 29 Nov 2023 21:32:02 +0000 (11:32 -1000)]
Fixing the parameters sent to the mail composer.
Reply/ReplyAll/Forward need some things that are not strings
and the source arrays seem to still be in scope, so we go with
that. Need to tune this up some more. Some things are still
missing, such as the references and reply msgnum.
Art Cancro [Tue, 21 Nov 2023 00:00:13 +0000 (19:00 -0500)]
upload.js: when removing an attachment, delete the div
This is handled the usual way, when we get a successful response from
the HTTP DELETE method, it triggers the removal of the list element
showing the attachment.
Art Cancro [Mon, 6 Nov 2023 22:57:44 +0000 (17:57 -0500)]
Fixed the MIME boundary after the message text.
It had the trailing dashes in it, so it was getting interpreted as the end of the message.
Now that's corrected and the parsers of the world are happy.
Also, we eliminated the double-nesting thing, and everything is hunky dory now.
Art Cancro [Mon, 6 Nov 2023 21:56:55 +0000 (16:56 -0500)]
webcit-ng: fixed the way HTTP uploads are fed into the MIME Parser.
mime_parser() expects HEADERS+CONTENT but our h.request_body only contains CONTENT.
The fix: our transaction struct now has h.request_body_with_synth_headers that
begins with a synthetic Content-Type: header followed by a blank line and then the
request body. h.request_body is now just a pointer into that buffer, starting at
the position where the actual body begins.
This gives us the ability to supply the body with or without headers, without having
to make two copies of it.