~ubuntu-branches/ubuntu/maverick/luatex/maverick

« back to all changes in this revision

Viewing changes to source/texk/web2c/luatexdir/lang/hnjalloc.c

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2009-12-25 09:47:05 UTC
  • mfrom: (1.1.9 upstream) (4.2.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091225094705-y33rpflo8t4u9nag
Tags: 0.50.0-1
* new upstream release
* disable fix-hurd-ftbfs patch, included upstream
* disable upstram-fixes, included upstream
* disable ubuntu_libpoppler-0.11, not needed anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include <stdlib.h>
39
39
#include <stdio.h>
40
40
 
41
 
void *
42
 
hnj_malloc (int size)
43
 
{
44
 
  void *p;
45
 
 
46
 
  p = malloc (size);
47
 
  if (p == NULL)
48
 
    {
49
 
      fprintf (stderr, "can't allocate %d bytes\n", size);
50
 
      exit (1);
51
 
    }
52
 
  return p;
53
 
}
54
 
 
55
 
void *
56
 
hnj_realloc (void *p, int size)
57
 
{
58
 
  p = realloc (p, size);
59
 
  if (p == NULL)
60
 
    {
61
 
      fprintf (stderr, "can't allocate %d bytes\n", size);
62
 
      exit (1);
63
 
    }
64
 
  return p;
65
 
}
66
 
 
67
 
void
68
 
hnj_free (void *p)
69
 
{
70
 
  free (p);
71
 
}
72
 
 
 
41
void *hnj_malloc(int size)
 
42
{
 
43
    void *p;
 
44
 
 
45
    p = malloc(size);
 
46
    if (p == NULL) {
 
47
        fprintf(stderr, "can't allocate %d bytes\n", size);
 
48
        exit(1);
 
49
    }
 
50
    return p;
 
51
}
 
52
 
 
53
void *hnj_realloc(void *p, int size)
 
54
{
 
55
    p = realloc(p, size);
 
56
    if (p == NULL) {
 
57
        fprintf(stderr, "can't allocate %d bytes\n", size);
 
58
        exit(1);
 
59
    }
 
60
    return p;
 
61
}
 
62
 
 
63
void hnj_free(void *p)
 
64
{
 
65
    free(p);
 
66
}