1 2007-10-01 Werner Koch <wk@g10code.com>
3 * w32-afunix.c: Only keep the client related code.
4 (read_port_and_nonce): New. Taken from Assuan.
5 (_w32_sock_connect): Rewritten.
7 2007-08-29 Werner Koch <wk@g10code.com>
9 * argparse.c (initialize): Make strings translatable and remove
12 2007-08-24 Werner Koch <wk@g10code.com>
14 * mischelp.c (same_file_p): New.
15 (libjnlib_dummy_mischelp_func): Remove as we now always have one
18 2007-08-09 Werner Koch <wk@g10code.com>
20 * argparse.c (show_help): Expand the @EMAIL@ macro in the package
21 bug reporting address.
23 2007-08-02 Werner Koch <wk@g10code.com>
25 * t-stringhelp.c (test_compare_filenames): New.
27 * stringhelp.c (compare_filenames) [HAVE_DRIVE_LETTERS]: Fixed
28 comparison to take slash and backslash in account.
29 (make_filename): Avoid mixing / and \.
31 2007-07-04 Werner Koch <wk@g10code.com>
33 * utf8conv.c (load_libiconv): Remove URL from translatble string.
35 Switched JNLIB from LGPLv2.1 to LGPLv3.
37 2007-07-01 Werner Koch <wk@g10code.com>
39 * argparse.c (strusage): Use id 10 for the license string;
40 default to GPL3+. Change long note to version 3 or later.
41 (show_version): Print the license info.
43 2007-06-19 Werner Koch <wk@g10code.com>
45 * Makefile.am: Add support for regression tests.
46 * t-support.h, t-support.c: New.
47 * t-stringhelp.c: New.
49 * stringhelp.c (percent_escape): Add arg EXTRA to make it a more
50 general function. Changed all callers.
52 2007-06-18 Werner Koch <wk@g10code.com>
54 * w32-afunix.c (_w32_sock_bind): Changed to properly detect an
57 2007-06-18 Marcus Brinkmann <marcus@g10code.de>
59 * stringhelp.h (percent_escape): New prototype.
60 * stringhelp.c (percent_escape): New function.
62 2007-06-11 Werner Koch <wk@g10code.com>
64 * utf8conv.c (jnlib_iconv_open, jnlib_iconv, jnlib_iconv_close): New.
66 2007-06-06 Werner Koch <wk@g10code.com>
69 * w32-gettext.c: New. Taken from gnupg 1.4, added ngettext,
70 changed to use jnlib malloc functions and put under the LGPL.
71 * w32-reg.c: New. Taken from../common/w32reg.c and changed to
72 LGPL. Changed API to use the jnlib malloc functions.
73 * Makefile.am (libjnlib_a_SOURCES) [!W32]: Do not build the w32
76 * dotlock.c: Include stringhelp.h for stpcpy prototype.
78 2007-06-04 Werner Koch <wk@g10code.com>
80 * dynload.h: New. Taken from ../common and changed to LGPL.
82 * utf8conv.c (load_libiconv): New. Taken from GnuPG 1.4
84 2007-05-30 Werner Koch <wk@g10code.com>
86 * w32-pth.h, w32-pth.c: Remove.
88 2007-04-25 Werner Koch <wk@g10code.com>
90 * argparse.c (long_opt_strlen): Fixed for utf-8.
92 2007-03-07 Werner Koch <wk@g10code.com>
94 * argparse.c (strusage): Set copyright year to 2007.
96 2007-01-25 Werner Koch <wk@g10code.com>
98 * stringhelp.c (utf8_charcount): New.
100 2006-11-29 Werner Koch <wk@g10code.com>
102 * utf8conv.c (set_native_charset) [HAVE_W32_SYSTEM]: Fixed typo in
105 2006-11-15 Werner Koch <wk@g10code.com>
107 * logging.c (my_funopen_hook_ret_t): New.
108 (fun_writer): Use it.
110 2006-10-19 Werner Koch <wk@g10code.com>
112 * stringhelp.c (memrchr) [!HAVE_MEMRCHR]: Provide a replacement.
114 2006-09-27 Werner Koch <wk@g10code.com>
117 (timegm): Copied from gnupg 1.4, changed from GPL to LGPL. Fixed
120 * stringhelp.h (isascii): New.
122 * stringhelp.c (strsep): New. Copied from gnupg 1.4.5
125 * strlist.h (STRLIST): Removed deprecated typedef.
127 * types.h: Made cpp commands work with old compilers. Also shows
128 up nicer with Emacs' font locking.
130 * w32-afunix.c (_w32_sock_connect): Set ERRNO for an invalid port.
132 Changed license from GPL to LGPL. Note that all code has either
133 been written by me, David, employees of g10 Code or taken from
136 * libjnlib-config.h, stringhelp.c, stringhelp.h:
137 * strlist.c, strlist.h, utf8conv.c, utf8conv.h:
138 * argparse.c, argparse.h, logging.c, logging.h:
139 * dotlock.c, dotlock.h, types.h, mischelp.h:
140 * xmalloc.c, xmalloc.h, w32-pth.c, w32-pth.h:
141 * w32-afunix.c, w32-afunix.h: Tagged them to be long to jnlib
142 which is a part of GnuPG but also used by other projetcs.
144 2006-09-22 Werner Koch <wk@g10code.com>
146 * utf8conv.c: Reworked to match the gnupg 1.4.5 code. This now
147 requires iconv support but this is reasonable for all modern
150 2006-08-29 Werner Koch <wk@g10code.com>
152 * logging.c (do_logv): Emit a missing LF for fatal errors.
154 2006-06-28 Werner Koch <wk@g10code.com>
156 * dotlock.c (make_dotlock, release_dotlock, read_lockfile)
157 (maybe_deadlock, destroy_dotlock, create_dotlock): Re-indented.
158 (create_dotlock): Repalces some log_fatal by log_error as it was
159 not intended that they should terminate. Write the nodename to
160 the locking file. Code cleanups.
161 (read_lockfile): Reworked to read the node name.
162 (make_dotlock): Test for identical node name and delete lock stale
164 (release_dotlock): Likewise.
166 2006-05-23 Werner Koch <wk@g10code.com>
168 * libjnlib-config.h (JNLIB_NEED_UTF8CONV): Fixed typo in name.
170 * dotlock.c (release_dotlock): Don't act if we don't have any
172 (destroy_dotlock): New. From 1.4.3.
173 (dotlock_remove_lockfiles): Make use of destroy function.
175 2006-05-19 Werner Koch <wk@g10code.com>
177 * strlist.c (append_to_strlist2): Enabled.
179 * stringhelp.c (print_sanitized_buffer2): New. Changed the rules
180 to match the behaviour of print_string2 from gnupg 1.4.3.
181 (print_sanitized_buffer): Use the new function.
182 (print_sanitized_string2): New.
183 (hextobyte): New. Taken from gpg 1.4.3.
185 2006-04-28 Werner Koch <wk@g10code.com>
187 * stringhelp.c (print_sanitized_buffer): Fix bug where the count
188 got wrong for the \xNN representation.
189 (sanitize_buffer): Fix bug where some control characters lose part
190 of their \xNN representation.
192 2006-04-20 Werner Koch <wk@g10code.com>
194 * stringhelp.c (make_basename): New arg INPUTPATH for future
195 riscos compatibility.
197 2006-04-18 Werner Koch <wk@g10code.com>
199 * libjnlib-config.h (JNLIB_NEED_UTF8CONF): Defined.
200 * strlist.c (add_to_strlist2) [JNLIB_NEED_UTF8CONV]: Enabled.
202 2005-06-15 Werner Koch <wk@g10code.com>
204 * stringhelp.c (sanitize_buffer): Make P a void*.
205 (ascii_memistr, memistr): Ditto.
206 (ascii_memcasecmp): Ditto.
207 * logging.c (writen): Use void * for arg BUFFER.
208 * stringhelp.c (memistr): Fixed unsigned/signed pointer conflict.
209 (ascii_memistr): Ditto.
210 (ascii_memcasemem): Ditto.
211 * utf8conv.c (utf8_to_native): Ditto.
212 (utf8_to_native): Ditto.
213 * argparse.c (show_version): Removed non-required cast.
215 2005-01-19 Werner Koch <wk@g10code.com>
217 * logging.c (fun_writer): Don't fallback to stderr. Print to
218 stderr only if connected to a tty.
220 2004-12-20 Werner Koch <wk@g10code.com>
222 * w32-pth.c (do_pth_event_free): The events are hold in a ring
223 buffer. Adjust for that.
224 (do_pth_event_body): Ditto.
225 (pth_event_isolate): Ditto.
226 (do_pth_wait): Ditto.
227 (_pth_event_count): Renamed to ..
228 (event_count): .. and adjusted as above.
229 (pth_init): Define 3 debug levels and change all debug calls to
230 make use of them. This makes the moule now silent.
232 2004-12-19 Werner Koch <wk@g10code.com>
234 * w32-pth.c (pth_init): Enable debugging depending on env var.
236 (pth_mutex_release, pth_mutex_acquire): Implemented directly using
239 2004-12-18 Werner Koch <wk@g10code.com>
241 * w32-pth.c (pth_init): Reverse return values. Use TRUE and FALSE
243 (pth_kill, pth_mutex_acquire, pth_attr_set, pth_join, pth_cancel):
246 2004-12-15 Werner Koch <wk@g10code.com>
248 * logging.c [W32]: Don't include unavailable headers.
250 2004-12-14 Werner Koch <wk@g10code.com>
252 * w32-pth.c (_pth_strerror): Renamed to ...
253 (w32_strerror): .. this. And let callers provide a buffer.
254 (spawn_helper_thread): Removed HD arg and hardwire the stack size
256 (do_pth_wait): Removed use of ATTR; not needed for the helper
258 (helper_thread): Renamed to ..
259 (launch_thread): .. this. Release handle if not joinable.
260 (struct pth_priv_hd_s): Renamed to ...
261 (struct thread_info_s): .. this. Add member JOINABLE and TH.
263 2004-12-14 Timo Schulz <twoaday@g10code.com>
265 * w32-pth.c (pth_kill): Just release the crit section if
266 pth_init was really called. And set all handles to NULL.
267 (_pth_strerror): New.
268 (do_pth_wait): Before we enter the loop we check if there
269 are too much events in the ring.
271 2004-12-14 Werner Koch <wk@g10code.com>
273 * w32-pth.h (pth_event_occured): Removed macro.
274 * w32-pth.c: Fixed license statement; its under the LGPL.
275 (enter_pth, leave_pth): Use them to bracket almost all public
278 2004-12-13 Timo Schulz <twoaday@g10code.com>
280 * w32-pth.c (enter_pth, leave_pth): New.
281 (pth_init): Initialize global mutex section.
282 (pth_kill): Release global mutex section.
283 (helper_thread): New.
284 (pth_spawn): Make sure only one thread is running.
286 2004-12-13 Werner Koch <wk@g10code.com>
288 * stringhelp.c (w32_strerror) [W32]: New.
290 * w32-pth.c, w32-pth.h: Added real code written by Timo Schulz.
291 Not finished, though.
293 2004-12-07 Werner Koch <wk@g10code.com>
295 * w32-pth.c, w32-pth.h: New.
297 2004-11-26 Werner Koch <wk@g10code.com>
299 * logging.c [_WIN32]: Don't include socket headers.
301 2004-11-30 Timo Schulz <ts@g10code.com>
303 * w32-afunix.c: New. AF_UNIX emulation for W32.
304 * w32-afunix.h: Likewise.
306 2004-11-22 Werner Koch <wk@g10code.com>
308 * logging.c (log_test_fd): Add test on LOGSTREAM. Reported by
311 2004-11-18 Werner Koch <wk@g10code.com>
313 * logging.c: Explicitly include sys/stat.h for the S_I* constants.
315 2004-10-21 Werner Koch <wk@g10code.com>
317 * logging.c (do_logv): Use set_log_stream to setup a default.
318 (log_set_file): Factored code out to ..
319 (set_file_fd): .. New function to allow using a file descriptor.
320 (log_set_fd): Make use of new fucntion.
321 (fun_writer): Reworked.
323 2004-08-18 Werner Koch <wk@g10code.de>
325 * stringhelp.c (print_sanitized_utf8_string): Actually implement
328 2004-06-21 Werner Koch <wk@g10code.com>
330 * logging.c (log_set_file): Do not close an old logstream if it
331 used to be stderr or stdout.
333 2004-05-05 Werner Koch <wk@gnupg.org>
335 * logging.c (log_set_file): Oops, don't close if LOGSTREAM is NULL.
337 2004-04-30 Werner Koch <wk@gnupg.org>
339 * logging.c (log_set_file): Make sure the log stream will be
340 closed even if the stderr fileno will be assigned to a new socket.
342 2004-04-16 Werner Koch <wk@gnupg.org>
344 * logging.h (JNLIB_LOG_WITH_PREFIX): Add constants for the flag
346 * logging.c (log_set_prefix): New flag DETACHED.
347 (fun_writer): Take care of this flag.
350 2004-02-18 Werner Koch <wk@gnupg.org>
352 * stringhelp.c (print_sanitized_buffer): Don't care about
353 non-ASCII characaters.
354 (sanitize_buffer): Ditto.
356 2004-02-12 Werner Koch <wk@gnupg.org>
358 * Makefile.am: Replaced INCLUDES by AM_CPPFLAGS.
360 2004-01-05 Werner Koch <wk@gnupg.org>
362 * argparse.c (strusage): Changed default copyright year to 2004.
364 2003-12-17 Werner Koch <wk@gnupg.org>
366 * argparse.c (initialize): Replaced use of non-literal format
367 args. Suggested by Florian Weimer.
369 2003-12-16 Werner Koch <wk@gnupg.org>
371 * logging.c (writen, fun_writer, fun_closer): New.
372 (log_set_file): Add feature to log to a socket.
373 (log_set_file, do_logv): Force printing with prefix and pid.
375 2003-11-13 Werner Koch <wk@gnupg.org>
377 * strlist.c (strlist_copy): New.
379 * dotlock.c: Define DIRSEP_C et al. if not defined.
381 2003-11-06 Werner Koch <wk@gnupg.org>
383 * strlist.h (strlist_t): New. STRLIST is now deprecated.
385 2003-06-18 Werner Koch <wk@gnupg.org>
387 * strlist.c (strlist_pop): New.
389 * dotlock.c (dotlock_remove_lockfiles): Prefixed with dotlock_ and
392 2003-06-17 Werner Koch <wk@gnupg.org>
394 * stringhelp.c (length_sans_trailing_chars)
395 (length_sans_trailing_ws): New.
397 * logging.c (log_inc_errorcount): New.
399 * stringhelp.c (print_sanitized_utf8_buffer): Implement utf8
401 (sanitize_buffer): New. Based on gnupg 1.3.2 make_printable_string.
403 * dotlock.c: Updated to match the version from 1.3.2
404 * utf8conv.c: New. Code taken from strgutil.c of gnupg 1.3.2.
407 2003-06-16 Werner Koch <wk@gnupg.org>
409 * logging.c (do_logv): Hack to optionally suppress a leading space.
411 * stringhelp.c (ascii_strncasecmp): New. Taken from gnupg 1.3.
412 (ascii_memistr): New. Taken from gnupg 1.3
414 2003-06-13 Werner Koch <wk@gnupg.org>
416 * mischelp.h (wipememory2,wipememory): New. Taken from GnuPG 1.3.2.
418 2002-06-04 Werner Koch <wk@gnupg.org>
420 * stringhelp.c (print_sanitized_utf8_string): New. No real
421 implementation for now.
422 (print_sanitized_utf8_buffer): Ditto.
424 2002-04-04 Werner Koch <wk@gnupg.org>
426 * logging.c (log_get_prefix): New.
428 2002-03-15 Werner Koch <wk@gnupg.org>
430 * argparse.c (optfile_parse): Fixed missing argument handling.
432 2002-02-25 Werner Koch <wk@gnupg.org>
434 * stringhelp.c (ascii_memcasemem): New.
436 2002-02-14 Werner Koch <wk@gnupg.org>
438 * Makefile.am (INCLUDES): Add cflags for libgcrypt.
440 2002-02-07 Werner Koch <wk@gnupg.org>
442 * logging.c (log_set_fd): New.
444 * stringhelp.c (print_sanitized_buffer): New.
445 (print_sanitized_string): New.
447 2002-01-24 Werner Koch <wk@gnupg.org>
449 * argparse.c (strusage): Set default copyright notice year to 2002.
451 Fixed the copyright notice of this file, as it has always been
452 part of GnuPG and therefore belongs to the FSF.
454 2001-11-01 Marcus Brinkmann <marcus@g10code.de>
456 * logging.c (log_printf): Do not initialize ARG_PTR with 0, we
457 don't know the correct type. Instead, run va_start and va_end
459 Reported by Jose Carlos Garcia Sogo <jsogo@debian.org>.
461 2002-01-19 Werner Koch <wk@gnupg.org>
463 * logging.c (log_get_stream): New.
465 2001-12-05 Werner Koch <wk@gnupg.org>
467 * logging.c (log_set_prefix): New.
468 (do_logv): Include prefix and pid only if enabled. Print time only
469 when explicitly enabled.
471 * logging.h: Include log_logv() only when requested.
473 2001-11-06 Werner Koch <wk@gnupg.org>
475 * strlist.c, strlist.h: New. Taken from pgnupg/util/strgutil.c
477 2001-08-30 Werner Koch <wk@gnupg.org>
479 * logging.c (log_printf): Don't pass NULL instead of arg_ptr.
481 2001-07-19 Werner Koch <wk@gnupg.org>
483 * stringhelp.c (ascii_memistr,ascii_isupper,ascii_islower,
484 ascii_toupper,ascii_tolower, ascii_strcasecmp, ascii_memcasecmp): New.
486 2000-07-26 10:02:51 Werner Koch (wk@habibti.openit.de)
488 * stringhelp.c.: Add stdarg.h
489 * argparse.h: s/ulong/unsigned long/ although this should be defined
492 2000-06-28 19:40:23 Werner Koch (wk@habibti.openit.de)
494 * Makefile.am: Replaced second logging.c by .h
496 2000-05-24 08:58:15 Werner Koch (wk@habibti.openit.de)
498 * logging.c (log_get_errorcount): New.
500 2000-05-24 08:44:47 Werner Koch (wk@habibti.openit.de)
502 * stringhelp.c: Added a few filename related helper functions.
504 2000-05-11 18:04:43 Werner Koch (wk@habibti.openit.de)
506 * xmalloc.c (xstrcat2): Replaced stpcpy to quickly address W32
509 2000-05-02 19:43:38 Werner Koch (wk@habibti.openit.de)
511 * xmalloc.c (xstrcat2): New.
513 Mon Jan 24 13:04:28 CET 2000 Werner Koch <wk@gnupg.de>
517 * argparse.c, argparse.h, logging.c, logging.h:
518 * mischelp.h, stringhelp.c, stringhelp.h, xmalloc.c:
519 * xmalloc.h, dotlock.c: Moved from ../util to here.
521 * libjnlib-config.h: New.
523 * logging.c (log_set_file): New.
525 (do_logv): Add kludge to insert LFs.
528 ***********************************************************
529 * Please note that JNLIB is maintained as part of GnuPG. *
530 * You may find it source-copied in other packages. *
531 ***********************************************************
533 Copyright 2000, 2001, 2002, 2003, 2004,
534 2005, 2006, 2007 Free Software Foundation, Inc.
536 This file is free software; as a special exception the author gives
537 unlimited permission to copy and/or distribute it, with or without
538 modifications, as long as this notice is preserved.
540 This file is distributed in the hope that it will be useful, but
541 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
542 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.