From 249a170acef352b40c7fa67fe65bdc62cbae4ff1 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 14 Nov 2004 19:44:06 +0000 Subject: (svn r607) -Patch: [ 985102 ] static cleanup Thanks to lvoge --- saveload.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'saveload.c') diff --git a/saveload.c b/saveload.c index e3efc54fd..6b0462019 100644 --- a/saveload.c +++ b/saveload.c @@ -113,38 +113,38 @@ void SlWriteByte(byte v) *_sl.bufp++ = v; } -int SlReadUint16() +static int SlReadUint16() { int x = SlReadByte() << 8; return x | SlReadByte(); } -uint32 SlReadUint32() +static uint32 SlReadUint32() { uint32 x = SlReadUint16() << 16; return x | SlReadUint16(); } -uint64 SlReadUint64() +static uint64 SlReadUint64() { uint32 x = SlReadUint32(); uint32 y = SlReadUint32(); return (uint64)x << 32 | y; } -void SlWriteUint16(uint16 v) +static void SlWriteUint16(uint16 v) { SlWriteByte((byte)(v >> 8)); SlWriteByte((byte)v); } -void SlWriteUint32(uint32 v) +static void SlWriteUint32(uint32 v) { SlWriteUint16((uint16)(v >> 16)); SlWriteUint16((uint16)v); } -void SlWriteUint64(uint64 x) +static void SlWriteUint64(uint64 x) { SlWriteUint32((uint32)(x >> 32)); SlWriteUint32((uint32)x); @@ -260,7 +260,7 @@ void SlSetLength(uint length) } } -void SlCopyBytes(void *ptr, size_t length) +static void SlCopyBytes(void *ptr, size_t length) { byte *p = (byte*)ptr; @@ -664,7 +664,7 @@ static void SlSaveChunk(const ChunkHandler *ch) } } -void SlSaveChunks() +static void SlSaveChunks() { const ChunkHandler *ch; const ChunkHandler * const * chsc; @@ -702,7 +702,7 @@ static const ChunkHandler *SlFindChunkHandler(uint32 id) return NULL; } -void SlLoadChunks() +static void SlLoadChunks() { uint32 id; const ChunkHandler *ch; @@ -953,7 +953,7 @@ static const ReferenceSetup _ref_setup[] = { {_towns,sizeof(_towns[0])}, }; -uint ReferenceToInt(void *v, uint t) +static uint ReferenceToInt(void *v, uint t) { if (v == NULL) return 0; return ((byte*)v - (byte*)_ref_setup[t].base) / _ref_setup[t].size + 1; -- cgit v1.2.3-54-g00ecf