File indexing completed on 2024-05-19 14:56:23

0001 /*
0002 * Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
0003 *
0004 * This software is provided 'as-is', without any express or implied
0005 * warranty.  In no event will the authors be held liable for any damages
0006 * arising from the use of this software.
0007 * Permission is granted to anyone to use this software for any purpose,
0008 * including commercial applications, and to alter it and redistribute it
0009 * freely, subject to the following restrictions:
0010 * 1. The origin of this software must not be misrepresented; you must not
0011 * claim that you wrote the original software. If you use this software
0012 * in a product, an acknowledgment in the product documentation would be
0013 * appreciated but is not required.
0014 * 2. Altered source versions must be plainly marked as such, and must not be
0015 * misrepresented as being the original software.
0016 * 3. This notice may not be removed or altered from any source distribution.
0017 */
0018 
0019 #include <Box2D/Common/b2Settings.h>
0020 #include <stdio.h>
0021 #include <stdarg.h>
0022 #include <stdlib.h>
0023 
0024 b2Version b2_version = {2, 3, 2};
0025 
0026 // Memory allocators. Modify these to use your own allocator.
0027 void* b2Alloc(int32 size)
0028 {
0029     return malloc(size);
0030 }
0031 
0032 void b2Free(void* mem)
0033 {
0034     free(mem);
0035 }
0036 
0037 // You can modify this to use your logging facility.
0038 void b2Log(const char* string, ...)
0039 {
0040     va_list args;
0041     va_start(args, string);
0042     vprintf(string, args);
0043     va_end(args);
0044 }