]> git.donarmstrong.com Git - fastq-tools.git/blobdiff - src/fastq-common.c
a program to output a nonredundant list of readss
[fastq-tools.git] / src / fastq-common.c
diff --git a/src/fastq-common.c b/src/fastq-common.c
deleted file mode 100644 (file)
index ae1ecac..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-
-/*
- * This file is part of fastq-tools.
- *
- * Copyright (c) 2011 by Daniel C. Jones <dcjones@cs.washington.edu>
- *
- */
-
-
-#include "fastq-common.h"
-#include <stdlib.h>
-
-
-void or_die(int b, const char* msg)
-{
-    if (b == 0) {
-        fputs(msg, stderr);
-        exit(1);
-    }
-}
-
-
-void* malloc_or_die(size_t n)
-{
-    void* p = malloc(n);
-    if (p == NULL) {
-        fprintf(stderr, "Can not allocate %zu bytes.\n", n);
-        exit(1);
-    }
-    return p;
-}
-
-
-void* realloc_or_die(void* ptr, size_t n)
-{
-    void* p = realloc(ptr, n);
-    if (p == NULL) {
-        fprintf(stderr, "Can not allocate %zu bytes.\n", n);
-        exit(1);
-    }
-    return p;
-}
-
-
-FILE* fopen_or_die(const char* path, const char* mode)
-{
-    FILE* f = fopen(path, mode);
-    if (f == NULL) {
-        fprintf(stderr, "Can not open file %s with mode %s.\n", path, mode);
-        exit(1);
-    }
-    return f;
-}
-
-
-