aboutsummaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2013-11-18 13:54:17 +0000
committerRene Ladan <rene@FreeBSD.org>2013-11-18 13:54:17 +0000
commitdc20ad9d059926bc7a99b642fdabd40165f7821e (patch)
tree8bbe6309fbfd817c5f4e580937a797191f79eb88 /databases
parent096910598200334a7a523321dde44db04eb9aac8 (diff)
downloadports-dc20ad9d059926bc7a99b642fdabd40165f7821e.tar.gz
ports-dc20ad9d059926bc7a99b642fdabd40165f7821e.zip
Notes
Diffstat (limited to 'databases')
-rw-r--r--databases/Makefile4
-rw-r--r--databases/drizzle/Makefile88
-rw-r--r--databases/drizzle/distinfo2
-rw-r--r--databases/drizzle/files/drizzle-server.in65
-rw-r--r--databases/drizzle/pkg-descr6
-rw-r--r--databases/drizzle/pkg-plist564
-rw-r--r--databases/gomysql/Makefile25
-rw-r--r--databases/gomysql/distinfo2
-rw-r--r--databases/gomysql/pkg-descr6
-rw-r--r--databases/p5-DBD-InterBase/Makefile36
-rw-r--r--databases/p5-DBD-InterBase/distinfo2
-rw-r--r--databases/p5-DBD-InterBase/files/patch-Makefile.PL85
-rw-r--r--databases/p5-DBD-InterBase/pkg-descr4
-rw-r--r--databases/p5-DBD-InterBase/pkg-plist10
-rw-r--r--databases/p5-DBZ_File/Makefile30
-rw-r--r--databases/p5-DBZ_File/distinfo2
-rw-r--r--databases/p5-DBZ_File/files/dbz.c1759
-rw-r--r--databases/p5-DBZ_File/files/dbz.h32
-rw-r--r--databases/p5-DBZ_File/files/patch-aa29
-rw-r--r--databases/p5-DBZ_File/pkg-descr6
-rw-r--r--databases/p5-DBZ_File/pkg-plist5
21 files changed, 0 insertions, 2762 deletions
diff --git a/databases/Makefile b/databases/Makefile
index fc5de38de77d..0f381ea944d1 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -58,7 +58,6 @@
SUBDIR += dbow
SUBDIR += dbtool
SUBDIR += dbview
- SUBDIR += drizzle
SUBDIR += emma
SUBDIR += epgsql
SUBDIR += erlang-mysql
@@ -97,7 +96,6 @@
SUBDIR += gnats4
SUBDIR += gnatsweb4
SUBDIR += godis
- SUBDIR += gomysql
SUBDIR += gosqlite3
SUBDIR += gqlplus
SUBDIR += grass
@@ -316,7 +314,6 @@
SUBDIR += p5-DBD-Excel
SUBDIR += p5-DBD-FrontBase
SUBDIR += p5-DBD-Google
- SUBDIR += p5-DBD-InterBase
SUBDIR += p5-DBD-LDAP
SUBDIR += p5-DBD-Mock
SUBDIR += p5-DBD-Multi
@@ -418,7 +415,6 @@
SUBDIR += p5-DBIx-XHTML_Table
SUBDIR += p5-DBIx-XML_RDB
SUBDIR += p5-DBM-Deep
- SUBDIR += p5-DBZ_File
SUBDIR += p5-DMOZ-ParseRDF
SUBDIR += p5-DR-Tarantool
SUBDIR += p5-DWH_File
diff --git a/databases/drizzle/Makefile b/databases/drizzle/Makefile
deleted file mode 100644
index b87fe4dbd062..000000000000
--- a/databases/drizzle/Makefile
+++ /dev/null
@@ -1,88 +0,0 @@
-# Created by: Greg Larkin <glarkin@FreeBSD.org>
-# $FreeBSD$
-
-PORTNAME= drizzle
-PORTVERSION= 2010.05.1561
-PORTREVISION= 4
-CATEGORIES= databases
-MASTER_SITES= http://launchpadlibrarian.net/49101349/ \
- LOCAL/glarkin
-
-MAINTAINER= glarkin@FreeBSD.org
-COMMENT= A database optimized for Cloud and Net applications
-
-DEPRECATED= Broken for more than 6 month
-EXPIRATION_DATE= 2013-11-18
-
-USE_GCC= 4.2+
-USES= gmake perl5
-USE_PYTHON= yes
-GNU_CONFIGURE= yes
-USE_LDCONFIG= ${PREFIX}/lib/drizzle
-
-BROKEN= fails to build
-
-USES= iconv
-
-.if defined(MAINTAINER_MODE)
-UID_FILES+= ../../UIDs
-GID_FILES+= ../../GIDs
-.endif
-USERS= drizzle
-GROUPS= drizzle
-
-# Replace token in the rc.d script
-SUB_LIST+= USERS=${USERS}
-
-OPTIONS_DEFINE= DOXYGEN NLS
-
-BUILD_DEPENDS+= libdrizzle>=0:${PORTSDIR}/databases/libdrizzle \
- e2fsprogs-libuuid>=0:${PORTSDIR}/misc/e2fsprogs-libuuid \
- protobuf>=2.1.0:${PORTSDIR}/devel/protobuf \
- boost-libs>=0:${PORTSDIR}/devel/boost-libs \
- bison>=0:${PORTSDIR}/devel/bison \
- gearmand>=0:${PORTSDIR}/devel/gearmand \
- libmemcached>=0:${PORTSDIR}/databases/libmemcached \
- libevent>=0:${PORTSDIR}/devel/libevent \
- curl>=0:${PORTSDIR}/ftp/curl \
- libgcrypt>=0:${PORTSDIR}/security/libgcrypt \
- pcre>=0:${PORTSDIR}/devel/pcre
-
-MAN1= drizzle.1 \
- drizzledump.1 \
- drizzleimport.1 \
- drizzleslap.1
-
-MAN8= drizzled.8
-
-USE_RC_SUBR= drizzle-server
-
-NO_STAGE= yes
-.include <bsd.port.options.mk>
-
-.if ${ARCH} == "i386"
-CONFIGURE_ARGS+=--disable-64bit
-.endif
-
-.if ${PORT_OPTIONS:MNLS}
-USES+= gettext
-PLIST_SUB+= NLS=""
-.else
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+= NLS="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MDOCS} && ${PORT_OPTIONS:MDOXYGEN}
-BUILD_DEPENDS+= doxygen>=0:${PORTSDIR}/devel/doxygen \
- ${LOCALBASE}/bin/dot:${PORTSDIR}/graphics/graphviz
-ALL_TARGET= all doxygen
-PLIST_SUB+= PORTDOCS=""
-
-post-install::
- @${INSTALL} -d ${DOCSDIR}
- @cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${DOCSDIR}
-.else
-PLIST_SUB+= PORTDOCS="@comment "
-.endif
-
-.include <bsd.port.mk>
diff --git a/databases/drizzle/distinfo b/databases/drizzle/distinfo
deleted file mode 100644
index 9fe2f650fd32..000000000000
--- a/databases/drizzle/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (drizzle-2010.05.1561.tar.gz) = f95d8cb47690314ab0ffde56b7e032e2d4373c0785c58bda615913521998b3e5
-SIZE (drizzle-2010.05.1561.tar.gz) = 8341250
diff --git a/databases/drizzle/files/drizzle-server.in b/databases/drizzle/files/drizzle-server.in
deleted file mode 100644
index 162d3e71b36a..000000000000
--- a/databases/drizzle/files/drizzle-server.in
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-# PROVIDE: drizzle
-# REQUIRE: LOGIN
-# KEYWORD: shutdown
-
-#
-# Add the following line to /etc/rc.conf to enable drizzle:
-# drizzle_enable (bool): Set to "NO" by default.
-# Set it to "YES" to enable Drizzle.
-# drizzle_limits (bool): Set to "NO" by default.
-# Set it to yes to run `limits -e -U drizzle`
-# just before drizzle starts.
-# drizzle_dbdir (str): Default to "/var/db/drizzle"
-# Base database directory.
-# drizzle_log (str): Default to "/var/db/drizzle/<hostname>.log"
-# Log file for startup messages (disable by
-# setting to /dev/null)
-# drizzle_args (str): Custom additional arguments to be passed
-# to drizzle (default empty).
-#
-
-. /etc/rc.subr
-
-name="drizzle"
-rcvar=drizzle_enable
-
-load_rc_config $name
-
-: ${drizzle_enable="NO"}
-: ${drizzle_limits="NO"}
-: ${drizzle_dbdir="/var/db/drizzle"}
-: ${drizzle_log="${drizzle_dbdir}/`/bin/hostname`.log"}
-
-drizzle_user="%%USERS%%"
-drizzle_limits_args="-e -U ${drizzle_user}"
-pidfile="${drizzle_dbdir}/`/bin/hostname`.pid"
-command="%%PREFIX%%/sbin/drizzled"
-command_args="--user=${drizzle_user} --datadir=${drizzle_dbdir} --pid-file=${pidfile} ${drizzle_args} > ${drizzle_log} 2>&1 &"
-start_precmd="${name}_prestart"
-start_postcmd="${name}_poststart"
-
-drizzle_prestart()
-{
- if checkyesno drizzle_limits; then
- eval `/usr/bin/limits ${drizzle_limits_args}` 2>/dev/null
- else
- return 0
- fi
-}
-
-drizzle_poststart()
-{
- local timeout=15
- while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do
- timeout=$(( timeout - 1 ))
- sleep 1
- done
- return 0
-}
-
-run_rc_command "$1"
diff --git a/databases/drizzle/pkg-descr b/databases/drizzle/pkg-descr
deleted file mode 100644
index faafe21f0919..000000000000
--- a/databases/drizzle/pkg-descr
+++ /dev/null
@@ -1,6 +0,0 @@
-Drizzle is a high-performance microkernel DBMS for scale-out
-applications. It is a community-driven project based on the popular
-MySQL DBMS and focused on MySQL's original goals of ease-of-use,
-reliability and performance.
-
-WWW: http://drizzle.org/wiki/Main_Page
diff --git a/databases/drizzle/pkg-plist b/databases/drizzle/pkg-plist
deleted file mode 100644
index dc46189c8c75..000000000000
--- a/databases/drizzle/pkg-plist
+++ /dev/null
@@ -1,564 +0,0 @@
-bin/drizzle
-bin/drizzledump
-bin/drizzleimport
-bin/drizzleslap
-sbin/drizzled
-include/drizzled/algorithm/crc32.h
-include/drizzled/algorithm/sha1.h
-include/drizzled/alter_column.h
-include/drizzled/alter_drop.h
-include/drizzled/alter_info.h
-include/drizzled/atomic/gcc_traits.h
-include/drizzled/atomic/pthread_traits.h
-include/drizzled/atomic/sun_studio.h
-include/drizzled/atomics.h
-include/drizzled/base.h
-include/drizzled/cached_directory.h
-include/drizzled/cached_item.h
-include/drizzled/calendar.h
-include/drizzled/charset.h
-include/drizzled/charset_info.h
-include/drizzled/check_stack_overrun.h
-include/drizzled/common.h
-include/drizzled/comp_creator.h
-include/drizzled/create_field.h
-include/drizzled/current_session.h
-include/drizzled/cursor.h
-include/drizzled/data_home.h
-include/drizzled/db.h
-include/drizzled/decimal.h
-include/drizzled/definitions.h
-include/drizzled/diagnostics_area.h
-include/drizzled/discrete_interval.h
-include/drizzled/drizzle_time.h
-include/drizzled/drizzled.h
-include/drizzled/dtcollation.h
-include/drizzled/dynamic_array.h
-include/drizzled/enum.h
-include/drizzled/enum_nested_loop_state.h
-include/drizzled/errmsg_print.h
-include/drizzled/error.h
-include/drizzled/field.h
-include/drizzled/field/blob.h
-include/drizzled/field/date.h
-include/drizzled/field/datetime.h
-include/drizzled/field/decimal.h
-include/drizzled/field/double.h
-include/drizzled/field/enum.h
-include/drizzled/field/int64_t.h
-include/drizzled/field/long.h
-include/drizzled/field/null.h
-include/drizzled/field/num.h
-include/drizzled/field/real.h
-include/drizzled/field/str.h
-include/drizzled/field/timestamp.h
-include/drizzled/field/varstring.h
-include/drizzled/field_iterator.h
-include/drizzled/file_exchange.h
-include/drizzled/filesort_info.h
-include/drizzled/foreign_key.h
-include/drizzled/function/additive_op.h
-include/drizzled/function/coercibility.h
-include/drizzled/function/field.h
-include/drizzled/function/find_in_set.h
-include/drizzled/function/found_rows.h
-include/drizzled/function/func.h
-include/drizzled/function/get_system_var.h
-include/drizzled/function/get_user_var.h
-include/drizzled/function/last_insert.h
-include/drizzled/function/locate.h
-include/drizzled/function/math/abs.h
-include/drizzled/function/math/acos.h
-include/drizzled/function/math/asin.h
-include/drizzled/function/math/atan.h
-include/drizzled/function/math/ceiling.h
-include/drizzled/function/math/cos.h
-include/drizzled/function/math/dec.h
-include/drizzled/function/math/decimal_typecast.h
-include/drizzled/function/math/divide.h
-include/drizzled/function/math/exp.h
-include/drizzled/function/math/floor.h
-include/drizzled/function/math/int.h
-include/drizzled/function/math/int_divide.h
-include/drizzled/function/math/int_val.h
-include/drizzled/function/math/integer.h
-include/drizzled/function/math/ln.h
-include/drizzled/function/math/log.h
-include/drizzled/function/math/minus.h
-include/drizzled/function/math/mod.h
-include/drizzled/function/math/multiply.h
-include/drizzled/function/math/neg.h
-include/drizzled/function/math/ord.h
-include/drizzled/function/math/plus.h
-include/drizzled/function/math/pow.h
-include/drizzled/function/math/rand.h
-include/drizzled/function/math/real.h
-include/drizzled/function/math/round.h
-include/drizzled/function/math/sin.h
-include/drizzled/function/math/sqrt.h
-include/drizzled/function/math/tan.h
-include/drizzled/function/min_max.h
-include/drizzled/function/num1.h
-include/drizzled/function/num_op.h
-include/drizzled/function/numhybrid.h
-include/drizzled/function/rollup_const.h
-include/drizzled/function/row_count.h
-include/drizzled/function/set_user_var.h
-include/drizzled/function/sign.h
-include/drizzled/function/str/alloc_buffer.h
-include/drizzled/function/str/binary.h
-include/drizzled/function/str/char.h
-include/drizzled/function/str/collation.h
-include/drizzled/function/str/concat.h
-include/drizzled/function/str/conv.h
-include/drizzled/function/str/conv_charset.h
-include/drizzled/function/str/elt.h
-include/drizzled/function/str/export_set.h
-include/drizzled/function/str/format.h
-include/drizzled/function/str/insert.h
-include/drizzled/function/str/left.h
-include/drizzled/function/str/load_file.h
-include/drizzled/function/str/make_set.h
-include/drizzled/function/str/pad.h
-include/drizzled/function/str/quote.h
-include/drizzled/function/str/repeat.h
-include/drizzled/function/str/replace.h
-include/drizzled/function/str/right.h
-include/drizzled/function/str/set_collation.h
-include/drizzled/function/str/str_conv.h
-include/drizzled/function/str/strfunc.h
-include/drizzled/function/str/trim.h
-include/drizzled/function/time/curdate.h
-include/drizzled/function/time/date.h
-include/drizzled/function/time/date_add_interval.h
-include/drizzled/function/time/date_format.h
-include/drizzled/function/time/dayname.h
-include/drizzled/function/time/dayofmonth.h
-include/drizzled/function/time/dayofyear.h
-include/drizzled/function/time/extract.h
-include/drizzled/function/time/from_days.h
-include/drizzled/function/time/from_unixtime.h
-include/drizzled/function/time/hour.h
-include/drizzled/function/time/last_day.h
-include/drizzled/function/time/makedate.h
-include/drizzled/function/time/microsecond.h
-include/drizzled/function/time/minute.h
-include/drizzled/function/time/month.h
-include/drizzled/function/time/now.h
-include/drizzled/function/time/period_add.h
-include/drizzled/function/time/period_diff.h
-include/drizzled/function/time/quarter.h
-include/drizzled/function/time/second.h
-include/drizzled/function/time/sysdate_local.h
-include/drizzled/function/time/timestamp_diff.h
-include/drizzled/function/time/to_days.h
-include/drizzled/function/time/typecast.h
-include/drizzled/function/time/unix_timestamp.h
-include/drizzled/function/time/weekday.h
-include/drizzled/function/time/year.h
-include/drizzled/function/units.h
-include/drizzled/function/user_var_as_out_param.h
-include/drizzled/function_hash.h
-include/drizzled/gettext.h
-include/drizzled/global_charset_info.h
-include/drizzled/ha_statistics.h
-include/drizzled/handler_structs.h
-include/drizzled/hybrid_type.h
-include/drizzled/hybrid_type_traits.h
-include/drizzled/hybrid_type_traits_decimal.h
-include/drizzled/hybrid_type_traits_integer.h
-include/drizzled/index_hint.h
-include/drizzled/internal_error_handler.h
-include/drizzled/item.h
-include/drizzled/item/basic_constant.h
-include/drizzled/item/bin_string.h
-include/drizzled/item/blob.h
-include/drizzled/item/cache.h
-include/drizzled/item/cache_decimal.h
-include/drizzled/item/cache_int.h
-include/drizzled/item/cache_real.h
-include/drizzled/item/cache_row.h
-include/drizzled/item/cache_str.h
-include/drizzled/item/cmpfunc.h
-include/drizzled/item/copy_string.h
-include/drizzled/item/create.h
-include/drizzled/item/decimal.h
-include/drizzled/item/default_value.h
-include/drizzled/item/direct_ref.h
-include/drizzled/item/empty_string.h
-include/drizzled/item/field.h
-include/drizzled/item/float.h
-include/drizzled/item/func.h
-include/drizzled/item/hex_string.h
-include/drizzled/item/ident.h
-include/drizzled/item/insert_value.h
-include/drizzled/item/int.h
-include/drizzled/item/int_with_ref.h
-include/drizzled/item/null.h
-include/drizzled/item/num.h
-include/drizzled/item/outer_ref.h
-include/drizzled/item/ref.h
-include/drizzled/item/ref_null_helper.h
-include/drizzled/item/return_date_time.h
-include/drizzled/item/return_int.h
-include/drizzled/item/row.h
-include/drizzled/item/string.h
-include/drizzled/item/subselect.h
-include/drizzled/item/sum.h
-include/drizzled/item/type_holder.h
-include/drizzled/item/uint.h
-include/drizzled/item_result.h
-include/drizzled/join.h
-include/drizzled/join_cache.h
-include/drizzled/join_table.h
-include/drizzled/key.h
-include/drizzled/key_map.h
-include/drizzled/key_part_spec.h
-include/drizzled/korr.h
-include/drizzled/lex_column.h
-include/drizzled/lex_input_stream.h
-include/drizzled/lex_string.h
-include/drizzled/lex_symbol.h
-include/drizzled/lock.h
-include/drizzled/lookup_symbol.h
-include/drizzled/memory/multi_malloc.h
-include/drizzled/memory/root.h
-include/drizzled/memory/sql_alloc.h
-include/drizzled/message/engine.pb.h
-include/drizzled/message/schema.pb.h
-include/drizzled/message/statement_transform.h
-include/drizzled/message/table.pb.h
-include/drizzled/message/transaction.pb.h
-include/drizzled/module/context.h
-include/drizzled/module/library.h
-include/drizzled/module/manifest.h
-include/drizzled/module/module.h
-include/drizzled/module/registry.h
-include/drizzled/my_hash.h
-include/drizzled/name_resolution_context.h
-include/drizzled/name_resolution_context_state.h
-include/drizzled/named_savepoint.h
-include/drizzled/natural_join_column.h
-include/drizzled/nested_join.h
-include/drizzled/open_tables_state.h
-include/drizzled/optimizer/access_method.h
-include/drizzled/optimizer/access_method/const.h
-include/drizzled/optimizer/access_method/index.h
-include/drizzled/optimizer/access_method/scan.h
-include/drizzled/optimizer/access_method/system.h
-include/drizzled/optimizer/access_method/unique_index.h
-include/drizzled/optimizer/access_method_factory.h
-include/drizzled/optimizer/cost_vector.h
-include/drizzled/optimizer/explain_plan.h
-include/drizzled/optimizer/key_field.h
-include/drizzled/optimizer/key_use.h
-include/drizzled/optimizer/position.h
-include/drizzled/optimizer/quick_group_min_max_select.h
-include/drizzled/optimizer/quick_index_merge_select.h
-include/drizzled/optimizer/quick_range.h
-include/drizzled/optimizer/quick_range_select.h
-include/drizzled/optimizer/quick_ror_intersect_select.h
-include/drizzled/optimizer/quick_ror_union_select.h
-include/drizzled/optimizer/range.h
-include/drizzled/optimizer/range_param.h
-include/drizzled/optimizer/sargable_param.h
-include/drizzled/optimizer/sel_arg.h
-include/drizzled/optimizer/sel_imerge.h
-include/drizzled/optimizer/sel_tree.h
-include/drizzled/optimizer/sum.h
-include/drizzled/optimizer/table_read_plan.h
-include/drizzled/option.h
-include/drizzled/order.h
-include/drizzled/parser.h
-include/drizzled/plugin.h
-include/drizzled/plugin/authentication.h
-include/drizzled/plugin/authorization.h
-include/drizzled/plugin/client.h
-include/drizzled/plugin/daemon.h
-include/drizzled/plugin/error_message.h
-include/drizzled/plugin/event_observer.h
-include/drizzled/plugin/function.h
-include/drizzled/plugin/listen.h
-include/drizzled/plugin/listen_tcp.h
-include/drizzled/plugin/logging.h
-include/drizzled/plugin/monitored_in_transaction.h
-include/drizzled/plugin/null_client.h
-include/drizzled/plugin/plugin.h
-include/drizzled/plugin/query_cache.h
-include/drizzled/plugin/query_rewrite.h
-include/drizzled/plugin/replication.h
-include/drizzled/plugin/scheduler.h
-include/drizzled/plugin/storage_engine.h
-include/drizzled/plugin/table_function.h
-include/drizzled/plugin/transaction_applier.h
-include/drizzled/plugin/transaction_reader.h
-include/drizzled/plugin/transaction_replicator.h
-include/drizzled/plugin/transactional_storage_engine.h
-include/drizzled/plugin/version.h
-include/drizzled/plugin/xa_resource_manager.h
-include/drizzled/plugin/xa_storage_engine.h
-include/drizzled/probes.h
-include/drizzled/pthread_globals.h
-include/drizzled/qsort_cmp.h
-include/drizzled/query_id.h
-include/drizzled/records.h
-include/drizzled/replication_services.h
-include/drizzled/resource_context.h
-include/drizzled/schema_identifier.h
-include/drizzled/security_context.h
-include/drizzled/select_create.h
-include/drizzled/select_dump.h
-include/drizzled/select_dumpvar.h
-include/drizzled/select_exists_subselect.h
-include/drizzled/select_export.h
-include/drizzled/select_insert.h
-include/drizzled/select_max_min_finder_subselect.h
-include/drizzled/select_result.h
-include/drizzled/select_result_interceptor.h
-include/drizzled/select_send.h
-include/drizzled/select_singlerow_subselect.h
-include/drizzled/select_subselect.h
-include/drizzled/select_to_file.h
-include/drizzled/select_union.h
-include/drizzled/session.h
-include/drizzled/session_list.h
-include/drizzled/set_var.h
-include/drizzled/show.h
-include/drizzled/signal_handler.h
-include/drizzled/sql_base.h
-include/drizzled/sql_bitmap.h
-include/drizzled/sql_error.h
-include/drizzled/sql_lex.h
-include/drizzled/sql_list.h
-include/drizzled/sql_load.h
-include/drizzled/sql_locale.h
-include/drizzled/sql_parse.h
-include/drizzled/sql_select.h
-include/drizzled/sql_sort.h
-include/drizzled/sql_state.h
-include/drizzled/sql_string.h
-include/drizzled/sql_table.h
-include/drizzled/sql_union.h
-include/drizzled/stacktrace.h
-include/drizzled/statement.h
-include/drizzled/statement/alter_schema.h
-include/drizzled/statement/alter_table.h
-include/drizzled/statement/analyze.h
-include/drizzled/statement/change_schema.h
-include/drizzled/statement/check.h
-include/drizzled/statement/commit.h
-include/drizzled/statement/create_index.h
-include/drizzled/statement/create_schema.h
-include/drizzled/statement/create_table.h
-include/drizzled/statement/delete.h
-include/drizzled/statement/drop_index.h
-include/drizzled/statement/drop_schema.h
-include/drizzled/statement/drop_table.h
-include/drizzled/statement/empty_query.h
-include/drizzled/statement/flush.h
-include/drizzled/statement/insert.h
-include/drizzled/statement/insert_select.h
-include/drizzled/statement/kill.h
-include/drizzled/statement/load.h
-include/drizzled/statement/release_savepoint.h
-include/drizzled/statement/rename_table.h
-include/drizzled/statement/replace.h
-include/drizzled/statement/replace_select.h
-include/drizzled/statement/rollback.h
-include/drizzled/statement/rollback_to_savepoint.h
-include/drizzled/statement/savepoint.h
-include/drizzled/statement/select.h
-include/drizzled/statement/set_option.h
-include/drizzled/statement/show_create.h
-include/drizzled/statement/show_create_schema.h
-include/drizzled/statement/show_errors.h
-include/drizzled/statement/show_warnings.h
-include/drizzled/statement/start_transaction.h
-include/drizzled/statement/truncate.h
-include/drizzled/statement/unlock_tables.h
-include/drizzled/statement/update.h
-include/drizzled/statistics_variables.h
-include/drizzled/stored_key.h
-include/drizzled/strfunc.h
-include/drizzled/structs.h
-include/drizzled/symbol_hash.h
-include/drizzled/table.h
-include/drizzled/table_function_container.h
-include/drizzled/table_ident.h
-include/drizzled/table_identifier.h
-include/drizzled/table_list.h
-include/drizzled/table_placeholder.h
-include/drizzled/table_proto.h
-include/drizzled/table_reference.h
-include/drizzled/table_share.h
-include/drizzled/table_share_instance.h
-include/drizzled/temporal.h
-include/drizzled/temporal_format.h
-include/drizzled/temporal_interval.h
-include/drizzled/thr_lock.h
-include/drizzled/time_functions.h
-include/drizzled/tmp_table_param.h
-include/drizzled/transaction_context.h
-include/drizzled/transaction_services.h
-include/drizzled/tree.h
-include/drizzled/typelib.h
-include/drizzled/tzfile.h
-include/drizzled/tztime.h
-include/drizzled/unique.h
-include/drizzled/unireg.h
-include/drizzled/unordered_map.h
-include/drizzled/unordered_set.h
-include/drizzled/user_var_entry.h
-include/drizzled/utf8.h
-include/drizzled/utf8/checked.h
-include/drizzled/utf8/core.h
-include/drizzled/utf8/unchecked.h
-include/drizzled/util/convert.h
-include/drizzled/util/functors.h
-include/drizzled/util/test.h
-include/drizzled/util/tokenize.h
-include/drizzled/var.h
-include/drizzled/version.h
-include/drizzled/visibility.h
-include/drizzled/xid.h
-lib/drizzle/libarchive_plugin.la
-lib/drizzle/libarchive_plugin.so
-lib/drizzle/libascii_plugin.la
-lib/drizzle/libascii_plugin.so
-lib/drizzle/libauth_file_plugin.la
-lib/drizzle/libauth_file_plugin.so
-lib/drizzle/libauth_http_plugin.la
-lib/drizzle/libauth_http_plugin.so
-lib/drizzle/libauth_pam_plugin.la
-lib/drizzle/libauth_pam_plugin.so
-lib/drizzle/libbenchmark_plugin.la
-lib/drizzle/libbenchmark_plugin.so
-lib/drizzle/libblackhole_plugin.la
-lib/drizzle/libblackhole_plugin.so
-lib/drizzle/libcharlength_plugin.la
-lib/drizzle/libcharlength_plugin.so
-lib/drizzle/libcompression_plugin.la
-lib/drizzle/libcompression_plugin.so
-lib/drizzle/libconnection_id_plugin.la
-lib/drizzle/libconnection_id_plugin.so
-lib/drizzle/libconsole_plugin.la
-lib/drizzle/libconsole_plugin.so
-lib/drizzle/libcrc32_plugin.la
-lib/drizzle/libcrc32_plugin.so
-lib/drizzle/libcsv_plugin.la
-lib/drizzle/libcsv_plugin.so
-lib/drizzle/libdatabase_function_plugin.la
-lib/drizzle/libdatabase_function_plugin.so
-lib/drizzle/libdefault_replicator_plugin.la
-lib/drizzle/libdefault_replicator_plugin.so
-lib/drizzle/liberrmsg_stderr_plugin.la
-lib/drizzle/liberrmsg_stderr_plugin.so
-lib/drizzle/libfiltered_replicator_plugin.la
-lib/drizzle/libfiltered_replicator_plugin.so
-lib/drizzle/libgearman_udf_plugin.la
-lib/drizzle/libgearman_udf_plugin.so
-lib/drizzle/libhello_events_plugin.la
-lib/drizzle/libhello_events_plugin.so
-lib/drizzle/libhello_world_plugin.la
-lib/drizzle/libhello_world_plugin.so
-lib/drizzle/libhex_functions_plugin.la
-lib/drizzle/libhex_functions_plugin.so
-lib/drizzle/liblength_plugin.la
-lib/drizzle/liblength_plugin.so
-lib/drizzle/liblogging_gearman_plugin.la
-lib/drizzle/liblogging_gearman_plugin.so
-lib/drizzle/liblogging_query_plugin.la
-lib/drizzle/liblogging_query_plugin.so
-lib/drizzle/liblogging_stats_plugin.la
-lib/drizzle/liblogging_stats_plugin.so
-lib/drizzle/liblogging_syslog_plugin.la
-lib/drizzle/liblogging_syslog_plugin.so
-lib/drizzle/libmd5_plugin.la
-lib/drizzle/libmd5_plugin.so
-lib/drizzle/libmulti_thread_plugin.la
-lib/drizzle/libmulti_thread_plugin.so
-lib/drizzle/libpool_of_threads_plugin.la
-lib/drizzle/libpool_of_threads_plugin.so
-lib/drizzle/libreverse_function_plugin.la
-lib/drizzle/libreverse_function_plugin.so
-lib/drizzle/librot13_plugin.la
-lib/drizzle/librot13_plugin.so
-lib/drizzle/libshow_schema_proto_plugin.la
-lib/drizzle/libshow_schema_proto_plugin.so
-lib/drizzle/libsimple_user_policy_plugin.la
-lib/drizzle/libsimple_user_policy_plugin.so
-lib/drizzle/libsingle_thread_plugin.la
-lib/drizzle/libsingle_thread_plugin.so
-lib/drizzle/libsleep_plugin.la
-lib/drizzle/libsleep_plugin.so
-lib/drizzle/libsubstr_functions_plugin.la
-lib/drizzle/libsubstr_functions_plugin.so
-lib/drizzle/libtableprototester_plugin.la
-lib/drizzle/libtableprototester_plugin.so
-lib/drizzle/libtransaction_log_plugin.la
-lib/drizzle/libtransaction_log_plugin.so
-lib/drizzle/libuser_function_plugin.la
-lib/drizzle/libuser_function_plugin.so
-lib/drizzle/libuuid_function_plugin.la
-lib/drizzle/libuuid_function_plugin.so
-lib/drizzle/libversion_plugin.la
-lib/drizzle/libversion_plugin.so
-lib/libdrizzledmessage.la
-lib/libdrizzledmessage.so
-lib/libdrizzledmessage.so.0
-%%DATADIR%%/drizzle-log-rotate
-%%DATADIR%%/drizzle.server
-@dirrm %%DATADIR%%
-@dirrm lib/drizzle
-@dirrm include/drizzled/util
-@dirrm include/drizzled/utf8
-@dirrm include/drizzled/statement
-@dirrm include/drizzled/plugin
-@dirrm include/drizzled/optimizer/access_method
-@dirrm include/drizzled/optimizer
-@dirrm include/drizzled/module
-@dirrm include/drizzled/message
-@dirrm include/drizzled/memory
-@dirrm include/drizzled/item
-@dirrm include/drizzled/function/time
-@dirrm include/drizzled/function/str
-@dirrm include/drizzled/function/math
-@dirrm include/drizzled/function
-@dirrm include/drizzled/field
-@dirrm include/drizzled/atomic
-@dirrm include/drizzled/algorithm
-@dirrm include/drizzled
-%%NLS%%share/locale/ar/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/ca/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/cs/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/cy/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/de/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/el/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/en_AU/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/en_GB/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/eo/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/es/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/fr/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/he/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/hi/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/id/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/it/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/ja/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/ko/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/ml/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/mr/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/ms/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/nb/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/nl/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/pl/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/pt/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/pt_BR/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/ro/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/ru/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/sv/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/ta/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/tr/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/zh_CN/LC_MESSAGES/drizzle.mo
-%%NLS%%share/locale/zh_HK/LC_MESSAGES/drizzle.mo
-%%NLS%%@dirrmtry share/locale/mr/LC_MESSAGES
-%%NLS%%@dirrmtry share/locale/mr
diff --git a/databases/gomysql/Makefile b/databases/gomysql/Makefile
deleted file mode 100644
index 44486dd644ad..000000000000
--- a/databases/gomysql/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# Created by: Wen Heping <wen@FreeBSD.org
-# $FreeBSD$
-
-PORTNAME= gomysql
-PORTVERSION= 0.3.2
-PORTREVISION= 3
-CATEGORIES= databases
-MASTER_SITES= LOCAL/wen
-DISTNAME= Philio-GoMySQL-${PORTVERSION}-0-g3c1f411
-
-MAINTAINER= wen@FreeBSD.org
-COMMENT= A MySQL client library written in Go
-
-DEPRECATED= Broken for more than 6 month
-EXPIRATION_DATE= 2013-11-18
-
-BROKEN= Does not compile with go1
-
-WRKSRC= ${WRKDIR}/Philio-GoMySQL-f1112aa
-PLIST_FILES= ${GO_LIBDIR}/mysql.a
-
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
-.include "${PORTSDIR}/lang/go/files/bsd.go.mk"
-.include <bsd.port.post.mk>
diff --git a/databases/gomysql/distinfo b/databases/gomysql/distinfo
deleted file mode 100644
index 2ad2ca6da669..000000000000
--- a/databases/gomysql/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (Philio-GoMySQL-0.3.2-0-g3c1f411.tar.gz) = 104e80c397363079f79f45b42fd3c5c90cfc21047d7e9214f6f59313189be5a0
-SIZE (Philio-GoMySQL-0.3.2-0-g3c1f411.tar.gz) = 31928
diff --git a/databases/gomysql/pkg-descr b/databases/gomysql/pkg-descr
deleted file mode 100644
index d2071b792c95..000000000000
--- a/databases/gomysql/pkg-descr
+++ /dev/null
@@ -1,6 +0,0 @@
-A MySQL client library written in Go. The aim of this project is to
-provide a library with a high level of usability, good interal error
-handling and to emulate similar libraries available for other languages
-to provide an easy migration of MySQL based systems into the Go language.
-
-WWW: https://github.com/Philio/GoMySQL
diff --git a/databases/p5-DBD-InterBase/Makefile b/databases/p5-DBD-InterBase/Makefile
deleted file mode 100644
index 0ff40248d910..000000000000
--- a/databases/p5-DBD-InterBase/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-# Created by: Sergey Skvortsov <skv@protey.ru>
-# $FreeBSD$
-
-PORTNAME= DBD-InterBase
-PORTVERSION= 0.48
-PORTREVISION= 1
-CATEGORIES= databases perl5
-MASTER_SITES= CPAN
-MASTER_SITE_SUBDIR= DBD
-PKGNAMEPREFIX= p5-
-
-MAINTAINER= perl@FreeBSD.org
-COMMENT= DBI driver for InterBase RDBMS server
-
-DEPRECATED= Broken for more than 6 month
-EXPIRATION_DATE= 2013-11-18
-
-BUILD_DEPENDS= p5-DBI>=0:${PORTSDIR}/databases/p5-DBI
-RUN_DEPENDS:= ${BUILD_DEPENDS}
-
-USES= perl5
-USE_PERL5= configure
-USE_FIREBIRD= yes
-
-NO_STAGE= yes
-post-patch:
- @${REINPLACE_CMD} -i '' -e 's|%%IB_BASE%%|${LOCALBASE}|' \
- ${WRKSRC}/Makefile.PL
-
-MAN3= DBD::InterBase.3
-
-.include <bsd.port.pre.mk>
-.if ${PERL_LEVEL} > 501400
-BROKEN= does not compile, project moved or dead, no releases since 2003
-.endif
-.include <bsd.port.post.mk>
diff --git a/databases/p5-DBD-InterBase/distinfo b/databases/p5-DBD-InterBase/distinfo
deleted file mode 100644
index 990e2aa9fab8..000000000000
--- a/databases/p5-DBD-InterBase/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (DBD-InterBase-0.48.tar.gz) = 40b1dba601f10c5d66b26bb235424d398882740b3586a30405123735bc4bec44
-SIZE (DBD-InterBase-0.48.tar.gz) = 88658
diff --git a/databases/p5-DBD-InterBase/files/patch-Makefile.PL b/databases/p5-DBD-InterBase/files/patch-Makefile.PL
deleted file mode 100644
index 16ffa097669d..000000000000
--- a/databases/p5-DBD-InterBase/files/patch-Makefile.PL
+++ /dev/null
@@ -1,85 +0,0 @@
---- Makefile.PL.orig Sat Nov 22 06:12:11 2003
-+++ Makefile.PL Mon Dec 8 20:01:27 2003
-@@ -28,7 +28,7 @@
- use DBI::DBD; # DBD creation tools
-
- my $ib_dir_prefix;
--
-+=rem
- # init stuff
- my $IB_Bin_path = '';
- my $isql_name;
-@@ -82,7 +82,12 @@
- @ib_bin_dirs = (qw(/usr/interbase/bin /opt/interbase/bin /opt/firebird/bin /usr/bin /usr/local/bin));
- @ib_inc_dirs = (qw(/usr/interbase/include /opt/interbase/include /opt/firebird/include /usr/include));
- }
--
-+=cut
-+my $IB_BASE='%%IB_BASE%%';
-+my $IB_Bin_path = $IB_BASE.'/bin';
-+my $isql_name = 'isql';
-+my $ib_lib_dir = $IB_BASE.'/lib';
-+my $ib_inc = $IB_BASE.'/include';
- sub locate_dbi_arch_dir {
- my $dbidir = dbd_dbi_dir();
- my @try = map { "$_/auto/DBI" } @INC;
-@@ -91,7 +96,7 @@
- Carp::carp( "Multiple copies of Driver.xst found in: @xst") if @xst > 1;
- return $xst[0];
- }
--
-+=rem
- ################################################################################
- # sub test_files - checks if at least one of the files in the list exists
- # Paramters:
-@@ -296,13 +301,13 @@
-
- # prompt for InterBase bin directory
- $IB_Bin_path = dir_choice("InterBase/Firebird bin directory", [@ib_bin_dirs], [qw(gfix gfix.exe)]);
--
-+=cut
- unless(-x $IB_Bin_path)
- {
- carp "I cannot find your InterBase/Firebird installation.\nDBD::InterBase cannot build or run without InterBase.\n";
- exit 1;
- }
--
-+=rem
- # get InterBase version
- my $IBVERSION;
- my $GFIX_PATH = $IB_Bin_path . "/" . test_files($IB_Bin_path, [qw(gfix gfix.exe)]);
-@@ -312,7 +317,7 @@
-
- # prompt for IB include dir
- my $ib_inc = dir_choice("InterBase/Firebird include directory", [@ib_inc_dirs], [qw(gds.h ibase.h)]);
--
-+=cut
-
- # we use a hash for the MakeMaker parameters
- my %MakeParams = (
-@@ -323,14 +328,14 @@
- 'CCFLAGS' => '',
- 'INC' => qq(-I"$ib_inc" -I"${\locate_dbi_arch_dir()}"),
- 'OBJECT' => "InterBase.o dbdimp.o",
-- 'LIBS' => [''],
-+ 'LIBS' => "-L$ib_lib_dir -lgds",
- 'OPTIMIZE' => $Config::Config{'optimize'},
- 'XSPROTOARG' => '-noprototypes',
- 'dist' => {COMPRESS=>'gzip -9f', SUFFIX=>'gz'},
- 'clean' => {FILES => "*.xsi *.old t/*.old *~ t/*~ trace.txt t/trace.txt lib/DBD/InterBase/*~ lib/DBD/InterBase/*.old lib/Bundle/DBD/*~ lib/Bundle/DBD/*.old"},
- 'realclean' => {FILES => "t/test.conf"},
- );
--
-+=rem
- # the OS specific build environment setup
- my $os = $Config::Config{'osname'};
- if ($os eq 'MSWin32')
-@@ -530,7 +535,7 @@
-
- # create the test config file
- make_test_conf();
--
-+=cut
- # and last but not least write the makefile
- WriteMakefile(%MakeParams);
-
diff --git a/databases/p5-DBD-InterBase/pkg-descr b/databases/p5-DBD-InterBase/pkg-descr
deleted file mode 100644
index eee1bf6a7d75..000000000000
--- a/databases/p5-DBD-InterBase/pkg-descr
+++ /dev/null
@@ -1,4 +0,0 @@
-DBD::InterBase is a Perl module which works with the DBI module to
-provide access to InterBase databases.
-
-WWW: http://search.cpan.org/dist/DBD-InterBase/
diff --git a/databases/p5-DBD-InterBase/pkg-plist b/databases/p5-DBD-InterBase/pkg-plist
deleted file mode 100644
index bfc2cfece751..000000000000
--- a/databases/p5-DBD-InterBase/pkg-plist
+++ /dev/null
@@ -1,10 +0,0 @@
-%%SITE_PERL%%/%%PERL_ARCH%%/auto/DBD/InterBase/.packlist
-%%SITE_PERL%%/%%PERL_ARCH%%/DBD/InterBase.pm
-%%SITE_PERL%%/%%PERL_ARCH%%/DBD/InterBase/GetInfo.pm
-%%SITE_PERL%%/%%PERL_ARCH%%/DBD/InterBase/TypeInfo.pm
-%%SITE_PERL%%/%%PERL_ARCH%%/auto/DBD/InterBase/InterBase.bs
-%%SITE_PERL%%/%%PERL_ARCH%%/auto/DBD/InterBase/InterBase.so
-@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/DBD/InterBase
-@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/DBD
-@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/DBD/InterBase
-@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/DBD
diff --git a/databases/p5-DBZ_File/Makefile b/databases/p5-DBZ_File/Makefile
deleted file mode 100644
index 63a139f9a93a..000000000000
--- a/databases/p5-DBZ_File/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-# Created by: Yen-Ming Lee <leeym@FreeBSD.org>
-# $FreeBSD$
-
-PORTNAME= DBZ_File
-PORTVERSION= 1.1
-CATEGORIES= databases perl5
-MASTER_SITES= CPAN
-PKGNAMEPREFIX= p5-
-DISTNAME= ${PORTNAME}_${PORTVERSION}
-
-MAINTAINER= leeym@FreeBSD.org
-COMMENT= Perl module to access a DBZ database
-
-DEPRECATED= BRoken for more than 6 month
-EXPIRATION_DATE= 2013-11-18
-
-USES= perl5
-USE_PERL5= configure
-CONFIGURE_ARGS= DEFINE="-I${FILESDIR}" POLLUTE=1
-
-WRKSRC= ${WRKDIR}/DBZ_File
-
-MAN3= DBZ_File.3
-
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
-.if ${PERL_LEVEL} > 501400
-BROKEN= POLLUTE=1 is gone, does not compile, has not been released since 1997
-.endif
-.include <bsd.port.post.mk>
diff --git a/databases/p5-DBZ_File/distinfo b/databases/p5-DBZ_File/distinfo
deleted file mode 100644
index b618f28fa561..000000000000
--- a/databases/p5-DBZ_File/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (DBZ_File_1.1.tar.gz) = 5cd6d6e555f20792e0793f939e32b5679e6da41f60e035eac27df5db5a11696a
-SIZE (DBZ_File_1.1.tar.gz) = 3365
diff --git a/databases/p5-DBZ_File/files/dbz.c b/databases/p5-DBZ_File/files/dbz.c
deleted file mode 100644
index 106dd52245bc..000000000000
--- a/databases/p5-DBZ_File/files/dbz.c
+++ /dev/null
@@ -1,1759 +0,0 @@
-/*
-
-dbz.c V3.2
-
-Copyright 1988 Jon Zeeff (zeeff@b-tech.ann-arbor.mi.us)
-You can use this code in any manner, as long as you leave my name on it
-and don't hold me responsible for any problems with it.
-
-Hacked on by gdb@ninja.UUCP (David Butler); Sun Jun 5 00:27:08 CDT 1988
-
-Various improvments + INCORE by moraes@ai.toronto.edu (Mark Moraes)
-
-Major reworking by Henry Spencer as part of the C News project.
-
-These routines replace dbm as used by the usenet news software
-(it's not a full dbm replacement by any means). It's fast and
-simple. It contains no AT&T code.
-
-In general, dbz's files are 1/20 the size of dbm's. Lookup performance
-is somewhat better, while file creation is spectacularly faster, especially
-if the incore facility is used.
-
-*/
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#ifndef __STDC__
-extern int errno;
-#endif
-#include <dbz.h>
-
-/*
- * #ifdef index. "LIA" = "leave it alone unless you know what you're doing".
- *
- * FUNNYSEEKS SEEK_SET is not 0, get it from <unistd.h>
- * INDEX_SIZE backward compatibility with old dbz; avoid using this
- * NMEMORY number of days of memory for use in sizing new table (LIA)
- * INCORE backward compatibility with old dbz; use dbzincore() instead
- * DBZDEBUG enable debugging
- * DEFSIZE default table size (not as critical as in old dbz)
- * OLDBNEWS default case mapping as in old B News; set NOBUFFER
- * BNEWS default case mapping as in current B News; set NOBUFFER
- * DEFCASE default case-map algorithm selector
- * NOTAGS fseek offsets are strange, do not do tagging (see below)
- * NPAGBUF size of .pag buffer, in longs (LIA)
- * SHISTBUF size of ASCII-file buffer, in bytes (LIA)
- * MAXRUN length of run which shifts to next table (see below) (LIA)
- * OVERFLOW long-int arithmetic overflow must be avoided, will trap
- * NOBUFFER do not buffer hash-table i/o, B News locking is defective
- */
-
-#ifdef FUNNYSEEKS
-#include <unistd.h>
-#else
-#define SEEK_SET 0
-#endif
-#ifdef OVERFLOW
-#include <limits.h>
-#endif
-
-static int dbzversion = 3; /* for validating .dir file format */
-
-/*
- * The dbz database exploits the fact that when news stores a <key,value>
- * tuple, the `value' part is a seek offset into a text file, pointing to
- * a copy of the `key' part. This avoids the need to store a copy of
- * the key in the dbz files. However, the text file *must* exist and be
- * consistent with the dbz files, or things will fail.
- *
- * The basic format of the database is a simple hash table containing the
- * values. A value is stored by indexing into the table using a hash value
- * computed from the key; collisions are resolved by linear probing (just
- * search forward for an empty slot, wrapping around to the beginning of
- * the table if necessary). Linear probing is a performance disaster when
- * the table starts to get full, so a complication is introduced. The
- * database is actually one *or more* tables, stored sequentially in the
- * .pag file, and the length of linear-probe sequences is limited. The
- * search (for an existing item or an empty slot) always starts in the
- * first table, and whenever MAXRUN probes have been done in table N,
- * probing continues in table N+1. This behaves reasonably well even in
- * cases of massive overflow. There are some other small complications
- * added, see comments below.
- *
- * The table size is fixed for any particular database, but is determined
- * dynamically when a database is rebuilt. The strategy is to try to pick
- * the size so the first table will be no more than 2/3 full, that being
- * slightly before the point where performance starts to degrade. (It is
- * desirable to be a bit conservative because the overflow strategy tends
- * to produce files with holes in them, which is a nuisance.)
- */
-
-/*
- * The following is for backward compatibility.
- */
-#ifdef INDEX_SIZE
-#define DEFSIZE INDEX_SIZE
-#endif
-
-/*
- * ANSI C says an offset into a file is a long, not an off_t, for some
- * reason. This actually does simplify life a bit, but it's still nice
- * to have a distinctive name for it. Beware, this is just for readability,
- * don't try to change this.
- */
-#define of_t long
-#define SOF (sizeof(of_t))
-
-/*
- * We assume that unused areas of a binary file are zeros, and that the
- * bit pattern of `(of_t)0' is all zeros. The alternative is rather
- * painful file initialization. Note that okayvalue(), if OVERFLOW is
- * defined, knows what value of an offset would cause overflow.
- */
-#define VACANT ((of_t)0)
-#define BIAS(o) ((o)+1) /* make any valid of_t non-VACANT */
-#define UNBIAS(o) ((o)-1) /* reverse BIAS() effect */
-
-/*
- * In a Unix implementation, or indeed any in which an of_t is a byte
- * count, there are a bunch of high bits free in an of_t. There is a
- * use for them. Checking a possible hit by looking it up in the base
- * file is relatively expensive, and the cost can be dramatically reduced
- * by using some of those high bits to tag the value with a few more bits
- * of the key's hash. This detects most false hits without the overhead of
- * seek+read+strcmp. We use the top bit to indicate whether the value is
- * tagged or not, and don't tag a value which is using the tag bits itself.
- * We're in trouble if the of_t representation wants to use the top bit.
- * The actual bitmasks and offset come from the configuration stuff,
- * which permits fiddling with them as necessary, and also suppressing
- * them completely (by defining the masks to 0). We build pre-shifted
- * versions of the masks for efficiency.
- */
-static of_t tagbits; /* pre-shifted tag mask */
-static of_t taghere; /* pre-shifted tag-enable bit */
-static of_t tagboth; /* tagbits|taghere */
-#define HASTAG(o) ((o)&taghere)
-#define TAG(o) ((o)&tagbits)
-#define NOTAG(o) ((o)&~tagboth)
-#define CANTAG(o) (((o)&tagboth) == 0)
-#define MKTAG(v) (((v)<<conf.tagshift)&tagbits)
-
-/*
- * A new, from-scratch database, not built as a rebuild of an old one,
- * needs to know table size, casemap algorithm, and tagging. Normally
- * the user supplies this info, but there have to be defaults.
- */
-#ifndef DEFSIZE
-#define DEFSIZE 120011 /* 300007 might be better */
-#endif
-#ifdef OLDBNEWS
-#define DEFCASE '0' /* B2.10 -- no mapping */
-#define NOBUFFER /* B News locking is defective */
-#endif
-#ifdef BNEWS
-#define DEFCASE '=' /* B2.11 -- all mapped */
-#define NOBUFFER /* B News locking is defective */
-#endif
-#ifndef DEFCASE /* C News compatibility is the default */
-#define DEFCASE 'C' /* C News -- RFC822 mapping */
-#endif
-#ifndef NOTAGS
-#define TAGENB 0x80 /* tag enable is top bit, tag is next 7 */
-#define TAGMASK 0x7f
-#define TAGSHIFT 24
-#else
-#define TAGENB 0 /* no tags */
-#define TAGMASK 0
-#define TAGSHIFT 0
-#endif
-
-/*
- * We read configuration info from the .dir file into this structure,
- * so we can avoid wired-in assumptions for an existing database.
- *
- * Among the info is a record of recent peak usages, so that a new table
- * size can be chosen intelligently when rebuilding. 10 is a good
- * number of usages to keep, since news displays marked fluctuations
- * in volume on a 7-day cycle.
- */
-struct dbzconfig {
- int olddbz; /* .dir file empty but .pag not? */
- of_t tsize; /* table size */
-# ifndef NMEMORY
-# define NMEMORY 10 /* # days of use info to remember */
-# endif
-# define NUSEDS (1+NMEMORY)
- of_t used[NUSEDS]; /* entries used today, yesterday, ... */
- int valuesize; /* size of table values, == SOF */
- int bytemap[SOF]; /* byte-order map */
- char casemap; /* case-mapping algorithm (see cipoint()) */
- char fieldsep; /* field separator in base file, if any */
- of_t tagenb; /* unshifted tag-enable bit */
- of_t tagmask; /* unshifted tag mask */
- int tagshift; /* shift count for tagmask and tagenb */
-};
-static struct dbzconfig conf;
-static int getconf();
-static long getno();
-static int putconf();
-static void mybytemap();
-static of_t bytemap();
-
-/*
- * For a program that makes many, many references to the database, it
- * is a large performance win to keep the table in core, if it will fit.
- * Note that this does hurt robustness in the event of crashes, and
- * dbmclose() *must* be called to flush the in-core database to disk.
- * The code is prepared to deal with the possibility that there isn't
- * enough memory. There *is* an assumption that a size_t is big enough
- * to hold the size (in bytes) of one table, so dbminit() tries to figure
- * out whether this is possible first.
- *
- * The preferred way to ask for an in-core table is to do dbzincore(1)
- * before dbminit(). The default is not to do it, although -DINCORE
- * overrides this for backward compatibility with old dbz.
- *
- * We keep only the first table in core. This greatly simplifies the
- * code, and bounds memory demand. Furthermore, doing this is a large
- * performance win even in the event of massive overflow.
- */
-#ifdef INCORE
-static int incore = 1;
-#else
-static int incore = 0;
-#endif
-
-/*
- * Stdio buffer for .pag reads. Buffering more than about 16 does not help
- * significantly at the densities we try to maintain, and the much larger
- * buffers that most stdios default to are much more expensive to fill.
- * With small buffers, stdio is performance-competitive with raw read(),
- * and it's much more portable.
- */
-#ifndef NPAGBUF
-#define NPAGBUF 16
-#endif
-#ifndef NOBUFFER
-#ifdef _IOFBF
-static of_t pagbuf[NPAGBUF]; /* only needed if !NOBUFFER && _IOFBF */
-#endif
-#endif
-
-/*
- * Stdio buffer for base-file reads. Message-IDs (all news ever needs to
- * read) are essentially never longer than 64 bytes, and the typical stdio
- * buffer is so much larger that it is much more expensive to fill.
- */
-#ifndef SHISTBUF
-#define SHISTBUF 64
-#endif
-#ifdef _IOFBF
-static char basebuf[SHISTBUF]; /* only needed if _IOFBF exists */
-#endif
-
-/*
- * Data structure for recording info about searches.
- */
-struct searcher {
- of_t place; /* current location in file */
- int tabno; /* which table we're in */
- int run; /* how long we'll stay in this table */
-# ifndef MAXRUN
-# define MAXRUN 100
-# endif
- long hash; /* the key's hash code (for optimization) */
- of_t tag; /* tag we are looking for */
- int seen; /* have we examined current location? */
- int aborted; /* has i/o error aborted search? */
-};
-static void start();
-#define FRESH ((struct searcher *)NULL)
-static of_t search();
-#define NOTFOUND ((of_t)-1)
-static int okayvalue();
-static int set();
-
-/*
- * Arguably the searcher struct for a given routine ought to be local to
- * it, but a fetch() is very often immediately followed by a store(), and
- * in some circumstances it is a useful performance win to remember where
- * the fetch() completed. So we use a global struct and remember whether
- * it is current.
- */
-static struct searcher srch;
-static struct searcher *prevp; /* &srch or FRESH */
-
-/* byte-ordering stuff */
-static int mybmap[SOF]; /* my byte order (see mybytemap()) */
-static int bytesame; /* is database order same as mine? */
-#define MAPIN(o) ((bytesame) ? (o) : bytemap((o), conf.bytemap, mybmap))
-#define MAPOUT(o) ((bytesame) ? (o) : bytemap((o), mybmap, conf.bytemap))
-
-/*
- * The double parentheses needed to make this work are ugly, but the
- * alternative (under most compilers) is to pack around 2K of unused
- * strings -- there's just no way to get rid of them.
- */
-static int debug; /* controlled by dbzdebug() */
-#ifdef DBZDEBUG
-#define Debug(args) if (debug) { (void) printf args ; }
-#else
-#define Debug(args) ;
-#endif
-
-/* misc. forwards */
-static long hash();
-static void crcinit();
-static char *cipoint();
-static char *mapcase();
-static int isprime();
-static FILE *latebase();
-
-/* file-naming stuff */
-static char dir[] = ".dir";
-static char pag[] = ".pag";
-static char *enstring();
-
-/* central data structures */
-static FILE *basef; /* descriptor for base file */
-static char *basefname; /* name for not-yet-opened base file */
-static FILE *dirf; /* descriptor for .dir file */
-static int dirronly; /* dirf open read-only? */
-static FILE *pagf = NULL; /* descriptor for .pag file */
-static of_t pagpos; /* posn in pagf; only search may set != -1 */
-static int pagronly; /* pagf open read-only? */
-static of_t *corepag; /* incore version of .pag file, if any */
-static FILE *bufpagf; /* well-buffered pagf, for incore rewrite */
-static of_t *getcore();
-static int putcore();
-static int written; /* has a store() been done? */
-
-/*
- - dbzfresh - set up a new database, no historical info
- */
-int /* 0 success, -1 failure */
-dbzfresh(name, size, fs, cmap, tagmask)
-char *name; /* base name; .dir and .pag must exist */
-long size; /* table size (0 means default) */
-int fs; /* field-separator character in base file */
-int cmap; /* case-map algorithm (0 means default) */
-of_t tagmask; /* 0 default, 1 no tags */
-{
- register char *fn;
- struct dbzconfig c;
- register of_t m;
- register FILE *f;
-
- if (pagf != NULL) {
- Debug(("dbzfresh: database already open\n"));
- return(-1);
- }
- if (size != 0 && size < 2) {
- Debug(("dbzfresh: preposterous size (%ld)\n", size));
- return(-1);
- }
-
- /* get default configuration */
- if (getconf((FILE *)NULL, (FILE *)NULL, &c) < 0)
- return(-1); /* "can't happen" */
-
- /* and mess with it as specified */
- if (size != 0)
- c.tsize = size;
- c.fieldsep = fs;
- switch (cmap) {
- case 0:
- case '0':
- case 'B': /* 2.10 compat */
- c.casemap = '0'; /* '\0' nicer, but '0' printable! */
- break;
- case '=':
- case 'b': /* 2.11 compat */
- c.casemap = '=';
- break;
- case 'C':
- c.casemap = 'C';
- break;
- case '?':
- c.casemap = DEFCASE;
- break;
- default:
- Debug(("dbzfresh case map `%c' unknown\n", cmap));
- return(-1);
- break;
- }
- switch (tagmask) {
- case 0: /* default */
- break;
- case 1: /* no tags */
- c.tagshift = 0;
- c.tagmask = 0;
- c.tagenb = 0;
- break;
- default:
- m = tagmask;
- c.tagshift = 0;
- while (!(m&01)) {
- m >>= 1;
- c.tagshift++;
- }
- c.tagmask = m;
- c.tagenb = (m << 1) & ~m;
- break;
- }
-
- /* write it out */
- fn = enstring(name, dir);
- if (fn == NULL)
- return(-1);
- f = fopen(fn, "w");
- free(fn);
- if (f == NULL) {
- Debug(("dbzfresh: unable to write config\n"));
- return(-1);
- }
- if (putconf(f, &c) < 0) {
- (void) fclose(f);
- return(-1);
- }
- if (fclose(f) == EOF) {
- Debug(("dbzfresh: fclose failure\n"));
- return(-1);
- }
-
- /* create/truncate .pag */
- fn = enstring(name, pag);
- if (fn == NULL)
- return(-1);
- f = fopen(fn, "w");
- free(fn);
- if (f == NULL) {
- Debug(("dbzfresh: unable to create/truncate .pag file\n"));
- return(-1);
- } else
- (void) fclose(f);
-
- /* and punt to dbminit for the hard work */
- return(dbminit(name));
-}
-
-/*
- - dbzsize - what's a good table size to hold this many entries?
- */
-long
-dbzsize(contents)
-long contents; /* 0 means what's the default */
-{
- register long n;
-
- if (contents <= 0) { /* foulup or default inquiry */
- Debug(("dbzsize: preposterous input (%ld)\n", contents));
- return(DEFSIZE);
- }
- n = (contents/2)*3; /* try to keep table at most 2/3 full */
- if (!(n&01)) /* make it odd */
- n++;
- Debug(("dbzsize: tentative size %ld\n", n));
- while (!isprime(n)) /* and look for a prime */
- n += 2;
- Debug(("dbzsize: final size %ld\n", n));
-
- return(n);
-}
-
-/*
- - isprime - is a number prime?
- *
- * This is not a terribly efficient approach.
- */
-static int /* predicate */
-isprime(x)
-register long x;
-{
- static int quick[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 0 };
- register int *ip;
- register long div;
- register long stop;
-
- /* hit the first few primes quickly to eliminate easy ones */
- /* this incidentally prevents ridiculously small tables */
- for (ip = quick; (div = *ip) != 0; ip++)
- if (x%div == 0) {
- Debug(("isprime: quick result on %ld\n", (long)x));
- return(0);
- }
-
- /* approximate square root of x */
- for (stop = x; x/stop < stop; stop >>= 1)
- continue;
- stop <<= 1;
-
- /* try odd numbers up to stop */
- for (div = *--ip; div < stop; div += 2)
- if (x%div == 0)
- return(0);
-
- return(1);
-}
-
-/*
- - dbzagain - set up a new database to be a rebuild of an old one
- */
-int /* 0 success, -1 failure */
-dbzagain(name, oldname)
-char *name; /* base name; .dir and .pag must exist */
-char *oldname; /* base name; all must exist */
-{
- register char *fn;
- struct dbzconfig c;
- register int i;
- register long top;
- register FILE *f;
- register int newtable;
- register of_t newsize;
-
- if (pagf != NULL) {
- Debug(("dbzagain: database already open\n"));
- return(-1);
- }
-
- /* pick up the old configuration */
- fn = enstring(oldname, dir);
- if (fn == NULL)
- return(-1);
- f = fopen(fn, "r");
- free(fn);
- if (f == NULL) {
- Debug(("dbzagain: cannot open old .dir file\n"));
- return(-1);
- }
- i = getconf(f, (FILE *)NULL, &c);
- (void) fclose(f);
- if (i < 0) {
- Debug(("dbzagain: getconf failed\n"));
- return(-1);
- }
-
- /* tinker with it */
- top = 0;
- newtable = 0;
- for (i = 0; i < NUSEDS; i++) {
- if (top < c.used[i])
- top = c.used[i];
- if (c.used[i] == 0)
- newtable = 1; /* hasn't got full usage history yet */
- }
- if (top == 0) {
- Debug(("dbzagain: old table has no contents!\n"));
- newtable = 1;
- }
- for (i = NUSEDS-1; i > 0; i--)
- c.used[i] = c.used[i-1];
- c.used[0] = 0;
- newsize = dbzsize(top);
- if (!newtable || newsize > c.tsize) /* don't shrink new table */
- c.tsize = newsize;
-
- /* write it out */
- fn = enstring(name, dir);
- if (fn == NULL)
- return(-1);
- f = fopen(fn, "w");
- free(fn);
- if (f == NULL) {
- Debug(("dbzagain: unable to write new .dir\n"));
- return(-1);
- }
- i = putconf(f, &c);
- (void) fclose(f);
- if (i < 0) {
- Debug(("dbzagain: putconf failed\n"));
- return(-1);
- }
-
- /* create/truncate .pag */
- fn = enstring(name, pag);
- if (fn == NULL)
- return(-1);
- f = fopen(fn, "w");
- free(fn);
- if (f == NULL) {
- Debug(("dbzagain: unable to create/truncate .pag file\n"));
- return(-1);
- } else
- (void) fclose(f);
-
- /* and let dbminit do the work */
- return(dbminit(name));
-}
-
-/*
- - dbminit - open a database, creating it (using defaults) if necessary
- *
- * We try to leave errno set plausibly, to the extent that underlying
- * functions permit this, since many people consult it if dbminit() fails.
- */
-int /* 0 success, -1 failure */
-dbminit(name)
-char *name;
-{
- register int i;
- register size_t s;
- register char *dirfname;
- register char *pagfname;
-
- if (pagf != NULL) {
- Debug(("dbminit: dbminit already called once\n"));
- errno = 0;
- return(-1);
- }
-
- /* open the .dir file */
- dirfname = enstring(name, dir);
- if (dirfname == NULL)
- return(-1);
- dirf = fopen(dirfname, "r+");
- if (dirf == NULL) {
- dirf = fopen(dirfname, "r");
- dirronly = 1;
- } else
- dirronly = 0;
- free(dirfname);
- if (dirf == NULL) {
- Debug(("dbminit: can't open .dir file\n"));
- return(-1);
- }
-
- /* open the .pag file */
- pagfname = enstring(name, pag);
- if (pagfname == NULL) {
- (void) fclose(dirf);
- return(-1);
- }
- pagf = fopen(pagfname, "r+b");
- if (pagf == NULL) {
- pagf = fopen(pagfname, "rb");
- if (pagf == NULL) {
- Debug(("dbminit: .pag open failed\n"));
- (void) fclose(dirf);
- free(pagfname);
- return(-1);
- }
- pagronly = 1;
- } else if (dirronly)
- pagronly = 1;
- else
- pagronly = 0;
-#ifdef NOBUFFER
- /*
- * B News does not do adequate locking on its database accesses.
- * Why it doesn't get into trouble using dbm is a mystery. In any
- * case, doing unbuffered i/o does not cure the problem, but does
- * enormously reduce its incidence.
- */
- (void) setbuf(pagf, (char *)NULL);
-#else
-#ifdef _IOFBF
- (void) setvbuf(pagf, (char *)pagbuf, _IOFBF, sizeof(pagbuf));
-#endif
-#endif
- pagpos = -1;
- /* don't free pagfname, need it below */
-
- /* open the base file */
- basef = fopen(name, "r");
- if (basef == NULL) {
- Debug(("dbminit: basefile open failed\n"));
- basefname = enstring(name, "");
- if (basefname == NULL) {
- (void) fclose(pagf);
- (void) fclose(dirf);
- free(pagfname);
- pagf = NULL;
- return(-1);
- }
- } else
- basefname = NULL;
-#ifdef _IOFBF
- if (basef != NULL)
- (void) setvbuf(basef, basebuf, _IOFBF, sizeof(basebuf));
-#endif
-
- /* pick up configuration */
- if (getconf(dirf, pagf, &conf) < 0) {
- Debug(("dbminit: getconf failure\n"));
- (void) fclose(basef);
- (void) fclose(pagf);
- (void) fclose(dirf);
- free(pagfname);
- pagf = NULL;
- errno = EDOM; /* kind of a kludge, but very portable */
- return(-1);
- }
- tagbits = conf.tagmask << conf.tagshift;
- taghere = conf.tagenb << conf.tagshift;
- tagboth = tagbits | taghere;
- mybytemap(mybmap);
- bytesame = 1;
- for (i = 0; i < SOF; i++)
- if (mybmap[i] != conf.bytemap[i])
- bytesame = 0;
-
- /* get first table into core, if it looks desirable and feasible */
- s = (size_t)conf.tsize * SOF;
- if (incore && (of_t)(s/SOF) == conf.tsize) {
- bufpagf = fopen(pagfname, (pagronly) ? "rb" : "r+b");
- if (bufpagf != NULL)
- corepag = getcore(bufpagf);
- } else {
- bufpagf = NULL;
- corepag = NULL;
- }
- free(pagfname);
-
- /* misc. setup */
- crcinit();
- written = 0;
- prevp = FRESH;
- Debug(("dbminit: succeeded\n"));
- return(0);
-}
-
-/*
- - enstring - concatenate two strings into a malloced area
- */
-static char * /* NULL if malloc fails */
-enstring(s1, s2)
-char *s1;
-char *s2;
-{
- register char *p;
-
- p = malloc((size_t)strlen(s1) + (size_t)strlen(s2) + 1);
- if (p != NULL) {
- (void) strcpy(p, s1);
- (void) strcat(p, s2);
- } else {
- Debug(("enstring(%s, %s) out of memory\n", s1, s2));
- }
- return(p);
-}
-
-/*
- - dbmclose - close a database
- */
-int
-dbmclose()
-{
- register int ret = 0;
-
- if (pagf == NULL) {
- Debug(("dbmclose: not opened!\n"));
- return(-1);
- }
-
- if (fclose(pagf) == EOF) {
- Debug(("dbmclose: fclose(pagf) failed\n"));
- ret = -1;
- }
- pagf = basef; /* ensure valid pointer; dbzsync checks it */
- if (dbzsync() < 0)
- ret = -1;
- if (bufpagf != NULL && fclose(bufpagf) == EOF) {
- Debug(("dbmclose: fclose(bufpagf) failed\n"));
- ret = -1;
- }
- if (corepag != NULL)
- free((char *)corepag);
- corepag = NULL;
- if (fclose(basef) == EOF) {
- Debug(("dbmclose: fclose(basef) failed\n"));
- ret = -1;
- }
- if (basefname != NULL)
- free(basefname);
- basef = NULL;
- pagf = NULL;
- if (fclose(dirf) == EOF) {
- Debug(("dbmclose: fclose(dirf) failed\n"));
- ret = -1;
- }
-
- Debug(("dbmclose: %s\n", (ret == 0) ? "succeeded" : "failed"));
- return(ret);
-}
-
-/*
- - dbzsync - push all in-core data out to disk
- */
-int
-dbzsync()
-{
- register int ret = 0;
-
- if (pagf == NULL) {
- Debug(("dbzsync: not opened!\n"));
- return(-1);
- }
- if (!written)
- return(0);
-
- if (corepag != NULL) {
- if (putcore(corepag, bufpagf) < 0) {
- Debug(("dbzsync: putcore failed\n"));
- ret = -1;
- }
- }
- if (!conf.olddbz)
- if (putconf(dirf, &conf) < 0)
- ret = -1;
-
- Debug(("dbzsync: %s\n", (ret == 0) ? "succeeded" : "failed"));
- return(ret);
-}
-
-/*
- - dbzcancel - cancel writing of in-core data
- * Mostly for use from child processes.
- * Note that we don't need to futz around with stdio buffers, because we
- * always fflush them immediately anyway and so they never have stale data.
- */
-int
-dbzcancel()
-{
- if (pagf == NULL) {
- Debug(("dbzcancel: not opened!\n"));
- return(-1);
- }
-
- written = 0;
- return(0);
-}
-
-/*
- - dbzfetch - fetch() with case mapping built in
- */
-datum
-dbzfetch(key)
-datum key;
-{
- char buffer[DBZMAXKEY + 1];
- datum mappedkey;
- register size_t keysize;
-
- Debug(("dbzfetch: (%s)\n", key.dptr));
-
- /* Key is supposed to be less than DBZMAXKEY */
- keysize = key.dsize;
- if (keysize >= DBZMAXKEY) {
- keysize = DBZMAXKEY;
- Debug(("keysize is %d - truncated to %d\n", key.dsize, DBZMAXKEY));
- }
-
- mappedkey.dptr = mapcase(buffer, key.dptr, keysize);
- buffer[keysize] = '\0'; /* just a debug aid */
- mappedkey.dsize = keysize;
-
- return(fetch(mappedkey));
-}
-
-/*
- - fetch - get an entry from the database
- *
- * Disgusting fine point, in the name of backward compatibility: if the
- * last character of "key" is a NUL, that character is (effectively) not
- * part of the comparison against the stored keys.
- */
-datum /* dptr NULL, dsize 0 means failure */
-fetch(key)
-datum key;
-{
- char buffer[DBZMAXKEY + 1];
- static of_t key_ptr; /* return value points here */
- datum output;
- register size_t keysize;
- register size_t cmplen;
- register char *sepp;
-
- Debug(("fetch: (%s)\n", key.dptr));
- output.dptr = NULL;
- output.dsize = 0;
- prevp = FRESH;
-
- /* Key is supposed to be less than DBZMAXKEY */
- keysize = key.dsize;
- if (keysize >= DBZMAXKEY) {
- keysize = DBZMAXKEY;
- Debug(("keysize is %d - truncated to %d\n", key.dsize, DBZMAXKEY));
- }
-
- if (pagf == NULL) {
- Debug(("fetch: database not open!\n"));
- return(output);
- } else if (basef == NULL) { /* basef didn't exist yet */
- basef = latebase();
- if (basef == NULL)
- return(output);
- }
-
- cmplen = keysize;
- sepp = &conf.fieldsep;
- if (key.dptr[keysize-1] == '\0') {
- cmplen--;
- sepp = &buffer[keysize-1];
- }
- start(&srch, &key, FRESH);
- while ((key_ptr = search(&srch)) != NOTFOUND) {
- Debug(("got 0x%lx\n", key_ptr));
-
- /* fetch the key */
- if (fseek(basef, key_ptr, SEEK_SET) != 0) {
- Debug(("fetch: seek failed\n"));
- return(output);
- }
- if (fread(buffer, 1, keysize, basef) != keysize) {
- Debug(("fetch: read failed\n"));
- return(output);
- }
-
- /* try it */
- buffer[keysize] = '\0'; /* terminated for DEBUG */
- (void) mapcase(buffer, buffer, keysize);
- Debug(("fetch: buffer (%s) looking for (%s) size = %d\n",
- buffer, key.dptr, keysize));
- if (memcmp(key.dptr, buffer, cmplen) == 0 &&
- (*sepp == conf.fieldsep || *sepp == '\0')) {
- /* we found it */
- output.dptr = (char *)&key_ptr;
- output.dsize = SOF;
- Debug(("fetch: successful\n"));
- return(output);
- }
- }
-
- /* we didn't find it */
- Debug(("fetch: failed\n"));
- prevp = &srch; /* remember where we stopped */
- return(output);
-}
-
-/*
- - latebase - try to open a base file that wasn't there at the start
- */
-static FILE *
-latebase()
-{
- register FILE *it;
-
- if (basefname == NULL) {
- Debug(("latebase: name foulup\n"));
- return(NULL);
- }
- it = fopen(basefname, "r");
- if (it == NULL) {
- Debug(("latebase: still can't open base\n"));
- } else {
- Debug(("latebase: late open succeeded\n"));
- free(basefname);
- basefname = NULL;
-#ifdef _IOFBF
- (void) setvbuf(it, basebuf, _IOFBF, sizeof(basebuf));
-#endif
- }
- return(it);
-}
-
-/*
- - dbzstore - store() with case mapping built in
- */
-int
-dbzstore(key, data)
-datum key;
-datum data;
-{
- char buffer[DBZMAXKEY + 1];
- datum mappedkey;
- register size_t keysize;
-
- Debug(("dbzstore: (%s)\n", key.dptr));
-
- /* Key is supposed to be less than DBZMAXKEY */
- keysize = key.dsize;
- if (keysize >= DBZMAXKEY) {
- Debug(("dbzstore: key size too big (%d)\n", key.dsize));
- return(-1);
- }
-
- mappedkey.dptr = mapcase(buffer, key.dptr, keysize);
- buffer[keysize] = '\0'; /* just a debug aid */
- mappedkey.dsize = keysize;
-
- return(store(mappedkey, data));
-}
-
-/*
- - store - add an entry to the database
- */
-int /* 0 success, -1 failure */
-store(key, data)
-datum key;
-datum data;
-{
- of_t value;
-
- if (pagf == NULL) {
- Debug(("store: database not open!\n"));
- return(-1);
- } else if (basef == NULL) { /* basef didn't exist yet */
- basef = latebase();
- if (basef == NULL)
- return(-1);
- }
- if (pagronly) {
- Debug(("store: database open read-only\n"));
- return(-1);
- }
- if (data.dsize != SOF) {
- Debug(("store: value size wrong (%d)\n", data.dsize));
- return(-1);
- }
- if (key.dsize >= DBZMAXKEY) {
- Debug(("store: key size too big (%d)\n", key.dsize));
- return(-1);
- }
-
- /* copy the value in to ensure alignment */
- (void) memcpy((char *)&value, data.dptr, SOF);
- Debug(("store: (%s, %ld)\n", key.dptr, (long)value));
- if (!okayvalue(value)) {
- Debug(("store: reserved bit or overflow in 0x%lx\n", value));
- return(-1);
- }
-
- /* find the place, exploiting previous search if possible */
- start(&srch, &key, prevp);
- while (search(&srch) != NOTFOUND)
- continue;
-
- prevp = FRESH;
- conf.used[0]++;
- Debug(("store: used count %ld\n", conf.used[0]));
- written = 1;
- return(set(&srch, value));
-}
-
-/*
- - dbzincore - control attempts to keep .pag file in core
- */
-int /* old setting */
-dbzincore(value)
-int value;
-{
- register int old = incore;
-
- incore = value;
- return(old);
-}
-
-/*
- - getconf - get configuration from .dir file
- */
-static int /* 0 success, -1 failure */
-getconf(df, pf, cp)
-register FILE *df; /* NULL means just give me the default */
-register FILE *pf; /* NULL means don't care about .pag */
-register struct dbzconfig *cp;
-{
- register int c;
- register int i;
- int err = 0;
-
- c = (df != NULL) ? getc(df) : EOF;
- if (c == EOF) { /* empty file, no configuration known */
- cp->olddbz = 0;
- if (df != NULL && pf != NULL && getc(pf) != EOF)
- cp->olddbz = 1;
- cp->tsize = DEFSIZE;
- cp->fieldsep = '\t';
- for (i = 0; i < NUSEDS; i++)
- cp->used[i] = 0;
- cp->valuesize = SOF;
- mybytemap(cp->bytemap);
- cp->casemap = DEFCASE;
- cp->tagenb = TAGENB;
- cp->tagmask = TAGMASK;
- cp->tagshift = TAGSHIFT;
- Debug(("getconf: defaults (%ld, %c, (0x%lx/0x%lx<<%d))\n",
- cp->tsize, cp->casemap, cp->tagenb,
- cp->tagmask, cp->tagshift));
- return(0);
- }
- (void) ungetc(c, df);
-
- /* first line, the vital stuff */
- if (getc(df) != 'd' || getc(df) != 'b' || getc(df) != 'z')
- err = -1;
- if (getno(df, &err) != dbzversion)
- err = -1;
- cp->tsize = getno(df, &err);
- cp->fieldsep = getno(df, &err);
- while ((c = getc(df)) == ' ')
- continue;
- cp->casemap = c;
- cp->tagenb = getno(df, &err);
- cp->tagmask = getno(df, &err);
- cp->tagshift = getno(df, &err);
- cp->valuesize = getno(df, &err);
- if (cp->valuesize != SOF) {
- Debug(("getconf: wrong of_t size (%d)\n", cp->valuesize));
- err = -1;
- cp->valuesize = SOF; /* to protect the loops below */
- }
- for (i = 0; i < cp->valuesize; i++)
- cp->bytemap[i] = getno(df, &err);
- if (getc(df) != '\n')
- err = -1;
- Debug(("size %ld, sep %d, cmap %c, tags 0x%lx/0x%lx<<%d, ", cp->tsize,
- cp->fieldsep, cp->casemap, cp->tagenb, cp->tagmask,
- cp->tagshift));
- Debug(("bytemap (%d)", cp->valuesize));
- for (i = 0; i < cp->valuesize; i++) {
- Debug((" %d", cp->bytemap[i]));
- }
- Debug(("\n"));
-
- /* second line, the usages */
- for (i = 0; i < NUSEDS; i++)
- cp->used[i] = getno(df, &err);
- if (getc(df) != '\n')
- err = -1;
- Debug(("used %ld %ld %ld...\n", cp->used[0], cp->used[1], cp->used[2]));
-
- if (err < 0) {
- Debug(("getconf error\n"));
- return(-1);
- }
- return(0);
-}
-
-/*
- - getno - get a long
- */
-static long
-getno(f, ep)
-FILE *f;
-int *ep;
-{
- register char *p;
-# define MAXN 50
- char getbuf[MAXN];
- register int c;
-
- while ((c = getc(f)) == ' ')
- continue;
- if (c == EOF || c == '\n') {
- Debug(("getno: missing number\n"));
- *ep = -1;
- return(0);
- }
- p = getbuf;
- *p++ = c;
- while ((c = getc(f)) != EOF && c != '\n' && c != ' ')
- if (p < &getbuf[MAXN-1])
- *p++ = c;
- if (c == EOF) {
- Debug(("getno: EOF\n"));
- *ep = -1;
- } else
- (void) ungetc(c, f);
- *p = '\0';
-
- if (strspn(getbuf, "-1234567890") != strlen(getbuf)) {
- Debug(("getno: `%s' non-numeric\n", getbuf));
- *ep = -1;
- }
- return(atol(getbuf));
-}
-
-/*
- - putconf - write configuration to .dir file
- */
-static int /* 0 success, -1 failure */
-putconf(f, cp)
-register FILE *f;
-register struct dbzconfig *cp;
-{
- register int i;
- register int ret = 0;
-
- if (fseek(f, (of_t)0, SEEK_SET) != 0) {
- Debug(("fseek failure in putconf\n"));
- ret = -1;
- }
- fprintf(f, "dbz %d %ld %d %c %ld %ld %d %d", dbzversion, cp->tsize,
- cp->fieldsep, cp->casemap, cp->tagenb,
- cp->tagmask, cp->tagshift, cp->valuesize);
- for (i = 0; i < cp->valuesize; i++)
- fprintf(f, " %d", cp->bytemap[i]);
- fprintf(f, "\n");
- for (i = 0; i < NUSEDS; i++)
- fprintf(f, "%ld%c", cp->used[i], (i < NUSEDS-1) ? ' ' : '\n');
-
- (void) fflush(f);
- if (ferror(f))
- ret = -1;
-
- Debug(("putconf status %d\n", ret));
- return(ret);
-}
-
-/*
- - getcore - try to set up an in-core copy of .pag file
- */
-static of_t * /* pointer to copy, or NULL */
-getcore(f)
-FILE *f;
-{
- register of_t *p;
- register size_t i;
- register size_t nread;
- register char *it;
-
- it = malloc((size_t)conf.tsize * SOF);
- if (it == NULL) {
- Debug(("getcore: malloc failed\n"));
- return(NULL);
- }
-
- nread = fread(it, SOF, (size_t)conf.tsize, f);
- if (ferror(f)) {
- Debug(("getcore: read failed\n"));
- free(it);
- return(NULL);
- }
-
- p = (of_t *)it + nread;
- i = (size_t)conf.tsize - nread;
- while (i-- > 0)
- *p++ = VACANT;
- return((of_t *)it);
-}
-
-/*
- - putcore - try to rewrite an in-core table
- */
-static int /* 0 okay, -1 fail */
-putcore(tab, f)
-of_t *tab;
-FILE *f;
-{
- if (fseek(f, (of_t)0, SEEK_SET) != 0) {
- Debug(("fseek failure in putcore\n"));
- return(-1);
- }
- (void) fwrite((char *)tab, SOF, (size_t)conf.tsize, f);
- (void) fflush(f);
- return((ferror(f)) ? -1 : 0);
-}
-
-/*
- - start - set up to start or restart a search
- */
-static void
-start(sp, kp, osp)
-register struct searcher *sp;
-register datum *kp;
-register struct searcher *osp; /* may be FRESH, i.e. NULL */
-{
- register long h;
-
- h = hash(kp->dptr, kp->dsize);
- if (osp != FRESH && osp->hash == h) {
- if (sp != osp)
- *sp = *osp;
- Debug(("search restarted\n"));
- } else {
- sp->hash = h;
- sp->tag = MKTAG(h / conf.tsize);
- Debug(("tag 0x%lx\n", sp->tag));
- sp->place = h % conf.tsize;
- sp->tabno = 0;
- sp->run = (conf.olddbz) ? conf.tsize : MAXRUN;
- sp->aborted = 0;
- }
- sp->seen = 0;
-}
-
-/*
- - search - conduct part of a search
- */
-static of_t /* NOTFOUND if we hit VACANT or error */
-search(sp)
-register struct searcher *sp;
-{
- register of_t dest;
- register of_t value;
- of_t val; /* buffer for value (can't fread register) */
- register of_t place;
-
- if (sp->aborted)
- return(NOTFOUND);
-
- for (;;) {
- /* determine location to be examined */
- place = sp->place;
- if (sp->seen) {
- /* go to next location */
- if (--sp->run <= 0) {
- sp->tabno++;
- sp->run = MAXRUN;
- }
- place = (place+1)%conf.tsize + sp->tabno*conf.tsize;
- sp->place = place;
- } else
- sp->seen = 1; /* now looking at current location */
- Debug(("search @ %ld\n", place));
-
- /* get the tagged value */
- if (corepag != NULL && place < conf.tsize) {
- Debug(("search: in core\n"));
- value = MAPIN(corepag[place]);
- } else {
- /* seek, if necessary */
- dest = place * SOF;
- if (pagpos != dest) {
- if (fseek(pagf, dest, SEEK_SET) != 0) {
- Debug(("search: seek failed\n"));
- pagpos = -1;
- sp->aborted = 1;
- return(NOTFOUND);
- }
- pagpos = dest;
- }
-
- /* read it */
- if (fread((char *)&val, sizeof(val), 1, pagf) == 1)
- value = MAPIN(val);
- else if (ferror(pagf)) {
- Debug(("search: read failed\n"));
- pagpos = -1;
- sp->aborted = 1;
- return(NOTFOUND);
- } else
- value = VACANT;
-
- /* and finish up */
- pagpos += sizeof(val);
- }
-
- /* vacant slot is always cause to return */
- if (value == VACANT) {
- Debug(("search: empty slot\n"));
- return(NOTFOUND);
- };
-
- /* check the tag */
- value = UNBIAS(value);
- Debug(("got 0x%lx\n", value));
- if (!HASTAG(value)) {
- Debug(("tagless\n"));
- return(value);
- } else if (TAG(value) == sp->tag) {
- Debug(("match\n"));
- return(NOTAG(value));
- } else {
- Debug(("mismatch 0x%lx\n", TAG(value)));
- }
- }
- /* NOTREACHED */
-}
-
-/*
- - okayvalue - check that a value can be stored
- */
-static int /* predicate */
-okayvalue(value)
-of_t value;
-{
- if (HASTAG(value))
- return(0);
-#ifdef OVERFLOW
- if (value == LONG_MAX) /* BIAS() and UNBIAS() will overflow */
- return(0);
-#endif
- return(1);
-}
-
-/*
- - set - store a value into a location previously found by search
- */
-static int /* 0 success, -1 failure */
-set(sp, value)
-register struct searcher *sp;
-of_t value;
-{
- register of_t place = sp->place;
- register of_t v = value;
-
- if (sp->aborted)
- return(-1);
-
- if (CANTAG(v) && !conf.olddbz) {
- v |= sp->tag | taghere;
- if (v != UNBIAS(VACANT)) /* BIAS(v) won't look VACANT */
-#ifdef OVERFLOW
- if (v != LONG_MAX) /* and it won't overflow */
-#endif
- value = v;
- }
- Debug(("tagged value is 0x%lx\n", value));
- value = BIAS(value);
- value = MAPOUT(value);
-
- /* If we have the index file in memory, use it */
- if (corepag != NULL && place < conf.tsize) {
- corepag[place] = value;
- Debug(("set: incore\n"));
- return(0);
- }
-
- /* seek to spot */
- pagpos = -1; /* invalidate position memory */
- if (fseek(pagf, place * SOF, SEEK_SET) != 0) {
- Debug(("set: seek failed\n"));
- sp->aborted = 1;
- return(-1);
- }
-
- /* write in data */
- if (fwrite((char *)&value, SOF, 1, pagf) != 1) {
- Debug(("set: write failed\n"));
- sp->aborted = 1;
- return(-1);
- }
- /* fflush improves robustness, and buffer re-use is rare anyway */
- if (fflush(pagf) == EOF) {
- Debug(("set: fflush failed\n"));
- sp->aborted = 1;
- return(-1);
- }
-
- Debug(("set: succeeded\n"));
- return(0);
-}
-
-/*
- - mybytemap - determine this machine's byte map
- *
- * A byte map is an array of ints, sizeof(of_t) of them. The 0th int
- * is the byte number of the high-order byte in my of_t, and so forth.
- */
-static void
-mybytemap(map)
-int map[]; /* -> int[SOF] */
-{
- union {
- of_t o;
- char c[SOF];
- } u;
- register int *mp = &map[SOF];
- register int ntodo;
- register int i;
-
- u.o = 1;
- for (ntodo = (int)SOF; ntodo > 0; ntodo--) {
- for (i = 0; i < SOF; i++)
- if (u.c[i] != 0)
- break;
- if (i == SOF) {
- /* trouble -- set it to *something* consistent */
- Debug(("mybytemap: nonexistent byte %d!!!\n", ntodo));
- for (i = 0; i < SOF; i++)
- map[i] = i;
- return;
- }
- Debug(("mybytemap: byte %d\n", i));
- *--mp = i;
- while (u.c[i] != 0)
- u.o <<= 1;
- }
-}
-
-/*
- - bytemap - transform an of_t from byte ordering map1 to map2
- */
-static of_t /* transformed result */
-bytemap(ino, map1, map2)
-of_t ino;
-int *map1;
-int *map2;
-{
- union oc {
- of_t o;
- char c[SOF];
- };
- union oc in;
- union oc out;
- register int i;
-
- in.o = ino;
- for (i = 0; i < SOF; i++)
- out.c[map2[i]] = in.c[map1[i]];
- return(out.o);
-}
-
-/*
- * This is a simplified version of the pathalias hashing function.
- * Thanks to Steve Belovin and Peter Honeyman
- *
- * hash a string into a long int. 31 bit crc (from andrew appel).
- * the crc table is computed at run time by crcinit() -- we could
- * precompute, but it takes 1 clock tick on a 750.
- *
- * This fast table calculation works only if POLY is a prime polynomial
- * in the field of integers modulo 2. Since the coefficients of a
- * 32-bit polynomial won't fit in a 32-bit word, the high-order bit is
- * implicit. IT MUST ALSO BE THE CASE that the coefficients of orders
- * 31 down to 25 are zero. Happily, we have candidates, from
- * E. J. Watson, "Primitive Polynomials (Mod 2)", Math. Comp. 16 (1962):
- * x^32 + x^7 + x^5 + x^3 + x^2 + x^1 + x^0
- * x^31 + x^3 + x^0
- *
- * We reverse the bits to get:
- * 111101010000000000000000000000001 but drop the last 1
- * f 5 0 0 0 0 0 0
- * 010010000000000000000000000000001 ditto, for 31-bit crc
- * 4 8 0 0 0 0 0 0
- */
-
-#define POLY 0x48000000L /* 31-bit polynomial (avoids sign problems) */
-
-static long CrcTable[128];
-
-/*
- - crcinit - initialize tables for hash function
- */
-static void
-crcinit()
-{
- register int i, j;
- register long sum;
-
- for (i = 0; i < 128; ++i) {
- sum = 0L;
- for (j = 7 - 1; j >= 0; --j)
- if (i & (1 << j))
- sum ^= POLY >> j;
- CrcTable[i] = sum;
- }
- Debug(("crcinit: done\n"));
-}
-
-/*
- - hash - Honeyman's nice hashing function
- */
-static long
-hash(name, size)
-register char *name;
-register int size;
-{
- register long sum = 0L;
-
- while (size--) {
- sum = (sum >> 7) ^ CrcTable[(sum ^ (*name++)) & 0x7f];
- }
- Debug(("hash: returns (%ld)\n", sum));
- return(sum);
-}
-
-/*
- * case-mapping stuff
- *
- * Borrowed from C News, by permission of the authors. Somewhat modified.
- *
- * We exploit the fact that we are dealing only with headers here, and
- * headers are limited to the ASCII characters by RFC822. It is barely
- * possible that we might be dealing with a translation into another
- * character set, but in particular it's very unlikely for a header
- * character to be outside -128..255.
- *
- * Life would be a whole lot simpler if tolower() could safely and portably
- * be applied to any char.
- */
-
-#define OFFSET 128 /* avoid trouble with negative chars */
-
-/* must call casencmp before invoking TOLOW... */
-#define TOLOW(c) (cmap[(c)+OFFSET])
-
-/* ...but the use of it in CISTREQN is safe without the preliminary call (!) */
-/* CISTREQN is an optimised case-insensitive strncmp(a,b,n)==0; n > 0 */
-#define CISTREQN(a, b, n) \
- (TOLOW((a)[0]) == TOLOW((b)[0]) && casencmp(a, b, n) == 0)
-
-#define MAPSIZE (256+OFFSET)
-static char cmap[MAPSIZE]; /* relies on init to '\0' */
-static int mprimed = 0; /* has cmap been set up? */
-
-/*
- - mapprime - set up case-mapping stuff
- */
-static void
-mapprime()
-{
- register char *lp;
- register char *up;
- register int c;
- register int i;
- static char lower[] = "abcdefghijklmnopqrstuvwxyz";
- static char upper[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-
- for (lp = lower, up = upper; *lp != '\0'; lp++, up++) {
- c = *lp;
- cmap[c+OFFSET] = c;
- cmap[*up+OFFSET] = c;
- }
- for (i = 0; i < MAPSIZE; i++)
- if (cmap[i] == '\0')
- cmap[i] = (char)(i-OFFSET);
- mprimed = 1;
-}
-
-/*
- - casencmp - case-independent strncmp
- */
-static int /* < == > 0 */
-casencmp(s1, s2, len)
-char *s1;
-char *s2;
-int len;
-{
- register char *p1;
- register char *p2;
- register int n;
-
- if (!mprimed)
- mapprime();
-
- p1 = s1;
- p2 = s2;
- n = len;
- while (--n >= 0 && *p1 != '\0' && TOLOW(*p1) == TOLOW(*p2)) {
- p1++;
- p2++;
- }
- if (n < 0)
- return(0);
-
- /*
- * The following case analysis is necessary so that characters
- * which look negative collate low against normal characters but
- * high against the end-of-string NUL.
- */
- if (*p1 == '\0' && *p2 == '\0')
- return(0);
- else if (*p1 == '\0')
- return(-1);
- else if (*p2 == '\0')
- return(1);
- else
- return(TOLOW(*p1) - TOLOW(*p2));
-}
-
-/*
- - mapcase - do case-mapped copy
- */
-static char * /* returns src or dst */
-mapcase(dst, src, siz)
-char *dst; /* destination, used only if mapping needed */
-char *src; /* source; src == dst is legal */
-size_t siz;
-{
- register char *s;
- register char *d;
- register char *c; /* case break */
- register char *e; /* end of source */
-
-
- c = cipoint(src, siz);
- if (c == NULL)
- return(src);
-
- if (!mprimed)
- mapprime();
- s = src;
- e = s + siz;
- d = dst;
-
- while (s < c)
- *d++ = *s++;
- while (s < e)
- *d++ = TOLOW(*s++);
-
- return(dst);
-}
-
-/*
- - cipoint - where in this message-ID does it become case-insensitive?
- *
- * The RFC822 code is not quite complete. Absolute, total, full RFC822
- * compliance requires a horrible parsing job, because of the arcane
- * quoting conventions -- abc"def"ghi is not equivalent to abc"DEF"ghi,
- * for example. There are three or four things that might occur in the
- * domain part of a message-id that are case-sensitive. They don't seem
- * to ever occur in real news, thank Cthulhu. (What? You were expecting
- * a merciful and forgiving deity to be invoked in connection with RFC822?
- * Forget it; none of them would come near it.)
- */
-static char * /* pointer into s, or NULL for "nowhere" */
-cipoint(s, siz)
-char *s;
-size_t siz;
-{
- register char *p;
- static char post[] = "postmaster";
- static int plen = sizeof(post)-1;
-
- switch (conf.casemap) {
- case '0': /* unmapped, sensible */
- return(NULL);
- break;
- case 'C': /* C News, RFC 822 conformant (approx.) */
- p = memchr(s, '@', siz);
- if (p == NULL) /* no local/domain split */
- return(NULL); /* assume all local */
- else if (p - (s+1) == plen && CISTREQN(s+1, post, plen)) {
- /* crazy -- "postmaster" is case-insensitive */
- return(s);
- } else
- return(p);
- break;
- case '=': /* 2.11, neither sensible nor conformant */
- return(s); /* all case-insensitive */
- break;
- }
-
- Debug(("cipoint: unknown case mapping `%c'\n", conf.casemap));
- return(NULL); /* just leave it alone */
-}
-
-/*
- - dbzdebug - control dbz debugging at run time
- */
-int /* old value */
-dbzdebug(value)
-int value;
-{
-#ifdef DBZDEBUG
- register int old = debug;
-
- debug = value;
- return(old);
-#else
- return(-1);
-#endif
-}
diff --git a/databases/p5-DBZ_File/files/dbz.h b/databases/p5-DBZ_File/files/dbz.h
deleted file mode 100644
index 3d7e8ed702cb..000000000000
--- a/databases/p5-DBZ_File/files/dbz.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* for dbm and dbz */
-typedef struct {
- char *dptr;
- int dsize;
-} datum;
-
-/* standard dbm functions */
-extern int dbminit();
-extern datum fetch();
-extern int store();
-extern int delete(); /* not in dbz */
-extern datum firstkey(); /* not in dbz */
-extern datum nextkey(); /* not in dbz */
-extern int dbmclose(); /* in dbz, but not in old dbm */
-
-/* new stuff for dbz */
-extern int dbzfresh();
-extern int dbzagain();
-extern datum dbzfetch();
-extern int dbzstore();
-extern int dbzsync();
-extern long dbzsize();
-extern int dbzincore();
-extern int dbzcancel();
-extern int dbzdebug();
-
-/*
- * In principle we could handle unlimited-length keys by operating a chunk
- * at a time, but it's not worth it in practice. Setting a nice large
- * bound on them simplifies the code and doesn't hurt anything.
- */
-#define DBZMAXKEY 255
diff --git a/databases/p5-DBZ_File/files/patch-aa b/databases/p5-DBZ_File/files/patch-aa
deleted file mode 100644
index 8352ca243cee..000000000000
--- a/databases/p5-DBZ_File/files/patch-aa
+++ /dev/null
@@ -1,29 +0,0 @@
---- DBZ_File.xs.orig Sat May 27 23:38:48 2000
-+++ DBZ_File.xs Sat May 27 23:39:28 2000
-@@ -1,7 +1,7 @@
- #include "EXTERN.h"
- #include "perl.h"
- #include "XSUB.h"
--#include <dbz.h>
-+#include <dbz.c>
-
- typedef int DBZ_File;
-
-@@ -14,7 +14,7 @@
- int flags
- int mode
- CODE:
-- if (dbzdbminit(filename) == 0
-+ if (dbminit(filename) == 0
- || (flags && mode && errno == ENOENT
- && dbzfresh(filename, 0, '\t', '?', 0) == 0))
- RETVAL = 1;
-@@ -27,7 +27,7 @@
- dbz_DESTROY(db)
- DBZ_File db
- CODE:
-- dbzdbmclose();
-+ dbmclose();
-
- long
- dbz_FETCH(db, key)
diff --git a/databases/p5-DBZ_File/pkg-descr b/databases/p5-DBZ_File/pkg-descr
deleted file mode 100644
index 07c85e3ff080..000000000000
--- a/databases/p5-DBZ_File/pkg-descr
+++ /dev/null
@@ -1,6 +0,0 @@
-DBZ_File allows a perl program to read and write a DBZ database,
-such as the news history file. It does support the creation of a new
-database if the .pag and .lib files are missing -- just call the tie
-function with a create flag and a mode (see the documentation).
-
-WWW: http://search.cpan.org/dist/DBZ_File/
diff --git a/databases/p5-DBZ_File/pkg-plist b/databases/p5-DBZ_File/pkg-plist
deleted file mode 100644
index 5b074d003b25..000000000000
--- a/databases/p5-DBZ_File/pkg-plist
+++ /dev/null
@@ -1,5 +0,0 @@
-%%SITE_PERL%%/%%PERL_ARCH%%/auto/DBZ_File/DBZ_File.so
-%%SITE_PERL%%/%%PERL_ARCH%%/auto/DBZ_File/DBZ_File.bs
-%%SITE_PERL%%/%%PERL_ARCH%%/DBZ_File.pm
-%%SITE_PERL%%/%%PERL_ARCH%%/auto/DBZ_File/.packlist
-@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/DBZ_File