chiark / gitweb /
mLib
6 years agocodec/{base32,hex}.h: Include `codec.h'. 2.2.0.1
Mark Wooding [Sat, 12 Jan 2013 18:50:00 +0000 (18:50 +0000)]
codec/{base32,hex}.h: Include `codec.h'.

Brown paper-bag.  Release 2.2.0.1.

6 years agoRelease 2.2.0. Yay. 2.2.0
Mark Wooding [Wed, 9 Jan 2013 19:17:09 +0000 (19:17 +0000)]
Release 2.2.0.  Yay.

6 years agosel/sig.c: Discard return value without provoking other warnings.
Mark Wooding [Sat, 20 Oct 2012 11:58:56 +0000 (12:58 +0100)]
sel/sig.c: Discard return value without provoking other warnings.

6 years agosig.c: Ignore return code from write(2) to pipe.
Mark Wooding [Sun, 30 May 2010 14:31:30 +0000 (15:31 +0100)]
sig.c: Ignore return code from write(2) to pipe.

We get warnings nowadays about this.  These are annoying.  The only
thing that can go wrong is that the pipe is already full, so the write
will block.  But if that happens, our job is already done: the select(2)
loop will certainly wake up soon because the pipe is full of stuff to be
read.  So ignoring the error here is harmless.

Insert a stupid bodge to shut the compiler up.

6 years agoBuild system: Use Automake 1.11 `silent-rules'.
Mark Wooding [Sat, 22 May 2010 12:49:44 +0000 (13:49 +0100)]
Build system: Use Automake 1.11 `silent-rules'.

6 years agoInfrastructure: Switch testing over to Autotest.
Mark Wooding [Mon, 4 May 2009 00:38:20 +0000 (01:38 +0100)]
Infrastructure: Switch testing over to Autotest.

Currently mLib testing is a hopeless mess.  Maybe this will help sort it
out.

Some minor fixing was applied to the data-structure tests:

  * assoc and sym needed fixing to avoid corrupting their internal
    table-size count.  There are now additional assertions that this
    internal count matches the hash table's own count.

  * darray needed fixing to report empty-array on `first' and `last'
    requests.

6 years agocodec, baseconv: Cleanup of the various binary encoding functions.
Mark Wooding [Sun, 3 May 2009 00:44:57 +0000 (01:44 +0100)]
codec, baseconv: Cleanup of the various binary encoding functions.

The new codec interface provides an object-based interface to binary
encodings.

The baseconv code is a new unified implementation of Base64, Base32 and
hex encoding and decoding, built from a digit-at-a-time base conversion
core.  It implements a number of variations on the basic encodings,
including the URL-and-filename-safe variant.

I've adapted the current tests to use the new test program, but that's
not long for this world.

6 years agoprecomp: New directory for precomputed files.
Mark Wooding [Sun, 3 May 2009 00:42:39 +0000 (01:42 +0100)]
precomp: New directory for precomputed files.

The `precomp' directory in the distribution tarball contains pre-built
tables, for CRC and unihash computations.  Distributing the tables means
that the library can be built by cross-compilers.  Indeed, we don't even
try to generate the tables if cross compilation is detected.

The precomp directory shouldn't exist in revision-control, but it's
populated during the build process if necessary, and it's distributed in
release tarballs.

6 years agoInfrastructure: Split the files into subdirectories.
Mark Wooding [Sun, 3 May 2009 00:40:25 +0000 (01:40 +0100)]
Infrastructure: Split the files into subdirectories.

This makes the file tree rather easier to work with.

6 years agoHeaders: Guard inclusion of mLib headers.
Mark Wooding [Sun, 3 May 2009 00:40:25 +0000 (01:40 +0100)]
Headers: Guard inclusion of mLib headers.

A number of headers include other mLib headers without #ifndef guards.
This will slow down compilation slightly on some (less sensible)
compilers.

6 years agoInfrastructure: Strip away crufty CVS $Id$ tags.
Mark Wooding [Sun, 3 May 2009 00:40:24 +0000 (01:40 +0100)]
Infrastructure: Strip away crufty CVS $Id$ tags.

6 years agodebian: Prepare stuff for new version.
Mark Wooding [Sat, 20 Oct 2012 11:36:28 +0000 (12:36 +0100)]
debian: Prepare stuff for new version.

6 years agobres: Use mdup to duplicate file descriptors for the child.
Mark Wooding [Sun, 4 Jan 2009 17:30:40 +0000 (17:30 +0000)]
bres: Use mdup to duplicate file descriptors for the child.

6 years agomdup.h: Remove spurious duplicate summary line from comment.
Mark Wooding [Tue, 4 Sep 2012 15:50:18 +0000 (16:50 +0100)]
mdup.h: Remove spurious duplicate summary line from comment.

7 years agoRelease version 2.1.1. 2.1.1
Mark Wooding [Sat, 5 May 2012 11:04:06 +0000 (12:04 +0100)]
Release version 2.1.1.

7 years agobuf.c: Step over terminating null byte.
Mark Wooding [Sat, 5 May 2012 12:00:26 +0000 (13:00 +0100)]
buf.c: Step over terminating null byte.

7 years agobuf.h: Spurious `\' prevents declaration of `buf_putstr*'.
Mark Wooding [Sat, 5 May 2012 10:59:19 +0000 (11:59 +0100)]
buf.h: Spurious `\' prevents declaration of `buf_putstr*'.

7 years agoMakefile.am: Use $(mkdir_p) instead of $(mkinstalldirs).
Mark Wooding [Sat, 25 Jun 2011 13:00:42 +0000 (14:00 +0100)]
Makefile.am: Use $(mkdir_p) instead of $(mkinstalldirs).

It works, for one thing.  For some reason, mkinstalldirs is set to
$(SHELL) $(install_sh), and install_sh is set to $(SHELL) .../install_sh.
Can you see the problem here?

10 years agoCommit as 2.1.0. 2.1.0
Mark Wooding [Sun, 4 Jan 2009 16:29:45 +0000 (16:29 +0000)]
Commit as 2.1.0.

10 years agoMerge branch 'work'
Mark Wooding [Sun, 4 Jan 2009 16:27:13 +0000 (16:27 +0000)]
Merge branch 'work'

* work:
  mdup: New unit for juggling file descriptors.
  align: Add trivial manpage.
  Manpages: Move manpages (back?) into the top-level directory.

10 years agomdup: New unit for juggling file descriptors.
Mark Wooding [Sun, 4 Jan 2009 13:53:42 +0000 (13:53 +0000)]
mdup: New unit for juggling file descriptors.

The mdup function solves the problem of incorrect file descriptor
renumbering in fork/exec.

10 years agoMerge branch 'master' of /home/mdw/public-git/mLib
Mark Wooding [Sun, 4 Jan 2009 14:27:44 +0000 (14:27 +0000)]
Merge branch 'master' of /home/mdw/public-git/mLib

* 'master' of /home/mdw/public-git/mLib:
  Brown-paper-bag fixes.

10 years agoalign: Add trivial manpage.
Mark Wooding [Sun, 4 Jan 2009 13:50:14 +0000 (13:50 +0000)]
align: Add trivial manpage.

I discovered while reorganizing the manpage build system that there was
no manual for align.h.

10 years agoManpages: Move manpages (back?) into the top-level directory.
Mark Wooding [Sun, 4 Jan 2009 13:40:55 +0000 (13:40 +0000)]
Manpages: Move manpages (back?) into the top-level directory.

I missed man/Makefile.am in the build-system cleanup.  Rather than clean
it up separately, it seemed much better to group manpages with their
source files in the top-level Makefile.  So: mLib now has a completely
flat directory structure, except for config/.

10 years agoMakefile: Use check_PROGRAMS target.
Mark Wooding [Sun, 4 Jan 2009 01:51:59 +0000 (01:51 +0000)]
Makefile: Use check_PROGRAMS target.

This saves building the test programs if we don't actually need them.

10 years agoBrown-paper-bag fixes. 2.0.7
Mark Wooding [Sun, 28 Dec 2008 19:22:54 +0000 (19:22 +0000)]
Brown-paper-bag fixes.

  * Use `mLib' rather than `mlib' as the tarball name.  Otherwise, the
    header files end up in /use/include/mlib and nothing can find them.

  * Actually include `config.h' in the necessary places.

10 years agoRelease 2.0.6. 2.0.6
Mark Wooding [Sat, 27 Dec 2008 13:44:29 +0000 (13:44 +0000)]
Release 2.0.6.

10 years agosym-gtest: Don't include empty words.
Mark Wooding [Sat, 27 Dec 2008 14:26:02 +0000 (14:26 +0000)]
sym-gtest: Don't include empty words.

An empty word in a command like `set LABEL' provokes a segfault from
sym-test -- not entirely unreasonably considering that sym-test is a
quick lash-up and not intended to be robust against bogus test scripts.
So filter them out in advance.

10 years agoBuild: Overhaul build system.
Mark Wooding [Sat, 27 Dec 2008 00:08:35 +0000 (00:08 +0000)]
Build: Overhaul build system.

This has now moved a lot of the way towards the mLib-3 build system,
using appending and Automake conditionals.  The whole thing looks much
cleaner now.

10 years agodebian: Replace Debian build system with CDBS.
Mark Wooding [Sat, 27 Dec 2008 00:02:57 +0000 (00:02 +0000)]
debian: Replace Debian build system with CDBS.

Somewhat fiddly to get the ADNS build to work, but still simpler than
the one before.

10 years agoBuild: Put build utilities in the config/ subdirectory.
Mark Wooding [Fri, 26 Dec 2008 18:11:57 +0000 (18:11 +0000)]
Build: Put build utilities in the config/ subdirectory.

Leaving AC_CONFIG_AUX_DIR unspecified causes auto* to look for the
various utilities in parent directories, which breaks mdw-build.  I
could explicitly set AC_CONFIG_AUX_DIR to `.', but that misses an
opportunity to tidy up.

10 years agoMakefile: Ship versioncmp.in.
Mark Wooding [Fri, 26 Dec 2008 14:54:09 +0000 (14:54 +0000)]
Makefile: Ship versioncmp.in.

11 years agoversioncmp: Fix for `~' characters. 2.0.5
Mark Wooding [Wed, 14 May 2008 14:13:39 +0000 (15:13 +0100)]
versioncmp: Fix for `~' characters.

In the Debian version number ordering, `~' compares before end-of-
string.  Fix the function to actually cope with this, and introduce test
cases to make sure we actually get it right.

This is release 2.0.5.

11 years agoInfrastructure: Export pkgconfig file. 2.0.4
Mark Wooding [Mon, 17 Mar 2008 18:02:17 +0000 (18:02 +0000)]
Infrastructure: Export pkgconfig file.

This should keep us going while mLib-3 is worked on.

11 years agotestrig: Provide useful interface for more complicated test rigs.
Mark Wooding [Sat, 9 Feb 2008 19:54:08 +0000 (19:54 +0000)]
testrig: Provide useful interface for more complicated test rigs.

Provide a lower-level interface to the test-vector processing machinery,
and introduce `suites' over the top of the existing chunks.

12 years agocleanup: All the whitespace fixes, all at once.
Mark Wooding [Sun, 28 Jan 2007 22:56:52 +0000 (22:56 +0000)]
cleanup: All the whitespace fixes, all at once.

This damages one of the encoding test inputs, so the sample output also
needs to change accordingly.

12 years agodaemonize, versioncmp: Generally useful functions from tripe.
Mark Wooding [Sat, 6 Jan 2007 12:49:56 +0000 (12:49 +0000)]
daemonize, versioncmp: Generally useful functions from tripe.

See the manual for descriptions.

13 years agobuf: Fix two embarassing bugs found while writing Lisp bindings.
Mark Wooding [Mon, 15 May 2006 19:18:32 +0000 (20:18 +0100)]
buf: Fix two embarassing bugs found while writing Lisp bindings.

  * buf_{get,put}memNl never worked.  It always wrote the length
    big-endian.

  * buf_getmemz never worked, because it used the wrong length to find
    the terminator.

13 years agostr: New str_matchx function optionally reports possible prefix.
Mark Wooding [Thu, 13 Apr 2006 20:52:59 +0000 (21:52 +0100)]
str: New str_matchx function optionally reports possible prefix.

It can be useful (trust me) to know whether a string is a possible
prefix of something which matches a glob pattern.  The function
str_matchx is like str_match (which is now a compatibility veneer) and
takes a flags word; the option STRF_PREFIX reports success if it hits
the end of the target string while trying to find a match.

13 years agostr: Various whitespace cleanups.
Mark Wooding [Thu, 13 Apr 2006 20:43:29 +0000 (21:43 +0100)]
str: Various whitespace cleanups.

13 years agodebian: Clean noadns build directory.
Mark Wooding [Fri, 7 Apr 2006 14:05:01 +0000 (15:05 +0100)]
debian: Clean noadns build directory.

13 years agohash: Trivial whitespace cleanups.
Mark Wooding [Fri, 7 Apr 2006 14:03:32 +0000 (15:03 +0100)]
hash: Trivial whitespace cleanups.

13 years agourl: Allow `;' to separate key/value pairs in URL-encoded strings.
Mark Wooding [Wed, 15 Mar 2006 01:31:26 +0000 (01:31 +0000)]
url: Allow `;' to separate key/value pairs in URL-encoded strings.

The RFC recommends this be allowed, because `&' is special in HTML.
It's also used by various CGI scripts.

13 years agourl: Allow various `safe' characters unquoted in URL strings.
Mark Wooding [Tue, 14 Mar 2006 16:41:41 +0000 (16:41 +0000)]
url: Allow various `safe' characters unquoted in URL strings.

Allow `.', `-', `_' and `/', because they're commonly used in filenames,
and it's nice for them to be displayed readably.  The `~' character
isn't actually safe but we allow it anyway.

13 years agourl: Whitespace cleanups.
Mark Wooding [Tue, 14 Mar 2006 16:41:39 +0000 (16:41 +0000)]
url: Whitespace cleanups.

13 years agofwatch: Include <string.h> for declaration of memset(3).
Mark Wooding [Tue, 14 Mar 2006 16:10:08 +0000 (16:10 +0000)]
fwatch: Include <string.h> for declaration of memset(3).

13 years agodebian: Fix package sections.
Mark Wooding [Wed, 15 Feb 2006 12:30:12 +0000 (12:30 +0000)]
debian: Fix package sections.

13 years agoinfra: Clean up project setup
Mark Wooding [Wed, 8 Feb 2006 18:53:06 +0000 (18:53 +0000)]
infra: Clean up project setup

13 years agoExtract Subversion ignore data.
Mark Wooding [Sat, 28 Jan 2006 12:24:44 +0000 (12:24 +0000)]
Extract Subversion ignore data.

13 years agoThe callback function can free the @bres_client@ structure! Make sure we
mdw [Tue, 18 Oct 2005 08:48:34 +0000 (08:48 +0000)]
The callback function can free the @bres_client@ structure!  Make sure we
have freed or know the address of everything we need to free before invoking
the callback: otherwise we mess with freed memory, which is bad.

13 years agoFix maintainer email addr.
mdw [Tue, 18 Oct 2005 08:44:12 +0000 (08:44 +0000)]
Fix maintainer email addr.

13 years agoActually implement the right transformation!
mdw [Tue, 18 Oct 2005 08:44:02 +0000 (08:44 +0000)]
Actually implement the right transformation!

13 years agoVarious manual fixes.
mdw [Tue, 18 Oct 2005 08:43:44 +0000 (08:43 +0000)]
Various manual fixes.

13 years agoDon't include trailing zero in the name of a gensym.
mdw [Tue, 18 Oct 2005 08:42:51 +0000 (08:42 +0000)]
Don't include trailing zero in the name of a gensym.

13 years agoFix name of DOUINTSZ.
mdw [Fri, 23 Sep 2005 16:46:21 +0000 (16:46 +0000)]
Fix name of DOUINTSZ.

13 years agoFix README and mLib.3 a bit.
mdw [Fri, 23 Sep 2005 16:05:58 +0000 (16:05 +0000)]
Fix README and mLib.3 a bit.

13 years agoFix distribution stuff.
mdw [Fri, 23 Sep 2005 15:24:59 +0000 (15:24 +0000)]
Fix distribution stuff.

13 years agoImport buf from Catacomb; split out the dstr bits, and throw away the mp and
mdw [Fri, 23 Sep 2005 15:16:12 +0000 (15:16 +0000)]
Import buf from Catacomb; split out the dstr bits, and throw away the mp and
ec stuff.  Document it.  Fix email addresses.

13 years agoRefugees from Catacomb: low-level buffer primitives.
mdw [Fri, 23 Sep 2005 10:36:36 +0000 (10:36 +0000)]
Refugees from Catacomb: low-level buffer primitives.

13 years agoStupid bug in float formatting.
mdw [Fri, 16 Sep 2005 13:09:29 +0000 (13:09 +0000)]
Stupid bug in float formatting.

13 years agoMissing argument in sel_addtimer docs.
mdw [Fri, 16 Sep 2005 13:09:13 +0000 (13:09 +0000)]
Missing argument in sel_addtimer docs.

13 years agoFixes for Cygwin.
mdw [Thu, 15 Sep 2005 00:49:46 +0000 (00:49 +0000)]
Fixes for Cygwin.

13 years agoFix for Cygwin.
mdw [Wed, 14 Sep 2005 23:07:55 +0000 (23:07 +0000)]
Fix for Cygwin.

13 years agoSizes and maximum values in bits.h, for other macros.
mdw [Wed, 14 Sep 2005 14:12:17 +0000 (14:12 +0000)]
Sizes and maximum values in bits.h, for other macros.

14 years agoFix for new Automake.
mdw [Fri, 22 Apr 2005 21:21:35 +0000 (21:21 +0000)]
Fix for new Automake.

14 years agoAdd a couple more standard macros. Fix the header.
mdw [Fri, 18 Mar 2005 09:58:46 +0000 (09:58 +0000)]
Add a couple more standard macros.  Fix the header.

14 years agoMinor little tweaks.
mdw [Fri, 18 Mar 2005 09:58:20 +0000 (09:58 +0000)]
Minor little tweaks.

14 years agoOnly make necessary system calls.
mdw [Fri, 18 Mar 2005 09:57:58 +0000 (09:57 +0000)]
Only make necessary system calls.

14 years agoArgh! RO[LR]64 broken on 32-bit shifts! Tested and fixed.
mdw [Sat, 5 Mar 2005 13:53:44 +0000 (13:53 +0000)]
Argh!  RO[LR]64 broken on 32-bit shifts!  Tested and fixed.

14 years agoFix free/xfree bug in adns support.
mdw [Thu, 11 Nov 2004 00:54:04 +0000 (00:54 +0000)]
Fix free/xfree bug in adns support.

14 years agoShip unihash test vectors.
mdw [Sun, 17 Oct 2004 13:27:42 +0000 (13:27 +0000)]
Ship unihash test vectors.

14 years agoAdd base32 encoding and decoding.
mdw [Tue, 28 Sep 2004 14:11:09 +0000 (14:11 +0000)]
Add base32 encoding and decoding.

14 years agoExpunge CVS cruft.
mdw [Sun, 12 Sep 2004 10:37:52 +0000 (10:37 +0000)]
Expunge CVS cruft.

15 years agoExpunge revision histories in files.
mdw [Thu, 8 Apr 2004 01:36:29 +0000 (01:36 +0000)]
Expunge revision histories in files.

15 years agoMake ADNS wait for the event loop before collecting replies.
mdw [Sat, 3 Apr 2004 03:28:54 +0000 (03:28 +0000)]
Make ADNS wait for the event loop before collecting replies.

15 years agoIgnore mlib-bin.
mdw [Fri, 19 Dec 2003 00:49:51 +0000 (00:49 +0000)]
Ignore mlib-bin.

15 years agoAdd global unihash table; use universal hashing instead of CRC.
mdw [Mon, 15 Dec 2003 20:54:57 +0000 (20:54 +0000)]
Add global unihash table; use universal hashing instead of CRC.

15 years agoNew program to make fixed tables for universal hashing.
mdw [Mon, 15 Dec 2003 20:53:08 +0000 (20:53 +0000)]
New program to make fixed tables for universal hashing.

15 years agoDistribute unihash manpage.
mdw [Sun, 14 Dec 2003 14:57:35 +0000 (14:57 +0000)]
Distribute unihash manpage.

15 years agoFix distribution.
mdw [Sun, 14 Dec 2003 14:56:57 +0000 (14:56 +0000)]
Fix distribution.

15 years agoQualify name given to @bres_byname@.
mdw [Sun, 14 Dec 2003 14:46:38 +0000 (14:46 +0000)]
Qualify name given to @bres_byname@.

15 years agoUse right test vector file name.
mdw [Sun, 14 Dec 2003 14:46:11 +0000 (14:46 +0000)]
Use right test vector file name.

15 years agoTest universal hashing and fix bugs.
mdw [Sun, 14 Dec 2003 14:45:30 +0000 (14:45 +0000)]
Test universal hashing and fix bugs.

15 years agoAdd adns support in background resolver.
mdw [Sat, 13 Dec 2003 20:37:59 +0000 (20:37 +0000)]
Add adns support in background resolver.

15 years agoDebianization fixes.
mdw [Sat, 29 Nov 2003 20:38:38 +0000 (20:38 +0000)]
Debianization fixes.

15 years agoDeclare and document @conn_fd@.
mdw [Sat, 29 Nov 2003 19:10:53 +0000 (19:10 +0000)]
Declare and document @conn_fd@.

15 years agoVarious stuff. 2.0.3
mdw [Sat, 29 Nov 2003 11:59:17 +0000 (11:59 +0000)]
Various stuff.

15 years agoDocument hex encoding.
mdw [Sat, 29 Nov 2003 11:59:01 +0000 (11:59 +0000)]
Document hex encoding.

15 years agoFile descriptor passing.
mdw [Sat, 29 Nov 2003 11:58:49 +0000 (11:58 +0000)]
File descriptor passing.

15 years agoVarious Debian fixes.
mdw [Mon, 10 Nov 2003 10:01:39 +0000 (10:01 +0000)]
Various Debian fixes.

15 years agoDebianization\!
mdw [Sun, 9 Nov 2003 13:48:43 +0000 (13:48 +0000)]
Debianization\!

15 years agoOoops. Fix distribution.
mdw [Sun, 9 Nov 2003 13:48:32 +0000 (13:48 +0000)]
Ooops.  Fix distribution.

15 years agoDocument crc-mktab a little.
mdw [Sun, 9 Nov 2003 13:13:50 +0000 (13:13 +0000)]
Document crc-mktab a little.

15 years agoVersion bump. 2.0.2
mdw [Sun, 12 Oct 2003 14:54:18 +0000 (14:54 +0000)]
Version bump.

15 years agoFinish the work.
mdw [Sun, 12 Oct 2003 14:54:00 +0000 (14:54 +0000)]
Finish the work.

15 years agoNew interface for messing with preconnected sockets.
mdw [Sun, 12 Oct 2003 14:47:10 +0000 (14:47 +0000)]
New interface for messing with preconnected sockets.

15 years agoVarious fixes.
mdw [Sun, 12 Oct 2003 14:44:46 +0000 (14:44 +0000)]
Various fixes.

15 years agoGeneral alignment assumptions and tweaks.
mdw [Sun, 12 Oct 2003 14:44:26 +0000 (14:44 +0000)]
General alignment assumptions and tweaks.

15 years agoUniversal hashing.
mdw [Sun, 12 Oct 2003 14:43:24 +0000 (14:43 +0000)]
Universal hashing.

16 years agoVersion bump. 2.0.1
mdw [Sun, 18 May 2003 15:17:04 +0000 (15:17 +0000)]
Version bump.