Skip to content

Instantly share code, notes, and snippets.

Wonder Boy: The Dragon's Trap
-----------------------------
Quick Guide for programmers
Last updated October 2018
Contact: Omar Cornut <XXXXXX
===============================================
INDEX
===============================================
#include <stdio.h>
#include <stdlib.h>
#define da_append(xs, x) \
do { \
if ((xs)->count >= (xs)->capacity) { \
if ((xs)->capacity == 0) (xs)->capacity = 256; \
else (xs)->capacity *= 2; \
(xs)->items = realloc((xs)->items, (xs)->capacity*sizeof(*(xs)->items)); \
} \
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libxml/HTMLparser.h>
#include <libxml/xpath.h>
#include <libxml/uri.h>
// Initial hash table size (prime number for better distribution)
#define INITIAL_HASH_SIZE 101
#define MAX_LOAD_FACTOR 0.75