public inbox for ell@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v6 0/8] Line Editor
@ 2025-04-06 22:12 Grant Erickson
  2025-04-06 22:12 ` [PATCH v6 1/8] edit: Initial revision Grant Erickson
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Grant Erickson @ 2025-04-06 22:12 UTC (permalink / raw)
  To: ell

This expands on Marcel Holtman's 2023-12-22 RFCv4 patch for a line
editor.

  * pass the l_edit instance to the display and debug handlers.
    
    l_edit integrations are made easier when they have access to the
    instance pointer in their callbacks.

  * Return status is 'int' rather than 'bool' with 0 as success and <
    0 as failure where the failures are negated POSIX error
    numbers. This removes the need for system integrators to intuit
    their own errors on a previously-false Boolean return status.

  * improve error handling of 'mbstowcs' and 'wcstombs' functions.
    
    On error, the 'mbstowcs' and 'wcstombs' functions could return
    'SIZE_MAX' when uncountering unconvertable character sequences.
    
    Ensure that such errors are not obscured and are passed along to the
    caller.

This has proven to work well with the RFCv4 and the corresponding
demo-{cli,edit} applications.

Grant Erickson (8):
  edit: Initial revision.
  ell: Add include directive for 'ell/edit.h'.
  ell/Makefile: Added 'edit.[ch]' to HEADERS and SOURCES.
  edit: Added 'l_edit_*' symbols.
  edit: pass the l_edit instance to the display and debug handlers.
  edit: change return signatures from 'bool' to 'int'
  edit: change the 'l_edit_enter' return signature from 'char *' to
    'int'
  edit: improve error handling of 'mbstowcs' and 'wcstombs' functions.

 Makefile.am |   2 +
 ell/edit.c  | 826 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 ell/edit.h  |  59 ++++
 ell/ell.h   |   1 +
 ell/ell.sym |  25 ++
 5 files changed, 913 insertions(+)
 create mode 100644 ell/edit.c
 create mode 100644 ell/edit.h

-- 
2.45.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-04-06 22:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-06 22:12 [PATCH v6 0/8] Line Editor Grant Erickson
2025-04-06 22:12 ` [PATCH v6 1/8] edit: Initial revision Grant Erickson
2025-04-06 22:12 ` [PATCH v6 2/8] ell: Add include directive for 'ell/edit.h' Grant Erickson
2025-04-06 22:12 ` [PATCH v6 3/8] ell/Makefile: Added 'edit.[ch]' to HEADERS and SOURCES Grant Erickson
2025-04-06 22:12 ` [PATCH v6 4/8] edit: Added 'l_edit_*' symbols Grant Erickson
2025-04-06 22:12 ` [PATCH v6 5/8] edit: pass the l_edit instance to the display and debug handlers Grant Erickson
2025-04-06 22:12 ` [PATCH v6 6/8] edit: change return signatures from 'bool' to 'int' Grant Erickson
2025-04-06 22:12 ` [PATCH v6 7/8] edit: change the 'l_edit_enter' return signature from 'char *' " Grant Erickson
2025-04-06 22:12 ` [PATCH v6 8/8] edit: improve error handling of 'mbstowcs' and 'wcstombs' functions Grant Erickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox