Function 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_asprintf_nl
 nacore_avl_tree_dump
 nacore_avl_tree_dup
 nacore_avl_tree_elem_free
 nacore_avl_tree_elem_get_next
 nacore_avl_tree_elem_get_prev
 nacore_avl_tree_elem_get_value
 nacore_avl_tree_elem_insert
 nacore_avl_tree_elem_new
 nacore_avl_tree_elem_pop
 nacore_avl_tree_elem_set_value
 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_char_utf16_decode
 nacore_char_utf16_encode
 nacore_char_utf8_decode
 nacore_char_utf8_encode
 nacore_dl_close
 nacore_dl_open
 nacore_dl_sym
 nacore_env_free
 nacore_env_get
 nacore_env_path_prefixes_split
 nacore_fs_dir_close
 nacore_fs_dir_entry_free
 nacore_fs_dir_entry_get_name
 nacore_fs_dir_get_next_entry
 nacore_fs_dir_open
 nacore_list_append
 nacore_list_dump
 nacore_list_dup
 nacore_list_elem_append
 nacore_list_elem_free
 nacore_list_elem_get_next
 nacore_list_elem_get_prev
 nacore_list_elem_get_value
 nacore_list_elem_insert_after
 nacore_list_elem_insert_before
 nacore_list_elem_new
 nacore_list_elem_pop
 nacore_list_elem_prepend
 nacore_list_elem_set_value
 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_locale_dup
 nacore_locale_free
 nacore_locale_new
 nacore_locale_use
 nacore_msg_box_free
 nacore_msg_box_new
 nacore_msg_box_set_callbacks
 nacore_msg_context_get_opaque
 nacore_msg_context_get_parent
 nacore_msg_status_begin
 nacore_msg_status_end
 nacore_msg_text
 nacore_mutex_free
 nacore_mutex_lock
 nacore_mutex_new
 nacore_mutex_trylock
 nacore_mutex_unlock
 nacore_ptr_cmp
 nacore_sem_free
 nacore_sem_new
 nacore_sem_post
 nacore_sem_trywait
 nacore_sem_wait
 nacore_strdup
 nacore_string_get_size
 nacore_string_split
 nacore_string_utf16_to_utf8
 nacore_string_utf16_to_utf8_a
 nacore_string_utf16_to_utf8_len
 nacore_string_utf8_to_utf16
 nacore_string_utf8_to_utf16_a
 nacore_string_utf8_to_utf16_len
 nacore_strnlen
 nacore_thread_create
 nacore_thread_equal
 nacore_thread_exit
 nacore_thread_join
 nacore_thread_self
 nacore_vasprintf
 nacore_vasprintf_nl
_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 NACORE_FORMAT_PRINTF(
   2,
   3
) int nacore_asprintf_nl(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 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.
_NACORE_DEF void nacore_avl_tree_elem_free(nacore_avl_tree_elem elem)
Destroys a 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 void nacore_avl_tree_elem_insert(nacore_avl_tree tree,
nacore_avl_tree_elem elem,
void *cmp_opaque)
Inserts a tree element into a tree.
_NACORE_DEF nacore_avl_tree_elem nacore_avl_tree_elem_new(void *value)
Creates a new tree element without adding it to a tree.
_NACORE_DEF void nacore_avl_tree_elem_pop(nacore_avl_tree tree,
nacore_avl_tree_elem elem)
Removes an element from a tree without destroying it.
_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 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)
Destroys 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)
Creates a new tree element and inserts it 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, destroys it and returns the value it contains.
_NACORE_DEF size_t nacore_char_utf16_decode(const uint16_t *utf16c,
uint32_t *cp)
Decodes the Unicode code point associated to an UTF-16 character.
_NACORE_DEF size_t nacore_char_utf16_encode(uint16_t *utf16c,
uint32_t cp)
Encodes a Unicode code point into an UTF-16 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.
_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.
_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.
_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().
_NACORE_DEF int nacore_fs_dir_close(nacore_fs_dir dir)
Closes a directory stream.
_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 nacore_list_elem nacore_list_append(nacore_list list,
void *gs_opaque,
void *value)
Creates a new list element and appends it to a list.
_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.
_NACORE_DEF void nacore_list_elem_append(nacore_list list,
nacore_list_elem elem)
Appends a list element to a list.
_NACORE_DEF void nacore_list_elem_free(nacore_list_elem elem)
Destroys a 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 void nacore_list_elem_insert_after(nacore_list list,
nacore_list_elem elem,
nacore_list_elem after)
Inserts a list element after another element in a list.
_NACORE_DEF void nacore_list_elem_insert_before(nacore_list list,
nacore_list_elem elem,
nacore_list_elem before)
Inserts a list element before another element in a list.
_NACORE_DEF nacore_list_elem nacore_list_elem_new(void *value)
Creates a new list element without adding it to a list.
_NACORE_DEF void nacore_list_elem_pop(nacore_list list,
nacore_list_elem elem)
Removes an element from a list without destroying it.
_NACORE_DEF void nacore_list_elem_prepend(nacore_list list,
nacore_list_elem elem)
Prepends a list element to a list.
_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 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)
Destroys 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)
Creates a new list element and inserts it after another 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)
Creates a new list element and inserts it before another 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, destroys it and returns the value it contains.
_NACORE_DEF nacore_list_elem nacore_list_prepend(nacore_list list,
void *gs_opaque,
void *value)
Creates a new list element and prepends it to a list.
_NACORE_DEF nacore_locale nacore_locale_dup(nacore_locale locale)
Duplicates a locale object.
_NACORE_DEF void nacore_locale_free(nacore_locale locale)
Releases the resources allocated for a locale object.
_NACORE_DEF nacore_locale nacore_locale_new(int category_mask,
const char *locale,
nacore_locale base)
Creates a new locale object or modifies an existing one.
_NACORE_DEF nacore_locale nacore_locale_use(nacore_locale locale)
Sets or gets the current locale of the calling thread.
_NACORE_DEF void nacore_msg_box_free(nacore_msg_context msg_box)
Destroys 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.
_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.
_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.
_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 destroys such status message.
_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.
_NACORE_DEF void nacore_mutex_free(nacore_mutex mutex)
Destroys 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 mutex.
_NACORE_DEF void nacore_mutex_unlock(nacore_mutex mutex)
Releases the lock on a mutex.
_NACORE_DEF int nacore_ptr_cmp(const void *v1,
const void *v2,
void *opaque)
Pointer comparison function.
_NACORE_DEF void nacore_sem_free(nacore_sem sem)
Destroys a semaphore.
_NACORE_DEF nacore_sem nacore_sem_new(unsigned int value)
Creates a new semaphore.
_NACORE_DEF int nacore_sem_post(nacore_sem sem)
Unlocks a semaphore.
_NACORE_DEF int nacore_sem_trywait(nacore_sem sem)
Attempts to lock a semaphore.
_NACORE_DEF int nacore_sem_wait(nacore_sem sem)
Locks a semaphore.
_NACORE_DEF char * nacore_strdup(const char *s,
void *unused)
Analog of strcpy() that allocates a string large enough to hold the output including the terminating null character.
_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 void nacore_string_utf16_to_utf8(char *buf,
const uint16_t *str_utf16)
Converts a UTF-16 encoded string to UTF-8 into a previously allocated buffer, including the terminating null character.
_NACORE_DEF char * nacore_string_utf16_to_utf8_a(const uint16_t *str_utf16)
Converts a UTF-16 encoded string to UTF-8, allocating the output string.
_NACORE_DEF size_t nacore_string_utf16_to_utf8_len(const uint16_t *str_utf16)
Calculates the number of bytes needed to store the UTF-8 representation of a UTF-16 encoded string, excluding the terminating null character.
_NACORE_DEF void nacore_string_utf8_to_utf16(uint16_t *buf,
const char *str_utf8)
Converts a UTF-8 encoded string to UTF-16 into a previously allocated buffer, including the terminating null character.
_NACORE_DEF uint16_t * nacore_string_utf8_to_utf16_a(const char *str_utf8)
Converts a UTF-8 encoded string to UTF-16, allocating the output string.
_NACORE_DEF size_t nacore_string_utf8_to_utf16_len(const char *str_utf8)
Calculates the number of bytes needed to store the UTF-16 representation of a UTF-8 encoded string, excluding the terminating null character.
_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.
_NACORE_DEF int nacore_thread_create(nacore_thread *thread,
size_t stack_size,
void (*start_routine)(void *arg),
void *arg)
Creates a new thread.
_NACORE_DEF char nacore_thread_equal(nacore_thread t1,
nacore_thread t2)
Compares two thread identifiers.
_NACORE_DEF void nacore_thread_exit()
Terminates the calling thread.
_NACORE_DEF int nacore_thread_join(nacore_thread thread)
Waits for termination of the specified thread.
_NACORE_DEF nacore_thread nacore_thread_self()
Gets an identifier for the calling thread.
_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.
_NACORE_DEF NACORE_FORMAT_VPRINTF(
   2
) int nacore_vasprintf_nl(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.
Close