1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-20 00:06:45 -05:00
uemacs/wrapper.c

30 lines
437 B
C
Raw Normal View History

2013-04-30 05:24:46 -04:00
/* wrapper.c -- implements wrapper.h */
#include "wrapper.h"
#include "usage.h"
#include <stdlib.h>
2013-04-30 05:24:46 -04:00
#include <unistd.h>
/* Function copyright: git */
2013-04-30 05:24:46 -04:00
void xmkstemp( char *template) {
int fd ;
fd = mkstemp( template) ;
if( fd < 0)
die( "Unable to create temporary file") ;
close( fd) ;
}
2013-04-30 05:24:46 -04:00
void *xmalloc( size_t size) {
void *ret = malloc( size) ;
if( !ret)
die( "Out of memory") ;
return ret ;
}
2013-04-30 05:24:46 -04:00
/* end of wrapper.c */