Edits to more closely match standard cgets

This commit is contained in:
Russell-S-Harper
2025-06-20 18:48:51 -04:00
parent 17a8c92ba1
commit 00bb9d5376
2 changed files with 24 additions and 31 deletions

View File

@@ -118,10 +118,11 @@ char *cgets (char *buffer);
** - call cgets
** - buffer[1] will have the number of characters read
** - the actual string starts at buffer + 2
** - trailing CRLF are removed
** - terminating \0 is appended
** - therefore the maximum number of characters which can be read is the size
** of the buffer - 3!
** - note: CR/LF are NOT echoed, typically a following call to cputs or
** cprintf will need "\r\n" prepended - "standard" behavior
**
** param: buffer - where to save the input
** return: buffer + 2 (i.e. start of the string) if successful, NULL otherwise