Commit 8a69797c6e24502df30528b71e0ef16ae77798fc
1 parent
ba2ad037
Exists in
master
and in
5 other branches
Android - Work in progress
Showing
7 changed files
with
18 additions
and
9 deletions
Show diff stats
src/include/lib3270.h
| ... | ... | @@ -32,6 +32,7 @@ |
| 32 | 32 | #ifndef LIB3270_H_INCLUDED |
| 33 | 33 | |
| 34 | 34 | #define LIB3270_H_INCLUDED 1 |
| 35 | + #include <stdarg.h> | |
| 35 | 36 | |
| 36 | 37 | /** |
| 37 | 38 | * Character attributes |
| ... | ... | @@ -798,6 +799,7 @@ |
| 798 | 799 | LIB3270_EXPORT const char * lib3270_get_version(void); |
| 799 | 800 | LIB3270_EXPORT const char * lib3270_get_revision(void); |
| 800 | 801 | |
| 802 | + LIB3270_EXPORT char * lib3270_vsprintf(const char *fmt, va_list args); | |
| 801 | 803 | |
| 802 | 804 | |
| 803 | 805 | #ifdef __cplusplus | ... | ... |
src/include/lib3270/popup.h
| ... | ... | @@ -33,9 +33,18 @@ |
| 33 | 33 | |
| 34 | 34 | #define LIB3270_POPUP_INCLUDED 1 |
| 35 | 35 | |
| 36 | +#ifdef __cplusplus | |
| 37 | + extern "C" { | |
| 38 | +#endif | |
| 39 | + | |
| 36 | 40 | LIB3270_EXPORT void lib3270_set_popup_handler(int (*popup_handler)(H3270 *, void *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list)); |
| 37 | 41 | LIB3270_EXPORT void lib3270_popup_dialog(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, ...); |
| 38 | 42 | |
| 43 | + | |
| 44 | +#ifdef __cplusplus | |
| 45 | + } | |
| 46 | +#endif | |
| 47 | + | |
| 39 | 48 | #endif // LIB3270_POPUP_INCLUDED |
| 40 | 49 | |
| 41 | 50 | ... | ... |
src/lib3270/ft_cut.c
| ... | ... | @@ -532,7 +532,7 @@ static void cut_abort(unsigned short reason, const char *fmt, ...) |
| 532 | 532 | |
| 533 | 533 | /* Save the error message. */ |
| 534 | 534 | va_start(args, fmt); |
| 535 | - saved_errmsg = xs_vsprintf(fmt, args); | |
| 535 | + saved_errmsg = lib3270_vsprintf(fmt, args); | |
| 536 | 536 | va_end(args); |
| 537 | 537 | |
| 538 | 538 | /* Send the abort sequence. */ | ... | ... |
src/lib3270/ft_dft.c
| ... | ... | @@ -497,7 +497,7 @@ static void dft_abort(unsigned short code, const char *fmt, ...) |
| 497 | 497 | lib3270_free(abort_string); |
| 498 | 498 | |
| 499 | 499 | va_start(args, fmt); |
| 500 | - abort_string = xs_vsprintf(fmt, args); | |
| 500 | + abort_string = lib3270_vsprintf(fmt, args); | |
| 501 | 501 | va_end(args); |
| 502 | 502 | |
| 503 | 503 | trace_ds("> WriteStructuredField FileTransferData Error\n"); | ... | ... |
src/lib3270/resources.c
| ... | ... | @@ -172,7 +172,7 @@ const char * get_fresource(const char *fmt, ...) |
| 172 | 172 | const char *r; |
| 173 | 173 | |
| 174 | 174 | va_start(args, fmt); |
| 175 | - name = xs_vsprintf(fmt, args); | |
| 175 | + name = lib3270_vsprintf(fmt, args); | |
| 176 | 176 | va_end(args); |
| 177 | 177 | r = get_resource(name); |
| 178 | 178 | lib3270_free(name); | ... | ... |
src/lib3270/util.c
| ... | ... | @@ -166,7 +166,7 @@ const char * win32_strerror(int e) |
| 166 | 166 | /* |
| 167 | 167 | * Cheesy internal version of sprintf that allocates its own memory. |
| 168 | 168 | */ |
| 169 | -char * xs_vsprintf(const char *fmt, va_list args) | |
| 169 | +char * lib3270_vsprintf(const char *fmt, va_list args) | |
| 170 | 170 | { |
| 171 | 171 | char *r; |
| 172 | 172 | #if defined(HAVE_VASPRINTF) /*[*/ |
| ... | ... | @@ -198,7 +198,7 @@ xs_buffer(const char *fmt, ...) |
| 198 | 198 | char *r; |
| 199 | 199 | |
| 200 | 200 | va_start(args, fmt); |
| 201 | - r = xs_vsprintf(fmt, args); | |
| 201 | + r = lib3270_vsprintf(fmt, args); | |
| 202 | 202 | va_end(args); |
| 203 | 203 | return r; |
| 204 | 204 | } |
| ... | ... | @@ -211,7 +211,7 @@ xs_warning(const char *fmt, ...) |
| 211 | 211 | char *r; |
| 212 | 212 | |
| 213 | 213 | va_start(args, fmt); |
| 214 | - r = xs_vsprintf(fmt, args); | |
| 214 | + r = lib3270_vsprintf(fmt, args); | |
| 215 | 215 | va_end(args); |
| 216 | 216 | Warning(NULL,r); |
| 217 | 217 | lib3270_free(r); |
| ... | ... | @@ -224,7 +224,7 @@ xs_error(const char *fmt, ...) |
| 224 | 224 | char *r; |
| 225 | 225 | |
| 226 | 226 | va_start(args, fmt); |
| 227 | - r = xs_vsprintf(fmt, args); | |
| 227 | + r = lib3270_vsprintf(fmt, args); | |
| 228 | 228 | va_end(args); |
| 229 | 229 | Error(NULL,r); |
| 230 | 230 | lib3270_free(r); | ... | ... |
src/lib3270/utilc.h
| ... | ... | @@ -35,8 +35,6 @@ LIB3270_INTERNAL char *strip_whitespace(const char *s); |
| 35 | 35 | LIB3270_INTERNAL char *xs_buffer(const char *fmt, ...) printflike(1, 2); |
| 36 | 36 | LIB3270_INTERNAL void xs_error(const char *fmt, ...) printflike(1, 2); |
| 37 | 37 | LIB3270_INTERNAL void xs_warning(const char *fmt, ...) printflike(1, 2); |
| 38 | -LIB3270_INTERNAL char * xs_vsprintf(const char *fmt, va_list args); | |
| 39 | - | |
| 40 | 38 | |
| 41 | 39 | LIB3270_INTERNAL void * AddInput(int, H3270 *session, void (*fn)(H3270 *session)); |
| 42 | 40 | LIB3270_INTERNAL void * AddExcept(int, H3270 *session, void (*fn)(H3270 *session)); | ... | ... |