libctf: split up ctf-subr.c

This file is a bit of a grab-bag of dict-wide API functions like
ctf_set_open_errno or ctf_errwarning_next and portabilty functions and
wrappers like ctf_mmap or ctf_pread.

Split the latter out, and move other dict-wide functions that got
stuck in ctf-util.c (because it was so hard to tell the two files
apart) into ctf-api.c where they belong.
This commit is contained in:
Nick Alcock
2025-01-13 11:29:26 +00:00
parent ac07bccf05
commit 4a7870a831
5 changed files with 198 additions and 155 deletions

View File

@@ -231,17 +231,6 @@ ctf_str_append_noerr (char *s, const char *append)
return new_s;
}
/* Store the specified error code into errp if it is non-NULL, and then
return NULL for the benefit of the caller. */
void *
ctf_set_open_errno (int *errp, int error)
{
if (errp != NULL)
*errp = error;
return NULL;
}
/* Create a ctf_next_t. */
ctf_next_t *