1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-06-12 22:40:42 +00:00
uemacs/wrapper.c

30 lines
437 B
C
Raw Normal View History

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