SCM Repository
View of /examples/util/util.c
Parent Directory
|
Revision Log
Revision 1884 -
(download)
(as text)
(annotate)
Sun May 20 15:07:04 2012 UTC (10 years ago) by jhr
File size: 481 byte(s)
Sun May 20 15:07:04 2012 UTC (10 years ago) by jhr
File size: 481 byte(s)
Working on demos
/*! \file util.c * * \brief This file contains various utility functions. * * \author John Reppy */ /* * COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu) * All rights reserved. */ #include "util.h" #include <stdio.h> /* CheckMalloc: */ void *CheckMalloc (size_t nbytes) { void *obj = malloc(nbytes); if (obj == 0) { fprintf(stderr, "Fatel error: unable to allocate %d bytes\n", (int)nbytes); exit (1); } return obj; }
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |