Commit Graph

10 Commits (3d9906b00fee2f7a8b69d0e6a1683e306e31b4e6)

Author SHA1 Message Date
Curtis McEnroe c58baa84ee
Write terminating null in allocating wcs/mbs conversions
Turns out wcsnrtombs doesn't.
2018-09-02 13:45:00 -04:00
Curtis McEnroe e5663d45df
Add aswprintf
The format string won't get checked but I'm not sure I can reasonably
use the same hack.
2018-09-02 01:03:12 -04:00
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 eac0f83efa
Factor out line editing to edit.c 2018-08-08 16:59:26 -04:00
Curtis McEnroe a6ede6f91f
Factor out allocating conversion between wcs and mbs 2018-08-07 16:24:14 -04:00
Curtis McEnroe fe21b1410f
Convert input to multibyte before handling 2018-08-07 15:46:04 -04:00
Curtis McEnroe 1c2b038396
Fix allocation size in vaswprintf
This is so embarrassing. It only started crashing once it had strings
that were long enough, and then it took me so long to notice this
mistake. I was worried I was still doing va_list wrong somehow.
2018-08-06 22:08:57 -04:00
Curtis McEnroe 3f3fa34d8a
Implement word wrapping 2018-08-06 15:12:13 -04:00
Curtis McEnroe d6fb797b11
Use wchar_t strings for all of UI
vaswprintf is a nightmare.
2018-08-06 14:19:52 -04:00