@author Fletcher T. Penney
@bug
-**/
+ **/
/*
GLibFacade.c and GLibFacade.h are from the MultiMarkdown v4 project:
- https://github.com/fletcher/MultiMarkdown-4/
+ https://github.com/fletcher/MultiMarkdown-4/
MMD 4 is released under both the MIT License and GPL.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-*/
+ */
#include <stdlib.h>
#include <string.h>
return s->element[index];
}
+
+/// Sort array using specified compare_function
+void stack_sort(stack * s, void * compare_function) {
+ qsort(s->element, s->size, sizeof(void *), compare_function);
+}
+
@author Fletcher T. Penney
@bug
-**/
+ **/
/*
GLibFacade.c and GLibFacade.h are from the MultiMarkdown v4 project:
- https://github.com/fletcher/MultiMarkdown-4/
+ https://github.com/fletcher/MultiMarkdown-4/
MMD 4 is released under both the MIT License and GPL.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-*/
+ */
#ifndef STACK_SMART_STRING_H
);
+/// Sort stack based on sort_function
+void stack_sort(stack * s, void * compare_function);
+
#endif