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 12 int 13 fssh_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 26 int 27 fssh_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 40 int 41 fssh_vsprintf(char *string, char const *format, va_list ap) 42 { 43 return vsprintf(string, format, ap); 44 } 45 46 47 int 48 fssh_vsnprintf(char *string, fssh_size_t size, char const *format, va_list ap) 49 { 50 return vsnprintf(string, size, format, ap); 51 } 52 53 54 int 55 fssh_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 68 int 69 fssh_vsscanf(char const *str, char const *format, va_list ap) 70 { 71 return vsscanf(str, format, ap); 72 } 73