svn path=/trunk/yasm/; revision=216
parser.c \
parser.h \
optimizer.h \
+ ternary.c \
+ ternary.h \
strcasecmp.c
CFLAGS = @ANSI_CFLAGS@
#include "config.h"
#endif
-#ifdef HAVE_STDLIB_H
+#include "util.h"
+
+#include <stdio.h>
+
+#ifdef STDC_HEADERS
#include <stdlib.h>
#endif
-#include <stdio.h>
+#include "errwarn.h"
-#include "libiberty.h"
#include "ternary.h"
+RCSID("$IdPath$");
+
/* Non-recursive so we don't waste stack space/time on large
insertions. */
for (;;)
{
/* Allocate the memory for the node, and fill it in */
- *pcurr = (ternary_tree) xmalloc (sizeof (ternary_node));
+ *pcurr = (ternary_tree) malloc (sizeof (ternary_node));
+ if (!*pcurr)
+ Fatal(FATAL_NOMEM);
curr = *pcurr;
curr->splitchar = *s;
curr->lokid = curr->hikid = curr->eqkid = 0;
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
-#ifndef TERNARY_H_
-#define TERNARY_H_
+#ifndef YASM_TERNARY_H
+#define YASM_TERNARY_H
/* Ternary search trees */
typedef struct ternary_node_def *ternary_tree;