From 6e6722220613eae112a683e722a0e78d4b426455 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 3 Jul 2017 17:21:06 -0400 Subject: [PATCH] Information hiding. --- advent.h | 2 -- misc.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/advent.h b/advent.h index c0e320e..71b281e 100644 --- a/advent.h +++ b/advent.h @@ -189,8 +189,6 @@ struct command_t { extern struct game_t game; extern struct settings_t settings; -extern char* xstrdup(const char* s); -extern void* xmalloc(size_t size); extern void packed_to_token(long, char token[]); extern long token_to_packed(const char token[]); extern void tokenize(char*, struct command_t *); diff --git a/misc.c b/misc.c index 30b3277..4fa173d 100644 --- a/misc.c +++ b/misc.c @@ -10,7 +10,7 @@ #include "advent.h" #include "dungeon.h" -char* xstrdup(const char* s) +static char* xstrdup(const char* s) { char* ptr = strdup(s); if (ptr == NULL) { @@ -22,7 +22,7 @@ char* xstrdup(const char* s) return (ptr); } -void* xmalloc(size_t size) +static void* xmalloc(size_t size) { void* ptr = malloc(size); if (ptr == NULL) { -- 2.31.1