aboutsummaryrefslogtreecommitdiffstats
path: root/tileserver/util.c
diff options
context:
space:
mode:
authorfrancis <francis>2006-09-22 13:57:00 +0000
committerfrancis <francis>2006-09-22 13:57:00 +0000
commit648b23aa61f7523c4ad296303f9f70f8c1bb15bf (patch)
tree52af5553a05957795e04ae12ff6ac5901656960b /tileserver/util.c
parentb65558eac2e214c138c5887f0fd94249ec7f598c (diff)
Create TilMa service (for mapping tiles).
Move map tile stuff to appropriate places: - pnmtilesplit into its own project, as is standalone - tileserver and maketiles into TilMa
Diffstat (limited to 'tileserver/util.c')
-rw-r--r--tileserver/util.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/tileserver/util.c b/tileserver/util.c
deleted file mode 100644
index fbc500438..000000000
--- a/tileserver/util.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * util.c:
- * Miscellaneous utility functions.
- *
- * Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
- * Email: chris@mysociety.org; WWW: http://www.mysociety.org/
- *
- */
-
-static const char rcsid[] = "$Id: util.c,v 1.1 2006-09-20 15:45:51 chris Exp $";
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "util.h"
-
-/*
- * Wrappers for memory-allocation functions.
- */
-void *xmalloc(const size_t s) {
- void *v;
- if (!(v = malloc(s)))
- die("malloc(%u bytes): %s", (unsigned)s, strerror(errno));
- return v;
-}
-
-void *xcalloc(const size_t a, const size_t b) {
- void *v;
- if (!(v = calloc(a, b)))
- die("calloc(%u * %u bytes): %s",
- (unsigned)a, (unsigned)b, strerror(errno));
- return v;
-}
-
-void *xrealloc(void *b, const size_t s) {
- void *v;
- if (!(v = realloc(b, s)))
- die("realloc(%u bytes): %s", (unsigned)s, strerror(errno));
- return v;
-}
-
-char *xstrdup(const char *s) {
- char *t;
- if (!(t = strdup(s)))
- die("strdup(%u bytes): %s", (unsigned)(strlen(s) + 1), strerror(errno));
- return t;
-}
-
-void xfree(void *v) {
- if (v) free(v);
-}