diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-04-12 16:28:41 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-04-12 16:29:22 +0300 |
commit | 49e121acc32a38b2d618cfd0544de349618c2bb1 (patch) | |
tree | 2cb54d76e3448a1f053ca84b74a7fbe43c368b11 /mu-aux | |
parent | 787121995cef1f77d279df9b70a9eb1f4fb35325 (diff) | |
download | mailutils-49e121acc32a38b2d618cfd0544de349618c2bb1.tar.gz mailutils-49e121acc32a38b2d618cfd0544de349618c2bb1.tar.bz2 |
Migrate Guile support to GINT.
* gint: New module.
* am/guile.m4: Remove.
* mu-aux/guile-doc-snarf: Remove.
* mu-aux/guile-doc-snarf.awk: Remove.
* mu-aux/Makefile.am (EXTRA_DIST): Remove guile-doc-snarf,
guile-doc-snarf.awk
* Makefile.am: Add gint.
* bootstrap.conf: Init gint submodule.
* configure.ac: Rewrite Guile support using GINT_INIT.
(AC_CONFIG_FILES): Add gint/Makefile.
* guimb/scm/Makefile.am (sitedir): Change.
* guimb/scm/Makefile.am: Likewise.
* libmu_scm/Makefile.am: Include ../gint/gint.mk
Adjust all variables.
Remove unnecessary rules.
* libmu_scm/mailutils.scm.in: Remove exports and includes.
Remove obsolete code.
* libmu_scm/mu_address.c: Use SCM_DEFINE_PUBLIC to declare public
interfaces.
* libmu_scm/mu_body.c: Likewise.
* libmu_scm/mu_mailbox.c: Likewise.
* libmu_scm/mu_message.c: Likewise.
* libmu_scm/mu_mime.c: Likewise.
* libmu_scm/mu_util.c: Likewise.
* libmu_scm/mu_logger.c: Likewise.
(mu_scm_logger_init): Make all constants public.
* libmu_scm/mu_scm.c: Likewise.
* libmu_scm/mu_guile.c: Use scm_c_catch instead of the
obsolete scm_internal_lazy_catch.
Diffstat (limited to 'mu-aux')
-rw-r--r-- | mu-aux/Makefile.am | 2 | ||||
-rwxr-xr-x | mu-aux/guile-doc-snarf | 86 | ||||
-rw-r--r-- | mu-aux/guile-doc-snarf.awk | 102 |
3 files changed, 0 insertions, 190 deletions
diff --git a/mu-aux/Makefile.am b/mu-aux/Makefile.am index e0ee2332e..28a299b6f 100644 --- a/mu-aux/Makefile.am +++ b/mu-aux/Makefile.am @@ -20,8 +20,6 @@ EXTRA_DIST = \ debugdef.m4\ - guile-doc-snarf\ - guile-doc-snarf.awk\ gylwrap\ mailutils.spec\ mailutils.spec.in\ diff --git a/mu-aux/guile-doc-snarf b/mu-aux/guile-doc-snarf deleted file mode 100755 index c25dd281a..000000000 --- a/mu-aux/guile-doc-snarf +++ /dev/null @@ -1,86 +0,0 @@ -#! /bin/sh -# Copyright (C) 2002, 2006, 2007 Sergey Poznyakoff -# -# This is a snarfer for guile version 1.6 -# -# 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -OUTFILE=/dev/tty -DOCFILE=0 -BASEDIR=`dirname $0` -test -n "${CPP+set}" || CPP="gcc -E" -test -n "${AWK+set}" || AWK=awk -temp=/tmp/snarf.$$ -trap "rm -f $temp" 0 1 2 15 - -# process aruments -while [ $# -gt 0 ]; -do - case $1 in - -o) OUTFILE=$2; shift 2;; - -d) DOCFILE=1; shift;; - *) break;; - esac -done - -INFILE=$1; shift - -cpp_exit=1 - -snarf_x() { - echo "/* source: $INFILE */" ; - echo "/* cpp arguments: $@ */" ; - $CPP -DSCM_MAGIC_SNARF_INITS -DSCM_MAGIC_SNARFER "$@" > ${temp} - cpp_exit=$? - grep "^ *\^ *\^" ${temp} | sed -e "s/^ *\^ *\^//" -e "s/\^\ *:\ *\^.*/;/" -} - -snarf_doc() { - $CPP -DSCM_MAGIC_SNARF_DOCS "$@" > ${temp} - cpp_exit=$? - sed -n ' - /^ *^^ {.*/{ - # First, remove the delimiting braces - s/^ *^^ {// - s/\^^ }/^^/ - # Initialize the hold space - h - :beg - # Delete everything after the first ^^ - s/\^^.*// - # Exchange spaces - x - # Delete up to the first ^^ - s/[^^]*\^^// - # Append to the hold space and exchange - H - x - # Branch if the last substitution was successful - tbeg - # Otherwise, print the pattern space - p - }' $temp | \ - $AWK -f $BASEDIR/guile-doc-snarf.awk -} - -case "$DOCFILE" in - 0) snarf_x $INFILE "$@" > $OUTFILE;; - 1) snarf_doc $INFILE "$@" > $OUTFILE;; -esac - -if [ $cpp_exit -ne 0 ]; then - [ "$OUTFILE" != "/dev/tty" ] && rm $OUTFILE -fi -exit $cpp_exit diff --git a/mu-aux/guile-doc-snarf.awk b/mu-aux/guile-doc-snarf.awk deleted file mode 100644 index 4604faf8e..000000000 --- a/mu-aux/guile-doc-snarf.awk +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright (C) 2002, 2006, 2007 Sergey Poznyakoff -# -# This is a snarfer for guile version 1.6 -# -# 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301 USA. - -BEGIN { - cname = "" -} - -function flush() { - if (cname == "") - return; - if (arg_req + arg_opt + arg_var != numargs) - error(cname " incorrectly defined as taking " numargs " arguments") - - print "\f" fname - print "@c snarfed from " loc_source ":" loc_line - printf "@deffn {Scheme procedure} %s", fname - # All scheme primitives follow the same naming style: - # SCM argument names are in upper case. - # So, we convert them to lower case for @deffn line and - # replace their occurrences in the docstring by appropriate - # @var{} commands. - for (i = 1; i <= numargs; i++) { - printf(" %s", tolower(arglist[i])) - gsub(arglist[i], "@var{" tolower(arglist[i]) "}", docstring) - } - print "" - print docstring - print "@end deffn\n" - - delete argpos - delete arglist - cname = "" -} - -function error(s) { - print loc_source ":" loc_line ": " s > "/dev/stderr" - exit 1 -} - -#{print NR ": " state} - -state == 0 && NF != 0 { state = 1 } - -state == 1 && $1 == "cname" { cname = $2; next } -state == 1 && $1 == "fname" { fname = substr($2,2,length($2)-2); next } -state == 1 && $1 == "type" { type = $2; next } -state == 1 && $1 == "location" { loc_source = $2; loc_line = $3; next } -state == 1 && $1 == "arglist" { - match($0, "\\(.*\\)") - s = substr($0,RSTART+1,RLENGTH-2) - numargs = split(s, a, ",") - for (i = 1; i <= numargs; i++) { - m = split(a[i], b, "[ \t]*") - if (b[1] == "") { - t = b[2] - n = b[3] - m-- - } else { - t = b[1] - n = b[2] - } - if (m > 2 || t != "SCM") - error(cname ": wrong argument type for arg " i " " t) - arglist[i] = n - } - next -} - -state == 1 && $1 == "argsig" { arg_req = $2; arg_opt = $3; arg_var = $4; next } -state == 1 && $1 == "argpos" { argpos[$2] = $3; next } - -state == 1 && / *\"/ { - # Concatenate strings. A very simplified version, but - # works for us - gsub("\\\\n\" *\"", "\n") - gsub("\"\"", "") - gsub("\\\\n", "\n") - match($0,"\".*\"") - docstring = substr($0,RSTART+1,RLENGTH-2) -} - -state == 1 && NF==0 { flush(); state = 0; } - -END { - flush() -} |