diff options
Diffstat (limited to 'comm/third_party/libgpg-error/lang/cl')
-rw-r--r-- | comm/third_party/libgpg-error/lang/cl/Makefile.am | 40 | ||||
-rw-r--r-- | comm/third_party/libgpg-error/lang/cl/Makefile.in | 610 | ||||
-rw-r--r-- | comm/third_party/libgpg-error/lang/cl/README | 22 | ||||
-rw-r--r-- | comm/third_party/libgpg-error/lang/cl/gpg-error-package.lisp | 64 | ||||
-rw-r--r-- | comm/third_party/libgpg-error/lang/cl/gpg-error.asd | 36 | ||||
-rw-r--r-- | comm/third_party/libgpg-error/lang/cl/gpg-error.asd.in | 36 | ||||
-rw-r--r-- | comm/third_party/libgpg-error/lang/cl/gpg-error.lisp | 233 | ||||
-rw-r--r-- | comm/third_party/libgpg-error/lang/cl/mkerrcodes.awk | 154 |
8 files changed, 1195 insertions, 0 deletions
diff --git a/comm/third_party/libgpg-error/lang/cl/Makefile.am b/comm/third_party/libgpg-error/lang/cl/Makefile.am new file mode 100644 index 0000000000..0535feec08 --- /dev/null +++ b/comm/third_party/libgpg-error/lang/cl/Makefile.am @@ -0,0 +1,40 @@ +# Makefile.am for libgpg-error. +# Copyright (C) 2003, 2006 g10 Code GmbH +# +# This file is part of libgpg-error. +# +# libgpg-error is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# libgpg-error 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +distributed_clfiles = gpg-error.asd \ + gpg-error-package.lisp gpg-error.lisp + +generated_clfiles = gpg-error-codes.lisp + +clfiles = $(distributed_clfiles) $(generated_clfiles) + +# FIXME: Should be configurable. +clfilesdir = $(datadir)/common-lisp/source/gpg-error +dist_clfiles_DATA = $(distributed_clfiles) +nodist_clfiles_DATA = $(generated_clfiles) + +EXTRA_DIST = README mkerrcodes.awk +CLEANFILES = gpg-error-codes.lisp + +codes_file = $(top_srcdir)/src/err-codes.h.in +errno_file = $(top_srcdir)/src/errnos.in + +gpg-error-codes.lisp: Makefile mkerrcodes.awk $(codes_file) $(errno_file) + echo '@errnos@' | cat $(codes_file) - $(errno_file) \ + | $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ diff --git a/comm/third_party/libgpg-error/lang/cl/Makefile.in b/comm/third_party/libgpg-error/lang/cl/Makefile.in new file mode 100644 index 0000000000..f183b4b4df --- /dev/null +++ b/comm/third_party/libgpg-error/lang/cl/Makefile.in @@ -0,0 +1,610 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile.am for libgpg-error. +# Copyright (C) 2003, 2006 g10 Code GmbH +# +# This file is part of libgpg-error. +# +# libgpg-error is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# libgpg-error 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = lang/cl +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \ + $(top_srcdir)/m4/ax_cc_for_build.m4 \ + $(top_srcdir)/m4/estream.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/gnupg-misc.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/threadlib.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(dist_clfiles_DATA) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = gpg-error.asd +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(clfilesdir)" "$(DESTDIR)$(clfilesdir)" +DATA = $(dist_clfiles_DATA) $(nodist_clfiles_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gpg-error.asd.in \ + README +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_REVISION = @BUILD_REVISION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ +BUILD_VERSION = @BUILD_VERSION@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GPG_ERROR_CONFIG_CFLAGS = @GPG_ERROR_CONFIG_CFLAGS@ +GPG_ERROR_CONFIG_HOST = @GPG_ERROR_CONFIG_HOST@ +GPG_ERROR_CONFIG_LIBS = @GPG_ERROR_CONFIG_LIBS@ +GPG_ERROR_CONFIG_LIBS_PRIVATE = @GPG_ERROR_CONFIG_LIBS_PRIVATE@ +GPG_ERROR_CONFIG_MT_CFLAGS = @GPG_ERROR_CONFIG_MT_CFLAGS@ +GPG_ERROR_CONFIG_MT_LIBS = @GPG_ERROR_CONFIG_MT_LIBS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALLSHELLPATH = @INSTALLSHELLPATH@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDADD_FOR_TESTS_KLUDGE = @LDADD_FOR_TESTS_KLUDGE@ +LDFLAGS = @LDFLAGS@ +LIBGPG_ERROR_LT_AGE = @LIBGPG_ERROR_LT_AGE@ +LIBGPG_ERROR_LT_CURRENT = @LIBGPG_ERROR_LT_CURRENT@ +LIBGPG_ERROR_LT_REVISION = @LIBGPG_ERROR_LT_REVISION@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMULTITHREAD = @LIBMULTITHREAD@ +LIBOBJS = @LIBOBJS@ +LIBREADLINE = @LIBREADLINE@ +LIBS = @LIBS@ +LIBTHREAD = @LIBTHREAD@ +LIBTOOL = @LIBTOOL@ +LIB_NETWORK = @LIB_NETWORK@ +LIB_SCHED_YIELD = @LIB_SCHED_YIELD@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ +LTLIBOBJS = @LTLIBOBJS@ +LTLIBTHREAD = @LTLIBTHREAD@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +RC = @RC@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VERSION_NUMBER = @VERSION_NUMBER@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +distributed_clfiles = gpg-error.asd \ + gpg-error-package.lisp gpg-error.lisp + +generated_clfiles = gpg-error-codes.lisp +clfiles = $(distributed_clfiles) $(generated_clfiles) + +# FIXME: Should be configurable. +clfilesdir = $(datadir)/common-lisp/source/gpg-error +dist_clfiles_DATA = $(distributed_clfiles) +nodist_clfiles_DATA = $(generated_clfiles) +EXTRA_DIST = README mkerrcodes.awk +CLEANFILES = gpg-error-codes.lisp +codes_file = $(top_srcdir)/src/err-codes.h.in +errno_file = $(top_srcdir)/src/errnos.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lang/cl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu lang/cl/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +gpg-error.asd: $(top_builddir)/config.status $(srcdir)/gpg-error.asd.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-dist_clfilesDATA: $(dist_clfiles_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_clfiles_DATA)'; test -n "$(clfilesdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(clfilesdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(clfilesdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(clfilesdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(clfilesdir)" || exit $$?; \ + done + +uninstall-dist_clfilesDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_clfiles_DATA)'; test -n "$(clfilesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(clfilesdir)'; $(am__uninstall_files_from_dir) +install-nodist_clfilesDATA: $(nodist_clfiles_DATA) + @$(NORMAL_INSTALL) + @list='$(nodist_clfiles_DATA)'; test -n "$(clfilesdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(clfilesdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(clfilesdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(clfilesdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(clfilesdir)" || exit $$?; \ + done + +uninstall-nodist_clfilesDATA: + @$(NORMAL_UNINSTALL) + @list='$(nodist_clfiles_DATA)'; test -n "$(clfilesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(clfilesdir)'; $(am__uninstall_files_from_dir) +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(clfilesdir)" "$(DESTDIR)$(clfilesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_clfilesDATA install-nodist_clfilesDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_clfilesDATA uninstall-nodist_clfilesDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_clfilesDATA install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-nodist_clfilesDATA install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-dist_clfilesDATA \ + uninstall-nodist_clfilesDATA + +.PRECIOUS: Makefile + + +gpg-error-codes.lisp: Makefile mkerrcodes.awk $(codes_file) $(errno_file) + echo '@errnos@' | cat $(codes_file) - $(errno_file) \ + | $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/comm/third_party/libgpg-error/lang/cl/README b/comm/third_party/libgpg-error/lang/cl/README new file mode 100644 index 0000000000..660508bd51 --- /dev/null +++ b/comm/third_party/libgpg-error/lang/cl/README @@ -0,0 +1,22 @@ +Common Lisp Support for libgpg-error +------------------------------------ + +Requirements: + +ASDF Packaging Support +CFFI Foreign Function Interface + +Use with: + +> (asdf:operate 'asdf:load-op ':gpg-error) +> (use-package :gpg-error) + + +TODO +---- + +* We probably should define a condition base class. Currently, we do + this in the user code only (eg in GPGME). + +* Some lispy convenience functions as need arises, for example for + output. diff --git a/comm/third_party/libgpg-error/lang/cl/gpg-error-package.lisp b/comm/third_party/libgpg-error/lang/cl/gpg-error-package.lisp new file mode 100644 index 0000000000..73adca0d7e --- /dev/null +++ b/comm/third_party/libgpg-error/lang/cl/gpg-error-package.lisp @@ -0,0 +1,64 @@ +;;;; libgpg-error-package.lisp + +;;; Copyright (C) 2006 g10 Code GmbH +;;; +;;; This file is part of libgpg-error. +;;; +;;; libgpg-error is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 2.1 of +;;; the License, or (at your option) any later version. +;;; +;;; libgpg-error 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 +;;; Lesser General Public License for more details. +;;; +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with libgpg-error; if not, write to the Free +;;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;;; 02111-1307, USA. + +;;; Conventions +;;; +;;; Error sources and codes are represented as keywords like +;;; :gpg-err-source-gpg and :gpg-err-unknown-packet. +;;; +;;; Errors are represented as lists '(SOURCE CODE). Other +;;; representations are also accepted in some places. +;;; +;;; The following functions are defined which are not defined in the C API: +;;; gpg-err-source-as-key, gpg-err-source-as-value +;;; gpg-err-code-as-key, gpg-err-code-as-value +;;; gpg-err-canonicalize, gpg-err-as-value +;;; Conversion between keywords and values for error sources and codes. +;;; +;;; The following functions from the C API are omitted: +;;; gpg-strerror-r +;;; +;;; The following features work slightly differently: +;;; *gpg-err-source-default* is a dynamic variable that can be set to +;;; change the default for gpg-error. + +(defpackage #:gpg-error + (:use #:common-lisp #:cffi) + + (:export :gpg-err-code-as-key + :gpg-err-code-as-value + :gpg-err-source-as-key + :gpg-err-source-as-value + :gpg-err-canonicalize + :gpg-err-as-value + :gpg-err-make + :*gpg-err-source-default* + :gpg-error + :gpg-err-code + :gpg-err-source + :gpg-strerror + :gpg-strsource + :gpg-err-code-from-errno + :gpg-err-code-to-errno + :gpg-err-code-from-syserror + :gpg-err-make-from-errno + :gpg-error-from-errno + :gpg-error-from-syserror)) diff --git a/comm/third_party/libgpg-error/lang/cl/gpg-error.asd b/comm/third_party/libgpg-error/lang/cl/gpg-error.asd new file mode 100644 index 0000000000..8fa8d9e81b --- /dev/null +++ b/comm/third_party/libgpg-error/lang/cl/gpg-error.asd @@ -0,0 +1,36 @@ +;;; -*- Mode: lisp -*- + +;;; Copyright (C) 2006 g10 Code GmbH +;;; +;;; This file is part of libgpg-error. +;;; +;;; libgpg-error is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 2.1 of +;;; the License, or (at your option) any later version. +;;; +;;; libgpg-error 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 +;;; Lesser General Public License for more details. +;;; +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with libgpg-error; if not, write to the Free +;;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;;; 02111-1307, USA. + +(defpackage #:gpg-error-system + (:use #:common-lisp #:asdf)) + +(in-package #:gpg-error-system) + +(defsystem gpg-error + :description "Common error values for all GnuPG components." + :author "g10 Code GmbH" + :version "1.42" + :licence "LGPL" + :depends-on ("cffi") + :components ((:file "gpg-error-package") + (:file "gpg-error-codes" + :depends-on ("gpg-error-package")) + (:file "gpg-error" :depends-on ("gpg-error-codes")))) diff --git a/comm/third_party/libgpg-error/lang/cl/gpg-error.asd.in b/comm/third_party/libgpg-error/lang/cl/gpg-error.asd.in new file mode 100644 index 0000000000..3cb7e96b76 --- /dev/null +++ b/comm/third_party/libgpg-error/lang/cl/gpg-error.asd.in @@ -0,0 +1,36 @@ +;;; -*- Mode: lisp -*- + +;;; Copyright (C) 2006 g10 Code GmbH +;;; +;;; This file is part of libgpg-error. +;;; +;;; libgpg-error is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 2.1 of +;;; the License, or (at your option) any later version. +;;; +;;; libgpg-error 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 +;;; Lesser General Public License for more details. +;;; +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with libgpg-error; if not, write to the Free +;;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;;; 02111-1307, USA. + +(defpackage #:gpg-error-system + (:use #:common-lisp #:asdf)) + +(in-package #:gpg-error-system) + +(defsystem gpg-error + :description "Common error values for all GnuPG components." + :author "g10 Code GmbH" + :version "@VERSION@" + :licence "LGPL" + :depends-on ("cffi") + :components ((:file "gpg-error-package") + (:file "gpg-error-codes" + :depends-on ("gpg-error-package")) + (:file "gpg-error" :depends-on ("gpg-error-codes")))) diff --git a/comm/third_party/libgpg-error/lang/cl/gpg-error.lisp b/comm/third_party/libgpg-error/lang/cl/gpg-error.lisp new file mode 100644 index 0000000000..cad2532dec --- /dev/null +++ b/comm/third_party/libgpg-error/lang/cl/gpg-error.lisp @@ -0,0 +1,233 @@ +;;;; libgpg-error.lisp + +;;; Copyright (C) 2006 g10 Code GmbH +;;; +;;; This file is part of libgpg-error. +;;; +;;; libgpg-error is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU Lesser General Public License +;;; as published by the Free Software Foundation; either version 2.1 of +;;; the License, or (at your option) any later version. +;;; +;;; libgpg-error 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 +;;; Lesser General Public License for more details. +;;; +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with libgpg-error; if not, write to the Free +;;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;;; 02111-1307, USA. + +;;; Set up the library. + +(in-package :gpg-error) + +(define-foreign-library libgpg-error + (:unix "libgpg-error.so") + (t (:default "libgpg-error"))) + +(use-foreign-library libgpg-error) + +;;; System dependencies. + +(defctype size-t :unsigned-int "The system size_t type.") + +;;; Error sources. + +(defcenum gpg-err-source-t + "The GPG error source type." + (:gpg-err-source-unknown 0) + (:gpg-err-source-gcrypt 1) + (:gpg-err-source-gpg 2) + (:gpg-err-source-gpgsm 3) + (:gpg-err-source-gpgagent 4) + (:gpg-err-source-pinentry 5) + (:gpg-err-source-scd 6) + (:gpg-err-source-gpgme 7) + (:gpg-err-source-keybox 8) + (:gpg-err-source-ksba 9) + (:gpg-err-source-dirmngr 10) + (:gpg-err-source-gsti 11) + (:gpg-err-source-any 31) + (:gpg-err-source-user-1 32) + (:gpg-err-source-user-2 33) + (:gpg-err-source-user-3 34) + (:gpg-err-source-user-4 35)) + +(defconstant +gpg-err-source-dim+ 256) + +;;; The error code type gpg-err-code-t. + +;;; libgpg-error-codes.lisp is loaded by ASDF. + +(defctype gpg-error-t :unsigned-int "The GPG error code type.") + +;;; Bit mask manipulation constants. + +(defconstant +gpg-err-code-mask+ (- +gpg-err-code-dim+ 1)) + +(defconstant +gpg-err-source-mask+ (- +gpg-err-source-dim+ 1)) +(defconstant +gpg-err-source-shift+ 24) + +;;; Constructor and accessor functions. + +;;; If we had in-library versions of our static inlines, we wouldn't +;;; need to replicate them here. Oh well. + +(defun c-gpg-err-make (source code) + "Construct an error value from an error code and source. + Within a subsystem, use gpg-error instead." + (logior + (ash (logand source +gpg-err-source-mask+) + +gpg-err-source-shift+) + (logand code +gpg-err-code-mask+))) + +(defun c-gpg-err-code (err) + "retrieve the error code from an error value." + (logand err +gpg-err-code-mask+)) + +(defun c-gpg-err-source (err) + "retrieve the error source from an error value." + (logand (ash err (- +gpg-err-source-shift+)) + +gpg-err-source-mask+)) + +;;; String functions. + +(defcfun ("gpg_strerror" c-gpg-strerror) :string + (err gpg-error-t)) + +(defcfun ("gpg_strsource" c-gpg-strsource) :string + (err gpg-error-t)) + +;;; Mapping of system errors (errno). + +(defcfun ("gpg_err_code_from_errno" c-gpg-err-code-from-errno) gpg-err-code-t + (err :int)) + +(defcfun ("gpg_err_code_to_errno" c-gpg-err-code-to-errno) :int + (code gpg-err-code-t)) + +(defcfun ("gpg_err_code_from_syserror" + c-gpg-err-code-from-syserror) gpg-err-code-t) + +;;; Self-documenting convenience functions. + +;;; See below. + +;;; +;;; +;;; Lispy interface. +;;; +;;; + +;;; Low-level support functions. + +(defun gpg-err-code-as-value (code-key) + (foreign-enum-value 'gpg-err-code-t code-key)) + +(defun gpg-err-code-as-key (code) + (foreign-enum-keyword 'gpg-err-code-t code)) + +(defun gpg-err-source-as-value (source-key) + (foreign-enum-value 'gpg-err-source-t source-key)) + +(defun gpg-err-source-as-key (source) + (foreign-enum-keyword 'gpg-err-source-t source)) + +(defun gpg-err-canonicalize (err) + "Canonicalize the error value err." + (gpg-err-make (gpg-err-source err) (gpg-err-code err))) + +(defun gpg-err-as-value (err) + "Get the integer representation of the error value ERR." + (let ((error (gpg-err-canonicalize err))) + (c-gpg-err-make (gpg-err-source-as-value (gpg-err-source error)) + (gpg-err-code-as-value (gpg-err-code error))))) + +;;; Constructor and accessor functions. + +(defun gpg-err-make (source code) + "Construct an error value from an error code and source. + Within a subsystem, use gpg-error instead." + ;; As an exception to the rule, the function gpg-err-make will use + ;; the error source value as is when provided as integer, instead of + ;; parsing it as an error value. + (list (if (integerp source) + (gpg-err-source-as-key source) + (gpg-err-source source)) + (gpg-err-code code))) + +(defvar *gpg-err-source-default* :gpg-err-source-unknown + "define this to specify a default source for gpg-error.") + +(defun gpg-error (code) + "Construct an error value from an error code, using the default source." + (gpg-err-make *gpg-err-source-default* code)) + +(defun gpg-err-code (err) + "Retrieve an error code from the error value ERR." + (cond ((listp err) (second err)) + ((keywordp err) err) ; FIXME + (t (gpg-err-code-as-key (c-gpg-err-code err))))) + +(defun gpg-err-source (err) + "Retrieve an error source from the error value ERR." + (cond ((listp err) (first err)) + ((keywordp err) err) ; FIXME + (t (gpg-err-source-as-key (c-gpg-err-source err))))) + +;;; String functions. + +(defun gpg-strerror (err) + "Return a string containig a description of the error code." + (c-gpg-strerror (gpg-err-as-value err))) + +;;; FIXME: maybe we should use this as the actual implementation for +;;; gpg-strerror. + +;; (defcfun ("gpg_strerror_r" c-gpg-strerror-r) :int +;; (err gpg-error-t) +;; (buf :string) +;; (buflen size-t)) + +;; (defun gpg-strerror-r (err) +;; "Return a string containig a description of the error code." +;; (with-foreign-pointer-as-string (errmsg 256 errmsg-size) +;; (c-gpg-strerror-r (gpg-err-code-as-value (gpg-err-code err)) +;; errmsg errmsg-size))) + +(defun gpg-strsource (err) + "Return a string containig a description of the error source." + (c-gpg-strsource (gpg-err-as-value err))) + +;;; Mapping of system errors (errno). + +(defun gpg-err-code-from-errno (err) + "Retrieve the error code for the system error. If the system error + is not mapped, :gpg-err-unknown-errno is returned." + (gpg-err-code-as-key (c-gpg-err-code-from-errno err))) + +(defun gpg-err-code-to-errno (code) + "Retrieve the system error for the error code. If this is not a + system error, 0 is returned." + (c-gpg-err-code-to-errno (gpg-err-code code))) + +(defun gpg-err-code-from-syserror () + "Retrieve the error code directly from the system ERRNO. If the system error + is not mapped, :gpg-err-unknown-errno is returned and + :gpg-err-missing-errno if ERRNO has the value 0." + (gpg-err-code-as-key (c-gpg-err-code-from-syserror))) + + +;;; Self-documenting convenience functions. + +(defun gpg-err-make-from-errno (source err) + (gpg-err-make source (gpg-err-code-from-errno err))) + +(defun gpg-error-from-errno (err) + (gpg-error (gpg-err-code-from-errno err))) + +(defun gpg-error-from-syserror () + (gpg-error (gpg-err-code-from-syserror))) + diff --git a/comm/third_party/libgpg-error/lang/cl/mkerrcodes.awk b/comm/third_party/libgpg-error/lang/cl/mkerrcodes.awk new file mode 100644 index 0000000000..9a1fc18c55 --- /dev/null +++ b/comm/third_party/libgpg-error/lang/cl/mkerrcodes.awk @@ -0,0 +1,154 @@ +# mkerrcodes.awk +# Copyright (C) 2004, 2005, 2006 g10 Code GmbH +# +# 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 program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +# +# As a special exception, g10 Code GmbH gives unlimited permission to +# copy, distribute and modify the lisp source files that are the output +# of mkerrcodes.awk. You need not follow the terms of the GNU General +# Public License when using or distributing such scripts, even though +# portions of the text of mkerrcodes.awk appear in them. The GNU +# General Public License (GPL) does govern all other use of the material +# that constitutes the mkerrcodes.awk program. +# +# Certain portions of the mkerrcodes.awk source text are designed to be +# copied (in certain cases, depending on the input) into the output of +# mkerrcodes.awk. We call these the "data" portions. The rest of the +# mkerrcodes.awk source text consists of comments plus executable code +# that decides which of the data portions to output in any given case. +# We call these comments and executable code the "non-data" portions. +# mkerrcodes.awk never copies any of the non-data portions into its output. +# +# This special exception to the GPL applies to versions of mkerrcodes.awk +# released by g10 Code GmbH. When you make and distribute a modified version +# of mkerrcodes.awk, you may extend this special exception to the GPL to +# apply to your modified version as well, *unless* your modified version +# has the potential to copy into its output some of the text that was the +# non-data portion of the version that you started with. (In other words, +# unless your change moves or copies text from the non-data portions to the +# data portions.) If your modification has such potential, you must delete +# any notice of this special exception to the GPL from your modified version. + +# The input file is in the following format: +# [CODE SYMBOL...] +# @errnos@ +# [CODE SYMBOL...] +# +# The difference between the sections is how symbol is transformed. +# The second section gets GPG_ERR_ prepended before processing. +# +# Comments (starting with # and ending at the end of the line) are removed, +# as is trailing whitespace. + +BEGIN { + FS="[ \t]+"; + print ";;;; Output of mkerrcodes.awk. DO NOT EDIT."; + print ""; + print ";;; Copyright (C) 2006 g10 Code GmbH"; + print ";;;"; + print ";;; This file is part of libgpg-error."; + print ";;;"; + print ";;; libgpg-error is free software; you can redistribute it and/or"; + print ";;; modify it under the terms of the GNU Lesser General Public License"; + print ";;; as published by the Free Software Foundation; either version 2.1 of"; + print ";;; the License, or (at your option) any later version."; + print ";;;"; + print ";;; libgpg-error is distributed in the hope that it will be useful, but"; + print ";;; WITHOUT ANY WARRANTY; without even the implied warranty of"; + print ";;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU"; + print ";;; Lesser General Public License for more details."; + print ";;;"; + print ";;; You should have received a copy of the GNU Lesser General Public"; + print ";;; License along with libgpg-error; if not, write to the Free"; + print ";;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA"; + print ";;; 02111-1307, USA."; + print ""; + + header = 1; + errnos = 0; +} + +/^#/ { next; } + +header { + if (errnos) + { + if ($1 ~ /^[0123456789]+$/) + { + header = 0; + + print ""; + print " ;; The following error codes map system errors."; + } + } + else + { + if ($1 ~ /^[0123456789]+$/) + { + header = 0; + + print "(in-package :gpg-error)"; + print ""; + print ";;; The error code type gpg-err-code-t."; + print ""; + print ";;; This is used for system error codes."; + print "(defconstant +gpg-err-system-error+ (ash 1 15))"; + print ""; + print ";;; This is one more than the largest allowed entry."; + print "(defconstant +gpg-err-code-dim+ 65536)"; + print ""; + print ";;; A helper macro to have the keyword values evaluated."; + print "(defmacro defcenum-eval (type doc &rest vals)"; + print " `(defcenum ,type ,doc"; + print " ,@(loop for v in vals"; + print " collect `(,(first v) ,(eval (second v))))))"; + print ""; + print "(defcenum-eval gpg-err-code-t"; + print " \"The GPG error code type.\""; + } + } +} + +!header { + sub (/#.+/, ""); + sub (/[ ]+$/, ""); # Strip trailing space and tab characters. + + if (/^$/) + next; + + # The following can happen for GPG_ERR_CODE_DIM. + if ($1 == "") + next; + + if (/^@errnos@$/) + { + header = 1; + errnos = 1; + next; + } + + $2 = tolower($2); + gsub ("_", "-", $2); + + if (errnos) + print " (:gpg-err-" $2 " (logior +gpg-err-system-error+ " $1 "))"; + else + print " (:" $2 " " $1 ")"; +} + +END { + # I am very sorry to break lisp coding style here. + print ")"; +} |