Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
N
 nacore_asprintf
 nacore_astrcpy
 nacore_avl_tree
 nacore_avl_tree_begin_op
 nacore_avl_tree_dump
 nacore_avl_tree_dup
 nacore_avl_tree_elem
 nacore_avl_tree_elem_get_next
 nacore_avl_tree_elem_get_prev
 nacore_avl_tree_elem_get_value
 nacore_avl_tree_elem_set_value
 nacore_avl_tree_end_op
 nacore_avl_tree_find
 nacore_avl_tree_find_first
 nacore_avl_tree_find_last
 nacore_avl_tree_find_next
 nacore_avl_tree_find_prev
 nacore_avl_tree_free
 nacore_avl_tree_get_first
 nacore_avl_tree_get_last
 nacore_avl_tree_get_n_elems
 nacore_avl_tree_insert
 nacore_avl_tree_merge
 nacore_avl_tree_new
 nacore_avl_tree_pop
 NACORE_BEGIN_C_DECLS
 nacore_char_utf16le_decode
 nacore_char_utf16le_encode
 nacore_char_utf8_decode
 nacore_char_utf8_encode
 nacore_cmp_cb
 nacore_dl_close
 nacore_dl_handle
 nacore_dl_open
 nacore_dl_sym
 NACORE_END_C_DECLS
 nacore_env_free
 nacore_env_get
 nacore_env_path_prefixes_split
 NACORE_EUNKNOWN
 NACORE_EXPORT
 nacore_filter_cb
 NACORE_FORMAT_PRINTF(string_index,first_to_check)
 NACORE_FORMAT_VPRINTF(string_index)
 nacore_fs_dir
 nacore_fs_dir_close
 nacore_fs_dir_entry
 nacore_fs_dir_entry_free
 nacore_fs_dir_entry_get_name
 nacore_fs_dir_get_next_entry
 nacore_fs_dir_open
 nacore_fs_dir_sep
 nacore_get_size_cb
 NACORE_IMPORT
 NACORE_LIBC_SIZE_FORMAT_LM
 NACORE_LIBC_SIZE_FORMAT_TYPE
 nacore_list
 nacore_list_append
 nacore_list_begin_op
 nacore_list_dump
 nacore_list_dup
 nacore_list_elem
 nacore_list_elem_get_next
 nacore_list_elem_get_prev
 nacore_list_elem_get_value
 nacore_list_elem_set_value
 nacore_list_end_op
 nacore_list_find_after
 nacore_list_find_before
 nacore_list_find_first
 nacore_list_find_last
 nacore_list_free
 nacore_list_get_head
 nacore_list_get_n_elems
 nacore_list_get_tail
 nacore_list_insert_after
 nacore_list_insert_before
 nacore_list_merge
 nacore_list_move_after
 nacore_list_move_before
 nacore_list_new
 nacore_list_pop
 nacore_list_prepend
 nacore_msg_box_free
 nacore_msg_box_new
 nacore_msg_box_set_callbacks
 nacore_msg_context
 nacore_msg_context_get_opaque
 nacore_msg_context_get_parent
 nacore_msg_result
 nacore_msg_result_err
 nacore_msg_result_ok
 nacore_msg_result_warn
 nacore_msg_severity
 nacore_msg_severity_err
 nacore_msg_severity_info
 nacore_msg_severity_warn
 nacore_msg_status_begin
 nacore_msg_status_begin_cb
 nacore_msg_status_end
 nacore_msg_status_end_cb
 nacore_msg_text
 nacore_msg_text_cb
 nacore_mutex
 nacore_mutex_free
 nacore_mutex_lock
 nacore_mutex_new
 nacore_mutex_trylock
 nacore_mutex_unlock
 nacore_op_cb
 nacore_op_with_msg_cb
 NACORE_PRIVATE
 nacore_ptr_cmp
 NACORE_PUBLIC
 nacore_strgraphemes
 nacore_string_get_size
 nacore_string_split
 nacore_string_utf16le_to_utf8
 nacore_string_utf8_to_utf16le
 nacore_strngraphemes
 nacore_strnlen
 nacore_to_string_cb
 nacore_vasprintf
 NASPRO core
_NACORE_DEF NACORE_FORMAT_PRINTF(
   2,
   3
) int nacore_asprintf(char **strp, const char *fmt, ...)
Analog of sprintf() that allocates a string large enough to hold the output including the terminating null character.
_NACORE_DEF char * nacore_astrcpy(const char *s,
void *unused)
Analog of strcpy() that allocates a string large enough to hold the output including the terminating null character.
typedef struct _nacore_avl_tree * nacore_avl_tree
AVL tree.
_NACORE_DEF int nacore_avl_tree_begin_op(nacore_avl_tree tree)
Starts a section of code in which the tree is guaranteed not to be modified by other threads.
_NACORE_DEF void nacore_avl_tree_dump(nacore_avl_tree tree,
nacore_to_string_cb to_string_cb,
void *to_string_opaque)
Dumps the structure and content of a tree on stderr.
_NACORE_DEF nacore_avl_tree nacore_avl_tree_dup(nacore_avl_tree tree,
void *cmp_opaque,
nacore_get_size_cb gs_cb,
void *gs_opaque,
nacore_filter_cb filter_cb,
void *filter_opaque,
nacore_op_cb dup_cb,
void *dup_opaque)
Duplicates a tree.
typedef struct _nacore_avl_tree_elem * nacore_avl_tree_elem
AVL tree element.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_elem_get_next(
   nacore_avl_tree tree,
   nacore_avl_tree_elem elem
)
Gets the next element on the right with regard to the given element in a tree.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_elem_get_prev(
   nacore_avl_tree tree,
   nacore_avl_tree_elem elem
)
Gets the next element on the left with regard to the given element in a tree.
_NACORE_DEF void * nacore_avl_tree_elem_get_value(nacore_avl_tree tree,
nacore_avl_tree_elem elem)
Gets the value contained in a tree element.
_NACORE_DEF int nacore_avl_tree_elem_set_value(nacore_avl_tree tree,
nacore_avl_tree_elem elem,
nacore_op_cb free_cb,
void *free_opaque,
void *cmp_opaque,
void *gs_opaque,
void *value)
Sets the value contained in a tree element and rearranges the tree to keep the sorting if needed.
_NACORE_DEF void nacore_avl_tree_end_op(nacore_avl_tree tree)
Ends a section of code in which the tree is guaranteed not to be modified by other threads.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_find(
   nacore_avl_tree tree,
   void *cmp_opaque,
   nacore_filter_cb filter_cb,
   void *filter_opaque,
   void *value
)
Finds a matching element inside a tree by comparing values.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_find_first(
   nacore_avl_tree tree,
   void *cmp_opaque,
   nacore_filter_cb filter_cb,
   void *filter_opaque,
   void *value
)
Finds the leftmost matching element inside a tree by comparing values.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_find_last(
   nacore_avl_tree tree,
   void *cmp_opaque,
   nacore_filter_cb filter_cb,
   void *filter_opaque,
   void *value
)
Finds the rightmost matching element inside a tree by comparing values.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_find_next(
   nacore_avl_tree tree,
   nacore_avl_tree_elem elem,
   void *cmp_opaque,
   nacore_filter_cb filter_cb,
   void *filter_opaque
)
Finds the next element on the right in a tree holding a value that compares identical to that of the given element.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_find_prev(
   nacore_avl_tree tree,
   nacore_avl_tree_elem elem,
   void *cmp_opaque,
   nacore_filter_cb filter_cb,
   void *filter_opaque
)
Finds the next element on the left in a tree holding a value that compares identical to that of the given element.
_NACORE_DEF void nacore_avl_tree_free(nacore_avl_tree tree,
nacore_op_cb free_cb,
void *free_opaque)
Destroies a tree and all its elements.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_get_first(nacore_avl_tree tree)
Gets the leftmost (i.e., the first/smallest by value) element in a tree.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_get_last(nacore_avl_tree tree)
Gets the rightmost (i.e., the last/biggest by value) element in a tree.
_NACORE_DEF size_t nacore_avl_tree_get_n_elems(nacore_avl_tree tree)
Gets the number of elements in a tree.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_insert(nacore_avl_tree tree,
void *cmp_opaque,
void *gs_opaque,
void *value)
Inserts a new element into a tree.
_NACORE_DEF nacore_avl_tree nacore_avl_tree_merge(nacore_avl_tree dest,
nacore_avl_tree src,
void *cmp_opaque)
Merges two trees by inserting the elements of one tree into the other.
_NACORE_DEF nacore_avl_tree nacore_avl_tree_new(nacore_cmp_cb cmp_cb,
nacore_get_size_cb gs_cb)
Creates a new tree.
_NACORE_DEF void * nacore_avl_tree_pop(nacore_avl_tree tree,
nacore_avl_tree_elem elem)
Removes an element from a tree and returns the value it contains.
Delimits the beginning of public declarations.
_NACORE_DEF size_t nacore_char_utf16le_decode(const char *utf16lec,
uint32_t *cp)
Decodes the Unicode code point associated to an UTF-16LE character.
_NACORE_DEF size_t nacore_char_utf16le_encode(char *utf16lec,
uint32_t cp)
Encodes a Unicode code point into an UTF-16LE character.
_NACORE_DEF size_t nacore_char_utf8_decode(const char *utf8c,
uint32_t *cp)
Decodes the Unicode code point associated to an UTF-8 character.
_NACORE_DEF size_t nacore_char_utf8_encode(char *utf8c,
uint32_t cp)
Encodes a Unicode code point into an UTF-8 character.
typedef int (*nacore_cmp_cb)(const void *v1, const void *v2, void *opaque)
A function that compares two values.
_NACORE_DEF int nacore_dl_close(nacore_dl_handle handle,
nacore_msg_context msg_context,
void *msg_opaque)
Decrements the reference count on the dynamically loaded library handle.
typedef struct _nacore_dl_handle * nacore_dl_handle
Dynamically loaded library handle.
_NACORE_DEF nacore_dl_handle nacore_dl_open(const char *filename,
nacore_msg_context msg_context,
void *msg_opaque)
Loads a dynamic library.
_NACORE_DEF void * nacore_dl_sym(nacore_dl_handle handle,
const char *symbol,
nacore_msg_context msg_context,
void *msg_opaque)
Retrieves the memory address where a symbol from a dynamically loaded library is loaded into memory.
Delimits the end of public declarations.
_NACORE_DEF void nacore_env_free(const char *value)
Dismisses a value returned by nacore_env_get().
_NACORE_DEF const char * nacore_env_get(const char *name)
Gets the value of an environment variable.
_NACORE_DEF nacore_list nacore_env_path_prefixes_split(const char *path)
Splits a string representing a list of path prefixes similarily to nacore_string_split().
Error code for unknown errors.
Specifies that a symbol is to be exported.
typedef char (*nacore_filter_cb)(const void *value, void *opaque)
A function that decides whether a certain value should be filtered out or not.
Specifies that a function takes printf()-style arguments.
Specifies that a function takes vprintf()-style arguments.
typedef struct _nacore_fs_dir * nacore_fs_dir
Directory stream.
_NACORE_DEF int nacore_fs_dir_close(nacore_fs_dir dir)
Closes a directory stream.
typedef struct _nacore_fs_dir_entry * nacore_fs_dir_entry
Directory entry.
_NACORE_DEF void nacore_fs_dir_entry_free(nacore_fs_dir_entry entry)
Dismisses a directory entry returned by nacore_fs_dir_get_next_entry().
_NACORE_DEF const char * nacore_fs_dir_entry_get_name(nacore_fs_dir_entry entry)
Gets the filename of the directory entry.
_NACORE_DEF nacore_fs_dir_entry nacore_fs_dir_get_next_entry(nacore_fs_dir dir)
Gets the next entry in the given directory stream.
_NACORE_DEF nacore_fs_dir nacore_fs_dir_open(const char *name)
Opens a directory stream.
_NACORE_DEF const char * const nacore_fs_dir_sep
Platform-specific directory separator.
typedef size_t (*nacore_get_size_cb)(const void *value, void *opaque)
A function that returns the size of some value.
Specifies that a symbol is imported from a library.
Length modifier for size_t to be used with printf()-like functions of the platform’s standard C library.
Type from/to which size_t values can be safely casted.
typedef struct _nacore_list * nacore_list
Doubly-linked list.
_NACORE_DEF nacore_list_elem nacore_list_append(nacore_list list,
void *gs_opaque,
void *value)
Appends a new element to a list.
_NACORE_DEF int nacore_list_begin_op(nacore_list list)
Starts a section of code in which the list is guaranteed not to be modified by other threads.
_NACORE_DEF void nacore_list_dump(nacore_list list,
nacore_to_string_cb to_string_cb,
void *to_string_opaque)
Dumps the structure and content of a list on stderr.
_NACORE_DEF nacore_list nacore_list_dup(nacore_list list,
nacore_get_size_cb gs_cb,
void *gs_opaque,
nacore_filter_cb filter_cb,
void *filter_opaque,
nacore_op_cb dup_cb,
void *dup_opaque)
Duplicates a list.
typedef struct _nacore_list_elem * nacore_list_elem
Doubly-linked list element.
_NACORE_DEF nacore_list_elem nacore_list_elem_get_next(nacore_list list,
nacore_list_elem elem)
Gets the following element with regard to the given element in a list.
_NACORE_DEF nacore_list_elem nacore_list_elem_get_prev(nacore_list list,
nacore_list_elem elem)
Gets the previous element with regard to the given element in a list.
_NACORE_DEF void * nacore_list_elem_get_value(nacore_list list,
nacore_list_elem elem)
Gets the value contained in a list element.
_NACORE_DEF int nacore_list_elem_set_value(nacore_list list,
nacore_list_elem elem,
nacore_op_cb free_cb,
void *free_opaque,
void *gs_opaque,
void *value)
Sets the value contained in a list element.
_NACORE_DEF void nacore_list_end_op(nacore_list list)
Ends a section of code in which the list is guaranteed not to be modified by other threads.
_NACORE_DEF nacore_list_elem nacore_list_find_after(nacore_list list,
nacore_list_elem elem,
nacore_cmp_cb cmp_cb,
void *cmp_opaque,
nacore_filter_cb filter_cb,
void *filter_opaque,
void *value)
Finds the first matching element inside a list going forwards after another given element.
_NACORE_DEF nacore_list_elem nacore_list_find_before(
   nacore_list list,
   nacore_list_elem elem,
   nacore_cmp_cb cmp_cb,
   void *cmp_opaque,
   nacore_filter_cb filter_cb,
   void *filter_opaque,
   void *value
)
Finds the first matching element inside a list going backwards before another given element.
_NACORE_DEF nacore_list_elem nacore_list_find_first(nacore_list list,
nacore_cmp_cb cmp_cb,
void *cmp_opaque,
nacore_filter_cb filter_cb,
void *filter_opaque,
void *value)
Finds the first matching element inside a list.
_NACORE_DEF nacore_list_elem nacore_list_find_last(nacore_list list,
nacore_cmp_cb cmp_cb,
void *cmp_opaque,
nacore_filter_cb filter_cb,
void *filter_opaque,
void *value)
Finds the last matching element inside a list.
_NACORE_DEF void nacore_list_free(nacore_list list,
nacore_op_cb free_cb,
void *free_opaque)
Destroies a list and all its elements.
_NACORE_DEF nacore_list_elem nacore_list_get_head(nacore_list list)
Returns the head (first element) of a list.
_NACORE_DEF size_t nacore_list_get_n_elems(nacore_list list)
Gets the number of elements in a list.
_NACORE_DEF nacore_list_elem nacore_list_get_tail(nacore_list list)
Returns the tail (last element) of a list.
_NACORE_DEF nacore_list_elem nacore_list_insert_after(nacore_list list,
nacore_list_elem elem,
void *gs_opaque,
void *value)
Inserts a new element after another given element in a list.
_NACORE_DEF nacore_list_elem nacore_list_insert_before(nacore_list list,
nacore_list_elem elem,
void *gs_opaque,
void *value)
Inserts a new element before another given element in a list.
_NACORE_DEF nacore_list nacore_list_merge(nacore_list dest,
nacore_list src)
Merges two lists by appending the elements of src to dest.
_NACORE_DEF void nacore_list_move_after(nacore_list list,
nacore_list_elem dest,
nacore_list_elem src)
Moves an element after another element in a list.
_NACORE_DEF void nacore_list_move_before(nacore_list list,
nacore_list_elem dest,
nacore_list_elem src)
Moves an element before another element in a list.
_NACORE_DEF nacore_list nacore_list_new(nacore_get_size_cb gs_cb)
Creates a new list.
_NACORE_DEF void * nacore_list_pop(nacore_list list,
nacore_list_elem elem)
Removes an element from a list and returns the value it contains.
_NACORE_DEF nacore_list_elem nacore_list_prepend(nacore_list list,
void *gs_opaque,
void *value)
Prepends a new element to a list.
_NACORE_DEF void nacore_msg_box_free(nacore_msg_context msg_box)
Destroies a message box.
_NACORE_DEF nacore_msg_context nacore_msg_box_new(void *opaque)
Creates a new message box.
_NACORE_DEF void nacore_msg_box_set_callbacks(
   nacore_msg_context msg_box,
   nacore_msg_status_begin_cb status_begin_cb,
   nacore_msg_status_end_cb status_end_cb,
   nacore_msg_text_cb text_cb
)
Associates callbacks to a message box.
typedef struct _nacore_msg_context * nacore_msg_context
Message context (message box or status message).
_NACORE_DEF void * nacore_msg_context_get_opaque(nacore_msg_context context)
Gets the opaque data associated to a given message context.
_NACORE_DEF nacore_msg_context nacore_msg_context_get_parent(
   nacore_msg_context context
)
Gets the parent message context of a given message context.
Result of an operation described by a status message.
Error.
Everything fine.
Warning.
Severity of a text message.
Error message, impossible to get past this point with the operation.
Information message, nothing to worry about.
Warning message, something weird happened, could be a problem.
_NACORE_DEF NACORE_FORMAT_PRINTF(
   3,
   4
) nacore_msg_context nacore_msg_status_begin(nacore_msg_context context, void *opaque, const char *fmt, ...)
Creates a new status message, possibly notifying it to the status message begin callback.
typedef void (
   *nacore_msg_status_begin_cb
)(nacore_msg_context status_msg, const char *text, void *opaque)
Status message begin callback.
_NACORE_DEF void nacore_msg_status_end(nacore_msg_context status_msg,
nacore_msg_result result)
Possibly reports the result of the operation described by a status message to the status message end callback and destroies such status message.
typedef void (
   *nacore_msg_status_end_cb
)(nacore_msg_context status_msg, nacore_msg_result result, void *opaque)
Status message end callback.
_NACORE_DEF NACORE_FORMAT_PRINTF(
   4,
   5
) void nacore_msg_text(nacore_msg_context context, nacore_msg_severity severity, void *opaque, const char *fmt, ...)
Possibly reports a new text message to the text message callback.
typedef void (
   *nacore_msg_text_cb
)(nacore_msg_context context, nacore_msg_severity severity, const char *text, void *opaque)
Text message callback.
typedef struct _nacore_mutex *nacore_mutex
Mutex.
_NACORE_DEF void nacore_mutex_free(nacore_mutex mutex)
Destroies a mutex.
_NACORE_DEF int nacore_mutex_lock(nacore_mutex mutex)
Acquires the lock on a mutex.
_NACORE_DEF nacore_mutex nacore_mutex_new()
Creates a new mutex.
_NACORE_DEF int nacore_mutex_trylock(nacore_mutex mutex)
Attempts to acquire the lock on a recursive mutex.
_NACORE_DEF void nacore_mutex_unlock(nacore_mutex mutex)
Releases the lock on a recursive mutex.
typedef void (*nacore_op_cb)(void *value, void *opaque)
A function that performs some operation on a value.
typedef void (
   *nacore_op_with_msg_cb
)(void *value, nacore_msg_context msg_context, void *msg_opaque, void *opaque)
Like nacore_op_cb but also passes message reporting-related data.
Specifies that a symbol has hidden visibility.
_NACORE_DEF int nacore_ptr_cmp(const void *v1,
const void *v2,
void *opaque)
Pointer comparison function.
Specifies that a symbol is publicly visible.
_NACORE_DEF size_t nacore_strgraphemes(const char *s)
Calculates the number of graphemes in a string.
_NACORE_DEF size_t nacore_string_get_size(const char *s,
void *unused)
Returns the number of bytes making up a string including the terminating null character.
_NACORE_DEF nacore_list nacore_string_split(const char *s,
const char *sep,
nacore_filter_cb filter_cb,
void *filter_opaque)
Creates an auto-allocating list of strings by splitting the given string on boundaries formed by the given separator string.
_NACORE_DEF char * nacore_string_utf16le_to_utf8(const char *str_utf16le)
Converts a UTF-16LE encoded string to UTF-8.
_NACORE_DEF char * nacore_string_utf8_to_utf16le(const char *str_utf8)
Converts a UTF-8 encoded string to UTF-16LE.
_NACORE_DEF size_t nacore_strngraphemes(const char *s,
size_t max)
Calculates the number of graphemes in a string, up to a certain number.
_NACORE_DEF size_t nacore_strnlen(const char *s,
size_t maxlen)
Gets the number of bytes in a string, not including the terminating null character, up to a certain length.
typedef char * (*nacore_to_string_cb)(const void *value, void *opaque)
A function that retuns a textual description of some value.
_NACORE_DEF NACORE_FORMAT_VPRINTF(
   2
) int nacore_vasprintf(char **strp, const char *fmt, va_list ap)
Analog of vsprintf() that allocates a string large enough to hold the output including the terminating null character.
Version: 0.2.91, API: 3.1.0.
Close