From 41e9dd3d80d8179c7ccd6ba4714ae25e4888486f Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Wed, 14 Jan 2009 14:52:50 +0100 Subject: [PATCH] winhlp32: Make some functions static in hlpfile.c and remove HLPFILE_PointsToTwips(). --- programs/winhlp32/hlpfile.c | 6 +++--- programs/winhlp32/hlpfile.h | 8 -------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/programs/winhlp32/hlpfile.c b/programs/winhlp32/hlpfile.c index b67871e3514..d9bdc7ec0c3 100644 --- a/programs/winhlp32/hlpfile.c +++ b/programs/winhlp32/hlpfile.c @@ -66,7 +66,7 @@ static HLPFILE *first_hlpfile = 0; * Pointer to block identified by key, or NULL if failure. * */ -void* HLPFILE_BPTreeSearch(BYTE* buf, const void* key, +static void* HLPFILE_BPTreeSearch(BYTE* buf, const void* key, HLPFILE_BPTreeCompare comp) { unsigned magic; @@ -396,7 +396,7 @@ HLPFILE_PAGE *HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset, ULONG* relativ * * HLPFILE_Contents */ -HLPFILE_PAGE* HLPFILE_Contents(HLPFILE *hlpfile, ULONG* relative) +static HLPFILE_PAGE* HLPFILE_Contents(HLPFILE *hlpfile, ULONG* relative) { HLPFILE_PAGE* page = NULL; @@ -1093,7 +1093,7 @@ static HLPFILE_LINK* HLPFILE_AllocLink(struct RtfData* rd, int cookie, return link; } -unsigned HLPFILE_HalfPointsToTwips(unsigned pts) +static unsigned HLPFILE_HalfPointsToTwips(unsigned pts) { static unsigned logPxY; if (!logPxY) diff --git a/programs/winhlp32/hlpfile.h b/programs/winhlp32/hlpfile.h index b0d1f23dcea..0e3f35e8966 100644 --- a/programs/winhlp32/hlpfile.h +++ b/programs/winhlp32/hlpfile.h @@ -164,20 +164,12 @@ typedef int (*HLPFILE_BPTreeCompare)(void *p, const void *key, typedef void (*HLPFILE_BPTreeCallback)(void *p, void **next, void *cookie); HLPFILE* HLPFILE_ReadHlpFile(LPCSTR lpszPath); -HLPFILE_PAGE* HLPFILE_Contents(HLPFILE* hlpfile, ULONG* relative); HLPFILE_PAGE* HLPFILE_PageByHash(HLPFILE* hlpfile, LONG lHash, ULONG* relative); HLPFILE_PAGE* HLPFILE_PageByMap(HLPFILE* hlpfile, LONG lMap, ULONG* relative); HLPFILE_PAGE* HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset, ULONG* relative); LONG HLPFILE_Hash(LPCSTR lpszContext); void HLPFILE_FreeHlpFile(HLPFILE*); -unsigned HLPFILE_HalfPointsToTwips(unsigned pts); -static inline unsigned HLPFILE_PointsToTwips(unsigned pts) -{ - return HLPFILE_HalfPointsToTwips(2 * pts); -} - -void* HLPFILE_BPTreeSearch(BYTE*, const void*, HLPFILE_BPTreeCompare); void HLPFILE_BPTreeEnum(BYTE*, HLPFILE_BPTreeCallback cb, void *cookie); struct RtfData {