Remove more unused code.
This commit is contained in:
parent
89829f45be
commit
760e2e3282
2 changed files with 0 additions and 12 deletions
1
advent.h
1
advent.h
|
@ -86,7 +86,6 @@ extern lcg_state lcgstate;
|
||||||
/* b is not needed for POSIX but harmless */
|
/* b is not needed for POSIX but harmless */
|
||||||
#define READ_MODE "rb"
|
#define READ_MODE "rb"
|
||||||
#define WRITE_MODE "wb"
|
#define WRITE_MODE "wb"
|
||||||
extern void* xmalloc(size_t);
|
|
||||||
extern char* xstrdup(const char*);
|
extern char* xstrdup(const char*);
|
||||||
extern void packed_to_token(long, char token[6]);
|
extern void packed_to_token(long, char token[6]);
|
||||||
extern void newspeak(char*);
|
extern void newspeak(char*);
|
||||||
|
|
11
misc.c
11
misc.c
|
@ -10,17 +10,6 @@
|
||||||
#include "linenoise/linenoise.h"
|
#include "linenoise/linenoise.h"
|
||||||
#include "newdb.h"
|
#include "newdb.h"
|
||||||
|
|
||||||
void* xmalloc(size_t size)
|
|
||||||
{
|
|
||||||
void* ptr = malloc(size);
|
|
||||||
if (ptr == NULL)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Out of memory!\n");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
return(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
char* xstrdup(const char* s)
|
char* xstrdup(const char* s)
|
||||||
{
|
{
|
||||||
char* ptr = strdup(s);
|
char* ptr = strdup(s);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue