Commit dccf5a00 authored by Thomas Lange's avatar Thomas Lange

Imported Upstream version 6.18.00

parent acf1ff44
104. V6.18.00 - 20120114
103. remove unused variables.
102. Make gethost use definitions for x __x__ and __x automatically.
101. More utmp fixes
100. V6.17.10 - 20120105
99. Add more FreeBSD/NetBSD machines
98. Add portability wrapper for gencat
97. Fix warning for write in SYSMALLOC systems.
96. V6.17.09 - 20120102
95. revert gencat handling to pre-cygwin fixes (without the env settings)
94. remove stray endutent()
93. V6.17.08 - 20111230
92. Remove - from gencat
91. Provide support for malloc_usable_size() so that linux works again
without SYSMALLOC
90. Add support for FreeBSD's utmpx.
89. V6.17.07 - 20111227
88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and
there are more than 10 jobs.
87. PR/155: Default $anyerror to set for backward compatibility
86. PR/149: Don't print -1 in %j (Vojtech Vitek)
85. handle -- on chdir commands as the end of options processing so that
they can process a directory like -x without resorting to ./-x
(Andrew Stevenson)
84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (Robert Byrnes)
83. PR/38: Null check for jobs (Kurt Miller)
82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger)
81. PR/120: string0 in filetest does not have enough space.
80. V6.17.06 - 20110415
79. PR/110: Add $anyerror to select behavior. Default to the new one.
78. Don't try to spell commands that are correct (Rouben Rostamian)
......
This is tcsh version 6.17.06. Tcsh is a version of the Berkeley
This is tcsh version 6.18.00. Tcsh is a version of the Berkeley
C-Shell, with the addition of: a command line editor, command and file
name completion, listing, etc. and a bunch of small additions to the
shell itself.
......
#! /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, 2007, 2008, 2009
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
timestamp='2009-06-10'
timestamp='2009-12-30'
# 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
......@@ -27,16 +27,16 @@ timestamp='2009-06-10'
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# Originally written by Per Bothner. Please send patches (context
# diff format) to <config-patches@gnu.org> and include a 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.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'`
......@@ -56,8 +56,9 @@ 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, 2006, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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."
......@@ -333,6 +334,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
......@@ -807,12 +811,12 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:[3456]*)
*:Interix*:*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T | authenticamd | genuineintel)
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
......@@ -854,6 +858,20 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
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 -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
......@@ -876,6 +894,17 @@ EOF
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
......@@ -901,39 +930,18 @@ EOF
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
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 -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
......@@ -942,8 +950,11 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
......@@ -966,58 +977,6 @@ EOF
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-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"
;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#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
......@@ -1247,6 +1206,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
......
......@@ -54,7 +54,10 @@
/* Define to 1 if you have the `getutent' function. */
#undef HAVE_GETUTENT
/* Define if you have the iconv() function. */
/* Define to 1 if you have the `getutxent' function. */
#undef HAVE_GETUTXENT
/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
/* Define to 1 if you have the <inttypes.h> header file. */
......@@ -127,22 +130,34 @@
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
/* Define to 1 if `d_ino' is member of `struct dirent'. */
/* Define to 1 if `d_ino' is a member of `struct dirent'. */
#undef HAVE_STRUCT_DIRENT_D_INO
/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */
/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
#undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
/* Define to 1 if `ut_host' is member of `struct utmp'. */
/* Define to 1 if `ut_host' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_HOST
/* Define to 1 if `ut_tv' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_TV
/* Define to 1 if `ut_user' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_USER
/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */
#undef HAVE_STRUCT_UTMPX_UT_XTIME
/* Define to 1 if `ut_host' is a member of `struct utmp'. */
#undef HAVE_STRUCT_UTMP_UT_HOST
/* Define to 1 if `ut_tv' is member of `struct utmp'. */
/* Define to 1 if `ut_tv' is a member of `struct utmp'. */
#undef HAVE_STRUCT_UTMP_UT_TV
/* Define to 1 if `ut_user' is member of `struct utmp'. */
/* Define to 1 if `ut_user' is a member of `struct utmp'. */
#undef HAVE_STRUCT_UTMP_UT_USER
/* Define to 1 if `ut_xtime' is member of `struct utmp'. */
/* Define to 1 if `ut_xtime' is a member of `struct utmp'. */
#undef HAVE_STRUCT_UTMP_UT_XTIME
/* Define to 1 if you have the `sysconf' function. */
......@@ -201,6 +216,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
......@@ -217,7 +235,7 @@
#undef STDC_HEADERS
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
#define below would cause a syntax error. */
#undef _UINT32_T
......
......@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
timestamp='2010-05-21'
timestamp='2009-12-31'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
......@@ -124,9 +124,8 @@ esac
# 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-android* | linux-dietlibc | linux-newlib* | \
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
......@@ -296,7 +295,7 @@ case $basic_machine in
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| tahoe | thumb | tic4x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| we32k \
......@@ -304,15 +303,6 @@ case $basic_machine in
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
......@@ -344,7 +334,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
......@@ -391,8 +381,7 @@ case $basic_machine in
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile-* | tilegx-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
......@@ -1085,10 +1074,17 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
# This must be matched before tile*.
tilegx*)
basic_machine=tilegx-unknown
os=-linux-gnu
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
tile*)
basic_machine=tile-unknown
......@@ -1299,8 +1295,7 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
......@@ -1483,15 +1478,6 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
......
This diff is collapsed.
......@@ -7,10 +7,11 @@ dnl You'll also need a version of config.guess from a gnu package
dnl
dnl Written by Kaveh Ghazi (ghazi@caip.rutgers.edu) 5/11/96.
dnl
dnl $tcsh: configure.in,v 3.91 2011/04/14 18:25:25 christos Exp $
dnl $tcsh: configure.in,v 3.98 2012/01/14 16:25:09 christos Exp $
AC_PREREQ([2.59])dnl Minimum Autoconf version required.
AC_INIT([tcsh], [6.17.06], [http://bugs.gw.com/])
AC_INIT([tcsh], [6.18.00], [http://bugs.gw.com/])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([tc.vers.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_TESTDIR([.], [.])
......@@ -357,7 +358,9 @@ AC_CHECK_MEMBERS([struct dirent.d_ino], , ,
# define dirent direct
#endif])
AC_CHECK_MEMBERS([struct utmp.ut_host, struct utmp.ut_user, struct utmp.ut_tv,
struct utmp.ut_xtime], , ,
struct utmp.ut_xtime, struct utmpx.ut_host,
struct utmpx.ut_user, struct utmpx.ut_tv,
struct utmpx.ut_xtime], , ,
[#include <sys/types.h>
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
......@@ -384,8 +387,8 @@ AC_INCLUDES_DEFAULT([])
AC_CHECK_FUNC([setlocale], [have_setlocale=yes], [have_setlocale=no])
AC_CHECK_FUNC([catgets], [have_catgets=yes], [have_catgets=no])
AC_CHECK_FUNCS([dup2 getauthid getcwd gethostname getpwent] dnl
[getutent mallinfo memmove memset mkstemp nice nl_langinfo sbrk] dnl
[setpgid setpriority strerror strstr sysconf wcwidth])
[getutent getutxent mallinfo memmove memset mkstemp nice] dnl
[nl_langinfo sbrk setpgid setpriority strerror strstr sysconf wcwidth])
AC_FUNC_GETPGRP
AC_FUNC_MBRTOWC
if test "x${cross_compiling}" != xyes ; then
......
/* $Header: /p/tcsh/cvsroot/tcsh/gethost.c,v 1.13 2010/05/07 15:13:58 christos Exp $ */
/* $Header: /p/tcsh/cvsroot/tcsh/gethost.c,v 1.14 2012/01/11 20:20:15 christos Exp $ */
/*
* gethost.c: Create version file from prototype
*/
......@@ -32,7 +32,7 @@
*/
#include "sh.h"
RCSID("$tcsh: gethost.c,v 1.13 2010/05/07 15:13:58 christos Exp $")
RCSID("$tcsh: gethost.c,v 1.14 2012/01/11 20:20:15 christos Exp $")
#ifdef SCO
# define perror __perror
......@@ -91,6 +91,7 @@ static const char *keyword[] =
static int findtoken (char *);
static char *gettoken (char **, char *);
static char *pname;
int main (int, char *[]);
......@@ -141,13 +142,71 @@ gettoken(char **pptr, char *token)
*pptr = ptr;
return token;
}
static char *
cat(const char *a, const char *b, size_t len)
{
size_t l;
char *r;
if (len == 0)
len = strlen(b);
l = strlen(a) + len + 1;
if ((r = malloc(l)) == NULL)
abort();
snprintf(r, l, "%s%.*s", a, (int)len, b);
return r;
}
static const char *
explode(const char *defs)
{
static const char def[] = "defined(";
static char *buf;
size_t len;
const char *ptr, *bptr, *eptr, *name;
size_t buflen = 0;
free(buf);
buf = strdup("(");
for (ptr = defs; (bptr = strstr(ptr, def)) != NULL; ptr = eptr + 1) {
if (ptr != bptr)
buf = cat(buf, ptr, bptr - ptr);
if ((eptr = strchr(ptr + sizeof(def) - 1, ')')) == NULL) {
(void) fprintf(stderr, "%s: missing close paren `%s'\n",
pname, defs);
return defs;
}
buf = cat(buf, bptr, eptr - bptr + 1);
name = bptr + sizeof(def) - 1;
len = eptr - name;
if (len < 1) {
(void) fprintf(stderr, "%s: empty define `%s'\n",
pname, defs);
return defs;
}
if (*name != '_') {
char *undername = malloc(len + 10);
buf = cat(buf, " || defined(", 0);
snprintf(undername, len + 10, "__%.*s__)", (int)len,
name);
buf = cat(buf, undername, len + 5);
buf = cat(buf, " || defined(", 0);
snprintf(undername, len + 10, "__%.*s)", (int)len,
name);
buf = cat(buf, undername, len + 3);
}
}
buf = cat(buf, eptr + 1, 0);
buf = cat(buf, ")", 0);
return buf;
}
int
main(int argc, char *argv[])
{
char line[INBUFSIZE];
char *pname;
const char *fname = "stdin";
char *ptr, *tok;
char defs[INBUFSIZE];
......@@ -280,7 +339,7 @@ main(int argc, char *argv[])
else {
if (tok && *tok)
(void) fprintf(stdout, "# if (%s) && !defined(_%s_)\n",
defs, keyword[token]);
explode(defs), keyword[token]);
else
(void) fprintf(stdout, "# if !defined(_%s_)\n",
keyword[token]);
......
This diff is collapsed.
This diff is collapsed.
# $tcsh: Makefile.in,v 1.7 2011/02/05 16:08:26 christos Exp $
# $tcsh: Makefile.in,v 1.13 2012/01/05 16:54:25 christos Exp $
LOCALES= C et finnish french german greek italian ja pl russian \
spanish ukrainian
CATALOGS= C.cat et.cat finnish.cat french.cat german.cat greek.cat \
italian.cat ja.cat pl.cat russian.cat spanish.cat ukrainian.cat
LOCALES= ${CATALOGS:.cat=}
GENCAT= @GENCAT@
INSTALL= @INSTALL@
RM?= rm
RM?= rm -f
VPATH=@srcdir@
srcdir=@srcdir@
prefix=@prefix@
datarootdir=@datarootdir@
localedir=${DESTDIR}@localedir@
CATGEN= ${srcdir}/catgen
all:
all: ${CATALOGS}
CATALOGS+=C.cat
INSTALLED+=${localedir}/C/LC_MESSAGES/tcsh.cat
${localedir}/C/LC_MESSAGES/tcsh.cat: C.cat
mkdir -p $(@D)
$(INSTALL) $< $@
C.cat: ${srcdir}/C/charset ${srcdir}/C/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=et.cat
INSTALLED+=${localedir}/et/LC_MESSAGES/tcsh.cat
${localedir}/et/LC_MESSAGES/tcsh.cat: et.cat
mkdir -p $(@D)
$(INSTALL) $< $@
et.cat: ${srcdir}/et/charset ${srcdir}/et/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=finnish.cat
INSTALLED+=${localedir}/fi/LC_MESSAGES/tcsh.cat
${localedir}/fi/LC_MESSAGES/tcsh.cat: finnish.cat
mkdir -p $(@D)
$(INSTALL) $< $@
finnish.cat: ${srcdir}/finnish/charset ${srcdir}/finnish/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=french.cat
INSTALLED+=${localedir}/fr/LC_MESSAGES/tcsh.cat
${localedir}/fr/LC_MESSAGES/tcsh.cat: french.cat
mkdir -p $(@D)
$(INSTALL) $< $@
french.cat: ${srcdir}/french/charset ${srcdir}/french/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=german.cat
INSTALLED+=${localedir}/de/LC_MESSAGES/tcsh.cat
${localedir}/de/LC_MESSAGES/tcsh.cat: german.cat
mkdir -p $(@D)
$(INSTALL) $< $@
german.cat: ${srcdir}/german/charset ${srcdir}/german/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=greek.cat
INSTALLED+=${localedir}/gr/LC_MESSAGES/tcsh.cat
${localedir}/gr/LC_MESSAGES/tcsh.cat: greek.cat
mkdir -p $(@D)
$(INSTALL) $< $@
greek.cat: ${srcdir}/greek/charset ${srcdir}/greek/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=italian.cat
INSTALLED+=${localedir}/it/LC_MESSAGES/tcsh.cat
${localedir}/it/LC_MESSAGES/tcsh.cat: italian.cat
mkdir -p $(@D)
$(INSTALL) $< $@
italian.cat: ${srcdir}/italian/charset ${srcdir}/italian/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=ja.cat
INSTALLED+=${localedir}/ja/LC_MESSAGES/tcsh.cat
${localedir}/ja/LC_MESSAGES/tcsh.cat: ja.cat
mkdir -p $(@D)
$(INSTALL) $< $@
ja.cat: ${srcdir}/ja/charset ${srcdir}/ja/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=pl.cat
INSTALLED+=${localedir}/pl/LC_MESSAGES/tcsh.cat
${localedir}/pl/LC_MESSAGES/tcsh.cat: pl.cat
mkdir -p $(@D)
$(INSTALL) $< $@
pl.cat: ${srcdir}/pl/charset ${srcdir}/pl/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=russian.cat
INSTALLED+=${localedir}/ru/LC_MESSAGES/tcsh.cat
${localedir}/ru/LC_MESSAGES/tcsh.cat: russian.cat
mkdir -p $(@D)
$(INSTALL) $< $@
russian.cat: ${srcdir}/russian/charset ${srcdir}/russian/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=spanish.cat
INSTALLED+=${localedir}/es/LC_MESSAGES/tcsh.cat
${localedir}/es/LC_MESSAGES/tcsh.cat: spanish.cat
mkdir -p $(@D)
$(INSTALL) $< $@
spanish.cat: ${srcdir}/spanish/charset ${srcdir}/spanish/*set[0-9]*
cat $^ $> | $(GENCAT) $@
@${CATGEN} $(GENCAT) $@ $^ $>
CATALOGS+=ukrainian.cat
INSTALLED+=${localedir}/ru_UA.koi8u/LC_MESSAGES/tcsh.cat
${localedir}/ru_UA.koi8u/LC_MESSAGES/tcsh.cat: ukrainian.cat
mkdir -p $(@D)
$(INSTALL) $< $@
ukrainian.cat: ${srcdir}/ukrainian/charset ${srcdir}/ukrainian/*set[0-9]*
cat $^ $> | $(GENCAT) $@
all: $(CATALOGS)
@${CATGEN} $(GENCAT) $@ $^ $>
install: $(INSTALLED)
......
#!/bin/sh
# Wrapper for gencat
TMP=/tmp/catgen.$$
trap "rm -f $TMP" 0 1 2 3 15
GENCAT="$1"
shift