--- remem-2.12.orig/config.guess +++ remem-2.12/config.guess @@ -0,0 +1,1500 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2006-07-02' + +# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + x86:Interix*:[3456]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[3456]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: --- remem-2.12.orig/config.sub +++ remem-2.12/config.sub @@ -0,0 +1,1616 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2006-09-20' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: --- remem-2.12.orig/other/remem.el +++ remem-2.12/other/remem.el @@ -96,7 +96,7 @@ ;;;;;;;;;;;;;;;; ;; This is the directory where savant is located (fully expanded) -(defvar remem-prog-dir (expand-file-name "/usr/local/bin") +(defvar remem-prog-dir (expand-file-name "/usr/bin") "This is the directory where savant is located (fully expanded)") ;;;;;;;;;;;;;;;; @@ -1655,7 +1655,7 @@ (let ((rsl-len (length remem-scopes-list)) (val)) (cond ((> rsl-len 1) - (setq val (string-to-number (read-string (concat "Enter scope number (1-" rsl-len "): "))))) + (setq val (string-to-number (read-string (concat "Enter scope number (1-" (int-to-string rsl-len) "): "))))) (t (setq val 1))) val))) (setcar (car (nthcdr (- scopenum 1) remem-scopes-list)) scopename) @@ -1848,10 +1848,9 @@ (end-of-line) (setq remem-last-followed-doctype (buffer-substring (point-min) (point))) - (print (concat "doc-pos-start: " doc-pos-start) (get-buffer "*remem-log*")) - (print (concat "doc-pos-end: " doc-pos-end) (get-buffer "*remem-log*")) - (print (concat "doc-loc: " doc-loc) (get-buffer "*remem-log*")) - + (print (concat "doc-pos-start: " (int-to-string doc-pos-start)) (get-buffer "*remem-log*")) + (print (concat "doc-pos-end: " (int-to-string doc-pos-end)) (get-buffer "*remem-log*")) + (print (concat "doc-loc: " doc-loc) (get-buffer "*remem-log*")) (bury-buffer remem-document-buffer-name) (find-file doc-loc) (if (string= major-mode "rmail-mode") --- remem-2.12.orig/other/elc.32011/remem.el +++ remem-2.12/other/elc.32011/remem.el @@ -0,0 +1,2339 @@ +;remem.el -- implements emacs front-end for the remembrance agent +; +;All code included in versions up to and including 2.09: +; Copyright (C) 2001 Massachusetts Institute of Technology. +; +;All modifications subsequent to version 2.09 are copyright Bradley +;Rhodes or their respective authors. +; +;Developed by Bradley Rhodes at the Media Laboratory, MIT, Cambridge, +;Massachusetts, with support from British Telecom and Merrill Lynch. +; +;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. For commercial licensing under other +;terms, please consult the MIT Technology Licensing Office. +; +;This program may be subject to the following US and/or foreign +;patents (pending): "Method and Apparatus for Automated, +;Context-Dependent Retrieval of Information," MIT Case No. 7870TS. If +;any of these patents are granted, royalty-free license to use this +;and derivative programs under the GNU General Public License are +;hereby granted. +; +;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. + +;; Version info: +;; Num Date Who Comments +;; ------ -------- ----------------------- ----------------- +;; 2.10 3/15/01 rhodes@alum.mit.edu Fixed clobbering of C-xo bug that I introduced in +;; 2.09, plus fixed remem-query-extra-string-previous +;; bug (should be remem-query-extra-text-string-previous) +;; Thanks to Keith Amidon for these fixes. +;; 2.09 1/15/01 rhodes@alum.mit.edu Added stuff that lets other programs customize remem +;; (e.g. jimminy). This includes remem-start-hook, remem-stop-hook, +;; remem-query-oneshot-preamble-string, remem-query-preamble-string +;; Added check for whether scrollbar-width is defined in XEmacs. +;; Changed to GPL licence. +;; 2.08 2/29/00 rhodes@media.mit.edu Made *remem-document-output* read-only, added +;; major-mode and retrieved document type to rating log. +;; Toggling remem off and on while banging on the keys +;; used to cause emacs to wedge, presubably because of sit-for +;; instead of sleep-for. Fixed that (I think). +;; Finally, it now defaults to printing hash marks for how +;; relevant a hit is, rather than the numbers. Also can set it +;; to not show hits below a certain threshold. Added the +;; remem-mode-db-alist change database based on major mode. +;; Added better multi-frame support (only put *remem-display* in +;; one of them). Moved "C-cr" prefix to a customizable parameter. +;; 2.07 9/25/99 rhodes@media.mit.edu Added help function C-crh, fixed(?) it so getting rid of +;; remem window respawns it, while getting rid of buffer kills it. +;; Pop to *remem-display* after a field-query, so it won't update +;; on you while you're looking. Also added check for updated +;; index files -- restart ra-retrieve if the index files +;; have been modified. +;; 2.06 9/2/99 rhodes@media.mit.edu Sanity check for database subdir existing +;; Added remem-change-database, fixed remem-grab-query +;; for xemacs, added timestamping for logs, +;; added a full-page query mode, changed all the quick-keys +;; to start in C-cr, fixed "not leaving remem buffer" bug +;; 2.05 7/19/99 rhodes@media.mit.edu Fixed mouse left-click for Xemacs, added template type +;; output for savant, made a better date print format, +;; added the filename to the default output format, and +;; now allow a per-scope formatting through remem-format-alist +;; 2.04 6/16/99 rhodes@media.mit.edu Added a "require timer" and "remem-grab-query" (C-cf) +;; 2.03 5/20/99 rhodes@media.mit.edu Added some sanity checks +;; 2.02 4/8/99 rhodes@media.mit.edu Added logging +;; 2.01 3/10/99 rhodes@media.mit.edu Got rid of stupid "require jimminy" that broke it, +;; fixed it for xemacs, and got rid of remem-mouse.el +;; 2.00 3/6/99 rhodes@media.mit.edu Release 2.00 + +(provide 'remem) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; CUSTOMIZATIONS +;; These variables can (and probably should) be overridden for each user +;; in their own .emacs file, or in a remem-custom.el file which gets loaded +;; after remem.el does. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Required Customizations: +;; You must set remem-prog-dir, remem-database-dir, and remem-scopes-list. +;; The defaults given are probably not correct for your individual databases +;; and scopes. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;;;;;;;;;;;;;; +;; This is the directory where savant is located (fully expanded) +(defvar remem-prog-dir (expand-file-name "/usr/bin") + "This is the directory where savant is located (fully expanded)") + +;;;;;;;;;;;;;;;; +;; This is the base directory containing all of the database directories (fully expanded) +;; NOTE: This is a directory containing *directories*, which in turn contain index files. +(defvar remem-database-dir (expand-file-name "~/RA-indexes") + "This is the base directory containing all of the database directories (fully expanded)") + +;;;;;;;;;;;;;;;; +;; The scopes list... This is a list in the form: +;; +;; (scope1 scope2 scope3 ...) +;; +;; Where scope is of the form: +;; +;; (DIRN NUM-LINES UPDATE-TIME QUERY-RANGE) +;; +;; DIRN is the subdirectory of remem-database-dir with the desired database +;; This is the name of a sub-directory in remem-database-dir +;; NUM-LINES is the number of lines that you want the scope to return (initially) +;; UPDATE-TIME is the time between scope updates (in seconds) +;; QUERY-RANGE number of lines around point that you want the scope to query on +(defvar remem-scopes-list '(("mail" 6 5 500) + ("notes" 2 5 500)) + "The list of scopes, where each scope is (DIRN NUM-LINES UPDATE-TIME QUERY-RANGE)") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Optional Customizations: +;; remem-log-original-suggestion, remem-terminal-mode, remem-logging-p, +;; remem-use-major-mode-templates, remem-non-r-number-keys and the font +;; customizations are set to reasonable defaults but can be overridden to fit +;; your tastes. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;;;;;;;;;;;;;; +;; Whether or not to retrieve the original document or to make a copy for viewing +;; Useful for email-style files (narrowed), and when you want to subsequently edit +;; the suggested file +(defvar remem-load-original-suggestion nil + "When seeing an entire suggestion, just go to the file rather than a copy") + +;;;;;;;;;;;;;;;; +;; Turns on logging. The default log-file is ~/.remem-log-file +(defvar remem-log-p t + "If t, log when suggestions are followed to remem-logfile") +(defvar remem-logfile (expand-file-name "~/.remem-log-file") + "File where remembrance agent info gets logged") + +;;;;;;;;;;;;;;;; +;; Set to t if you want to use the major-mode variable to automatically parse +;; fields from your document, based on the template structure defined in +;; Savant. +(defvar remem-use-major-mode-templates t + "If t, send major-mode info to Savant to help templates") + +;;;;;;;;;;;;;;;; +;; Set remem-non-r-number-keys to t if you want C-c1 through C-c9 to bring up +;; a suggestion. These keys are already set to C-cr1 through C-cr9, but this +;; saves a keystroke. +(defvar remem-non-r-number-keys nil + "If t, set C-c1 through C-c9 to bring up suggestions just like C-cr1 through C-cr9 do now") + +;;;;;;;;;;;;;;;; +;; Set remem-terminal-mode to t if you want the keywords to show up on the +;; screen rather than on mouse-click. Otherwise, set to nil. +;; Actually, I take it back. This option is like the "close door" button on +;; the elevator. You can play with it, but in reality it doesn't do a darned thing. +(defvar remem-terminal-mode t + "Set to t if you want keywords shown. Not implemented right now.") + +;;;;;;;;;;;;;;;; +;; Set remem-print-exact-relevance-p to t if you want numbers instead of plus signs +;; for the relevance score. +(defvar remem-print-exact-relevance-p nil) + +;;;;;;;;;;;;;;;; +;; Set remem-print-even-bad-relevance-p to t if you want all suggestions shown, +;; regardless of how bad the relevance. +(defvar remem-print-even-bad-relevance-p nil) + +;;;;;;;;;;;;;;;; +;; Set remem-print-exact-relevance-p to t if you want numbers instead of plus signs +;; for the relevance score. +(defvar remem-relevance-plus-plus-threshold 40) ;; Relevance score to get a "++" rating +(defvar remem-relevance-plus-threshold 30) ;; Relevance score to get a "+" rating +(defvar remem-relevance-normal-threshold 10) ;; Relevance score minimum before getting a "-" rating, + ;; or no suggestion if remem-print-even-bad-relevance-p = nil + +;;The Prefix used for RA commands. Default is control-c r +(defvar remem-command-prefix "\C-cr") + +;;;;;;;;;;;;;;;; +;; Keys We want to start with before running the RA +(global-set-key (concat remem-command-prefix "t") 'remem-toggle) +(global-set-key (concat remem-command-prefix "h") 'remem-create-help-page) + +;;;;;;;;;;;;;;;; +;; Mode aware changing +;; These three variables let you automatically change mode based on the *major-mode* +;; variable. For example, you could set them to these values: +;; (setq remem-mode-aware-changing t) +;; (setq remem-mode-db-alist (list (cons 'mail-mode (("mail" 5 10 500))) +;; (cons 'rmail-mode (("mail" 5 10 500))) +;; (cons 'latex-mode (("inspec" 5 10 500))))) +;; (setq remem-buffname-db-alist (list (cons "my-diary" (("daily-notes" 5 10 500))) +;; (cons "my-homework" (("code" 5 10 500))))) +;; +;; The first value turns on mode-aware database selection. +;; The second specifies that when you visit a mail-mode or rmail-mode buffer, switch to the +;; "mail" database with the specified number of lines, seconds between updates and +;; number of words looked at. In latex-mode it switches to the "inspec" database. +;; Any other mode doesn't change. +;; The third line is for buffer-specific changes. Here, the buffer named "my-dairy" gets +;; "daily-notes" regardless of mode, and "my-homework" gets the database named "code". +;; If you change databases in a specific buffer, your new selection becomes sticky for +;; the rest of the session. +;; +;; Now that wasn't so bad, was it? + +(defvar remem-mode-aware-changing nil) +(defvar remem-buffname-db-alist nil) ;;; Set in user customization if used +(defvar remem-mode-db-alist nil) ;;; Set in user customization if used + +;;;;;;;;;;;;;;;; +;; Font customizations. +;; Every odd column +;; Fonts +;; +;; These are the colour customizations +;; colour for every alternating column +(make-empty-face 'remem-odd) +(make-empty-face 'remem-even) +(make-empty-face 'remem-hilite) ;; current line +(make-empty-face 'remem-hilite2) ;; current field +(make-empty-face 'remem-odd-scope) +(make-empty-face 'remem-even-scope) + +(cond ((and (boundp 'hilit-background-mode) + (equal hilit-background-mode 'dark)) + (set-face-foreground 'remem-odd "Thistle") + (set-face-foreground 'remem-even "MediumSeaGreen") ;; Every even column + (set-face-foreground 'remem-odd-scope "Goldenrod") ;; Every odd scope (numbers) + (set-face-foreground 'remem-even-scope "CornflowerBlue") ;; Every even scope (numbers) + (set-face-foreground 'remem-hilite2 "OrangeRed") ;; Selected line + (set-face-foreground 'remem-hilite "Aquamarine") ;; Current line (on mouse-over) + ;; (set-face-font 'remem-hilite "-misc-fixed-bold-r-normal--15-140-75-75-c-90-iso8859-1") + ) + (t +; (set-face-foreground 'remem-odd "ForestGreen") + (set-face-foreground 'remem-odd "Black") + (set-face-foreground 'remem-even "MediumBlue") ;; Every even column + (set-face-foreground 'remem-odd-scope "Blue") ;; Every odd scope (numbers) + (set-face-foreground 'remem-even-scope "DarkSlateGray") ;; Every even scope (numbers) + (set-face-foreground 'remem-hilite2 "Red") ;; Selected line + (set-face-foreground 'remem-hilite "Red") ;; Current line (on mouse-over) + )) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; END OF CUSTOMIZATIONS +;; Beyond this point you're in the bowels of the +;; code and you're on your own :) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) + +;; xemacs hacks +(cond (running-xemacs + (require 'itimer) + (defun event-x-y (event) + (cons (event-x event) (event-y event))) + (defun run-at-time (time repeat function &rest args) + (apply 'start-itimer "remem-timer" function time repeat nil t args)) + (defun remem-cancel-timer (timer) + (cond (timer + (delete-itimer timer)))) + (defun x-popup-menu (event list) + (popup-menu list event)) + (defun frame-first-window (&rest args) + (frame-highest-window args)) +; (defun sit-for-nodist (seconds) +; (sit-for seconds t)) + (defun marker-position-nonil (marker) + (let ((mark (marker-position marker))) + (cond (mark mark) + (t 0)))) + (require 'overlay)) + (t + (require 'timer) + (defvar scrollbar-width) ;; To shut the compiler up + (defvar scrollbar-height) ;; To shut the compiler up + (defvar mouse-track-click-hook) ;; To shut the compiler up + (defun remem-cancel-timer (timer) (cancel-timer timer)) + (defun marker-position-nonil (marker) + (let ((mark (marker-position marker))) + (cond (mark mark) + (t 0)))) + (defun window-displayed-height (&optional window) + (- (window-height window) 1)) +; (defun sit-for-nodist (seconds) +; (sit-for seconds 0 t)) + (defun event-x-y (event) + (posn-x-y (event-end event))) + (defun event-window (event) + (posn-window (event-end event))) + (defun event-point (event) + (posn-point (event-end event))))) + + + + +;;; -------------- +;;; GLOBAL OPTIONS +;;; -------------- + +;; Other customizations + +;; I've not tested remem-hide-display in awhile -- It might not work. +(defvar remem-hide-display nil + "If t, don't display the remem window (but keep updating it anyway)") +(setq remem-hide-display nil) + +;; I've not tested remem-autojump-suggestion in awhile -- It might not work. +(defvar remem-autojump-suggestion nil + "If a value, jump automatically to that lineno when it's updated") +(setq remem-autojump-suggestion nil) + +(defvar remem-keyword-field-start-number 28 + "Field where most relevant keywords are kept") + +(defvar remem-sim-breakdown-field-start-number 29 + "Field where field similarity breakdown is kept") + +(defvar remem-query-preamble-string "" + "String that gets catenated before every Savant query command. +Change this to give special commands like setting biases and using +hand-set biases.") + +(defvar remem-query-preamble-string-previous "" + "Previous value of remem-query-preamble-string, used to keep track of when a query changes") + +(defvar remem-query-oneshot-preamble-string "" + "Like remem-query-preamble-string, but gets reset to the empty string after every query.") + +(defvar remem-query-extra-text-string "" + "String that gets catenated just before the query text (after the query command).") + +(defvar remem-query-extra-text-string-previous "" + "Previous value of remem-query-extra-text-string, used to keep track of when a query changes") + +(defvar remem-query-oneshot-extra-text-string "" + "Like remem-query-extra-text-string, but gets reset to the empty string after every query.") + +;;; --------------------- +;;; DEFAULT LOCAL OPTIONS +;;; --------------------- + +(defvar remem-format-default + '((0 2 (field 0 mouse-face remem-hilite2) nil) ; Number + (1 2 (face remem-even field 1) nil) ; sim + (9 12 (face remem-odd field 9 mouse-face remem-hilite) nil) ; person + (8 30 (face remem-even field 8 mouse-face remem-hilite) nil) ; subject + (5 8 (face remem-odd field 5 mouse-face remem-hilite) remem-date-print-filter) ; date + (27 13 (face remem-even field 4 mouse-face remem-hilite) nil) ; filename +; (4 10 (face remem-even field 4 mouse-face remem-hilite) nil) ; location + (28 50 (face remem-odd field 28 mouse-face remem-hilite) nil))); keywords + +(defvar remem-format-nokeys ;field-number field-width field-text-properties print-filter-function + '((0 2 (field 0 mouse-face remem-hilite2) nil) ; Number + (1 2 (face remem-even field 1) nil) ; sim + (9 12 (face remem-odd field 9 mouse-face remem-hilite) nil) ; person + (8 30 (face remem-even field 8 mouse-face remem-hilite) nil) ; subject + (5 8 (face remem-odd field 5 mouse-face remem-hilite) remem-date-print-filter) ; date + (4 50 (face remem-even field 4 mouse-face remem-hilite) nil))) ; location + +(defvar remem-format-inspec + '((0 2 (field 0 mouse-face remem-hilite2) nil) ; Number + (1 2 (face remem-even field 1) nil) ; sim + (9 12 (face remem-odd field 9 mouse-face remem-hilite) nil) ; person + (5 12 (face remem-even field 5 mouse-face remem-hilite) remem-date-print-filter) ; date + (8 50 (face remem-odd field 8 mouse-face remem-hilite) nil) ; subject + (28 50 (face remem-even field 28 mouse-face remem-hilite) nil))); keywords + +(defvar remem-format-jimminy + '((0 2 (field 0 mouse-face remem-hilite2) nil) ; Number + (1 2 (face remem-even field 1) nil) ; sim + (9 12 (face remem-odd field 9 mouse-face remem-hilite) nil) ; person + (8 24 (face remem-even field 8 mouse-face remem-hilite) nil) ; subject + (5 8 (face remem-odd field 5 mouse-face remem-hilite) remem-date-print-filter) ; date + (28 50 (face remem-even field 28 mouse-face remem-hilite) nil))); keywords + +(defvar remem-format remem-format-default) +(defvar remem-format-mail remem-format-default) + +(defvar remem-format-alist nil) ;;; Set in user customization if used + +;;format list for the keyword field + +(defvar remem-keyword-field + '(28 40 (face remem-even field 28))) + +;;If remem-mode-db-alist is t: +;; if buffname is in remem-buffname-db-alist, switch to scopes lists +;; elseif major-mode is in remem-mode-db-alist, switch to scopes lists +;; else don't change databases. +;; +;; current buffer is automatically added to remem-buffname-db-alist if remem-change-database is called. + +;;; --------- +;;; INTERNALS +;;; --------- + +;; Note: these are the fields that savant returns, with one exception: +;; since the line number that savant returns may not correspond with +;; the line number in the remem display (duplicate lines, multiple scopes +;; in the same buffer), lineno is tacked on by remem-render-processed +;; num-relevance contains the savant line number (as well as the relevance) +;; Also, we're labeling keywords as in the body for search purposes. +;; These are all used for doing searches on fields when they're clicked. +(defvar remem-savant-field-names + '(lineno num-relevance docnum "!BODY: " "!LOCATION: " "!DATE: " "!TIME: " "!DAY" "!SUBJECT: " "!PERSON: " + "" "" "" "" "" "" "" "" "" "" + "" "" "" "" "" "" "" "" "!BODY:" )) + +;; This is another helper list... to ensure that the interactive call asking for 1-5 returns a 1-5 in +;; the field choice +(defvar remem-field-array + '(("Body" . 3) ("Location" . 4) ("Date" . 5) ("Subject" . 8) ("Person" . 9) + ("body" . 3) ("location" . 4) ("date" . 5) ("subject" . 8) ("person" . 9))) + +(defvar remem-total-scope-lines 0) +(defvar remem-display-buffer-height 4) +(defvar remem-docnum-field 2) ; the third +(defvar remem-relevance-field 1) ; the second +(defvar remem-waiting-for-query-return-timeout 10) +(defvar remem-document-buffer-name "*remem-document-output*") +(defvar remem-query-buffer-name "*remem-query*") +(defvar remem-help-buffer-name "*remem-help*") +(defvar remem-old-C-x1 nil) ; holds function bound to C-x-1 +(defvar remem-old-C-xo nil) ; holds function bound to C-x-0 +(defvar remem-kind-of-query nil) ; one of 'auto, 'mouse, 'manual-text, 'manual-page, 'manual-field, + ; or 'bypass for what the last query was +(defvar remem-versionstring-temp "") ; Temporary global storage for versionstring info +(defvar remem-working-scope nil) ; Global storage for scope being worked on right now + + + +;; Program Variables + +(defvar remem-buffer-name "*remem-display*" + "The name of the remembrance display buffer.") + +(defvar remem-display-running nil + "is the remem-display already running?") + +(defvar remem-scopes nil) +(make-variable-buffer-local 'remem-scopes) ; each buffer has its own set of scopes + +(defvar remem-scope-percentages nil) + +(defvar remem-global-timer nil) + +(defvar remem-buffers nil) ; a list of all buffers containing remem scopes + ;; this is necessary for the process filter + +;; selection related + +(defvar remem-selection-line nil) +(make-variable-buffer-local 'remem-selection-line) +(defvar remem-selection-line-contents "") +(make-variable-buffer-local 'remem-selection-line-contents) +(defvar remem-selection-field nil) +(make-variable-buffer-local 'remem-selection-field) + +(defvar remem-selection-line-overlay nil) +(make-variable-buffer-local 'remem-selection-line-overlay) +(defvar remem-selection-field-overlay nil) +(make-variable-buffer-local 'remem-selection-field-overlay) + +(defvar remem-last-followed-docnum nil) ;; Docnum of document followed last + +;;; ---------- +;;; SCOPE DATA +;;; ---------- + +;; We keep the data about a remembrance agent together in +;; the scope data structure + +; [dir, lines, update time, range, proc, history, query, processed, in progress?, +; timer, raw, buffer, querycounter, Database info, Database modtime] + +(defun remem-scope-directory (scope) + (aref scope 0)) ; subdir of remem-database-dir +(defun remem-scope-number-lines (scope) + (aref scope 1)) ; number of lines to display for this scope +(defun remem-scope-update-time (scope) ; how often to update (0 = never) + (let ((ut (aref scope 2))) + (cond ((eq ut 0) nil) + (t ut)))) +(defun remem-scope-range (scope) + (aref scope 3)) ; how many words to look at +(defun remem-scope-proc (scope) + (aref scope 4)) ; the process running this agent +(defun remem-scope-history (scope) + (aref scope 5)) ; a list of past queries -- currently disabled since it grows without bound. +(defun remem-scope-query (scope) + (aref scope 6)) ; the current query -- also used to only initiate new queries (i.e. don't do anything when idle) +(defun remem-scope-processed (scope) + (aref scope 7)) ; the results of the last query +(defun remem-scope-in-progress (scope) + (aref scope 8)) ; is there a query in progress? How long until it times out? +(defun remem-scope-timer (scope) + (aref scope 9)) ; timer object for this scope +(defun remem-scope-raw (scope) + (aref scope 10)) ; the unprocessed results of the last query +(defun remem-scope-buffer (scope) + (aref scope 11)) ; the buffer which contains this scope +(defun remem-scope-querycounter (scope) + (aref scope 12)) ; number queries done in this scope since the last log checkpoint +(defun remem-scope-dbinfo (scope) + (aref scope 13)) ; info on the database queried in this scope (version # and num docs) +(defun remem-scope-dbmodtime (scope) + (aref scope 14)) ; modtime of the database queried in this scope (so we know to reset if it's been changed out from under us) + +(defun remem-set-scope-directory (scope value) + (aset scope 0 value)) ; subdir of remem-database-dir +(defun remem-set-scope-number-lines (scope value) + (aset scope 1 value)) ; number of lines to display for this scope +(defun remem-set-scope-update-time (scope value) + (aset scope 2 value)) ; how often to update (0 = never) +(defun remem-set-scope-range (scope value) + (aset scope 3 value)) ; how many words to look at +(defun remem-set-scope-proc (scope value) + (aset scope 4 value)) ; the process running this agent +(defun remem-set-scope-history (scope value) + (aset scope 5 value)) ; a list of past queries -- currently disabled since it grows without bound. +(defun remem-set-scope-query (scope value) + (aset scope 6 value)) ; the current query -- also used to only initiate new queries (i.e. don't do anything when idle) +(defun remem-set-scope-processed (scope value) + (aset scope 7 value)) ; the results of the last query +(defun remem-set-scope-in-progress (scope value) + (aset scope 8 value)) ; is there a query in progress? How long until it times out? +(defun remem-set-scope-timer (scope value) + (aset scope 9 value)) ; timer object for this scope +(defun remem-set-scope-raw (scope value) + (aset scope 10 value)) ; the unprocessed results of the last query +(defun remem-set-scope-buffer (scope value) + (aset scope 11 value)) ; the buffer which contains this scope +(defun remem-set-scope-querycounter (scope value) + (aset scope 12 value)) ; number queries done in this scope since the last log checkpoint +(defun remem-set-scope-dbinfo (scope value) + (aset scope 13 value)) ; info on the database queried in this scope (version # and num docs) +(defun remem-set-scope-dbmodtime (scope) + (aset scope 14 value)) ; modtime of the database queried in this scope (so we know to reset if it's been changed out from under us) + +(defun remem-decrement-scope-in-progress (scope) + (aset scope 8 (and (aref scope 8) + (> (aref scope 8) 0) + (- (aref scope 8) 1)))) ; if not nil or zero, subtract 1, else nil + +;;; Debugging function +;;; (defun remem-break-here () nil) + +;;; -------- +;;; QUERYING +;;; -------- + +;;; all query functions should call this + +; (defun remem-initiate-query (scope &optional query nomodep) +; (cond ((and (remem-scope-in-progress scope) +; (not (y-or-n-p +; "There is already a query in progress. Use this one instead? ")))) +; (t ;This was originally giving me the problem of destroying all minibuffer messages, so I +; ;blocked it out. +; ;(message nil) ; don't leave the y-or-n question hanging around + +; (cond (query ; is there a new query here? then make a note of it +; (remem-set-scope-query scope query) +; ;;; (remem-set-scope-history scope (cons query (remem-scope-history scope))) +; )) +; (let ((query-text +; (concat +; "query " (format "%d" (+ 6 (* 2 (remem-scope-number-lines scope)))) "\n" +; (cond ((not nomodep) +; (concat "EMACS REMEMBRANCE QUERY MODE: " (format "%s" major-mode) "\n")) +; (t nil)) +; (remem-scope-query scope) "\n" +; "\004"))) + +; (set-text-properties 0 (length query-text) nil query-text) ;; Get rid of emacsisms +; (if (get-buffer "*remem-log*") +; (print query-text (get-buffer "*remem-log*"))) + +; (set-process-filter (remem-scope-proc scope) 'remem-process-filter) +; ; we may have set this to the display filter elsewhere +; (process-send-string (remem-scope-proc scope) +; query-text) +; (remem-set-scope-in-progress scope remem-waiting-for-query-return-timeout))))) + + + +;;;Same thing as above without the yes or no questions and progress check +(defun remem-initiate-query-nonverbose (scope &optional query use-modep use-preambles use-extra-text) + (cond ((remem-restart-on-outdated-index scope)) + (t + (cond (query ; is there a new query here? then make a note of it + (remem-set-scope-query scope query) + (setq remem-query-extra-text-string-previous remem-query-extra-text-string) + (setq remem-query-preamble-string-previous remem-query-preamble-string) + ;; (remem-set-scope-history scope (cons query (remem-scope-history scope))) + )) + (let ((query-text + (concat remem-query-oneshot-preamble-string remem-query-preamble-string + "query " (format "%d" (+ 6 (* 2 (remem-scope-number-lines scope)))) "\n" + (cond (use-modep + (concat "EMACS REMEMBRANCE QUERY MODE: " (format "%s" major-mode) "\n"))) + (cond (use-preambles remem-query-oneshot-extra-text-string)) + (cond (use-extra-text remem-query-extra-text-string)) + (remem-scope-query scope) "\n" + "\004"))) + + (setq remem-last-query-mode (format "%s" major-mode)) + (set-text-properties 0 (length query-text) nil query-text) ;; Get rid of emacsisms + (if (get-buffer "*remem-log*") + (print query-text (get-buffer "*remem-log*"))) + + (remem-set-scope-querycounter scope (+ (remem-scope-querycounter scope) 1)) ;; Count queries for logs + (cond ((>= (remem-scope-querycounter scope) 25) + (remem-log-checkpoint-scope scope 'at-25))) + + (set-process-filter (remem-scope-proc scope) 'remem-process-filter) + ; we may have set this to the display filter elsewhere + (process-send-string (remem-scope-proc scope) + query-text) + (remem-set-scope-in-progress scope remem-waiting-for-query-return-timeout)) + (setq remem-query-oneshot-preamble-string "") + (setq remem-query-oneshot-extra-text-string "")))) + +(defun remem-default-scope-list () + "Returns the remem-scopes for the remem buffer that is currently defaulted" + (or remem-scopes ; first one in the active buffer + (and remem-buffers (buffer-live-p (car remem-buffers)) + (save-excursion + (set-buffer (car remem-buffers)) + remem-scopes)))) + +(defun remem-default-scope () + "Returns the scope that is currently defaulted" + (let ((default-scopes (remem-default-scope-list))) + (cond (default-scopes (car default-scopes)) + nil))) + +(defun remem-all-scopes () + "Return all scopes in all remem buffers" + (apply 'append + (mapcar '(lambda (buf) + (cond ((buffer-live-p buf) + (set-buffer buf) + remem-scopes) ; a buffer local variable + (t nil))) + remem-buffers))) + +;; run a query in the default scope +; (defun remem-query (query) +; (interactive "sQuery on text:") +; (let ((scope (remem-default-scope))) +; (cond (scope (remem-initiate-query scope query) +; (message "Query initiated.") +; (setq remem-kind-of-query 'manual-text)) +; (t (message "No active remembrance agent."))))) + + +(defun remem-last-several-words (count) + "String from count words back to current point. (word = 5 chars)" + ;; If we're in a summary mode (e.g. RMAIL-summary, VM's "mailbox Summary", or + ;; gnus "*Summary alt.sweedish.cheff.bork.bork.bork*)" then + ;; grab the query from where we really should be. + (let ((orig-window (get-buffer-window (current-buffer))) + (end) (beg) (retval) (realbufname)) + (save-excursion + (cond ((string-match "-summary" (buffer-name (current-buffer))) + (setq realbufname (substring (buffer-name (current-buffer)) + 0 + (string-match "-summary" (buffer-name (current-buffer)))))) + ((string-match " Summary" (buffer-name (current-buffer))) + (setq realbufname (substring (buffer-name (current-buffer)) + 0 + (string-match " Summary" (buffer-name (current-buffer)))))) + ((string-match "*Summary " (buffer-name (current-buffer))) + (setq realbufname "*Article*"))) + + (cond ((and realbufname (get-buffer-window realbufname)) + (select-window (get-buffer-window realbufname)))) + + ; place start of sample count words before current position + ; or as far back as possible + (setq beg (- (point) (* 5 count))) + (if (< beg (point-min)) + (setq beg (point-min))) + ; and place end of sample count words ahead of beginning + (setq end (+ beg (* 5 count))) + (if (> end (point-max)) + (setq end (point-max))) + (setq retval (concat " " (buffer-substring beg end))) +; (while (string-match "\n\\.\n" retval) +; (setq retval (replace-match "\n .\n" t t retval))) + ) + (select-window orig-window) + (setq remem-debug-retval retval) + retval)) + +(defun remem-query-now () + "Updates the results shown by running a query NOW. Bypasses the timer" + (interactive) + (mapcar (lambda (scope) + (cond ((not (remem-scope-proc scope))) + ((string-match "^Minibuf" (buffer-name (current-buffer)))) + ((get-buffer-window remem-buffer-name t) + (cond ((string-match (buffer-name (current-buffer)) + remem-query-buffer-name) + (remem-log-checkpoint (remem-default-scope-list) 'manual-page-query) + (setq remem-kind-of-query 'manual-page)) + (t (setq remem-kind-of-query 'now))) + (let ((exheight (window-displayed-height (get-buffer-window remem-buffer-name t)))) + (remem-redistribute-scopes exheight) + (remem-initiate-query-nonverbose scope + (remem-last-several-words (remem-scope-range scope)) + remem-use-major-mode-templates + t ;; Use preambles + t ;; Use extra text + ))) + (t + (remem-initiate-query-nonverbose scope + (remem-last-several-words (remem-scope-range scope)) + remem-use-major-mode-templates + t ;; Use preambles + t ;; Use extra text + )))) + (remem-default-scope-list))) + + +(defun remem-query-on-keywords (keywords) + (mapcar (lambda (scope) + (cond ((not (remem-scope-proc scope))) + ((string-match "^Minibuf" (buffer-name (current-buffer)))) + ((get-buffer-window remem-buffer-name t) + (let ((exheight (window-displayed-height (get-buffer-window remem-buffer-name t)))) + (remem-redistribute-scopes exheight) + (remem-initiate-query-nonverbose scope keywords nil) + (remem-cancel-timer (remem-scope-timer scope)) + (remem-set-scope-timer scope + (run-at-time 10 (remem-scope-update-time scope) 'remem-around-point scope)) + )) + (t + (remem-initiate-query-nonverbose scope keywords nil) + (remem-cancel-timer (remem-scope-timer scope)) + (remem-set-scope-timer scope + (run-at-time 10 (remem-scope-update-time scope) 'remem-around-point scope)) + ))) + (remem-default-scope-list))) + + +;;; This never seems to be called... +; (defun remem-query-on-field-mouse (field field-text) +; (let ((query +; (concat "EMACS REMEMBRANCE FIELD QUERY:\n" +; (elt remem-savant-field-names field) +; field-text))) +; (setq remem-kind-of-query 'mouse) +; (remem-log-checkpoint (remem-default-scope-list) 'mouse-field-query) +; (mapcar (lambda (scope) +; (cond ((not (remem-scope-proc scope))) +; ((string-match "^Minibuf" (buffer-name (current-buffer)))) +; ((get-buffer-window remem-buffer-name t) +; (let ((exheight (window-displayed-height (get-buffer-window remem-buffer-name t)))) +; (remem-redistribute-scopes exheight) +; (remem-initiate-query-nonverbose scope query nil) +; (remem-cancel-timer (remem-scope-timer scope)) +; (remem-set-scope-timer scope +; (run-at-time 10 (remem-scope-update-time scope) 'remem-around-point scope)) +; )) +; (t +; (remem-initiate-query-nonverbose scope query nil) +; (remem-cancel-timer (remem-scope-timer scope)) +; (remem-set-scope-timer scope +; (run-at-time 10 (remem-scope-update-time scope) 'remem-around-point scope)) +; ))) +; (remem-default-scope-list)))) + + + + +(defun remem-query-on-field (field field-text query-type) + (let ((query + (concat "EMACS REMEMBRANCE FIELD QUERY:\n" + (elt remem-savant-field-names field) + field-text))) + (setq remem-kind-of-query query-type) + (remem-log-checkpoint (remem-default-scope-list) (concat (symbol-name query-type) "-query")) + (mapcar (lambda (scope) + (cond ((not (remem-scope-proc scope))) + ((string-match "^Minibuf" (buffer-name (current-buffer)))) + ((get-buffer-window remem-buffer-name t) + (let ((exheight (window-displayed-height (get-buffer-window remem-buffer-name t)))) + (remem-redistribute-scopes exheight) + (remem-initiate-query-nonverbose scope query nil) + (remem-cancel-timer (remem-scope-timer scope)) + (remem-set-scope-timer scope + (run-at-time 10 (remem-scope-update-time scope) 'remem-around-point scope)) + )) + (t + (remem-initiate-query-nonverbose scope query nil) + (remem-cancel-timer (remem-scope-timer scope)) + (remem-set-scope-timer scope + (run-at-time 10 (remem-scope-update-time scope) 'remem-around-point scope)) + ))) + (remem-default-scope-list)))) + + +(defun remem-grab-query (fieldname field-text) + "Run a query on a given field" + (interactive + (list (let (val) + (setq val (completing-read "Which Field? (Body Location Date Subject Person): " + remem-field-array + 'consp t)) + (cdr (assoc val remem-field-array))) + (read-string "Enter Text: "))) + (remem-query-on-field fieldname field-text 'manual-field) + (pop-to-buffer remem-buffer-name)) + + +(defun remem-insert-query-page-text (fieldstring) + "Insert a string as the next field for a query page, with appropriate read-only font" + (let ((len (length fieldstring))) + (cond ((not running-xemacs) + (add-text-properties 0 len '(read-only t face remem-odd-scope) fieldstring) + (add-text-properties (- len 1) len '(rear-nonsticky t) fieldstring) + (insert fieldstring)) + (t ;; Xemacs has a broken rear-nonsticky, so we use extents instead. + (let ((extent (make-extent + (point) + (progn (insert fieldstring) (point))))) + (set-extent-face extent 'remem-odd-scope) + (set-extent-property extent 'read-only t) + (cond ((= (point-min) (point)) + (set-extent-property extent 'start-open nil) + (set-extent-property extent 'end-open t)) + (t + (set-extent-property extent 'start-open t) + (set-extent-property extent 'end-open t)))))))) + +(defun remem-create-query-page () + "Create a nice form-like buffer to fill in a manual remem query" + (interactive) + (remem-log-checkpoint (remem-default-scope-list) 'new-query-page) + (cond ((get-buffer remem-query-buffer-name) + (kill-buffer remem-query-buffer-name))) + (pop-to-buffer (get-buffer-create remem-query-buffer-name)) ;; Make/get the query buffer + (setq major-mode 'remem-query-mode) + (kill-region (point-min) (point-max)) ;; Clear the buffer + (remem-insert-query-page-text "Remem Query Form:\nEnter one or more fields below and hit C-crv to view the results\n\nSubject: ") + (remem-insert-query-page-text "\nPerson: ") + (remem-insert-query-page-text "\nLocation: ") + (remem-insert-query-page-text "\nDate: ") + (remem-insert-query-page-text "\nBody: ") + (goto-char (point-min)) + (end-of-line 4)) + +(defun remem-create-help-page () + "Display the help page for the RA" + (interactive) + (let ((help-string + (cond ((equal remem-command-prefix "\C-cr") + "Remembrance Agent Commands:\n\nC-c r t (Control-c r t): Toggle Remem\nC-c r v (Control-c r v): View updated results\nC-c r # (Control-c r ): Show Suggestion\nC-c r r # (Control-c r r ): Rate this document\nC-c r f (Control-c r f): Field Search\nC-c r q (Control-c r q): Query\nC-c r d (Control-c r d): Database change\nLeft mouse-click on lineno: Show Suggestion\nLeft mouse-click on a field: Search field\nMiddle or Right mouse-click: Keywords\nResize window: Resize\n") + (t (concat "Remembrance Agent Commands:\n\n" + remem-command-prefix + "t: Toggle Remem\n" + remem-command-prefix + "v: View updated results\n" + remem-command-prefix + "#: Show Suggestion number #\n" + remem-command-prefix + "r#: Rate document number #\n" + remem-command-prefix + "f: Field Search\n" + remem-command-prefix + "q: Query\n" + remem-command-prefix + "d: Database change\nLeft mouse-click on lineno: Show Suggestion\nLeft mouse-click on a field: Search field\nMiddle or Right mouse-click: Keywords\nResize window: Resize\n"))))) + + (pop-to-buffer (get-buffer-create remem-help-buffer-name)) + (kill-region (point-min) (point-max)) + (insert help-string) + (goto-char (point-min)))) + +(defun remem-switch-to-mode-specific-db () + "Switch database to the one specified in remem-mode-db-alist" + (let ((new-remem-scopes-list (or (cdr (assoc (buffer-name (current-buffer)) remem-buffname-db-alist)) + (cdr (assoc major-mode remem-mode-db-alist))))) + (cond ((and new-remem-scopes-list + (not (equal remem-scopes-list new-remem-scopes-list))) + (setq remem-scopes-list new-remem-scopes-list) + (remem))))) + +(defun remem-around-point (scope) + (remem-decrement-scope-in-progress scope) + (cond ((not (remem-scope-proc scope))) ; if the process is dead, abort + ((remem-scope-in-progress scope)) + ; if we're already running a query here, don't supercede + ((string-match "^*remem-" (buffer-name (current-buffer)))) + ; don't search results, the display area, or *remem-log* + ((string-match "*Minibuf" (buffer-name (current-buffer)))) + ; don't search the Minibuffer + + ((and remem-mode-aware-changing (remem-switch-to-mode-specific-db))) ;; Switch to new DB if major-mode change + + ((get-buffer-window remem-buffer-name t) + (let ((exheight (window-displayed-height (get-buffer-window remem-buffer-name t))) + (query (remem-last-several-words (remem-scope-range scope)))) + (remem-redistribute-scopes exheight) ;; Handle resizes + (cond ((or (not (string= query (remem-scope-query scope))) ;; Only query if things have changed + (not (equal remem-query-oneshot-preamble-string "")) + (not (equal remem-query-oneshot-extra-text-string "")) + (not (string= remem-query-preamble-string remem-query-preamble-string-previous)) + (not (string= remem-query-extra-text-string remem-query-extra-text-string-previous))) + (setq remem-kind-of-query 'auto) + (remem-initiate-query-nonverbose scope query remem-use-major-mode-templates t t))))) + (t ; actually remem! + (let ((query (remem-last-several-words (remem-scope-range scope)))) + (cond ((or (not (string= query (remem-scope-query scope))) ;; Only query if things have changed + (not (equal remem-query-oneshot-preamble-string "")) + (not (equal remem-query-oneshot-extra-text-string "")) + (not (string= remem-query-preamble-string remem-query-preamble-string-previous)) + (not (string= remem-query-extra-text-string remem-query-extra-string-previous))) + (setq remem-kind-of-query 'auto) + (remem-initiate-query-nonverbose scope query remem-use-major-mode-templates t t))))))) + +;;; Function to keep the number of lines displayed by each scope proportional to the original distribution +(defun remem-redistribute-scopes (newtotal) + "This function changes the number of display lines shown by each scope so that the remem window is filled. Makes use of the percentage property to retain the same proportions across scopes." + (cond ((buffer-live-p (get-buffer remem-buffer-name)) + (setq remem-total-scope-lines 0) + (save-excursion + (set-buffer remem-buffer-name) + (remem-add-scope-lines remem-scopes) + (cond ((not (eq remem-total-scope-lines newtotal)) + (remem-log-checkpoint remem-scopes 'resizing) + (mapcar (lambda (x) + (remem-set-scope-number-lines x (round (* newtotal + (cdr (assq (remem-scope-proc x) + remem-scope-percentages)))))) + remem-scopes))))))) + +;;; The total number of lines displayed by all scope scopes in a list +(defun remem-add-scope-lines (scope-list) + (cond ((null (car scope-list))) + (t + (setq remem-total-scope-lines (+ (remem-scope-number-lines (car scope-list)) remem-total-scope-lines)) + (remem-add-scope-lines (cdr scope-list))))) + + +;;; ------- +;;; DISPLAY +;;; ------- + +;; accessors +;; get the format for column n +(defun remem-column-format (n) + (elt remem-format n)) + +;; get the field number for column n +(defun remem-column-field (n) + (elt (remem-column-format n) 0)) + +;; get the column width for column n +(defun remem-column-width (n) + (elt (remem-column-format n) 1)) + +;; get the text properties for column n +(defun remem-column-props (n) + (elt (remem-column-format n) 2)) + +;; get the print filter for column n +(defun remem-column-printfilter (n) + (elt (remem-column-format n) 3)) + +;; return the column associated with a given field +(defun remem-field-column (n) + (let ((i 0)) + (while (and (< i (length remem-format)) + (not (= (remem-column-field i) n))) + (setq i (+ 1 i))) + i)) + +(defun remem-enlarge-remem-display (num-lines) + (interactive "nNumber Lines to enlarge (negative to shrink): ") + (let ((current-window (get-buffer-window (current-buffer)))) + (select-window (get-buffer-window remem-buffer-name)) + (enlarge-window num-lines) + (select-window current-window))) + +(defun remem-enlarge-remem-display-by-1 () + (remem-enlarge-remem-display 1)) + +(defun remem-shrink-remem-display-by-1 () + (remem-enlarge-remem-display -1)) + +(defun remem-substring-equal (str1 start1 end1 str2 start2 end2 &optional ignore-case) + (let ((compstr1 (substring str1 start1 end1)) + (compstr2 (substring str2 start2 end2))) + (cond (ignore-case + (setq compstr1 (downcase compstr1)) + (setq compstr2 (downcase compstr2)))) + (string-equal compstr1 compstr2))) + +(defun remem-date-print-filter (datestring) + (let ((monthname nil) + (month nil) + (day nil) + (year nil)) + + ;; Wed, 20 Mar 1996 19:42:37 -0500 + ;; Wed, 16 Jul 97 10:18:20 est + (cond ((string-match "\\([0-9]+\\) +\\([A-Z][a-z][a-z]\\) +\\([0-9][0-9][0-9]?[0-9]?\\)" datestring) + (setq day (substring datestring (match-beginning 1) (match-end 1))) + (setq monthname (substring datestring (match-beginning 2) (match-end 2))) + (setq year (substring datestring (match-beginning 3) (match-end 3)))) + + ;; Mon Dec 4 11:28:24 -0500 1995 + ((string-match "[A-Z][a-z][a-z] +\\([A-Z][a-z][a-z]\\) +\\([0-9]+\\) +[0-9][0-9]?:[0-9][0-9]:[0-9][0-9] +[-0-9]* *\\([0-9][0-9][0-9][0-9]\\)" + datestring) + (setq monthname (substring datestring (match-beginning 1) (match-end 1))) + (setq day (substring datestring (match-beginning 2) (match-end 2))) + (setq year (substring datestring (+ (match-beginning 3) 2) (match-end 3)))) + + ;; September 3, 1985 + ((string-match "\\([A-Z][a-z][a-z]\\)[a-z]* +\\([0-9]+\\) *, *\\([0-9][0-9][0-9][0-9]\\)" datestring) + (setq monthname (substring datestring (match-beginning 1) (match-end 1))) + (setq day (substring datestring (match-beginning 2) (match-end 2))) + (setq year (substring datestring (+ (match-beginning 3) 2) (match-end 3))))) + + (cond (monthname + (cond ((remem-substring-equal monthname 0 2 "Jan" 0 2 t) + (setq month "01")) + ((remem-substring-equal monthname 0 2 "Feb" 0 2 t) + (setq month "02")) + ((remem-substring-equal monthname 0 2 "Mar" 0 2 t) + (setq month "03")) + ((remem-substring-equal monthname 0 2 "Apr" 0 2 t) + (setq month "04")) + ((remem-substring-equal monthname 0 2 "May" 0 2 t) + (setq month "05")) + ((remem-substring-equal monthname 0 2 "Jun" 0 2 t) + (setq month "06")) + ((remem-substring-equal monthname 0 2 "Jul" 0 2 t) + (setq month "07")) + ((remem-substring-equal monthname 0 2 "Aug" 0 2 t) + (setq month "08")) + ((remem-substring-equal monthname 0 2 "Sep" 0 2 t) + (setq month "09")) + ((remem-substring-equal monthname 0 2 "Oct" 0 2 t) + (setq month "10")) + ((remem-substring-equal monthname 0 2 "Nov" 0 2 t) + (setq month "11")) + ((remem-substring-equal monthname 0 2 "Dec" 0 2 t) + (setq month "12"))))) + (cond ((and day month year) + (cond ((= (length year) 4) (setq year (substring year 2 4)))) + (cond ((< (length day) 2) (setq day (concat "0" day)))) + (cond ((< (length month) 2) (setq month (concat "0" month)))) + (concat month "/" day "/" year)) + (t + datestring)))) + +(defun remem-format-line (line format-list scope &optional extra-format) + "takes a list of fields, extracts the desired ones (specified in + format-list), and inserts them into the current buffer with the + desired spacing. The point should be at the beginning of a line." + ;(insert (format "%S " fields)) +; (print fields (get-buffer "*scratch*")) + (let ((fields (car line)) + (scope-marker (car (cdr (cdr line)))) + (remem-relevance-score 100)) + (if (stringp fields) + (insert fields) + (mapcar '(lambda (format) + (let ((string (elt fields (elt format 0))) + (width (elt format 1)) + (printfilter (elt format 3)) + (props (append (list 'scope scope + 'docnum (string-to-int (elt fields remem-docnum-field)) + 'relevance (elt fields remem-relevance-field) + 'keywords (elt fields remem-keyword-field-start-number) + 'sims-breakdown (elt fields remem-sim-breakdown-field-start-number) + 'orig-source (elt fields (elt format 0))) + (elt format 2))) + (old-point (point))) + + + ;;; This is specifically for the relevance field + (cond ((= (elt format 0) 0) + (if (= 0 scope-marker) + (setq props (append (list 'face 'remem-even-scope) props)) + (setq props (append (list 'face 'remem-odd-scope) props)))) + ((= (elt format 0) 1) + ;;;funny bug where the + ;;;"lineno relevance" field looked like + ;;;"^Jlineno relevance" This takes care of the newline + (if (string-match "\n" string) + (setq string (substring string 1))) + ;;;show only the relevance part + (setq string (substring string 6)) + (setq remem-relevance-score (string-to-number string)) + + (cond ((not remem-print-exact-relevance-p) + (setq string + (cond ((or (> remem-relevance-score remem-relevance-plus-plus-threshold) + (= remem-relevance-score 0)) ; if 0, it's actually 1.00 + "++") + ((> remem-relevance-score remem-relevance-plus-threshold) "+ ") + ((> remem-relevance-score remem-relevance-normal-threshold) " ") + (t "- "))))) + )) + + ;;; Do the print filter, if there is one + (cond ((or remem-print-even-bad-relevance-p + (not (eq remem-kind-of-query 'auto)) + (= remem-relevance-score 0) ; if 0, it's actually 1.00 + (> remem-relevance-score remem-relevance-normal-threshold)) + (cond (printfilter + (setq string (eval (list printfilter string))))) + + (cond ((< width (length string)) + (insert (substring string 0 width))) ; truncate + (t + (cond (string (insert string))) + (insert-char ?\ (- width (length string))))) ; or pad + (add-text-properties old-point (point) props) + (insert-char ?\ 1)) + ((= (elt format 0) 1) + (insert "- No suggestion"))) + )) + format-list)) + (insert-char ?\n 1 t))) + + ;; format the processed results from each scope, removing duplicate lines + ;; Duplicate lines are only based on database document number + ;; This function contains a hack: it assumes that the first field contains the lineno +(defun remem-render-processed () + (setq inhibit-read-only t) + (erase-buffer) + (let ((unique-lines nil) (overall 0) (scope-marker 0)) + (mapcar + '(lambda (scope) + (let ((i 0) (used 0) (allotted (remem-scope-number-lines scope)) + (available (length (remem-scope-processed scope))) + (processed (remem-scope-processed scope))) + (if (eq scope-marker 0) ;use 1's and 0's to colour scopes differently + (setq scope-marker 1) + (setq scope-marker 0)) + (while (< used allotted) + (cond + ((>= i available) ; we've exhausted the responses + (setq used (+ used 1)) + (setq overall (+ overall 1)) + (setq unique-lines + (cons (list (format "%d No suggestion." overall) scope scope-marker) ; this assumes lines start with the lineno... + unique-lines))) + ((stringp (elt processed i)) ;; "" is not a valid response + (setq i (+ i 1))) + ( ; check for uniqueness using the docnum + + (not (member (elt (elt processed i) (- remem-docnum-field 1)) + ;; this mapcar creates a list of all of the docnums of the lines in unique-lines + ;; that are from the same database. Docnums from different databases are not + ;; comparable + (mapcar '(lambda (e) + (cond ((stringp (car e)) nil) ; ignore "No Suggestion" lines + ((not (equal (remem-scope-directory scope) + (remem-scope-directory (elt e 1)))) nil) ; can't be the same if dif databases + (t (elt (car e) remem-docnum-field)))) + unique-lines))) + ;; a new line, add it + (setq used (+ used 1)) + (setq overall (+ overall 1)) + (setq unique-lines + (cons (list (cons (int-to-string overall) (elt processed i)) scope scope-marker) + ;; add the lineno to the beginning. see comments for remem-savant-field-names + unique-lines)) + (setq i (+ i 1))) + (t ; a duplicate + (setq i (+ i 1))))))) + remem-scopes) + (mapcar '(lambda (line) + (let ((format-for-line (assoc (remem-scope-directory (car (cdr line))) + remem-format-alist))) + (cond ((not format-for-line) + (setq format-for-line remem-format-default)) + (t (setq format-for-line (car (cdr format-for-line))))) + (remem-format-line line format-for-line (elt line 1)))) + (reverse unique-lines))) + (setq inhibit-read-only nil)) + + +;;; ------------------ +;;; PROCESSING RESULTS +;;; ------------------ + +(defun remem-double-newline (string) + "looks for a double newline. Used to be used for finding end of + a query result but now use remem-period-on-line-by-itself." + (let* ((dn nil) + (len (- (length string) 1)) + (i len)) + (while (> i 0) + (cond ((not (= (aref string (- i 1)) 10)) + (setq i (- i 2))) + ((= (aref string i) 10) + (setq dn t) + (setq i 0)) + (t + (setq i (- i 1))))) + dn)) + +(defun remem-period-on-line-by-itself (string) + "looks for a period on a line by itself. used to delimit end of query result." + (cond ((string-match "\n\\.\n" string)) + ((string-match "^.\n" string)) + (t nil))) + +(defun remem-split-string (string split-char eat) + "splits a delimited string into a list of fields + eats the delimiter if eat" + (let ((i 1) (last-match 0) (fields nil)) + (while (< i (length string)) + (cond ((eq (elt string i) split-char) + (setq fields (cons (substring string last-match + (if eat i (+ i 1))) fields)) + (setq last-match (+ i 1)))) + (setq i (+ i 1))) + ; the field after the last delimiter + (setq fields (cons (substring string last-match) fields)) + (reverse fields))) ; we cons'ed it up backwards + +(defun remem-split-savant-output (string) + "Splits into lines and pipe-delimited fields" + (delete nil (mapcar '(lambda (s) (if (or (string= s "") (string= s "\n") (string= s ".")) + nil + (remem-split-string s ?\| t))) + (remem-split-string string ?\n t)))) + +;; this should only be used in the buffer containing the scope to be sorted +(defun remem-sort-scope (&optional field scope) + (interactive) + (if (not field) (setq field remem-selection-field)) + (if (not scope) (setq scope (car remem-scopes))) + ;; sort-columns eats text properties, so it's easier to rebuild + ;; the whole thing from the split results + (remem-set-scope-processed scope + (sort (remem-scope-processed scope) + (lambda (a b) (string< (elt a field) (elt b field))))) + (remem-render-processed) + ;; reselect the selected line if any + (cond (remem-selection-line + (goto-char (point-min)) + (cond ((string= "" remem-selection-line-contents) + (remem-selection-line-overlay-update 0)) + ((re-search-forward + (concat "^" remem-selection-line-contents "$") nil t) + (remem-selection-line-overlay-update (count-lines 1 (point)))) + (t + (remem-selection-line-overlay-update 0))) + ;; center the selected line on the screen + (recenter)))) + +(defun remem-process-filter (process string) + ;; first figure out which scope this is for + (save-excursion + (let ((flag t) + ;; this is a list of all scopes in all buffers + (scopes (remem-all-scopes)) + (scope nil)) + (while (and flag scopes) + (cond ((eq process (remem-scope-proc (car scopes))) + (setq scope (car scopes)) + (setq flag nil)) + (t (setq scopes (cdr scopes))))) + (cond ((not flag) ; if it belongs to some scope... + ;; tack the new string on to the rest of the results + (if string (remem-set-scope-raw scope (concat (remem-scope-raw scope) + string)) + (message "Savant returned a nil response to query %s" (remem-scope-query scope))) + ;; if we've got them all, go to work + (cond ((remem-period-on-line-by-itself (remem-scope-raw scope)) + (remem-set-scope-processed + scope + (remem-split-savant-output (remem-scope-raw scope))) + (remem-set-scope-raw scope "") + ;(remem-sort-scope scope) ; we're still in the right buffer + (remem-render-processed) ; when sort works, this is unnecessary + (remem-set-scope-in-progress scope nil) + (force-mode-line-update)))))))) + +;;; -------------- +;;; SELECTION LINE +;;; -------------- + +;; these operate on buffer local variables, +;; so make sure they're in the right buffer + +;;;keymap related +(defvar remem-mode-map nil "Local keymap for remem display buffers.") + +(if remem-mode-map + nil + (let ((map (make-keymap))) + (suppress-keymap map) + (cond (running-xemacs + ;(define-key map [button1up] 'remem-mouse-select) + (define-key map [button2] 'remem-mouse-popup) + (define-key map [button3] 'remem-mouse-popup) + ) + (t + (define-key map [mouse-1] 'remem-mouse-select) + (define-key map [down-mouse-2] 'remem-mouse-popup) + (define-key map [down-mouse-3] 'remem-mouse-popup))) + (setq remem-mode-map map))) + +(defvar remem-output-mode-map nil "Local keymap for remem output buffer (*remem-document-output*).") + +(defun remem-kill-output-buffer () + (kill-buffer remem-document-buffer-name)) + +(if remem-output-mode-map + nil + (let ((map (make-keymap))) + (suppress-keymap map) + (define-key map "1" 'remem-log-rating-1) + (define-key map "2" 'remem-log-rating-2) + (define-key map "3" 'remem-log-rating-3) + (define-key map "4" 'remem-log-rating-4) + (define-key map "5" 'remem-log-rating-5) + (define-key map " " 'scroll-up) + (define-key map "d" 'remem-kill-output-buffer) + (setq remem-output-mode-map map))) + +(defun remem-leave-remem-window () + "Leave the remem-display window if you're there. This is especially for + XEmacs, 'cause I can't figure out how to keep it from putting the cursor + in that buffer. Good sanity check too." + (interactive) + (let ((buf (buffer-name (current-buffer)))) + ;(setq remem-debug-bufname buf) + (cond ((equal buf remem-buffer-name) + ;;;; (print remem-buffer-name (get-buffer "*scratch*")) + (select-window (frame-first-window)))))) + +(defun remem-selection-line-overlay-update (&optional n) + (if n (setq remem-selection-line n)) + (if remem-selection-line ; something selected + (goto-line remem-selection-line) + (let ((start (point))) + (end-of-line) + (cond ((not remem-selection-line-overlay) ; if no overlay, make one + (setq remem-selection-line-overlay + (make-overlay start (point))) + (overlay-put remem-selection-line-overlay 'priority 2) + (overlay-put remem-selection-line-overlay 'face 'remem-hilite)) + (t ; the overlay exists already + (move-overlay remem-selection-line-overlay + start (point)))) + ;; store the contents of the selection for the sort + (setq remem-selection-line-contents + (buffer-substring start (point)))) + (remem-selection-field-overlay-update))) + +; for ease of binding +;(defun remem-overview-selection-next-line (&optional n) +; (interactive) +; (let ((lines (or n 1))) +; (remem-overview-selection-line-overlay-update +; (+ lines remem-overview-selection-line)))) + +;(defun remem-overview-selection-prev-line (&optional n) +; (interactive) +; (let ((lines (or n 1))) +; (remem-overview-selection-line-overlay-update +; (- remem-overview-selection-line lines)))) + +(defun remem-selection-field-overlay-update (&optional n) + (if n (setq remem-selection-field n)) + (cond ((and remem-selection-line remem-selection-field (> n 2)) ; queriable field selected + (goto-line remem-selection-line) + (let ((start (point))) + (end-of-line) + (let ((new-start + (text-property-any start (point) + 'field remem-selection-field))) + (if new-start + (let ((new-end + (next-single-property-change new-start 'field))) + (cond ((not new-end) nil) + ((not remem-selection-field-overlay) + (setq remem-selection-field-overlay + (make-overlay new-start new-end)) + (overlay-put remem-selection-field-overlay + 'priority 1) + (overlay-put remem-selection-field-overlay + 'face 'remem-hilite2);) + (remem-query-on-field (get-text-property new-start 'field) + (get-text-property new-start 'orig-source) 'mouse)) + (t ; already exists + (move-overlay remem-selection-field-overlay + new-start new-end);)))))) + (remem-query-on-field (get-text-property new-start 'field) + (get-text-property new-start 'orig-source) 'mouse)))))))) + ((and remem-selection-line remem-selection-field (= n 0)) ; Selected the lineno + (remem-retrieve-lineno (get-buffer remem-buffer-name) (+ 1 remem-selection-line))))) + + ; for ease of binding +(defun remem-selection-next-field () + (interactive) + (if remem-selection-field-overlay + (let ((new-start + (next-single-property-change + (overlay-start remem-selection-field-overlay) + 'field))) + (cond (new-start + (remem-selection-line-overlay-update + (count-lines 1 (+ new-start 1))) + (remem-selection-field-overlay-update + (get-text-property new-start 'field))))))) + +(defun remem-selection-prev-field () + (interactive) + (if remem-selection-field-overlay + (save-excursion + (let ((new-end + (previous-single-property-change + (overlay-end remem-selection-field-overlay) + 'field))) + (cond (new-end + (remem-selection-line-overlay-update + (count-lines 1 new-end)) + (remem-selection-field-overlay-update + (get-text-property (- new-end 1) 'field)))))))) + +(defun remem-mouse-select (event &optional clickcount) + (interactive "e") + (let* ((moused-window (event-window event)) + (moused-buffer (cond (moused-window + (window-buffer moused-window)) + (t nil)))) + (cond (moused-buffer + (save-excursion + (set-buffer moused-buffer) + (remem-selection-line-overlay-update + (count-lines 1 (event-point event))) + (if (get-text-property (event-point event) 'field) + (remem-selection-field-overlay-update + (get-text-property (event-point event) 'field))) + (remem-leave-remem-window)))))) + +(defun remem-mouse-popup (event &optional clickcount) + (interactive "e") + (let* ((moused-window (event-window event)) + (moused-buffer (cond (moused-window + (window-buffer moused-window)) + (t nil)))) + (cond (moused-buffer + (set-buffer moused-buffer) + (let ((keywords (get-text-property (event-point event) 'keywords)) + (x-y (event-x-y event)) + (nice-list nil)) + (cond (running-xemacs + (setq nice-list (list "Keywords" keywords))) + (t (setq nice-list (list "KEYWORDS" (list "BLAH" (cons keywords nil)))))) + (setcar x-y (+ 20 (car x-y))) + (setcdr x-y (- (cdr x-y) 50)) + (x-popup-menu event nice-list)))))) + + + +;;; -------------- +;;; INITIALIZATION +;;; -------------- + ; start a scope in the current buffer +(defun remem-start-scope (directory number-lines update-time range) + (let ((new-scope (vector + directory + number-lines + update-time + range + nil ; we'll set up the process shortly + nil ; no history (we aren't using history now anyway) + nil ; no query (don't set to "", 'cause that matches with an empty query & we might not do the first one then) + "" ; no processed + nil ; no in-progress + nil ; we can't set the timer until after we've made the scope + "" ; no raw + (current-buffer) + 0 ; we haven't done any queries yet + "" ; we don't know our version number or database info yet + (nth 5 (file-attributes (concat (expand-file-name remem-database-dir) "/" + directory "/doclocs"))) ; Modtime for the index + )) + (savant (start-process "remem" + nil ;; No buffer for this process + (concat (expand-file-name remem-prog-dir) + "/ra-retrieve") + (concat (expand-file-name remem-database-dir) + "/" + directory)))) + (process-kill-without-query savant) + (set-process-filter savant 'remem-process-filter) + (remem-set-scope-proc new-scope savant) +;;; (remem-display-database-info new-scope) ;; Set version number + (if (> update-time 0) + (remem-set-scope-timer new-scope + (run-at-time 1 update-time 'remem-around-point new-scope))) + ; register this scope + (setq remem-scopes (cons new-scope remem-scopes)) + (if (member (current-buffer) remem-buffers) + nil + (setq remem-buffers (cons (current-buffer) remem-buffers))) + new-scope)) + +(defun map-start-scopes (scopes-list) + "maps the add-scope-to-buffer function to the list of scopes" + (let ((current-scope (car scopes-list))) + (cond ((null scopes-list) nil) + (t (remem-add-scope-to-buffer remem-buffer-name + (car current-scope) + (car (cdr current-scope)) + (car (cdr (cdr current-scope))) + (car (cdr (cdr (cdr current-scope))))) + (map-start-scopes (cdr scopes-list)))))) + + +(defun map-scope-percentages (scopes-list) + (let ((current-scope (car scopes-list))) + (cond ((null scopes-list) nil) + (t (setq remem-scope-percentages + (cons + (cons (remem-scope-proc current-scope) + (float (/ (float (remem-scope-number-lines current-scope)) + (float remem-total-scope-lines)))) + remem-scope-percentages)) + + (map-scope-percentages (cdr scopes-list)))))) + +(defun remem-setup-buffer (buffer-name) + (let ((buffer (get-buffer-create buffer-name))) + (save-excursion + (set-buffer buffer) + (make-local-variable 'truncate-lines) + (setq truncate-lines t) + (setq mode-name "Remembrance Agent") + (toggle-read-only t) + (cond ((and running-xemacs (boundp 'scrollbar-width) (boundp 'scrollbar-height) + (set-specifier scrollbar-width 0 (get-buffer "*remem-display*")) + (set-specifier scrollbar-height 0 (get-buffer "*remem-display*"))))) + (setq remem-selection-line 0) + (setq remem-selection-line-contents "") + (setq remem-selection-field 0)))) + + +(defun remem-add-scope-to-buffer (buffer directory number-lines update-time range) + (cond ((buffer-live-p (get-buffer buffer)) + (save-excursion + (set-buffer (get-buffer buffer)) + (remem-start-scope directory number-lines update-time range) + (toggle-read-only -1) + (setq remem-total-scope-lines (+ number-lines remem-total-scope-lines)) + (setq remem-display-buffer-height (if (< remem-total-scope-lines 4) + 4 + (+ 1 remem-total-scope-lines))) + (insert-string "Reading Database...\n") + (toggle-read-only t))))) + + +(defun remem-display-buffer (buffer-name) + (let ((orig-buffer (current-buffer)) + (orig-window (get-buffer-window (current-buffer)))) + (save-excursion + (let ((w (if running-xemacs + (frame-lowest-window) + (window-at 1 (- (frame-height) 3)))) + (buffer (get-buffer-create buffer-name))) + (setq w (split-window w)) ;; w is now the lower of the two + (set-window-buffer w buffer) + (select-window w) + (enlarge-window (- remem-display-buffer-height (window-displayed-height) 1)) + (set-window-dedicated-p w t))) +;; (remem-leave-remem-window) + (select-window orig-window))) + +(defun remem-kill-scope (scope) + (if (remem-scope-timer scope) (remem-cancel-timer (remem-scope-timer scope))) + (cond (remem-global-timer + (remem-cancel-timer remem-global-timer) + (setq remem-global-timer nil))) + (if (eq (process-status (remem-scope-proc scope)) 'run) + (process-send-string (remem-scope-proc scope) "quit\n")) ; ask it to quit + (if (eq (process-status (remem-scope-proc scope)) 'run) + (delete-process (remem-scope-proc scope))) ; if it doesn't... kill it + ; deregister this scope + (cond ((buffer-live-p (remem-scope-buffer scope)) + (save-excursion + (set-buffer (remem-scope-buffer scope)) + (remem-set-scope-in-progress scope nil) + (setq remem-scopes (delete scope remem-scopes)) + (setq remem-total-scope-lines (- remem-total-scope-lines (remem-scope-number-lines scope))) + (setq remem-display-buffer-height (if (< remem-total-scope-lines 4) + 4 + remem-total-scope-lines)) + (if (null remem-scopes) + (setq remem-buffers (delete (remem-scope-buffer scope) remem-buffers))))))) + +(defun remem-map-kill (some-list) + (cond ((null some-list) nil) + (t (remem-kill-scope (car some-list)) + (remem-map-kill (cdr some-list))))) + + +(defun remem-kill-all-scopes () + "kills all the scopes by mapping remem-kill-scope on the list of scopes" + (cond ((buffer-live-p (get-buffer remem-buffer-name)) + (save-excursion + (set-buffer (get-buffer remem-buffer-name)) + (remem-log-checkpoint remem-scopes 'remem-killed) + (remem-map-kill remem-scopes))))) + +(defun remem-kill-buffer (buffer-name) + (let ((buffer (get-buffer buffer-name))) + (cond (buffer + (save-excursion + (kill-buffer buffer)))))) + +(defun remem-change-database (scopename scopenum) + "Change the remembrance agent database to one of the preset indexes" + (interactive + (list (let* ((dirlist (directory-files remem-database-dir nil "[^\.].*")) + (scope-name-list (mapcar '(lambda (filename) + (cons filename filename)) + dirlist)) + (dirprompt (mapconcat 'eval dirlist " ")) + (val)) + (setq val (completing-read + (concat "Change to what database (" dirprompt "): ") + scope-name-list + 'consp t)) + (cdr (assoc val scope-name-list))) + (let ((rsl-len (length remem-scopes-list)) + (val)) + (cond ((> rsl-len 1) + (setq val (string-to-number (read-string (concat "Enter scope number (1-" (int-to-string rsl-len) "): "))))) + (t (setq val 1))) + val))) + (setcar (car (nthcdr (- scopenum 1) remem-scopes-list)) scopename) + (cond ((not (assoc (buffer-name (current-buffer)) remem-buffname-db-alist)) + (let ((new-scopes-list (copy-alist remem-scopes-list))) + (setq remem-buffname-db-alist (append remem-buffname-db-alist + (list (cons (buffer-name (current-buffer)) new-scopes-list))))))) + (remem)) + + +;;; ------------------------------------ +;;; SET VERSION STRING (FOR LOGGING) +;;; ------------------------------------ + +(defun remem-database-info-filter (proc string) + (remem-set-scope-dbinfo remem-working-scope + (concat (remem-scope-dbinfo remem-working-scope) + string))) + +(defun remem-display-database-info (scope) + "Display version info for a given scope" + (let ((proc (remem-scope-proc scope)) + (linestart)) + (setq remem-versionstring-temp "") + (cond ((remem-scope-in-progress scope) + (message "Waiting for previous query to finish... (hit ^G to abort)") + (while (remem-scope-in-progress scope) + (sleep-for .2)))) + ; (setq remem-document-buffer-name + ; (concat "*remem-document-output: " + ; (int-to-string lineno) "*")) + + (remem-set-scope-dbinfo scope "") + (setq remem-working-scope scope) ;; As a message passed to remem-database-info-filter + (save-excursion + (set-process-filter proc 'remem-database-info-filter) + (process-send-string proc "info\n") + + ;; Hang out for a second to let it work it's mojo + (while (< (length (remem-scope-dbinfo scope)) 22) + (sleep-for .05)) + + (if (string-match "info\n" (remem-scope-dbinfo scope)) + (remem-set-scope-dbinfo scope (replace-match "" t t (remem-scope-dbinfo scope)))) + (while (string-match "\n" (remem-scope-dbinfo scope)) + (remem-set-scope-dbinfo scope (replace-match "" t t (remem-scope-dbinfo scope))))))) + +(defun remem-set-database-info-for-scopes (all-scopes) + (cond (all-scopes + (remem-display-database-info (car all-scopes)) + (remem-set-database-info-for-scopes (cdr all-scopes))))) + + +;;; --------- +;;; RETRIEVAL +;;; --------- + + +(defun remem-display-filter (proc string) + (save-excursion + (set-buffer (get-buffer-create remem-document-buffer-name)) + (goto-char (marker-position-nonil (process-mark proc))) + (toggle-read-only -1) + (insert string) + (set-marker (process-mark proc) (point)) + (toggle-read-only t))) + +;(defun remem-display-filter (proc string) +; (save-excursion +; (set-buffer remem-document-buffer-name) +; (goto-char (point-max)) +; (insert string) +; (goto-char (point-max)))) + +;; called by remem-retrieve +(defun remem-display-line-copy (scope docnum &optional lineno) + "Display the output for the relevant document displayed in the given line" + (let ((proc (remem-scope-proc scope))) + (cond ((remem-scope-in-progress scope) + (message "Waiting for previous query to finish... (hit ^G to abort)") + (while (remem-scope-in-progress scope) + (sleep-for .2)))) + (message "Retrieving docnum %d" docnum) + (cond ((or (not docnum) (< docnum 1)) + (message "Improper docnum.")) + ((not scope) + (message "Improper scope.")) + (t +; (setq remem-document-buffer-name +; (concat "*remem-document-output: " +; (int-to-string lineno) "*")) + (select-window (frame-first-window)) +; (cond ((get-buffer remem-document-buffer-name) ;; Just to clear it out +; (kill-buffer remem-document-buffer-name))) + (switch-to-buffer remem-document-buffer-name) + (toggle-read-only -1) + (erase-buffer) + (toggle-read-only t) + + (set-marker (process-mark proc) (point) + (get-buffer remem-document-buffer-name)) + (set-process-filter proc 'remem-display-filter) + (process-send-string proc + (concat "retrieve " + (int-to-string docnum) + "\n")) + ;; loop until ready + (goto-char (point-min)) + (while (< (marker-position-nonil (process-mark proc)) 22) + (sleep-for .05)) + + (end-of-line) + (setq doc-pos (string-to-int (buffer-substring (point-min) (point)))) + (forward-char) + (toggle-read-only -1) + (delete-region (point-min) (point)) ;; Delete the character offset + + (end-of-line) + (setq remem-last-followed-doctype (buffer-substring (point-min) (point))) + (forward-char) + (delete-region (point-min) (point)) ;; Delete the character offset + + (while (< (marker-position-nonil (process-mark proc)) doc-pos) + (sleep-for .001)) + (goto-char doc-pos) + (beginning-of-line) + (recenter 0) + (setq remem-last-followed-docnum docnum) + (message "Type number 1-5 to rate document: 1 = [Bad suggestion], 5 = [Great suggestion]") + (use-local-map remem-output-mode-map) + (while (let ((old-pos (marker-position-nonil (process-mark proc)))) ;; Wait till it stops moving + (sleep-for .05) + (< old-pos (marker-position-nonil (process-mark proc))))) + (run-hooks 'remem-gotdoc-hook) + (toggle-read-only t))))) + + +;; called by remem-retrieve +(defun remem-display-line-original (scope docnum &optional lineno) + "Load the file for the relevant document displayed in the given line" + (let ((proc (remem-scope-proc scope))) + (cond ((remem-scope-in-progress scope) + (message "Waiting for previous query to finish... (hit ^G to abort)") + (while (remem-scope-in-progress scope) + (sleep-for .2)))) + (message "Retrieving docnum %d" docnum) + (cond ((or (not docnum) (< docnum 1)) + (message "Improper docnum.")) + ((not scope) + (message "Improper scope.")) + (t +; (setq remem-document-buffer-name +; (concat "*remem-document-output: " +; (int-to-string lineno) "*")) + (select-window (frame-first-window)) +; (cond ((get-buffer remem-document-buffer-name) ;; Just to clear it out +; (kill-buffer remem-document-buffer-name))) + (switch-to-buffer remem-document-buffer-name) + (toggle-read-only -1) + (erase-buffer) + (toggle-read-only t) + + (set-marker (process-mark proc) (point) + (get-buffer remem-document-buffer-name)) + (set-process-filter proc 'remem-display-filter) + (process-send-string proc + (concat "loc-retrieve " + (int-to-string docnum) + "\n")) + (goto-char (point-min)) + (while (< (marker-position-nonil (process-mark proc)) 22) + (sleep-for .05)) + ; loop until ready + (end-of-line) + (setq doc-pos-start (string-to-int (buffer-substring (point-min) (point)))) + (forward-char) + (toggle-read-only -1) + (delete-region (point-min) (point)) ; Get rid of first line -- the doc start + + (end-of-line) + (setq doc-pos-end (string-to-int (buffer-substring (point-min) (point)))) + (forward-char) + (delete-region (point-min) (point)) ; Get rid of second line -- the doc end + + (end-of-line) + (setq doc-loc (buffer-substring (point-min) (point))) + (forward-char) + (delete-region (point-min) (point)) ; Get rid of third line -- the doc loc + + (end-of-line) + (setq remem-last-followed-doctype (buffer-substring (point-min) (point))) + + (print (concat "doc-pos-start: " (int-to-string doc-pos-start)) (get-buffer "*remem-log*")) + (print (concat "doc-pos-end: " (int-to-string doc-pos-end)) (get-buffer "*remem-log*")) + (print (concat "doc-loc: " doc-loc) (get-buffer "*remem-log*")) + (bury-buffer remem-document-buffer-name) + (find-file doc-loc) + (if (string= major-mode "rmail-mode") + ; in rmail mode, use the variable pointing to start of message + (remem-rmail-goto-char (+ 2 doc-pos-start)) ; add two to skip the ^_^L delimiter + (goto-char doc-pos-start)) + (beginning-of-line) + (recenter 0) + (setq remem-last-followed-docnum docnum) + (message (concat "Rate document: " remem-command-prefix "r , where is from 1 [Bad suggestion] to 5 [Great suggestion]")) + (run-hooks 'remem-gotdoc-hook) + (toggle-read-only t))))) + +;;; retrieve an original or a copy +;;; with no arguments, tries to retrieve what's at point +(defun remem-retrieve (&optional scop docn) + (interactive) + (save-excursion + (let* ((scope (or scop ; pre-specified + (get-text-property (point) 'scope) ; we're in one + (and remem-buffers ; go to the first one in the list (default) + (buffer-live-p (car remem-buffers)) + (set-buffer (car remem-buffers)) + (get-text-property (point) 'scope)))) + (docnum (or docn + (get-text-property (point) 'docnum))) ; note, we may be in the default buffer + (relevance (get-text-property (point) 'relevance)) + (lineno (count-lines 1 (point)))) + (cond (scope + (if remem-load-original-suggestion + (remem-display-line-original scope docnum lineno) + (remem-display-line-copy scope docnum lineno)))))) + (remem-leave-remem-window)) + + +;;; retrieve from a given line +(defun remem-retrieve-lineno (buffer lineno) + (cond ((buffer-live-p buffer) + (save-excursion + (set-buffer buffer) + (goto-line lineno) + (let ((scope (get-text-property (point) 'scope)) + (docnum (get-text-property (point) 'docnum)) + (sims-breakdown (get-text-property (point) 'sims-breakdown)) + (relevance (get-text-property (point) 'relevance))) + (cond ((and scope docnum relevance lineno) + (remem-log-checkpoint remem-scopes 'retrieval) + (remem-log-suggestion-followed scope docnum relevance lineno sims-breakdown) + (remem-retrieve scope docnum)))))))) + +(defun remem-display-line-1 (&optional args) + (interactive "P") + (remem-retrieve-lineno (get-buffer remem-buffer-name) 1)) + +(defun remem-display-line-2 (&optional args) + (interactive "P") + (remem-retrieve-lineno (get-buffer remem-buffer-name) 2)) + +(defun remem-display-line-3 (&optional args) + (interactive "P") + (remem-retrieve-lineno (get-buffer remem-buffer-name) 3)) + +(defun remem-display-line-4 (&optional args) + (interactive "P") + (remem-retrieve-lineno (get-buffer remem-buffer-name) 4)) + +(defun remem-display-line-5 (&optional args) + (interactive "P") + (remem-retrieve-lineno (get-buffer remem-buffer-name) 5)) + +(defun remem-display-line-6 (&optional args) + (interactive "P") + (remem-retrieve-lineno (get-buffer remem-buffer-name) 6)) + +(defun remem-display-line-7 (&optional args) + (interactive "P") + (remem-retrieve-lineno (get-buffer remem-buffer-name) 7)) + +(defun remem-display-line-8 (&optional args) + (interactive "P") + (remem-retrieve-lineno (get-buffer remem-buffer-name) 8)) + +(defun remem-display-line-9 (&optional args) + (interactive "P") + (remem-retrieve-lineno (get-buffer remem-buffer-name) 9)) + +(defun remem-display-other (lineno) + (interactive "nLine Number:") + (remem-retrieve-lineno (get-buffer remem-buffer-name) lineno)) + + + +(defun remem-log-rating-1 (&optional args) + (interactive "P") + (remem-log-rating 1)) + +(defun remem-log-rating-2 (&optional args) + (interactive "P") + (remem-log-rating 2)) + +(defun remem-log-rating-3 (&optional args) + (interactive "P") + (remem-log-rating 3)) + +(defun remem-log-rating-4 (&optional args) + (interactive "P") + (remem-log-rating 4)) + +(defun remem-log-rating-5 (&optional args) + (interactive "P") + (remem-log-rating 5)) + + + +;;;;Starting up and killing the front end +;;;;basic initialization stuff + +(defun remem-fix-window-loss () + "Makes sure that Remem dies when the buffer is gone, and respawns when window is no longer visible. This is because of that stupid resize-windows bug" + (unless (window-live-p (get-buffer-window remem-buffer-name t)) + (cond ((get-buffer remem-buffer-name) ;; if the buffer exists, respawn the window + (remem-display-buffer remem-buffer-name)) + (t + (remem-cancel-timer remem-global-timer) + (kill-remem))))) + +(defun remem-restart-on-outdated-index (scope) + "If any of the index files we're looking at are newer than they were when we started up their processes, restart ra-retrieve." + (let ((new-modtime (nth 5 (file-attributes (concat (expand-file-name remem-database-dir) "/" + (remem-scope-directory scope) + "/doclocs")))) + (old-modtime (remem-scope-dbmodtime scope))) + (setq remem-debug-old-modtime old-modtime) + (setq remem-debug-new-modtime new-modtime) + (cond ((not (equal new-modtime old-modtime)) + (remem) + (message "Remem index files have been updated... restarting.") + t) + (t nil)))) + +(defun start-remem () + "starts the processes. essentially a bundling function" + (save-excursion + (cond (remem-display-running + (message "Remembrance Agent already running")) + (t + (cond ((not (file-exists-p (concat (expand-file-name remem-prog-dir) + "/ra-retrieve"))) + (message (concat "Cannot find program file: " + (expand-file-name remem-prog-dir) + "/ra-retrieve"))) + ((not (file-exists-p (concat (expand-file-name remem-database-dir) "/"))) + (message (concat "Cannot find index directory: " + (expand-file-name remem-database-dir)))) + ((let ((notfound nil)) + (mapcar + '(lambda (scopeinfo) + (cond ((not (file-exists-p (concat (expand-file-name remem-database-dir) "/" + (car scopeinfo)))) + (message (concat "Cannot find index-file subdirectory: " + (expand-file-name remem-database-dir) "/" + (car scopeinfo))) + (setq notfound t)))) + remem-scopes-list) + notfound)) + (t + (setq remem-display-running t) + (remem-setup-buffer remem-buffer-name) + (map-start-scopes (reverse remem-scopes-list)) + (save-excursion + (set-buffer (get-buffer-create remem-buffer-name)) + (map-scope-percentages remem-scopes) + + ;; This probably won't log anyway, since numqueries should == 0 + (remem-log-checkpoint remem-scopes 'remem-started) + + (remem-set-database-info-for-scopes remem-scopes) + (remem-log-dbinfo remem-scopes) + + (cond (running-xemacs + (make-local-hook 'mouse-track-click-hook) + (setq mouse-track-click-hook 'remem-mouse-select))) + (use-local-map remem-mode-map)) + (remem-display-buffer remem-buffer-name) + (setq remem-hide-display nil) + (setq remem-global-timer + (run-at-time 5 3 'remem-fix-window-loss)) + + ;;to make the display stick! + +;;; I don't like resetting C-xo, so I won't +;;; (setq remem-old-C-xo (global-key-binding "\C-xo")) +;;; (global-set-key "\C-xo" 'remem-other-window) + +;;; But I'll make an exception for C-x1 'cause it's so useful + (setq remem-old-C-x1 (global-key-binding "\C-x1")) + (global-set-key "\C-x1" 'remem-delete-other-windows) + + (global-set-key (concat remem-command-prefix "v") 'remem-query-now) + (global-set-key (concat remem-command-prefix "n") 'remem-display-other) + (global-set-key (concat remem-command-prefix "f") 'remem-grab-query) + (global-set-key (concat remem-command-prefix "d") 'remem-change-database) + (global-set-key (concat remem-command-prefix "q") 'remem-create-query-page) + + ;;;set the key bindings for the retrieval + (global-set-key (concat remem-command-prefix "1") 'remem-display-line-1) + (global-set-key (concat remem-command-prefix "2") 'remem-display-line-2) + (global-set-key (concat remem-command-prefix "3") 'remem-display-line-3) + (global-set-key (concat remem-command-prefix "4") 'remem-display-line-4) + (global-set-key (concat remem-command-prefix "5") 'remem-display-line-5) + (global-set-key (concat remem-command-prefix "6") 'remem-display-line-6) + (global-set-key (concat remem-command-prefix "7") 'remem-display-line-7) + (global-set-key (concat remem-command-prefix "8") 'remem-display-line-8) + (global-set-key (concat remem-command-prefix "9") 'remem-display-line-9) + + (cond (remem-non-r-number-keys + (global-set-key "\C-c1" 'remem-display-line-1) + (global-set-key "\C-c2" 'remem-display-line-2) + (global-set-key "\C-c3" 'remem-display-line-3) + (global-set-key "\C-c4" 'remem-display-line-4) + (global-set-key "\C-c5" 'remem-display-line-5) + (global-set-key "\C-c6" 'remem-display-line-6) + (global-set-key "\C-c7" 'remem-display-line-7) + (global-set-key "\C-c8" 'remem-display-line-8) + (global-set-key "\C-c9" 'remem-display-line-9))) + + (global-unset-key (concat remem-command-prefix "r")) ; Just to be safe + (global-set-key (concat remem-command-prefix "r1") 'remem-log-rating-1) + (global-set-key (concat remem-command-prefix "r2") 'remem-log-rating-2) + (global-set-key (concat remem-command-prefix "r3") 'remem-log-rating-3) + (global-set-key (concat remem-command-prefix "r4") 'remem-log-rating-4) + (global-set-key (concat remem-command-prefix "r5") 'remem-log-rating-5) + (run-hooks 'remem-start-hook) + (message "Remembrance Agent started"))))))) + + +(defun kill-remem () + "kills all the processes, closes the remem-buffer" + (save-excursion + (cond (remem-display-running + (setq remem-display-running nil) + (remem-kill-all-scopes) + (setq remem-display-buffer-height 0) + (setq remem-total-scope-lines 0) + (if (or remem-hide-display + (eq nil (get-buffer-window remem-buffer-name t))) + nil + (remem-delete-window remem-buffer-name)) + (remem-kill-buffer remem-buffer-name) ;;to make the display stick! + (global-set-key "\C-x1" remem-old-C-x1) +;;; (global-set-key "\C-xo" remem-old-C-xo) + + ;;;unset the key bindings + + (global-unset-key (concat remem-command-prefix "v")) + (global-unset-key (concat remem-command-prefix "n")) + (global-unset-key (concat remem-command-prefix "f")) + (global-unset-key (concat remem-command-prefix "d")) + (global-unset-key (concat remem-command-prefix "q")) + (global-unset-key (concat remem-command-prefix "f")) + (global-unset-key (concat remem-command-prefix "v")) + (global-unset-key (concat remem-command-prefix "1")) + (global-unset-key (concat remem-command-prefix "2")) + (global-unset-key (concat remem-command-prefix "3")) + (global-unset-key (concat remem-command-prefix "4")) + (global-unset-key (concat remem-command-prefix "5")) + (global-unset-key (concat remem-command-prefix "6")) + (global-unset-key (concat remem-command-prefix "7")) + (global-unset-key (concat remem-command-prefix "8")) + (global-unset-key (concat remem-command-prefix "9")) + (cond (remem-non-r-number-keys + (global-unset-key "\C-c1") + (global-unset-key "\C-c2") + (global-unset-key "\C-c3") + (global-unset-key "\C-c4") + (global-unset-key "\C-c5") + (global-unset-key "\C-c6") + (global-unset-key "\C-c7") + (global-unset-key "\C-c8") + (global-unset-key "\C-c9"))) + + (run-hooks 'remem-start-hook) + (message "Remembrance Agent stopped"))))) + +(defun remem-hide-display () + (save-excursion + (cond (remem-display-running + (cond (remem-hide-display + (message "Remembrance display already hidden")) + (t (setq remem-hide-display t) + (select-window (get-buffer-window (get-buffer remem-buffer-name))) + (delete-window)))) + (t (message "Remembrance Agent not running"))))) + + +(defun remem-show-display () + (save-excursion + (cond (remem-display-running + (cond (remem-hide-display + (remem-display-buffer remem-buffer-name) + (setq remem-hide-display nil)) + (t (message "Remembrance display not hidden")))) + (t (message "Remembrance Agent not running"))))) + +(defun remem-toggle () + (interactive) + (let ((w (selected-window))) + (save-excursion + (cond (remem-display-running + (kill-remem)) + ((not remem-display-running) + (start-remem)))) + (select-window w))) + +(defun remem () + "Start the remembrance agent. If already running, kill it and restart it." + (interactive) + (let ((w (selected-window))) + (save-excursion + (cond (remem-display-running + (kill-remem) + (sleep-for 1) + (start-remem)) + ((not remem-display-running) + (start-remem)))) + (select-window w))) + + + +;;; ------------------- +;;; ALTERNATE FUNCTIONS +;;; ------------------- + +(defun remem-other-window (&rest args) + "Replacement for the C-xo key binding that takes the cursor + remem-display window" + (interactive) + (let ((sw (selected-window)) + (rw (get-buffer-window remem-buffer-name t)) + (nw (next-window (selected-window) 1)) + w) + (cond ((eq nw rw) + (other-window 2)) + (t + (other-window 1))) + )) + +(defun remem-delete-window (buffer-name) + (let ((buffer (get-buffer buffer-name))) + (save-excursion + (select-window (get-buffer-window buffer t)) + (delete-window)))) + +(defun remem-delete-other-windows (&rest args) + "Replacement for delete-other-windows that won't delete the +*remem-buffer* window." + (interactive) + (let ((sw (selected-window)) + (rw (get-buffer-window remem-buffer-name)) + (nw (next-window (selected-window) 1)) + w) + (cond (rw + (if (eq sw rw) + (progn (other-window 1) + (setq sw (selected-window)) + (setq nw (next-window (selected-window) 1)))) + (while (not (eq nw sw)) + (setq w nw) + (setq nw (next-window nw 1)) + (or (eq w rw) + (eq w sw) + (delete-window w))) + (message (concat "Use " remem-command-prefix "t to quit the Remembrance Agent"))) + (t (delete-other-windows))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Specialty functions for handling wierd modes +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun remem-rmail-what-message-at-point (n) + (let ((where n) + (low 1) + (high rmail-total-messages) + (mid (/ rmail-total-messages 2))) + (while (> (- high low) 1) + (if (>= where (rmail-msgbeg mid)) + (setq low mid) + (setq high mid)) + (setq mid (+ low (/ (- high low) 2)))) + (if (>= where (rmail-msgbeg high)) high low))) + +(defun remem-rmail-goto-char (n) + "Jump to a given global char number in an rmail message" + (interactive "nChar: ") + (rmail-show-message (remem-rmail-what-message-at-point n)) + (goto-char n)) + + +;;;;;;;;;;;;;;;;;;; +;; Logging +;; +;; Events that are logged (for each scope): +;; Following a suggestion +;; Docnum, relevance, scopename, lineno within scope, numlines shown, +;; whether was automatic / mouse-query / remem-query +;; kill-remem, start-remem, following a suggestion, resize, every ~500 queries since last log +;; Num queries done, update period for scopes, scopenames, numlines shown in scope, which event triggered +;; Rating a suggestion +;; Docnum, rating, rated document type, major-mode for this query +;; Making a mouse-query +;; Fieldno +;; Making a remem-query +;; just the event +;;;;;;;;;;;;;;;;;;; + +(defun remem-log-string (string) + "Append string to the logfile" + (cond (remem-log-p + (write-region (concat (current-time-string) " -- " string) nil remem-logfile t 1)))) + +(defun remem-log-suggestion-followed (scope docnum relevance-and-line lineno sims-breakdown) + (let ((numlines (remem-scope-number-lines scope)) + (scopename (remem-scope-directory scope)) + (relevance (substring relevance-and-line 4 8)) + (scopeline (string-to-number (substring relevance-and-line 0 3)))) + (remem-log-string (format "Followed: %d, %s, %s, %d, %d, %s, %s\n" + docnum relevance scopename scopeline numlines + remem-kind-of-query sims-breakdown)))) + +(defun remem-log-checkpoint-scope (scope why-check) + (let ((num-queries (remem-scope-querycounter scope)) + (update-period (remem-scope-update-time scope)) + (scopename (remem-scope-directory scope)) + (numlines (remem-scope-number-lines scope))) + +;;; No cond, so it logs events even when no checkpoint is needed. +; (cond ((> num-queries 0) + (remem-log-string (format "Checkpoint: %d, %s, %d, %d, %s\n" + num-queries scopename update-period numlines why-check)) + (remem-set-scope-querycounter scope 0))) +;)) + +(defun remem-log-checkpoint (scopes-left why-check) + (cond (scopes-left + (remem-log-checkpoint-scope (car scopes-left) why-check) + (remem-log-checkpoint (cdr scopes-left) why-check)))) + +(defun remem-log-dbinfo-scope (scope) + (let ((scopename (remem-scope-directory scope)) + (dbinfo (remem-scope-dbinfo scope))) + (remem-log-string (format "%s, %s\n" dbinfo scopename)))) + +(defun remem-log-dbinfo (scopes-left) + (cond (scopes-left + (remem-log-dbinfo-scope (car scopes-left)) + (remem-log-dbinfo (cdr scopes-left))))) + +(defun remem-log-rating (rating) + (cond (remem-last-followed-docnum + (remem-log-string (format "Rating: %d, %d, %s, %s\n" remem-last-followed-docnum rating + remem-last-followed-doctype remem-last-query-mode)) + (cond ((eq rating 1) + (message (format "Document rated: 1 [Bad suggestion]"))) + ((eq rating 2) + (message (format "Document rated: 2 [So-so suggestion]"))) + ((eq rating 3) + (message (format "Document rated: 3 [OK suggestion]"))) + ((eq rating 4) + (message (format "Document rated: 4 [Good suggestion]"))) + ((eq rating 5) + (message (format "Document rated: 5 [Great suggestion]"))))) + (t + (message (format "No document to rate or document already rated" rating)))) + (setq remem-last-followed-docnum nil) + (setq remem-last-followed-doctype nil) + (setq remem-last-query-mode nil)) + + +;(defun remem-mail-hook () +; (save-excursion +; (goto-char (point-min)) +; (setq remem-mail-msg-start (search-forward "\n\n")))) + +;(add-hook 'rmail-show-message-hook 'remem-mail-hook) + +'remem-loaded --- remem-2.12.orig/other/elc.32011/script +++ remem-2.12/other/elc.32011/script @@ -0,0 +1 @@ +(setq load-path (cons nil load-path)) --- remem-2.12.orig/template/parsedoc.c +++ remem-2.12/template/parsedoc.c @@ -165,7 +165,7 @@ List_of_Filenames *get_files_from_directory(char *sourcename, char **excludees) { int i, isurl=0; - char filename[256], *shortname; + char *shortname; struct stat buf; DIR *directory; savant_direct *entry; @@ -176,8 +176,6 @@ list_of_filenames = (List_of_Filenames *) malloc (sizeof(List_of_Filenames)); list_of_filenames->next = NULL; - filename[sizeof(filename)-1] = '\0'; - if ((strncmp(sourcename, "http://", 7) == 0) || (strncmp(sourcename, "ftp://", 6)==0)) { /* It's a URL, so it it's not excluded then just return the URL itself */ isurl=1; @@ -250,17 +248,24 @@ while (entry != NULL) { shortname = entry->d_name; if(strcmp(shortname,".") && strcmp(shortname,"..")) { - strncpy(filename, sourcename, sizeof(filename)-2); - filename[sizeof(filename)-1] = '\0'; - if (filename[strlen(filename)-1] != '/') + char * filename; + size_t sourcelen; + + sourcelen = strlen(sourcename); + filename = (char *) malloc (sizeof(char) * (sourcelen + strlen(shortname) + 2)); + strcpy(filename, sourcename); + + if (filename[sourcelen-1] != '/') strcat(filename, "/"); - strncat(filename, shortname, sizeof(filename)-1); + strcat(filename, shortname); /* find the end of the chain of filenames, and recursively append */ for (current_filename = list_of_filenames; (current_filename->next != NULL); current_filename = current_filename->next); current_filename->next = get_files_from_directory (filename, excludees); + + free(filename); } entry = readdir(directory); } --- remem-2.12.orig/debian/dirs +++ remem-2.12/debian/dirs @@ -0,0 +1,7 @@ +etc +etc/emacs/site-start.d +usr/bin +usr/share/doc/remembrance-agent +usr/share/man/man1 +usr/share/emacs/site-lisp +var/lib/emacs/remembrance --- remem-2.12.orig/debian/prerm +++ remem-2.12/debian/prerm @@ -0,0 +1,27 @@ +#!/bin/sh + +PATH=/bin:/usr/bin +package=remembrance-agent +database=/var/lib/emacs/remembrance +program=/usr/bin/ra-index +config_file=/etc/savantrc + +case "$1" in + remove) +# Per policy call emacs-remove + if [ -x /usr/lib/emacsen-common/emacs-package-remove ]; then + /usr/lib/emacsen-common/emacs-package-remove ${package} + fi + ;; + deconfigure|upgrade|failed-upgrade) +# Do nothing + ;; + *) + echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 0 + ;; +esac + +#DEBHELPER# + +exit 0 --- remem-2.12.orig/debian/docs +++ remem-2.12/debian/docs @@ -0,0 +1,3 @@ +README +debian/README.Debian +debian/TODO.Debian --- remem-2.12.orig/debian/postinst +++ remem-2.12/debian/postinst @@ -0,0 +1,87 @@ +#!/bin/bash -e + +. /usr/share/debconf/confmodule +test $DEBIAN_SCRIPT_DEBUG && set -v -x + +# Create a database from directories given by user +# the databases are made at a give directory (should be customizable) +# TODO: +# Use scope to modify the /etc/emacsxx/site-start.d/50remembrance... +# file so they are automatically loaded on startup depending on +# scope, maybe do a sed -e to change 'scope' into the scope given. + +PATH=/bin:/usr/bin +package=remembrance-agent +database=/var/lib/emacs/remembrance +databasesed=`echo $database | sed -e 's/\//\\\\\//g'` +scope=memory +program=/usr/bin/ra-index +config_file=/etc/savantrc +emacs_el_start=/etc/emacs/site-start.d/50remembrance-agent.el +tmp_file=`/bin/tempfile` +#tmp_file=/tmp/${package}.el + +# First, per policy call emacs-install +/usr/lib/emacsen-common/emacs-package-install ${package} + + +user_input () { +# User input +db_get remembrance-agent/index-dir || true; dirs="$RET" +db_get remembrance-agent/exclude-dir || true; edirs="$RET" +# Should check here that the user has given only three.. +ONCE=TRUE +} + +case "$1" in + install) + ;; + upgrade) + ;; + configure*) + + # First time around call user input + user_input + +# Now build the database +if [ ! -z "${dirs}" ]; then + echo "Building database in ${database} using ${program}." + echo "Including directories under '${dirs}' " + echo "and excluding '${edirs}'." + echo "Note: If the file structure is large this will take quite some time" + echo "and require an important amount of memory and harddisk." +# if [ ! -d ${database}/${scope} ]; then \ +# mkdir -p ${database}/${scope}; \ +# fi; + # For Remembrance 2.0 (no scopes) + if [ ! -d "${database}/" ]; then \ + mkdir -p ${database}/; \ + fi; + ${program} -c ${config_file} ${database}/ ${dirs} -e ${edirs} + echo -e "\nDatabase FINISHED." + echo -e "\nModifying ${emacs_el_start}" + perl -pe "s/~\/RA-indexes\//$databasesed/" ${emacs_el_start} >${tmp_file} + cp ${tmp_file} ${emacs_el_start} + +# NOT USED (might, in the future) +# CHANGE scope in the .el file: +# sed -e s/\$SCOPES/${scope}/ ${emacs_el_start} >${tmp_file} +# Maybe we should ask the user before doing this +# cp ${tmp_file} ${emacs_el_start} + + rm ${tmp_file} +else + echo -e "\nNOT building the database since no directories were specified." +fi + ;; + abort-upgrade) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +#DEBHELPER# + +exit 0 --- remem-2.12.orig/debian/rules +++ remem-2.12/debian/rules @@ -0,0 +1,84 @@ +#!/usr/bin/make -f + +package=remembrance-agent + +build: + dh_testdir + ./configure --mandir='$${prefix}/share/man' --prefix='/usr' \ + --with-lispdir='/usr/share/emacs/site-lisp' + make + touch build + +clean: + dh_testdir + -rm -f build + [ ! -f Makefile ] || make distclean + -rm -f config.cache config.log config.status + -rm -rf *~ debian/${package} debian/*~ debian/files* + debconf-updatepo + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + make install DESTDIR=`pwd`/debian/${package} + -rm -rf debian/${package}/usr/lib +# What happended to savantrc and vector.doc in the other/ subdir +# in the 2.x releases? +# install -m 644 REVISION-HISTORY debian/${package}/usr/share/doc/$(package)/changelog +# install -m 644 other/savantrc debian/${package}/etc/savantrc + install -m 644 debian/${package}.el \ + debian/${package}/etc/emacs/site-start.d/50${package}.el +# Move program files: +# main/ra-index main/ra-retrieve other/remem-display-mode.el other/remem-display-mode.elc + + + +binary-indep: checkroot install + dh_testdir +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot install + dh_testdir + dh_testroot + dh_installdebconf + dh_installdocs + dh_installmenu + dh_installchangelogs + dh_installman other/ra-index.1 other/ra-retrieve.1 +# No longer useful, should write a manpage +# dh_undocumented ra-merge.1 + dh_installdeb + dh_strip + dh_compress + dh_fixperms + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +define checkdir + test -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: build clean binary binary-arch binary-indep clean checkroot install + +#Local variables: +#mode: makefile +#End: + --- remem-2.12.orig/debian/templates +++ remem-2.12/debian/templates @@ -0,0 +1,19 @@ +Template: remembrance-agent/index-dir +Type: string +_Description: Directories to index: + In order to work, the Remembrance Agent needs to build a database of + documents of interest. Please introduce the directories (and/or files) to + be indexed separated by spaces, afterwards the database will be made. If + you do not select any directories (default) the database will not be made. + For more info look at /usr/share/doc/remembrance-agent. + +Template: remembrance-agent/exclude-dir +Type: string +_Description: Directories to exclude from the index: + You can exclude sensitive directories from being indexed by ra-index if + you want. Only three directories can be given here. NOTE: If you are + installing on a multiuser environment where each user may want to have + their personal index, DO NOT index user directories (that is /home) as + root since there are no mechanisms to prevent users from invading other's + privacy. Instead, all users can run 'ra-index' in order to build their own + databases. --- remem-2.12.orig/debian/postrm +++ remem-2.12/debian/postrm @@ -0,0 +1,32 @@ +#! /bin/sh +# postrm script for remem +# +# see: dh_installdeb(1) + +set -e + +PATH=/bin:/usr/bin +package=remembrance-agent +database=/var/lib/emacs/remembrance +program=/usr/bin/ra-index +config_file=/etc/savantrc + +case "$1" in + purge) + if [ -d ${database} ] + then + rm -rf ${database} + fi + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) +# Do nothing + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 +esac + +#DEBHELPER# + +exit 0 --- remem-2.12.orig/debian/copyright +++ remem-2.12/debian/copyright @@ -0,0 +1,58 @@ +This package was debianized by Javier Fernandez-Sanguino Peña on +Sun, 6 Sep 1998 06:22:25 +0200 + +It was downloaded from +http://www.remem.org + +Previous locations include: +http://www.media.mit.edu/~rhodes/RA/ +http://xenia.media.mit.edu/~rhodes/RA/ and +http://lcs.www.media.mit.edu/people/rhodes/RA/ + +Upstream bug reports can be sent to ra-bugs@remem.org + + +Authorship: +The author of the Remembrance Agent is +Jan-Christian Nelson and Bradley Rhodes (was +previosuly ), MIT Media Lab + +Copyright: + + All code included in versions up to and including 2.09: + Copyright (C) 2001 Massachusetts Institute of Technology. + + All modifications subsequent to version 2.09 are copyright Bradley + Rhodes or their respective authors. + + Developed by Bradley Rhodes at the Media Laboratory, MIT, Cambridge, + Massachusetts, with support from British Telecom and Merrill Lynch. + + 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. For commercial licensing under other + terms, please consult the MIT Technology Licensing Office. + + This program may be subject to the following US and/or foreign + patents (pending): "Method and Apparatus for Automated, + Context-Dependent Retrieval of Information," MIT Case No. 7870TS. If + any of these patents are granted, royalty-free license to use this + and derivative programs under the GNU General Public License are + hereby granted. + + 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 St, Fifth Floor, Boston, MA 02110-1301 + USA + + You have a copy of the GPL license in your Debian system in + /usr/share/common-licenses/GPL + + +The 'parsedate' savutil is Copyright (c) 1984 by Richard B. Wales --- remem-2.12.orig/debian/README.Debian +++ remem-2.12/debian/README.Debian @@ -0,0 +1,33 @@ + +This package is provided as given by the upstream authors, only +slight modifications to include it properly in a Debian system. +This modifications include changes on installation so that +the index database can be build on installation for all users. + +If you want to use per-user database installation you should not +use this (leave the directory empty). This will leave the definition as: + + (setq remem-database-dir "~/RA-indexes/") + +Users will have to run 'ra-index' in their (user-controlled) directories so +as to generate at "~/RA-indexes/" their own databases and index. + +Of course, users can override this settings in their .emacs files. +Notice that there are other variables which might make sense for users +to configure themselves, such as: + +;; (setq remem-display-scope-databases nil nil nil) +;; (setq remem-scopes-list '(("mail" 6 5 500) ("notes" 2 5 500))) + + +TODO: +1- modify source to allow system-wide configuration by default, +before reading HOME , set savantr in /etc +(modify template/config.c) +2- check if it works with other versions of emacs other than 19 +3- add manpage (ask upstream?) + +---- +Javier Fernndez-Sanguino Pea +Sat, 23 Aug 2003 14:45:51 +0200 + --- remem-2.12.orig/debian/control +++ remem-2.12/debian/control @@ -0,0 +1,23 @@ +Source: remem +Section: misc +Priority: optional +Maintainer: Javier Fernandez-Sanguino Pen~a +Build-Depends: debhelper (>= 4.1.16), libpcre3-dev, flex, po-debconf +Standards-Version: 3.7.2 +Homepage: http://www.remem.org + +Package: remembrance-agent +Architecture: any +Depends: emacs21 | emacsen, debconf | debconf-2.0, ${shlibs:Depends} +Description: Emacs mode to help find relevant texts + The Remembrance Agent is one of the projects being developed by the MIT + Media Lab's software agents group. Given a collection of the user's + accumulated email, Usenet news articles, papers, saved HTML files and other + text notes, it attempts to find those documents which are most relevant to + the user's current context. That is, it searches this collection of text + for the documents which bear the highest word-for-word similarity to the + text the user is currently editing, in the hope that they will also bear + high conceptual similarity and thus be useful to the user's current work. + These suggestions are continuously displayed in a small buffer at the + bottom of the user's emacs buffer. If a suggestion looks useful, the full + text can be retrieved with a single command. --- remem-2.12.orig/debian/remembrance-agent.el +++ remem-2.12/debian/remembrance-agent.el @@ -0,0 +1,39 @@ + +(if (not (file-exists-p "/usr/share/emacs/site-lisp/remem.elc")) + (message "Package remembrance-agent removed but not purged. Skipping setup.") + (autoload 'remem "remem" "Remembrance Agent" t) + +;; *********************** NOTE ******************** +;; This is automatically managed by dpkg-reconfigure +;; and configured on installation by the postinst script. +;; If you change it and reconfigure the package it might +;; be overwritten. + (setq remem-database-dir "~/RA-indexes/") +;; *********************** NOTE ******************** + +;; Which scopes to show? +;; Currently set to nil but *should* be configured +;; (setq remem-display-scope-databases nil nil nil) + +;; The scopes list... This is a list in the form: +;; +;; (scope1 scope2 scope3 ...) +;; +;; Where scope is of the form: +;; +;; (DIRN NUM-LINES UPDATE-TIME QUERY-RANGE) +;; +;; DIRN is the subdirectory of remem-database-dir with the desired database +;; This is the name of a sub-directory in remem-database-dir +;; NUM-LINES is the number of lines that you want the scope to return (initially) +;; UPDATE-TIME is the time between scope updates (in seconds) +;; QUERY-RANGE number of lines around point that you want the scope to query on +;; This should be probably be setup per-user in his .emacs file +;; +;; Sample +;; (setq remem-scopes-list '(("mail" 6 5 500) ("notes" 2 5 500))) +;; +;; Debian default + (setq remem-scopes-list '(("" 6 5 500)) ) + +) --- remem-2.12.orig/debian/TODO.Debian +++ remem-2.12/debian/TODO.Debian @@ -0,0 +1,40 @@ +TODO list for remembrance-agent + +- Have a way for users to configure scopes... by default it uses + 'memory' as a scope +- FIX bugs +- make all programs first check for system-wide configuration file + in /etc/savantrc if none is provided. +- make a way for other packages to modify /etc/savantrc +- separate emacs el files, change Depends to Suggests on emacs (the +back-end can still be used by other programs, i.e dpkg-iasearch) + +1. Remembrance agent seems to have trouble with SGML files, +add a Template in order to identify them so as to NOT treat +them like HTML. As a matter of fact, ra-index 'freezes' with +SGML files (read the file, jumps to the beginning, reads it +again...) +-->Modified savantrc, added an SGML linuxdoc template +-->This no longer helps in 2.x no savantrc (jfs, april 2001) + +2. An HTTP method can be added to retrieve documents and index +them along with local files. +3. Recognize compressed files (gz, zips) and (by option) decompress them +to try to index the uncompressed file. + +4. DONOT follow symbolic links, otherwise loops may occur. Maybe set this + as an option. +----> DONE (Thu, 10 Sep 1998 18:54:33 +0200) + +5. DONOT index files begining with a '.', these are usually hidden files, or +configuration files in home directories that need not be indexed. + +6. DONOT use several temp directories when building the database (might +die of lack of space), instead remove temp directories when not needed (seems +they stay there until database is finished) + +7. The Database building needs WAY TOO much Hardisk, should be lighter, check +how it is done and find how to improve. + +8. Test with Emacs 20 + --- remem-2.12.orig/debian/changelog +++ remem-2.12/debian/changelog @@ -0,0 +1,273 @@ +remem (2.12-7) unstable; urgency=low + + * Po-debconf translation updates: + - New Danish translation provided by Joe Dalton (Closes: #633906) + + -- Javier Fernandez-Sanguino Pen~a Thu, 14 Jul 2011 23:36:03 +0200 + +remem (2.12-6) unstable; urgency=low + + * Rename the internal 'strnlen' function to 'remem_strnlen' to fix a FTBFS + bug (Closes: #552839) + * Update Russian Debconf translation (Closes: #552445) + * Update to Debconf compatibility version 5 + + -- Javier Fernandez-Sanguino Pen~a Wed, 16 Dec 2009 01:31:50 +0100 + +remem (2.12-5) unstable; urgency=low + + * Po-debconf translation updates: + - Updated Portuguese translation, provided by Miguel Figueiredo + (Closes: 444693, 413773) + - New Dutch translation provided by Bart Cornelis (Closes: #450978) + + -- Javier Fernandez-Sanguino Pen~a Wed, 16 Apr 2008 09:37:27 +0200 + +remem (2.12-4) unstable; urgency=low + + * Make postinst call /bin/bash as it uses echo -e (Closes: #472238) + * Lintian fixes: + - Move the homepage from the description to the package header. + - Convert debian/copyright to UTF-8 + + -- Javier Fernandez-Sanguino Pen~a Wed, 02 Apr 2008 22:42:33 +0200 + +remem (2.12-3) unstable; urgency=low + + * Change the templates to use the new recommended style, this made + some of the translations fuzzy. + [ Acknowledge Christian Perrier's intent to NMU ] + * Update config.{guess|sub} + * Use po-debconf in the clean target + * Build-Depends on po-debconf + * Updated Standard to 3.7.2 (checked) + [ Debconf templates translations ] + * Added new German translation by Holger Wansing (Closes: #402305) + * Updated German translation (Closes: #405345) + * Updated Swedish translation + * Updated Vietnamese translation + * Updated Spanish translation, by myself + * Updated Czech translation, provided by Miroslav Kure (Closes: #405815) + * Updated Japanese translation, provided by Hideki Yamane (Closes: #405442) + + -- Javier Fernandez-Sanguino Pen~a Tue, 2 Jan 2007 18:15:51 +0100 + +remem (2.12-2) unstable; urgency=low + + * Debconf templates translations: + - New Swedish translation by Daniel Nylander (Closes: #333167) + - New Portuguese translation by Miguel Figueiredo by Luísa Lourenço + (Closes: #381733) + * Apply forgotten patch from Mike Small fixing a segmentation fault in + ra-index when it tries to index files which are over 256 length + (full path name) by dynamically allocating their length (Closes: #276824) + + -- Javier Fernandez-Sanguino Pen~a Thu, 7 Dec 2006 09:54:58 +0100 + +remem (2.12-1) unstable; urgency=low + + * New upstream release. + - Adds an option to define properly lispdir if Emacs is not installed + which is now used in autobuilders. Thanks to Matej Vela for pointing + this out.(Closes: #327290) + * Added the new homepage to debian/control and updated debian/copyright + * Updated mails at debian/copyright with new domain + * Put proper copyright information in debian/copyright (based on the README + but with the updated FSF address + * Don't use emacs-package-remove on purge on postrm. Actually, moved it to + prerm, since that's where Emacs policy mandates it should be. Thanks to Lars + Wirzenius (and piuparts) for pointing out this mistake (Closes: #348243) + * Use dh_installman instead of dh_installmanpages in debian/rules + * Remove duplicate call to dh_installdeb in debian/rules + * Lintian fix: Add real package depend to emacs21 + * Purge now removes files under /var/lib/emacs/remembrance (in case an index + has been created) as it should have done a long time ago. + + -- Javier Fernandez-Sanguino Pen~a Tue, 7 Feb 2006 21:48:49 +0100 + +remem (2.11-11) unstable; urgency=low + + * Depend on "| debconf-2.0" as requested by Joey Hess + * Use debconf compatibility version 4 + * Remove debian/conffiles + * Use DESTDIR to target debian/${package} instead of prefix in debian/rules + * Debconf translations* + - Vietnamese translation provided by Clytie Siddall (Closes: #317645) + - Czech translation provided by Miroslav Kure (Closes: #287294) + - Japanese translation provided by Hideki Yamane (Closes: #290130) + + -- Javier Fernandez-Sanguino Pen~a Thu, 4 Aug 2005 19:37:03 +0200 + +remem (2.11-10) unstable; urgency=low + + * Included catalan translation provided by Aleix Badia i Bosch + (Closes: #250132) + + -- Javier Fernandez-Sanguino Pen~a Mon, 7 Jun 2004 10:35:27 +0200 + +remem (2.11-9) unstable; urgency=low + + * Fixed syntax error in postrm (Closes: #232879) + + -- Javier Fernandez-Sanguino Pen~a Sun, 15 Feb 2004 19:44:36 +0100 + +remem (2.11-8) unstable; urgency=low + + * Added debconf dependancy (Closes: #215934) + + -- Javier Fernandez-Sanguino Pen~a Sat, 18 Oct 2003 10:54:19 +0200 + +remem (2.11-7) unstable; urgency=low + + * Fixed postinst since the replacement was not working properly + (use perl instead of sed to allow for variable substitution) + * Added note on the remembrance-agent.el file wrt to the changes + made by dpkg-reconfigure. + * Properly defined scope (as an empty string) so that the database + in /var/lib/emacs/remembrance-agent can be used. Otherwise it + tries to use non-existant scopes ('mail' and 'notes'). Note that + users can setup their own scopes if they want to. + + -- Javier Fernandez-Sanguino Pen~a Fri, 29 Aug 2003 02:36:25 +0200 + +remem (2.11-6) unstable; urgency=low + + * Remembrance-agent.el is now used as the Emacs starting script and + uses autoload (Closes: #152327, #152991) + * Applied po-debconf patch for template localisation (Closes: #206370) + * Added french template translation (Closes: #206371) + * Added spanish template translation. + * Added config.guess and config.sub from latest automake version. + * Removed call do dh_undocumented + * Default database is now in the user directory and only gets overriden + if the admin decides otherwise, this allows RA to work even if the + admin decides to not set it up. + * Added notes on how to use with per-user indexes in README.Debian + + -- Javier Fernandez-Sanguino Pen~a Sat, 23 Aug 2003 14:13:11 +0200 + +remem (2.11-5) unstable; urgency=low + + * Removed the pcre manpage and other undocumented manpages no + longer needed (Closes: #166619, #167105) + + -- Javier Fernandez-Sanguino Pen~a Mon, 11 Nov 2002 00:15:00 +0100 + +remem (2.11-4) unstable; urgency=low + + * Removed the .a libraries from the package (Closes: #155099) + * Added another download point for the software distribution + * Moved questions to debconf (Closes: #154134, #103770) + * Fixed spelling error (Closes: #125307) + * Fixed rmain.c and imain.c so that ra-index does not print a \n + on exit (Closes: #133594) + * Updated remem.el to work with Emacs 21 (Closes: #152433) + * Fixed postinst use of scope (Closes: #152325) + + -- Javier Fernandez-Sanguino Pen~a Mon, 5 Aug 2002 16:42:47 +0200 + +remem (2.11-3) unstable; urgency=low + + * Make it depend on emacsen rather than on all emacs version (Closes: #121921) + * Fixed upstream tar.gz + + -- Javier Fernandez-Sanguino Pen~a Sun, 2 Dec 2001 14:35:24 +0100 + +remem (2.11-2) unstable; urgency=low + + * Added Build-Depends on flex (Closes: #104627) + * New upstream release since previous release (Closes: #100534) + + -- Javier Fernandez-Sanguino Pen~a Mon, 16 Jul 2001 18:08:00 +0200 + +remem (2.11-1) unstable; urgency=low + + * New upstream release + * Fixed location of ra binary (Closes: #101849) + * Sources do not include libpcre anymore, added Build-Depends (Closes: #101852) + + -- Javier Fernandez-Sanguino Pen~a Wed, 6 Jun 2001 10:51:57 +0200 + +remem (2.10-1) unstable; urgency=low + + * New upstream release + + -- Javier Fernandez-Sanguino Pen~a Tue, 5 Jun 2001 10:22:49 +0200 + +remem (2.09-3) unstable; urgency=low + + * Fixed contact information (mail and bug reporting) + + -- Javier Fernandez-Sanguino Pen~a Tue, 5 Jun 2001 10:14:28 +0200 + +remem (2.09-2) unstable; urgency=low + + * Changed pgrep name to perlgrep (Closes 94666, 95056) + + -- Javier Fernandez-Sanguino Pen~a Tue, 5 Jun 2001 10:05:33 +0200 + +remem (2.09-1) unstable; urgency=low + + * New upstream release (haven't made one in a while but I was waiting + for 1) it become GPL 2) have time) (Closes: #34318, #34809) + * Moved from non-free to main (now it's GPLd) + * Lintian clean + + -- Javier Fernandez-Sanguino Pen~a Sat, 14 Apr 2001 22:52:18 +0200 + +remembrance-agent (2.01-1) unstable; urgency=low + + * New upstream version. + * Must be moved to non-free (now it's not GPL'd) + * Upstream changes in startup files, now separated. + * /etc/emacs/site-start.d/50remembrance-agent.el is now a conffile + + -- Javier Fernandez-Sanguino Pen~a Mon, 26 Apr 1999 18:49:32 +0200 + +remembrance-agent (1.41-5) unstable; urgency=low + + * Added URL of remembrance agent to copyright file + * Modified postint (fixes bug #30715) + + -- Javier Fernandez-Sanguino Pen~a Fri, 26 Feb 1999 00:36:20 +0100 + +remembrance-agent (1.41-4) unstable; urgency=low + + * Modified postinst script to configure correctly the .el file + + -- Javier Fernandez-Sanguino Pen~a Fri, 11 Dec 1998 23:25:43 +0100 + +remembrance-agent (1.41-3) unstable; urgency=low + + * Added template for SGML documents in savantrc, recognise author, + date and title. + * Observed problem with unclosed tags, causes problems with + SGML documents (recognised as HTML), and HTML with unclosed tags. + Fixed template of HTML format. + * Modified source to allow/disallow following symbolic links in + ra-index, default disallow (to avoid loopholes) + + -- Javier Fernandez-Sanguino Pen~a <jfs@computer.org> Mon, 12 Oct 1998 21:26:55 +0200 + +remembrance-agent (1.41-2) unstable; urgency=low + + * Fixed location of site-lisp from usr/share/emacs19/site-lisp to + usr/share/emacs/site-lisp (bug #27260) + * Removed package name from one-line description + * Added undocumented to ra-merge (fixes lintian error) + * Added link to /usr/doc/copyright/GPL (fixes lintian error) + * Fixed permissions of script (fixes lintian error) + + -- Javier Fernandez-Sanguino Pen~a <jfs@computer.org> Wed, 30 Sep 1998 16:33:44 +0200 + +remembrance-agent (1.41-1) unstable; urgency=low + + * + * Changed name from ra to 'remembrance-agent' for clarity + * Initial Release. + + -- Javier Fernandez-Sanguino Pen~a <jfs@computer.org> Sun, 6 Sep 1998 06:36:38 +0200 + +Local variables: +mode: debian-changelog +End: --- remem-2.12.orig/debian/compat +++ remem-2.12/debian/compat @@ -0,0 +1 @@ +5 --- remem-2.12.orig/debian/config +++ remem-2.12/debian/config @@ -0,0 +1,8 @@ +#!/bin/sh -e + +. /usr/share/debconf/confmodule + +db_input medium remembrance-agent/index-dir || true +db_input medium remembrance-agent/exclude-dir || true +db_go + --- remem-2.12.orig/debian/PO.sug/README +++ remem-2.12/debian/PO.sug/README @@ -0,0 +1,7 @@ + + +PO suggested by Christian Perrier: + + - Rewrite templates short descriptions to fit the Developer's Reference + suggested writing style + --- remem-2.12.orig/debian/PO.sug/templates +++ remem-2.12/debian/PO.sug/templates @@ -0,0 +1,19 @@ +Template: remembrance-agent/index-dir +Type: string +_Description: Directories to index: + In order to work, the Remembrance Agent needs to build a database of + documents of interest. Please introduce the directories (and/or files) to + be indexed separated by spaces, afterwards the database will be made. If + you do not select any directories (default) the database will not be made. + For more info look at /usr/share/doc/remembrance-agent. + +Template: remembrance-agent/exclude-dir +Type: string +_Description: Directories to exclude from the index: + You can exclude sensitive directories from being indexed by ra-index if + you want. Only three directories can be given here. NOTE: If you are + installing on a multiuser environment where each user may want to have + their personal index, DO NOT index user directories (that is /home) as + root since there are no mechanisms to prevent users from invading other's + privacy. Instead, all users can run 'ra-index' in order to build their own + databases. --- remem-2.12.orig/debian/PO.sug/po/es.po +++ remem-2.12/debian/PO.sug/po/es.po @@ -0,0 +1,88 @@ +# +# remembrance-agent template translation to spanish +# Copyright (C) 2003 Software in the Public Interest +# This file is distributed under the same license as the XXXX package. +# +# Changes: +# - Initial translation +# Javier Fernandez-Sanguino Pea <jfs@computer.org>, 2003 +# +# +# Traductores, si no conoce el formato PO, merece la pena leer la +# documentacin de gettext, especialmente las secciones dedicadas a este +# formato, por ejemplo ejecutando: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Equipo de traduccin al espaol, por favor lean antes de traducir +# los siguientes documentos: +# +# - El proyecto de traduccin de Debian al espaol +# http://www.debian.org/intl/spanish/coordinacion +# especialmente las notas de traduccin en +# http://www.debian.org/intl/spanish/notas +# +# - La gua de traduccin de po's de debconf: +# /usr/share/doc/po-debconf/README-trans +# o http://www.debian.org/intl/l10n/po-debconf/README-trans +# +msgid "" +msgstr "" +"Project-Id-Version: remembrance-agent\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-09 15:39+0100\n" +"PO-Revision-Date: 2003-08-23 14:40+0200\n" +"Last-Translator: Javier Fernandez-Sanguino Pea <jfs@computer.org>\n" +"Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Qu directorios deberan ser indexados?" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Para que Remembrance Agent funcione se debe construir una base de datos de " +"documentos de inters. Por favor indique los directorios (y/o ficheros) que " +"deben ser indexados separndolos por espacios. Una vez hecho sto la base de " +"datos se construir. Si no selecciona directorios (por omisin) la base de " +"datos no ser construida. Para ms informacin consulte /usr/share/doc/" +"remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Qu directorios deberan ser excluidos del ndice?" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Puede excluir directorios sensibles para que no sean indexados por ra-index " +"si lo desea. Aqu slo se pueden indicar tres directorios. Observacin: Si " +"est uste instalando este programa en un entorno multi-usuario donde cada " +"usuario quiere tener su ndice persona, NO indexe los directorios de los " +"usuarios (esto es, /home) como superusuario dado que no hay mecanismos para " +"impedir que algunos usuarios violen la privacidad de otros. En su lugar, " +"todos los usuarios pueden utilizar ra-index para construir sus propias " +"bases de datos." --- remem-2.12.orig/debian/PO.sug/po/pt.po +++ remem-2.12/debian/PO.sug/po/pt.po @@ -0,0 +1,64 @@ +# Portuguese translation for remem's debconf messages. +# This file is distributed under the same license as the remem package. +# Luísa Lourenço <kikentai@gmail.com>, 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: remem\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-09 15:39+0100\n" +"PO-Revision-Date: 2006-08-03 15:05+0000\n" +"Last-Translator: Luísa Lourenço <kikentai@gmail.com>\n" +"Language-Team: Portuguese <traduz@debianpt.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Quais os directórios que devem indexados?" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Para que funcione, o Remembrance Agent precisa de construir uma base de " +"dados de documentos de interesse. Por favor introduza os directórios (e/ou " +"ficheiros) a serem indexados separados por espaços, depois disso a base de " +"dados irá ser criada. Se não selecionar nenhum directório (por omissão) a " +"base de dados não será criada. Para mais informação veja /usr/share/doc/" +"remembrance-agent" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Quais os directórios que devem ser excluídos do index?" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Pode excluir directórios sensíveis de serem indexados pelo ra-index se assim " +"o desejar. Somente três directórios podem ser dados aqui. NOTA: Se está a " +"instalar num ambiente de vários utilizadores onde cada utilizador poderá " +"querer ter o seu index pessoal, NÃO indexe directórios de utilizador (isto " +"é /home) como raíz uma vez que não existem mecanismos para prevenir " +"utilizadores de invadir a privacidade de outros utilizadores. Em vez disso, " +"todos os utilizadores podem correr o 'ra-index' para criar as suas próprias " +"bases de dados." --- remem-2.12.orig/debian/PO.sug/po/vi.po +++ remem-2.12/debian/PO.sug/po/vi.po @@ -0,0 +1,64 @@ +# Vietnamese translation for remem. +# Copyright © 2005 Free Software Foundation, Inc. +# Clytie Siddall <clytie@riverland.net.au>, 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: remem 2.11-10\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-09 15:39+0100\n" +"PO-Revision-Date: 2005-07-10 20:46+0930\n" +"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" +"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0\n" +"X-Generator: LocFactoryEditor 1.2.2\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Nên chỉ mục những thư mục nào?" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Để hoạt động, Tác nhân Nhớ cần phải xây dụng một cơ sở dữ liệu của các tài " +"liệu liên quan. Bạn hãy liệt kê các thư mục (và/hay tập tin) cần chỉ mục, " +"định giới bằng dấu cách. Sau đó thì cơ sở dữ liệu sẽ được tạo. Nếu bạn không " +"chọn thư mục nào (mặc định) thì sẽ không tạo cơ sở dữ liệu. Để tìm thông tin " +"thêm chi tiết, hãy đọc tập tin «/usr/share/doc/remembrance-agent»." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Nên loại trừ những thư mục nào ra mục lục?" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Có thể loại trừ thư mục nào đó ra việc chỉ mục của ra-index, nếu bạn muốn. " +"Có thể nhập chỉ ba thư mục vào đây. GHI CHÚ: nếu bạn đang cài đặt trên một " +"môi trường đa người dùng, và mỗi người dùng có thể muốn có mục lục riêng, " +"ĐỪNG chỉ mục thư mục chính của người dùng (tức là «/home») với tư cách người " +"chủ (root) vì không có cơ chế nào có thể ngăn cản người dùng xâm phạm sự " +"riêng tư của người dùng khác. Thay vào đó, mỗi người dùng có thể chạy «ra-" +"index» để xây dụng cơ sở dữ liệu của chính nó." --- remem-2.12.orig/debian/PO.sug/po/de.po +++ remem-2.12/debian/PO.sug/po/de.po @@ -0,0 +1,72 @@ +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# Developers do not need to manually edit POT or PO files. +# +# Holger Wansing <linux@wansing-online.de>, 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: remem 2.12-2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-09 15:39+0100\n" +"PO-Revision-Date: 2006-12-09 13:51+0100\n" +"Last-Translator: Holger Wansing <linux@wansing-online.de>\n" +"Language-Team: German <debian-l10n-german@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Verzeichnisse, die indexiert werden sollen:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Um funktionieren zu können, muss der Remembrance Agent eine Datenbank über " +"relevante Dokumente erstellen. Bitte geben Sie die Verzeichnisse, die " +"indexiert werden sollen, durch Leerzeichen getrennt ein; anschließend wird " +"die Datenbank erzeugt. Wenn Sie keine Verzeichnisse angeben " +"(Voreinstellung), wird keine Datenbank erstellt. Nähere Informationen finden " +"Sie unter /usr/share/doc/remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Verzeichnisse, die vom indexieren ausgeschlossen werden sollen:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Wenn Sie möchten, können Sie Verzeichnisse mit empfindlichen Daten von der " +"Indexierung durch »ra-index« ausschließen. Es können hier maximal drei " +"Verzeichnisse angegeben werden. HINWEIS: Falls Sie Remembrance Agent auf " +"einem Mehrbenutzersystem installieren, auf dem jeder Nutzer seinen eigenen " +"Index benötigen könnte, indexieren Sie NICHT das komplette User-Verzeichnis " +"(also /home), da keine Mechanismen existieren, zu verhindern, dass Benutzer " +"die Privatsphäre anderer verletzen. Stattdessen können alle Benutzer »ra-" +"index« selbst ausführen, um ihre eigenen Datenbanken zu erstellen." --- remem-2.12.orig/debian/PO.sug/po/ca.po +++ remem-2.12/debian/PO.sug/po/ca.po @@ -0,0 +1,64 @@ +# remem (debconf) translation to Catalan. +# Copyright (C) 2004 Free Software Foundation, Inc. +# Aleix Badia i Bosch <abadia@ica.es>, 2004 +# Josep Lladonosa i Capell <jep@veinat.net>, 2004 +# +msgid "" +msgstr "" +"Project-Id-Version: remem_2.11-9_templates\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-09 15:39+0100\n" +"PO-Revision-Date: 2004-03-05 19:46GMT\n" +"Last-Translator: Aleix Badia i Bosch <abadia@ica.es>\n" +"Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Quins directoris s'haurien d'indexar?" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"El Remembrance Agent necessita construir una base de dades de documents " +"d'interès. Introduïu, separats per espais, el conjunt de directoris (i/o " +"fitxers) que s'han d'indexar; seguidament es generarà la base de dades. Si " +"no seleccioneu cap directori (opció per defecte) no es generarà la base de " +"dades. Per a més informació vegeu el directori /usr/share/doc/remembrance-" +"agent" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Quins directoris s'haurien d'excloure de l'índex?" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Podeu excloure directoris de la indexació del ra-index. Només es poden " +"especificar tres directoris. NOTA: si ho esteu instal·lant en un entorn de " +"multiusuari on cada usuari podria voler tenir un índex personal, no indexeu " +"els directoris d'usuari (en aquest cas /home) com a superusuari, ja que no " +"hi ha cap mecanisme per evitar que els usuaris envaeixin la privacitat dels " +"altres usuaris. Tots els usuaris poden executar el 'ra-index' per generar " +"les seves pròpies bases de dades." --- remem-2.12.orig/debian/PO.sug/po/templates.pot +++ remem-2.12/debian/PO.sug/po/templates.pot @@ -0,0 +1,60 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-09 15:39+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" --- remem-2.12.orig/debian/PO.sug/po/fr.po +++ remem-2.12/debian/PO.sug/po/fr.po @@ -0,0 +1,76 @@ +# translation of fr.po to French +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Christian Perrier <bubulle@debian.org>, 2006. +msgid "" +msgstr "" +"Project-Id-Version: fr\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-09 15:39+0100\n" +"PO-Revision-Date: 2006-11-30 18:34+0100\n" +"Last-Translator: Michel Grentzinger <mic.grentz@online.fr>\n" +"Language-Team: French <debian-l10n-french@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Rpertoires indexer:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Afin de fonctionner correctement, l'agent de remmoration (Remembrance " +"Agent) a besoin de constituer une base de donnes des documents " +"intressants. Veuillez indiquer les rpertoires indexer, spars par des " +"espaces, aprs quoi la base de donnes sera construite. Si vous ne " +"choisissez pas de rpertoires (par dfaut), la base de donnes ne sera pas " +"construite. Pour plus d'informations, veuillez consulter /usr/share/doc/" +"remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Rpertoires exclus de l'index:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Si vous le souhaitez, vous pouvez viter que des rpertoires prcis soient " +"indexs par ra-index. Seuls trois rpertoires peuvent tre indiqus ici. " +"Note: si vous faites une installation dans un environnement multi-" +"utilisateurs o chaque utilisateur peut souhaiter possder son propre index, " +"l'indexation des rpertoires personnels des utilisateurs (dans /home) ne " +"doit pas tre faite par le super-utilisateur. Cela aurait pour consquence " +"de permettre chacun d'avoir un accs aux donnes des autres utilisateurs. " +"Au lieu de cela, chaque utilisateur peut excuter ra-index afin de " +"construire sa propre bases de donnes." --- remem-2.12.orig/debian/PO.sug/po/sv.po +++ remem-2.12/debian/PO.sug/po/sv.po @@ -0,0 +1,70 @@ +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# Developers do not need to manually edit POT or PO files. +# , fuzzy +# +# +msgid "" +msgstr "" +"Project-Id-Version: remem 2.11-11\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-09 15:39+0100\n" +"PO-Revision-Date: 2005-10-11 20:59+0200\n" +"Last-Translator: Daniel Nylander <po@danielnylander.se>\n" +"Language-Team: Swedish <sv@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Vilka mappar ska indexeras?" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Fr att detta ska fungera mste Remembrance Agent bygga en databas av " +"intressanta dokument. Ange de mappar (och/eller filer) som ska indexeras, " +"separera med mellanslag och databasen kommer att skapas. Om du inte vljer " +"ngra mappar (standard) kommer inte databasen skapas. Fr mer information, " +"se /usr/share/doc/remembrance-agent" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Vilka mappar ska inte tas med i indexeringen?" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Du kan exkludera sensitiva mappar frn att indexeras av ra-index om du vill. " +"Bara tre mappar kan anges hr. NOTERA: Om du installerar p ett " +"multianvndarsystem dr varje anvndare vil ha deras egna personliga index, " +"indexera INTE anvndarnas mappar (som r i /home) som root eftersom det inte " +"finns en mekanism som frhindrar anvndare att inkrkta p integriteten. " +"Istllet kan alla anvndare kra 'ra-index' fr att bygga sina egna " +"databaser." --- remem-2.12.orig/debian/PO.sug/po/POTFILES.in +++ remem-2.12/debian/PO.sug/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates --- remem-2.12.orig/debian/PO.sug/po/cs.po +++ remem-2.12/debian/PO.sug/po/cs.po @@ -0,0 +1,69 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: remem\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-09 15:39+0100\n" +"PO-Revision-Date: 2004-12-26 19:39+0100\n" +"Last-Translator: Miroslav Kure <kurem@debian.cz>\n" +"Language-Team: Czech <provoz@debian.cz>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Kter adrese se maj indexovat?" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Aby mohl pracovat, mus si Remembrance Agent vytvoit databzi zajmavch " +"dokument. Zadejte mezerami oddlen seznam adres (a/nebo soubor), kter " +"se maj zaindexovat do databze. Nevyberete-li dn adrese, databze se " +"nevytvo. Vce informac naleznete v /usr/share/doc/remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Kter adrese maj bt z indexovn vynechny?" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Pokud chcete, mete z indexovn programem ra-index vynechat citliv " +"adrese. Mete zadat maximln ti adrese. POZNMKA: Instalujete-li ve " +"vceuivatelskm prosted, kde bude mt kad uivatel svj osobn index, " +"NEINDEXUJTE pod rootem adrese uivatel (tj. /home), protoe tak nemete " +"zabrnit zasahovn do soukrom jednotlivch uivatel. Uivatel si mohou " +"vytvoit sv vlastn databze pkazem 'ra-index'." --- remem-2.12.orig/debian/PO.sug/po/ja.po +++ remem-2.12/debian/PO.sug/po/ja.po @@ -0,0 +1,72 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +# +msgid "" +msgstr "" +"Project-Id-Version: remem 2.11-10\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2006-12-09 15:39+0100\n" +"PO-Revision-Date: 2005-01-01 05:13+0900\n" +"Last-Translator: Hideki Yamane <henrich@samba.gr.jp>\n" +"Language-Team: Japanese <debian-japanese@lists.debian.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=EUC-JP\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "ɤΥǥ쥯ȥФƥǥåޤ?" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"ưΤˤϡRemembrance Agent ϶̣ΤɥȤΥǡ١" +"ɬפޤǥåǥ쥯ȥ (ե) " +"ڡǶڤäƻꤷƤХǡ١ޤɤ" +"ǥ쥯ȥꤷʤ (ǥե)ǡ١ޤ󡣤" +"ܺ٤ʾˤĤƤ /usr/share/doc/remembrance-agent 򻲾ȤƤ" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "ɤΥǥ쥯ȥ򥤥ǥåκ鳰ޤ?" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"ra-index ˤ륤ǥåˤĤơΥǥ쥯ȥ뤳Ȥ" +"ǽǤǤϥǥ쥯ȥ 3 ĤޤǤǽǤյ: ġΥ桼" +"Ū˥ǥåĤ褦ʥޥ桼Ķǥ󥹥ȡ뤷Ƥ硢¾" +"ͤΥץ饤ХФ뿯ɤʤʤᡢroot Ȥƥ桼ǥ쥯" +" (Ĥޤ /home) 򥤥ǥå֤ʤפ褦ˤƤ" +"ξϡƤΥ桼ʬȤΥǡ١뤿 'ra-index' " +"¹ԤǤޤ" --- remem-2.12.orig/debian/po/es.po +++ remem-2.12/debian/po/es.po @@ -0,0 +1,89 @@ +# +# remembrance-agent template translation to spanish +# Copyright (C) 2003 Software in the Public Interest +# This file is distributed under the same license as the XXXX package. +# +# Changes: +# - Initial translation +# Javier Fernandez-Sanguino Pea <jfs@computer.org>, 2003 +# +# +# Traductores, si no conoce el formato PO, merece la pena leer la +# documentacin de gettext, especialmente las secciones dedicadas a este +# formato, por ejemplo ejecutando: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Equipo de traduccin al espaol, por favor lean antes de traducir +# los siguientes documentos: +# +# - El proyecto de traduccin de Debian al espaol +# http://www.debian.org/intl/spanish/coordinacion +# especialmente las notas de traduccin en +# http://www.debian.org/intl/spanish/notas +# +# - La gua de traduccin de po's de debconf: +# /usr/share/doc/po-debconf/README-trans +# o http://www.debian.org/intl/l10n/po-debconf/README-trans +# +msgid "" +msgstr "" +"Project-Id-Version: remembrance-agent\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2003-08-23 14:40+0200\n" +"Last-Translator: Javier Fernandez-Sanguino Pea <jfs@computer.org>\n" +"Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Directorios a indexar:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Para que Remembrance Agent funcione se debe construir una base de datos de " +"documentos de inters. Por favor indique los directorios (y/o ficheros) que " +"deben ser indexados separndolos por espacios. Una vez hecho sto la base de " +"datos se construir. Si no selecciona directorios (por omisin) la base de " +"datos no ser construida. Para ms informacin consulte /usr/share/doc/" +"remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Directorios que deberan excluirse del ndice:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Puede excluir directorios sensibles para que no sean indexados por ra-index " +"si lo desea. Aqu slo se pueden indicar tres directorios. Observacin: Si " +"est uste instalando este programa en un entorno multi-usuario donde cada " +"usuario quiere tener su ndice persona, NO indexe los directorios de los " +"usuarios (esto es, /home) como superusuario dado que no hay mecanismos para " +"impedir que algunos usuarios violen la privacidad de otros. En su lugar, " +"todos los usuarios pueden utilizar ra-index para construir sus propias " +"bases de datos." --- remem-2.12.orig/debian/po/pt.po +++ remem-2.12/debian/po/pt.po @@ -0,0 +1,65 @@ +# Portuguese translation for remem's debconf messages. +# This file is distributed under the same license as the remem package. +# Luísa Lourenço <kikentai@gmail.com>, 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: remem\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2007-09-30 12:31+0100\n" +"Last-Translator: Luísa Lourenço <kikentai@gmail.com>\n" +"Language-Team: Portuguese <traduz@debianpt.org>\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Directórios a indexar:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Para que funcione, o Remembrance Agent precisa de construir uma base de " +"dados de documentos de interesse. Por favor introduza os directórios (e/ou " +"ficheiros) a serem indexados separados por espaços, depois disso a base de " +"dados irá ser criada. Se não selecionar nenhum directório (por omissão) a " +"base de dados não será criada. Para mais informação veja /usr/share/doc/" +"remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Directórios a excluir da indexação:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Pode excluir directórios sensíveis de serem indexados pelo ra-index se assim " +"o desejar. Somente três directórios podem ser dados aqui. NOTA: Se está a " +"instalar num ambiente de vários utilizadores onde cada utilizador poderá " +"querer ter o seu index pessoal, NÃO indexe directórios de utilizador (isto " +"é /home) como raíz uma vez que não existem mecanismos para prevenir " +"utilizadores de invadir a privacidade de outros utilizadores. Em vez disso, " +"todos os utilizadores podem correr o 'ra-index' para criar as suas próprias " +"bases de dados." --- remem-2.12.orig/debian/po/nl.po +++ remem-2.12/debian/po/nl.po @@ -0,0 +1,67 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE 'S COPYRIGHT HOLDER +# This file is distributed under the same license as the package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: remem\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2007-10-26 13:36+0100\n" +"Last-Translator: Bart Cornelis <cobaco@skolelinux.no>\n" +"Language-Team: debian-l10n-dutch <debian-l10n-dutch@lists.debian.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Dutch\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Te indexeren mappen:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Om te werken dient de Remembrance-agent een database van interessante " +"documenten op te bouwen. Welke mappen (en/of bestanden) wilt u laten " +"indexeren voor de database? Hier kunt u de gewenste mappen invoeren " +"gescheiden door spaties. Als u geen mappen selecteert (standaardwaarde) " +"wordt er geen database aangemaakt. Meer informatie vindt u in /usr/share/doc/" +"remembrance-agent ." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Van de index buiten te sluiten mappen:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Mappen met gevoelige inhoud kunnen van indexering door de ra-index " +"uitgesloten worden. Hier kunt u maximaal drie mappen opgeven. OPGELET: als u " +"installeert op een systeem met meerdere gebruikers waar het mogelijk is dat " +"elke gebruiker z'n eigen persoonlijke index heeft indexeer de " +"gebruikersmappen (/home) dan NIET als root aangezien er geen mechanisme " +"ingebouwd is om de gebruikers privacy tegen elkaar te beschermen. De " +"gebruikers kunnen zelf 'ra-index' uitvoeren om hun eigen databases op te " +"bouwen." --- remem-2.12.orig/debian/po/vi.po +++ remem-2.12/debian/po/vi.po @@ -0,0 +1,65 @@ +# Vietnamese translation for remem. +# Copyright © 2007 Free Software Foundation, Inc. +# Clytie Siddall <clytie@riverland.net.au>, 2005-2007. +# +msgid "" +msgstr "" +"Project-Id-Version: remem 2.12-3\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2007-01-04 17:10+1030\n" +"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" +"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" +"Language: vi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: LocFactoryEditor 1.6fc1\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Các thư mục cần chỉ mục:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Để hoạt động được, Tác nhân Nhớ cần xây dựng một cơ sở dữ liệu các tài liệu " +"liên quan. Hãy giới thiệu những thư mục/tập tin cần chỉ mục, định giới bằng " +"dấu cách; sau đó cơ sở dữ liệu được tạo. Không chọn gì (mặc định) thì cơ sở " +"dữ liệu không được tạo. Để tìm thêm thông tin thì xem tài liệu nằm trong thư " +"mục « /usr/share/doc/remembrance-agent ». " + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Các thư mục cần loại trừ ra chỉ mục:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Vẫn còn có khả năng loại trừ những thư mục nhạy cảm ra việc chỉ mục của ra-" +"index, nếu bạn muốn. Có thể xác định chỉ ba thư mục. GHI CHÚ : nếu bạn đang " +"cài đặt vào môi trường đa người dùng nơi mỗi người dùng có thể muốn tạo chỉ " +"mục riêng, ĐỪNG chỉ mục các thư mục người dùng (tức là « /home ») với tư " +"cách là người chủ, vì không có cơ chế ngăn cản người dùng xâm phạm sự riêng " +"tư củ người dùng khác. Thay vào đó, mỗi người dùng có khả năng chạy lệnh « " +"ra-index » để xây dựng cơ sở dữ liệu riêng." --- remem-2.12.orig/debian/po/de.po +++ remem-2.12/debian/po/de.po @@ -0,0 +1,73 @@ +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# Developers do not need to manually edit POT or PO files. +# +# Holger Wansing <linux@wansing-online.de>, 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: remem 2.12-2\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2007-01-02 21:20+0100\n" +"Last-Translator: Holger Wansing <linux@wansing-online.de>\n" +"Language-Team: German <debian-l10n-german@lists.debian.org>\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Zu indexierende Verzeichnisse:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Um funktionieren zu können, muss der Remembrance Agent eine Datenbank über " +"relevante Dokumente erstellen. Bitte geben Sie die Verzeichnisse, die " +"indexiert werden sollen, durch Leerzeichen getrennt ein; anschließend wird " +"die Datenbank erzeugt. Wenn Sie keine Verzeichnisse angeben " +"(Voreinstellung), wird keine Datenbank erstellt. Nähere Informationen finden " +"Sie unter /usr/share/doc/remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Vom Indexieren auszuschließende Verzeichnisse:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Wenn Sie möchten, können Sie Verzeichnisse mit empfindlichen Daten von der " +"Indexierung durch »ra-index« ausschließen. Es können hier maximal drei " +"Verzeichnisse angegeben werden. HINWEIS: Falls Sie Remembrance Agent auf " +"einem Mehrbenutzersystem installieren, auf dem jeder Nutzer seinen eigenen " +"Index benötigen könnte, indexieren Sie NICHT das komplette User-Verzeichnis " +"(also /home), da keine Mechanismen existieren, zu verhindern, dass Benutzer " +"die Privatsphäre anderer verletzen. Stattdessen können alle Benutzer »ra-" +"index« selbst ausführen, um ihre eigenen Datenbanken zu erstellen." --- remem-2.12.orig/debian/po/ru.po +++ remem-2.12/debian/po/ru.po @@ -0,0 +1,68 @@ +# translation of remem_2.12-5_ru.po to Russian +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Yuri Kozlov <yuray@komyakino.ru>, 2009. +msgid "" +msgstr "" +"Project-Id-Version: remem 2.12-5\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2009-10-14 20:21+0400\n" +"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n" +"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Индексируемые каталоги:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Для работы Remembrance Agent требуется построить базу данных интересующих " +"документов. Укажите каталоги (и/или файлы), которые должны быть " +"проиндексированы, через пробел; после чего будет создана база данных. Если " +"вы ничего не укажите (по умолчанию), то база данных создана не будет. " +"Подробней см. /usr/share/doc/remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Каталоги, исключаемые из индексации:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Вы можете исключить определённые каталоги из индексирования ra-index. Здесь " +"можно указать только три каталога. ЗАМЕЧАНИЕ: Если вы работаете в " +"многопользовательском окружении, где каждый пользователь может захотеть " +"работать со своей базой индексирования, НЕ ИНДЕКСИРУЙТЕ пользовательские " +"каталоги (в /home) от root, так как не предусмотрено механизма " +"предотвращения нарушения пользовательской конфиденциальности. Вместо этого, " +"каждый пользователь может запустить 'ra-index' для создания своих " +"собственных баз данных." --- remem-2.12.orig/debian/po/ca.po +++ remem-2.12/debian/po/ca.po @@ -0,0 +1,67 @@ +# remem (debconf) translation to Catalan. +# Copyright (C) 2004 Free Software Foundation, Inc. +# Aleix Badia i Bosch <abadia@ica.es>, 2004 +# Josep Lladonosa i Capell <jep@veinat.net>, 2004 +# +msgid "" +msgstr "" +"Project-Id-Version: remem_2.11-9_templates\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2004-03-05 19:46GMT\n" +"Last-Translator: Aleix Badia i Bosch <abadia@ica.es>\n" +"Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +#, fuzzy +msgid "Directories to index:" +msgstr "Quins directoris s'haurien d'indexar?" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"El Remembrance Agent necessita construir una base de dades de documents " +"d'interès. Introduïu, separats per espais, el conjunt de directoris (i/o " +"fitxers) que s'han d'indexar; seguidament es generarà la base de dades. Si " +"no seleccioneu cap directori (opció per defecte) no es generarà la base de " +"dades. Per a més informació vegeu el directori /usr/share/doc/remembrance-" +"agent." + +#. Type: string +#. Description +#: ../templates:2001 +#, fuzzy +msgid "Directories to exclude from the index:" +msgstr "Quins directoris s'haurien d'excloure de l'índex?" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Podeu excloure directoris de la indexació del ra-index. Només es poden " +"especificar tres directoris. NOTA: si ho esteu instal·lant en un entorn de " +"multiusuari on cada usuari podria voler tenir un índex personal, no indexeu " +"els directoris d'usuari (en aquest cas /home) com a superusuari, ja que no " +"hi ha cap mecanisme per evitar que els usuaris envaeixin la privacitat dels " +"altres usuaris. Tots els usuaris poden executar el 'ra-index' per generar " +"les seves pròpies bases de dades." --- remem-2.12.orig/debian/po/templates.pot +++ remem-2.12/debian/po/templates.pot @@ -0,0 +1,52 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" --- remem-2.12.orig/debian/po/fr.po +++ remem-2.12/debian/po/fr.po @@ -0,0 +1,77 @@ +# translation of fr.po to French +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Christian Perrier <bubulle@debian.org>, 2006. +msgid "" +msgstr "" +"Project-Id-Version: fr\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2006-11-30 18:34+0100\n" +"Last-Translator: Michel Grentzinger <mic.grentz@online.fr>\n" +"Language-Team: French <debian-l10n-french@lists.debian.org>\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Rpertoires indexer:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Afin de fonctionner correctement, l'agent de remmoration (Remembrance " +"Agent) a besoin de constituer une base de donnes des documents " +"intressants. Veuillez indiquer les rpertoires indexer, spars par des " +"espaces, aprs quoi la base de donnes sera construite. Si vous ne " +"choisissez pas de rpertoires (par dfaut), la base de donnes ne sera pas " +"construite. Pour plus d'informations, veuillez consulter /usr/share/doc/" +"remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Rpertoires exclus de l'index:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Si vous le souhaitez, vous pouvez viter que des rpertoires prcis soient " +"indexs par ra-index. Seuls trois rpertoires peuvent tre indiqus ici. " +"Note: si vous faites une installation dans un environnement multi-" +"utilisateurs o chaque utilisateur peut souhaiter possder son propre index, " +"l'indexation des rpertoires personnels des utilisateurs (dans /home) ne " +"doit pas tre faite par le super-utilisateur. Cela aurait pour consquence " +"de permettre chacun d'avoir un accs aux donnes des autres utilisateurs. " +"Au lieu de cela, chaque utilisateur peut excuter ra-index afin de " +"construire sa propre bases de donnes." --- remem-2.12.orig/debian/po/sv.po +++ remem-2.12/debian/po/sv.po @@ -0,0 +1,71 @@ +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# Developers do not need to manually edit POT or PO files. +# , fuzzy +# +# +msgid "" +msgstr "" +"Project-Id-Version: remem 2.11-11\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2007-01-02 18:39+0100\n" +"Last-Translator: Daniel Nylander <po@danielnylander.se>\n" +"Language-Team: Swedish <sv@li.org>\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Kataloger att indexera:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Fr att detta ska fungera, behver Remembrance Agent bygga en databas ver " +"intressanta dokument. Ange de kataloger (och/eller filer) som ska indexeras, " +"separera med blanksteg och sedan kommer databasen att skapas. Om du inte " +"vljer ngra kataloger (standard), kommer inte databasen att skapas. Fr mer " +"information, se /usr/share/doc/remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Kataloger att undanta frn indexet:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Du kan, om du vill, undanta knsliga kataloger frn att indexeras av ra-" +"index. Bara tre kataloger kan anges hr. OBSERVERA: Om du installerar p ett " +"fleranvndarsystem dr varje anvndare vill ha sina egna personliga index, " +"ska du INTE indexera anvndarnas kataloger (som finns i /home) som root " +"eftersom det inte finns en mekanism som frhindrar anvndare att inkrkta p " +"integriteten. Istllet kan alla anvndare kra \"ra-index\" fr att bygga " +"sina egna databaser." --- remem-2.12.orig/debian/po/POTFILES.in +++ remem-2.12/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates --- remem-2.12.orig/debian/po/da.po +++ remem-2.12/debian/po/da.po @@ -0,0 +1,64 @@ +# Danish translation remem. +# Copyright (C) 2011 remem & nedenstående oversættere. +# This file is distributed under the same license as the remem package. +# Joe Hansen (joedalton2@yahoo.dk), 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: remem\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2011-07-14 12:42+0000\n" +"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n" +"Language-Team: Danish <debian-l10n-danish@lists.debian.org>\n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Mapper at indeksere:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"For at virke skal Remembrance Agenten bygge en database af " +"interessedokumenter. Introducer venligst mapperne (og/eller filer) til at " +"blive indekseret adskilt af mellemrum, efterfølgende vil databasen blive " +"lavet. Hvis du ikke vælger nogen mapper (standard) vil databasen ikke blive " +"lavet. For yderligere information så se /usr/share/doc/remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Mapper at ekskludere fra indekset:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Du kan ekskludere følsomme mapper fra at blive indekseret af ra-index, hvis " +"du ønsker det. Kun tre mapper kan angives her. BEMÆRK: Hvis du installerer " +"på et flerbrugermiljø, hvor hver bruger måske ønsker at have deres " +"personlige indeks, så indekser IKKE brugermapper (det vil sige /home) som " +"administrator, da der ikke er nogen mekanisme til at forhindre brugere fra " +"at invadere andres privatliv. I stedet for kan alle brugere køre »ra-index« " +"for at bygge deres egne databaser." --- remem-2.12.orig/debian/po/cs.po +++ remem-2.12/debian/po/cs.po @@ -0,0 +1,70 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: remem\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2007-01-06 16:31+0100\n" +"Last-Translator: Miroslav Kure <kurem@debian.cz>\n" +"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "Adresáře, které se mají indexovat:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"Aby mohl pracovat, musí si Remembrance Agent vytvořit databázi zajímavých " +"dokumentů. Zadejte mezerami oddělený seznam adresářů (a/nebo souborů), které " +"se mají zaindexovat do databáze. Nevyberete-li žádné adresáře, databáze se " +"nevytvoří. Více informací naleznete v /usr/share/doc/remembrance-agent." + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "Adresáře, které se mají vynechat z indexování:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"Pokud chcete, můžete z indexování programem ra-index vynechat citlivé " +"adresáře. Můžete zadat maximálně tři adresáře. POZNÁMKA: Instalujete-li ve " +"víceuživatelském prostředí, kde bude mít každý uživatel svůj osobní index, " +"NEINDEXUJTE pod rootem adresáře uživatelů (tj. /home), protože tak nemůžete " +"zabránit zasahování do soukromí jednotlivých uživatelů. Uživatelé si mohou " +"vytvořit své vlastní databáze příkazem 'ra-index'." --- remem-2.12.orig/debian/po/ja.po +++ remem-2.12/debian/po/ja.po @@ -0,0 +1,73 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +# +msgid "" +msgstr "" +"Project-Id-Version: remem 2.12-3\n" +"Report-Msgid-Bugs-To: jfs@computer.org\n" +"POT-Creation-Date: 2007-01-02 18:13+0100\n" +"PO-Revision-Date: 2007-01-03 00:53+0900\n" +"Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n" +"Language-Team: Japanese <debian-japanese@lists.debian.org>\n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "Directories to index:" +msgstr "インデックスを生成するディレクトリ:" + +#. Type: string +#. Description +#: ../templates:1001 +msgid "" +"In order to work, the Remembrance Agent needs to build a database of " +"documents of interest. Please introduce the directories (and/or files) to be " +"indexed separated by spaces, afterwards the database will be made. If you do " +"not select any directories (default) the database will not be made. For more " +"info look at /usr/share/doc/remembrance-agent." +msgstr "" +"動作のためには、Remembrance Agent は興味のあるドキュメントのデータベースを生" +"成する必要があります。インデックスを作成するディレクトリ (やファイル) をス" +"ペースで区切って指定してください。そうすればデータベースが生成されます。どの" +"ディレクトリも指定しない場合 (デフォルト)、データベースは生成されません。より" +"詳細な情報については /usr/share/doc/remembrance-agent を参照してください。" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "Directories to exclude from the index:" +msgstr "インデックスの生成から外すディレクトリ:" + +#. Type: string +#. Description +#: ../templates:2001 +msgid "" +"You can exclude sensitive directories from being indexed by ra-index if you " +"want. Only three directories can be given here. NOTE: If you are installing " +"on a multiuser environment where each user may want to have their personal " +"index, DO NOT index user directories (that is /home) as root since there are " +"no mechanisms to prevent users from invading other's privacy. Instead, all " +"users can run 'ra-index' in order to build their own databases." +msgstr "" +"ra-index によるインデックスの生成について、特定のディレクトリを除外することも" +"可能です。ここではディレクトリ 3 つまでが指定可能です。付記: 個々のユーザが個" +"人的にインデックスを持つようなマルチユーザ環境でインストールしている場合、他" +"人のプライバシーに対する侵害を防ぐ手段がないため、root としてユーザディレクト" +"リ (つまり /home) をインデックスの生成を「しない」ようにしてください。それ以" +"外の場合は、全てのユーザが自分自身のデータベースを生成するために 'ra-index' " +"を実行できます。" --- remem-2.12.orig/savutil/gbuf.c +++ remem-2.12/savutil/gbuf.c @@ -40,7 +40,7 @@ /* Return the minimum of n and strlen(n). This won't read beyond n characters of string s, so if s isn't null terminated it won't matter so long as it's malloc'ed up to n. */ -size_t strnlen (char *s, size_t n) +size_t remem_strnlen (char *s, size_t n) { int i; if (s == NULL) return(0); @@ -85,7 +85,7 @@ void strncat_GBuffer(GBuffer *dest, char *src, size_t n) { int i; - if (n > strnlen(src,n)) n=strnlen(src,n); + if (n > remem_strnlen(src,n)) n=remem_strnlen(src,n); if ((dest->tail + n + 1) > dest->size) { dest->size = 2 * (RA_MAX(dest->size, (n + dest->tail + 1))); dest->value = realloc(dest->value, dest->size); @@ -100,7 +100,7 @@ void strncpy_GBuffer(GBuffer *dest, char *src, size_t n) { int i; - if (n > strnlen(src,n)) n=strnlen(src,n); + if (n > remem_strnlen(src,n)) n=remem_strnlen(src,n); if (n > dest->size) { dest->size = 2 * (RA_MAX(dest->size, n)); dest->value = realloc(dest->value, dest->size); --- remem-2.12.orig/main/rmain.c +++ remem-2.12/main/rmain.c @@ -975,7 +975,8 @@ free(total_sims); free(rdi); - SavantError(0, ""); +/* SavantError(0, ""); */ + return 0; } --- remem-2.12.orig/main/imain.c +++ remem-2.12/main/imain.c @@ -518,6 +518,7 @@ free(file_sources); - SavantError(0, ""); +/* SavantError(0, ""); */ + return 0; }