mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 00:08:30 +00:00
Fix basename() and dirname()
This commit is contained in:
parent
9b11206ae3
commit
04d39d47f1
41 changed files with 489 additions and 207 deletions
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
* This function is similar to getline() except it'll truncate lines
|
||||
* exceeding size. The line ending marker is included and may be removed
|
||||
* using chomp().
|
||||
* using _chomp().
|
||||
*/
|
||||
char *fgets(char *s, int size, FILE *f) {
|
||||
int c;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* @return number of bytes read >0, including delim, excluding NUL,
|
||||
* or -1 w/ errno on EOF or error; see ferror() and feof()
|
||||
* @note this function can't punt EINTR to caller
|
||||
* @see getline(), chomp(), gettok_r()
|
||||
* @see getline(), _chomp(), gettok_r()
|
||||
*/
|
||||
ssize_t getdelim(char **s, size_t *n, int delim, FILE *f) {
|
||||
char *p;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*
|
||||
* This function delegates to getdelim(), which provides further
|
||||
* documentation. Concerning lines, please note the \n or \r\n are
|
||||
* included in results, and can be removed with chomp().
|
||||
* included in results, and can be removed with _chomp().
|
||||
*
|
||||
* @param line is the caller's buffer (in/out) which is extended
|
||||
* automatically. *line may be NULL but only if *n is 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue