From 5dca360f2da544c9b6baf9d18ad8cd0b0e073e60 Mon Sep 17 00:00:00 2001 From: ian Date: Thu, 30 Mar 2006 19:11:24 +0000 Subject: [PATCH] Debian package wip --- TODO | 2 + adns/adns.c | 24 +++++++++++- adns/adns.tct | 19 +++++++++ adns/chiark_tcl_adns.h | 17 ++++++++ base/Makefile | 18 +++++++++ base/base.tct | 19 +++++++++ base/chiark-tcl-base.h | 21 ++++++++++ base/chiark-tcl.h | 17 ++++++++ base/common.make | 19 +++++++++ base/enum.c | 16 ++++++++ base/extension.make | 19 +++++++++ base/final.make | 19 +++++++++ base/hook.c | 17 ++++++++ base/idtable.c | 17 ++++++++ base/parse.c | 17 ++++++++ base/scriptinv.c | 17 ++++++++ base/shlib.make | 24 +++++++++++- base/tables-examples.tct | 0 base/tcmdifgen | 19 +++++++++ base/tcmdiflib.c | 17 ++++++++ base/troglodyte-Makefile | 6 --- cdb/Makefile | 19 +++++++++ cdb/cdb.tct | 19 +++++++++ cdb/chiark_tcl_cdb.h | 17 ++++++++ cdb/lookup.c | 20 +++++++++- cdb/readonly.c | 20 +++++++++- cdb/tests | 23 ----------- cdb/writeable.c | 20 +++++++++- crypto/Makefile | 19 +++++++++ crypto/algtables.c | 18 +++++++++ crypto/bcmode.c | 18 +++++++++ crypto/chiark_tcl_crypto.h | 20 ++++++++++ crypto/crypto.c | 18 +++++++++ crypto/crypto.h | 18 +++++++++ crypto/crypto.tct | 17 ++++++++ crypto/hook.c | 18 +++++++++ debian/.cvsignore | 3 ++ debian/README | 36 +++++++++++++++++ debian/changelog | 24 ++++++++++++ debian/compat | 1 + debian/control | 39 +++++++++++++++++++ debian/copyright | 25 ++++++++++++ debian/extractdoc | 14 +++++++ debian/lintian-overrides | 16 ++++++++ debian/rules | 80 ++++++++++++++++++++++++++++++++++++++ dgram/dgram.h | 20 ++++++++++ dgram/dgram.tct | 19 +++++++++ dgram/hook.c | 20 ++++++++++ hbytes/Makefile | 19 +++++++++ hbytes/chiark_tcl_hbytes.h | 18 +++++++++ hbytes/chop.c | 18 +++++++++ hbytes/hbytes-base.tct | 19 +++++++++ hbytes/hbytes.c | 17 ++++++++ hbytes/hbytes.h | 27 +++++++++++-- hbytes/hbytes.tct | 18 +++++++++ hbytes/hook.c | 18 +++++++++ hbytes/parse.c | 17 ++++++++ hbytes/ulongs.c | 17 ++++++++ maskmap/addrmap.c | 18 +++++++++ maskmap/maskmap-bits.c | 21 ++++++++++ maskmap/maskmap.c | 17 ++++++++ maskmap/maskmap.tct | 19 +++++++++ tuntap/tuntap.h | 21 ++++++++++ tuntap/tuntap.tct | 19 +++++++++ 64 files changed, 1189 insertions(+), 39 deletions(-) create mode 100644 TODO delete mode 100644 base/tables-examples.tct delete mode 100644 base/troglodyte-Makefile delete mode 100755 cdb/tests create mode 100644 debian/.cvsignore create mode 100644 debian/README create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/extractdoc create mode 100644 debian/lintian-overrides create mode 100755 debian/rules diff --git a/TODO b/TODO new file mode 100644 index 0000000..879083b --- /dev/null +++ b/TODO @@ -0,0 +1,2 @@ +install lintian overrides +change filenames to *.so.1 ? diff --git a/adns/adns.c b/adns/adns.c index 30d036b..6405f00 100644 --- a/adns/adns.c +++ b/adns/adns.c @@ -1,5 +1,3 @@ -/* - */ /* * adns lookup TYPE DOMAIN [QUERY-OPTIONS] => [list RDATA] * if no or dontknow, throws an exception, with errorCode one of @@ -56,6 +54,28 @@ * * adns destroy-resolver RESOLVER * cancels outstanding queries + * + */ +/* ---8<--- end of documentation comment --8<-- */ + +/* + * adns.c - adns binding for Tcl + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #define _GNU_SOURCE diff --git a/adns/adns.tct b/adns/adns.tct index 513de6e..dbb700c 100644 --- a/adns/adns.tct +++ b/adns/adns.tct @@ -1,3 +1,22 @@ +# adns binding for Tcl +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + Type adnsresults: adns_answer *@ Init adnsresults @=0; Fini adnsresults free(@); diff --git a/adns/chiark_tcl_adns.h b/adns/chiark_tcl_adns.h index af8de0e..f450f4a 100644 --- a/adns/chiark_tcl_adns.h +++ b/adns/chiark_tcl_adns.h @@ -1,4 +1,21 @@ /* + * adns binding for Tcl + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #ifndef ADNSTCL_H diff --git a/base/Makefile b/base/Makefile index 848210b..faa7f29 100644 --- a/base/Makefile +++ b/base/Makefile @@ -1,3 +1,21 @@ +# base code for various Tcl extensions +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + default: all CFILES = enum hook idtable parse scriptinv tcmdiflib diff --git a/base/base.tct b/base/base.tct index 425cb99..a5313e7 100644 --- a/base/base.tct +++ b/base/base.tct @@ -1,3 +1,22 @@ +# base code for various Tcl extensions +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + Type iddata(const IdDataSpec *idds): void *@ Type ulong: uint32_t @ Type long: long @ diff --git a/base/chiark-tcl-base.h b/base/chiark-tcl-base.h index d8f000a..f80fafa 100644 --- a/base/chiark-tcl-base.h +++ b/base/chiark-tcl-base.h @@ -1,3 +1,24 @@ +/* + * base code for various Tcl extensions + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + + #include #include diff --git a/base/chiark-tcl.h b/base/chiark-tcl.h index 91d76fd..2f80d58 100644 --- a/base/chiark-tcl.h +++ b/base/chiark-tcl.h @@ -1,4 +1,21 @@ /* + * base code for various Tcl extensions + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #ifndef CHIARK_TCL_H diff --git a/base/common.make b/base/common.make index 12259fa..a715747 100644 --- a/base/common.make +++ b/base/common.make @@ -1,3 +1,22 @@ +# base code for various Tcl extensions +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + VERSION ?= 1 FAMILY ?= chiark_tcl diff --git a/base/enum.c b/base/enum.c index e40b513..feb9e2d 100644 --- a/base/enum.c +++ b/base/enum.c @@ -1,5 +1,21 @@ /* + * base code for various Tcl extensions + * Copyright 2006 Ian Jackson * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #include "chiark-tcl-base.h" diff --git a/base/extension.make b/base/extension.make index d03cb28..ed48edc 100644 --- a/base/extension.make +++ b/base/extension.make @@ -1,3 +1,22 @@ +# base code for various Tcl extensions +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + EXTPREFIX ?= $(FAMILY)_ EXTENSION ?= $(EXTPREFIX)$(EXTBASE) diff --git a/base/final.make b/base/final.make index 1100e8b..1f14f62 100644 --- a/base/final.make +++ b/base/final.make @@ -1,3 +1,22 @@ +# base code for various Tcl extensions +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + all: $(TARGETS) $(AUTOS) $(OBJS_CFILES): $(AUTO_HDRS) diff --git a/base/hook.c b/base/hook.c index 9243724..acd708a 100644 --- a/base/hook.c +++ b/base/hook.c @@ -1,4 +1,21 @@ /* + * base code for various Tcl extensions + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #include "chiark-tcl-base.h" diff --git a/base/idtable.c b/base/idtable.c index 554f999..389151e 100644 --- a/base/idtable.c +++ b/base/idtable.c @@ -1,4 +1,21 @@ /* + * base code for various Tcl extensions + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #include "chiark-tcl-base.h" diff --git a/base/parse.c b/base/parse.c index 035e531..e04d876 100644 --- a/base/parse.c +++ b/base/parse.c @@ -1,4 +1,21 @@ /* + * base code for various Tcl extensions + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #include "chiark-tcl-base.h" diff --git a/base/scriptinv.c b/base/scriptinv.c index a066572..5757d47 100644 --- a/base/scriptinv.c +++ b/base/scriptinv.c @@ -1,4 +1,21 @@ /* + * base code for various Tcl extensions + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #include "chiark-tcl-base.h" diff --git a/base/shlib.make b/base/shlib.make index e69ea6c..a213a66 100644 --- a/base/shlib.make +++ b/base/shlib.make @@ -1,9 +1,29 @@ +# base code for various Tcl extensions +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + OBJS_CFILES += $(addsuffix .o, $(CFILES)) OBJS += $(OBJS_CFILES) +CFLAGS += -fPIC TARGETS += $(SHLIB).so +SHLIB_LDFLAGS ?= $(LDFLAGS) -o $@ -shared -Xlinker -soname=$@ $(SHLIB).so: $(OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -shared \ - -Xlinker -soname=$@ $(OBJS) $(LDLIBS) + $(CC) $(CFLAGS) $(SHLIB_LDFLAGS) $(OBJS) $(LDLIBS) diff --git a/base/tables-examples.tct b/base/tables-examples.tct deleted file mode 100644 index e69de29..0000000 diff --git a/base/tcmdifgen b/base/tcmdifgen index bd97245..f4c77fc 100755 --- a/base/tcmdifgen +++ b/base/tcmdifgen @@ -1,5 +1,24 @@ #!/usr/bin/perl +# code generator to help with writing Tcl extensions +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + # Input format is line-based, ws-significant, offside rule (some kind # of, anyway). # diff --git a/base/tcmdiflib.c b/base/tcmdiflib.c index 984c75f..85b181e 100644 --- a/base/tcmdiflib.c +++ b/base/tcmdiflib.c @@ -1,4 +1,21 @@ /* + * base code for various Tcl extensions + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #include "chiark-tcl-base.h" diff --git a/base/troglodyte-Makefile b/base/troglodyte-Makefile deleted file mode 100644 index ed38b04..0000000 --- a/base/troglodyte-Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -#alg.o: alg.c alg.h alg2.h -# $(CC_CRYPTO) -o $@ -c $< - -clean: - rm -f $(OBJS) $(TARGETS) *~ ./#*# diff --git a/cdb/Makefile b/cdb/Makefile index b3fadac..c6a49be 100644 --- a/cdb/Makefile +++ b/cdb/Makefile @@ -1,3 +1,22 @@ +# cdb, cdb-wr - Tcl bindings for tinycdb and a journalling write extension +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + BASE_DIR = ../base EXTBASE = cdb CFILES = readonly writeable lookup diff --git a/cdb/cdb.tct b/cdb/cdb.tct index c42fb66..9754324 100644 --- a/cdb/cdb.tct +++ b/cdb/cdb.tct @@ -1,3 +1,22 @@ +# cdb, cdb-wr - Tcl bindings for tinycdb and a journalling write extension +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + Table *cdbtoplevel TopLevel_Command cdb subcmd enum(Cdb/_SubCommand, "cdb subcommand") diff --git a/cdb/chiark_tcl_cdb.h b/cdb/chiark_tcl_cdb.h index d06713d..629d66c 100644 --- a/cdb/chiark_tcl_cdb.h +++ b/cdb/chiark_tcl_cdb.h @@ -1,4 +1,21 @@ /* + * cdb, cdb-wr - Tcl bindings for tinycdb and a journalling write extension + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #ifndef CHIARK_TCL_CDB_H diff --git a/cdb/lookup.c b/cdb/lookup.c index 5c32d86..6245384 100644 --- a/cdb/lookup.c +++ b/cdb/lookup.c @@ -1,4 +1,22 @@ -/**/ +/* + * cdb, cdb-wr - Tcl bindings for tinycdb and a journalling write extension + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ #include "chiark_tcl_cdb.h" diff --git a/cdb/readonly.c b/cdb/readonly.c index 3bfa98b..7a3ba44 100644 --- a/cdb/readonly.c +++ b/cdb/readonly.c @@ -1,4 +1,22 @@ -/**/ +/* + * cdb, cdb-wr - Tcl bindings for tinycdb and a journalling write extension + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ #include "chiark_tcl_cdb.h" diff --git a/cdb/tests b/cdb/tests deleted file mode 100755 index 658233e..0000000 --- a/cdb/tests +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/tclsh8.3 - -proc addpath {p before after default} { - upvar #0 env($p) lc - if {[info exists lc]} { - set l [split $lc :] - } else { - set l $default - } - set l [append $before $l $after] - set lc [join $l :] -} - -addpath LD_LIBRARY_PATH {../base ../hbytes} {} {} - -load ./chiark_tcl_cdb-1.so - -# -# CURRENTLY TESTING WITH -# rm -f test-out.* -# LD_LIBRARY_PATH=../base:../hbytes:. ../../sauce/convertdb test-out 0 db.addr-list.main db.addr-list.log -# LD_LIBRARY_PATH=../base:../hbytes:. strace ../../sauce/convertdb test-out 0 db.addr-list.main db.addr-list.log -# LD_LIBRARY_PATH=../base:../hbytes:. valgrind --db-attach=yes tclsh8.3 ../../sauce/convertdb test-out 0 db.addr-list.main db.addr-list.log diff --git a/cdb/writeable.c b/cdb/writeable.c index 6dc412b..9cdd009 100644 --- a/cdb/writeable.c +++ b/cdb/writeable.c @@ -1,4 +1,22 @@ -/**/ +/* + * cdb, cdb-wr - Tcl bindings for tinycdb and a journalling write extension + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ #include "chiark_tcl_cdb.h" diff --git a/crypto/Makefile b/crypto/Makefile index 9dee1a3..dfdf719 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -1,3 +1,22 @@ +# crypto - Tcl bindings for parts of the `nettle' crypto library +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + BASE_DIR = ../base EXTBASE = crypto CFILES = algtables bcmode crypto hook diff --git a/crypto/algtables.c b/crypto/algtables.c index ea591fb..0e15cdf 100644 --- a/crypto/algtables.c +++ b/crypto/algtables.c @@ -1,6 +1,24 @@ /* + * crypto - Tcl bindings for parts of the `nettle' crypto library + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ + #include "chiark_tcl_crypto.h" #include diff --git a/crypto/bcmode.c b/crypto/bcmode.c index 24dfdb8..7c1886e 100644 --- a/crypto/bcmode.c +++ b/crypto/bcmode.c @@ -1,5 +1,23 @@ /* + * crypto - Tcl bindings for parts of the `nettle' crypto library + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ + #include "chiark_tcl_crypto.h" diff --git a/crypto/chiark_tcl_crypto.h b/crypto/chiark_tcl_crypto.h index 02f68db..538c23f 100644 --- a/crypto/chiark_tcl_crypto.h +++ b/crypto/chiark_tcl_crypto.h @@ -1,3 +1,23 @@ +/* + * crypto - Tcl bindings for parts of the `nettle' crypto library + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + #include #include diff --git a/crypto/crypto.c b/crypto/crypto.c index e8d7f1a..988d1bc 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -1,6 +1,24 @@ /* + * crypto - Tcl bindings for parts of the `nettle' crypto library + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ + #include "chiark_tcl_crypto.h" const PadOp cht_padop_entries[]= { diff --git a/crypto/crypto.h b/crypto/crypto.h index 3350631..b2a7bc8 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -1,6 +1,24 @@ /* + * crypto - Tcl bindings for parts of the `nettle' crypto library + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ + #ifndef CRYPTO_H #define CRYPTO_H diff --git a/crypto/crypto.tct b/crypto/crypto.tct index cc10545..d12472f 100644 --- a/crypto/crypto.tct +++ b/crypto/crypto.tct @@ -1,3 +1,20 @@ +# crypto - Tcl bindings for parts of the `nettle' crypto library +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. Table *hbcryptotoplevel TopLevel_Command diff --git a/crypto/hook.c b/crypto/hook.c index 002c0d4..f8c567f 100644 --- a/crypto/hook.c +++ b/crypto/hook.c @@ -1,6 +1,24 @@ /* + * crypto - Tcl bindings for parts of the `nettle' crypto library + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ + #include "chiark_tcl_crypto.h" int cht_do_hbcryptotoplevel_hbcrypto(ClientData cd, Tcl_Interp *ip, diff --git a/debian/.cvsignore b/debian/.cvsignore new file mode 100644 index 0000000..b2e02fa --- /dev/null +++ b/debian/.cvsignore @@ -0,0 +1,3 @@ +files +*.substvars +libtcl-chiark-1 diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..e0fa3f2 --- /dev/null +++ b/debian/README @@ -0,0 +1,36 @@ + chiark-tcl - some useful Tcl bindings + ------------------------------------- + +This package contains, basically, shared libraries + chiark_tcl_-1.so +in /usr/lib. + +Each of these is a Tcl extension which can be loaded into a Tcl +interpreter with + load chiark_tcl_-1.so +and then the new commands will immediately be available. + +The documentation for each extension is regrettably rather sketchy but +the following information should be enough to get you started: + + .tct + + This is the input file to the automatic Tcl<->C glue generator + used by all of the extensions provided in this package. This + lists the commands and subcommands available. + + .[ch].txt + + Some of the extensions have additional usage documentation in a + source code comment. This comment has been mechanically + extracted from the source file for your comfort and convenience. + +To gain an understanding of the way the *.tct files work, take a +look at adns.c.txt which describes the `adns' command provided by +the adns binding. + +Note that the file /usr/lib/chiark_tcl-1.so is NOT an amalgam of all +of the extensions. It is a set of common routines which will be +loaded automatically when required. Each extension must be loaded +explicitly with the Tcl `load' command to bring the additional +commands into the Tcl command namespace. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..dd8dd7b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,24 @@ +chiark-tcl (1.0.0) unstable; urgency=low + + * Initial release. + + -- Ian Jackson Thu, 30 Mar 2006 18:34:51 +0100 + + +# chiark-tcl - various Tcl bindings and extensions +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..b7517dd --- /dev/null +++ b/debian/control @@ -0,0 +1,39 @@ +Source: chiark-tcl +Maintainer: Ian Jackson +Standards-Version: 3.6.2 +Build-Depends: libadns1-dev, libnettle-dev, tinycdb, tcl8.4-dev | tcl8.3-dev | tcl8.2-dev + +Package: libtcl-chiark-1 +Architecture: any +Description: Tcl interfaces for adns, cdb, crypto, udp, etc. + Tcl bindings for: + * adns (resolver library) + * cdb (constant database) plus journalling writeable database + * crypto: the nettle cryptographic library + * hbytes: bytestrings with hex as string representation but efficient + To make sensible use of these you will need a version of Tcl installed + (this package is compatible with at least Tcl 8.0 to 8.4 inclusive). + To use the adns, cdb and nettle bindings you need to have the + appropriate libraries installed too. +Priority: optional +Section: interpreters +Depends: ${shlibs:Depends} + + +# chiark-tcl - various Tcl bindings and extensions +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..dc04e2c --- /dev/null +++ b/debian/copyright @@ -0,0 +1,25 @@ +chiark-tcl is a collection of Tcl extensions +This Debian package was prepared by Ian Jackson, also the upstream +author. + + +Copyright 2006 Ian Jackson + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +02110-1301, USA. + + +A copy of the GNU General Public License, version 2, should be +installed on your Debian system in /usr/share/common-licenses/GPL. diff --git a/debian/extractdoc b/debian/extractdoc new file mode 100644 index 0000000..318c8cc --- /dev/null +++ b/debian/extractdoc @@ -0,0 +1,14 @@ +#!/usr/bin/perl -w +$o= ''; +for (;;) { + exit 0 unless defined ($_= ); + $o .= $_; + last if / \-\-\-8\<\-\-\- end of documentation /; +} +($before, $_, $after)= @ARGV; +s,.*/,,; +$of= $before.$_.$after; +open F, "> $of" or die $!; +print F $o or die $!; +close F or die $!; +print " wrote $of\n" or die $!; diff --git a/debian/lintian-overrides b/debian/lintian-overrides new file mode 100644 index 0000000..1853967 --- /dev/null +++ b/debian/lintian-overrides @@ -0,0 +1,16 @@ +# These things are not linkable against with ld; they're plugin modules +# for use with dlopen but want to be on the default load path for Tcl's +# convenience: +libtcl-chiark-1 binary: no-shlibs-control-file usr/lib/chiark_tcl_adns-1.so +libtcl-chiark-1 binary: no-shlibs-control-file usr/lib/chiark_tcl_hbytes-1.so +libtcl-chiark-1 binary: no-shlibs-control-file usr/lib/chiark_tcl_crypto-1.so +libtcl-chiark-1 binary: no-shlibs-control-file usr/lib/chiark_tcl_cdb-1.so +libtcl-chiark-1 binary: no-shlibs-control-file usr/lib/chiark_tcl-1.so + +# tinycdb.deb doesn't produce any -fPIC code. So this one only +# works on archs where -fPIC for shlibs isn't mandatory. +libtcl-chiark-1 binary: shlib-with-non-pic-code usr/lib/chiark_tcl_cdb-1.so + +# Our Description ends in `etc.' which makes lintian think it's a +# sentence. +libtcl-chiark-1 binary: description-synopsis-might-not-be-phrased-properly diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..333dfb6 --- /dev/null +++ b/debian/rules @@ -0,0 +1,80 @@ +#!/usr/bin/make -f + +# chiark-tcl - various Tcl bindings and extensions +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + +majversion=1 +srcpackage=chiark-tcl +libpackage=libtcl-chiark-$(majversion) +docpackage=libtcl-chiark-$(majversion) +docdir=usr/share/doc/$(docpackage) + +define checkdir + test -f hbytes/hbytes.tct +endef + +build: + $(checkdir) + $(MAKE) prefix=/usr VERSION=$(majversion) + +clean: + $(checkdir) + $(MAKE) clean + rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars* + dh_clean + +binary-indep: + +binary-arch: checkroot build + $(checkdir) + -rm -rf debian/$(docpackage) debian/$(libpackage) + install -d debian/$(libpackage)/usr/lib + install -d debian/$(docpackage)/usr/share/doc/$(docpackage) + + cp */*.so debian/$(libpackage)/usr/lib/. + + set -e; for f in */*.[ch]; do \ + perl debian/extractdoc <$$f \ + debian/$(docpackage)/$(docdir)/ $$f .txt; \ + done + cp */*.tct debian/README debian/copyright \ + debian/$(docpackage)/$(docdir) + + dh_installchangelogs + dh_strip + + dh_shlibdeps + dh_compress + dh_fixperms + dh_gencontrol + dh_md5sums + dh_builddeb + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +checkroot: + $(checkdir) + dh_testroot + +.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/dgram/dgram.h b/dgram/dgram.h index d95185c..99a6d10 100644 --- a/dgram/dgram.h +++ b/dgram/dgram.h @@ -1,3 +1,23 @@ +/* dgram - Tcl extension for udp datagrams + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + + /* from sockaddr.c */ typedef struct { diff --git a/dgram/dgram.tct b/dgram/dgram.tct index b2b1284..bdd2312 100644 --- a/dgram/dgram.tct +++ b/dgram/dgram.tct @@ -1,3 +1,22 @@ +# dgram - Tcl extension for udp datagrams +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + Type sockaddr: SockAddr_Value @ Init sockaddr sockaddr_clear(&@); diff --git a/dgram/hook.c b/dgram/hook.c index 72b3f70..55b2672 100644 --- a/dgram/hook.c +++ b/dgram/hook.c @@ -1 +1,21 @@ +/* dgram - Tcl extension for udp datagrams + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + + Tcl_RegisterObjType(&sockaddr_type); diff --git a/hbytes/Makefile b/hbytes/Makefile index 06b4a3a..136fbc9 100644 --- a/hbytes/Makefile +++ b/hbytes/Makefile @@ -1,3 +1,22 @@ +# hbytes - hex-stringrep efficient byteblocks for Tcl +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + BASE_DIR = ../base EXTBASE = hbytes CFILES = chop hbytes hook parse ulongs diff --git a/hbytes/chiark_tcl_hbytes.h b/hbytes/chiark_tcl_hbytes.h index 8786a6a..ae7c5e3 100644 --- a/hbytes/chiark_tcl_hbytes.h +++ b/hbytes/chiark_tcl_hbytes.h @@ -1,6 +1,24 @@ /* + * hbytes - hex-stringrep efficient byteblocks for Tcl + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ + #ifndef CHIARK_TCL_HBYTES_H #define CHIARK_TCL_HBYTES_H diff --git a/hbytes/chop.c b/hbytes/chop.c index ef0e5f0..3e48569 100644 --- a/hbytes/chop.c +++ b/hbytes/chop.c @@ -1,6 +1,24 @@ /* + * hbytes - hex-stringrep efficient byteblocks for Tcl + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ + #include "chiark_tcl_hbytes.h" static int strs1(Tcl_Interp *ip, int strc, Tcl_Obj *const *strv, int *l_r) { diff --git a/hbytes/hbytes-base.tct b/hbytes/hbytes-base.tct index 97b7ed3..10ddc81 100644 --- a/hbytes/hbytes-base.tct +++ b/hbytes/hbytes-base.tct @@ -1,3 +1,22 @@ +# hbytes - hex-stringrep efficient byteblocks for Tcl +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + Type hb: HBytes_Value @ Init hb cht_hb_sentinel(&@); diff --git a/hbytes/hbytes.c b/hbytes/hbytes.c index 22383df..5daecd1 100644 --- a/hbytes/hbytes.c +++ b/hbytes/hbytes.c @@ -1,7 +1,24 @@ /* + * hbytes - hex-stringrep efficient byteblocks for Tcl + * Copyright 2006 Ian Jackson * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ + #include "hbytes.h" #define COMPLEX(hb) ((HBytes_ComplexValue*)hb->begin_complex) diff --git a/hbytes/hbytes.h b/hbytes/hbytes.h index b24144b..3b4dd15 100644 --- a/hbytes/hbytes.h +++ b/hbytes/hbytes.h @@ -1,5 +1,3 @@ -/* - */ /* * hbytes raw2h BINARY => hex * hbytes h2raw HEX => binary @@ -121,7 +119,30 @@ * TUNTAP IFNAME LENGTH tun/tap interface name too long * TUNTAP MTU OVERRUN tun/tap mtu limited to 2^16 bytes * - * Refs: HMAC: RFC2104 */ + * Refs: HMAC: RFC2104 + */ +/* ---8<--- end of documentation comment --8<-- */ + +/* + * hbytes - hex-stringrep efficient byteblocks for Tcl + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + #ifndef HBYTES_H #define HBYTES_H diff --git a/hbytes/hbytes.tct b/hbytes/hbytes.tct index 5611805..35506d5 100644 --- a/hbytes/hbytes.tct +++ b/hbytes/hbytes.tct @@ -1,3 +1,21 @@ +# hbytes - hex-stringrep efficient byteblocks for Tcl +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + Table *hbytestoplevel TopLevel_Command hbytes diff --git a/hbytes/hook.c b/hbytes/hook.c index 985122e..f3817ff 100644 --- a/hbytes/hook.c +++ b/hbytes/hook.c @@ -1,6 +1,24 @@ /* + * hbytes - hex-stringrep efficient byteblocks for Tcl + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ + #include #include "chiark_tcl_hbytes.h" diff --git a/hbytes/parse.c b/hbytes/parse.c index 266de4b..1b23e93 100644 --- a/hbytes/parse.c +++ b/hbytes/parse.c @@ -1,4 +1,21 @@ /* + * hbytes - hex-stringrep efficient byteblocks for Tcl + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #include "chiark_tcl_hbytes.h" diff --git a/hbytes/ulongs.c b/hbytes/ulongs.c index 0f99db3..5ab364e 100644 --- a/hbytes/ulongs.c +++ b/hbytes/ulongs.c @@ -1,4 +1,21 @@ /* + * hbytes - hex-stringrep efficient byteblocks for Tcl + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #include "chiark_tcl_hbytes.h" diff --git a/maskmap/addrmap.c b/maskmap/addrmap.c index 33eeda4..437b41a 100644 --- a/maskmap/addrmap.c +++ b/maskmap/addrmap.c @@ -1,6 +1,24 @@ /* + * maskmap - Tcl extension for address mask map data structures + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ + #include "chiark_tcl_hbytes.h" /*---------- operations on AddrMap_Entry ----------*/ diff --git a/maskmap/maskmap-bits.c b/maskmap/maskmap-bits.c index 88cb31c..6e2cdd1 100644 --- a/maskmap/maskmap-bits.c +++ b/maskmap/maskmap-bits.c @@ -1,3 +1,24 @@ +/* + * maskmap - Tcl extension for address mask map data structures + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + + int cht_do_hbytes_addr_map(ClientData cd, Tcl_Interp *ip, const AddrMap_SubCommand *subcmd, int objc, Tcl_Obj *const *objv) { diff --git a/maskmap/maskmap.c b/maskmap/maskmap.c index ea2a690..ad141a9 100644 --- a/maskmap/maskmap.c +++ b/maskmap/maskmap.c @@ -1,4 +1,21 @@ /* + * maskmap - Tcl extension for address mask map data structures + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. */ #include "chiark_tcl_hbytes.h" diff --git a/maskmap/maskmap.tct b/maskmap/maskmap.tct index a9e7056..4570073 100644 --- a/maskmap/maskmap.tct +++ b/maskmap/maskmap.tct @@ -1,3 +1,22 @@ +# maskmap - Tcl extension for address mask map data structures +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + Table *maskmaptoplevel TopLevel_Command addr-map subcmd enum(AddrMap/_SubCommand, "addr-map subcommand") diff --git a/tuntap/tuntap.h b/tuntap/tuntap.h index f23eee1..a17e228 100644 --- a/tuntap/tuntap.h +++ b/tuntap/tuntap.h @@ -1,3 +1,24 @@ +/* + * tuntap - Tcl extension for tun/tap network device + * Copyright 2006 Ian Jackson + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + + /* from tuntap.c */ extern const IdDataSpec tuntap_socks; diff --git a/tuntap/tuntap.tct b/tuntap/tuntap.tct index 22f01fb..698f97f 100644 --- a/tuntap/tuntap.tct +++ b/tuntap/tuntap.tct @@ -1,3 +1,22 @@ +# tuntap - Tcl extension for tun/tap network device +# Copyright 2006 Ian Jackson +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. + + Table tuntap_socket_raw TunSocket_SubCommand create -- 2.30.2