Commit Graph

123 Commits (4e4eb0de0f50517e3a2892cddcadfbd75da7152f)

Author SHA1 Message Date
Curtis McEnroe 4e4eb0de0f
Add wcsnchr, wcsnrchr, awcsntombs
This eliminates calls to editHead and editTail inside edit.c.

Oh god I'm sorry for following libc naming conventions for this stuff.
2018-08-20 18:43:16 -04:00
Curtis McEnroe afae851319
Set errno in vaswprintf in case vswprintf does not
As is the case on GNU.
2018-08-20 17:28:42 -04:00
Curtis McEnroe 133ff4e651
Avoid unportable iswascii(3) 2018-08-20 17:20:44 -04:00
Curtis McEnroe 431dd32cf1
Fix missing stdint.h include 2018-08-20 16:29:31 -04:00
Curtis McEnroe ab950b3044
Add uninstall target 2018-08-20 16:26:35 -04:00
Curtis McEnroe c0c0ef4644
Add sample sshd_config 2018-08-20 16:22:33 -04:00
Curtis McEnroe 1efb62190a
Add install target 2018-08-20 15:44:57 -04:00
Curtis McEnroe e049d5a2d7
Name project chatte 2018-08-20 15:35:00 -04:00
Curtis McEnroe e3a344854f
Accept unique prefixes of commands 2018-08-18 20:17:08 -04:00
Curtis McEnroe c1e0128803
Fix /query error handling
Evidence this should be factored somehow else so the extra check is
unnecessary.
2018-08-18 20:14:05 -04:00
Curtis McEnroe e29f67dde5
Alias /n to /view n where n is a number 2018-08-18 18:31:51 -04:00
Curtis McEnroe 6ec3c3011e
Do not set log files executable
Oops.
2018-08-18 00:02:38 -04:00
Curtis McEnroe 9469db993c
Add logging
The reason logFmt takes a timestamp as a parameter is to support IRCv3
server-time in the future to accurately log the znc buffer. Hopefully.
2018-08-17 21:50:45 -04:00
Curtis McEnroe 38fc42f03d
Add UI "heat" for status/messages/pings
Bring back the beeps! Allow pings from notices. Also factor out
dequoting of part/quit messages.
2018-08-17 14:00:08 -04:00
Curtis McEnroe a38738c938
Don't treat input as command if word contains extra slash 2018-08-16 22:19:23 -04:00
Curtis McEnroe 7082820299
Detect pings in ACTIONs 2018-08-14 21:26:27 -04:00
Curtis McEnroe 9167a9d92c
Clean up termEvent state machine 2018-08-14 15:34:10 -04:00
Curtis McEnroe 398f752322
Keep hashing '\0' until color is not black
Actually uses the rest of the hash state this way.
2018-08-14 14:04:20 -04:00
Curtis McEnroe ed9961410e
Set title to tag name 2018-08-13 23:09:53 -04:00
Curtis McEnroe 11d445b672
Add termTitle 2018-08-13 22:54:02 -04:00
Curtis McEnroe 1ca6974b64
Don't ping self 2018-08-13 19:54:26 -04:00
Curtis McEnroe e713e6a162
Improve configuration of Makefile 2018-08-13 19:27:22 -04:00
Curtis McEnroe 372b79b59e
Detect pings anywhere in message 2018-08-13 14:37:37 -04:00
Curtis McEnroe 2ae5b6b9ab
Add /query, /part and /close
Closing a channel before parting it is a bit weird, but if I send a PART
on /close, it would get reopened again to show the part message.
2018-08-13 13:49:03 -04:00
Curtis McEnroe 1232ce451d
Factor out input param and add tagFind
So that /view can't just invent tags.
2018-08-12 23:55:12 -04:00
Curtis McEnroe 19464369c3
Fix /open ranges by passing all URLs to open(1)
This is going to be incompatible with xdg-open since it takes only one
URL at a time. Write a wrapper script.
2018-08-12 23:44:58 -04:00
Curtis McEnroe a09df5f697
Avoid setting mark if switching to the same view 2018-08-12 21:38:25 -04:00
Curtis McEnroe 2ec109e246
Disable focus tracking in uiHide
Most significantly so that the sequences don't end up on screen during a
/url.
2018-08-12 20:41:13 -04:00
Curtis McEnroe 0dfeb3df84
Add shift-{left,right} for single-line scrolling 2018-08-11 22:46:28 -04:00
Curtis McEnroe 24ca3aed81
Leave room for topic when creating view 2018-08-11 22:45:53 -04:00
Curtis McEnroe a281f89592
Rework UI code for multi-channel
Tags are now permanently assigned (and I'm betting on never needing more
than 256 of them) and the UI maps tags to a linked list of views for
easy reordering and removal. Currently, views can only be added. Views
don't have a topic window until they need one. All UI code wants to be
functional reactive.

Beeping is temporarily removed until message priorities (status,
message, ping) can be added to the UI. At that point spawning
notify-send should also be possible. Priorities will also help with
unnecessary markers, which will not appear for status messages.

The tab system is now used to send QUIT and NICK messages to all the
relevant tags. Verbose output now goes to its own tag, and sending to
it sends raw IRC.

IRC colors are now listed in chat.h and handler functions for numeric
replies have real names. The color algorithm now uses a real hash
function for hopefully better results. QUIT, PART and KICK messages are
scanned for URLs.
2018-08-11 20:02:03 -04:00
Curtis McEnroe 461bfca378
Add term.c for extra terminal features
Look at the cute little state machine!
2018-08-11 15:49:39 -04:00
Curtis McEnroe fec5e51d78
Fix isSelf user checking
Other users with the same username are not self.

The fun effect of this was that I could tab-complete "june_" but not
"june".
2018-08-11 12:50:56 -04:00
Curtis McEnroe a1bb27ae01
Fix commented out error handling
Oops. Had commented it out so I could attach a debugger without exiting
on EINTR.
2018-08-11 12:47:39 -04:00
Curtis McEnroe 6323ca0209
Fix removing entries during tab complete
Since tabNext starts on match->next, if match gets removed, it should be
set to match->prev so that tabNext will start in the same spot.
2018-08-11 12:46:21 -04:00
Curtis McEnroe 07c750d25c
Become multi-channel
There's a lot of UI missing for it, but it technically works.
2018-08-10 23:31:20 -04:00
Curtis McEnroe e9793b4bce
Move process spawning onto the event loop
Child processes weren't being reaped before, either. I wanted to have a
function called readEmAndReap but the reaping should actually happen in
a signal handler.
2018-08-10 13:36:00 -04:00
Curtis McEnroe b740e937df
Remove unnecessary va_end
va_end must be called before the function returns, but errx is noreturn.
2018-08-10 12:45:37 -04:00
Curtis McEnroe 1a9ae050d6
Rename chan to join
In preparation for multi-channel?
2018-08-10 00:01:35 -04:00
Curtis McEnroe 4e1501df41
Add -u option for setting user 2018-08-09 21:46:22 -04:00
Curtis McEnroe 6dd9eb71e1
Color brackets around nicks
Also switch self-brackets to () since [] can appear in nicks.
2018-08-09 21:37:11 -04:00
Curtis McEnroe c45e192608
Fix 432 handler params 2018-08-09 21:27:48 -04:00
Curtis McEnroe 1d5cafc2eb
Add M-b, M-f, M-DEL, M-d, C-w 2018-08-09 19:15:12 -04:00
Curtis McEnroe d1fea96e86
Add PASS option
WEBIRC is now -W.
2018-08-09 18:26:53 -04:00
Curtis McEnroe dbdf13b51a
Ignore trailing space on slash commands 2018-08-09 17:49:31 -04:00
Curtis McEnroe fc113c8ef9
Replace shift with a great variadic function
I am disappointed in the lack of compiler attributes for type-checking
variadic functions.
2018-08-09 17:37:14 -04:00
Curtis McEnroe 05fe4ece20
Only tabTouch nick if not self 2018-08-09 15:50:30 -04:00
Curtis McEnroe a64f1a4ea2
Add URL detection, listing and opening
Might also add /copy, like /open.
2018-08-09 00:24:49 -04:00
Curtis McEnroe c024147504
Add commands to tab complete 2018-08-08 21:48:30 -04:00
Curtis McEnroe 09fe40abd9
Use blank line as unread marker 2018-08-08 19:52:25 -04:00