From d5b3e1f83868a9eb16f54d7224066162a298eded Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 14 Apr 2021 04:22:17 +0100 Subject: [PATCH] Add snprintf() implementation for old CodeWarrior versions. --- setter/src/macos/._snprintf.c | Bin 0 -> 510 bytes setter/src/macos/snprintf.c | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 setter/src/macos/._snprintf.c create mode 100644 setter/src/macos/snprintf.c diff --git a/setter/src/macos/._snprintf.c b/setter/src/macos/._snprintf.c new file mode 100644 index 0000000000000000000000000000000000000000..6c6d3d3dc1a4194a9b56c90d8b70d77dff5dfe74 GIT binary patch literal 510 zcmZQz6=P>$V!#9-F-`^s1|tRr1_cHNu$mwS2F5iZt`Q;5;hwITT3{lK3=9m6Q49eABE(*AQ5=M@xX=9Q%BB^MVZm$+mWC+Fwo zr6!kT<)s&wq$V;j1SA%f1bc=k!pujf@62JF2oYmkV{B~9(3zHIY|OyG(3O_P!0`V+ zLpO*%bB3V@M9-Yb&24az4aWSV<-Z z7KU<$DCTOW4KVu7?62Dy7+AJJFarZ99Kqqvz`(-52;zc75FyLV_41G8HUVK(Ck6%vE#|lX|HEu%eh+5*fcVTG!0aFp8vt`Ua~%Kx literal 0 HcmV?d00001 diff --git a/setter/src/macos/snprintf.c b/setter/src/macos/snprintf.c new file mode 100644 index 0000000..c9a2cc1 --- /dev/null +++ b/setter/src/macos/snprintf.c @@ -0,0 +1,40 @@ +/**************************************************************************** +Aaru Data Preservation Suite +----------------------------------------------------------------------------- + + Author(s) : Natalia Portillo + +--[ License ] --------------------------------------------------------------- + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +----------------------------------------------------------------------------- +Copyright (C) 2011-2021 Natalia Portillo +*****************************************************************************/ + +#include +#include + +#include "macos.h" + +int snprintf(char* str, size_t size, const char* format, ...) +{ + va_list args; + int ret; + + va_start(args, format); + ret = sprintf(str, format, args); + va_end(args); + + return ret; +}