From 36312e9779e112401eaa9804bb0f82bf6eaadac6 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 13 Dec 2006 11:13:50 +0000 Subject: [PATCH] Added path formating to LibrarySystem so we don't have to rely on g_SMAPI --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40211 --- core/systems/LibrarySys.cpp | 16 ++++++++++++++++ core/systems/LibrarySys.h | 1 + 2 files changed, 17 insertions(+) diff --git a/core/systems/LibrarySys.cpp b/core/systems/LibrarySys.cpp index 9bce6c88..669e950b 100644 --- a/core/systems/LibrarySys.cpp +++ b/core/systems/LibrarySys.cpp @@ -276,3 +276,19 @@ ILibrary *LibrarySystem::OpenLibrary(const char *path, char *error, size_t err_m return new CLibrary(lib); } + +void LibrarySystem::PathFormat(char *buffer, size_t len, const char *fmt, ...) +{ + va_list ap; + va_start(ap,fmt); + size_t mylen = vsnprintf(buffer, len, fmt, ap); + va_end(ap); + + for (size_t i=0; i