Commit Graph

30 Commits

Author SHA1 Message Date
Joe Bryan
671dfa6647 updates terminal read callback to shutdown gracefully on EOF 2019-01-10 02:39:05 -05:00
Jōshin
67c0b7b39b Clean up allocator defs
- Condense the allocator section in defs.h and make it match the
  surrounding style.

- Use real calloc in c3_calloc. Some guy on the internet says
  calloc can be faster than malloc since the OS may not actually
  need to call memset.

- Replace calloc calls in vere code with c3_calloc.

Note that I left the c3_calloc definition as-is (i.e., not taking
a count argument). I was going to change it, but it seems like
count is 1 at all call sites. If it's ever used with count != 1,
I'd be in support of changing it, fwiw.
2019-01-02 11:23:06 -08:00
Joshua Reagan
6b3c9f8dff
fit UTF-8 tape bug
You should be able to do this in dojo:

```
> "Some UTF-8: ἄλφα"
"Some UTF-8: ἄλφα"
```

Now you can.  @joemfb told me where to find the problem.
2018-12-12 18:19:54 -08:00
Joe Bryan
2f24bb1d1b updates terminal to always 32 bytes on read 2018-12-11 18:39:02 -05:00
Joe Bryan
606650ab3f disables unused _term_close_cb() 2018-12-10 12:00:22 -05:00
Joe Bryan
1774725e4c removes i/o polling 2018-11-26 16:29:38 -05:00
Joe Bryan
a348fae401 adds perror() calls for u3_term_io_hija/loja i/o errors 2018-11-06 20:35:13 -05:00
Joe Bryan
bcc1261009 removes first-boot ticket 2018-10-05 20:29:53 -04:00
Joe Bryan
0f80535867 removes orphaned telnet constants and forward declarations 2018-06-11 10:41:48 -04:00
Elliot Glaysher
0f09810dd7 Revert "Merge pull request #952 from eglaysher/revert-meson"
This reverts commit 9978ad8b72, reversing
changes made to a85369fa1f.
2018-03-20 10:16:16 -07:00
Elliot Glaysher
e6f6315691 Revert "Merge pull request #949 from eglaysher/meson-build-clean"
This reverts commit 9f795b535f, reversing
changes made to d5c7b3b932.
2018-03-19 15:13:19 -07:00
Elliot Glaysher
b9432b4d57
Merge pull request #930 from joemfb/sav-mkdirp
recursively mkdir in u3_walk_save
2018-03-19 14:36:57 -07:00
Joseph Bryan
ebbbf6cf0c recursively mkdir in u3_walk_save 2018-03-02 17:39:08 -05:00
mikolajp
94ac10e29e Remove telnet. Remove batz 2018-02-25 14:12:44 +08:00
cgyarvin
285c6d2ad2
Merge pull request #928 from joemfb/ctlc-pro
forwardports #813 (show prompt after ctrl-c)
2018-02-23 10:36:05 -08:00
Joseph Bryan
4db7eb4d60 maintains cursors position on %clr 2018-02-21 23:10:41 -05:00
Joseph Bryan
23d878f0b8 show prompt after ctrl-c 2018-01-15 22:29:36 -05:00
C. Guy Yarvin
057b866b17 Add terminal printers. 2017-11-08 14:37:39 -08:00
Joseph Bryan
2b9f103a0d updates _term_it_show_clear() to use ESC[K instead of ESC[J 2016-10-19 00:00:25 -04:00
Joseph Bryan
99dde17893 removes obsolete history-eating bug-fix from _term_it_show_clear() 2016-10-19 00:00:19 -04:00
Joseph Bryan
166431ed99 adds term support for meta-. and meta-backspace 2016-07-02 22:49:40 -04:00
Dan Haffey
26144fedde Shorter spinner delay after previous spinful event. 2016-02-20 14:35:06 -08:00
C. Guy Yarvin
6a72b535a9 Don't unlock mutex when exiting; it crashes for some reason. 2016-02-19 14:03:32 -05:00
Dan Haffey
5a23bbfda1 No signals on the spinner thread. 2015-12-16 23:40:34 -08:00
Dan Haffey
0ab8ad4ff5 No spinner delay for %ret. 2015-12-13 13:20:56 -08:00
Dan Haffey
2acf161381 Cursor spinner while processing events for more than 500ms. (#599)
The spinner is a simple |/-\ at the current cursor position. For non-terminal
events, the root of the event's wire is also displayed to the right of the
spinner to give some indication of what's causing an unresponsive terminal.

I used the simplest synchronization strategy I could think of: u3_utat.mex_u is
a mutex that serializes access to a terminal's state. The main thread holds it
at all times except when processing events. When a terminal receives a %bee blit
with a non-nul bulb (the event ovum), it releases the mutex to let the spinner
thread do its thing. A %bee with a nul bulb halts the spinner by grabbing the
mutex and refreshing the input line.

Off-thread console writes are directly against the underlying fd to avoid
trashing non-thread-safe libuv state. Given the simple locking pattern, calling
libuv from the spinner thread might be fine, but I didn't feel like auditing
vere to rule out concurrent calls. It worked when I tried it, but... threads.

I didn't look into supporting anything other than the main terminal, so
currently it's the only one that receives %bee blits. In daemon mode, the
spinner is disabled entirely and no additional thread is started.
2015-12-12 20:42:33 -08:00
Dan Haffey
d2391e78f8 Restore terminal line length and cursor position on refresh.
This keeps printfs from blowing away the line state (M-m M-m
won't erase your prompt).
2015-12-07 20:48:39 -08:00
C. Guy Yarvin
69b8603fa2 URL printing; doc and usability fixes. 2015-11-20 18:10:45 -05:00
C. Guy Yarvin
e92012984c Doc fixes and changes to match. 2015-10-09 18:31:07 -07:00
Philip C Monk
9edda1bb73 descriptive names for c files
fixes #294
2015-06-23 21:29:11 -04:00