1/* 2 * Copyright 2007, Ingo Weinhold, bonefish@cs.tu-berlin.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6#include "fssh_stdio.h" 7 8#include <stdio.h> 9#include <stdlib.h> 10 11 12int 13fssh_sprintf(char *string, char const *format, ...) 14{ 15 va_list args; 16 va_start(args, format); 17 18 int result = vsprintf(string, format, args); 19 20 va_end(args); 21 22 return result; 23} 24 25 26int 27fssh_snprintf(char *string, fssh_size_t size, char const *format, ...) 28{ 29 va_list args; 30 va_start(args, format); 31 32 int result = vsnprintf(string, size, format, args); 33 34 va_end(args); 35 36 return result; 37} 38 39 40int 41fssh_vsprintf(char *string, char const *format, va_list ap) 42{ 43 return vsprintf(string, format, ap); 44} 45 46 47int 48fssh_vsnprintf(char *string, fssh_size_t size, char const *format, va_list ap) 49{ 50 return vsnprintf(string, size, format, ap); 51} 52 53 54int 55fssh_sscanf(char const *str, char const *format, ...) 56{ 57 va_list args; 58 va_start(args, format); 59 60 int result = vsscanf(str, format, args); 61 62 va_end(args); 63 64 return result; 65} 66 67 68int 69fssh_vsscanf(char const *str, char const *format, va_list ap) 70{ 71 return vsscanf(str, format, ap); 72} 73