- cleaning and refactoring functionality
- parser function new WIP (old included as comment-> must be integrated)
This commit is contained in:
25
src/ext/xmalloc.c
Normal file
25
src/ext/xmalloc.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/*!
|
||||
* @file xmalloc.c
|
||||
* @brief
|
||||
* @details
|
||||
* Project: \n
|
||||
* Subsystem: \n
|
||||
* Module: \n
|
||||
* Code: GNU-C\n
|
||||
*
|
||||
* @date 28.02.2017
|
||||
* @author SESA354004
|
||||
*/
|
||||
|
||||
#include "xmalloc.h"
|
||||
#include "xtypes.h"
|
||||
|
||||
void *xmalloc(size_t size)
|
||||
{
|
||||
void *value = malloc(size);
|
||||
if (value == 0)
|
||||
perror("virtual memory exhausted");
|
||||
else
|
||||
memset(value, 0, size);
|
||||
return value;
|
||||
}
|
21
src/ext/xmalloc.h
Normal file
21
src/ext/xmalloc.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/*!
|
||||
* @file xmalloc.h
|
||||
* @brief
|
||||
* @details
|
||||
* Project: \n
|
||||
* Subsystem: \n
|
||||
* Module: \n
|
||||
* Code: GNU-C\n
|
||||
*
|
||||
* @date 28.02.2017
|
||||
* @author SESA354004
|
||||
*/
|
||||
|
||||
#ifndef EXT_XMALLOC_H_
|
||||
#define EXT_XMALLOC_H_
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
void *xmalloc(size_t size);
|
||||
|
||||
#endif /* EXT_XMALLOC_H_ */
|
Reference in New Issue
Block a user