public/mms_sample_ext/stub_util.h
author Nicholas Hastings <skamonkey@gmail.com>
Thu Jul 04 11:28:32 2013 -0400 (2013-07-04)
changeset 3931 576fa42454dc
parent 1990 de135d1f05b1
permissions -rw-r--r--
Fixed build for real.
ds@1990
     1
/**
ds@1990
     2
 * vim: set ts=4 :
ds@1990
     3
 * ======================================================
ds@1990
     4
 * Metamod:Source Stub Plugin
ds@1990
     5
 * Written by AlliedModders LLC.
ds@1990
     6
 * ======================================================
ds@1990
     7
 *
ds@1990
     8
 * This software is provided 'as-is', without any express or implied warranty.
ds@1990
     9
 * In no event will the authors be held liable for any damages arising from 
ds@1990
    10
 * the use of this software.
ds@1990
    11
 *
ds@1990
    12
 * This stub plugin is public domain.
ds@1990
    13
 *
ds@1990
    14
 * Version: $Id$
ds@1990
    15
 */
ds@1990
    16
ds@1990
    17
#ifndef _INCLUDE_STUB_UTIL_FUNCTIONS_H_
ds@1990
    18
#define _INCLUDE_STUB_UTIL_FUNCTIONS_H_
ds@1990
    19
ds@1990
    20
#include <stddef.h>
ds@1990
    21
ds@1990
    22
/**
ds@1990
    23
 * This is a platform-safe function which fixes weird idiosyncracies 
ds@1990
    24
 * in the null-termination and return value of snprintf().  It guarantees 
ds@1990
    25
 * the terminator on overflow cases, and never returns -1 or a value 
ds@1990
    26
 * not equal to the number of non-terminating bytes written.
ds@1990
    27
 */
ds@1990
    28
size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...);
ds@1990
    29
ds@1990
    30
#endif //_INCLUDE_STUB_UTIL_FUNCTIONS_H_
ds@1990
    31