view helpgen/utils.c @ 2:4b08ee1ecb99

Adjust install notes to clarify that Wine applies only to the Windows build. (Thanks to Perry Metzger for test-driving.)
author David A. Holland
date Sun, 26 Apr 2009 17:58:26 -0400
parents 13d2b8934445
children
line wrap: on
line source

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "utils.h"

void *domalloc(size_t len) {
  void *x = malloc(len);
  if (!x) {
    fprintf(stderr, "Out of memory\n");
    exit(1);
  }
  return x;
}

char *dostrdup(const char *s) {
  char *x = strdup(s);
  if (!x) {
    fprintf(stderr, "Out of memory\n");
    exit(1);
  }
  return x;
}