diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-04-08 06:34:46 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-04-08 06:34:46 +0000 |
commit | 7e0f3484d8cd6eca4abe80d057391d14face5606 (patch) | |
tree | 92570fc98a476ecbf696c2ef16d046412d405995 /Build/source/texk/xdvik/util.h | |
parent | 824f7b0903de8ad7f6ee3d7656005e4c59155e06 (diff) |
xdvik 22.86
git-svn-id: svn://tug.org/texlive/trunk@29732 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvik/util.h')
-rw-r--r-- | Build/source/texk/xdvik/util.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/Build/source/texk/xdvik/util.h b/Build/source/texk/xdvik/util.h index 615b521d3de..d82d8d94581 100644 --- a/Build/source/texk/xdvik/util.h +++ b/Build/source/texk/xdvik/util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2004 the xdvik development team + * Copyright (c) 2002-2013 the xdvik development team * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -96,9 +96,10 @@ extern int memicmp(const char *, const char *, size_t); /* extern void *xmalloc(unsigned); */ /* extern void *xrealloc(void *, unsigned); */ /* extern char *xstrdup(const char *); */ -/* extern char *xmemdump(const char *, size_t); */ /* extern void xputenv(const char *, const char *); */ +extern char *xmemdup(const char *, size_t); + /* like xstrdup, but only copy len characters and zero-terminate at next index (allocates len+1 characters) */ extern char *xstrndup(const char *str, size_t len); @@ -149,6 +150,28 @@ typedef hash_table_type hashTableT; /* from kpathsea */ extern Boolean find_str_int_hash(hashTableT *hashtable, const char *key, size_t *val); extern void put_str_int_hash(hashTableT *hashtable, const char *key, size_t val); +#if FREETYPE || PS + +/* + * AVL tree structures. + */ + +#define AVL_COMMON \ + const char *key; /* key */ \ + int key_len; /* length of key */ \ + int bal; /* AVL balancing information */ \ + struct avl *left; \ + struct avl *right + +struct avl { /* generic data structure */ + AVL_COMMON; +}; + +extern struct avl *avladd(const char *, size_t, struct avl **, size_t); + +#endif /* FREETYPE || PS */ + + extern Boolean copy_file(const char *from, const char *to); extern Boolean copy_fp(FILE *in, FILE *out); |