Use cancel button in confirmation only if requested.
[gnupg.git] / jnlib / ChangeLog
blob5f00f8ebc37be1ce9869557e9e08d39428126ad2
1 2009-06-04  Werner Koch  <wk@g10code.com>
3         * mischelp.h: Include SUN_LEN etc also for W32.
5 2009-05-19  Werner Koch  <wk@g10code.com>
7         * mischelp.h: Define PF_LOCAL, AF_LOCAL and SUN_LEN if requested.
8         * logging.c (fun_writer): Use SUN_LEN to fix a Mac OS X freeze.
10 2009-03-25  Werner Koch  <wk@g10code.com>
12         * logging.c (fun_closer): Never close fd 2.
13         (set_file_fd): Close logstream early.
15 2009-02-25  Werner Koch  <wk@g10code.com>
17         * logging.c (get_tid_callback): New.
18         (do_logv): Use it.
19         (log_set_get_tid_callback): New.
21 2009-01-22  Werner Koch  <wk@g10code.com>
23         * t-support.c (gpg_err_code_from_errno) 
24         (gpg_err_code_from_syserror): New.
26 2008-11-20  Werner Koch  <wk@g10code.com>
28         * argparse.c (arg_parse): Fix last change.
30 2008-11-11  Werner Koch  <wk@g10code.com>
32         * argparse.h: Add a bunch of macros and constants.
33         * argparse.c: Use the new macros.  Re-indent the code.  Change
34         license back to LGPL 2.1.
36 2008-11-04  Werner Koch  <wk@g10code.com>
38         * w32-gettext.c: Merged with code from libgpg-error and rewrote
39         most parts.
41         * Makefile.am (AM_CFLAGS): Add -DJNLIB_IN_JNLIB.
43 2008-10-29  Werner Koch  <wk@g10code.com>
45         * stringhelp.c (make_filename): Implement using macros. Factor some
46         code out to ..
47         (change_slashes): New.
48         (make_filename_try): New.
50         * w32-gettext.c (gettext): Return if no domain is loaded.
51         Reported by Tom Pegios.
53 2008-10-28  Werner Koch  <wk@g10code.com>
55         * w32-gettext.c (gettext): Try the binary search if the string was
56         not found in the hash table.
58 2008-10-20  Werner Koch  <wk@g10code.com>
60         * w32-afunix.c (_w32_sock_connect): Mark ADDRLEN as unused.
62         * dotlock.c (release_dotlock): Do not mix declaration and code.
64         * stringhelp.c (make_basename): Silent gcc warning about unused arg.
65         * argparse.c (store_alias): Ditto.
66         (find_long_option): 
68 2008-10-15  Werner Koch  <wk@g10code.com>
70         * logging.c (do_logv) [W32]: Flush the log stream.
72 2008-09-29  Werner Koch  <wk@g10code.com>
74         * argparse.c (ARGERR_): Use constants for error values.
75         (optfile_parse): Prettify.  Replace xmalloc and xrealloc by malloc
76         and realloc.
77         * libjnlib-config.h (jnlib_strdup, jnlib_realloc): New.
79 2008-06-26  Werner Koch  <wk@g10code.com>
81         * stringhelp.c (print_sanitized_buffer2): Loose check for control
82         characters to better cope with utf-8.  The range 0x80..0x9f is
83         nowadays not anymore accidently used for control charaters.
85 2008-06-13  Werner Koch  <wk@g10code.com>
87         * dotlock.c: Reformat code and implement locking for W32.
88         (create_dotlock): Use snprintf.
90 2008-06-11  Werner Koch  <wk@g10code.com>
92         * utf8conv.c: Remove useless variable ACTIVE_CHARSET.  Suggested
93         by Petr Uzel.
95 2008-05-26  Werner Koch  <wk@g10code.com>
97         * argparse.c (usage): Make sure to print a trailing LF for usage(1).
99 2008-04-08  Werner Koch  <wk@g10code.com>
101         * w32-gettext.c (gettext_select_utf8): New.
102         (get_string): Support switching encodings.
103         (load_domain): Allocate space for DATA_NATIVE.
105 2008-03-25  Werner Koch  <wk@g10code.com>
107         * w32-gettext.c (_nl_locale_name): New.  Taken from
108         ../common/localename and GNU gettext's localename.c.
109         (set_gettext_file): Rewritten.
110         (gettext_localename): New.
112 2008-03-17  Werner Koch  <wk@g10code.com>
114         * logging.c (my_funopen_hook_size_t): New.
115         (fun_writer): Use it to cope with fopencookie/funopen differences.
116         * dotlock.c (read_lockfile): Initialize PID.  Reported by Stéphane
117         Corthésy.
119 2008-02-22  Werner Koch  <wk@g10code.com>
121         * argparse.c (strusage): Set copyright year to 2008.
123 2007-11-19  Werner Koch  <wk@g10code.com>
125         * stringhelp.c (percent_escape): Factor code out to
126         (do_percent_escape): .. new.
127         (try_percent_escape): New.
129 2007-10-01  Werner Koch  <wk@g10code.com>
131         * w32-afunix.c: Only keep the client related code.
132         (read_port_and_nonce): New.  Taken from Assuan.
133         (_w32_sock_connect): Rewritten.
135 2007-08-29  Werner Koch  <wk@g10code.com>
137         * argparse.c (initialize): Make strings translatable and remove
138         extra LF.
140 2007-08-24  Werner Koch  <wk@g10code.com>
142         * mischelp.c (same_file_p): New.
143         (libjnlib_dummy_mischelp_func): Remove as we now always have one
144         function.
146 2007-08-09  Werner Koch  <wk@g10code.com>
148         * argparse.c (show_help): Expand the @EMAIL@ macro in the package
149         bug reporting address.
151 2007-08-02  Werner Koch  <wk@g10code.com>
153         * t-stringhelp.c (test_compare_filenames): New.
155         * stringhelp.c (compare_filenames) [HAVE_DRIVE_LETTERS]: Fixed
156         comparison to take slash and backslash in account.
157         (make_filename): Avoid mixing / and \.
159 2007-07-04  Werner Koch  <wk@g10code.com>
161         * utf8conv.c (load_libiconv): Remove URL from translatble string.
163         Switched JNLIB from LGPLv2.1 to LGPLv3.
165 2007-07-01  Werner Koch  <wk@g10code.com>
167         * argparse.c (strusage): Use id 10 for the license string;
168         default to GPL3+.  Change long note to version 3 or later.
169         (show_version): Print the license info.
171 2007-06-19  Werner Koch  <wk@g10code.com>
173         * Makefile.am: Add support for regression tests.
174         * t-support.h, t-support.c: New.
175         * t-stringhelp.c: New.
177         * stringhelp.c (percent_escape): Add arg EXTRA to make it a more
178         general function.  Changed all callers.
180 2007-06-18  Werner Koch  <wk@g10code.com>
182         * w32-afunix.c (_w32_sock_bind): Changed to properly detect an
183         already used socket.
185 2007-06-18  Marcus Brinkmann  <marcus@g10code.de>
187         * stringhelp.h (percent_escape): New prototype.
188         * stringhelp.c (percent_escape): New function.
190 2007-06-11  Werner Koch  <wk@g10code.com>
192         * utf8conv.c (jnlib_iconv_open, jnlib_iconv, jnlib_iconv_close): New.
194 2007-06-06  Werner Koch  <wk@g10code.com>
196         * w32help.h: New.
197         * w32-gettext.c: New.  Taken from gnupg 1.4, added ngettext,
198         changed to use jnlib malloc functions and put under the LGPL.
199         * w32-reg.c: New.  Taken from../common/w32reg.c and changed to
200         LGPL.  Changed API to use the jnlib malloc functions.
201         * Makefile.am (libjnlib_a_SOURCES) [!W32]: Do not build the w32
202         specific modules.
204         * dotlock.c: Include stringhelp.h for stpcpy prototype.
206 2007-06-04  Werner Koch  <wk@g10code.com>
208         * dynload.h: New.  Taken from ../common and changed to LGPL.
210         * utf8conv.c (load_libiconv): New.  Taken from GnuPG 1.4
212 2007-05-30  Werner Koch  <wk@g10code.com>
214         * w32-pth.h, w32-pth.c: Remove.
216 2007-04-25  Werner Koch  <wk@g10code.com>
218         * argparse.c (long_opt_strlen): Fixed for utf-8.
220 2007-03-07  Werner Koch  <wk@g10code.com>
222         * argparse.c (strusage): Set copyright year to 2007.
224 2007-01-25  Werner Koch  <wk@g10code.com>
226         * stringhelp.c (utf8_charcount): New.
228 2006-11-29  Werner Koch  <wk@g10code.com>
230         * utf8conv.c (set_native_charset) [HAVE_W32_SYSTEM]: Fixed typo in
231         macro name.
233 2006-11-15  Werner Koch  <wk@g10code.com>
235         * logging.c (my_funopen_hook_ret_t): New.
236         (fun_writer): Use it.
238 2006-10-19  Werner Koch  <wk@g10code.com>
240         * stringhelp.c (memrchr) [!HAVE_MEMRCHR]: Provide a replacement.
242 2006-09-27  Werner Koch  <wk@g10code.com>
244         * mischelp.c: New.
245         (timegm): Copied from gnupg 1.4, changed from GPL to LGPL.  Fixed
246         a memory leak.
248         * stringhelp.h (isascii): New.
250         * stringhelp.c (strsep): New. Copied from gnupg 1.4.5
251         util/strgutil.c.
253         * strlist.h (STRLIST): Removed deprecated typedef. 
255         * types.h: Made cpp commands work with old compilers.  Also shows
256         up nicer with Emacs' font locking.
258         * w32-afunix.c (_w32_sock_connect): Set ERRNO for an invalid port.
260         Changed license from GPL to LGPL.  Note that all code has either
261         been written by me, David, employees of g10 Code or taken from
262         glibc.
263         
264         * libjnlib-config.h, stringhelp.c, stringhelp.h:
265         * strlist.c, strlist.h, utf8conv.c, utf8conv.h:
266         * argparse.c, argparse.h, logging.c, logging.h:
267         * dotlock.c, dotlock.h, types.h, mischelp.h:
268         * xmalloc.c, xmalloc.h, w32-pth.c, w32-pth.h:
269         * w32-afunix.c, w32-afunix.h: Tagged them to be long to jnlib
270         which is a part of GnuPG but also used by other projetcs. 
272 2006-09-22  Werner Koch  <wk@g10code.com>
274         * utf8conv.c: Reworked to match the gnupg 1.4.5 code.  This now
275         requires iconv support but this is reasonable for all modern
276         systems.
278 2006-08-29  Werner Koch  <wk@g10code.com>
280         * logging.c (do_logv): Emit a missing LF for fatal errors.
282 2006-06-28  Werner Koch  <wk@g10code.com>
284         * dotlock.c (make_dotlock, release_dotlock, read_lockfile)
285         (maybe_deadlock, destroy_dotlock, create_dotlock): Re-indented.
286         (create_dotlock): Repalces some log_fatal by log_error as it was
287         not intended that they should terminate.  Write the nodename to
288         the locking file. Code cleanups.
289         (read_lockfile): Reworked to read the node name.
290         (make_dotlock): Test for identical node name and delete lock stale
291         file.
292         (release_dotlock): Likewise.
294 2006-05-23  Werner Koch  <wk@g10code.com>
296         * libjnlib-config.h (JNLIB_NEED_UTF8CONV): Fixed typo in name.
298         * dotlock.c (release_dotlock): Don't act if we don't have any
299         locks at all.
300         (destroy_dotlock): New.  From 1.4.3.
301         (dotlock_remove_lockfiles): Make use of destroy function.
303 2006-05-19  Werner Koch  <wk@g10code.com>
305         * strlist.c (append_to_strlist2): Enabled.
307         * stringhelp.c (print_sanitized_buffer2): New.  Changed the rules
308         to match the behaviour of print_string2 from gnupg 1.4.3.
309         (print_sanitized_buffer): Use the new function.
310         (print_sanitized_string2): New.
311         (hextobyte): New.  Taken from gpg 1.4.3.
313 2006-04-28  Werner Koch  <wk@g10code.com>
315         * stringhelp.c (print_sanitized_buffer): Fix bug where the count
316         got wrong for the \xNN representation.
317         (sanitize_buffer): Fix bug where some control characters lose part
318         of their \xNN representation.
320 2006-04-20  Werner Koch  <wk@g10code.com>
322         * stringhelp.c (make_basename): New arg INPUTPATH for future
323         riscos compatibility.
325 2006-04-18  Werner Koch  <wk@g10code.com>
327         * libjnlib-config.h (JNLIB_NEED_UTF8CONF): Defined.
328         * strlist.c (add_to_strlist2) [JNLIB_NEED_UTF8CONV]: Enabled.
330 2005-06-15  Werner Koch  <wk@g10code.com>
332         * stringhelp.c (sanitize_buffer): Make P a void*.
333         (ascii_memistr, memistr): Ditto.
334         (ascii_memcasecmp): Ditto.
335         * logging.c (writen): Use void * for arg BUFFER.
336         * stringhelp.c (memistr): Fixed unsigned/signed pointer conflict.
337         (ascii_memistr): Ditto.
338         (ascii_memcasemem): Ditto.
339         * utf8conv.c (utf8_to_native): Ditto.
340         (utf8_to_native): Ditto.
341         * argparse.c (show_version): Removed non-required cast.
343 2005-01-19  Werner Koch  <wk@g10code.com>
345         * logging.c (fun_writer): Don't fallback to stderr. Print to
346         stderr only if connected to a tty.
348 2004-12-20  Werner Koch  <wk@g10code.com>
350         * w32-pth.c (do_pth_event_free): The events are hold in a ring
351         buffer.  Adjust for that.
352         (do_pth_event_body): Ditto.
353         (pth_event_isolate): Ditto.
354         (do_pth_wait): Ditto.
355         (_pth_event_count): Renamed to ..
356         (event_count): .. and adjusted as above.
357         (pth_init): Define 3 debug levels and change all debug calls to
358         make use of them.  This makes the moule now silent.
360 2004-12-19  Werner Koch  <wk@g10code.com>
362         * w32-pth.c (pth_init): Enable debugging depending on env var.
363         (pth_self): New.
364         (pth_mutex_release, pth_mutex_acquire): Implemented directly using
365         the W32 API.
367 2004-12-18  Werner Koch  <wk@g10code.com>
369         * w32-pth.c (pth_init): Reverse return values.  Use TRUE and FALSE
370         constants.
371         (pth_kill, pth_mutex_acquire, pth_attr_set, pth_join, pth_cancel):
372         Ditto.
374 2004-12-15  Werner Koch  <wk@g10code.com>
376         * logging.c [W32]: Don't include unavailable headers.
378 2004-12-14  Werner Koch  <wk@g10code.com>
380         * w32-pth.c (_pth_strerror): Renamed to ...
381         (w32_strerror): .. this. And let callers provide a buffer.
382         (spawn_helper_thread): Removed HD arg and hardwire the stack size
383         to 32k.
384         (do_pth_wait): Removed use of ATTR; not needed for the helper
385         threads.
386         (helper_thread): Renamed to ..
387         (launch_thread): .. this.  Release handle if not joinable.
388         (struct pth_priv_hd_s): Renamed to ...
389         (struct thread_info_s): .. this.  Add member JOINABLE and TH.
391 2004-12-14  Timo Schulz  <twoaday@g10code.com>
393         * w32-pth.c (pth_kill): Just release the crit section if
394         pth_init was really called. And set all handles to NULL.
395         (_pth_strerror): New.
396         (do_pth_wait): Before we enter the loop we check if there
397         are too much events in the ring.
398         
399 2004-12-14  Werner Koch  <wk@g10code.com>
401         * w32-pth.h (pth_event_occured): Removed macro. 
402         * w32-pth.c: Fixed license statement; its under the LGPL.
403         (enter_pth, leave_pth): Use them to bracket almost all public
404         functions.
406 2004-12-13  Timo Schulz  <twoaday@g10code.com>
408         * w32-pth.c (enter_pth, leave_pth): New.
409         (pth_init): Initialize global mutex section.
410         (pth_kill): Release global mutex section.
411         (helper_thread): New.
412         (pth_spawn): Make sure only one thread is running.
413         
414 2004-12-13  Werner Koch  <wk@g10code.com>
416         * stringhelp.c (w32_strerror) [W32]: New.
418         * w32-pth.c, w32-pth.h: Added real code written by Timo Schulz.
419         Not finished, though.
421 2004-12-07  Werner Koch  <wk@g10code.com>
423         * w32-pth.c, w32-pth.h: New.
425 2004-11-26  Werner Koch  <wk@g10code.com>
427         * logging.c [_WIN32]: Don't include socket headers.
429 2004-11-30  Timo Schulz  <ts@g10code.com>
431         * w32-afunix.c: New. AF_UNIX emulation for W32.
432         * w32-afunix.h: Likewise.
433         
434 2004-11-22  Werner Koch  <wk@g10code.com>
436         * logging.c (log_test_fd): Add test on LOGSTREAM.  Reported by
437         Barry Schwartz.
439 2004-11-18  Werner Koch  <wk@g10code.com>
441         * logging.c: Explicitly include sys/stat.h for the S_I* constants.
443 2004-10-21  Werner Koch  <wk@g10code.com>
445         * logging.c (do_logv): Use set_log_stream to setup a default.
446         (log_set_file): Factored code out to ..
447         (set_file_fd): .. New function to allow using a file descriptor.
448         (log_set_fd): Make use of new fucntion.
449         (fun_writer): Reworked.
451 2004-08-18  Werner Koch  <wk@g10code.de>
453         * stringhelp.c (print_sanitized_utf8_string): Actually implement
454         it.
456 2004-06-21  Werner Koch  <wk@g10code.com>
458         * logging.c (log_set_file): Do not close an old logstream if it
459         used to be stderr or stdout.
461 2004-05-05  Werner Koch  <wk@gnupg.org>
463         * logging.c (log_set_file): Oops, don't close if LOGSTREAM is NULL.
465 2004-04-30  Werner Koch  <wk@gnupg.org>
467         * logging.c (log_set_file): Make sure the log stream will be
468         closed even if the stderr fileno will be assigned to a new socket.
470 2004-04-16  Werner Koch  <wk@gnupg.org>
472         * logging.h (JNLIB_LOG_WITH_PREFIX): Add constants for the flag
473         values.
474         * logging.c (log_set_prefix): New flag DETACHED.
475         (fun_writer): Take care of this flag.
476         (log_test_fd): New.
478 2004-02-18  Werner Koch  <wk@gnupg.org>
480         * stringhelp.c (print_sanitized_buffer): Don't care about
481         non-ASCII characaters.
482         (sanitize_buffer): Ditto.
484 2004-02-12  Werner Koch  <wk@gnupg.org>
486         * Makefile.am: Replaced INCLUDES by AM_CPPFLAGS.
488 2004-01-05  Werner Koch  <wk@gnupg.org>
490         * argparse.c (strusage): Changed default copyright year to 2004.
492 2003-12-17  Werner Koch  <wk@gnupg.org>
494         * argparse.c (initialize): Replaced use of non-literal format
495         args.  Suggested by Florian Weimer.
497 2003-12-16  Werner Koch  <wk@gnupg.org>
499         * logging.c (writen, fun_writer, fun_closer): New.
500         (log_set_file): Add feature to log to a socket.
501         (log_set_file, do_logv): Force printing with prefix and pid.
503 2003-11-13  Werner Koch  <wk@gnupg.org>
505         * strlist.c (strlist_copy): New.
507         * dotlock.c: Define DIRSEP_C et al. if not defined.
509 2003-11-06  Werner Koch  <wk@gnupg.org>
511         * strlist.h (strlist_t): New. STRLIST is now deprecated.
513 2003-06-18  Werner Koch  <wk@gnupg.org>
515         * strlist.c (strlist_pop): New.
517         * dotlock.c (dotlock_remove_lockfiles): Prefixed with dotlock_ and
518         made global.
520 2003-06-17  Werner Koch  <wk@gnupg.org>
522         * stringhelp.c (length_sans_trailing_chars)
523         (length_sans_trailing_ws): New.
525         * logging.c (log_inc_errorcount): New.
527         * stringhelp.c (print_sanitized_utf8_buffer): Implement utf8
528         conversion.
529         (sanitize_buffer): New. Based on gnupg 1.3.2 make_printable_string.
531         * dotlock.c: Updated to match the version from 1.3.2
532         * utf8conv.c: New.  Code taken from strgutil.c of gnupg 1.3.2.
533         * utf8conv.h: New.
535 2003-06-16  Werner Koch  <wk@gnupg.org>
537         * logging.c (do_logv): Hack to optionally suppress a leading space.
539         * stringhelp.c (ascii_strncasecmp): New.  Taken from gnupg 1.3.
540         (ascii_memistr): New. Taken from gnupg 1.3
542 2003-06-13  Werner Koch  <wk@gnupg.org>
544         * mischelp.h (wipememory2,wipememory): New. Taken from GnuPG 1.3.2. 
546 2002-06-04  Werner Koch  <wk@gnupg.org>
548         * stringhelp.c (print_sanitized_utf8_string): New.  No real
549         implementation for now.
550         (print_sanitized_utf8_buffer): Ditto.
552 2002-04-04  Werner Koch  <wk@gnupg.org>
554         * logging.c (log_get_prefix): New.
556 2002-03-15  Werner Koch  <wk@gnupg.org>
558         * argparse.c (optfile_parse): Fixed missing argument handling.
560 2002-02-25  Werner Koch  <wk@gnupg.org>
562         * stringhelp.c (ascii_memcasemem): New.
564 2002-02-14  Werner Koch  <wk@gnupg.org>
566         * Makefile.am (INCLUDES): Add cflags for libgcrypt.
568 2002-02-07  Werner Koch  <wk@gnupg.org>
570         * logging.c (log_set_fd): New.
572         * stringhelp.c (print_sanitized_buffer): New.
573         (print_sanitized_string): New.
575 2002-01-24  Werner Koch  <wk@gnupg.org>
577         * argparse.c (strusage): Set default copyright notice year to 2002.
579         Fixed the copyright notice of this file, as it has always been
580         part of GnuPG and therefore belongs to the FSF.
582 2001-11-01  Marcus Brinkmann  <marcus@g10code.de>
584         * logging.c (log_printf): Do not initialize ARG_PTR with 0, we
585         don't know the correct type.  Instead, run va_start and va_end
586         unconditionally.
587         Reported by Jose Carlos Garcia Sogo <jsogo@debian.org>.
589 2002-01-19  Werner Koch  <wk@gnupg.org>
591         * logging.c (log_get_stream): New.
593 2001-12-05  Werner Koch  <wk@gnupg.org>
595         * logging.c (log_set_prefix): New.
596         (do_logv): Include prefix and pid only if enabled. Print time only
597         when explicitly enabled.
598         (log_logv): New.  
599         * logging.h: Include log_logv() only when requested.
601 2001-11-06  Werner Koch  <wk@gnupg.org>
603         * strlist.c, strlist.h: New. Taken from pgnupg/util/strgutil.c
605 2001-08-30  Werner Koch  <wk@gnupg.org>
607         * logging.c (log_printf): Don't pass NULL instead of arg_ptr.
609 2001-07-19  Werner Koch  <wk@gnupg.org>
611         * stringhelp.c (ascii_memistr,ascii_isupper,ascii_islower,
612         ascii_toupper,ascii_tolower, ascii_strcasecmp, ascii_memcasecmp): New.
614 2000-07-26 10:02:51  Werner Koch  (wk@habibti.openit.de)
616         * stringhelp.c.: Add stdarg.h
617         * argparse.h: s/ulong/unsigned long/ although this should be defined
618         by types.h.
620 2000-06-28 19:40:23  Werner Koch  (wk@habibti.openit.de)
622         * Makefile.am: Replaced second logging.c by .h
624 2000-05-24 08:58:15  Werner Koch  (wk@habibti.openit.de)
626         * logging.c (log_get_errorcount): New.
628 2000-05-24 08:44:47  Werner Koch  (wk@habibti.openit.de)
630         * stringhelp.c: Added a few filename related helper functions.
632 2000-05-11 18:04:43  Werner Koch  (wk@habibti.openit.de)
634         * xmalloc.c (xstrcat2): Replaced stpcpy to quickly address W32
635         problems.
637 2000-05-02 19:43:38  Werner Koch  (wk@habibti.openit.de)
639         * xmalloc.c (xstrcat2): New.
641 Mon Jan 24 13:04:28 CET 2000  Werner Koch  <wk@gnupg.de>
643         * README: New.
644         * Makefile.am: new.
645         * argparse.c, argparse.h, logging.c, logging.h:
646         * mischelp.h, stringhelp.c, stringhelp.h, xmalloc.c:
647         * xmalloc.h, dotlock.c: Moved from ../util to here.
648         * dotlock.h: New.
649         * libjnlib-config.h: New.
651         * logging.c (log_set_file): New.
652         (log_printf): New.
653         (do_logv): Add kludge to insert LFs.
656      ***********************************************************
657      * Please note that JNLIB is maintained as part of GnuPG.  *
658      * You may find it source-copied in other packages.        *
659      ***********************************************************        
660         
661  Copyright 2000, 2001, 2002, 2003, 2004,
662            2005, 2006, 2007, 2008 Free Software Foundation, Inc.
664  This file is free software; as a special exception the author gives
665  unlimited permission to copy and/or distribute it, with or without
666  modifications, as long as this notice is preserved.
668  This file is distributed in the hope that it will be useful, but
669  WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
670  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.