Imported from ../bash-2.05b.tar.gz.

This commit is contained in:
Jari Aalto
2009-09-12 16:46:55 +00:00
parent f73dda092b
commit 7117c2d221
362 changed files with 34387 additions and 15063 deletions
+13 -6
View File
@@ -43,27 +43,34 @@ EXEEXT = @EXEEXT@
# Compiler options:
#
PROFILE_FLAGS = @PROFILE_FLAGS@
CFLAGS = @CFLAGS@
LOCAL_CFLAGS = @LOCAL_CFLAGS@
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
LOCAL_CFLAGS = @LOCAL_CFLAGS@
DEFS = @DEFS@
LOCAL_DEFS = @LOCAL_DEFS@
LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
LIBS = @LIBS@
LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
LDFLAGS_FOR_BUILD = $(LDFLAGS)
INCLUDES = -I${BUILD_DIR} -I${topdir}
#
CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) $(CPPFLAGS) \
${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
BASE_CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) \
${INCLUDES} $(LOCAL_CFLAGS)
CCFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS)
CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
SRC1 = man2html.c
OBJ1 = man2html.o
.c.o:
$(RM) $@
$(CC) -c $(CCFLAGS) $<
$(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $<
all: man2html$(EXEEXT)
+17
View File
@@ -6,6 +6,23 @@
# with status `devel', `alpha', `beta', or `rc' mail bug reports to
# chet@po.cwru.edu and, optionally, to bash-testers@po.cwru.edu.
# Other versions send mail to bug-bash@gnu.org.
#
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
#
# configuration section:
# these variables are filled in by the make target in Makefile
+5
View File
@@ -23,6 +23,11 @@
#include "stdc.h"
#include <stdio.h>
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
#endif
#include "bashansi.h"
#include "version.h"
+658 -606
View File
File diff suppressed because it is too large Load Diff
Vendored Executable → Regular
+540 -308
View File
File diff suppressed because it is too large Load Diff
+14
View File
@@ -3,7 +3,21 @@
# fixlinks - make symlinks in the bash source tree so that there is
# exactly one version of any given source file.
#
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
SRCDIR=.
while [ $# -gt 0 ]; do
+12
View File
@@ -5,6 +5,18 @@
#
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
+34 -10
View File
@@ -102,13 +102,12 @@
static char location_base[NULL_TERMINATED(MED_STR_MAX)] = "";
char *signature = "<HR>\n"
"This document was created by man2html\n"
"using the manual pages.<BR>\n"
"Time: %s\n";
char *signature = "<HR>\nThis document was created by man2html from %s.<BR>\nTime: %s\n";
/* timeformat for signature */
#define TIMEFORMAT "%T GMT, %B %d, %Y"
#define TIMEFORMAT "%d %B %Y %T %Z"
char *manpage;
/* BSD mandoc Bl/El lists to HTML list types */
#define BL_DESC_LIST 1
@@ -437,9 +436,9 @@ print_sig(void)
datbuf[0] = '\0';
clock = time(NULL);
timetm = gmtime(&clock);
timetm = localtime(&clock);
strftime(datbuf, MED_STR_MAX, TIMEFORMAT, timetm);
printf(signature, datbuf);
printf(signature, manpage, datbuf);
}
static char *
@@ -1964,6 +1963,28 @@ trans_char(char *c, char s, char t)
}
}
/* Remove \a from C in place. Return modified C. */
static char *
unescape (char *c)
{
int i, l;
l = strlen (c);
i = 0;
while (i < l && c[i]) {
if (c[i] == '\a') {
if (c[i+1])
strcpy(c + i, c + i + 1); /* should be memmove */
else {
c[i] = '\0';
break;
}
}
i++;
}
return c;
}
static char *
fill_words(char *c, char *words[], int *n)
{
@@ -1978,6 +1999,9 @@ fill_words(char *c, char *words[], int *n)
if (*sl == '"') {
*sl = '\a';
skipspace = !skipspace;
} else if (*sl == '\a') {
/* handle already-translated " */
skipspace = !skipspace;
} else if (*sl == escapesym)
slash = 1;
else if ((*sl == ' ' || *sl == '\t') && !skipspace) {
@@ -2154,7 +2178,7 @@ scan_request(char *c)
j++;
if (c[0] == escapesym) {
/* some pages use .\" .\$1 .\} */
/* .\$1 is too difficult/stuppid */
/* .\$1 is too difficult/stupid */
if (c[1] == '$')
c = skip_till_newline(c);
else
@@ -2847,7 +2871,7 @@ scan_request(char *c)
out_html("<TH ALIGN=LEFT>");
out_html(page_and_sec);
out_html("<TH ALIGN=CENTER>");
out_html(wordlist[2]);
out_html(unescape(wordlist[2]));
out_html("<TH ALIGN=RIGHT>");
out_html(page_and_sec);
out_html("\n</TABLE>\n");
@@ -3940,7 +3964,7 @@ main(int argc, char **argv)
usage();
exit(EXIT_USAGE);
}
h = t = argv[1];
manpage = h = t = argv[1];
i = 0;
buf = read_man_page(h);
+16
View File
@@ -4,6 +4,22 @@
# file in the target directory ($1). Directories specified in
# MANIFEST are created in the target directory
#
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
#
prog=`basename $0`
SRCDIR=src
+16 -1
View File
@@ -13,6 +13,22 @@
# Chet Ramey
# chet@po.cwru.edu
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
PROG=`basename $0`
# defaults
@@ -62,4 +78,3 @@ if [ -n "$verbose" ]; then
fi
exit 0
+16
View File
@@ -5,6 +5,22 @@
# Chet Ramey
# chet@po.cwru.edu
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
for dir
do
+1 -1
View File
@@ -19,7 +19,7 @@
with Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include "config.h"
#include <config.h>
#include <stdio.h>
#include <sys/types.h>
+16
View File
@@ -5,6 +5,22 @@
# in the makefile. This creates a file named by the -o option,
# otherwise everything is echoed to the standard output.
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
PROGNAME=`basename $0`
USAGE="$PROGNAME [-b] [-S srcdir] -d version -p patchlevel [-s status] [-o outfile]"
+18
View File
@@ -6,6 +6,24 @@
chet@po.cwru.edu
*/
/* Copyright (C) 1997-2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash 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, or (at your option) any later
version.
Bash 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 Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
extern char **environ;
int
+16
View File
@@ -1,5 +1,21 @@
#! /bin/sh -
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
if [ $# -eq 0 ]; then
env
exit
+28 -2
View File
@@ -1,3 +1,29 @@
/*
recho -- really echo args, bracketed with <> and with invisible chars
made visible.
Chet Ramey
chet@po.cwru.edu
*/
/* Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash 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, or (at your option) any later
version.
Bash 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 Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include <stdio.h>
void strprint();
@@ -21,9 +47,9 @@ void
strprint(str)
char *str;
{
register char *s;
register unsigned char *s;
for (s = str; s && *s; s++) {
for (s = (unsigned char *)str; s && *s; s++) {
if (*s < ' ') {
putchar('^');
putchar(*s+64);
+16
View File
@@ -4,6 +4,22 @@
# using locally-installed readline libraries
#
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
PROGNAME=`basename $0`
: ${TMPDIR:=/tmp}
+19
View File
@@ -10,6 +10,22 @@
# Chet Ramey
# chet@po.cwru.edu
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
#
# defaults
#
@@ -62,7 +78,10 @@ sunos4*)
sunos5*-*gcc*|solaris2*-*gcc*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
# This line works for the Solaris linker in /usr/ccs/bin/ld
SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
# This line works for the GNU ld
# SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
# SHLIB_XLDFLAGS='-R $(libdir)'
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+16
View File
@@ -14,6 +14,22 @@
# make
# CC="cc -x2.3" ./link.sh
# Copyright (C) 1989-2002 Free Software Foundation, Inc.
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
set -x
rm -f bash
+18
View File
@@ -1,5 +1,23 @@
/* zecho - bare-bones echo */
/* Copyright (C) 1996-2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash 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, or (at your option) any later
version.
Bash 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 Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include <stdio.h>
int