logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

memisort - insert new element into sorted array

Author

       Lars Wirzenius (lars.wirzenius@helsinki.fi)

Publib                                        C Programmer's Manual                               MEMISORT(3pub)

Description

memisort  inserts a new element into a sorted array, in the proper place to keep the array sorted.  base,
       elsize, nelem, and comp are as for qsort(3), new is a pointer to the new element.

Name

       memisort - insert new element into sorted array

See Also

publib(3), qsort(3)

Synopsis

       #include <publib.h>

       void memisort(void *base, size_t nelem, size_t elsize, const void *new,
                 int (*comp)(const void *, const void *));

See Also