| 1 | /* |
| 2 | * Copyright (C) 2005 Olaf Freyer ([email protected]) |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; either version 2 |
| 7 | * of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 | */ |
| 18 | |
| 19 | #ifndef ASNPRINTF_H |
| 20 | #define ASNPRINTF_Hcxx . . $ `src/common/asnprintf.h:20:9`! |
| 21 | |
| 22 | #include <cstdarg> |
| 23 | #include <cstddef> |
| 24 | |
| 25 | #define ZEROPADcxx . . $ `src/common/asnprintf.h:25:9`! 1 /* pad with zero */ |
| 26 | #define SIGNcxx . . $ `src/common/asnprintf.h:26:9`! 2 /* unsigned/signed long */ |
| 27 | #define PLUScxx . . $ `src/common/asnprintf.h:27:9`! 4 /* show plus */ |
| 28 | #define SPACEcxx . . $ `src/common/asnprintf.h:28:9`! 8 /* space if plus */ |
| 29 | #define LEFTcxx . . $ `src/common/asnprintf.h:29:9`! 16 /* left justified */ |
| 30 | #define SPECIALcxx . . $ `src/common/asnprintf.h:30:9`! 32 /* 0x */ |
| 31 | #define LARGEcxx . . $ `src/common/asnprintf.h:31:9`! 64 /* use 'ABCDEF' instead of 'abcdef' */ |
| 32 | |
| 33 | namespace pvpgncxx . . $ pvpgn/ |
| 34 | { |
| 35 | |
| 36 | typedef structcxx . . $ pvpgn/$anonymous_type_bd85e8b1635b9208_0# { |
| 37 | const char* transcxx . . $ pvpgn/$anonymous_type_bd85e8b1635b9208_0#trans.; /* points to the translation of the format */ |
| 38 | unsigned translencxx . . $ pvpgn/$anonymous_type_bd85e8b1635b9208_0#translen.; /* how many chars in this translation */ |
| 39 | const char* fmtcxx . . $ pvpgn/$anonymous_type_bd85e8b1635b9208_0#fmt.; /* points to the fmt location of this format spec */ |
| 40 | unsigned fmtlencxx . . $ pvpgn/$anonymous_type_bd85e8b1635b9208_0#fmtlen.; /* how many chars in this fmt spec */ |
| 41 | } t_fmtentrycxx . . $ pvpgn/t_fmtentry#; |
| 42 | |
| 43 | /* "array" snprintf - this function prints all vargs into the prepared buffer, |
| 44 | * each of them as a \0 terminated string. The prepared char* [] locations will |
| 45 | * contain the starting position of each seperate string afterwards. |
| 46 | * The function returns the number of vargs that have been printed. |
| 47 | */ |
| 48 | int asnprintfcxx . . $ pvpgn/asnprintf(e811632e67542722).(char * buffer, std::size_tcxx . . $ std/size_t# size, t_fmtentrycxx . . $ pvpgn/t_fmtentry# *entries, unsigned entlen, const char *fmt, ...); |
| 49 | int vasnprintfcxx . . $ pvpgn/vasnprintf(317e05b89f3a90fd).(char * buffer, std::size_tcxx . . $ std/size_t# size, t_fmtentrycxx . . $ pvpgn/t_fmtentry# *entries, unsigned entlen, const char *fmt, std::va_listcxx . . $ std/va_list# args); |
| 50 | |
| 51 | } |
| 52 | |
| 53 | #endif |