/* gi_blorb.c: Blorb library layer for Glk API.
- gi_blorb version 1.4.
+ gi_blorb version 1.5.
Designed by Andrew Plotkin <erkyrath@eblong.com>
- http://www.eblong.com/zarf/glk/index.html
+ http://eblong.com/zarf/glk/
- This file is copyright 1998-2000 by Andrew Plotkin. You may copy,
+ This file is copyright 1998-2010 by Andrew Plotkin. You may copy,
distribute, and incorporate it into your own programs, by any means
and under any conditions, as long as you do not modify it. You may
also modify this file, incorporate it into your own programs,
giblorb_err_t err;
char *ptr;
glui32 len;
- glui32 val;
glui32 numres;
int gotindex = FALSE;
case giblorb_method_Memory:
if (!chu->ptr) {
- giblorb_err_t err;
glui32 readlen;
void *dat = giblorb_malloc(chu->len);
static void giblorb_qsort(giblorb_resdesc_t **list, int len)
{
- int ix, jx, res, val;
+ int ix, jx, res;
giblorb_resdesc_t *tmpptr, *pivot;
if (len < 6) {
/* Boring utility functions. If your platform doesn't support ANSI
malloc(), feel free to edit these however you like. */
-#include <stdlib.h> /* The OS-native header file -- you can edit
+#include <glib.h> /* The OS-native header file -- you can edit
this too. */
static void *giblorb_malloc(glui32 len)
{
- return malloc(len);
+ return g_malloc(len);
}
static void *giblorb_realloc(void *ptr, glui32 len)
{
- return realloc(ptr, len);
+ return g_realloc(ptr, len);
}
static void giblorb_free(void *ptr)
{
- free(ptr);
+ g_free(ptr);
}
-
-