projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4b51b06
)
Information hiding.
author
Eric S. Raymond
<esr@thyrsus.com>
Mon, 3 Jul 2017 21:21:06 +0000
(17:21 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Mon, 3 Jul 2017 21:21:06 +0000
(17:21 -0400)
advent.h
patch
|
blob
|
history
misc.c
patch
|
blob
|
history
diff --git
a/advent.h
b/advent.h
index c0e320ebaad0a63764a15f5edc92e84897879ba3..71b281ef8460f4e93d4038b89cccbf4226f1e0df 100644
(file)
--- a/
advent.h
+++ b/
advent.h
@@
-189,8
+189,6
@@
struct command_t {
extern struct game_t game;
extern struct settings_t settings;
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 *);
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 30b3277d0e3a3bda2d0405ef18fb15e01be8cc14..4fa173d91f4d5b9ba457954cf136e408ef562600 100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-10,7
+10,7
@@
#include "advent.h"
#include "dungeon.h"
#include "advent.h"
#include "dungeon.h"
-char* xstrdup(const char* s)
+
static
char* xstrdup(const char* s)
{
char* ptr = strdup(s);
if (ptr == NULL) {
{
char* ptr = strdup(s);
if (ptr == NULL) {
@@
-22,7
+22,7
@@
char* xstrdup(const char* s)
return (ptr);
}
return (ptr);
}
-void* xmalloc(size_t size)
+
static
void* xmalloc(size_t size)
{
void* ptr = malloc(size);
if (ptr == NULL) {
{
void* ptr = malloc(size);
if (ptr == NULL) {