loader/utility.h
author David Anderson <dvander@alliedmods.net>
Sat Mar 12 20:18:10 2011 -0800 (2011-03-12)
changeset 742 f38fc2289fa5
parent 608 30b546cc4e03
permissions -rw-r--r--
Updated symstore logic.
     1 /**
     2  * vim: set ts=4 :
     3  * ======================================================
     4  * Metamod:Source
     5  * Copyright (C) 2004-2008 AlliedModders LLC and authors.
     6  * All rights reserved.
     7  * ======================================================
     8  *
     9  * This software is provided 'as-is', without any express or implied warranty.
    10  * In no event will the authors be held liable for any damages arising from 
    11  * the use of this software.
    12  * 
    13  * Permission is granted to anyone to use this software for any purpose, 
    14  * including commercial applications, and to alter it and redistribute it 
    15  * freely, subject to the following restrictions:
    16  *
    17  * 1. The origin of this software must not be misrepresented; you must not 
    18  * claim that you wrote the original software. If you use this software in a 
    19  * product, an acknowledgment in the product documentation would be 
    20  * appreciated but is not required.
    21  * 2. Altered source versions must be plainly marked as such, and must not be
    22  * misrepresented as being the original software.
    23  * 3. This notice may not be removed or altered from any source distribution.
    24  *
    25  * Version: $Id$
    26  */
    27 
    28 #ifndef _INCLUDE_METAMOD_SOURCE_LOADER_UTILITY_H_
    29 #define _INCLUDE_METAMOD_SOURCE_LOADER_UTILITY_H_
    30 
    31 #include <stddef.h>
    32 
    33 extern size_t
    34 mm_Format(char *buffer, size_t maxlength, const char *fmt, ...);
    35 
    36 extern void *
    37 mm_LoadLibrary(const char *path, char *buffer, size_t maxlength);
    38 
    39 extern void *
    40 mm_GetLibAddress(void *lib, const char *name);
    41 
    42 extern void
    43 mm_UnloadLibrary(void *lib);
    44 
    45 extern bool
    46 mm_ResolvePath(const char *path, char *buffer, size_t maxlength);
    47 
    48 extern size_t
    49 mm_PathFormat(char *buffer, size_t len, const char *fmt, ...);
    50 
    51 extern void
    52 mm_TrimLeft(char *buffer);
    53 
    54 extern void
    55 mm_TrimRight(char *buffer);
    56 
    57 extern void
    58 mm_TrimComments(char *buffer);
    59 
    60 extern void
    61 mm_KeySplit(const char *str, char *buf1, size_t len1, char *buf2, size_t len2);
    62 
    63 extern bool
    64 mm_PathCmp(const char *path1, const char *path2);
    65 
    66 extern bool
    67 mm_GetFileOfAddress(void *pAddr, char *buffer, size_t maxlength);
    68 
    69 #endif /* _INCLUDE_METAMOD_SOURCE_LOADER_UTILITY_H_ */
    70