CSSC-1.3.0/ 0000755 0000000 0000000 00000000000 11465500657 007226 5 0000000 0000000 CSSC-1.3.0/configure.ac 0000644 0000000 0000000 00000033214 11465477401 011437 0000000 0000000 dnl Process this file with autoconf to produce a configure script.
dnl
dnl configure.ac: Part of GNU CSSC.
dnl
dnl Copyright (C) 1997,1998,1999,2000,2001,2002,2003,
dnl 2004,2007,2008 Free Software Foundation, Inc.
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation, either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see .
dnl
dnl Initialise. Look for sccsfile.h to double-check that we are looking
dnl at the correct directory.
AC_INIT
AC_CONFIG_SRCDIR([src/sccsfile.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
# The package version should match the regexp
# ([0-9]+)\.([0-9]+)([a-z])?
# ...at least according to the "Gnits" rules outlined
# in the Automake manual.
# usually use -git to indicate that the person who compiled
# the code got it from git.
AM_INIT_AUTOMAKE(CSSC,1.3.0)
AC_CONFIG_HEADERS(config.h)
dnl Feature and package checks
binary_defaulted=no
AC_MSG_CHECKING([if binary file support should be disabled])
AC_ARG_ENABLE(binary,
[--enable-binary
Enables support for creating "binary" SCCS files (required for
interoperability with Solaris). If binary support is disabled,
encoded SCCS files can still be read, but not created. You should
disable this feature only if you need to interoperate with a
version of SCCS which lacks binary file support. To disable this
feature, use --enable-binary=no or --disable-binary. This setting
is overridden by the environment variable CSSC_BINARY_SUPPORT.
--disable-binary
This is the opposite of --enable-binary; see above.
],
dnl action if given
,
dnl action if not given
binary_defaulted=yes
enable_binary=yes
)
if test "$enable_binary" = yes; then
AC_MSG_RESULT(no)
else
AC_DEFINE(CONFIG_DISABLE_BINARY_SUPPORT, 1, [Define if support for "binary" (encoded) files is to be disabled])
AC_MSG_RESULT(yes)
fi
if test "$binary_defaulted" = "yes"; then
echo WARNING
echo WARNING This was assumed because you did not specify either
echo WARNING --enable-binary or --disable-binary.
echo WARNING
# Pause for a bit so that the user notices this message.
( sleep 10 2>/dev/null )
fi
AC_SUBST(enable_binary)dnl
AC_MSG_CHECKING([for required SCCS file line length limits])
AC_ARG_ENABLE(max-line-length,
[--enable-max-line-length=N
Sets the maximum line length allowed in SCCS files to N. By
default, CSSC has no limit. Use this option only if you need to
make CSSC interoperate with other versions of SCCS. Setting this
option to 0 will impose no limit (which is the default in any case).
This setting is overridden by the environment variable
CSSC_MAX_LINE_LENGTH.
--disable-max-line-length
This is equivalent to --enable-max-line-length=0 (which is the default).
],
if test "$enable_max_line_length" = "no"
then
enable_max_line_length=0
AC_MSG_RESULT(no limit)
else
AC_MSG_RESULT(limit is $enable_max_line_length)
fi
max_line_length_description=$enable_max_line_length
,
AC_MSG_RESULT(no limit)
enable_max_line_length=0
)
AC_DEFINE_UNQUOTED(CONFIG_MAX_BODY_LINE_LENGTH,$enable_max_line_length,
[Maximum length of line which CSSC will create in an SCCS file])
if test $enable_max_line_length -eq 0
then
max_line_length_description="no limit"
else
max_line_length_description=$enable_max_line_length
fi
AC_SUBST(max_line_length_description)dnl
dnl Checks for programs.
AC_PROG_CC
gl_EARLY
AC_PROG_INSTALL
dnl Figure out how to get a POSIX compilation environment on ISC.
dnl We have to call this macro after the [AC_PROG_CC] macro and
dnl before any other macro that calls the compiler. We also do
dnl something similar for MINIX (though CSSC has never been tested
dnl on Minix as far as I know).
AC_ISC_POSIX
AC_MINIX
AC_PROG_LIBTOOL
AC_PROG_CXX
AC_SUBST(GXX)dnl
AC_PROG_CPP
AC_PROG_CXXCPP
dnl AC_PROG_INSTALL([])
dnl The next test must be done in C++.
AC_LANG([C++])
dnl Determine if we need to work around the bogus printf macro in
dnl glibc 2.2.3, with GCC versions 2.97 and above.
dnl
dnl We cannot do this test with AC_EGREP_CPP because the configure
dnl script does not pass the correct -O option to the compiler (well,
dnl the preprocessor)
dnl
AC_MSG_CHECKING([if you are using a broken version of glibc with a version of GCC (>=2.97) that doesn't like it])
AC_TRY_COMPILE([
#include
int x = 0;
class foo {
public:
foo() { }
void some_member_function(void) { };
int printf(const char *fmt, ...);
};
],
[/* no function body*/],
AC_MSG_RESULT(no),
AC_MSG_RESULT(yes)
oldCFLAGS="$CFLAGS"
oldCXXFLAGS="$CXXFLAGS"
if echo "$CFLAGS" | grep -e "-O" >/dev/null
then
CFLAGS="-g"
CXXFLAGS="-g"
[
echo
echo WARNING It seems that you are using a version of GNU lilbc
echo WARNING that has a broken printf macro in /usr/include/bits/stdio.h.
echo WARNING I have changed CFLAGS and CXXFLAGS to turn optimisation off
echo WARNING in order to work around the problem.
echo WARNING
echo WARNING Other possible workarounds would be to use GCC 2.96 or
echo WARNING earlier, or a version of glibc which does not have this
echo WARNING bug.
echo WARNING
echo WARNING CFLAGS has been changed from "$oldCFLAGS" to "$CFLAGS"
echo WARNING CXXFLAGS has been changed from "$oldCXXFLAGS" to "$CXXFLAGS"
echo
]
fi
)
AC_LANG([C])
gl_INIT
AC_OBJEXT
AC_EXEEXT
AC_PATH_PROG(UNAME,uname,/bin/uname)
AC_PATH_PROG(PR,pr,/usr/bin/pr)
dnl It would be a good idea to default the path for diff
dnl to install_dir/diff-program so the installer can
dnl add a symlink later. TODO.
AC_PATH_PROG(CONFIG_DIFF_COMMAND,diff,/usr/bin/diff)
AC_DEFINE_UNQUOTED(CONFIG_DIFF_COMMAND,"$ac_cv_path_CONFIG_DIFF_COMMAND",
[Path to the diff command])
AC_MSG_CHECKING([for GNU diff])
if $ac_cv_path_CONFIG_DIFF_COMMAND --version 2>/dev/null | grep "GNU diff" >/dev/null
then
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(HAVE_GNU_DIFF,1,[Define if we are using GNU diff])
else
AC_MSG_RESULT(no)
fi
##
## Search for something we can use to decompress a .Z file.
##
AC_CHECK_PROG(ZCAT_PROGRAM, uncompress, uncompress)
if test "$ZCAT_PROGRAM" = ""
then
AC_CHECK_PROG(ZCAT_PROGRAM, compress, compress -d)
fi
if test "$ZCAT_PROGRAM" = ""
then
AC_CHECK_PROG(ZCAT_PROGRAM, gzip, gzip -d)
fi
if test "$ZCAT_PROGRAM" = ""
then
AC_CHECK_PROG(ZCAT_PROGRAM, zcat, zcat)
fi
if test "$ZCAT_PROGRAM" = ""
then
AC_CHECK_PROG(ZCAT_PROGRAM, gunzip, gunzip)
fi
if test "$ZCAT_PROGRAM" = ""
then
echo
echo "WARNING: Cannot find a program that will decompress a compressed file."
echo "WARNING: This means that you cannot run the test suite, since some"
echo "WARNING: if the test input files in the test suite are provided"
echo "WARNING: compressed. The software should still compile."
echo "WARNING: "
echo "WARNING: If you have a command which will decompress a .Z file,"
echo "WARNING: please set the variable ZCAT_PROGRAM and re-run configure."
echo
fi
AC_ARG_WITH([valgrind],
AS_HELP_STRING([--with-valgrind],
[Run tests under Valgrind, if it is installed]),
[with_valgrind=$withval],
[with_valgrind=yes])
if test "$with_valgrind" = yes; then
# Most CSSC programs exit with status 1 when there is a problem, and
# some of the regression tests check those cases. However, if valgrind
# detects a problem, we need to exit with some other status so that
# a test expecting an exit status of 1 will actually fail.
AC_CHECK_PROG([VALGRIND], [valgrind],
[valgrind -q --trace-children=yes --error-exitcode=10], [])
else
VALGRIND=""
AC_SUBST(VALGRIND)
fi
dnl Checks for header files.
dnl Standard C header files:-
dnl We check these with language set to C only, otherwise autoconf-2.13 will
dnl attempt to make the check with the C++ compiler. It will then moan about
dnl an undeclared "exit" library function.
AC_LANG([C])
AC_HEADER_STDC
AC_LANG([C++])
echo "Start checking accessibility of C headers while compiling as C++"
AC_CHECK_HEADERS(locale.h)
echo "Done checking accessibility of C headers while compiling as C++"
dnl Posix/Unix header files:-
AC_CHECK_HEADERS(prototypes.h io.h process.h pwd.h)
AC_CHECK_HEADERS(sys/param.h sys/types.h)
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
AC_HEADER_STAT
dnl C++ Header files...
AC_CHECK_HEADERS(string)
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Do not use AC_C_CONST, because the tests for a fully working C "const"
dnl break when you use a standard-conforming C++ compiler.
dnl AC_C_CONST
AC_TYPE_SIZE_T
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_UID_T
dnl AC_CHECK_DECL_IN_HEADER(IDENTIFIER, HEADERS)
AC_DEFUN([AC_CHECK_DECL_IN_HEADER],
[AC_MSG_CHECKING(for $1 in $2)
ac_tr_ident=`echo $1 | tr '.abcdefghijklmnopqrstuvwxyz' '_ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_tr_header=`echo $2 | tr '.abcdefghijklmnopqrstuvwxyz' '_ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_tr_define=${ac_tr_header}_DECLARES_${ac_tr_ident}
AC_CACHE_VAL(ac_cv_decl_$ac_tr_define,
[AC_EGREP_HEADER([$1], [$2],
eval "ac_cv_decl_$ac_tr_define=yes",
eval "ac_cv_decl_$ac_tr_define=no")])dnl
if eval "test \"`echo '$ac_cv_decl_'$ac_tr_define`\" = yes"; then
AC_MSG_RESULT(yes)
# echo 'defining' $ac_tr_define
AC_DEFINE_UNQUOTED($ac_tr_define,1,Define if we have header file $1)
else
# echo 'NOT defining' $ac_tr_define
AC_MSG_RESULT(no)
fi
])
dnl Deductions from proprocessor macros...
AC_MSG_CHECKING([for _POSIX_SAVED_IDS])
AC_CACHE_VAL(cssc_cv_sys_savedids_set,
AC_EGREP_CPP(yes,
[
#include
#ifdef _POSIX_SAVED_IDS
yes
#endif
],
cssc_cv_sys_savedids_set=yes,
cssc_cv_sys_savedids_set=no
))
if test "$cssc_cv_sys_savedids_set" = "yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(SAVED_IDS_OK,1,[Define if _POSIX_SAVED_IDS is provided])
else
AC_MSG_RESULT(no)
fi
dnl Look for declarations in headers.
dnl bsd/sccs.c uses sys_siglist[], if available.
AC_DECL_SYS_SIGLIST
dnl fatalsig.cc uses signal handlers
AC_TYPE_SIGNAL
dnl Checks for library functions.
dnl AC_FUNC_MEMCMP
dnl The "select" that autoscan found was a method. AC_CHECK_FUNCS(select)
AC_CHECK_FUNCS(abort wait)
dnl Check for symlink() and readlink(), which lndir uses.
dnl Check for fsetpos, which testutils/seeker uses.
AC_CHECK_FUNCS(symlink readlink unsetenv fsetpos fileno fstat sysconf memchr)
AC_CHECK_FUNCS(stat getpwuid getlogin setreuid pipe spawn geteuid getegid)
dnl
dnl On AmigsOS, fork() is a stub (in ixemul.library). This means that
dnl AC_CHECK_FUNC will find it and so unless we handle it specially,
dnl configure will set up for using fork(). For AmigaOS, we will probably
dnl use system(). On AmigaOS system() is not going to be a security hole,
dnl since there is no concept of separate users and so no setuid execution,
dnl which is the potential problem with system, and the reason we don't
dnl use it by default.
dnl
AC_MSG_CHECKING([for AmigaOS target])
AC_EGREP_CPP(yes,
[#ifdef __amigaos__
yes
#endif
], is_amigaos=yes, is_amigaos=no)
if test $is_amigaos = yes
then
AC_MSG_RESULT([avoiding fork on AmigaOS])
else
AC_MSG_RESULT(no)
AC_CHECK_FUNCS(fork)
fi
AC_DEFUN([AC_CHECK_GLOBAL],
[
# JY: AC_CHECK_GLOBAL begins
for ac_global in $1
do
ac_tr_global=HAVE_`echo $ac_global | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
AC_MSG_CHECKING([for global variable ${ac_global}])
AC_CACHE_VAL(ac_cv_global_$ac_global,
[
AC_TRY_LINK(dnl
[/* no includes */],
[ extern long int $ac_global; exit((int)$ac_global)],
eval "ac_cv_global_${ac_global}=yes",
eval "ac_cv_global_${ac_global}=no"
)
]
)
if eval "test \"`echo '$ac_cv_global_'$ac_global`\" = yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED($ac_tr_global,1,Define if the global variable $ac_global is available)
else
AC_MSG_RESULT(no)
fi
done
# JY: AC_CHECK_GLOBAL ends
])
dnl Enable some warnings, or not.
want_warnings=no
AC_ARG_ENABLE([warnings],
AS_HELP_STRING([--enable-warnings], [Turn on all potentially-useful compiler warnings]),
[want_warnings=$enableval],[want_warnings=no])
gl_MANYWARN_ALL_GCC([ALL_GCC_WARNINGS])
# Warnings not suitable for C++.
WARNINGS_NOT_CXX="-Waggregate-return -Winline -Wnested-externs -Wtraditional -Wtraditional-conversion -Wdeclaration-after-statement -Wbad-function-cast -Wc++-compat -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes"
# Warnings which give too many false positives from system headers.
WARNINGS_SYS_HEADER_FALSE_POSITIVE="-Wsystem-headers -Wunreachable-code"
# Warnings for things that are actually normal
WARNINGS_NORMAL="-Wundef -Wpadded -Wredundant-decls"
# All unwanted warnings
UNWANTED_CXX_WARNINGS="$WARNINGS_NOT_CXX $WARNINGS_SYS_HEADER_FALSE_POSITIVE $WARNINGS_NORMAL"
AS_IF([test "x$want_warnings" != xno],
[
gl_MANYWARN_COMPLEMENT([GCC_WARNINGS], [$ALL_GCC_WARNINGS], [$UNWANTED_CXX_WARNINGS])
for warning_option in $GCC_WARNINGS
do
gl_WARN_ADD([$warning_option])
done
],[])
dnl *** NOTE:
dnl There can be only ONE call to AC_OUTPUT in each configure.ac,
dnl otherwise you get an error when you run configure. AC_OUTPUT
dnl deletes confdefs.h and so the second invocation can't find it
dnl and so things go wrong.
AC_CONFIG_FILES([src/version.cc Makefile gl/Makefile gl/lib/Makefile gl/doc/Makefile gl/tests/Makefile testutils/Makefile src/Makefile src/sccsdiff.sh bsd/Makefile unit-tests/Makefile tests/Makefile docs/Makefile testutils/decompress_stdin.sh auxfiles/Makefile auxfiles/CSSC.spec sccs-cgi/Makefile docs/config-info.texi unit-tests/testwrapper.sh])
AC_OUTPUT
CSSC-1.3.0/maint.mk 0000644 0000000 0000000 00000127576 11373345566 010635 0000000 0000000 # -*-Makefile-*-
# This Makefile fragment tries to be general-purpose enough to be
# used by many projects via the gnulib maintainer-makefile module.
## Copyright (C) 2001-2010 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 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see .
# This is reported not to work with make-3.79.1
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
ME := maint.mk
# Override this in cfg.mk if you use a non-standard build-aux directory.
build_aux ?= $(srcdir)/build-aux
# Do not save the original name or timestamp in the .tar.gz file.
# Use --rsyncable if available.
gzip_rsyncable := \
$(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
GIT = git
VC = $(GIT)
VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)'
VC_LIST = $(build_aux)/vc-list-files -C $(srcdir)
# You can override this variable in cfg.mk to set your own regexp
# matching files to ignore.
VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$
# This is to preprocess robustly the output of $(VC_LIST), so that even
# when $(srcdir) is a pathological name like "....", the leading sed command
# removes only the intended prefix.
_dot_escaped_srcdir = $(subst .,\.,$(srcdir))
# Post-process $(VC_LIST) output, prepending $(srcdir)/, but only
# when $(srcdir) is not ".".
ifeq ($(srcdir),.)
_prepend_srcdir_prefix =
else
_prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
endif
# In order to be able to consistently filter "."-relative names,
# (i.e., with no $(srcdir) prefix), this definition is careful to
# remove any $(srcdir) prefix, and to restore what it removes.
VC_LIST_EXCEPT = \
$(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \
| if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
| grep -Ev -e '$(VC_LIST_ALWAYS_EXCLUDE_REGEX)' \
$(_prepend_srcdir_prefix)
ifeq ($(origin prev_version_file), undefined)
prev_version_file = $(srcdir)/.prev-version
endif
PREV_VERSION := $(shell cat $(prev_version_file) 2>/dev/null)
VERSION_REGEXP = $(subst .,\.,$(VERSION))
PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
ifeq ($(VC),$(GIT))
this-vc-tag = v$(VERSION)
this-vc-tag-regexp = v$(VERSION_REGEXP)
else
tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
tag-this-version = $(subst .,_,$(VERSION))
this-vc-tag = $(tag-package)-$(tag-this-version)
this-vc-tag-regexp = $(this-vc-tag)
endif
my_distdir = $(PACKAGE)-$(VERSION)
# Old releases are stored here.
release_archive_dir ?= ../release
# Override gnu_rel_host and url_dir_list in cfg.mk if these are not right.
# Use alpha.gnu.org for alpha and beta releases.
# Use ftp.gnu.org for stable releases.
gnu_ftp_host-alpha = alpha.gnu.org
gnu_ftp_host-beta = alpha.gnu.org
gnu_ftp_host-stable = ftp.gnu.org
gnu_rel_host ?= $(gnu_ftp_host-$(RELEASE_TYPE))
ifeq ($(gnu_rel_host),ftp.gnu.org)
url_dir_list ?= http://ftpmirror.gnu.org/$(PACKAGE)
else
url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
endif
# Override this in cfg.mk if you are using a different format in your
# NEWS file.
today = $(shell date +%Y-%m-%d)
news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)'
# Prevent programs like 'sort' from considering distinct strings to be equal.
# Doing it here saves us from having to set LC_ALL elsewhere in this file.
export LC_ALL = C
## --------------- ##
## Sanity checks. ##
## --------------- ##
_cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
# Collect the names of rules starting with `sc_'.
syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
$(srcdir)/$(ME) $(_cfg_mk)))
.PHONY: $(syntax-check-rules)
local-checks-available = \
$(syntax-check-rules)
.PHONY: $(local-checks-available)
# Arrange to print the name of each syntax-checking rule just before running it.
$(syntax-check-rules): %: %.m
sc_m_rules_ = $(patsubst %, %.m, $(syntax-check-rules))
.PHONY: $(sc_m_rules_)
$(sc_m_rules_):
@echo $(patsubst sc_%.m, %, $@)
@date +%s.%N > .sc-start-$(basename $@)
# Compute and print the elapsed time for each syntax-check rule.
sc_z_rules_ = $(patsubst %, %.z, $(syntax-check-rules))
.PHONY: $(sc_z_rules_)
$(sc_z_rules_): %.z: %
@end=$$(date +%s.%N); \
start=$$(cat .sc-start-$*); \
rm -f .sc-start-$*; \
awk -v s=$$start -v e=$$end \
'END {printf "%.2f $(patsubst sc_%,%,$*)\n", e - s}' < /dev/null
# The patsubst here is to replace each sc_% rule with its sc_%.z wrapper
# that computes and prints elapsed time.
local-check := \
$(patsubst sc_%, sc_%.z, \
$(filter-out $(local-checks-to-skip), $(local-checks-available)))
syntax-check: $(local-check)
# _sc_search_regexp
#
# This macro searches for a given construct in the selected files and
# then takes some action.
#
# Parameters (shell variables):
#
# prohibit | require
#
# Regular expression (ERE) denoting either a forbidden construct
# or a required construct. Those arguments are exclusive.
#
# in_vc_files | in_files
#
# grep-E-style regexp denoting the files to check. If no files
# are specified the default are all the files that are under
# version control.
#
# containing | non_containing
#
# Select the files (non) containing strings matching this regexp.
# If both arguments are specified then CONTAINING takes
# precedence.
#
# with_grep_options
#
# Extra options for grep.
#
# ignore_case
#
# Ignore case.
#
# halt
#
# Message to display before to halting execution.
# By default, _sc_search_regexp does not ignore case.
export ignore_case =
_ignore_case = $$(test -n "$$ignore_case" && echo -i || :)
define _sc_say_and_exit
dummy=; : so we do not need a semicolon before each use; \
{ echo -e "$(ME): $$msg" 1>&2; exit 1; };
endef
# _sc_search_regexp used to be named _prohibit_regexp. However,
# upgrading to the new definition and leaving the old name undefined
# would usually convert each custom rule using $(_prohibit_regexp)
# (usually defined in cfg.mk) into a no-op. This definition ensures
# that people know right away if they're still using the old name.
# FIXME: remove in 2012.
_prohibit_regexp = \
$(error '*** you need to s/_prohibit_regexp/_sc_search_regexp/, and adapt')
define _sc_search_regexp
dummy=; : so we do not need a semicolon before each use; \
\
: Check arguments; \
test -n "$$prohibit" && test -n "$$require" \
&& { msg='Cannot specify both prohibit and require' \
$(_sc_say_and_exit) } || :; \
test -z "$$prohibit" && test -z "$$require" \
&& { msg='Should specify either prohibit or require' \
$(_sc_say_and_exit) } || :; \
test -n "$$in_vc_files" && test -n "$$in_files" \
&& { msg='Cannot specify both in_vc_files and in_files' \
$(_sc_say_and_exit) } || :; \
test "x$$halt" != x \
|| { msg='halt not defined' $(_sc_say_and_exit) }; \
\
: Filter by file name; \
if test -n "$$in_files"; then \
files=$$(find $(srcdir) | grep -E "$$in_files"); \
else \
files=$$($(VC_LIST_EXCEPT)); \
if test -n "$$in_vc_files"; then \
files=$$(echo "$$files" | grep -E "$$in_vc_files"); \
fi; \
fi; \
\
: Filter by content; \
test -n "$$files" && test -n "$$containing" \
&& { files=$$(grep -l "$$containing" $$files); } || :; \
test -n "$$files" && test -n "$$non_containing" \
&& { files=$$(grep -vl "$$non_containing" $$files); } || :; \
\
: Check for the construct; \
if test -n "$$files"; then \
if test -n "$$prohibit"; then \
grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
&& { msg="$$halt" $(_sc_say_and_exit) } || :; \
else \
grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
| grep . \
&& { msg="$$halt" $(_sc_say_and_exit) } || :; \
fi \
else :; \
fi || :;
endef
sc_avoid_if_before_free:
@$(build_aux)/useless-if-before-free \
$(useless_free_options) \
$$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \
{ echo '$(ME): found useless "if" before "free" above' 1>&2; \
exit 1; } || :
sc_cast_of_argument_to_free:
@prohibit='\' \
halt='don'\''t cast x*alloc return value' \
$(_sc_search_regexp)
sc_cast_of_alloca_return_value:
@prohibit='\*\) *alloca\>' \
halt='don'\''t cast alloca return value' \
$(_sc_search_regexp)
sc_space_tab:
@prohibit='[ ] ' \
halt='found SPACE-TAB sequence; remove the SPACE' \
$(_sc_search_regexp)
# Don't use *scanf or the old ato* functions in `real' code.
# They provide no error checking mechanism.
# Instead, use strto* functions.
sc_prohibit_atoi_atof:
@prohibit='\<([fs]?scanf|ato([filq]|ll)) *\(' \
halt='do not use *scan''f, ato''f, ato''i, ato''l, ato''ll or ato''q' \
$(_sc_search_regexp)
# Use STREQ rather than comparing strcmp == 0, or != 0.
sc_prohibit_strcmp:
@grep -nE '! *str''cmp *\(|\&2; exit 1; } || :
# Pass EXIT_*, not number, to usage, exit, and error (when exiting)
# Convert all uses automatically, via these two commands:
# git grep -l '\&2; \
exit 1; } || :
# Error messages should not start with a capital letter
sc_error_message_uppercase:
@grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \
| grep -E '"[A-Z]' \
| grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' && \
{ echo '$(ME): found capitalized error message' 1>&2; \
exit 1; } || :
# Error messages should not end with a period
sc_error_message_period:
@grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \
| grep -E '[^."]\."' && \
{ echo '$(ME): found error message ending in period' 1>&2; \
exit 1; } || :
sc_file_system:
@prohibit=file''system \
ignore_case=1 \
halt='found use of "file''system"; spell it "file system"' \
$(_sc_search_regexp)
# Don't use cpp tests of this symbol. All code assumes config.h is included.
sc_prohibit_have_config_h:
@prohibit='^# *if.*HAVE''_CONFIG_H' \
halt='found use of HAVE''_CONFIG_H; remove' \
$(_sc_search_regexp)
# Nearly all .c files must include . However, we also permit this
# via inclusion of a package-specific header, if cfg.mk specified one.
# config_h_header must be suitable for grep -E.
config_h_header ?=
sc_require_config_h:
@require='^# *include $(config_h_header)' \
in_vc_files='\.c$$' \
halt='the above files do not include ' \
$(_sc_search_regexp)
# You must include before including any other header file.
# This can possibly be via a package-specific header, if given by cfg.mk.
sc_require_config_h_first:
@if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \
fail=0; \
for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \
grep '^# *include\>' $$i | sed 1q \
| grep -E '^# *include $(config_h_header)' > /dev/null \
|| { echo $$i; fail=1; }; \
done; \
test $$fail = 1 && \
{ echo '$(ME): the above files include some other header' \
'before ' 1>&2; exit 1; } || :; \
else :; \
fi
sc_prohibit_HAVE_MBRTOWC:
@prohibit='\bHAVE_MBRTOWC\b' \
halt="do not use $$prohibit; it is always defined" \
$(_sc_search_regexp)
# To use this "command" macro, you must first define two shell variables:
# h: the header, enclosed in <> or ""
# re: a regular expression that matches IFF something provided by $h is used.
define _sc_header_without_use
dummy=; : so we do not need a semicolon before each use; \
h_esc=`echo "$$h"|sed 's/\./\\\\./g'`; \
if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \
files=$$(grep -l '^# *include '"$$h_esc" \
$$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \
grep -LE "$$re" $$files | grep . && \
{ echo "$(ME): the above files include $$h but don't use it" \
1>&2; exit 1; } || :; \
else :; \
fi
endef
# Prohibit the inclusion of assert.h without an actual use of assert.
sc_prohibit_assert_without_use:
@h='' re='\' re='\new(file => "/dev/stdin")->as_string'|sed 's/\?://g'
# Note this was produced by the above:
# _xa1 = \
#x(((2n?)?re|c(har)?|n(re|m)|z)alloc|alloc_(oversized|die)|m(alloc|emdup)|strdup)
# But we can do better, in at least two ways:
# 1) take advantage of two "dup"-suffixed strings:
# x(((2n?)?re|c(har)?|n(re|m)|[mz])alloc|alloc_(oversized|die)|(mem|str)dup)
# 2) notice that "c(har)?|[mz]" is equivalent to the shorter and more readable
# "char|[cmz]"
# x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
_xa1 = x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
_xa2 = X([CZ]|N?M)ALLOC
sc_prohibit_xalloc_without_use:
@h='"xalloc.h"' \
re='\<($(_xa1)|$(_xa2)) *\('\
$(_sc_header_without_use)
# Extract function names:
# perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) *\(/ and print $1' lib/hash.h
_hash_re = \
clear|delete|free|get_(first|next)|insert|lookup|print_statistics|reset_tuning
_hash_fn = \<($(_hash_re)) *\(
_hash_struct = (struct )?\<[Hh]ash_(table|tuning)\>
sc_prohibit_hash_without_use:
@h='"hash.h"' \
re='$(_hash_fn)|$(_hash_struct)'\
$(_sc_header_without_use)
sc_prohibit_hash_pjw_without_use:
@h='"hash-pjw.h"' \
re='\]' re='\' \
re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>' \
$(_sc_header_without_use)
# Prohibit the inclusion of strings.h without a sensible use.
# Using the likes of bcmp, bcopy, bzero, index or rindex is not sensible.
sc_prohibit_strings_without_use:
@h='' \
re='\<(strn?casecmp|ffs(ll)?)\>' \
$(_sc_header_without_use)
# Get the list of symbol names with this:
# perl -lne '/^# *define (\w+)\(/ and print $1' lib/intprops.h|grep -v '^s'|fmt
_intprops_names = \
TYPE_IS_INTEGER TYPE_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT \
TYPE_SIGNED_MAGNITUDE TYPE_SIGNED TYPE_MINIMUM TYPE_MAXIMUM \
INT_STRLEN_BOUND INT_BUFSIZE_BOUND
_intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names)))
# Prohibit the inclusion of intprops.h without an actual use.
sc_prohibit_intprops_without_use:
@h='"intprops.h"' \
re='\<($(_intprops_syms_re)) *\(' \
$(_sc_header_without_use)
sc_obsolete_symbols:
@prohibit='\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
halt='do not use HAVE''_FCNTL_H or O'_NDELAY \
$(_sc_search_regexp)
# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
# Each nonempty ChangeLog line must start with a year number, or a TAB.
sc_changelog:
@prohibit='^[^12 ]' \
in_vc_files='^ChangeLog$$' \
halt='found unexpected prefix in a ChangeLog' \
$(_sc_search_regexp)
# Ensure that each .c file containing a "main" function also
# calls set_program_name.
sc_program_name:
@require='set_program_name *\(m?argv\[0\]\);' \
in_vc_files='\.c$$' \
containing='^main *(' \
halt='the above files do not call set_program_name' \
$(_sc_search_regexp)
# Require that the final line of each test-lib.sh-using test be this one:
# Exit $fail
# Note: this test requires GNU grep's --label= option.
Exit_witness_file ?= tests/test-lib.sh
Exit_base := $(notdir $(Exit_witness_file))
sc_require_test_exit_idiom:
@if test -f $(srcdir)/$(Exit_witness_file); then \
die=0; \
for i in $$(grep -l -F 'srcdir/$(Exit_base)' \
$$($(VC_LIST) tests)); do \
tail -n1 $$i | grep '^Exit .' > /dev/null \
&& : || { die=1; echo $$i; } \
done; \
test $$die = 1 && \
{ echo 1>&2 '$(ME): the final line in each of the above is not:'; \
echo 1>&2 'Exit something'; \
exit 1; } || :; \
fi
sc_the_the:
@prohibit='\' \
ignore_case=1 \
halt='found use of "the ''the";' \
$(_sc_search_regexp)
sc_trailing_blank:
@prohibit='[ ]$$' \
halt='found trailing blank(s)' \
$(_sc_search_regexp)
# Match lines like the following, but where there is only one space
# between the options and the description:
# -D, --all-repeated[=delimit-method] print all duplicate lines\n
longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)?
sc_two_space_separator_in_usage:
@prohibit='^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \
halt='help2man requires at least two spaces between an option and its description'\
$(_sc_search_regexp)
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
@grep -nE \
'\&2; \
exit 1; } || :
# Avoid useless parentheses like those in this example:
# #if defined (SYMBOL) || defined (SYM2)
sc_useless_cpp_parens:
@prohibit='^# *if .*defined *\(' \
halt='found useless parentheses in cpp directive' \
$(_sc_search_regexp)
# List headers for which HAVE_HEADER_H is always true, assuming you are
# using the appropriate gnulib module. CAUTION: for each "unnecessary"
# #if HAVE_HEADER_H that you remove, be sure that your project explicitly
# requires the gnulib module that guarantees the usability of that header.
gl_assured_headers_ = \
cd $(gnulib_dir)/lib && echo *.in.h|sed 's/\.in\.h//g'
# Convert the list of names to upper case, and replace each space with "|".
az_ = abcdefghijklmnopqrstuvwxyz
AZ_ = ABCDEFGHIJKLMNOPQRSTUVWXYZ
gl_header_upper_case_or_ = \
$$($(gl_assured_headers_) \
| tr $(az_)/.- $(AZ_)___ \
| tr -s ' ' '|' \
)
sc_prohibit_always_true_header_tests:
@or=$(gl_header_upper_case_or_); \
re="HAVE_($$or)_H"; \
prohibit='\<'"$$re"'\>' \
halt='do not test the above HAVE__H symbol(s);\n'\
' with the corresponding gnulib module, they are always true' \
$(_sc_search_regexp)
# ==================================================================
gl_other_headers_ ?= \
intprops.h \
openat.h \
stat-macros.h
# Perl -lne code to extract "significant" cpp-defined symbols from a
# gnulib header file, eliminating a few common false-positives.
gl_extract_significant_defines_ = \
/^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\
&& $$2 !~ /(?:rpl_|_used_without_)/\
&& $$1 !~ /^(?:NSIG|ATTRIBUTE_NORETURN)$$/\
and print $$1
# Create a list of regular expressions matching the names
# of macros that are guaranteed to be defined by parts of gnulib.
define def_sym_regex
gen_h=$(gl_generated_headers_); \
(cd $(gnulib_dir)/lib; \
for f in *.in.h $(gl_other_headers_); do \
perl -lne '$(gl_extract_significant_defines_)' $$f; \
done; \
) | sort -u \
| sed 's/^/^ *# *define /;s/$$/\\>/'
endef
# Don't define macros that we already get from gnulib header files.
sc_prohibit_always-defined_macros:
@if test -d $(gnulib_dir); then \
case $$(echo all: | grep -l -f - Makefile) in Makefile);; *) \
echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \
esac; \
$(def_sym_regex) | grep -f - $$($(VC_LIST_EXCEPT)) \
&& { echo '$(ME): define the above via some gnulib .h file' \
1>&2; exit 1; } || :; \
fi
# ==================================================================
# Prohibit checked in backup files.
sc_prohibit_backup_files:
@$(VC_LIST) | grep '~$$' && \
{ echo '$(ME): found version controlled backup file' 1>&2; \
exit 1; } || :
# Require the latest GPL.
sc_GPL_version:
@prohibit='either ''version [^3]' \
halt='GPL vN, N!=3' \
$(_sc_search_regexp)
# Require the latest GFDL. Two regexp, since some .texi files end up
# line wrapping between 'Free Documentation License,' and 'Version'.
_GFDL_regexp = (Free ''Documentation.*Version 1\.[^3]|Version 1\.[^3] or any)
sc_GFDL_version:
@prohibit='$(_GFDL_regexp)' \
halt='GFDL vN, N!=3' \
$(_sc_search_regexp)
# Don't use Texinfo @acronym{} as it is not a good idea.
texinfo_suffix_re_ ?= \.(txi|texi(nfo)?)$$
sc_texinfo_acronym:
@prohibit='@acronym\{' \
in_vc_files='$(texinfo_suffix_re_)' \
halt='found use of Texinfo @acronym{}' \
$(_sc_search_regexp)
cvs_keywords = \
Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State
sc_prohibit_cvs_keyword:
@prohibit='\$$($(cvs_keywords))\$$' \
halt='do not use CVS keyword expansion' \
$(_sc_search_regexp)
# This Perl code is slightly obfuscated. Not only is each "$" doubled
# because it's in a Makefile, but the $$c's are comments; we cannot
# use "#" due to the way the script ends up concatenated onto one line.
# It would be much more concise, and would produce better output (including
# counts) if written as:
# perl -ln -0777 -e '/\n(\n+)$/ and print "$ARGV: ".length $1' ...
# but that would be far less efficient, reading the entire contents
# of each file, rather than just the last two bytes of each.
#
# This is a perl script that is expected to be the single-quoted argument
# to a command-line "-le". The remaining arguments are file names.
# Print the name of each file that ends in two or more newline bytes.
# Exit nonzero if at least one such file is found, otherwise, exit 0.
# Warn about, but otherwise ignore open failure. Ignore seek/read failure.
#
# Use this if you want to remove trailing empty lines from selected files:
# perl -pi -0777 -e 's/\n\n+$/\n/' files...
#
detect_empty_lines_at_EOF_ = \
foreach my $$f (@ARGV) \
{ \
open F, "<", $$f or (warn "failed to open $$f: $$!\n"), next; \
my $$p = sysseek (F, -2, 2); \
my $$c = "seek failure probably means file has < 2 bytes; ignore"; \
my $$last_two_bytes; \
defined $$p and $$p = sysread F, $$last_two_bytes, 2; \
close F; \
$$c = "ignore read failure"; \
$$p && $$last_two_bytes eq "\n\n" and (print $$f), $$fail=1; \
} \
END { exit defined $$fail }
sc_prohibit_empty_lines_at_EOF:
@perl -le '$(detect_empty_lines_at_EOF_)' $$($(VC_LIST_EXCEPT)) \
|| { echo '$(ME): the above files end with empty line(s)' \
1>&2; exit 1; } || :; \
# Make sure we don't use st_blocks. Use ST_NBLOCKS instead.
# This is a bit of a kludge, since it prevents use of the string
# even in comments, but for now it does the job with no false positives.
sc_prohibit_stat_st_blocks:
@prohibit='[.>]st_blocks' \
halt='do not use st_blocks; use ST_NBLOCKS' \
$(_sc_search_regexp)
# Make sure we don't define any S_IS* macros in src/*.c files.
# They're already defined via gnulib's sys/stat.h replacement.
sc_prohibit_S_IS_definition:
@prohibit='^ *# *define *S_IS' \
halt='do not define S_IS* macros; include ' \
$(_sc_search_regexp)
_ptm1 = use "test C1 && test C2", not "test C1 -''a C2"
_ptm2 = use "test C1 || test C2", not "test C1 -''o C2"
# Using test's -a and -o operators is not portable.
# We prefer test over [, since the latter is spelled [[ in configure.ac.
sc_prohibit_test_minus_ao:
@prohibit='(\ /dev/null \
|| { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \
done; \
test $$fail = 1 && \
{ echo 1>&2 '$(ME): the above do not link with any ICONV library'; \
exit 1; } || :; \
fi
# Warn about "c0nst struct Foo const foo[]",
# but not about "char const *const foo" or "#define const const".
sc_redundant_const:
@prohibit='\bconst\b[[:space:][:alnum:]]{2,}\bconst\b' \
halt='redundant "const" in declarations' \
$(_sc_search_regexp)
sc_const_long_option:
@grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT)) \
| grep -Ev 'const struct option|struct option const' && { \
echo 1>&2 '$(ME): add "const" to the above declarations'; \
exit 1; } || :
NEWS_hash = \
$$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
$(srcdir)/NEWS \
| perl -0777 -pe \
's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \
| md5sum - \
| sed 's/ .*//')
# Ensure that we don't accidentally insert an entry into an old NEWS block.
sc_immutable_NEWS:
@if test -f $(srcdir)/NEWS; then \
test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : || \
{ echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \
fi
# Update the hash stored above. Do this after each release and
# for any corrections to old entries.
update-NEWS-hash: NEWS
perl -pi -e 's/^(old_NEWS_hash[ \t]+:?=[ \t]+).*/$${1}'"$(NEWS_hash)/" \
$(srcdir)/cfg.mk
# Ensure that we use only the standard $(VAR) notation,
# not @...@ in Makefile.am, now that we can rely on automake
# to emit a definition for each substituted variable.
# We use perl rather than "grep -nE ..." to exempt a single
# use of an @...@-delimited variable name in src/Makefile.am.
# Allow the package to add exceptions via a hook in cfg.mk;
# for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by
# setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
_makefile_at_at_check_exceptions ?=
sc_makefile_at_at_check:
@perl -ne '/\@[A-Z_0-9]+\@/'$(_makefile_at_at_check_exceptions) \
-e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \
$$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
news-check: NEWS
if head $(srcdir)/NEWS | grep -E $(news-check-regexp) \
>/dev/null; then \
:; \
else \
echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \
exit 1; \
fi
sc_makefile_TAB_only_indentation:
@prohibit='^ [ ]{8}' \
in_vc_files='akefile|\.mk$$' \
halt='found TAB-8-space indentation' \
$(_sc_search_regexp)
sc_m4_quote_check:
@prohibit='(AC_DEFINE(_UNQUOTED)?|AC_DEFUN)\([^[]' \
in_vc_files='(^configure\.ac|\.m4)$$' \
halt='quote the first arg to AC_DEF*' \
$(_sc_search_regexp)
fix_po_file_diag = \
'you have changed the set of files with translatable diagnostics;\n\
apply the above patch\n'
# Verify that all source files using _() are listed in po/POTFILES.in.
po_file = po/POTFILES.in
sc_po_check:
@if test -f $(po_file); then \
grep -E -v '^(#|$$)' $(po_file) \
| grep -v '^src/false\.c$$' | sort > $@-1; \
files=; \
for file in $$($(VC_LIST_EXCEPT)) lib/*.[ch]; do \
test -r $$file || continue; \
case $$file in \
*.m4|*.mk) continue ;; \
*.?|*.??) ;; \
*) continue;; \
esac; \
case $$file in \
*.[ch]) \
base=`expr " $$file" : ' \(.*\)\..'`; \
{ test -f $$base.l || test -f $$base.y; } && continue;; \
esac; \
files="$$files $$file"; \
done; \
grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
| sort -u > $@-2; \
diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \
|| { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \
rm -f $@-1 $@-2; \
fi
# Sometimes it is useful to change the PATH environment variable
# in Makefiles. When doing so, it's better not to use the Unix-centric
# path separator of `:', but rather the automake-provided `$(PATH_SEPARATOR)'.
msg = '$(ME): Do not use `:'\'' above; use $$(PATH_SEPARATOR) instead'
sc_makefile_path_separator_check:
@prohibit='PATH[=].*:' \
in_vc_files='akefile|\.mk$$' \
halt=$(msg) \
$(_sc_search_regexp)
# Check that `make alpha' will not fail at the end of the process.
writable-files:
if test -d $(release_archive_dir); then :; else \
for file in $(distdir).tar.gz \
$(release_archive_dir)/$(distdir).tar.gz; do \
test -e $$file || continue; \
test -w $$file \
|| { echo ERROR: $$file is not writable; fail=1; }; \
done; \
test "$$fail" && exit 1 || : ; \
fi
v_etc_file = lib/version-etc.c
sample-test = tests/sample-test
texi = doc/$(PACKAGE).texi
# Make sure that the copyright date in $(v_etc_file) is up to date.
# Do the same for the $(sample-test) and the main doc/.texi file.
sc_copyright_check:
@require='enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' \
in_files=$(v_etc_file) \
halt='out of date copyright in $(v_etc_file); update it' \
$(_sc_search_regexp)
@require='# Copyright \(C\) '$$(date +%Y)' Free' \
in_vc_files=$(sample-test) \
halt='out of date copyright in $(sample-test); update it' \
$(_sc_search_regexp)
@require='Copyright @copyright\{\} .*'$$(date +%Y)' Free' \
in_vc_files=$(texi) \
halt='out of date copyright in $(texi); update it' \
$(_sc_search_regexp)
# If tests/help-version exists and seems to be new enough, assume that its
# use of init.sh and path_prepend_ is correct, and ensure that every other
# use of init.sh is identical.
# This is useful because help-version cross-checks prog --version
# with $(VERSION), which verifies that its path_prepend_ invocation
# sets PATH correctly. This is an inexpensive way to ensure that
# the other init.sh-using tests also get it right.
_hv_file ?= $(srcdir)/tests/help-version
_hv_regex_weak ?= ^ *\. .*/init\.sh"
_hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh"
sc_cross_check_PATH_usage_in_tests:
@if test -f $(_hv_file); then \
grep -l 'VERSION mismatch' $(_hv_file) >/dev/null \
|| { echo "$@: skipped: no such file: $(_hv_file)" 1>&2; \
exit 0; }; \
grep -lE '$(_hv_regex_strong)' $(_hv_file) >/dev/null \
|| { echo "$@: $(_hv_file) lacks conforming use of init.sh" 1>&2; \
exit 1; }; \
good=$$(grep -E '$(_hv_regex_strong)' $(_hv_file)); \
grep -LFx "$$good" \
$$(grep -lE '$(_hv_regex_weak)' $$($(VC_LIST_EXCEPT))) \
| grep . && \
{ echo "$(ME): the above files use path_prepend_ inconsistently" \
1>&2; exit 1; } || :; \
fi
# #if HAVE_... will evaluate to false for any non numeric string.
# That would be flagged by using -Wundef, however gnulib currently
# tests many undefined macros, and so we can't enable that option.
# So at least preclude common boolean strings as macro values.
sc_Wundef_boolean:
@prohibit='^#define.*(yes|no|true|false)$$' \
in_files='$(CONFIG_INCLUDE)' \
halt='Use 0 or 1 for macro values' \
$(_sc_search_regexp)
sc_vulnerable_makefile_CVE-2009-4029:
@prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
in_files=$$(find $(srcdir) -name Makefile.in) \
halt='the above files are vulnerable; beware of running\n'\
'"make dist*" rules, and upgrade to fixed automake\n'\
'see http://bugzilla.redhat.com/542609 for details' \
$(_sc_search_regexp)
vc-diff-check:
(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
if test -s vc-diffs; then \
cat vc-diffs; \
echo "Some files are locally modified:" 1>&2; \
exit 1; \
else \
rm vc-diffs; \
fi
rel-files = $(DIST_ARCHIVES)
gnulib_dir ?= $(srcdir)/gnulib
gnulib-version = $$(cd $(gnulib_dir) && git describe)
bootstrap-tools ?= autoconf,automake,gnulib
# If it's not already specified, derive the GPG key ID from
# the signed tag we've just applied to mark this release.
gpg_key_ID ?= \
$$(git cat-file tag v$(VERSION) > .ann-sig \
&& gpgv .ann-sig - < /dev/null 2>&1 \
| sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig)
translation_project_ ?= coordinator@translationproject.org
announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
announcement_mail_headers_ ?= \
To: info-gnu@gnu.org \
Cc: $(announcement_Cc_) \
Mail-Followup-To: $(PACKAGE_BUGREPORT)
announcement: NEWS ChangeLog $(rel-files)
@$(build_aux)/announce-gen \
--mail-headers='$(announcement_mail_headers_)' \
--release-type=$(RELEASE_TYPE) \
--package=$(PACKAGE) \
--prev=$(PREV_VERSION) \
--curr=$(VERSION) \
--gpg-key-id=$(gpg_key_ID) \
--news=$(srcdir)/NEWS \
--bootstrap-tools=$(bootstrap-tools) \
--gnulib-version=$(gnulib-version) \
--no-print-checksums \
$(addprefix --url-dir=, $(url_dir_list))
## ---------------- ##
## Updating files. ##
## ---------------- ##
ftp-gnu = ftp://ftp.gnu.org/gnu
www-gnu = http://www.gnu.org
upload_dest_dir_ ?= $(PACKAGE)
emit_upload_commands:
@echo =====================================
@echo =====================================
@echo "$(build_aux)/gnupload $(GNUPLOADFLAGS) \\"
@echo " --to $(gnu_rel_host):$(upload_dest_dir_) \\"
@echo " $(rel-files)"
@echo '# send the ~/announce-$(my_distdir) e-mail'
@echo =====================================
@echo =====================================
noteworthy = * Noteworthy changes in release ?.? (????-??-??) [?]
define emit-commit-log
printf '%s\n' 'post-release administrivia' '' \
'* NEWS: Add header line for next release.' \
'* .prev-version: Record previous version.' \
'* cfg.mk (old_NEWS_hash): Auto-update.'
endef
.PHONY: no-submodule-changes
no-submodule-changes:
if test -d $(srcdir)/.git; then \
diff=$$(cd $(srcdir) && git submodule -q foreach \
git diff-index --name-only HEAD) \
|| exit 1; \
case $$diff in '') ;; \
*) echo '$(ME): submodule files are locally modified:'; \
echo "$$diff"; exit 1;; esac; \
else \
: ; \
fi
.PHONY: alpha beta stable
ALL_RECURSIVE_TARGETS += alpha beta stable
alpha beta stable: $(local-check) writable-files no-submodule-changes
test $@ = stable \
&& { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
|| :
$(MAKE) vc-diff-check
$(MAKE) news-check
$(MAKE) distcheck
$(MAKE) dist XZ_OPT=-9ev
$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
# Override this in cfg.mk if you follow different procedures.
release-prep-hook ?= release-prep
.PHONY: release-prep
release-prep:
case $$RELEASE_TYPE in alpha|beta|stable) ;; \
*) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
$(MAKE) -s announcement > ~/announce-$(my_distdir)
if test -d $(release_archive_dir); then \
ln $(rel-files) $(release_archive_dir); \
chmod a-w $(rel-files); \
fi
echo $(VERSION) > $(prev_version_file)
$(MAKE) update-NEWS-hash
perl -pi -e '$$. == 3 and print "$(noteworthy)\n\n\n"' NEWS
$(emit-commit-log) > .ci-msg
$(VC) commit -F .ci-msg -a
rm .ci-msg
# Override this with e.g., -s $(srcdir)/some_other_name.texi
# if the default $(PACKAGE)-derived name doesn't apply.
gendocs_options_ ?=
.PHONY: web-manual
web-manual:
@test -z "$(manual_title)" \
&& { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
@cd '$(srcdir)/doc'; \
$(SHELL) ../build-aux/gendocs.sh $(gendocs_options_) \
-o '$(abs_builddir)/doc/manual' \
--email $(PACKAGE_BUGREPORT) $(PACKAGE) \
"$(PACKAGE_NAME) - $(manual_title)"
@echo " *** Upload the doc/manual directory to web-cvs."
# Code Coverage
init-coverage:
$(MAKE) $(AM_MAKEFLAGS) clean
lcov --directory . --zerocounters
COVERAGE_CCOPTS ?= "-g --coverage"
COVERAGE_OUT ?= doc/coverage
build-coverage:
$(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS)
$(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check
mkdir -p $(COVERAGE_OUT)
lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \
--capture
gen-coverage:
genhtml --output-directory $(COVERAGE_OUT) \
$(COVERAGE_OUT)/$(PACKAGE).info \
--highlight --frames --legend \
--title "$(PACKAGE_NAME)"
coverage: init-coverage build-coverage gen-coverage
# Update gettext files.
PACKAGE ?= $(shell basename $(PWD))
PO_DOMAIN ?= $(PACKAGE)
POURL = http://translationproject.org/latest/$(PO_DOMAIN)/
PODIR ?= po
refresh-po:
rm -f $(PODIR)/*.po && \
echo "$(ME): getting translations into po (please ignore the robots.txt ERROR 404)..." && \
wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \
echo 'en@boldquot' > $(PODIR)/LINGUAS && \
echo 'en@quot' >> $(PODIR)/LINGUAS && \
ls $(PODIR)/*.po | sed 's/\.po//' | sed 's,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS
# Running indent once is not idempotent, but running it twice is.
INDENT_SOURCES ?= $(C_SOURCES)
.PHONY: indent
indent:
indent $(INDENT_SOURCES)
indent $(INDENT_SOURCES)
# If you want to set UPDATE_COPYRIGHT_* environment variables,
# put the assignments in this variable.
update-copyright-env ?=
# Run this rule once per year (usually early in January)
# to update all FSF copyright year lists in your project.
# If you have an additional project-specific rule,
# add it in cfg.mk along with a line 'update-copyright: prereq'.
# By default, exclude all variants of COPYING; you can also
# add exemptions (such as ChangeLog..* for rotated change logs)
# in the file .x-update-copyright.
.PHONY: update-copyright
update-copyright:
grep -l -w Copyright \
$$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
| $(update-copyright-env) xargs $(build_aux)/$@
CSSC-1.3.0/COPYING 0000644 0000000 0000000 00000104374 11362630513 010201 0000000 0000000
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
CSSC-1.3.0/bsd/ 0000755 0000000 0000000 00000000000 11465500660 007770 5 0000000 0000000 CSSC-1.3.0/bsd/sccs.me 0000644 0000000 0000000 00000104240 11362630513 011164 0000000 0000000 .\" Copyright (c) 1986, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)sccs.me 8.2 (Berkeley) 6/1/94
.\"
.eh '\fRPSD:14-%\fP''\fRAn Introduction to the Source Code Control System\fP'
.oh '\fRAn Introduction to the Source Code Control System\fP''\fRPSD:14-%\fP'
.ds S \s-1SCCS\s0
.ds I \s-1SID\s0
.nr bi 8n
.ev 1 \" only for keeps
.ss 16
.ev
.\".he '\*S Introduction''%'
.+c
.(l C
.sz 14
.b
An Introduction to the
Source Code Control System
.sz
.r
.sp
Eric Allman
.i "Project Ingres"
.i "University of California at Berkeley"
.)l
.sp 3
.pp
.(f
This is version 1.21 of this document.
It was last modified on 12/5/80.
.)f
This document gives a quick introduction
to using the Source Code Control System
(\*S).
The presentation is geared to programmers
who are more concerned with
what
to do to get a task done
rather than how it works;
for this reason some of the examples
are not well explained.
For details of what the magic options do,
see the section on
.q "Further Information" .
.(l F
This is a working document.
Please send any comments or suggestions
to eric@Berkeley.Edu.
.)l
.sh 1 "Introduction"
.pp
\*S is a source management system.
Such a system maintains a record of versions of a system;
a record is kept with each set of changes
of what the changes are,
why they were made,
and who made them and when.
Old versions can be recovered,
and different versions can be maintained simultaneously.
In projects with more than one person,
\*S will insure that two people are not
editing the same file at the same time.
.pp
All versions of your program,
plus the log and other information,
is kept in a file called the
.q "s-file" .
There are three major operations
that can be performed on the s-file:
.np
Get a file for compilation (not for editing).
This operation retrieves a version of the file
from the s-file.
By default, the latest version is retrieved.
This file is intended for compilation, printing, or whatever;
it is specifically NOT intended to be edited
or changed in any way;
any changes made to a file retrieved
in this way will probably be lost.
.np
Get a file for editing.
This operation also retrieves a version of the file
from the s-file,
but this file is intended to be edited and then
incorporated back into the s-file.
Only one person may be editing a file at one time.
.np
Merge a file back into the s-file.
This is the companion operation to (2).
A new version number is assigned,
and comments are saved explaining why this change was made.
.sh 1 "Learning the Lingo"
.pp
There are a number of terms that are worth learning
before we go any farther.
.sh 2 "S-file"
.pp
The s-file
is a single file that holds all the different versions
of your file.
The s-file is stored in
differential format;
.i i.e. ,
only the differences between versions are stored,
rather than the entire text of the new version.
This saves disk space
and allows selective changes to be removed later.
Also included in the s-file
is some header information for each version,
including the comments given by the person who
created the version explaining why the changes were made.
.sh 2 "Deltas"
.pp
Each set of changes to the s-file
(which is approximately [but not exactly!] equivalent
to a version of the file)
is called a
.i delta .
Although technically a delta only includes the
.i changes
made,
in practice
it is usual for
each delta to be made with respect to
all the deltas that have occurred before\**.
.(f
\**This matches normal usage, where the previous changes are not saved
at all,
so all changes are automatically based on all other changes
that have happened through history.
.)f
However,
it is possible to get a version of the file
that has selected deltas removed out of the middle
of the list of changes \*-
equivalent to removing your changes later.
.sh 2 "\*I's (or, version numbers)"
.pp
A \*I
(\*S Id)
is a number that represents a delta.
This is normally a two-part number
consisting of a
.q release
number and a
.q level
number.
Normally the release number stays the same,
however,
it is possible to move into a new release
if some major change is being made.
.pp
Since all past deltas are normally applied,
the \*I of the final delta applied
can be used to represent a version number of the file
as a whole.
.sh 2 "Id keywords"
.pp
When you get a version of a file
with intent to compile and install it
(\c
.i i.e. ,
something other than edit it),
some special keywords are expanded inline
by \*S.
These
.i "Id Keywords"
can be used to include the current version number
or other information into the file.
All id keywords are of the form
.b % \c
.i x \c
.b % ,
where
.i x
is an upper case letter.
For example,
.b %\&I\&%
is the \*I of the latest delta applied,
.b %\&W\&%
includes the module name,
\*I,
and a mark that makes it findable by a program,
and
.b %\&G\&%
is the date of the latest delta applied.
There are many others,
most of which are of dubious usefulness.
.pp
When you get a file for editing,
the id keywords are not expanded;
this is so that after you put them back in to the s-file,
they will be expanded automatically on each new version.
But notice: if you were to get them
expanded accidently,
then your file would appear to be the same version
forever more,
which would of course defeat the purpose.
Also,
if you should install a version of the program
without expanding the id keywords,
it will be impossible to tell what version it is
(since all it will have is
.q %\&W\&%
or whatever).
.sh 1 "Creating \*S Files"
.pp
To put source files
into
\*S
format, run the following shell script from csh:
.(b
mkdir SCCS save
foreach i (*.[ch])
sccs admin \-i$i $i
mv $i save/$i
end
.)b
This will put the named files
into s-files
in the subdirectory
.q SCCS
The files will be removed from the current directory
and hidden away in the directory
.q save ,
so the next thing you will probably want to do
is to get all the files
(described below).
When you are convinced that
\*S has correctly created the s-files,
you should remove the directory
.q save .
.pp
If you want to have id keywords in the files,
it is best to put them in before you create the s-files.
If you do not,
.i admin
will print
.q "No Id Keywords (cm7)" ,
which is a warning message only.
.sh 1 "Getting Files for Compilation"
.pp
To get a copy of the latest version
of a file,
run
.(b
sccs get prog.c
.)b
\*S will respond:
.(b
1.1
87 lines
.)b
meaning that version 1.1 was retrieved\**
.(f
\**Actually,
the \*I of the final delta applied was 1.1.
.)f
and that it has 87 lines.
The file
.i prog.c
will be created
in the current directory.
The file will be read-only
to remind you that you are not
supposed to change it.
.pp
This copy of the file
should not be changed,
since \*S is unable
to merge the changes
back into the s-file.
If you do make changes,
they will be lost the next time
someone does a
.i get .
.sh 1 "Changing Files (or, Creating Deltas)"
.sh 2 "Getting a copy to edit"
.pp
To edit a source file,
you must first get it,
requesting permission to edit it\**:
.(f
\**The
.q "edit"
command is equivalent to using the \-e
flag to
.i "get" ,
as:
.(l
sccs get \-e prog.c
.)l
Keep this in mind when reading other documentation.
.)f
.(b
sccs edit prog.c
.)b
The response will be the same as with
.i get
except that it will also say:
.(b
New delta 1.2
.)b
You then edit it,
using a standard text editor:
.(b
vi prog.c
.)b
.sh 2 "Merging the changes back into the s-file"
.pp
When the desired changes are made,
you can put your changes into the
\*S
file using the
.i delta
command:
.(b
sccs delta prog.c
.)b
.pp
Delta will prompt you for
.q "comments?"
before it merges the changes in.
At this prompt you should type a one-line description
of what the changes mean
(more lines can be entered by ending each line
except the last with a backslash\**).
.(f
\**Yes, this is a stupid default.
.)f
.i Delta
will then type:
.(b
1.2
5 inserted
3 deleted
84 unchanged
.)b
saying that delta 1.2 was created,
and it inserted five lines,
removed three lines,
and left 84 lines unchanged\**.
.(f
\**Changes to a line are counted as a line deleted
and a line inserted.
.)f
The
.i prog.c
file will be removed;
it can be retrieved
using
.i get .
.sh 2 "When to make deltas"
.pp
It is probably unwise to make a delta
before every recompilation or test;
otherwise,
you tend to get a lot of deltas with comments like
.q "fixed compilation problem in previous delta"
or
.q "fixed botch in 1.3" .
However,
it is very important to delta everything
before installing a module for general use.
A good technique is to edit the files you need,
make all necessary changes and tests,
compiling and editing as often as necessary
without making deltas.
When you are satisfied that you have a working version,
delta everything being edited,
re-get them,
and recompile everything.
.sh 2 "What's going on: the info command"
.pp
To find out what files where being edited,
you can use:
.(b
sccs info
.)b
to print out all the files being edited
and other information such as the name of the user
who did the edit.
Also,
the command:
.(b
sccs check
.)b
is nearly equivalent to the
.i info
command,
except that it is silent if nothing is being edited,
and returns non-zero exit status if anything is being edited;
it can be used in an
.q install
entry in a makefile
to abort the install
if anything has not been properly deltaed.
.pp
If you know that everything being edited should be deltaed,
you can use:
.(b
sccs delta \`sccs tell\`
.)b
The
.i tell
command is similar to
.i info
except that only the names of files being edited
are output,
one per line.
.pp
All of these commands take a
.b \-b
flag
to ignore
.q branches
(alternate versions, described later)
and the
.b \-u
flag to only give files being edited by you.
The
.b \-u
flag takes an optional
.i user
argument,
giving only files being edited by that user.
For example,
.(b
sccs info \-ujohn
.)b
gives a listing of files being edited by john.
.sh 2 "ID keywords"
.pp
Id keywords can be inserted into your file
that will be expanded automatically by
.i get .
For example,
a line such as:
.(b
static char SccsId[] = "%\&W\&%\et%\&G\&%";
.)b
will be replaced with something like:
.(b
static char SccsId[] = "@\&(#)prog.c 1.2 08/29/80";
.)b
This tells you
the name and version
of the source file
and the time the delta was created.
The string
.q "@\&(#)"
is a special string
which signals the beginning
of an
\*S
Id keyword.
.sh 3 "The what command"
.pp
To find out what version of a program
is being run,
use:
.(b
sccs what prog.c /usr/bin/prog
.)b
which will print all strings
it finds that
begin with
.q "@\&(#)" .
This works on all types of files,
including binaries and libraries.
For example, the above command will output something like:
.(b
prog.c:
prog.c 1.2 08/29/80
/usr/bin/prog:
prog.c 1.1 02/05/79
.)b
From this I can see
that the source that I have in prog.c
will not compile into the same version
as the binary in /usr/bin/prog.
.sh 3 "Where to put id keywords"
.pp
ID keywords can be inserted anywhere,
including in comments,
but
Id Keywords that are compiled into the object module
are especially useful,
since it lets you find out what version of
the object is being run,
as well as the source.
However,
there is a cost:
data space is used up to store
the keywords,
and on small address space machines
this may be prohibitive.
.pp
When you put id keywords into header files,
it is important that you assign them to different variables.
For example, you might use:
.(b
static char AccessSid[] = "%\&W\&% %\&G\&%";
.)b
in the file
.i access.h
and:
.(b
static char OpsysSid[] = "%\&W\&% %\&G\&%";
.)b
in the file
.i opsys.h .
Otherwise,
you will get compilation errors because
.q SccsId
is redefined.
The problem with this is that if the header file
is included by many modules that are loaded together,
the version number of that header file is included
in the object module many times;
you may find it more to your taste
to put id keywords in header files
in comments.
.sh 2 "Keeping \*I's consistent across files"
.pp
With some care,
it is possible to keep the \*I's consistent
in multi-file systems.
The trick here is to always
.i edit
all files
at once.
The changes can then be made
to whatever files are necessary
and then all files
(even those not changed)
are redeltaed.
This can be done fairly easily
by just specifying the name of the directory
that the \*S files are in:
.(b
sccs edit SCCS
.)b
which will
.i edit
all files in that directory.
To make the delta, use:
.(b
sccs delta SCCS
.)b
You will be prompted for comments only once.
.sh 2 "Creating new releases"
.pp
When you want to create a new release
of a program,
you can specify the release number you want to create
on the
.i edit
command.
For example:
.(b
sccs edit \-r2 prog.c
.)b
will cause the next delta to be in release two
(that is,
it will be numbered 2.1).
Future deltas will automatically be in release two.
To change the release number
of an entire system,
use:
.(b
sccs edit \-r2 SCCS
.)b
.sh 1 "Restoring Old Versions"
.sh 2 "Reverting to old versions"
.pp
Suppose that after delta 1.2
was stable
you made and released a delta 1.3.
But this introduced a bug,
so you made a delta 1.4 to correct it.
But 1.4 was still buggy,
and you decided you wanted to go back
to the old version.
You could
revert to delta 1.2
by choosing the \*I in a get:
.(b
sccs get \-r1.2 prog.c
.)b
This will produce a version of
.i prog.c
that is delta 1.2
that can be reinstalled so that work can proceed.
.pp
In some cases you don't know
what the \*I of the delta you want is.
However,
you can revert to the version of the program
that was running as of a certain date
by using the
.b \-c
(cutoff) flag.
For example,
.(b
sccs get \-c800722120000 prog.c
.)b
will retrieve whatever version was current
as of July 22, 1980
at 12:00 noon.
Trailing components can be stripped off
(defaulting to their highest legal value),
and punctuation can be inserted in the obvious
places;
for example,
the above line could be equivalently stated:
.(b
sccs get \-c"80/07/22 12:00:00" prog.c
.)b
.sh 2 "Selectively deleting old deltas"
.pp
Suppose that you later decided
that you liked the changes in delta 1.4,
but that delta 1.3 should be removed.
You could do this by
.i excluding
delta 1.3:
.(b
sccs edit \-x1.3 prog.c
.)b
.ne 1i
When delta 1.5 is made,
it will include the changes made
in delta 1.4,
but will exclude the changes made
in delta 1.3.
You can exclude a range of deltas
using a dash.
For example,
if you want to get rid of 1.3 and 1.4
you can use:
.(b
sccs edit \-x1.3\-1.4 prog.c
.)b
which will exclude all deltas from 1.3 to 1.4.
Alternatively,
.(b
sccs edit \-x1.3\-1 prog.c
.)b
will exclude a range of deltas
from 1.3 to the current highest delta in release 1.
.pp
In certain cases when using
.b \-x
(or
.b \-i ;
see below)
there will be conflicts
between versions;
for example, it may be necessary
to both include and delete
a particular line.
If this happens,
\*S always prints out a message
telling the range of lines effected;
these lines should then be examined very carefully
to see if the version \*S got
is ok.
.pp
Since each delta
(in the sense of
.q "a set of changes" )
can be excluded at will,
that this makes it most useful
to put each semantically distinct change
into its own delta.
.sh 1 "Auditing Changes"
.sh 2 "The prt command"
.pp
When you created a delta,
you presumably gave a reason for the delta
to the
.q "comments?"
prompt.
To print out these comments later,
use:
.(b
sccs prt prog.c
.)b
This will produce
a report
for each delta
of the \*I,
time and date of creation,
user who created the delta,
number of lines inserted, deleted, and unchanged,
and the comments associated with the delta.
For example, the output of the above command might be:
.(b
D 1.2 80/08/29 12:35:31 bill 2 1 00005/00003/00084
removed "-q" option
.sp \n(psu
D 1.1 79/02/05 00:19:31 eric 1 0 00087/00000/00000
date and time created 80/06/10 00:19:31 by eric
.)b
.sh 2 "Finding why lines were inserted"
.pp
To find out
why you inserted lines,
you can get a copy of the file
with each line
preceded by the \*I that created it:
.(b
sccs get \-m prog.c
.)b
You can then find out
what this delta did
by printing the comments using
.i prt .
.pp
To find out what lines are associated with a particular delta
(\c
.i e.g. ,
1.3),
use:
.(b
sccs get \-m \-p prog.c \(bv grep \'^1.3\'
.)b
The
.b \-p
flag causes \*S to output the generated source
to the standard output rather than to a file.
.sh 2 "Finding what changes you have made"
.pp
When you are editing a file,
you can find out what changes you have made using:
.(b
sccs diffs prog.c
.)b
Most of the ``diff'' flags can be used.
To pass the
.b \-c
flag,
use
.b \-C .
.pp
To compare two versions that are in deltas,
use:
.(b
sccs sccsdiff -r1.3 -r1.6 prog.c
.)b
to see the differences between delta 1.3 and delta 1.6.
.sh 1 "Shorthand Notations"
.pp
There are several sequences of commands that get
executed frequently.
.i Sccs
tries to make it easy to do these.
.sh 2 "Delget"
.pp
A frequent requirement is to make a delta of some file
and then get that file.
This can be done by using:
.(b
sccs delget prog.c
.)b
which is entirely equivalent to using:
.(b
sccs delta prog.c
sccs get prog.c
.)b
The
.q deledit
command is equivalent to
.q delget
except that the
.q edit
command is used
instead of the
.q get
command.
.sh 2 "Fix"
.pp
Frequently, there are small bugs
in deltas,
e.g., compilation errors,
for which there is no reason to maintain an audit trail.
To
.i replace
a delta, use:
.(b
sccs fix \-r1.4 prog.c
.)b
This will get a copy of delta 1.4 of prog.c for you to edit
and then delete delta 1.4 from the \*S file.
When you do a delta of prog.c,
it will be delta 1.4 again.
The \-r flag must be specified,
and the delta that is specified must be a leaf delta,
i.e., no other deltas may have been made subsequent
to the creation of that delta.
.sh 2 "Unedit"
.pp
If you found you edited a file
that you did not want to edit,
you can back out by using:
.(b
sccs unedit prog.c
.)b
.sh 2 "The \-d flag"
.pp
If you are working on a project
where the \*S code is in a directory somewhere,
you may be able to simplify things
by using a shell alias.
For example,
the alias:
.(b
alias syssccs sccs \-d/usr/src
.)b
will allow you to issue commands such as:
.(b
syssccs edit cmd/who.c
.)b
which will look for the file
.q "/usr/src/cmd/SCCS/who.c" .
The file
.q who.c
will always be created in your current directory
regardless of the value of the \-d flag.
.sh 1 "Using \*S on a Project"
.pp
Working on a project with several people
has its own set of special problems.
The main problem occurs when two people
modify a file at the same time.
\*S prevents this by locking an s-file
while it is being edited.
.pp
As a result,
files should not be reserved for editing
unless they are actually being edited at the time,
since this will prevent other people on the project
from making necessary changes.
For example,
a good scenario for working might be:
.(b
sccs edit a.c g.c t.c
vi a.c g.c t.c
# do testing of the (experimental) version
sccs delget a.c g.c t.c
sccs info
# should respond "Nothing being edited"
make install
.)b
.pp
As a general rule,
all source files should be deltaed
before installing the program for general use.
This will insure that it is possible
to restore any version in use at any time.
.sh 1 "Saving Yourself"
.sh 2 "Recovering a munged edit file"
.pp
Sometimes you may find
that you have destroyed or trashed
a file that you were trying to edit\**.
.(f
\**Or given up and decided to start over.
.)f
Unfortunately,
you can't just remove it
and re-\c
.i edit
it;
\*S keeps track
of the fact
that someone is trying to edit it,
so it won't let you do it again.
Neither can you just get it using
.i get ,
since that would expand the Id keywords.
Instead,
you can say:
.(b
sccs get \-k prog.c
.)b
This will not expand the Id keywords,
so it is safe to do a delta
with it.
.pp
Alternately,
you can
.i unedit
and
.i edit
the file.
.sh 2 "Restoring the s-file"
.pp
In particularly bad circumstances,
the \*S file itself
may get munged.
The most common way this happens
is that it gets edited.
Since \*S keeps a checksum,
you will get errors every time you read the file.
To fix this checksum, use:
.(b
sccs admin \-z prog.c
.)b
.sh 1 "Using the Admin Command"
.pp
There are a number of parameters that can be set
using the
.i admin
command.
The most interesting of these are flags.
Flags can be added by using the
.b \-f
flag.
For example:
.(b
sccs admin \-fd1 prog.c
.)b
sets the
.q d
flag to the value
.q 1 .
This flag can be deleted by using:
.(b
sccs admin \-dd prog.c
.)b
The most useful flags are:
.nr ii 7n
.ip "b"
Allow branches to be made using the
\-b
flag to
.i edit .
.ip "d\fISID\fP"
Default \*I to be used on a
.i get
or
.i edit .
If this is just a release number
it constrains the
version
to a particular release only.
.ip "i"
Give a fatal error
if there are no Id Keywords in a file.
This is useful to guarantee that a version of the
file does not get merged into the s-file
that has the Id Keywords inserted as constants
instead of internal forms.
.ip "y"
The
.q type
of the module.
Actually,
the value of this flag is unused by \*S
except that it replaces the
.b %\&Y\&%
keyword.
.pp
The
.b \-t\fIfile\fR
flag can be used
to store descriptive text
from
.i file .
This descriptive text might be the documentation
or a design and implementation document.
Using the
.b \-t
flag insures that if the \*S file is sent,
the documentation will be sent also.
If
.i file
is omitted,
the descriptive text is deleted.
To see the descriptive text,
use
.q "prt \-t" .
.pp
The
.i admin
command can be used safely
any number of times on files.
A file need not be gotten
for
.i admin
to work.
.sh 1 "Maintaining Different Versions (Branches)"
.pp
Sometimes it is convenient
to maintain an experimental version of a program
for an extended period
while normal maintenance continues
on the version in production.
This can be done using a
.q branch.
Normally deltas continue in a straight line,
each depending on the delta before.
Creating a branch
.q "forks off"
a version of the program.
.pp
The ability to create branches
must be enabled in advance using:
.(b
sccs admin \-fb prog.c
.)b
The
.b \-fb
flag can be specified when the
\*S file is first created.
.sh 2 "Creating a branch"
.pp
To create a branch, use:
.(b
sccs edit \-b prog.c
.)b
This will create a branch
with (for example) \*I 1.5.1.1.
The deltas for this version
will be numbered
1.5.1.\c
.i n .
.sh 2 "Getting from a branch"
.pp
Deltas in a branch are normally not included
when you do a get.
To get these versions,
you will have to say:
.(b
sccs get \-r1.5.1 prog.c
.)b
.sh 2 "Merging a branch back into the main trunk"
.pp
At some point you will have finished the experiment,
and if it was successful
you will want to incorporate it into the release version.
But in the meantime
someone may have created a delta 1.6
that you don't want to lose.
The commands:
.(b
sccs edit \-i1.5.1.1\-1.5.1 prog.c
sccs delta prog.c
.)b
will merge all of your changes
into the release system.
If some of the changes conflict,
get will print an error;
the generated result
should be carefully examined
before the delta is made.
.sh 2 "A more detailed example"
.pp
The following technique might be used
to maintain a different version of a program.
First,
create a directory to contain the new version:
.(b
mkdir ../newxyz
cd ../newxyz
.)b
Edit a copy of the program
on a branch:
.(b
sccs \-d../xyz edit prog.c
.)b
When using the old version,
be sure to use the
.b \-b
flag to info, check, tell, and clean
to avoid confusion.
For example, use:
.(b
sccs info \-b
.)b
when in the directory
.q xyz .
.pp
If you want to save a copy of the program
(still on the branch)
back in the s-file,
you can use:
.(b
sccs -d../xyz deledit prog.c
.)b
which will do a delta on the branch
and reedit it for you.
.pp
When the experiment is complete, merge it back into the s-file
using delta:
.(b
sccs -d../xyz delta prog.c
.)b
At this point you must decide whether this version
should be merged back into the trunk
(\c
.i i.e.
the default version),
which may have undergone changes.
If so, it can be merged using the
.b \-i
flag to
.i edit
as described above.
.sh 2 "A warning"
.pp
Branches should be kept to a minimum.
After the first branch from the trunk,
\*I's are assigned rather haphazardly,
and the structure gets complex fast.
.sh 1 "Using \*S with Make"
.pp
\*S and make can be made to work together
with a little care.
A few sample makefiles
for common applications are shown.
.pp
There are a few basic entries that every makefile
ought to have.
These are:
.nr ii 1i
.ip a.out
(or whatever the makefile generates.)
This entry regenerates whatever this makefile is
supposed to regenerate.
If the makefile regenerates many things,
this should be called
.q all
and should in turn
have dependencies on everything
the makefile can generate.
.ip install
Moves the objects to the final
resting place,
doing any special
.i chmod 's
or
.i ranlib 's
as appropriate.
.ip sources
Creates all the source files from \*S files.
.ip clean
Removes all files from the current directory
that can be regenerated from \*S files.
.ip print
Prints the contents of the directory.
.lp
The examples shown below are only partial examples,
and may omit some of these entries
when they are deemed to be obvious.
.pp
The
.i clean
entry should not remove files that can be
regenerated from the \*S files.
It is sufficiently important to have the
source files around at all times
that the only time they should be removed
is when the directory is being mothballed.
To do this, the command:
.(b
sccs clean
.)b
can be used.
This will remove all files for which an s-file
exists,
but which is not being edited.
.sh 2 "To maintain single programs"
.pp
Frequently there are directories with several
largely unrelated programs
(such as simple commands).
These can be put into a single makefile:
.(b
LDFLAGS= \-i \-s
.sp \n(psu
prog: prog.o
$(CC) $(LDFLAGS) \-o prog prog.o
prog.o: prog.c prog.h
.sp \n(psu
example: example.o
$(CC) $(LDFLAGS) \-o example example.o
example.o: example.c
.sp \n(psu
\&.DEFAULT:
sccs get $<
.)b
The trick here
is that the .DEFAULT rule
is called every time
something is needed
that does not exist,
and no other rule exists to make it.
The explicit dependency of the
.b \&.o
file on the
.b \&.c
file is important.
Another way of doing the same thing is:
.(b
SRCS= prog.c prog.h example.c
.sp \n(psu
LDFLAGS= \-i \-s
.sp \n(psu
prog: prog.o
$(CC) $(LDFLAGS) \-o prog prog.o
prog.o: prog.h
.sp \n(psu
example: example.o
$(CC) $(LDFLAGS) \-o example example.o
.sp \n(psu
sources: $(SRCS)
$(SRCS):
sccs get $@
.)b
There are a couple of advantages to this approach:
(1) the explicit dependencies of the .o on the .c files are
not needed,
(2) there is an entry called "sources" so if you want to get
all the sources you can just say
.q "make sources" ,
and
(3) the makefile is less likely to do confusing things
since it won't try to
.i get
things that do not exist.
.sh 2 "To maintain a library"
.pp
Libraries that are largely static
are best updated using explicit commands,
since
.i make
doesn't know about updating them properly.
However,
libraries that are in the process of being developed
can be handled quite adequately.
The problem is that the .o files
have to be kept out of the library
as well as in the library.
.(b
# configuration information
OBJS= a.o b.o c.o d.o
SRCS= a.c b.c c.c d.s x.h y.h z.h
TARG= /usr/lib
.sp \n(psu
# programs
GET= sccs get
REL=
AR= \-ar
RANLIB= ranlib
.sp \n(psu
lib.a: $(OBJS)
$(AR) rvu lib.a $(OBJS)
$(RANLIB) lib.a
.sp \n(psu
install: lib.a
sccs check
cp lib.a $(TARG)/lib.a
$(RANLIB) $(TARG)/lib.a
.sp \n(psu
sources: $(SRCS)
$(SRCS):
$(GET) $(REL) $@
.sp \n(psu
print: sources
pr *.h *.[cs]
clean:
rm \-f *.o
rm \-f core a.out $(LIB)
.)b
.pp
The
.q "$(REL)"
in the get
can be used to get old versions
easily; for example:
.(b
make b.o REL=\-r1.3
.)b
.pp
The
.i install
entry includes the line
.q "sccs check"
before anything else.
This guarantees that all the s-files
are up to date
(\c
.i i.e. ,
nothing is being edited),
and will abort the
.i make
if this condition is not met.
.sh 2 "To maintain a large program"
.(b
OBJS= a.o b.o c.o d.o
SRCS= a.c b.c c.y d.s x.h y.h z.h
.sp \n(psu
GET= sccs get
REL=
.sp \n(psu
a.out: $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) $(LIBS)
.sp \n(psu
sources: $(SRCS)
$(SRCS):
$(GET) $(REL) $@
.)b
(The
.i print
and
.i clean
entries are identical to the previous case.)
This makefile requires copies of the source and object files
to be kept during development.
It is probably also wise to include lines of the form:
.(b
a.o: x.h y.h
b.o: z.h
c.o: x.h y.h z.h
z.h: x.h
.)b
so that modules will be recompiled
if header files change.
.pp
Since
.i make
does not do transitive closure on dependencies,
you may find in some makefiles lines like:
.(b
z.h: x.h
touch z.h
.)b
This would be used in cases where file z.h
has a line:
.(b
#include "x.h"
.)b
in order to bring the mod date of z.h in line
with the mod date of x.h.
When you have a makefile such as above,
the
.i touch
command can be removed completely;
the equivalent effect will be achieved
by doing an automatic
.i get
on z.h.
.sh 1 "Further Information"
.pp
The
.i "SCCS/PWB User's Manual"
gives a deeper description
of how to use \*S.
Of particular interest
are the numbering of branches,
the l-file,
which gives a description of what deltas were used on a get,
and certain other \*S commands.
.pp
The \*S manual pages
are a good last resort.
These should be read by software managers
and by people who want to know
everything about everything.
.pp
Both of these documents were written without the
.i sccs
front end in mind,
so most of the examples are slightly different from those
in this document.
.bp
.sz 12
.ce
.b "Quick Reference"
.sz
.sp 2
.sh 1 Commands 1
.pp
The following commands should all be preceded with
.q sccs .
This list is not exhaustive;
for more options see
.i "Further Information" .
.ip get 9n
Gets files for compilation (not for editing).
Id keywords are expanded.
.ba 9n
.nr ii 8n
.ip \-r\fI\*I\fP
Version to get.
.ip \-p
Send to standard output rather than to the actual file.
.ip \-k
Don't expand id keywords.
.ip \-i\fIlist\fP
List of deltas to include.
.ip \-x\fIlist\fP
List of deltas to exclude.
.ip \-m
Precede each line with \*I of creating delta.
.ip \-c\fIdate\fP
Don't apply any deltas created after
.i date.
.ba
.ip edit 9n
Gets files for editing.
Id keywords are not expanded.
Should be matched with a
.i delta
command.
.ba 9n
.nr ii 8n
.ip \-r\fI\*I\fP
Same as
.i get .
If
.i \*I
specifies a release that does not yet exist,
the highest numbered delta is retrieved
and the new delta is numbered with
.i \*I .
.ip \-b
Create a branch.
.ip \-i\fIlist\fP
Same as
.i get .
.ip \-x\fIlist\fP
Same as
.i get .
.ba
.ip delta 9n
Merge a file gotten using
.i edit
back into the s-file.
Collect comments about why this delta was made.
.ip unedit 9n
Remove a file that has been edited previously
without merging the changes into the s-file.
.ip prt 9n
Produce a report of changes.
.ba 9n
.nr ii 5n
.ip \-t
Print the descriptive text.
.ip \-e
Print (nearly) everything.
.ba
.ip info 9n
Give a list of all files being edited.
.ba 9n
.nr ii 5n
.ip \-b
Ignore branches.
.ip \-u[\fIuser\fP]
Ignore files not being edited by
.i user .
.ba
.ip check 9n
Same as
.i info ,
except that nothing is printed if nothing is being edited
and exit status is returned.
.ip tell 9n
Same as
.i info ,
except that one line is produced per file being edited containing
only the file name.
.ip clean 9n
Remove all files that can be regenerated from the
s-file.
.ip what 9n
Find and print id keywords.
.ip admin 9n
Create or set parameters on s-files.
.ba 9n
.nr ii 8n
.ip \-i\fIfile\fP
Create, using
.i file
as the initial contents.
.ip \-z
Rebuild the checksum in case
the file has been trashed.
.ip \-f\fIflag\fP
Turn on the
.i flag .
.ip \-d\fIflag\fP
Turn off (delete) the
.i flag .
.ip \-t\fIfile\fP
Replace the descriptive text
in the s-file with the contents of
.i file .
If
.i file
is omitted,
the text is deleted.
Useful for storing documentation
or
.q "design & implementation"
documents to insure they get distributed with the
s-file.
.lp
Useful flags are:
.ip b
Allow branches to be made using the \-b flag to
.i edit.
.ip d\fI\*I\fP
Default \*I to be used
on a
.i get
or
.i edit .
.ip i
Cause
.q "No Id Keywords"
error message
to be a fatal error rather than a warning.
.ip t
The module
.q type ;
the value of this flag replaces the
.b %\&Y\&%
keyword.
.ba
.ip fix 9n
Remove a delta and reedit it.
.ip delget 9n
Do a
.i delta
followed by a
.i get .
.ip deledit 9n
Do a
.i delta
followed by an
.i edit .
.sh 1 "Id Keywords"
.nr ii 6n
.ip "%\&Z\&%"
Expands to
.q @\&(#)
for the
.i what
command to find.
.ip "%\&M\&%"
The current module name,
.i e.g.,
.q prog.c .
.ip "%\&I\&%"
The highest \*I applied.
.ip "%\&W\&%"
A shorthand for
.q "%\&Z\&%%\&M\&% %\&I\&%" .
.ip "%\&G\&%"
The date of the delta
corresponding to the
.q "%\&I\&%"
keyword.
.ip "%\&R\&%"
The current release number,
.i i.e. ,
the first component of the
.q "%\&I\&%"
keyword.
.ip "%\&Y\&%"
Replaced by the value of the
.b t
flag
(set by
.i admin ).
CSSC-1.3.0/bsd/sccs.c 0000644 0000000 0000000 00000173103 11374025765 011023 0000000 0000000 /*
* Copyright (C) 1998,1999,2001
* Free Software Foundation, Inc. All rights reserved.
*
* Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#define _BSD_SOURCE
#define DEBUG (1)
#ifndef lint
static const char copyright[] =
"@(#) Copyright (c) 1980, 1993\n"
"The Regents of the University of California. All rights reserved.\n"
"@(#) Copyright (c) 1998\n"
"Free Software Foundation, Inc. All rights reserved.\n";
#endif /* not lint */
static const char filever[] = "$Id: sccs.c,v 1.44 2007/12/19 00:21:14 jay Exp $";
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include /* TODO: this does what? */
#include
#include /* TODO: consider using sigaction(). */
#include /* TODO: same as in parent directory. */
#include /* getpwuid() */
/* #include "pathnames.h" */
/* The next few lines inserted from @(#)pathnames.h 8.1 (Berkeley) 6/6/93
*/
/* #include */
#include "dirent-safer.h"
#include "progname.h"
#ifndef _PATH_BSHELL
#define _PATH_BSHELL "/bin/sh"
#endif
/* #define PASTE(a,b) a##b */
#define _PATH_SCCSADMIN ("admin")
#define _PATH_SCCSBDIFF ("bdiff")
#define _PATH_SCCSCOMB ("comb")
#define _PATH_SCCSDELTA ("delta")
#define _PATH_SCCSDIFF ("sccsdiff")
#define _PATH_SCCSGET ("get")
#define _PATH_SCCSUNGET ("unget")
#define _PATH_SCCSHELP ("help")
#define _PATH_SCCSPRS ("prs")
#define _PATH_SCCSPRT ("prt")
#define _PATH_SCCSRMDEL ("rmdel")
#define _PATH_SCCSCDC ("cdc")
#define _PATH_SCCSVAL ("val")
#define _PATH_SCCSWHAT ("what")
#undef _PATH_TMP
#define _PATH_TMP "/tmp/sccsXXXXX"
/* End of insertion from pathnames.h */
#ifndef PREFIX
#define PREFIX "/usr/sccs/"
#endif
#ifdef STAT_MACROS_BROKEN
#undef S_ISDIR
#endif
/*
* Exit values; the file normally defines
* EX_*, but on Solaris machines this seems to result
* in redefinition of the values (at least in one reported
* case, with GCC as the compiler). To avoid this we define them
* here, but with a name change to avoid clashes.
*/
#define CSSC_EX_OK 0 /* successful termination */
#define CSSC_EX_USAGE 64 /* command line usage error */
#define CSSC_EX_DATAERR 65 /* data format error */
#define CSSC_EX_NOINPUT 66 /* cannot open input */
#define CSSC_EX_NOUSER 67 /* addressee unknown */
#define CSSC_EX_NOHOST 68 /* host name unknown */
#define CSSC_EX_UNAVAILABLE 69 /* service unavailable */
#define CSSC_EX_SOFTWARE 70 /* internal software error */
#define CSSC_EX_OSERR 71 /* system error (e.g., can't fork) */
#define CSSC_EX_OSFILE 72 /* critical OS file missing */
#define CSSC_EX_CANTCREAT 73 /* can't create (user) output file */
#define CSSC_EX_IOERR 74 /* input/output error */
#define CSSC_EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
#define CSSC_EX_PROTOCOL 76 /* remote error in protocol */
#define CSSC_EX_NOPERM 77 /* permission denied */
#define CSSC_EX_CONFIG 78 /* configuration error */
/*
** SCCS.C -- human-oriented front end to the SCCS system.
**
** Without trying to add any functionality to speak of, this
** program tries to make SCCS a little more accessible to human
** types. The main thing it does is automatically put the
** string "SCCS/s." on the front of names. Also, it has a
** couple of things that are designed to shorten frequent
** combinations, e.g., "delget" which expands to a "delta"
** and a "get".
**
** This program can also function as a setuid front end.
** To do this, you should copy the source, renaming it to
** whatever you want, e.g., "syssccs". Change any defaults
** in the program (e.g., syssccs might default -d to
** "/usr/src/sys"). Then recompile and put the result
** as setuid to whomever you want. In this mode, sccs
** knows to not run setuid for certain programs in order
** to preserve security, and so forth.
**
** Note that this is not the original version of the code and so
** any assumptions you might make about the code security of the
** original code do not apply to this version. Think twice (and
** define SCCSDIR) before installing this program setuid.
**
** Usage:
** sccs [flags] command [args]
**
** Flags:
** -d represents a directory to search
** out of. It should be a full pathname
** for general usage. E.g., if is
** "/usr/src/sys", then a reference to the
** file "dev/bio.c" becomes a reference to
** "/usr/src/sys/dev/bio.c".
** -p prepends to the final component
** of the pathname. By default, this is
** "SCCS". For example, in the -d example
** above, the path then gets modified to
** "/usr/src/sys/dev/SCCS/s.bio.c". In
** more common usage (without the -d flag),
** "prog.c" would get modified to
** "SCCS/s.prog.c". In both cases, the
** "s." gets automatically prepended.
** -r run as the real user.
**
** Flags peculiar to the GNU version of this program:
**
** --cssc Print "yes", and exit successfully.
** --version Show version information.
** --prefix=foo Prepend ``foo'' to the names of the
** sccs programs before running them.
** If --prefix is not used, there is a
** default, usually "/usr/sccs". Use the
** --version flag to discover the default
** prefix.
** -V Synonymous with --version.
**
** Commands:
** admin,
** get,
** unget,
** delta,
** rmdel,
** cdc,
** etc. Straight out of SCCS; only difference
** is that pathnames get modified as
** described above.
** enter Front end doing "sccs admin -i "
** create Macro for "enter" followed by "get".
** edit Macro for "get -e".
** unedit Removes a file being edited, knowing
** about p-files, etc.
** delget Macro for "delta" followed by "get".
** deledit Macro for "delta" followed by "get -e".
** branch Macro for "get -b -e", followed by "delta
** -s -n", followd by "get -e -t -g".
** diffs "diff" the specified version of files
** and the checked-out version.
** print Macro for "prs -e" followed by "get -p -m".
** tell List what files are being edited.
** info Print information about files being edited.
** clean Remove all files that can be
** regenerated from SCCS files.
** check Like info, but return exit status, for
** use in makefiles.
** fix Remove a top delta & reedit, but save
** the previous changes in that delta.
**
** Compilation Flags:
** SCCSDIR -- if defined, forces the -d flag to take on
** this value. This is so that the setuid
** aspects of this program cannot be abused.
** This flag also disables the -p flag.
** Setuid execution is only supported if this
** flag is set.
** SCCSPATH -- the default for the -p flag.
** MYNAME -- the title this program should print when it
** gives error messages.
**
** UIDUSER -- removed since we cannot trust $USER
** or getlogin in setuid programs.
**
** PREFIX -- Sets the default prefix which allows us to
** find the SCCS subcommands. Unless you overrride
** this on the compiler command line or by editing
** the source, this defaults to "/usr/sccs". Using
** the --version flag will tell you what the setting
** is. This macro is available only in the GNU
** version of this program.
**
**
**
** Compilation Instructions:
** cc -O -n -s sccs.c
** The flags listed above can be -D defined to simplify
** recompilation for variant versions.
**
** Author:
** Eric Allman, UCB/INGRES
** Copyright 1980 Regents of the University of California
*/
/******************* Configuration Information ********************/
#ifndef SCCSPATH
#define SCCSPATH "SCCS" /* pathname in which to find s-files */
#endif
#ifndef MYNAME
#define MYNAME "sccs" /* name used for printing errors */
#endif
/**************** End of Configuration Information ****************/
typedef char bool;
#define TRUE 1
#define FALSE 0
#define bitset(bit, word) ((bool) ((bit) & (word)))
struct sccsprog
{
const char *sccsname; /* name of SCCS routine */
short sccsoper; /* opcode, see below */
short sccsflags; /* flags, see below */
const char *sccspath; /* pathname of binary implementing */
int clean_mode; /* mode for do_clean(). */
};
/* values for sccsoper */
#define PROG 0 /* call a program */
#define CMACRO 1 /* command substitution macro */
#define FIX 2 /* fix a delta */
#define CLEAN 3 /* clean out recreatable files */
#define UNEDIT 4 /* unedit a file */
#if 0
#define SHELL 5 /* call a shell file (like PROG) */
#endif
#define DIFFS 6 /* diff between sccs & file out */
#define DODIFF 7 /* internal call to diff program */
#define ENTER 8 /* enter new files */
/* bits for sccsflags */
#define NO_SDOT 0001 /* no s. on front of args */
#define REALUSER 0002 /* protected (e.g., admin) */
#define WARN_MISSING 0004 /* not implemented in GNU CSSC */
#define NO_HELP_HERE 0010 /* issue special message re "help" */
/* modes for the "clean", "info", "check" ops */
#define CLEANC 0 /* clean command */
#define INFOC 1 /* info command */
#define CHECKC 2 /* check command */
#define TELLC 3 /* give list of files being edited */
/*
** Description of commands known to this program.
** First argument puts the command into a class. Second arg is
** info regarding treatment of this command. Third arg is a
** list of flags this command accepts from macros, etc. Fourth
** arg is the pathname of the implementing program, or the
** macro definition, or the arg to a sub-algorithm.
*/
const struct sccsprog SccsProg[] =
{
{"admin", PROG, REALUSER, _PATH_SCCSADMIN, 0 },
{"cdc", PROG, 0, _PATH_SCCSCDC, 0 },
{"comb", PROG, WARN_MISSING, _PATH_SCCSCOMB, 0 },
{"delta", PROG, 0, _PATH_SCCSDELTA, 0 },
{"get", PROG, 0, _PATH_SCCSGET, 0 },
{"unget", PROG, 0, _PATH_SCCSUNGET, 0 },
{"help", PROG, NO_HELP_HERE | NO_SDOT, _PATH_SCCSHELP, 0 },
{"prs", PROG, 0, _PATH_SCCSPRS, 0 },
{"prt", PROG, 0, _PATH_SCCSPRT, 0 },
{"rmdel", PROG, REALUSER, _PATH_SCCSRMDEL, 0 },
{"val", PROG, 0, _PATH_SCCSVAL, 0 },
{"what", PROG, NO_SDOT, _PATH_SCCSWHAT, 0 },
{"sccsdiff", PROG, REALUSER, _PATH_SCCSDIFF, 0 },
{"edit", CMACRO, NO_SDOT, "get -e", 0 },
{"delget", CMACRO, NO_SDOT, "delta:mysrp/get:ixbeskcl -t", 0 },
{"deledit", CMACRO, NO_SDOT, "delta:mysrp -n/get:ixbskcl -e -t -g", 0 },
{"fix", FIX, NO_SDOT, NULL, 0 },
{"clean", CLEAN, REALUSER | NO_SDOT, (char *) NULL, CLEANC },
{"info", CLEAN, REALUSER | NO_SDOT, (char *) NULL, INFOC },
{"check", CLEAN, REALUSER | NO_SDOT, (char *) NULL, CHECKC },
{"tell", CLEAN, REALUSER | NO_SDOT, (char *) NULL, TELLC },
{"unedit", UNEDIT, NO_SDOT, NULL, 0 },
{"diffs", DIFFS, NO_SDOT | REALUSER, NULL, 0 },
{"-diff", DODIFF, NO_SDOT | REALUSER, _PATH_SCCSBDIFF, 0 },
{"print", CMACRO, NO_SDOT, "prs -e/get -p -m -s", 0 },
{"branch", CMACRO, NO_SDOT, "get:ixrc -e -b/delta: -s -n -ybranch-place-holder/get:pl -e -t -g", 0 },
{"enter", ENTER, NO_SDOT, NULL, 0 },
{"create", CMACRO, NO_SDOT, "enter/get:ixeskcl -t", 0 },
{NULL, -1, 0, NULL, 0 },
};
/* one line from a p-file */
struct pfile
{
char *p_osid; /* old SID */
char *p_nsid; /* new SID */
char *p_user; /* user who did edit */
char *p_date; /* date of get */
char *p_time; /* time of get */
char *p_aux; /* extra info at end */
};
const char *SccsPath = SCCSPATH; /* pathname of SCCS files */
#ifdef SCCSDIR
const char *SccsDir = SCCSDIR; /* directory to begin search from */
#else
const char *SccsDir = "";
#endif
char *subprogram_exec_prefix = NULL; /* see try_to_exec(). */
int OutFile = -1; /* override output file for commands */
bool RealUser; /* if set, running as real user */
#ifdef DEBUG
bool Debug = 0; /* turn on tracing */
#endif
static bool TrustEnvironment = 0;
void syserr (const char *fmt,...);
void usrerr (const char *fmt,...);
int command (char *argv[], bool forkflag, const char *arg0);
int callprog (const char *progpath, short flags,
char *const argv[], bool forkflag);
int clean (int mode, char *const argv[]);
int dodiff (char * getv[], const char *gfile);
int isbranch (const char *sid);
void putpfent (register const struct pfile *pf, register FILE * f);
bool safepath (register const char *p);
bool isdir (const char *name);
const struct sccsprog *lookup (const char *name);
bool unedit (const char *fn);
char *makefile (const char *name);
const char *tail (register const char *fn);
char *tail_nc (register char *fn);
const struct pfile *getpfent (FILE * pfp);
const char *username (void);
char *nextfield (register char *p);
char *my_rindex(const char *s, int ch);
char *my_index(const char *s, int ch);
static char *gstrcat (char *to, const char *from, size_t length);
static char *gstrncat (char *to, const char *from, size_t n, size_t length);
static char *gstrcpy (char *to, const char *from, size_t length);
static void gstrbotch (const char *str1, const char *str2);
static void gstrbotchn (int avail, const char *, int, const char *, int);
static int absolute_pathname (const char *);
static char *str_dup (const char *);
static void childwait(int pid, int *status_ptr, int ignoreintr);
/* #define FBUFSIZ BUFSIZ */
#define FBUFSIZ (1024u)
static void
show_version(void)
{
fprintf(stderr, "%s from GNU CSSC %s\n%s\n", program_name, (VERSION), filever);
fprintf(stderr, "SccsPath = '%s'\nSccsDir = '%s'\n", SccsPath, SccsDir);
fprintf(stderr, "Default prefix for SCCS subcommands is '%s'\n", (PREFIX));
}
static void oom(void)
{
perror("malloc failed");
exit(CSSC_EX_TEMPFAIL);
}
/* set_prefix()
*
* The user has specified the --prefix option which indicates
* where to look for the subcommands. This is primarily
* used by the test suite so that it can be run before
* the programs have been installed.
*
* However, if the user is allowed to provide an arbitrary prefix,
* they could use this facility to execute arbitrary programs.
* If this program is installed setuid, that is a security hole.
*
* I'm not saying that CSSC isn't one big security hole itself,
* but we should certainly forbid this.
*
* See also try_to_exec().
*/
static void
set_prefix(const char *pfx)
{
if (TrustEnvironment)
{
char *p = malloc(1+strlen(pfx));
#ifdef DEBUG
if (Debug)
printf ("set_prefix: setting execution prefix to '%s'\n", pfx);
#endif
if (p)
{
free (subprogram_exec_prefix);
strcpy(p, pfx);
subprogram_exec_prefix = p;
}
else
{
oom();
}
}
else
{
fprintf(stderr,
"%s",
"Option --prefix is incompatible with setuid "
"execution. Sorry.\n");
exit (CSSC_EX_USAGE);
}
}
static void
setuid_warn(void)
{
const char *str =
"If you want to install this program set-user-id or set-group-id, you\n"
"must compile it with the SCCSDIR macro defined, in order to\n"
"prevent abuse. Even so, abuse is probably not impossible. This\n"
"is not a recommended mode of operation for this program.\n";
fprintf(stderr, "%s", str);
}
static void
drop_privs(void)
{
if (0 != setuid (getuid ()))
{
perror("setuid");
exit(CSSC_EX_NOPERM);
}
if (0 != setgid(getgid()))
{
perror("setgid");
exit(CSSC_EX_NOPERM);
}
RealUser++;
}
static void
check_data_integrity()
{
}
/* cleanup_environment
*
* This function unsets the CSSC configuration variables, so that the values
* specified to "configure" at compilation time are enforced. This prevents
* the invoking user overriding the policy decision made by the person who
* installed the set-user-id or set-group-id copy of the "sccs" driver.
*
* This function is not called when "sccs" is running unprivileged.
*/
static void cleanup_environment(void)
{
const char * binary_support = "CSSC_BINARY_SUPPORT";
const char * max_line_len = "CSSC_MAX_LINE_LENGTH";
#ifdef HAVE_UNSETENV
unsetenv(binary_support);
unsetenv(max_line_len);
#else
/* XXX: not ideal. We'd like just to turn them off, but
* if we have no unsetenv(), we simply have to fail.
*/
pfail = getenv(binary_support);
if (NULL == pfail)
pfail = getenv(max_line_len);
if (pfail)
{
fprintf(stderr,
"You should not set the %s environment variable when "
"the sccs driver is running set-user-id or set-group-id.\n",
pfail);
exit(CSSC_EX_NOPERM);
}
#endif
}
static void
usage(void)
{
fprintf (stderr, "Usage: %s [flags] command [flags]\n", program_name);
}
char * my_rindex(const char *p, int ch)
{
return strrchr(p, ch);
}
char * my_index(const char *p, int ch)
{
return strchr(p, ch);
}
#define PFILELG 120
int
main (int argc, char **argv)
{
register char *p;
register int i;
int hadver = 0;
(void) ©right; /* prevent warning about unused variable. */
set_program_name (argv[0]);
if (!absolute_pathname(PREFIX))
{
fprintf(stderr,
"Compiled-in program name prefix %s is not absolute.\n"
"Please recompile this program using an absolute path.\n",
PREFIX);
exit(CSSC_EX_CONFIG);
}
if ( (getuid() != geteuid()) || (getgid() != getegid()))
{
TrustEnvironment = 0; /* running setuid, ignore $PATH etc. */
#ifndef SCCSDIR
setuid_warn();
exit(CSSC_EX_NOPERM);
#endif
cleanup_environment();
}
else
{
TrustEnvironment = 1;
}
if (TrustEnvironment)
{
#ifndef __ultrix
/* Mark Reynolds : If $LANG is not
* set, setlocale() fails on VAX Ultrix 4.2.
*/
if (NULL == setlocale(LC_ALL, ""))
{
/* If we can't set the locale as the user wishes,
* emit an error message and continue. The error
* message will of course be in the "C" locale.
*/
perror("Error setting locale");
}
#endif
}
check_data_integrity();
#ifndef SCCSDIR
/* Setuid execution is only allowed if SCCSDIR is defined,
* so we can "trust" the PROJECTDIR environment variable.
*/
/* pull "SccsDir" out of the environment (possibly) */
p = getenv("PROJECTDIR");
if (p != NULL && p[0] != '\0')
{
register struct passwd *pw;
extern struct passwd *getpwnam();
char buf[FBUFSIZ];
if (p[0] == '/')
SccsDir = p;
else
{
pw = getpwnam(p);
if (pw == NULL)
{
usrerr("user %s does not exist", p);
exit(CSSC_EX_USAGE);
}
gstrcpy(buf, pw->pw_dir, sizeof(buf));
gstrcat(buf, "/src", sizeof(buf));
if (access(buf, 0) < 0)
{
gstrcpy(buf, pw->pw_dir, sizeof(buf));
gstrcat(buf, "/source", sizeof(buf));
if (access(buf, 0) < 0)
{
usrerr("project %s has no source!", p);
exit(CSSC_EX_USAGE);
}
}
SccsDir = buf;
}
}
#endif
/*
** Detect and decode flags intended for this program.
*/
if (argc < 2)
{
usage();
exit (CSSC_EX_USAGE);
}
argv[argc] = NULL;
if (lookup (argv[0]) == NULL)
{
while ((p = *++argv) != NULL)
{
if (*p != '-')
break;
switch (*++p)
{
case '-': /* long option. */
++p;
if (0 == *p) /* just "--" */
{
fprintf(stderr, "%s",
"End-of-arguments option \"--\" not "
"supported, sorry.\n");
exit (CSSC_EX_USAGE);
}
else if (0 == strncmp(p, "prefix=", 7))
{
set_prefix(p+7);
}
else if (0 == strcmp(p, "cssc"))
{
printf("%s\n", "yes");
exit(CSSC_EX_OK);
}
else if (0 == strcmp(p, "version"))
{
if (!hadver)
show_version();
hadver = 1;
if (2 == argc) /* If the only arg, return success. */
return 0;
}
else
{
usrerr ("unknown option --%s", p);
usage();
exit (CSSC_EX_USAGE);
}
break;
case 'V':
if (!hadver)
show_version();
hadver = 1;
if (2 == argc) /* If -V was the only arg, return success. */
return 0;
break; /* Otherwise, process the remaining options. */
case 'r': /* run as real user */
drop_privs();
break;
#ifndef SCCSDIR
case 'p': /* path of sccs files */
SccsPath = ++p;
if (SccsPath[0] == '\0' && argv[1] != NULL)
SccsPath = *++argv;
break;
case 'd': /* directory to search from */
SccsDir = ++p;
if (SccsDir[0] == '\0' && argv[1] != NULL)
SccsDir = *++argv;
break;
#else
case 'p':
case 'd':
fprintf(stderr, "The %c option has been disabled.\n", *p);
exit(CSSC_EX_USAGE);
break;
#endif
case 'T': /* trace */
#ifdef DEBUG
Debug++;
#else
fprintf(stderr, "%s",
"The -T option has been disabled. Sorry.\n");
exit(CSSC_EX_USAGE);
#endif
break;
default:
usrerr ("unknown option -%s", p);
usage();
exit (CSSC_EX_USAGE);
}
}
if (SccsPath[0] == '\0')
SccsPath = ".";
}
if (NULL == argv[0])
{
/* No remaining args!
*/
if (!hadver)
{
/* Not sure what went on, but it wasn't a useful command line. */
usage();
return 1;
}
else
{
/* Just "sccs -V" is valid. */
return 0;
}
}
else
{
i = command (argv, FALSE, "");
return i;
}
}
char ** do_enter(char *argv[], char **np, char **ap,
int *rval)
{
char buf2[FBUFSIZ];
char *argv_tmp;
/* skip over flag arguments */
for (np = &ap[1]; *np != NULL && **np == '-'; np++)
continue;
argv = np;
/* do an admin for each file */
argv_tmp = argv[1];
while (np[0] != NULL)
{
printf ("\n%s:\n", *np);
strcpy (buf2, "-i");
gstrcat (buf2, np[0], sizeof (buf2));
ap[0] = buf2; /* sccs enter foo --> admin -ifoo */
argv[0] = tail_nc (np[0]);
argv[1] = NULL;
*rval = command (ap, TRUE, "admin");
argv[1] = argv_tmp;
if (*rval == 0)
{
strcpy (buf2, ",");
gstrcat (buf2, tail (np[0]), sizeof (buf2));
if (link (np[0], buf2) >= 0)
unlink (np[0]);
}
np++;
}
return np;
}
static int
absolute_pathname(const char *p)
{
return '/' == p[0];
}
static void
try_to_exec(const char *prog, char * const argv[])
{
char *newprog;
const char *prefix;
size_t len;
#ifdef DEBUG
if (Debug)
printf ("try_to_exec: %s\n", prog);
#endif
/* subprogram_exec_prefix is always NULL if we are runnign setuid. */
if (subprogram_exec_prefix)
{
prefix = subprogram_exec_prefix;
#ifdef DEBUG
if (Debug)
printf ("try_to_exec: Using user prefix '%s'\n", prefix);
#endif
}
else
{
prefix = (PREFIX);
#ifdef DEBUG
if (Debug)
printf ("try_to_exec: Using default prefix '%s'\n", prefix);
#endif
/* If no custom prefix was specified on the command line,
* we start by using execvp, because:-
*
* 1) The user may wish to use SCCS programs other than those
* in a fixed location.
* 2) execv("prt") will exec a program "prt" in the current
* dorectory (execvp will not).
*/
/* Honour $PATH unless running setuid.
* Must NOT use execvp() if running setuid.
*/
if (TrustEnvironment || RealUser)
execvp(prog, argv); /* execvp() uses $PATH */
}
/* absolute_pathname() does not call a library function, so no need
* to save/restore errno.
*/
if (absolute_pathname(prog))
{
execv(prog, argv);
perror(prog);
}
else
{
/* if the above exec() returns or was not allowed, try our prefix.
*/
/* SourceForge BUG #448215: patch from Jeff Sheinberg;
* change seconf strlen call from strlen(prefix) to strlen(prog).
*/
len = strlen(prefix) + strlen(prog);
newprog = malloc(len + 1);
if (NULL == newprog)
{
oom();
/*NOTREACHED*/
exit(CSSC_EX_TEMPFAIL);
}
sprintf(newprog, "%s%s", prefix, prog);
prog = newprog;
#ifdef DEBUG
if (Debug)
printf ("try_to_exec: %s\n", prog);
#endif
execv(prog, argv);
perror(prog);
}
if (Debug)
{
fprintf(stderr, "try_to_exec: exec failed.\n");
}
}
/*
** COMMAND -- look up and perform a command
**
** This routine is the guts of this program. Given an
** argument vector, it looks up the "command" (argv[0])
** in the configuration table and does the necessary stuff.
**
** Parameters:
** argv -- an argument vector to process.
** forkflag -- if set, fork before executing the command.
** editflag -- if set, only include flags listed in the
** sccsklets field of the command descriptor.
** arg0 -- a space-seperated list of arguments to insert
** before argv.
**
** Returns:
** zero -- command executed ok.
** else -- error status.
**
** Side Effects:
** none.
*/
/* Warning in command () */
int
command (char *argv[], bool forkflag, const char *arg0)
{
const struct sccsprog *cmd;
char buf[FBUFSIZ]; /* BUG: access to this is not bounds-checked. */
char *nav[1000];
char **np;
char **ap;
int rval = 0; /* value to be returned. */
#ifdef DEBUG
if (Debug)
{
int i;
printf ("command:\n\t\"%s\"\n", arg0);
for (i=0; argv[i] != NULL; ++i)
printf ("\t\"%s\"\n", argv[i]);
}
#endif
/*
** Copy arguments.
** Copy from arg0 & if necessary at most one arg
** from argv[0].
*/
np = ap = &nav[1];
if (1) /* introduce scope for editchs. */
{
char *editchs;
editchs = NULL;
if (1) /* introduce scope */
{
char *q;
const char *p;
for (p = arg0, q = buf; *p != '\0' && *p != '/';)
{
*np++ = q;
while (*p == ' ') /* wind p to next word. */
p++;
while (*p != ' ' && *p != '\0' && *p != '/' && *p != ':')
*q++ = *p++;
*q++ = '\0';
if (*p == ':')
{
editchs = q;
while (*++p != '\0' && *p != '/' && *p != ' ')
*q++ = *p;
*q++ = '\0';
}
}
}
*np = NULL;
if (*ap == NULL)
*np++ = *argv++;
/*
** Look up command.
** At this point, *ap is the command name.
*/
cmd = lookup (*ap);
if (cmd == NULL)
{
usrerr ("Unknown command \"%s\"", *ap);
usage();
return (CSSC_EX_USAGE);
}
else
{
if (cmd->sccsflags & WARN_MISSING)
{
fprintf(stderr,
"Warning: the \"%s\" command is not yet implemented.\n",
*ap);
/* continue anyway just in case we did implement it, or
* (perhaps) there is a real SCCS around somewhere.
*/
}
if (cmd->sccsflags & NO_HELP_HERE)
{
fprintf(stderr,
"GNU CSSC does not provide the \"%s\" command;\n"
"please see the relevant entry in the GNU CSSC manual\n"
"and the \"Missing Features and other Problems\" chapter\n"
"in particular.\n\n",
*ap);
}
}
/*
** Copy remaining arguments doing editing as appropriate.
*/
for (; *argv != NULL; argv++)
{
char *p;
p = *argv;
if (*p == '-')
{
if (p[1] == '\0' || editchs == NULL || my_index (editchs, p[1]) != NULL)
*np++ = p;
}
else
{
if (!bitset (NO_SDOT, cmd->sccsflags))
p = makefile (p); /* MEMORY LEAK (of returned value) */
if (p != NULL)
*np++ = p;
}
}
*np = NULL;
}
/*
** Interpret operation associated with this command.
*/
switch (cmd->sccsoper)
{
#if 0
case SHELL: /* call a shell file */
{
ap[0] = cmd->sccspath; /* Warning: discards const */
ap[-1] = "sh";
rval = callprog (_PATH_BSHELL, cmd->sccsflags, ap-1, forkflag);
}
break;
#endif
case PROG: /* call an sccs prog */
{
rval = callprog (cmd->sccspath, cmd->sccsflags, ap, forkflag);
}
break;
case CMACRO: /* command macro */
{
const char *s;
/* step through & execute each part of the macro */
for (s = cmd->sccspath; *s != '\0'; s++)
{
const char *qq = s;
while (*s != '\0' && *s != '/')
s++;
rval = command (&ap[1], *s != '\0', qq);
if (rval != 0)
break;
}
}
break;
case FIX: /* fix a delta */
{
if (ap[1] == 0 || strncmp (ap[1], "-r", 2) != 0)
{
usrerr ("-r flag needed for fix command");
rval = CSSC_EX_USAGE;
break;
}
/* get the version with all changes */
rval = command (&ap[1], TRUE, "get -k");
/* now remove that version from the s-file */
if (rval == 0)
rval = command (&ap[1], TRUE, "rmdel:r");
/* and edit the old version (but don't clobber new vers) */
if (rval == 0)
rval = command (&ap[2], FALSE, "get -e -g");
}
break;
case CLEAN:
{
rval = clean ( cmd->clean_mode, ap );
}
break;
case UNEDIT:
{
for (argv = np = &ap[1]; *argv != NULL; argv++)
{
if (unedit (*argv))
*np++ = *argv;
}
*np = NULL;
/* Test difference: unedit() says " foo: removed" and this
* output comes *after* the output from get. This happens
* when the output is a file. it's a buffering issue, not
* noticed by the casual user.
*
* Sigh.
*
* We can get the same output if we fork to run get; that way,
* the parent's output remains in the stdout buffer until
* after the child has exited.
*/
/* get all the files that we unedited successfully */
if (np > &ap[1])
rval = command (&ap[1], TRUE, "get");
}
break;
case DIFFS: /* diff between s-file & edit file */
{
char *s;
/* find the end of the flag arguments */
for (np = &ap[1]; *np != NULL && **np == '-'; np++)
continue;
argv = np;
/* for each file, do the diff */
s = argv[1];
while (*np != NULL)
{
int this_ret;
/* messy, but we need a null terminated argv */
*argv = *np++;
argv[1] = NULL;
this_ret = dodiff (ap, tail (*argv));
if (rval == 0)
rval = this_ret;
argv[1] = s;
}
}
break;
case DODIFF: /* internal diff call */
{
drop_privs();
for (np = ap; *np != NULL; np++)
{
if ((*np)[0] == '-' && (*np)[1] == 'C')
(*np)[1] = 'c';
}
/* insert "-" argument */
np[1] = NULL;
np[0] = np[-1];
np[-1] = "-";
/* execute the diff program of choice */
#ifndef V6
if (TrustEnvironment)
execvp ("diff", ap);
#endif
try_to_exec (cmd->sccspath, argv);
exit (CSSC_EX_OSERR);
}
/*NOTREACHED */
break;
case ENTER: /* enter new sccs files */
np = do_enter(argv, np, ap, &rval);
break;
default:
{
syserr ("Unexpected oper %d", cmd->sccsoper);
exit (CSSC_EX_SOFTWARE);
}
/*NOTREACHED */
break;
}
#ifdef DEBUG
if (Debug)
printf ("command: rval=%d\n", rval);
#endif
return rval;
}
/*
** LOOKUP -- look up an SCCS command name.
**
** Parameters:
** name -- the name of the command to look up.
**
** Returns:
** ptr to command descriptor for this command.
** NULL if no such entry.
**
** Side Effects:
** none.
*/
const struct sccsprog *
lookup (const char *name)
{
register const struct sccsprog *cmd;
for (cmd = SccsProg; cmd->sccsname != NULL; cmd++)
{
if (strcmp (cmd->sccsname, name) == 0)
return cmd;
}
return NULL;
}
/*
* childwait()
*
* Wait for a child process, perhaps with SIGINT ignored.
*/
static void
childwait(int pid, int *status_ptr, int ignoreintr)
{
struct sigaction sa, osa;
int ret;
/* temporarily ignore SIG_INT.
*/
memset (&sa, 0, sizeof(sa));
if (ignoreintr)
{
sa.sa_handler = SIG_IGN;
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
ret = sigaction(SIGINT, &sa, &osa);
}
/* May eventually need to kludge waitpid() as a loop
* with wait() for older systems.
*/
while ( -1 == waitpid(pid, status_ptr, 0) && EINTR == errno)
errno = 0;
/* Restore previous disposition of SIG_INT.
*/
if (ignoreintr && 0 == ret)
sigaction(SIGINT, &osa, NULL);
}
/*
* get_sig_name -- find the name for a signal.
*
*/
static const char *
get_sig_name(unsigned int sig,
char sigmsgbuf[11])
{
#ifdef SYS_SIGLIST_DECLARED
#ifdef NSIG
if (sig < NSIG)
return sys_siglist[sig];
#endif
#endif
if (sig > 999) sig = 999; /* prevent buffer overflow (!) */
sprintf (sigmsgbuf, "Signal %u", sig);
return sigmsgbuf;
}
/* do_fork()
*
* This function was created so that we could do things in preparation
* for fork, specifically, ensure that output streams are flushed and
* so on. Unfortunately, if we flush our output before forking, we break
* compatibility with some vendors' implementations of "sccs unedit", for
* which the output of "get" comes before the "foo: removed" output.
* The fact that that is stupid is beside the point. -- .
*/
static pid_t
do_fork(void)
{
/* ? Sleep if we get EAGAIN? */
/* ? Sleep if we get ENOMEM? */
return fork();
}
/*
** CALLPROG -- call a program
**
** Used to call the SCCS programs.
**
** Parameters:
** progpath -- pathname of the program to call.
** flags -- status flags from the command descriptors.
** argv -- an argument vector to pass to the program.
** forkflag -- if true, fork before calling, else just
** exec.
**
** Returns:
** The exit status of the program.
** Nothing if forkflag == FALSE.
**
** Side Effects:
** Can exit if forkflag == FALSE.
*/
int
callprog (const char *progpath,
short flags,
char *const argv[],
bool forkflag)
{
register int i;
#ifdef DEBUG
if (Debug)
{
printf ("%s\n", "callprog:");
for (i = 0; argv[i] != NULL; i++)
printf ("\t\"%s\"\n", argv[i]);
}
#endif
if (*argv == NULL)
return (-1);
/*
** Fork if appropriate.
*/
if (forkflag)
{
#ifdef DEBUG
if (Debug)
printf ("%s", "Forking\n");
#endif
i = do_fork ();
if (i < 0)
{
syserr ("cannot fork");
exit (CSSC_EX_OSERR);
}
else if (i > 0) /* parent */
{
int st;
childwait(i, &st, 0); /* don't block SIGINT. */
if (WIFEXITED(st)) /* normal exit. */
{
st = WEXITSTATUS(st);
}
else /* child exited via signal */
{
int sigcode = WTERMSIG(st);
if (sigcode != SIGINT && sigcode != SIGPIPE)
{
char sigmsgbuf[11];
fprintf (stderr,
"%s: %s: %s%s\n",
program_name,
argv[0],
get_sig_name(sigcode, sigmsgbuf),
(WCOREDUMP(st) ? " (core dumped)" : "") );
}
st = CSSC_EX_SOFTWARE;
}
if (OutFile >= 0)
{
close (OutFile);
OutFile = -1;
}
return (st);
}
}
else if (OutFile >= 0)
{ /* TODO: make this impossible. */
syserr ("callprog: setting stdout without forking");
exit (CSSC_EX_SOFTWARE);
}
/*
* in child (or didn't fork at all).
*/
/* set protection as appropriate */
if (bitset (REALUSER, flags))
{
drop_privs();
RealUser = 1;
#ifdef DEBUG
if (Debug)
printf ("callprog: gave up privileges.\n");
#endif
}
/* change standard input & output if needed */
if (OutFile >= 0)
{
close (1);
dup (OutFile);
close (OutFile);
}
/* call real SCCS program */
try_to_exec (progpath, argv);
exit (CSSC_EX_UNAVAILABLE);
/*NOTREACHED */
}
/*
** STR_DUP -- make a copy of a string.
**
** Parameters:
** S -- the string to be cpied.
**
** Returns:
** A duplicate copy of that string.
** NULL on error.
**
** Side Effects:
** none.
*/
static char *
str_dup (const char *s)
{
char *p;
size_t len = strlen (s) + 1u; /* include space for terminating '\0' */
p = malloc (len);
if (p)
{
memcpy (p, s, len);
}
else
{
perror ("Sccs: no mem");
exit (CSSC_EX_TEMPFAIL);
}
return p;
}
/*
** MAKEFILE -- make filename of SCCS file
**
** If the name passed is already the name of an SCCS file,
** just return it. Otherwise, munge the name into the name
** of the actual SCCS file.
**
** There are cases when it is not clear what you want to
** do. For example, if SccsPath is an absolute pathname
** and the name given is also an absolute pathname, we go
** for SccsPath (& only use the last component of the name
** passed) -- this is important for security reasons (if
** sccs is being used as a setuid front end), but not
** particularly intuitive.
**
** Parameters:
** name -- the file name to be munged.
**
** Returns:
** The pathname of the sccs file.
** NULL on error.
**
** Side Effects:
** none.
*/
char *
makefile (const char *name)
{
register const char *p;
char buf[3 * FBUFSIZ];
register char *q;
size_t left;
p = my_rindex (name, '/');
if (p == NULL)
p = name;
else
p++;
/*
** Check to see that the path is "safe", i.e., that we
** are not letting some nasty person use the setuid part
** of this program to look at or munge some presumably
** hidden files.
*/
if (SccsDir[0] == '/' && !safepath (name))
return (NULL);
/*
** Create the base pathname.
*/
/* first the directory part */
if (SccsDir[0] != '\0' && name[0] != '/' && strncmp (name, "./", 2) != 0)
{
gstrcpy (buf, SccsDir, sizeof (buf));
gstrcat (buf, "/", sizeof (buf));
}
else
{
gstrcpy (buf, "", sizeof (buf));
}
/* then the head of the pathname */
gstrncat (buf, name, p - name, sizeof (buf)); /* will always be terminated */
q = &buf[strlen (buf)];
left = sizeof(buf) - strlen(buf);
/* now copy the final part of the name, in case useful */
gstrcpy (q, p, left);
/* so is it useful? */
if (strncmp (p, "s.", 2) != 0 && !isdir (buf))
{
/* sorry, no; copy the SCCS pathname & the "s." */
gstrcpy (q, SccsPath, left);
gstrcat (buf, "/s.", sizeof (buf));
/* and now the end of the name */
gstrcat (buf, p, sizeof (buf));
}
/* if I haven't changed it, why did I do all this? */
/* but if I have, squirrel it away */
/* So our actions are the same in either case... */
return str_dup (buf);
}
/*
** ISDIR -- return true if the argument is a directory.
**
** Parameters:
** name -- the pathname of the file to check.
**
** Returns:
** TRUE if 'name' is a directory, FALSE otherwise.
**
** Side Effects:
** none.
*/
bool
isdir (const char *name)
{
struct stat stbuf;
#ifdef S_ISDIR
return (stat (name, &stbuf) >= 0) && S_ISDIR(stbuf.st_mode);
#else
return (stat (name, &stbuf) >= 0) && (stbuf.st_mode & S_IFDIR);
#endif
}
/*
** SAFEPATH -- determine whether a pathname is "safe"
**
** "Safe" pathnames only allow you to get deeper into the
** directory structure, i.e., full pathnames and ".." are
** not allowed.
**
** Parameters:
** p -- the name to check.
**
** Returns:
** TRUE -- if the path is safe.
** FALSE -- if the path is not safe.
**
** Side Effects:
** Prints a message if the path is not safe.
*/
bool
safepath (register const char *p)
{
const char *arg = p;
if (*p != '/')
{
while (strncmp (p, "../", 3) != 0 && strcmp (p, "..") != 0)
{
p = my_index (p, '/');
if (p == NULL)
return TRUE;
p++;
}
}
printf ("You may not use full pathnames or \"..\" but you specifed '%s'\n", arg);
return FALSE;
}
static void
form_gname(char *buf, size_t bufsize, struct dirent *dir)
{
size_t len = strlen (dir->d_name);
size_t gname_len = len-2u;
if (gname_len >= bufsize)
{
gstrbotchn(bufsize, dir->d_name, len, (char*)0, 0);
}
else
{
memcpy(buf, dir->d_name+2, gname_len);
buf[gname_len] = 0; /* terminate the string. */
}
}
/*
** CLEAN -- clean out recreatable files
**
** Any file for which an "s." file exists but no "p." file
** exists in the current directory is purged.
**
** Parameters:
** mode -- tells whether this came from a "clean", "info", or
** "check" command.
** argv -- the rest of the argument vector.
**
** Returns:
** none.
**
** Side Effects:
** Removes files in the current directory.
** Prints information regarding files being edited.
** Exits if a "check" command.
*/
int
do_clean (int mode, char *const *argv, char buf[FBUFSIZ])
{
struct dirent *dir;
register DIR *dirp;
char *bufend;
register char *basefile;
bool gotedit;
bool gotpfent;
FILE *pfp;
bool nobranch = FALSE;
register const struct pfile *pf;
register char *const *ap;
const char *usernm = NULL;
const char *subdir = NULL;
const char *cmdname;
/*
** Process the argv
*/
cmdname = *argv;
for (ap = argv; *++ap != NULL;)
{
if (**ap == '-')
{
/* we have a flag */
switch ((*ap)[1])
{
case 'b':
nobranch = TRUE;
break;
case 'u':
if ((*ap)[2] != '\0')
usernm = &(*ap)[2];
else if (ap[1] != NULL && ap[1][0] != '-')
usernm = *++ap;
else
usernm = username ();
break;
}
}
else
{
if (subdir != NULL)
usrerr ("too many args");
else
subdir = *ap;
}
}
/*
** Find and open the SCCS directory.
*/
gstrcpy (buf, SccsDir, FBUFSIZ);
if (buf[0] != '\0')
gstrcat (buf, "/", FBUFSIZ);
if (subdir != NULL)
{
gstrcat (buf, subdir, FBUFSIZ);
gstrcat (buf, "/", FBUFSIZ);
}
gstrcat (buf, SccsPath, FBUFSIZ);
bufend = &buf[strlen (buf)];
dirp = opendir (buf);
if (dirp == NULL)
{
usrerr ("cannot open %s", buf);
return (CSSC_EX_NOINPUT);
}
/*
** Scan the SCCS directory looking for s. files.
** gotedit tells whether we have tried to clean any
** files that are being edited.
*/
gotedit = FALSE;
while (NULL != (dir = readdir (dirp)))
{
if ('s' != dir->d_name[0] ||
'.' != dir->d_name[1] ||
0 == dir->d_name[2])
continue;
/* got an s. file -- see if the p. file exists */
gstrcat (buf, "/p.", FBUFSIZ);/* XXX: BUG: wrong size limit. */
basefile = bufend + 3;
form_gname(basefile, FBUFSIZ-strlen(buf), dir);
/*
** open and scan the p-file.
** 'gotpfent' tells if we have found a valid p-file
** entry.
*/
pfp = fopen (buf, "r");
gotpfent = FALSE;
if (pfp != NULL)
{
/* the file exists -- report it's contents */
while ((pf = getpfent (pfp)) != NULL)
{
if (nobranch && isbranch (pf->p_nsid))
continue;
if (usernm != NULL && strcmp (usernm, pf->p_user) != 0 && mode != CLEANC)
continue;
gotedit = TRUE;
gotpfent = TRUE;
if (mode == TELLC)
{
printf ("%s\n", basefile);
break;
}
printf ("%12s: being edited: ", basefile);
putpfent (pf, stdout);
}
fclose (pfp);
}
/* the s. file exists and no p. file exists -- unlink the g-file */
if (mode == CLEANC && !gotpfent)
{
char unlinkbuf[FBUFSIZ];
form_gname(unlinkbuf, FBUFSIZ, dir);
unlink (unlinkbuf);
}
}
/* cleanup & report results */
closedir (dirp);
if (!gotedit && mode == INFOC)
{
printf ("Nothing being edited");
if (nobranch)
printf (" (on trunk)");
if (usernm == NULL)
printf ("\n");
else
printf (" by %s\n", usernm);
}
if (mode == CHECKC)
exit (gotedit);
return (CSSC_EX_OK);
}
int
clean (int mode, char *const *argv)
{
int retval = CSSC_EX_OK;
char *buf = malloc(FBUFSIZ);
if (NULL == buf)
{
oom();
}
else
{
retval = do_clean(mode, argv, buf);
free(buf);
}
return retval;
}
/*
** ISBRANCH -- is the SID a branch?
**
** Parameters:
** sid -- the sid to check.
**
** Returns:
** TRUE if the sid represents a branch.
** FALSE otherwise.
**
** Side Effects:
** none.
*/
int
isbranch (const char *sid)
{
register const char *p;
int dots;
dots = 0;
for (p = sid; *p != '\0'; p++)
{
if (*p == '.')
dots++;
if (dots > 1)
return TRUE;
}
return FALSE;
}
/*
** UNEDIT -- unedit a file
**
** Checks to see that the current user is actually editting
** the file and arranges that s/he is not editting it.
**
** Parameters:
** fn -- the name of the file to be unedited.
**
** Returns:
** TRUE -- if the file was successfully unedited.
** FALSE -- if the file was not unedited for some
** reason.
**
** Side Effects:
** fn is removed
** entries are removed from pfile.
*/
bool
unedit (const char *fn)
{
register FILE *pfp;
const char *cp;
char *pfn;
FILE *tfp;
register char *q;
bool delete = FALSE;
bool others = FALSE;
const char *myname;
const struct pfile *pent;
char buf[PFILELG];
/* make "s." filename & find the trailing component */
pfn = makefile (fn); /* returned value must be freed. */
if (pfn == NULL)
return (FALSE);
q = my_rindex (pfn, '/');
if (q == NULL)
q = &pfn[-1];
if (q[1] != 's' || q[2] != '.')
{
usrerr ("bad file name \"%s\"", fn);
free(pfn);
return (FALSE);
}
/* turn "s." into "p." & try to open it */
*++q = 'p';
pfp = fopen (pfn, "r");
if (pfp == NULL)
{
printf ("%12s: not being edited\n", fn);
free(pfn);
return (FALSE);
}
/* create temp file for editing p-file */
tfp = tmpfile();
if (tfp == NULL)
{
usrerr ("cannot create temporary file");
fclose(pfp);
free(pfn);
exit (CSSC_EX_OSERR);
}
/* figure out who I am */
myname = username ();
/*
* Copy p-file to temp file, doing deletions as needed.
*/
while ((pent = getpfent (pfp)) != NULL)
{
if (strcmp (pent->p_user, myname) == 0)
{
/* a match */
delete = TRUE;
}
else
{
/* output it again */
putpfent (pent, tfp);
others++;
}
}
/*
* Before changing anything, make sure we can remove
* the file in question (assuming it exists).
*/
if (delete)
{
extern int errno;
cp = tail (pfn);
if ('p' == cp[0] && '.' == cp[1])
{
cp += 2;
}
errno = 0;
if (access (cp, 0) < 0 && errno != ENOENT)
goto bad;
if (errno == 0)
/*
* This is wrong, but the rest of the program
* has built in assumptions about "." as well,
* so why make unedit a special case?
*/
if (access (".", 2) < 0)
{
bad:
printf ("%12s: can't remove\n", cp);
fclose (tfp);
fclose (pfp);
free(pfn);
return (FALSE);
}
}
/* do final cleanup */
if (others)
{
/* copy it back (perhaps it should be linked?) */
rewind(tfp);
if (freopen (pfn, "w", pfp) == NULL)
{
usrerr ("cannot create \"%s\"", pfn);
free(pfn);
return (FALSE);
}
while (fgets (buf, sizeof buf, tfp) != NULL)
fputs (buf, pfp);
}
else
{
/* it's empty -- remove it */
unlink (pfn);
}
fclose (tfp);
fclose (pfp);
/* actually remove the g-file */
/* TODO: %12s in the printfs below is inappropriate for modern Unix
* where filenames can be longer than 11 characters...
*/
if (delete)
{
/*
* Since we've checked above, we can
* use the return from unlink to
* determine if the file existed or not.
*/
if (unlink (cp) >= 0)
printf ("%12s: removed\n", cp);
free(pfn);
return (TRUE);
}
else
{
printf ("%12s: not being edited by you\n", fn);
free(pfn);
return (FALSE);
}
}
/*
** DODIFF -- diff an s-file against a g-file
**
** Parameters:
** getv -- argv for the 'get' command.
** gfile -- name of the g-file to diff against.
**
** Returns:
** Result of get.
**
** Side Effects:
** none.
*/
int
dodiff (char * getv[], const char *gfile)
{
int pipev[2];
int rval;
register int pid;
auto int st;
extern int errno;
printf ("\n------- %s -------\n", gfile);
fflush (stdout);
/* create context for diff to run in */
if (pipe (pipev) < 0)
{
syserr ("dodiff: pipe failed");
exit (CSSC_EX_OSERR);
}
if ((pid = do_fork ()) < 0)
{
syserr ("dodiff: fork failed");
exit (CSSC_EX_OSERR);
}
else if (pid > 0)
{
/* in parent; run get */
OutFile = pipev[1];
close (pipev[0]);
rval = command (&getv[1], TRUE, "get:rcixt -s -k -p");
childwait(pid, &st, 1); /* ignore SIGINT while waiting. */
/* ignore result of diff */
}
else
{
/* in child, run diff */
if (close (pipev[1]) < 0 || close (0) < 0 ||
dup (pipev[0]) != 0 || close (pipev[0]) < 0)
{
syserr ("dodiff: failed to set up the 'diff' end of the pipe");
exit (CSSC_EX_OSERR);
}
/* The aBdHpqsvy options are (usually) specific to GNU diff. */
/* GNU diff supports -v (show version) but I don't think
* this is useful. Nevertheless we pass it through.
*/
command (&getv[1], FALSE, "-diff:elsfhbCunaBdHpqsvwyD");
}
return rval;
}
/*
** TAIL -- return tail of filename.
**
** Parameters:
** fn -- the filename.
**
** Returns:
** a pointer to the tail of the filename; e.g., given
** "cmd/ls.c", "ls.c" is returned.
**
** Side Effects:
** none.
*/
const char *
tail (register const char *fn)
{
register const char *p;
for (p = fn; *p != 0; p++)
if (*p == '/' && p[1] != '\0' && p[1] != '/')
fn = &p[1];
return fn;
}
/*
** TAIL_NC -- return tail of filename (non-const version).
**
** Parameters:
** fn -- the filename.
**
** Returns:
** a pointer to the tail of the filename; e.g., given
** "cmd/ls.c", "ls.c" is returned.
**
** Side Effects:
** none.
*/
char *
tail_nc (register char *fn)
{
register char *p;
for (p = fn; *p != 0; p++)
if (*p == '/' && p[1] != '\0' && p[1] != '/')
fn = &p[1];
return fn;
}
/*
** GETPFENT -- get an entry from the p-file
**
** Parameters:
** pfp -- p-file file pointer
**
** Returns:
** pointer to p-file struct for next entry
** NULL on EOF or error
**
** Side Effects:
** Each call wipes out results of previous call.
*/
const struct pfile *
getpfent (FILE * pfp)
{
static struct pfile ent;
static char buf[PFILELG];
register char *p;
if (fgets (buf, sizeof buf, pfp) == NULL)
return NULL;
ent.p_osid = p = buf;
ent.p_nsid = p = nextfield (p);
ent.p_user = p = nextfield (p);
ent.p_date = p = nextfield (p);
ent.p_time = p = nextfield (p);
ent.p_aux = p = nextfield (p);
return &ent;
}
char *
nextfield (register char *p)
{
if (p == NULL || *p == '\0')
return NULL;
while (*p != ' ' && *p != '\n' && *p != '\0')
p++;
if (*p == '\n' || *p == '\0')
{
*p = '\0';
return NULL;
}
*p++ = '\0';
return p;
}
/*
** PUTPFENT -- output a p-file entry to a file
**
** Parameters:
** pf -- the p-file entry
** f -- the file to put it on.
**
** Returns:
** none.
**
** Side Effects:
** pf is written onto file f.
*/
void
putpfent (register const struct pfile *pf, register FILE * f)
{
fprintf (f, "%s %s %s %s %s", pf->p_osid, pf->p_nsid,
pf->p_user, pf->p_date, pf->p_time);
if (pf->p_aux != NULL)
fprintf (f, " %s", pf->p_aux);
else
fprintf (f, "\n");
}
/*
** USRERR -- issue user-level error
**
** Parameters:
** f -- format string.
** p1-p3 -- parameters to a printf.
**
** Returns:
** -1
**
** Side Effects:
** none.
*/
void
usrerr (const char *fmt,...)
{
va_list ap;
fprintf (stderr, "\n%s: ", program_name);
va_start (ap, fmt);
vfprintf (stderr, fmt, ap);
va_end (ap);
fprintf (stderr, "\n");
}
/*
** SYSERR -- print system-generated error.
**
** Parameters:
** f -- format string to a printf.
** p1, p2, p3 -- parameters to f.
**
** Returns:
** never.
**
** Side Effects:
** none.
*/
void
syserr (const char *fmt,...)
{
extern int errno;
va_list ap;
fprintf (stderr, "\n%s SYSERR: ", program_name);
va_start (ap, fmt);
vfprintf (stderr, fmt, ap);
va_end (ap);
fprintf (stderr, "\n");
if (errno == 0)
{
exit (CSSC_EX_SOFTWARE);
}
else
{
perror (NULL);
exit (CSSC_EX_OSERR);
}
}
/*
** USERNAME -- return name of the current user
**
** Parameters:
** none
**
** Returns:
** name of current user
**
** Side Effects:
** none
*/
const char *
username (void)
{
const struct passwd *pw;
pw = getpwuid (getuid ());
if (pw == NULL)
{
syserr ("Who are you?\n"
"You don't seem to have an entry in the user database "
"(/etc/passwd) (uid=%d)", (int)getuid ());
exit (CSSC_EX_OSERR);
}
return (pw->pw_name);
}
/*
** Guarded string manipulation routines; the last argument
** is the length of the buffer into which the strcpy or strcat
** is to be done.
*/
static char *
gstrcat (char *to, const char *from, size_t length)
{
if (strlen (from) + strlen (to) >= length)
{
gstrbotch (to, from);
}
return (strcat (to, from));
}
static
char *
gstrncat (char *to, const char *from, size_t n, size_t length)
{
if (n + strlen (to) >= length)
{
gstrbotch (to, from);
}
/* strncat(), unlike strncpy(), always appends a \0 to the destination. */
return strncat (to, from, n);
}
static char *
gstrcpy (char *to, const char *from, size_t length)
{
if (strlen (from) >= length)
{
gstrbotch (from, (char *) 0);
}
return strcpy (to, from);
}
static void
gstrbotch (const char *str1, const char *str2)
{
usrerr ("Filename(s) too long: %s %s",
(str1 ? str1 : ""),
(str2 ? str2 : ""));
exit(CSSC_EX_SOFTWARE);
}
static void
gstrbotchn (int navail,
const char *str1, int len1, const char *str2, int len2)
{
fprintf(stderr, "Filename%s too long: ", (str1 && str2) ? "s" :"");
if (str1)
{
fwrite(str1, len1, 1, stderr);
putc(' ', stderr);
}
if (str2)
{
fwrite(str2, len2, 1, stderr);
}
putc('\n', stderr);
fprintf(stderr, "Only %d characters available.\n", navail);
exit(CSSC_EX_SOFTWARE);
}
CSSC-1.3.0/bsd/Makefile.am 0000644 0000000 0000000 00000000754 11372221630 011744 0000000 0000000 csscutildir = $(libexecdir)/cssc
bin_PROGRAMS = sccs
# "itbm" stands for "include the blasted manual pages".
itbm = sccs.1
EXTRA_DIST = sccs.me COPYING.bsd .ispell_english $(itbm)
man_MANS = sccs.1
AM_CPPFLAGS = "-DPREFIX=\"$(csscutildir)/\"" -I ../gl/lib -I $(srcdir)/../gl/lib
AM_LDFLAGS = -L../gl/lib
LDADD = -lgnulib
# The .ispell_english file is included in the distribution because it
# is useful for the list of correct spellings in this document to
# accompany the document itself.
CSSC-1.3.0/bsd/COPYING.bsd 0000644 0000000 0000000 00000005542 11362630513 011515 0000000 0000000 The contents of the "bsd" source directory is covered by this
copyright license. If you are using a binary distribution of GNU
CSSC, this refers to the executable "sccs", its manual page "sccs.1",
the file "sccs.me", and no other part. All other parts of GNU CSSC
are covered by the GNU general public license (see the file COPYING).
Since I (James Youngman) have made a copyright assignment to the FSF
for my past and future work on CSSC, all my modifiactions to this code
are assigned to the FSF. However, the coyright license I've used is
the original BSD license in acknowledgement of the fact that the
majority of the value of this code is provided by the original BSD
code; my modifications are needed to make it work with CSSC and to
make it portable to various systems etc. While the FSF, being the
copyright holders, can license my modifications as they choose, I'd
prefer them to retain the BSD license for the contents of this
directory.
Please note that this copyright notice is not the same as the
"original" BSD copyright notice. Specifically, the provision number 3
advertising condition has been removed. This change is described in
the letter which is available on the BSD FTP site in the file
`README.Impt.License.Change'. The provision which used to be numbered
4 has now been renumbered to 3.
Copyright (C) 1998
Free Software Foundation, Inc. All rights reserved.
Copyright (c) 1980, 1993
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
CSSC-1.3.0/bsd/.ispell_english 0000644 0000000 0000000 00000000421 11362630513 012704 0000000 0000000
AccessSid
admin
Allman
Autoconf
backslash
bi
ch
cmd
cs
deledit
delget
eric
fb
foreach
info
Ingres
inline
john
LDFLAGS
lib
LIBS
makefile
makefiles
mod
mothballed
newxyz
OBJS
ok
OpsysSid
prog
prt
PWB
REL
rvu
sccs
sccsdiff
SccsId
SID
src
SRCS
syssccs
TARG
ujohn
xyz
Youngman
CSSC-1.3.0/bsd/sccs.1 0000644 0000000 0000000 00000034240 11374025765 010737 0000000 0000000 .\" Copyright (c) 1998
.\" Free Software Foundation, Inc. All rights reserved.
.\"
.\" Copyright (c) 1983, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)sccs.1 8.1 (Berkeley) 6/6/93
.\"
.Dd June 3, 1998
.Dt SCCS 1
.Os GNU
.\" .Os was BSD 4.2
.Sh NAME
.Nm sccs
.Nd front end for the
.Li SCCS
subsystem
.Sh SYNOPSIS
.Nm sccs
.Op Fl r
.Op Fl d Ar path
.Op Fl T
.Op Fl V
.Op Fl -version
.Op Fl p Ar path
[--prefix=\fIpath\fP]
.Op Fl -cssc
.Ar command
.Op flags
.Op Ar
.Sh DESCRIPTION
.Nm Sccs
is a front end to the
.Li SCCS
programs
that
helps them mesh more cleanly
with
the rest of UNIX.
It
also includes the capability to run
.Dq set user id
to another user
to
provide additional protection (but see the section entitled BUGS).
.Pp
Basically,
.Nm sccs
runs the command with the specified
.Ar flags
and
.Ar args .
Each argument is normally modified to be prepended with
.Dq Li SCCS/s. .
.Pp
Flags to be interpreted by the
.Nm sccs
program must be before the
.Ar command
argument.
Flags to be passed to the actual
.Li SCCS
program must come after the
.Ar command
argument.
These flags are specific to the command and
are discussed in the documentation for that command.
.Pp
Besides the usual
.Li SCCS
commands,
several
.Dq pseudo-commands
can be issued.
These are:
.Bl -tag -width deledit
.It Cm edit
Equivalent
to
.Dq Li get \-e .
.It Cm delget
Perform a delta on the named files and
then get new versions.
The new versions will have id keywords expanded, and
will not be editable.
The
.Fl m ,
.Fl p ,
.Fl r ,
.Fl s ,
and
.Fl y
flags will be passed to
.Nm delta ,
and the
.Fl b,
.Fl c ,
.Fl e ,
.Fl i ,
.Fl k ,
.Fl l ,
.Fl s ,
.\" anybody who has a bad xterm which is almost anyone
and
.Fl x
flags will be passed to get.
.It Cm deledit
Equivalent
to
.Nm delget
except that the
.Nm get
phase includes the
.Fl e
flag.
This
option is useful for making a
.Em checkpoint
of your current editing phase. The same flags will be passed to delta
as described above, and
all the flags listed for
.om get
above except
.Fl e
and
.Fl k
are
passed to
.Nm edit .
.It Cm create
Creates
an
.Li SCCS
file ,
taking
the initial contents from the file of the same name.
Any
flags to
.Nm admin
are accepted. If the creation is successful,
the files are renamed with a comma on the front.
These should be removed when you are convinced that the
.Li SCCS
files
have been created successfully.
.It Cm fix
Must
be followed by a
.Fl r
flag.
This command essentially removes the named delta, but
leaves you with a copy of the delta
with the changes that were in it. It
is useful for fixing small compiler bugs, etc.
Since it doesn't leave audit trails, it should be used carefully.
.It Cm clean
This routine removes everything from the current directory
that can be recreated from SCCS files.
It will not remove any files being edited.
If the
.Fl b
flag is given, branches are ignored in the determination of
whether they are being edited; this
is dangerous if you are keeping the branches in the
same directory.
.It Cm unedit
This
is the opposite of an
.Nm edit
or
a
.Dq Li get \-e .
It should be used with extreme caution, since
any changes you made since the get will be irretrievably lost.
.It Cm info
Gives a listing of all files being edited.
If the
.Fl b
flag
is given, branches (i.e.,
.Li SID Ns \&\'s
with two or fewer components)
are ignored. If the
.Fl u
flag is given (with an optional argument) then
only files being edited by you (or the named user) are listed.
.It Cm check
Like
.Nm info
except that nothing is printed if nothing is being edited, and
a non-zero exit status is returned if anything is being edited.
The intent is to have this included in an
.Em install
entry in a makefile to insure that everything is included into the
.Li SCCS
file before a version is installed.
.It Cm tell
Gives a newline-separated list of the files being edited
on the standard output. Takes the
.Fl b
and
.Fl u
flags like
.Nm info
and
.Nm check .
.It Cm diffs
Gives a
.Nm diff
listing between the current version of the
program(s) you have out for editing and the versions in
.Li SCCS
format.
The
.Fl r ,
.Fl c ,
.Fl i ,
.Fl x ,
and
.Fl t
flags are passed to
.if n \{\
. br
.\}
.Nm get ;
the
.Fl l ,
.Fl s ,
.Fl e ,
.Fl f ,
.Fl h ,
.Fl u ,
.Fl n ,
.Fl w ,
and
.Fl b
options are passed to
.Nm diff .
The
.Fl a ,
.Fl B ,
.Fl d ,
.Fl H ,
.Fl p ,
.Fl q ,
.Fl s ,
.Fl v ,
and
.Fl y
options are passed to
.Nm diff
but these options are (usually) specific to GNU diff, and so may not
be supported on systems other than GNU.
The
.Fl C
flag is passed to
.Nm diff
as
.Fl c .
.It Cm print
This command prints out verbose information
about the named files.
.El
.Pp
Certain
commands (such as
.Nm admin )
cannot be run
.Dq Li set user id
by all users, since this would allow anyone to change the authorizations.
These commands are always run as the real user.
.Pp
.Bl -tag -width --prefix=foo
.It Fl -cssc
Returns a zero exit value (for the GNU version only). No other
operation is performed. This flag is used by the test suite to
determine if it needs to use the
.Fl -prefix
flag in order to find the correct subprograms (non-GNU versions of
sccs have the full pathnames for the subprograms hard-coded). In
this way, the CSSC test suite can be compiled ready for installation
in a particular directory, but the test suite can still be run before
the suite has been installed in its final position. This option is
supported only by the GNU version of
.Nm sccs .
.It Fl -prefix=foo
Uses
.Ar foo
as the prefix for SCCS sub-commands. The default prefix
is compiled into the program and is usually
.Dq /usr/sccs .
You can discover the prefix setting with the
.Fl V
flag. This prefix is used without a final slash being appended, so
values like
.Dq /usr/local/bin/cssc-
can be used. This option is disallowed if the program is installed
setuid, and it is supported only by the GNU version of
.Nm sccs .
.Em "This option is not equivalent to the"
.Fl p
.Em flag .
.It Fl -version
Show version information; synonymous with the
.Fl V
flag.
.It Fl r
Runs
.Nm sccs
as the real user rather than as whatever effective user
.Nm sccs
is
.Dq Li set user id
to.
.It Fl d
Specifies a root directory for the
.Li SCCS
files.
The default is the current directory.
If environment variable
.Ev PROJECTDIR
is set,
it will be used to determine the
.Fl d
flag.
.It Fl p
Defines the pathname of the directory in which the
.Li SCCS
files will be found;
.Dq Li SCCS
is the default.
The
.Fl p
flag
differs from the
.Fl d
flag
in that the
.Fl d
argument is prepended to the entire pathname and the
.Fl p
argument is inserted before the final component of the pathname.
For example,
.Dq Li sccs \-d/x \-py get a/b
will convert to
.Dq Li get /x/a/y/s.b .
The intent here is to create aliases such as
.Dq Li alias syssccs sccs -d/usr/src
which
will be used as
.Dq Li syssccs get cmd/who.c .
.Em Please note that the
.Fl p
.Em flag is (very) different in purpose from the
.Fl -prefix
.Em option.
.It Fl T
This flag causes the program to emit a debugging trace on stdout.
This flag may be disabled at compile time.
.It Fl V
Shows the version information for the
.Nm sccs
program, and the subcommand prefix being used. This option is
supported only by the GNU version of
.Nm sccs .
.El
.Sh EXAMPLES
To get a file for editing,
edit it,
and produce a new delta:
.Pp
.Dl sccs get \-e file.c
.Dl ex file.c
.Dl sccs delta file.c
.Pp
To get a file from another directory:
.Pp
.Dl sccs \-p/usr/src/sccs/s. get cc.c
.Pp
or
.Pp
.Dl sccs get /usr/src/sccs/s.cc.c
.Pp
To make a delta of a large number of files
in the current directory:
.Pp
.Dl sccs delta *.c
.Pp
To get a list of files being edited that are not on branches:
.Pp
.Dl sccs info \-b
.Pp
To delta everything being edited by you:
.Pp
.Dl sccs delta \`sccs tell \-u\`
.Pp
In a makefile, to get source files
from an
.Li SCCS
file if it does not already exist:
.Pp
.Dl SRCS =
.Dl $(SRCS):
.Dl \&\tsccs get $(REL) $@
.Sh MAINTAINER
This version of
.Nm sccs
is maintained by James Youngman, .
.Sh ENVIRONMENT
.Bl -tag -width Ar
.It Ev PROJECTDIR
.Pp
The PROJECTDIR environment variable is checked by the
.Fl d
flag. If
it begins with a slash, it is taken directly; otherwise,
the home directory of a user of that name is
examined for a subdirectory
.Dq Li src
or
.Dq Li source .
If such a directory is found, it is used.
.El
.Sh DIAGNOSTICS
There are many error messages, mostly brief but fairly obvious.
If all goes acording to plan, the program's exit status is zero.
Otherwise, it will be one of the following values:-
.Bl -tag -width >128
.It 0
No error; everything proceeded according to plan.
.It 64
Command line usage error
.\" 65 data format error
.\" 66 cannot open input
.\" 67 addressee unknown
.\" 68 host name unknown
.It 69
Could not exec program
.It 70
Internal software error. This should not happen.
.It 71
System error (e.g., can't fork)
.\" 72 critical OS file missing
.\" 73 can't create (user) output file
.\" 74 input/output error
.It 75
Temporary failure; retry later. This error is returned when the
system runs out of memory.
.\" 76 remote error in protocol
.It 77
Permission denied. This error occurs when the program has been
installed setuid, but SCCSDIR was not configured in at compile time.
This can also happen if something goes wrong when the program tries
to drop its setuid or setgid privileges.
.\" 78 configuration error
.\" >128
When a program exits due to a fatal signal, the shell usually adds 128
to the signal number and uses that as the return value. Some systems
also produce values in this range if there was a problem with the
dynamic linker.
.El
.Sh SEE ALSO
.Xr what 1 ,
.Xr sccs-admin 1 ,
.Xr sccs-cdc 1 ,
.Xr sccs-comb 1 ,
.Xr sccs-delta 1 ,
.Xr sccs-get 1 ,
.Xr sccs-help 1 ,
.Xr sccs-prs 1 ,
.Xr sccs-prt 1 ,
.Xr sccs-rmchg 1 ,
.Xr sccs-rmdel 1 ,
.Xr sccs-sact 1 ,
.Xr sccsdiff 1 ,
.Xr sccs-unget 1 ,
.Xr sccs-val 1 ,
.Xr make 1 ,
.Xr rcsintro 1 ,
.Xr cvs 1 ,
.Xr sccsfile 5 .
.Rs
.%A Eric Allman
.%T "An Introduction to the Source Code Control System"
.Re
.Rs
.%A James Youngman
.%B "CSSC: Compatibly Stupid Source Control"
.Re
.Sh COPYING
Copyright \(co 1998
.br
Free Software Foundation, Inc. All rights reserved.
.Pp
Copyright \(co 1983, 1990, 1993
.br
The Regents of the University of California. All rights reserved.
.Pp
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.Bl -enum
.It
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.It
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.It
All advertising materials mentioning features or use of this software
must display the following acknowledgement:
.Pp
.Rs
This product includes software developed by the University of
California, Berkeley and its contributors.
.Re
.It
Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.El
.Pp
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
.Sh HISTORY
The
.Nm sccs
command
appeared in
.Bx 4.3 .
.Pp
This version of
.Nm sccs
has been slightly modified to support
.Nm "GNU Autoconf" ,
and several new options (those beginning with two dashes and also
.Fl V )
and to make
it somewhat more portable.
The program otherwise remains largely unchanged.
.Sh BUGS
It should be able to take directory arguments on pseudo-commands
like the
.Li SCCS
commands do.
.Pp
Though this program is mostly derived from the original
.Bx
code, the subprograms accompanying it in the CSSC suite (admin, get,
delta and so on) are not the original AT&T code. Please do not count
on these programs being secure.
.Pp
Other known bugs are listed in the file BUGS, which accompanies GNU CSSC.
CSSC-1.3.0/bsd/Makefile.in 0000644 0000000 0000000 00000116011 11465500150 011747 0000000 0000000 # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = sccs$(EXEEXT)
subdir = bsd
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/cloexec.m4 $(top_srcdir)/m4/ctype.m4 \
$(top_srcdir)/m4/dirent-safer.m4 $(top_srcdir)/m4/dirent_h.m4 \
$(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dos.m4 \
$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/errno_h.m4 \
$(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \
$(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
$(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \
$(top_srcdir)/m4/getdtablesize.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mode_t.m4 \
$(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/onceonly.m4 \
$(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
$(top_srcdir)/m4/signal_h.m4 $(top_srcdir)/m4/stat.m4 \
$(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
$(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/symlink.m4 \
$(top_srcdir)/m4/sys_file_h.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
$(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/time_h.m4 \
$(top_srcdir)/m4/ungetc.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/warn-on-use.m4 \
$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
sccs_SOURCES = sccs.c
sccs_OBJECTS = sccs.$(OBJEXT)
sccs_LDADD = $(LDADD)
sccs_DEPENDENCIES =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = sccs.c
DIST_SOURCES = sccs.c
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(man_MANS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIG_DIFF_COMMAND = @CONFIG_DIFF_COMMAND@
CONFIG_INCLUDE = @CONFIG_INCLUDE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
ENOLINK_VALUE = @ENOLINK_VALUE@
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FCLOSE = @GNULIB_FCLOSE@
GNULIB_FCNTL = @GNULIB_FCNTL@
GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
GNULIB_FLOCK = @GNULIB_FLOCK@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF = @GNULIB_FPRINTF@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FSEEK = @GNULIB_FSEEK@
GNULIB_FSEEKO = @GNULIB_FSEEKO@
GNULIB_FSTATAT = @GNULIB_FSTATAT@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTELL = @GNULIB_FTELL@
GNULIB_FTELLO = @GNULIB_FTELLO@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
GNULIB_FWRITE = @GNULIB_FWRITE@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDELIM = @GNULIB_GETDELIM@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
GNULIB_GETLINE = @GNULIB_GETLINE@
GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
GNULIB_MBRLEN = @GNULIB_MBRLEN@
GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
GNULIB_MBSCHR = @GNULIB_MBSCHR@
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
GNULIB_MBSINIT = @GNULIB_MBSINIT@
GNULIB_MBSLEN = @GNULIB_MBSLEN@
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
GNULIB_MBSSEP = @GNULIB_MBSSEP@
GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
GNULIB_MEMCHR = @GNULIB_MEMCHR@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
GNULIB_MKFIFO = @GNULIB_MKFIFO@
GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
GNULIB_MKNOD = @GNULIB_MKNOD@
GNULIB_MKNODAT = @GNULIB_MKNODAT@
GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
GNULIB_MKTIME = @GNULIB_MKTIME@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
GNULIB_SCANDIR = @GNULIB_SCANDIR@
GNULIB_SETENV = @GNULIB_SETENV@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
GNULIB_STAT = @GNULIB_STAT@
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
GNULIB_STRPBRK = @GNULIB_STRPBRK@
GNULIB_STRPTIME = @GNULIB_STRPTIME@
GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
GNULIB_UNSETENV = @GNULIB_UNSETENV@
GNULIB_USLEEP = @GNULIB_USLEEP@
GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
GNULIB_VPRINTF = @GNULIB_VPRINTF@
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
GNULIB_WCTOB = @GNULIB_WCTOB@
GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
GNULIB_WRITE = @GNULIB_WRITE@
GREP = @GREP@
GXX = @GXX@
HAVE_ALPHASORT = @HAVE_ALPHASORT@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CHOWN = @HAVE_CHOWN@
HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FCNTL = @HAVE_FCNTL@
HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FLOCK = @HAVE_FLOCK@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
HAVE_FTELLO = @HAVE_FTELLO@
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
HAVE_FUTIMENS = @HAVE_FUTIMENS@
HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
HAVE_GETGROUPS = @HAVE_GETGROUPS@
HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GRANTPT = @HAVE_GRANTPT@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_LCHMOD = @HAVE_LCHMOD@
HAVE_LCHOWN = @HAVE_LCHOWN@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
HAVE_LOCALTIME_R = @HAVE_LOCALTIME_R@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_MBSLEN = @HAVE_MBSLEN@
HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MKDIRAT = @HAVE_MKDIRAT@
HAVE_MKDTEMP = @HAVE_MKDTEMP@
HAVE_MKFIFO = @HAVE_MKFIFO@
HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
HAVE_MKNOD = @HAVE_MKNOD@
HAVE_MKNODAT = @HAVE_MKNODAT@
HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OS_H = @HAVE_OS_H@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_PREAD = @HAVE_PREAD@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PWRITE = @HAVE_PWRITE@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
HAVE_REALPATH = @HAVE_REALPATH@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
HAVE_RPMATCH = @HAVE_RPMATCH@
HAVE_SCANDIR = @HAVE_SCANDIR@
HAVE_SETENV = @HAVE_SETENV@
HAVE_SIGACTION = @HAVE_SIGACTION@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_SIGSET_T = @HAVE_SIGSET_T@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
HAVE_STRCASESTR = @HAVE_STRCASESTR@
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
HAVE_STRPBRK = @HAVE_STRPBRK@
HAVE_STRPTIME = @HAVE_STRPTIME@
HAVE_STRSEP = @HAVE_STRSEP@
HAVE_STRTOD = @HAVE_STRTOD@
HAVE_STRTOLL = @HAVE_STRTOLL@
HAVE_STRTOULL = @HAVE_STRTOULL@
HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TTYNAME_R = @HAVE_TTYNAME_R@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
HAVE_UNSETENV = @HAVE_UNSETENV@
HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
HAVE_USLEEP = @HAVE_USLEEP@
HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
HAVE_VASPRINTF = @HAVE_VASPRINTF@
HAVE_VDPRINTF = @HAVE_VDPRINTF@
HAVE_WCHAR_H = @HAVE_WCHAR_H@
HAVE_WCHAR_T = @HAVE_WCHAR_T@
HAVE_WCRTOMB = @HAVE_WCRTOMB@
HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
HAVE_WINT_T = @HAVE_WINT_T@
HAVE__BOOL = @HAVE__BOOL@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@
NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
NEXT_CTYPE_H = @NEXT_CTYPE_H@
NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
NEXT_STDARG_H = @NEXT_STDARG_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STDINT_H = @NEXT_STDINT_H@
NEXT_STDIO_H = @NEXT_STDIO_H@
NEXT_STDLIB_H = @NEXT_STDLIB_H@
NEXT_STRING_H = @NEXT_STRING_H@
NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@
NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@
NEXT_TIME_H = @NEXT_TIME_H@
NEXT_UNISTD_H = @NEXT_UNISTD_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PR = @PR@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
REPLACE_FSTAT = @REPLACE_FSTAT@
REPLACE_FSTATAT = @REPLACE_FSTATAT@
REPLACE_FTELL = @REPLACE_FTELL@
REPLACE_FTELLO = @REPLACE_FTELLO@
REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
REPLACE_MBRLEN = @REPLACE_MBRLEN@
REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
REPLACE_MBSINIT = @REPLACE_MBSINIT@
REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_MKDIR = @REPLACE_MKDIR@
REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SETENV = @REPLACE_SETENV@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_UNSETENV = @REPLACE_UNSETENV@
REPLACE_USLEEP = @REPLACE_USLEEP@
REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
REPLACE_VPRINTF = @REPLACE_VPRINTF@
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
REPLACE_WCTOB = @REPLACE_WCTOB@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REPLACE_WRITE = @REPLACE_WRITE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
STDARG_H = @STDARG_H@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
UNAME = @UNAME@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
VALGRIND = @VALGRIND@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
ZCAT_PROGRAM = @ZCAT_PROGRAM@
abs_aux_dir = @abs_aux_dir@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
enable_binary = @enable_binary@
exec_prefix = @exec_prefix@
gl_LIBOBJS = @gl_LIBOBJS@
gl_LTLIBOBJS = @gl_LTLIBOBJS@
gltests_LIBOBJS = @gltests_LIBOBJS@
gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
gltests_WITNESS = @gltests_WITNESS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
max_line_length_description = @max_line_length_description@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
csscutildir = $(libexecdir)/cssc
# "itbm" stands for "include the blasted manual pages".
itbm = sccs.1
EXTRA_DIST = sccs.me COPYING.bsd .ispell_english $(itbm)
man_MANS = sccs.1
AM_CPPFLAGS = "-DPREFIX=\"$(csscutildir)/\"" -I ../gl/lib -I $(srcdir)/../gl/lib
AM_LDFLAGS = -L../gl/lib
LDADD = -lgnulib
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bsd/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu bsd/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
sccs$(EXEEXT): $(sccs_OBJECTS) $(sccs_DEPENDENCIES)
@rm -f sccs$(EXEEXT)
$(LINK) $(sccs_OBJECTS) $(sccs_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sccs.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-man1: $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list=''; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
done; }
uninstall-man1:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.1[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@list='$(MANS)'; if test -n "$$list"; then \
list=`for p in $$list; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
if test -n "$$list" && \
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
echo " typically \`make maintainer-clean' will remove them" >&2; \
exit 1; \
else :; fi; \
else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(MANS)
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-man
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man1
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-man
uninstall-man: uninstall-man1
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-man1 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-binPROGRAMS uninstall-man \
uninstall-man1
# The .ispell_english file is included in the distribution because it
# is useful for the list of correct spellings in this document to
# accompany the document itself.
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
CSSC-1.3.0/INSTALL 0000644 0000000 0000000 00000036340 11373345546 010207 0000000 0000000 Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
CSSC-1.3.0/docs/ 0000755 0000000 0000000 00000000000 11465500660 010150 5 0000000 0000000 CSSC-1.3.0/docs/TESTING 0000644 0000000 0000000 00000002133 11362630513 011124 0000000 0000000 Brief instructions on testing.
To run the tests, do
make check
but if you are modifying code, you can re-run any failing tests by
using one of the specific tests listed in the makefile.
The test suite is the single most important component of CSSC. It
ensures that CSSC faithfully emulates SCCS, misfeatures and all. It
also provides for regression testing as an integral part of each
bug-fix and release. There has so far been a linear relationship
between test-cases written and the number of bugs or missing features
found. This means that the fastest way to improve CSSC is not to hack
with the code, but to write new test cases. If, as the worst case, a
new test case does not reveal a new bug, it might prevent one in the
future. This means that ALL new test cases are useful.
The following people have improved the quality of CSSC by providing
cases for the test suite:
James Youngman (come on, everybody else!)
Richard Polton (sccsdiff; the first contributor)
Gerry Green (included/excluded deltas)
CSSC-1.3.0/docs/mailing-list.txt 0000644 0000000 0000000 00000001140 11374025765 013225 0000000 0000000 There is a mailing list for users of GNU CSSC; it's principally
devoted to the development of the program. If you have a bug report
to make or a question about GNU CSSC, it may be better to send it to
the CSSC maintainer (see the CSSC manual).
If you wish to join this mailing list, please visit its web site at
http://mail.gnu.org/mailman/listinfo/cssc-users.
If you don't want to subscribe via the web interface, you could send
an email to . The body of this message
should contain just the word "subscribe".
Please do not send email to the list without joining it first.
CSSC-1.3.0/docs/patches.txt 0000644 0000000 0000000 00000001060 11372221630 012247 0000000 0000000 If you are kind enough to submit patches, first of all, thanks. If
you do, please _please_ send git patches made against a recent version
of the tree. See .
When submitting diffs, please indicate what they are for (that is,
please indicate the nature of the bug they fix or the system and
version which requires the change).
You can submit patches by email to bug-cssc@gnu.org. However, if they
are large, we may need you to assign copyright in those changes to the
Free Software Foundation before applying them.
CSSC-1.3.0/docs/fdl.texi 0000644 0000000 0000000 00000056141 11373345610 011537 0000000 0000000 @c -*- buffer-read-only: t -*- vi: set ro:
@c DO NOT EDIT! GENERATED AUTOMATICALLY!
@c The GNU Free Documentation License.
@center Version 1.3, 3 November 2008
@c This file is intended to be included within another document,
@c hence no sectioning command or @node.
@display
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
@uref{http://fsf.org/}
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@end display
@enumerate 0
@item
PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document @dfn{free} in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of ``copyleft'', which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
@item
APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The ``Document'', below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as ``you''. You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
A ``Modified Version'' of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A ``Secondary Section'' is a named appendix or a front-matter section
of the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall
subject (or to related matters) and contains nothing that could fall
directly within that overall subject. (Thus, if the Document is in
part a textbook of mathematics, a Secondary Section may not explain
any mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The ``Invariant Sections'' are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
The ``Cover Texts'' are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A ``Transparent'' copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not ``Transparent'' is called ``Opaque''.
Examples of suitable formats for Transparent copies include plain
@sc{ascii} without markup, Texinfo input format, La@TeX{} input
format, @acronym{SGML} or @acronym{XML} using a publicly available
@acronym{DTD}, and standard-conforming simple @acronym{HTML},
PostScript or @acronym{PDF} designed for human modification. Examples
of transparent image formats include @acronym{PNG}, @acronym{XCF} and
@acronym{JPG}. Opaque formats include proprietary formats that can be
read and edited only by proprietary word processors, @acronym{SGML} or
@acronym{XML} for which the @acronym{DTD} and/or processing tools are
not generally available, and the machine-generated @acronym{HTML},
PostScript or @acronym{PDF} produced by some word processors for
output purposes only.
The ``Title Page'' means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, ``Title Page'' means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
The ``publisher'' means any person or entity that distributes copies
of the Document to the public.
A section ``Entitled XYZ'' means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as ``Acknowledgements'',
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
of such a section when you modify the Document means that it remains a
section ``Entitled XYZ'' according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
@item
VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
@item
COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
@item
MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
@enumerate A
@item
Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
@item
List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
@item
State on the Title page the name of the publisher of the
Modified Version, as the publisher.
@item
Preserve all the copyright notices of the Document.
@item
Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
@item
Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
@item
Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
@item
Include an unaltered copy of this License.
@item
Preserve the section Entitled ``History'', Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled ``History'' in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
@item
Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the ``History'' section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
@item
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
the Title of the section, and preserve in the section all the
substance and tone of each of the contributor acknowledgements and/or
dedications given therein.
@item
Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
@item
Delete any section Entitled ``Endorsements''. Such a section
may not be included in the Modified Version.
@item
Do not retitle any existing section to be Entitled ``Endorsements'' or
to conflict in title with any Invariant Section.
@item
Preserve any Warranty Disclaimers.
@end enumerate
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section Entitled ``Endorsements'', provided it contains
nothing but endorsements of your Modified Version by various
parties---for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
@item
COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled ``History''
in the various original documents, forming one section Entitled
``History''; likewise combine any sections Entitled ``Acknowledgements'',
and any sections Entitled ``Dedications''. You must delete all
sections Entitled ``Endorsements.''
@item
COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
@item
AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an ``aggregate'' if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
@item
TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
If a section in the Document is Entitled ``Acknowledgements'',
``Dedications'', or ``History'', the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
@item
TERMINATION
You may not copy, modify, sublicense, or distribute the Document
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense, or distribute it is void, and
will automatically terminate your rights under this License.
However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, receipt of a copy of some or all of the same material does
not give you any rights to use it.
@item
FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
@uref{http://www.gnu.org/copyleft/}.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License ``or any later version'' applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation. If the Document
specifies that a proxy can decide which future versions of this
License can be used, that proxy's public statement of acceptance of a
version permanently authorizes you to choose that version for the
Document.
@item
RELICENSING
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
World Wide Web server that publishes copyrightable works and also
provides prominent facilities for anybody to edit those works. A
public wiki that anybody can edit is an example of such a server. A
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
site means any set of copyrightable works thus published on the MMC
site.
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
license published by Creative Commons Corporation, a not-for-profit
corporation with a principal place of business in San Francisco,
California, as well as future copyleft versions of that license
published by that same organization.
``Incorporate'' means to publish or republish a Document, in whole or
in part, as part of another Document.
An MMC is ``eligible for relicensing'' if it is licensed under this
License, and if all works that were first published under this License
somewhere other than this MMC, and subsequently incorporated in whole
or in part into the MMC, (1) had no cover texts or invariant sections,
and (2) were thus incorporated prior to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the site
under CC-BY-SA on the same site at any time before August 1, 2009,
provided the MMC is eligible for relicensing.
@end enumerate
@page
@heading ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
@smallexample
@group
Copyright (C) @var{year} @var{your name}.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
@end group
@end smallexample
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the ``with@dots{}Texts.'' line with this:
@smallexample
@group
with the Invariant Sections being @var{list their titles}, with
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
being @var{list}.
@end group
@end smallexample
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
@c Local Variables:
@c ispell-local-pdict: "ispell-dict"
@c End:
CSSC-1.3.0/docs/CREDITS 0000644 0000000 0000000 00000012272 11374025765 011123 0000000 0000000 The Time-stamp: line indicates when this file was last modified.
Time-stamp: <2010-05-15 23:28:34 james>
The MySC package is CSSC's ancestor. MySC compiled under GCC 2.4.5
(but not GCC 2.7.x), and was written by Ross Ridge.
The "sccs" program and its accompanying documentation were written by
Eric Allman, and are copyright (C) 1980, 1993 The Regents of the
University of California. See the file ``bsd/COPYING.bsd'' for more
information.
The CGI script "sccs.cgi" and its associated documentation was written
by Richard Kettlewell and is Copyright 2001
Richard Kettlewell.
This package was for all intents and purposes written (that is,
updated for modern C++ compilers, fixed, enhanced, made more portable,
ported, fixed and documented) by James Youngman, . James
also added a test suite, wrote the test cases, converted the package
to use GNU Autoconf and GNU Automake, and wrote the manual. He's the
current maintainer. Only (and all) code still in the Kernighan and
Ritchie format is still left over from MySC. New code is indented
according to the GNU specification (this is used as a device for
keeping track of the provenance of the code).
Larry McVoy has provided explanations of some aspects of the operation
of "genuine" SCCS, and other valuable help. Larry is the author of
another SCCS clone, as a side effect of a more significant project.
See http://www.bitmover.com/ for more details.
Lars Hecking provided valuable help with
Autoconf and portability information for Solaris, SunOS, AmigaOS, and
IRIX. Plus, lots and *lots* of testing and useful bug reports.
Dave Bodenstab is to be thanked for providing patches
for FreeBSD-2.0.5 support -- these were largely to fix silly
assumptions (location of "true", GCC-2.6.3 support), nothing catering
to FreeBSD especially.
Malcolm Boff provided a useful bug
report for FreeBSD (apparently "echo -e -n" is invalid; the options
are exclusive).
Richard Polton provided Solaris testing, plus
testing with gigantic inputs, and rewrote sccsdiff, also supplying
test cases for it (in fact the only person so far [as of 1998-06-16]
to do so!) Richard also submitted code to remove the "xalloc"
wrappers for operator ::new so that all the code now uses new and
delete rather than a mixture of that and xalloc()/free().
Support for development snapshots of GCC (as of 1997-08-11) was
contributed by Fila Kolodny .
Peter Kjellerstedt has provided many
concise and useful bug reports, mostly with patches. In particular,
he has provided patches that allow CSSC to fix SCCS files which have
been corrupted by non-Y2K-compliant versions of SCCS.
John Interrante added support in cssc.texi for
"make install-info", and several improvements for auxfiles/CSSC.spec.
Marko Rauhamaa provided useful bug reports for
SCCS files produced by Sun's Code manager; it produces artifacts in
SCCS files not produced by "ordinary" SCCS. Examples include lines
of the form "^AU 0" and "^At 0". (Stop Press: these lines were
produced by (a bug in) Sun's Code Manager).
Achim Hoffann did his best to help me find a bug that was staring me
right in the face. Many apologies for making him gather all sorts of
information which wasn't in the end necessary. I'm sorry!
Dick Streefland provided patches for fixing several problems; core
dumps when no SCCS files were specified, and some prototype mismatches.
He also added checks for out-of-space conditions for get and prs.
Greg A. Woods , ,
provided the "yammer.c" program that allows us to run the test suite
on systems that lack "nl", for example NetBSD/SPARC 1.3.2. He has
also provided valuable help on keeping multiple versions of Autoconf
happy. Greg also provided a patch which eliminated the compiler
warnings on sccs.c, after I had given up trying.
Michael Sterrett and Aron Griffis provided several improvements to the
RPM spec file, and some punctuation corrections for cssc.text which
make version 3.12f of makeinfo happy.
William W. Austin provided a bug report regarding SCCS files
containing flag lines which are only four characters long.
Hyman Rosen provided fixes for better compatibility with strange SCCS
files produced by other implementations (e.g. ^Am after ^Ac instead of
before it).
Mark Reynolds provided a fair number of portability improvements (IRIX
6.5, SunOS 4.1.3, Ultrix 4.2).
Sergey Ostashenko provided patches to allow the processing of SCCS
files with gaps in the chain of used sequence numbers, and to allow
two deltas to have the same sequence number, on the condition that one
of them is a removed delta.
Frank van Maarseveen provided a patch for cdc and rmdel: if there is a
problem, delete the lock file even if we are running setuid.
Mark Fortescue provided patches bug-fixes relating to SID selection
and cutoff dates.
Jeff Sheinberg provided a patch to sccs.c, fixing an incorrect
allocation size for a buffer.
Thomas Duffy has taken on the role of building RPM and SRPM packages
for CSSC.
Yann Dirson maintains the Debian package for CSSC.
Local Variables:
mode: Text
End:
CSSC-1.3.0/docs/cssc.texi 0000644 0000000 0000000 00000462241 11374030340 011717 0000000 0000000 \input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename cssc.info
@settitle CSSC: Compatibly Stupid Source Control
@dircategory Miscellaneous
@direntry
* cssc: (cssc). The GNU work-alike replacement for SCCS.
@end direntry
@copying
This file documents the GNU @code{cssc} package for working with
@sc{sccs} files.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
@end copying
@finalout
@setchapternewpage odd
@c %**end of header
@set EDITION 1.10
@set VERSION 1.3.0
@set UPDATED Sun May 16 18:49:16 2010
@c Macros don't work with texi2html!
@c @macro authoraddr
@c @w{@samp{jay@@gnu.org}}
@c @end macro
@titlepage
@title CSSC
@subtitle Compatibly Stupid Source Control
@subtitle Edition @value{EDITION}, for CSSC Version @value{VERSION}
@subtitle @value{UPDATED}
@author by James Youngman
@page
@vskip 0pt plus 1filll
@insertcopying{}
@end titlepage
@ifnottex
@node Top, Overview, , (dir)
@insertcopying
This file documents the GNU @code{CSSC} package, which is
a work-alike for the traditional Unix SCCS suite.
This is edition @value{EDITION}, for CSSC Version @value{VERSION}.
@end ifnottex
@menu
* Overview:: Preliminary information.
* Interface:: How to use the suite.
* Invoking CSSC Programs:: How to run the individual CSSC programs.
* Filenames:: Names of files used by CSSC.
@c add chapter on branches and included/excluded deltas?
* File Format:: Description of the @sc{sccs} file format
* Interoperability:: Interoperating with other versions of @sc{sccs}.
* Environment:: How environment variables affect CSSC.
* Incomplete:: Missing Features.
* Year 2000 Issues:: Status of CSSC with regard to the Millennium.
* Testing:: How to run the test suite and write new cases.
* Problems:: Reporting bugs.
* Copying:: How you can copy and share @code{CSSC}.
* GNU Free Documentation License:: Copying and sharing this manual.
* BSD Code:: Parts of the code are from BSD.
* Glossary:: Definition of some terms relating to CSSC.
* Concept Index:: Index of concepts.
@end menu
@node Overview, Interface, Top, Top
@chapter Overview
@cindex overview
The GNU @sc{cssc} program is designed to be a compatible replacement for
the traditional Unix @sc{sccs} suite.
@cindex CVS
While it is strongly suggested that new projects not use this package,
sometimes existing projects require the use of @sc{sccs} files. While
conversion to other formats is possible, this is also sometimes
impractical. See the documentation for CVS and RCS. @xref{What is
CVS?, ,What is CVS?, cvs, The CVS Manual}. See also the manual pages
for RCS.
GNU CSSC is published under the GNU General Public License, which is
designed to protect your rights, as the user of this program. You have
the right to modify this program, and distribute it. You also have
responsibilities to those to whom you distribute copies, as detailed in
the license. @xref{Copying,,GNU General Public License}.
@cindex Ross Ridge
@cindex Eric Allman
@cindex MySC
@cindex author
@cindex BSD
GNU CSSC was originally based on the public-domain package MySC, which
was written by Ross Ridge. The enhancement work was done by James
Youngman.
The @code{sccs} program itself and its accompanying documentation
@file{sccs.me} and @file{sccs.1} were written by Eric Allman, and are
covered by the BSD license (@pxref{BSD Code}).
@node Interface, Invoking CSSC Programs, Overview, Top
@chapter How to use the suite
@cindex interface
@cindex Emacs
@cindex VC-mode
By far the easiest way to use @sc{cssc} (or indeed @sc{sccs}) is to use
VC-mode in GNU Emacs. @xref{Version Systems, ,Version Systems,emacs,The
GNU Emacs manual}.
If you can't use VC-mode, the BSD command @code{sccs} is a good
interface to the @sc{sccs} suite (and hence @sc{cssc}).
Other than that, you will need to use each of the programs in the suite
individually.
@node Invoking CSSC Programs, Filenames, Interface, Top
@chapter Invoking CSSC programs
@cindex invoking
@ifinfo
The menu items are arranged in approximate order of
frequency of use, except @code{admin}, which is first
because you have to use it to start with.
@end ifinfo
@iftex
The commands in the CSSC suite are described in alphabetical order.
Ordered by the frequency with which I use them, they are:-
@code{sccs, get, delta, what, sccsdiff, unget, admin,}
@code{prs, sact, rmdel, cdc, prt, help, val, comb.}
@end iftex
@menu
* admin:: Creating and administering SCCS files.
* sccs:: A more helpful front-end from BSD.
* get:: Checking-out a version for compilation or editing.
* delta:: Checking-in a revised version.
* what:: Identifying versions of files.
* sccsdiff:: Finding the changes between two revisions.
* unget:: When it all goes horribly wrong...
* prs:: Displaying the revision history of a file.
* sact:: Show which SCCS files are being edited.
* rmdel:: Expunging changes or backing out of a check-in.
* cdc:: Changing revision comments after the fact.
* prt:: Printing the delta table of a file.
* comb:: Creating a shell archive of an SCCS file.
* help:: Unimplemented hints on obscure error messages.
* val:: Validating an SCCS file for integrity.
@end menu
@node admin, cdc, , Invoking CSSC Programs
@section @code{admin}
@cindex admin
@cindex sccs-admin
@cindex creating @sc{sccs} files
@cindex initialising SCCS history files
To create an @sc{sccs} archive of a source file @file{foo.c}, do
@example
admin -ifoo.c s.foo.c
@end example
This creates the archive file @file{s.foo.c} and initialises it
with the current contents of your source file, @file{foo.c}. If you use
Emacs as your editor, you can just use @kbd{C-x v i} instead.
Another frequently-used option is @samp{-b}, which indicates that the
file is to be treated as a binary file rather than as text. You might
want to do this because the file actually contains binary data, or just
characters that have other meanings within an @sc{sccs} file, for
example @samp{^A}, the character whose code is 1.
@table @option
@cindex Restricting access to history files
@cindex Authorisation
@item -a@var{xxx}
Add user or group @var{xxx} to the list of those authorised to check
revisions in (that is, use @code{get -e} and @code{delta}). Users
must be specified by name and groups by numeric @sc{id}.
This feature is often used in conjunction with a setuid installation of
the @code{sccs} driver program (@pxref{sccs}). This is not a good idea
because the @sc{cssc} suite is not secure (@pxref{Known Problems}).
@item -b
@cindex Binary files
Ensure that the file is encoded as a binary file. This option only
works in conjunction with the @code{-n} or @code{-i} options.
This option is not available if binary file support is turned off
(@pxref{Interoperability}) though this can be re-enabled if necessary
with an environment variable (@pxref{Environment,,Environment Variables}).
@item -dF
Delete flag @var{F} from the flags present in the file (@pxref{Flags}).
When using @code{admin -dl} to unlock a release, you need to specify
which release should be unlocked. For example @code{admin -dla}
unlocks all releases, while @code{admin -dl2} unlocks only release 2.
This means that @code{admin -dl} will do nothing, since no release was
specified. If all releases are locked, attempting to unlock just one
release will have no effect.
@item -e@var{xxx}
Erase the specified user or group from the list of those authorised to
check revisions in or out.
@item -f@var{F}[@var{xxx}]
Add the flag @var{F} (with optional value @var{xxx}) to the file's
flags (@pxref{Flags}). For example, @option{-fv/tmp/checkit} sets the
MR-validation flag to @file{/tmp/checkit}.
@cindex checksum
@item -h
Check the @sc{sccs} file. The exit value will be 0 if the file is
valid, and not 0 otherwise. The checks made are the same as those
made for @code{val}. Some problems with the @sc{sccs} file may not be
diagnosed.
Warning messages may be emitted, indicating things that may or may not
be wrong (e.g. time apparently going backwards), but if no actual errors
are encountered, the exit value will still be zero.
This option is silently incompatible with all the other options; the
specified @sc{sccs} files will not be modified by @code{admin} if the
@option{-h} flag is used.
@item -i@var{foo}
Initialise the @sc{sccs} file with the contents of the file @var{foo}.
If no argument is given, read from standard input. This implies the
@option{-n} option.
@item -m@var{MR-list}
When initialising a file, add the specified list of @sc{mr} numbers
(@pxref{Modification Request Numbers}) to the delta commentary for the
initial version. This list can be empty. The specified @sc{mr}s are
validated according to the setting of the @var{v} flag, which should be
set (@pxref{Flags}). If the @var{v} flag is set but has no value
(i.e. is set to the empty string), validation silently succeeds. If the
@var{v} flag is not set, the @option{-m} option causes @code{delta} to
fail.
@item -n
Create a new @sc{sccs} file. Unless @option{-i} is also used, the new
file will contain control information but the body will be initially
empty. Some versions of @sc{sccs} require the @option{-i} option to
be specified if @samp{-n} is used. Therefore for greatest
portability, specify @samp{-i/dev/null} if you want an empty initial
body. @ref{Interoperability}.
@item -r@var{N}
@cindex initial release number
Set the initial release number to @var{N}. The initial level within
that release is always 1. Some versions of SCCS allow you to specify
actual an actual @sc{sid} here (for example @samp{1.2} or
@samp{1.8.2.1}). @sc{cssc} also allows this, but emits a warning. If
you use the @option{-r} option, you must also use the @option{-i}
option (not just the @option{-n} option). If the initial @sc{sid} you
specify is not on the trunk, some tools will fail to work with the
resulting file. See also @xref{SCCS Version Differences}.
@item -t@var{desc}
Read in descriptive text for this file from @file{@var{desc}}. This replaces
any existing description. If no argument, remove any existing
description (this is illegal if @option{-i} or @option{-n} is used).
@item -V
Display version information.
@item -y@var{adayada}
When initialising a file, set the comment for that delta to
@var{adayada}. If the option is given just as @option{-y}, the
comment is recorded as empty. The following word in the argument list
is not used as the comment. @emph{Note that this behaviour is different
to most Unix programs, but is the same as the behaviour of traditional
@sc{sccs}}.
@item -z
@cindex BitKeeper
Fix the checksum information. The @sc{sccs} file is still validated
by CSSC; apart from possibly having an incorrect checksum, the s-file
must be valid. If you use this option on an @sc{sccs} file which
really is invalid, then the attempt may fail or @emph{silently write
out a valid but incorrect file}. This option does not work on
BitKeeper files. Use this option with @emph{extreme} care.
@c TODO: Write the test cases.
@end table
@node Flags, Modification Request Numbers, ,admin
@subsection Flags
@cindex Flags
Flags are set and cleared with the @code{admin} program. @xref{admin}.
@unnumberedsubsubsec Boolean Flags
@table @option
@cindex Making branches
@cindex Branching
@item b
Enable branch deltas: this enables the @option{-b} option of get
(@pxref{get}).
@item e
This flag indicates that the file controlled by this @sc{sccs} file is a
binary file, and hence the body of the @sc{sccs} file is uuencoded.
This flag can only be set with the @option{-b} option of @code{admin} at
the time the file is created (or if admin takes it upon itself to set
this flag automatically), and cannot be unset. The circumstances under
which this can happen are discussed in @ref{Interoperability}.
@item f
@cindex BitKeeper
This flag is specific to the @emph{BitKeeper} suite, and is only
supported if @sc{cssc} has recognised the file as a BitKeeper file.
@sc{cssc} does not understand the significance of this flag.
@item i
@cindex Keyword Substitution
Make @code{get} and @code{delta} exit unsuccessfully when the
@samp{Warning: No id keywords} message is issued.
@cindex Concurrent editing
@cindex Simultaneous editing
@item j
Enables concurrent updates: if you try to get a revision for editing,
this normally fails if another user already has the file locked.
Setting the @samp{j} flag overrides this.
@item n
Create empty releases when the @option{-r} option to @code{get} is used to
skip releases. These empty releases can later serve as branch
points.
@item x
@cindex SCO
Sets the executable bit on the g-file. This flag is a SCO OpenServer
extension and is not supported by other versions of @sc{sccs}.
Setting this flag with @code{admin -fx} generates a warning to this
effect. If @sc{cssc} is simply processing a file which already has
this flag set, no message will be generated. See
@ref{Interoperability} for more information on compatibility between
@sc{cssc} and other implementations of @sc{sccs}.
@end table
@unnumberedsubsubsec Other Flags
@table @samp
@item c
Set the release ceiling. Releases higher than the ceiling cannot be
checked out.
@item f
@cindex obsolete releases
Set the release floor. Releases lower then the release floor cannot be
checked out.
@item d
Set the default delta which is used when the @code{get} command is given
without the @option{-r} option. The default behaviour for @code{get} is
defined in @ref{get}.
@item l
Set the locked release list. These releases cannot be checked out with
@code{get -e}. The special value @samp{a} denotes all releases.
@item q
@cindex Keyword Substitution
Sets the value substituted for the @samp{%Q%} keyword as described in
@ref{Keyword Substitution}. This flag is referred to in the output of
@sc{sccs} as @samp{csect name}, and is variously referred to here as
that, or the ``user flag'' or the ``Q flag''.
@item m
@cindex Keyword Substitution
Sets the overridden value for the @samp{%M%} keyword as described in
@ref{Keyword Substitution}.
@item t
@cindex Keyword Substitution
Sets the value for the @samp{%Y%} keyword as described in @ref{Keyword
Substitution}.
@item v
Sets the name of the program used to validate @sc{mr} (modification
request) numbers; @sc{mr}s are described in @ref{Modification Request
Numbers}. This flag can be set to the empty string, in which case
@sc{mr}s are allowed and the validation silently succeeds without any
program being run.
@item y
@cindex Keyword Substitution
@cindex Solaris
By default, all keywords are expanded in the gotten file.
See @ref{Keyword Substitution} for a list of such keywords. This flag
can be set to a list of letters separated by commas, in which case
keyword expansion will be limited to the specified keywords. For
example, @samp{admin -fyQ,M,Y} restricts keyword expansion so that
@samp{%Q%}, @samp{%M%} and @samp{%Y%} are expanded, while other
keywords such as @samp{%Z%} are not.
This flag is an extension introduced by Sun Solaris 8. See
@ref{Interoperability} for a discussion of the interoperability of
@sc{cssc} with other @sc{sccs} implementations.
@end table
@node Modification Request Numbers, , Flags, admin
@subsection Modification Request Numbers
@cindex mr-numbers
@sc{mr}s are identifiers that can be specified when checking in a
revision using @samp{delta} (or even using @samp{admin}, when creating a
file).
If the @samp{v} (``validate'') flag is set, the user running
@samp{delta} is prompted for @sc{mr} numbers as well as revision
comments. If this flag is not set, no validation is performed and no
@sc{mr} numbers are prompted for. If the @option{-m} option is given on
the command line for @option{delta}, the user is not prompted.
@sc{mr} numbers are not required by @sc{cssc} to be actual numbers; they
may contain any non-whitespace printable characters; other
implementations may not be so flexible.
@sc{mr} numbers are frequently used to tie code revisions to other
things, for example engineering change management documents or
bug-tracking databases. If your change management systems are
computer-based, you can use the validation program to ensure that the
offered @sc{mr} number is valid and that the calling user is allowed to
change the file.
The first argument passed to the validation program is the name of the
g-file and the following arguments are the @sc{mr} numbers offered. The
validating program should return zero if all the @sc{mr} numbers are
acceptable.
One might think that it would be useful to associate the @sc{mr} number
with the action of checking out for a modification (@code{get -e}), but
this is not possible with @sc{sccs}. If you want to do that kind of
thing, you must use a more advanced system, for example GNU CVS.
@node cdc, comb, admin, Invoking CSSC Programs
@section @code{cdc}
@cindex cdc
@cindex sccs-cdc
@cindex change delta commentary
@cindex delta comment, changing
@cindex comment, changing
The @code{cdc} command allows you to add comments to the commentary for
a particular delta in an @sc{sccs} file. Any delta in the file (other
than ones removed with @code{rmdel}) can be modified.
If a comment is not specified on the command line, comments are accepted
via standard input.
If the special argument name @samp{-} is being used, this means that a
list of files to operate on is being read from standard input, and
therefore the @option{-y} option is mandatory in this case.
The new comments are prepended to the existing comment for that delta,
followed by a line of the form @samp{*** CHANGED *** yy/mm/dd hh:mm:ss
who}. This is followed by the original comment. Comments cannot be
removed using @code{cdc}, but they can be added.
Only three options are supported:-
@table @option
@item -m@var{MR-list}
The specified (space-separated) list of @sc{mr}s is added to the
@sc{mr}-list for the relevant delta. If more than one @sc{mr} number is
to be added, the whole option should be quoted, to protect the spaces.
If an @sc{mr} is prefixed with an exclamation mark (@samp{!}), then the
indicated delta is removed from the existing list of @sc{mr}s for the
delta. The file comment is modified to indicate what @sc{mr}s have been
removed. If an @sc{mr} to be removed is in fact not present in any
case, this is silently ignored. and the comment is not updated for that
@sc{mr}. If you do not also want to add to the comment for the delta,
specify an empty comment option (that, is, a bare @option{-y}).
@item -r@var{SID}
This indicates which delta is to be changed. It must refer to an
existing delta in the file, which has not been removed with
@code{rmdel}.
@item -y@var{Comment}
This option introduces a comment to be added to the commentary for the
specified @sc{sid}. If more than one line is needed, it is a good idea
to enclose the option in quotation marks to ensure that the shell
includes them in the argument passed to @code{cdc}. An empty @option{-y}
option can be used to indicate that the commentary for this delta is not
to be modified (this is only useful when the @option{-m} option is used).
If the @option{-y} option is not given, the user is prompted for comments.
@end table
@node comb, delta, cdc, Invoking CSSC Programs
@section @code{comb}
@cindex comb
@cindex sccs-comb
This program is not yet implemented or documented in the manual, there
are no tests for it in the test suite yet, but it is part of @sc{sccs}
so it will eventually be implemented.
@c sorry!
@c TODO: write the code, write the test cases, and document it.
@node delta, get, comb, Invoking CSSC Programs
@section @code{delta}
@cindex delta
@cindex checking in changes
@cindex changes, checking in
@cindex committing changes
@cindex sccs-delta
@cindex checking in new revisions
The @code{delta} command is used to add a new revision to the ones
already stored in an @sc{sccs} file. Before being able to do this you
need to run @kbd{get -e} to check the file out for editing.
@cindex SID
@cindex release number
@cindex level number
@cindex branch number
@cindex sequence number
A new revision is created by the @code{delta} program. These revisions
are each identified by a unique @dfn{SID}. A @sc{sid} looks like
@samp{1.2.3.4}, where the four numbers are the @dfn{release},
@dfn{level}, @dfn{branch} and @dfn{sequence} numbers.
New revisions on the main sequence (the @dfn{trunk}) have no branch or
sequence numbers and so just have two number components (@samp{1.2}, for
example).
When a new version is checked in, @code{delta} usually prompts for
comments describing the changes just made. At this point you can enter
any comments, separating lines with backslash-newline pairs. An
unescaped newline terminates the comment, allowing operation to
continue.
Sometimes, running @code{delta} results in the creation of a branch in
the @sc{sccs} file; this is controlled by the @code{get} command at the
time the file is checked out for editing (@pxref{branches,,Making Branches}).
The @code{delta} program checks to see if you are authorised to check
in a delta to this file. The list of authorised users can be
maintained with the @code{admin} program (@pxref{admin}). If the
MR-validation flag (@pxref{Flags}) is set, you must also supply a
valid MR-number in order to be able to check in your change.
@menu
* Basic Usage: delta usage. Frequently-used @code{delta} commands
* Options: delta options. Full list of options
@end menu
@node delta usage, delta options, , delta
@subsection Basic usage for @code{delta}
Although there are several valid command-line options for @code{delta},
they are not frequently used; the most common usage of delta is
@example
delta SCCS/s.umsp.c
@end example
@noindent
and this command simply applies the changes to the file @file{umsp.c} to
the @sc{sccs} file which tracks it. Though it is possible to specify
the comment and MR-number for this change using command-line options,
it's more common to type them when prompted, unless @code{delta} is
being driven by another program; either way, it's unusual to specify
options for @code{delta} on the command line.
Note that the filename you specify on the command line is that of the
@sc{sccs} file, not the filename of the working file. The BSD wrapper
program, sccs(1), will guess the correct filename for you, but this
doesn't happen unless you do actually invoke it (@code{sccs delta
umsp.c} for example).
@node delta options, , delta usage, delta
@subsection Options for @code{delta}
@table @option
@item -g@var{sid-List}
The specified list of deltas are to be ignored when the version
being checked in is retrieved using @code{get}. The list is a list of
@sc{sid}s separated by commas, or can contain ranges of @sc{sid}s (these
are indicated by a dash). Untested.
@c TODO: Write the test cases.
@item -m@var{mr-list}
Specify the indicated list of @sc{mr} numbers (separated by spaces) for
this change (@pxref{Modification Request Numbers}). If the @var{v} flag
(@pxref{Flags}) is set, @code{delta} will prompt for MR numbers if none
are given on the command line. If the @var{v} flag has a non-empty
value, as opposed to just being set, then the supplied list of MR
numbers will be verified using that program. The requested delta will
not be made if this validation fails (the validation program returns a
nonzero exit status).
When the @var{v} flag is set, deltas @emph{must} be checked in using
this flag. If you are using Emacs's vc-mode, you can do this by setting
the variable @var{vc-checkin-flags} to @code{"-m2677"} if the @sc{mr}
with which you are working is numbered 2677, for example.
@item -n
If this option is given, the edited file is not deleted once processing
has succeeded. The edited file is referred to as the ``g-file'', since
it is the file which was previously ``gotten'' by the @code{get}
command.
@item -p
Display the differences between the old and new versions of the file
during processing. The output of @code{diff} is echoed on the standard
output.
@item -r
If several versions are checked out, the @option{-r} command-line option is
used to specify which checked-out version this change is in reference
to. When @code{get} is used to check out a version for editing, it
announces two @sc{sid}s:-
@example
3.1
new delta 3.2
402 lines
@end example
@noindent
One identifies the version forming the basis of the change, and the
other specifies the @sc{sid} that the new version will be assigned once
it is checked in again. Either of these two @sc{sid}s (in this case,
3.1 or 3.2) can be used for the @option{-r} option of @code{delta}.
@item -s
Suppress warning or confirmation messages. Error messages go to
standard error. This option is not covered in the test suite.
@c TODO: Write the test cases. Untested.
@item -y
Specify a comment for the revision log. This option is usually quoted
to protect the spaces contained in it. An empty comment can be
specified by just using a naked @option{-y}. If this option is not given
on the command line, @code{delta} will prompt the user for a comment.
@end table
@node get, help, delta, Invoking CSSC Programs
@section @code{get}
@cindex get
@cindex sccs-get
@cindex checking-out previous revisions
@cindex retrieving previous revisions
@cindex locking revisions for update
@cindex new versions
The @code{get} command is to retrieve previous revisions from an
@sc{sccs} file. With the @option{-e} option, it also locks the gotten
revision so that a modified version can be checked in later using
@code{delta}.
@menu
* Basic Usage: get usage. Frequently-used @code{get} commands
* Options: get options. Full list of options.
* Branches: branches. How branches are made.
* Keywords: Keyword Substitution. Keyword Substitution
* Included Excluded and Ignored deltas:: Here Be Dragons...
@end menu
@node get usage, get options, , get
@subsection Basic Usage for @code{get}
@table @option
There are very few common basic usage patterns for @code{get}. Below,
@file{s.foo.c} denotes the name of any existing @sc{sccs} file.
@item get s.foo.c
Get a copy of the most recent trunk revision of @file{s.foo.c} into the
file @file{foo.c}.
@item get -Gbar s.foo.c
@cindex g-file
Get a version from @file{s.foo.c}, into @file{bar} rather than the
default @file{foo.c}. The file produced by @code{get} is often referred
to as the ``g-file''.
@item get -r1.3 s.foo.c
Get revision 1.3 from @file{s.foo.c} into @file{foo.c}. The @option{-G}
option can be used to set the name of the gotten file.
@item get -p s.foo.c
Get the most recent trunk revision, and print it on standard output.
The @option{-r} option could also be used to specify some other revision.
@end table
Unless you specify the @option{-k} or @option{-e} option, the retrieved file
will be created read-only.
@node get options, branches, get usage, get
@subsection Options for @code{get}
@table @option
Full description of options
@item -a@i{N}
Retrieve the version corresponding to the delta sequence number
@i{N}. Mainly for use by other programs in the suite.
@item -b
Create a new branch when the resulting file is checked back in. Used
with the @option{-e} option. If the @option{-e} option is not given, or if
the @option{b} (branch) flag is not set in the @sc{sccs} file, this option
has no effect; a branch is not made. If the version to be checked out
for editing has a successor, a branch is created whether or not the
@option{-b} flag is present (@pxref{branches,branches,Making Branches}).
@item -c@i{when}
@cindex time travel
@cindex Year 2000
Get the version that was current at the time specified by @i{when}. The
format of the argument is [cc]yy[mm[dd[hh[mm[ss]]]]]. Any fields
omitted (except ``cc'') assume their maximum possible values so that if
you specify @option{-c92}, you get the latest version which was available
in the year 1992. It is possible to give four digits for the year as a
@sc{cssc}-specific extension, but only if none of the other fields are
omitted. If only two digits are used and the resulting value is less
than 69, the year is assumed to be in the twenty-first century
(@pxref{prs options} and @ref{Year 2000 Issues}).
@item -D
Turns on debugging output, indicating what is going on as the @sc{sccs}
file is read. This option may go away or have its behaviour change in
the near future.
@item -e
@cindex p-file
Indicates that the retrieved version is for editing. When checked
back in the resulting file will have a new revision number. The
retrieved file is writable, and keyword substitution does not take
place. A @dfn{p-file} is created; this file contains information
about what versions of the s-file are being edited, and by whom.
Unless the @samp{j} flag is set (@pxref{Flags}), @code{get -e} will
fail if someone else already has the file locked. If the list of
authorised users in the @sc{sccs} file is not empty, you must be in
that list in order to use this option.
@item -g
Do a dry-run, showing what version would be retrieved, but don't
actually get the file. This is sometimes done by scripts, just to test
the exit status.
@item -G@var{foo}
Name the gotten file @file{@var{foo}}, instead of the default name.
@item -i@var{list}
Include the deltas for the listed @sc{sid}s. See also @option{-x}.
@item -k
@cindex Keyword Substitution
Avoid doing keyword substitution (@pxref{Keyword Substitution}). This
is assumed when @option{-e} is specified. The gotten file is writable.
@item -l
Generates a delta summary file in the current working directory. The
name of the file is @file{l.foo} where @file{foo} is the name that
would normally be used for the gotten file. The name of the delta
summary file is not affected by the @option{-G} option. The delta
summary file is similar in content to the output of @code{prt}, though
it contains less information.
@item -lp
This is obsolete; use @option{-L} instead.
@item -L
Generate a delta summary as for the @option{-l} option, but print it
on stdout instead of creating a file. If @option{-L} and @option{-p}
are both specified, the delta summary is printed first.
@item -m
Prepend to each line of the result the @sc{sid} corresponding to the
@code{delta} which introduced this line to the file.
@item -n
Precede each line of output with the module name, before any @sc{sid}
added with the @option{-m} option.
@item -p
Write the result to the standard output, rather than to a file.
@item -r@var{X}
Retrieve version @var{X}, rather than the default.
@item -s
Run silently.
@item -t
Get the ``top'' delta for the indicated release. The default behaviour
of @code{get} is to get the highest revision on the trunk. The
@option{-t} option only modifies this behaviour in the situation where the
topmost trunk revision is a branch point. In this case, the @option{-t}
option causes the topmost revision on this branch to be retrieved. In
other words, the @option{-t} option removes the restriction that the
retrieved version should be on the trunk. This option is used by
@code{comb} (@pxref{comb}) and by the driver program @code{sccs} from
BSD (@pxref{sccs}).
@item -V
Show version information.
@item -w@var{XXX}
@cindex Keyword Substitution
When performing keyword substitution (@pxref{Keyword Substitution}), use
@var{XXX} rather than @samp{%Z%%M% <@sc{tab}> %I%} as the substitution
value for %W%.
@item -x@var{list}
Exclude the indicated deltas from the result. Deltas are indicated by
specifying the @sc{sid} at which they arrived in the file.
@end table
@node branches, Keyword Substitution, get options, get
@subsection Making Branches
@cindex Branching
@cindex forking
@cindex modifying released code
@cindex bug-fixing released code
Normally, editing revision 1.1 of a file produces revision 1.2. Editing
that produces revision 1.3, and so on. Sometimes, however, we need to
make a change to an earlier version which has already been superseded.
This might happen, for example, when a bug has been reported in a
released version of a file; a rapid bug-fix is required, but you're in
the middle of working towards a new release. A viable strategy is to
make a branch at the previously-released version, modify that to fix the
bug (and release this bug-fix). Meanwhile, development can be continued
along the ``main trunk'', and the same bug-fix can be incorporated in
this, ready for the next release later on.
When you check out a version of a file for editing, @sc{cssc} tells you
what the @sc{sid} of the new version will be. For normal progress along
the trunk, the @dfn{level number} is incremented. This is the second
numeric element of the @sc{sid}. In general, a @sc{sid} is composed of
four numbers @samp{R.L.B.S}, where ``R'' stands for ``Release'', ``L''
stands for ``Level'', ``B'' stands for ``Branch'', and ``S'' stands for
``Sequence number'' (not the same as the sequence numbers produced in
the output of @code{prt}).
Trunk revisions have only two components; you can think of the branch
and sequence numbers as being zero. Non-trunk revisions have four
components. When a branch is created from an existing @sc{sid}, the
release and level numbers are copied, the branch number is set to the
lowest unused value for that release and level, and the sequence number
is set to one. Hence the first branch from version 1.1 will be version
1.1.1.1, and if a branch is made from that, its @sc{sid} will be
1.1.2.1.
Branches are made from any given version when that version already has a
successor. For example, a @code{get -e} on version 1.1 will result in a
branch (1.1.1.1) if version 1.2 exists, and a @code{get -e} on version
1.2.1.1 will result in a branch (1.2.2.1) if version 1.2.1.2 exists.
If the ``enable branches'' flag is set, it is also possible to make
branches for revisions that do not have successors. This is done with
the @option{-b} flag of @code{get}.
@node Keyword Substitution, Included Excluded and Ignored deltas, branches, get
@subsection Keyword Substitution
@cindex Keyword Substitution
@cindex Version identifiers
Keyword substitution is performed unless the @option{-k} option or the
@option{-e} option is given to @code{get}.
@ref{what} contains a keyword substitution example.
The keywords are all of the form @samp{%@i{x}%} where @i{x} stands for
an upper-case letter, one of:
@table @asis
@item A
Expands to the same as @samp{%Z% %Y% %M% %I% %Z%}.
@item B
The branch number of the gotten version
@item C
Current line in the output file
@item D
@cindex Year 2000
The date at the time the file was gotten, in the form @i{yy/mm/dd}. The
year is always represented as two digits but this is not ambiguous since
the two-digit year is no later than 2068 (@pxref{Year 2000 Issues}).
@item E
@cindex Year 2000
The date that the newest delta in the gotten file was applied,
@i{yy/mm/dd}. The year is always represented as two digits but this is
not ambiguous since the two-digit year is no later than 2068
(@pxref{Year 2000 Issues}).
@item F
Name of the @sc{sccs} file, for example @samp{s.foo.c}.
@item G
@cindex Year 2000
As for %E%, but in the US format @i{mm/dd/yy}.
@item H
@cindex Year 2000
As for %D%, but in the US format @i{mm/dd/yy}.
@item I
Expands to the same as %R%.%L%.%B%.%S%, that is, the @sc{sid} of the
retrieved version.
@item L
The level number of the retrieved version.
@item M
Module name: the value of the @code{m} (module) flag, or the base name
of the @sc{sccs} file with the @file{s.} removed if the module flag is
unset.
@item P
Full name of the @sc{sccs} file.
@item Q
Value of the @code{q} flag. The @code{q} flag has no other purpose, and
can be set with @samp{admin -fq@r{foo}}. @xref{Flags}.
@item R
Release number of the retrieved version.
@item S
Sequence number of the retrieved version.
@item T
Current time (@i{hh:mm:ss}) when the file was retrieved, see %D% and %H%.
@item W
Expands to %Z% %M% <@sc{tab}> %I% or the argument for the @option{-w}
flag, if given.
@item Y
Value of the @code{t} (module type) flag.
@item Z
The literal string @code{@@(#)}. @xref{what}.
@end table
Some of the keywords listed above have expansions that are described
in terms of the contents of other keywords. This expansion is
performed as if the @samp{y} flag in the @sc{sccs} file is not set.
For example, @samp{admin -fyA} will cause the @samp{%I%} keyword not
to be expanded, but the @samp{%A%} keyword is still fully expanded,
even though it is defined in terms of @samp{%I%}.
@node Included Excluded and Ignored deltas, , Keyword Substitution, get
@section Included Excluded and Ignored deltas
This section describes how included, excluded and ignored deltas are
handled by @sc{cssc}. Little documentation is available on how
@sc{sccs} handles this, and so while this section describes how
@sc{cssc} works, it may in fact not be an accurate description of how
@sc{cssc} @emph{should} work.
If you spot a defect in this section (or of course any other section)
of the @sc{cssc} manual, please report this as a bug
(@pxref{Problems,,Reporting Bugs}).
@subsection The Usual Case
The usual case is where none of the deltas in the @sc{sccs} file has
any included, excluded or ignored deltas. All the lines in the body
of the @sc{sccs} file are there because they were first inserted by a
particular delta. All of these lines are copied through to the gotten
file, unless they are deleted by a later delta. For example if an
@sc{sccs} file contains deltas 1.1 and 1.2, then all the lines from
delta 1.2 will be included, and all the lines from delta 1.1 which are
not deteled in version 1.2 are also included.
@subsection Included Deltas
Normally the contents of the gotten delta is included in the output,
along with all the non-deleted lines of its ancestors. However, a
delta can also specify that some other delta should be included. This
really only makes a difference when there is a branch in the file.
For example, if delta 1.5 includes 1.3.1.5, then the gotten file will
include the contents of versions 1.1 through to 1.5, plus the contents
of the 1.3.1 branch up to and including 1.3.1.5. Lines which were
(say) added in 1.2 but delted in 1.3.1.1 will not appear in the
output, since we have included a delta that deletes them.
@subsection Excluded Deltas
Excluding a delta is, unsurprisingly, more or less the opposite of
including one. The exclusion of a delta supercedes the inclusion of a
delta. One might specify, for example, that delta 1.6 should exclude
delta 1.5 (for example to back out of any changes it made). Exclusion
can also be used to reverse the effect of an inclusion. Suppose that
delta 1.6 in the example from the section above excludes 1.3.1.5, then
1.6 will include the contents of deltas 1.1 through to 1.4, plus the
contents of delta 1.5 itself, but it will not include the data from
the 1.3.1 branch that would have been used if we had gotten delta 1.5.
@subsection Ignored Deltas
Ignored deltas are ``silent''; that is, lines which are added by a
delta which is (explicitly or implcitly) included will not appear in
the gotten file. Conversely, lines deleted by an ignored delta will
still appear in the gotten file.
@node help, prs, get, Invoking CSSC Programs
@section @code{help}
@cindex help program
@cindex sccs-help
This module is not implemented, and it probably will never be, because
it exists to translate the sometimes obscure error messages produced by
(genuine) @sc{sccs}. These messages come with identifying codes (like
``(ge4)''); one might type @kbd{help ge4} to translate an obscure
message into a more readable message detailing what has gone wrong. The
problem with this approach is that it results in a program called
@code{help} on the user's path. When a naive user types @kbd{help} they
are probably not looking for an explanation of an obscure message from
@sc{sccs}. In fact, @code{help} is in any case a shell builtin for GNU
Bash. Explanations of any obscure or unusual error messages belong in
this manual, and so no @code{sccs-help} program is provided or planned.
@node prs, prt, help, Invoking CSSC Programs
@section @code{prs}
@cindex prs
@cindex sccs-prs
@cindex revision summary
@cindex Summary of @sc{sccs} file
@cindex Dumping @sc{sccs} files
@cindex Whodunit
@cindex Audit trailing
The @code{prs} command (mnemonic: ``print revision summary'') prints
information about an @sc{sccs} file in a user-defined format. There are
options for selecting which deltas are reported on; selection is
possible by check-in time or by @sc{sid}. The format of the output can
also be specified on the command line. All parts of an @sc{sccs} file
can be dumped with @code{prs}. Those parts which appear once per delta
can be uniquely identified by @sc{sid} or by time.
Typical uses for @code{prs} are
@itemize @bullet
@item
Producing an audit trail of who changed what, and why, for example for
a software release report, or for ISO 9000 documentation.
@item
Discovering how a particular piece of code became broken, and deducing
which change broke it. The @code{get -m} command is also useful for
this, see @ref{get options,Options for @code{get},Options for
@code{get}}.
@item
Listing all changes made on Friday afternoons, as a preparation for
extra checking.
@end itemize
@menu
* Basic Usage: prs usage. Frequently-used @code{prs} commands
* Options: prs options. Full list of options
* Keywords: Data Keywords. Data Keyword Substitution
@end menu
@node prs usage, prs options, , prs
@subsection Basic Usage for @code{prs}
Here are some examples of the use of prs, with explanations of what they
do.
@table @samp
@item prs s.myfile.c
Show information about all the versions of @file{myfile.c}.
@item prs SCCS
Show information about all the @sc{sccs} files in the directory
@file{SCCS}.
@item prs -e -d:P: s.main.c | sort -u
Show which users have made changes to main.c.
@item prs -l -c`date +%y%m%d --date "last week"` SCCS
Examine all the @sc{sccs} files in the directory @file{SCCS}. Show any deltas
that have been created since last week.
@end table
@node prs options, Data Keywords, prs usage, prs
@subsection Options for @code{prs}
@table @option
@item -a
Include even removed deltas in the output. Removed deltas have a type
"R", as output by the :DT: keyword.
@item -c@var{[cc]YYMMDDHHMMSS}
@cindex Year 2000
Specifies the time of the ``cutoff''. When this option is given, the
delta selected by @code{prs} is the last one checked in before the
cutoff. As usual, any fields left unspecified in the cutoff are given
the maximum legal value (for example, the seconds field defaults to 59).
The fields can be separated by any non-numeric character, for example
@samp{-c97/11/02-11:25:42}.
As an extension specific to @sc{cssc}, if the argument contains more
than twelve (12) digits, and the first four characters are all digits,
it is assumed that a four-digit year form has been used. This means
that you can say @samp{-c1997/11/02-11:25:42} to mean the same as the
above.
In line with the X/Open CAE Specification, Commands and Utilities
(version 2, September 1994, pages 588 and 361), if the century field is
@emph{not} given and the year is less than 69, it is assumed to be a
year in the twenty-first century. The X/Open document does not mandate
a four-digit year specifier, but it would not make sense to apply this
rule if a four-digit year is specified. @xref{Year 2000 Issues}.
This behaviour is usually not the one required, and hence the @option{-e}
or @option{-l} options are specified too.
@item -d@var{format}
This specifies the data format for the output. Because the default
output format is sensible, this is typically used either in a shell
script which will process the output further, or by a human to retrieve
information which is not shown by default. See @ref{Data Keywords} for
the various keywords that can be used. Any characters in the data
format which are not part of a keyword are output as well.
If one specifies the @option{-d} option, @code{prs} by default only gives
information about the latest delta. To restore the default behavior of
showing all the deltas, use the @option{-e} option as well.
@item -e
Makes the @option{-c} option select deltas created at or earlier than the
specified time. Makes the @option{-r} option select deltas before and
including the one specified by the indicated @sc{sid}.
@item -l
As the @option{-e} option, but select only later deltas rather than
earlier ones.
@item -r@var{SID}
Specifies the @sc{sid} for which information is provided. If blank, the
latest delta is selected.
@end table
@node Data Keywords, , prs options, prs
@subsection Data Keywords for the @option{-d} option of @code{prs}
@subsubsection Global Keywords
These keywords expand to the same thing, no matter which version is
being examined. Many of these are @sc{sccs} file flags (@pxref{Flags}).
@table @code
@item :BD:
Emits the body of the @sc{sccs} file, that is, the part containing all
the delta information. Note that since this is dumped verbatim, it
contains control characters. If you want a more readable format,
consider using the @option{-b} option of @code{prt} (@pxref{prt
options}).
@item :BF:
Indicates the setting (@samp{yes} or @samp{no}) of the branch flag.
@item :CB:
Indicates the value of the release number ceiling flag.
@item :Ds:
The default @sc{sid} to check out (See @ref{Flags} and @ref{get}).
@item :F:
Name of the @sc{sccs} file.
@item :FB:
Indicates the value of the release floor boundary flag.
@item :FD:
File descriptive text (@pxref{admin}).
@item :FL:
List of @sc{sccs} file flags.
@item :J:
Value (@samp{yes} or @samp{no}) of the joint-edit flag.
@item :KF:
Value (@samp{yes} or @samp{no}) of the keyword-warning flag (@pxref{admin}).
@item :LK:
Value of the locked-releases flag.
@item :M:
The module name (the value of the @samp{m} flag).
@item :MF:
The value (@samp{yes} or @samp{no}) of the @sc{mr} validation flag
(@pxref{delta}).
@item :MP:
The value of the @sc{mr} validation program flag (@pxref{delta}). This
is usually the name of an executable file.
@item :ND:
The value of the null-delta (@samp{n}) flag (@samp{yes} or @samp{no}).
@item :Q:
The value of the (user-defined) Q flag (arbitrary one-line text).
@item :PN:
The full path name of the @sc{sccs} file.
@item :UN:
List of users authorised to make deltas to this file (one per line).
This list can be modified with the use of the options @option{-a} and
@option{-e} of @code{admin}; if this list is empty, any user is
allowed to use @code{delta} on this file (subject to the usual file
permissions checks made by the operating system). However, in this
case the @samp{UN} data keyword somewhat curiously expands to
@samp{none}.
@item :Y:
Value of the module-type flag.
@end table
The @samp{:BD:}, @samp{:FD:}, @samp{:FL:} and @samp{:UN:} keywords from
this section may expand to strings containing newlines.
@subsubsection Version-specific Keywords
These keywords expand to data that is specific to a particular version.
@table @code
@item :A:
Expands to @samp{:Z::Y: :M: :I::Z:}, useful for @code{what}.
@item :B:
Branch number of @sc{sid}
@item :C:
Comments for this delta. These may extend over several lines.
@item :D:
@cindex Year 2000
Date (yy/mm/dd) that this version was checked in. Expands to
@samp{:Dy:/:Dm:/:Dd:}. The year is always represented as two digits but
is not ambiguous since the two-digit year is no later than 2068
(@pxref{Year 2000 Issues}).
@item :Dd:
Day-of-month on which the delta was checked in (two digits).
@item :Dg:
Sequence numbers of ignored deltas (separated by white space).
@item :DI:
Expands to @samp{:Dn:/:Dx:/:Dg:} (sequence numbers
included/excluded/ignored).
@item :DL:
Expands to @samp{:Li:/:Ld:/:Lu:} (lines inserted/deleted/unchanged).
@item :Dm:
Month when this version as checked in (two digits).
@item :Dn:
Sequence numbers of included deltas (separated by white space).
@item :DP:
Sequence number of the delta that precedes this one.
@item :DS:
Sequence number of this delta.
@item :Dt:
Expands to @samp{:DT: :I: :D: :T: :P: :DS: :DP:}.
@item :DT:
Delta type: @samp{R} (removed) or @samp{D} (normal).
@item :Dx:
Sequence numbers of excluded deltas (separated by white space).
@cindex Year 2000
@item :Dy:
Year when this version was checked in. The year is always represented
as two digits but is not ambiguous since the two-digit year is no later
than 2068 (@pxref{Year 2000 Issues}).
@item :GB:
The body for this version, as distinct from the
body of the @sc{sccs} file itself, which is obtained
with @samp{:BD:}. Keyword expansion will be performed
in the same way as if @code{get} had been used.
@item :I:
The @sc{sid} of this version.
@item :L:
The level component of the @sc{sid} (that is, the second number).
@item :Ld:
Number of lines deleted in this version, with respect to its predecessor.
@item :Li:
Number of lines inserted in this version, with respect to its predecessor.
@item :Lu:
Number of lines unchanged in this version, with respect to its predecessor.
@item :MR:
The MR numbers specified when this delta was created.
@item :P:
Perpetrator: the login name of the user who created this delta.
@item :R:
The release number of the @sc{sid} (the first number).
@item :S:
The sequence number of the @sc{sid}. Don't confuse this with the delta
sequence numbers (@pxref{Delta Table}), which are internal identifiers
for deltas which are output by the keywords :DI:, :Dn:, :Dx: and :Dg:.
@item :T:
Time that this version was checked in (@samp{:Th:::Tm:::Ts:}).
@item :Th:
Hours component of check-in time (@samp{:T:}).
@item :Tm:
Minutes component of check-in time (@samp{:T:}).
@item :Ts:
Seconds component of check-in time (@samp{:T:}).
@item :W:
Shorthand for @samp{:Z::M:<@sc{tab}>:I:}, suitable for @code{what}
(@pxref{what}).
@item :Z:
Expands to @samp{@@(#)} (@pxref{what}).
@end table
The @samp{:C:}, @samp{:GB:} and @samp{:MR:} keywords from this section
may expand to strings containing newlines.
@node prt, rmdel, prs, Invoking CSSC Programs
@section @code{prt}
@cindex prt
@cindex sccs-prt
@cindex Revision summary
@cindex Change summary
@cindex Modification summary
@cindex Summary of changes to a history file
The @code{prt} command provides information about an @sc{sccs} file
without modifying it. There are many options, though the default
behaviour is usually appropriate. It is possible to select what
revisions to print information on, by @sc{sid} or by date.
Some @sc{sccs} implementations lack the @code{prt} command, though
none lack the @code{prs} command (@pxref{prs}) which is otherwise
quite similar.
@menu
* Basic usage: prt usage. Frequently-used @code{prt} commands
* Options: prt options. Full list of options
* Output format: prt output. The format of @code{prt}'s output
@end menu
@node prt usage, prt options, , prt
@subsection Basic usage for @code{prt}
The output provided by @code{prt} when no options are given is
sufficient most of the time, and so it's common to use it without any
options:-
@example
prt s.umsp.c
@end example
@noindent
The default output contains slightly more information than the output
of @code{get -L}. If you require more detail, the @option{-e}
(``everything'') option produces more detail:-
@example
prt -e s.umsp.c
@end example
@noindent
As usual, any argument that is the name of a directory causes all
@sc{sccs} files in that directory to be processed; the special argument
@file{-} indicates that a list of SCCS files are to be read from
@code{prt}'s standard input.
@node prt options, prt output, prt usage, prt
@subsection Options for @code{prt}
@table @option
@item -a
``All deltas''; this means that the output will include ``removed''
deltas. Removed deltas exist after @code{rmdel} has been used to remove
a delta.
@item -b
Print the body of the @sc{sccs} file. This is printed in a readable
format. The control character @samp{^A} (Control-A, ASCII code 1) which
starts some lines of an @sc{sccs} file is printed as three asterisks,
@samp{***}. Lines that do not start with the control character are
indented by one tab stop. For encoded (binary) files, the encoded form
of the file data is printed (this is what actually appears in the
@sc{sccs} file itself). If you want to extract the actual body of the
@sc{sccs} file, use the @samp{:BD:} keyword of @code{prs} (@pxref{Data
Keywords}.
@item -d
Print information about the deltas in the file, as opposed to
information about the @sc{sccs} file itself (for example the authorised
users). This is the default behaviour. The default behaviour is turned
off by the @option{-b}, @option{-f}, @option{-t} and @option{-u} flags, but
specifying @option{-d} on the command line again will ensure that the
delta information is printed.
@item -e
``Everything''; Means the same as @samp{-i -u -f -t -d}.
@item -c@var{[cc]YYMMDDHHMMSS}
@cindex Year 2000
Specifies the time of the ``cutoff''. When this option is given,
@code{prt} stops printing delta information when it reaches a @sc{sid}
at least as old as the cutoff. As usual, any fields left unspecified in
the cutoff are given the maximum legal value (for example, the seconds
field defaults to 59). The fields can be separated by any non-numeric
character, for example @samp{-c97/11/02-11:25:42}.
As an extension specific to @sc{cssc}, if the argument contains more
than twelve (12) digits, and the first four characters are all digits,
it is assumed that a four-digit year form has been used. This means
that you can say @samp{-c1997/11/02-11:25:42} to mean the same as the
above.
In line with the X/Open CAE Specification, Commands and Utilities
(version 2, September 1994, pages 588 and 361), if the century field is
@emph{not} given and the year is less than 69, it is assumed to be a
year in the twenty-first century. The X/Open document does not mandate
a four-digit year specifier, but it would not make sense to apply this
rule if a four-digit year is specified. @xref{Year 2000 Issues}.
The @option{-c} and @option{-r} options are mutually exclusive.
@item -f
Print the flags of the @sc{sccs} file (@pxref{Flags}).
@item -i
Print the serial numbers of included, excluded, and ignored deltas.
@item -r@var{[cc]YYMMDDHHMMSS}
Specifies a cutoff, as with the @option{-c} option, but with the opposite
sense; that is, nothing is printed for deltas that are more recent than
the indicated time.
The @option{-c} and @option{-r} options are mutually exclusive.
@item -s
Print only a summary line for each delta (that is, the @sc{mr} list and
comments and so on are omitted).
@item -t
Print the text description of the @sc{sccs} file, as set by @code{admin
-t} (@pxref{admin}).
@item -u
Print the list of users and group IDs authorised to make deltas, one per
line.
@item -y@var{SID}
Print only information for deltas as new as the specified @sc{sid}. If
the argument part is empty, that is, the option used is simply
@option{-y}, the most recent delta is selected. The oder in which delta
information is stored within the @sc{sccs} file is such that the
@sc{sid} selected by this option will be the last one printed.
If the @option{-y} option is used in conjunction with either the @option{-c}
or the @sc{-y} option, processing stops when either condition (date or
@sc{sid} match) is satisfied.
@end table
@node prt output, , prt options, prt
@subsection @code{prt} output format
The output format is fixed, though parts of the output can be omitted.
@enumerate
@item The header
@itemize @bullet
@item Newline
@item @sc{sccs} file name, followed by a colon
@item Two further newlines.
@end itemize
@item
Delta table information (for @option{-d}, @option{-e}, also the default,
but not if @option{-b}, @option{-f}, @option{-t}, @option{-u} are specified).
This section is printed once for each selected delta.
This begins with a newline as a separator (except when a cutoff is
being used, in which case the @sc{sccs} file name is used, followed by
a colon and a TAB character).
@itemize @bullet
@item Delta type @*
'R' for removed deltas (@pxref{rmdel}), and 'D' for ordinary ones.
@item TAB
@item Delta creation time (YY/MM/DD hh:mm:ss)
@item The login name of the user who created this delta
@item Sequence number of this delta
@item Sequence number of the previous delta
@item Line statistics @samp{inserted/deleted/unchanged}. These
statistics are capped at 99999, due to a limitation in the file
format.
@item Newline
@end itemize
@item Delta detail information @*
This section is printed once for each selected delta, unless the
@option{-s} option has been specified.
@itemize @bullet
@item Included deltas
@item Excluded deltas
@item Ignored deltas
@item @sc{mr} numbers
@item Delta comments
@end itemize
@item Global information @*
Once information has been printed for each of the selected deltas, the
global information is printed. This consists of
@itemize @bullet
@item List of authorised users and group IDs (if the list is blank,
@samp{everyone} is printed)
@item The @sc{sccs} file flags (@pxref{Flags}) are printed.
@item The description of the @sc{sccs} file is printed (this
is the description set by the @option{-t} option of @code{admin}).
@item The body of the @sc{sccs} file is printed, in a readable format.
The control character @samp{^A} that begins some lines is
printed as @samp{*** }, and other lines are printed indented
by one tab stop. Other than that, the body is printed as found
in the @sc{sccs} file. This means that binary files are left
encoded.
@end itemize
@end enumerate
@node rmdel, sact, prt, Invoking CSSC Programs
@section @code{rmdel}
@cindex rmdel
@cindex sccs-rmdel
@cindex backing out of changes
@cindex censoring revisions
@cindex deleting revisions
@cindex undoing revisions
@cindex Oops, it didn't compile
The @code{rmdel} (``Remove Delta'') command allows the last version last
checked in to an @sc{sccs} file to be removed again. Typically, one
does this after realizing that newly checked in version doesn't compile,
or doesn't work, and the fix is simple. In the author's opinion, it's
almost always better to be honest about mistakes, and just make a new
delta for the fixed version.
The @sc{sid} of a removed delta is soon re-used by @code{delta}, usually
for the fixed version.
The @code{rmdel} command takes only one option, @option{-r}, which
specifies the @sc{sid} of the version to be removed. This option is
mandatory.
The @code{rmdel} command will fail if you hadn't checked in that
revision, or if it is in use in some way. For example, @code{rmdel}
fails if the specified @sc{sid} is not the latest revision on its
branch, or if it has been checked out for editing.
As usual, any number of @sc{sccs} files can be named on the command
line. The special argument @file{-} indicates that the list of files to
be operated on should be read from standard input. If an argument is a
directory, the @sc{rmdel} command is applied to all @sc{sccs} files in
that directory.
@node sact, sccs, rmdel, Invoking CSSC Programs
@section @code{sact}
@cindex sact
@cindex sccs-sact
@cindex Activity summary
The @code{sact} (``Show Editing Activity'') command provides
a summary of which files are currently checked out for editing.
For each checked-out file, a summary line is given. This line is of
the form @samp{old-SID new-SID user date time}.
@table @samp
@item old-SID
Identifies the revision that was checked out for editing.
@item new-SID
This is the @sc{sid} that will be allocated by @code{delta} when the
working file is checked in again.
@item user
The login name of the user who checked out the file.
@item date time
The date and time at which the checking-out was done.
@end table
No output is produced for @sc{sccs} files that are not currently locked
for editing. If a directory is specified on the command line, the whole
directory is examined. Directory hierarchies are not descended beyond
this one level. If @samp{-} is given as an argument, filenames are read
from standard input.
Note that times in @sc{sccs} files (and lock-files) are stored as local
time, so if you are collaborating with developers in another time zone,
the date shown will be in their local time for files that they are
editing.
@c TODO: Write the test cases.
@node sccs, sccsdiff, sact, Invoking CSSC Programs
@section @code{sccs}
@cindex sccs
@cindex front-end tools
@cindex Cuddlier interface
The @code{sccs} utility is available with @code{CSSC}. The code has
been adapted to support GNU Autoconf, but it should function in the same
way. The only difference between the operation of the original BSD
@code{sccs} program and that of the one provided by @code{CSSC} is that
way that the called programs are searched for. While the original
program has the paths hard-coded in as @file{/usr/sccs/*}, the version
accompanying @code{CSSC} first searches for them on the PATH, and then
falls back on @file{/usr/sccs/*}. If the executable is running
set-user-id, the @code{PATH} environment variable is ignored. The
@code{sccs} program itself should be fairly secure, but the other
programs in the suite are not. @xref{Known Problems}, for more
information.
The @code{sccs} program is documented in its online manual page, and
also in @cite{An Introduction to the Source Code Control System} by Eric
Allman, a copy of which is included with this suite.
Unlike all the other parts of the suite, the @code{sccs} program and its
accompanying documentation are covered by the BSD copyright license; see
@ref{BSD Code}, and the file @file{COPYING.bsd}, for more information.
The original BSD version of the @code{sccs} program can easily be found
on BSD mirrors, for example @uref{ftp://ftp.freebsd.org/}.
@c Write the test cases.
@node sccsdiff, unget, sccs, Invoking CSSC Programs
@section @code{sccsdiff}
@cindex sccsdiff
@cindex sccs-sccsdiff
@cindex differences between revisions
@cindex change summary
The @code{sccsdiff} command compares two revisions stored in an
@sc{sccs} file, using the system utility @code{diff}. Options can be
passed on to @code{diff}, for example to set the output format. As with
the other utilities in the suite, @code{sccsdiff} will operate on a list
of s-files, but unlike most of the others, it will not process
directories named on the command line.
If you wish to compare the working copy of a file with a version stored
in the s-file, you should use the command @code{sccs diffs}
(@pxref{sccs}).
The options for @code{sccsdiff} are described below.
@table @option
@item --help
This option is provided by CSSC but not by other SCCS implementations.
It briefly describes the usage of the program.
@item --version
Indicates the version information for the @code{sccsdiff} program.
@item -p
The differences are piped through pr, rather than just being output
directly.
@item -rSID
This option is used to select a revision from the s-file. It must be
specified exactly twice, in order to select a pair of revisions to
compare.
@end table
All other options not appearing above are passed on to the @code{diff}
program. All the non-option arguments will be processed in turn as
@sc{sccs} files.
@node unget, val, sccsdiff, Invoking CSSC Programs
@section @code{unget}
@cindex unget
@cindex sccs-unget
@cindex Reverting to where you were before you broke it
The @code{unget} command is used to reverse the effect of @code{get
-e}. Typically you might do this when you embark on an edit of a
file, and it all goes horribly wrong. Using @code{unget} allows you to
revert to a previously-known state. In fact, if you have exercised some
care in checking in new revisions, perhaps using a test suite, then
@code{unget} can be used to return you to the last working version.
@subsection Options for @code{unget}
@table @option
@item -n
Do not delete the g-file which you were editing
@item -s
Operate silently
@item -r@var{sid}
When joint editing is enabled (@pxref{Flags}), several versions may be
checked out for editing. If this is the case, @var{sid} must be used to
indicate which edit is to be aborted.
@end table
@node val, what, unget, Invoking CSSC Programs
@section @code{val}
@cindex val
@cindex sccs-val
@cindex validating @sc{sccs} files
@cindex Validity checking
@cindex Checking sccs files for validity
The @code{val} command is used to validate a (possibly suspect)
@sc{sccs} file. If an @sc{sccs} command reports that the checksum of
an @sc{sccs} file is incorrect, this may mean that the file has been
corrupted. In this case, @code{val} may help to confirm this
(but @pxref{Paranoia, Why val doesn't solve the whole problem}).
Example usages:-
@example
val s.foo
val -mfoo s.foo
val -r1.2 s.foo
val s.foo s.bar SCCS/s.*
val /proj/python/spam/spam/eggs/spam
@end example
@menu
* Options for val:: Full list of options
* Validation Warnings:: Some potential problems result in warnings
* Return Value:: What val's return value means
* Paranoia:: Why your file might still be corrupt
@end menu
@node Options for val, Validation Warnings, ,val
@subsection Options for @code{val}
@table @option
@item -m@var{name}
Assert that the module name flag of the @sc{sccs} file is set to
@var{name}. The return value of @sc{val} will be zero only if all
the other checks succeed and the history file has its module name flag
set to this value. @xref{Flags}, for a description of the @sc{sccs}
file flags.
@item -s
Silent operation; suppress any error or warning messages that would
otherwise be emitted; the return value of the program will still
indicate the existence and general nature of any problems.
@item -V
Display version information . This option does not exist in the
traditional @sc{sccs} implementation.
@item -r@var{wanted}
Validation will succeed if the SID @var{wanted} is valid, unambiguous,
and present in the history file.
@item -y@var{type}
Assert that the module type flag of the @sc{sccs} file is set to
@var{type}. The return value of @sc{val} will be zero only if all
the other checks succeed and the history file has its module name flag
set to this value. @xref{Flags}, for a description of the @sc{sccs}
file flags.
@end table
@node Validation Warnings, Return Value, Options for val, val
@subsection Validation Warnings
Some possible problems with @sc{sccs} files are not definitively
errors. In these situations, @code{val} will emit a warning message
but the validation will not fail (that is, if there are no other
problems the return value will be zero). An explanation of the
possible warnings appears below.
@table @asis
@item WARNING: date for version 1.1 is later than the date for version 1.2
This message indicates that a delta exists in the history file where
the ``parent'' delta has a delta creation time which is later than the
creation time of the ``child'' delta. This is a warning only because the
delta creation time is measured in local time, and so if two
developers with different time locale settings both edit the file in a
short period of time, this can happen. If all the developers who
create deltas in a history file use the same timezone settings, this
should not happen.
@cindex time travel
Some versions of @sc{sccs}, but not @sc{cssc} exhibit a peculiar
behaviour in these circumstances, and do not include in the gotten
file any lines apparently inserted after the date of the delta which
has been selected. This applies to @code{get} but more importantly
also applies to the temporary file generated by @sc{delta} which is
compared with the working copy of tyhe file. Once this has happened
there is no way to recover from this problem other than to hand-edit
the @sc{sccs} file.
@item Unknown special comment intro
@cindex BitKeeper
This message is displayed when a ``c'' control line is seen in the
body of the @sc{sccs} file in which the initial ``c'' is not followed
immediately by a space. Lines of this type are used as an extension
mechanism by some other SCCS implementations, notably the
@emph{BitKeeper} suite, and @sc{cssc} knows about this, but if it sees
a construction it doesn't recognise, this warning is issued.
@item The 'y' flag specifies a keyword letter 'X' but %X% is not a recognised SCCS keyword
@cindex Keyword Substitution
This message is displayed when the @samp{y} flag of the @sc{sccs} file
is set to a value which includes a keyword letter which is not known.
This is harmless unless you intended to set the flag to some other value.
@ref{Flags}.
@end table
@node Return Value, Paranoia, Validation Warnings, val
@subsection Return Value
The value returned by the @code{val} program depends on the outcome of
the validation as follows :-
@table @asis
@item 0
Validation succeeded. No problems were detected. A small number of
potential problems may exist without causing a non-zero return value;
see @ref{Validation Warnings}, for more information.
@item 1
The @option{-m} option was used but the module name did not match.
@item 2
The @option{-y} option was used but the module type did not match.
@item 4
The @option{-r} option was used but the specified SID was ambiguous, or
not present in the history file.
@item 8
The @option{-r} option was used but the specified SID was invalid.
@item 16
Either the named file could not be opened, or it is not an @sc{sccs}
history file.
@item 32
The history file is corrupt.
@item 64
An invalid option letter was used on the command line.
@item 128
One of the files named on the command line was not present.
@end table
@node Paranoia, , Return Value, val
@subsection Why val doesn't solve the whole problem
Things that paranoid people might bear in mind are
@itemize @bullet
@item
Not all accidental changes to an @sc{sccs} file will necessarily make
the file invalid.
@item
Since the checksum of an @sc{sccs} file is of finite length, there is
a finite (though small) chance that a random change will not be
detected by the checksum
@item
If data is corrupted in the memory of a program, then the program will
write the incorrect data out to the history file and set the checksum
accordingly (in other words, an on-disk checksum only protects the
data while it is on the disk).
@item
Even if @code{val} concludes that a history file is structurally valid,
this does not mean that the file contains what you thought it did (for
example, perhaps the file was corrupted by having another, valid,
@sc{sccs} file copied over it, or perhaps it was overwritten by an old
backup version).
@item
Consumer-grade hardware (for example commodity PCs) generally lacks
error-correcting memory.
@end itemize
Things that an optimistic person might bear in mind are
@itemize @bullet
@item
The chances of a random change simultaneously fooling the checksum and
the checks that @code{val} does are very small indeed.
@item
Hardware failures rarely cause file corruption. The use of ECC memory
substantially reduces your changes of having undetected data
corruption.
@item
When @sc{cssc} operates on an @sc{sccs} file, most of the checks that
@code{val} performs are done anyway (@sc{cssc} differs slightly in this
respect from the traditional @sc{sccs} toolset).
@end itemize
The summary is that it is theoretically possible to fool the integrity
checks performed by the @sc{sccs} file checksum and by @code{val} but
the checksum isn't fooled often and the chances of fooling both
together are very small. The use of quality hardware reduces the
chance of data corruption yet further.
@node what, , val, Invoking CSSC Programs
@section @code{what}
@cindex what
@cindex @@(#)
@cindex identification string
The @code{what} program is designed to search in files for the
recognition string @samp{@@(#)}. All the strings it finds matching this
are printed on standard output.
The exit status of @code{what} if zero is a matching string as found,
and 1 otherwise.
@subsection Options for @code{what}
@code{what [-s] [-V] file [file ...]}
@table @option
@item -s
Exit successfully after finding the first string.
@item -V
Show version information for @code{what}.
@end table
@subsection Example
@cindex SCCS ID
While the file is being edited (either at first or after @samp{get -e}):-
@example
#ifndef CONFIG_NO_SCCS_IDS
static const char sccs_id[] = "%W%";
#endif
@end example
When the file is checked out for compiling (with @code{get}):-
@example
#ifndef CONFIG_NO_SCCS_IDS
static const char sccs_id[] = "@@(#)foo.c 1.3";
#endif
@end example
After compiling:-
@example
$ what foo
foo:
foo.c 1.3
@end example
If the executable is linked from several source files, you will get a
line of output for each string containing the identification string
@samp{@@(#)}. This is useful for finding out exactly what code went into
an executable. This technique also works on object files, archive
libraries, text files, and in fact any sorts of files at all.
Unlike the @code{strings} command, there is no way to make @code{what}
operate on standard input. The data would need to be written to a file
first.
The rationale for the preprocessor construct @code{CONFIG_NO_SCCS_IDS}
is that sometimes compilers or lint-pickers complain that the variable
@var{sccs_id} is unused, and defining @code{CONFIG_NO_SCCS_IDS} will
remove these @sc{id}s and thus silence the warnings.
@node Filenames, File Format, Invoking CSSC Programs, Top
@chapter Filenames
Temporary files are used during normal operation of @sc{cssc} (and
@sc{sccs}). Many of these are given fixed names. The prefixes for the
various files used by @sc{cssc} are listed in the table below.
@table @samp
@item s.
The history file itself.
@item l.
The delta summary file created by @code{get -l}. Unlike the other
files in this table, the l-file is created in the current directory.
@item p.
The file containing the list of edit locks.
@item z.
The lock file used to arbitrate access to the history file. The running
@sc{cssc} (or @sc{sccs}) program puts its PID into this file. Some
versions of @sc{sccs} (but @emph{not} @sc{cssc}) will break the lock
after 60 seconds if the specified PID is not running on the local
machine. In order to work more reliably over networked file systems,
@sc{cssc} will not do this; stale lock files would have to be removed
manually.
@item x.
Temporary file into which is written the new s-file. Once processing is
complete, the old s-file is replaced by the x-file.
@item q.
Temporary file into which is written the new p-file
@item d.
Temporary file used by delta; contains the gotten body of the previous
version (which we run diff against). This filename is used by @sc{sccs}
in the same situation, but according to the @sc{sccs} manual pages, it
puts the output of @code{diff} in this file instead.
@item u.
Encoded version of the gotten file; created by delta.
@end table
Except for the l-file, all of the temporary files in the above table
are created in the same directory as the s-file. The l-file is
created in the current working directory.
Since these filenames are always fixed, it is important that the
permissions on the directory containing the @sc{sccs} file be secure;
otherwise you have a security vulnerability where a malicious user can
cause you to accidentally over-write files you own or have access to,
but they do not. If you are the super-user, they can use this feature
to overwrite any file on the system.
@node File Format, Interoperability, Filenames, Top
@chapter File Format
This chapter provides a description of the format of @sc{sccs} files.
It is @emph{not authoritative}, and may not match some of the
peculiarities of your vendor's implementation.
@menu
* File Format Overview:: An overview of the file format
* The Header:: Format of the header of @sc{sccs} files
* The Body:: Format of the body of @sc{sccs} files
@end menu
@node File Format Overview, The Header, , File Format
@section Overview
An @sc{sccs} file contains two parts, the header and the body. The
header contains information about both the file as a whole and also
information about each version stored in the file. After this comes the
body itself, which is a stream of fragments from the controlled file
interspersed with control information which indicates which versions
these fragments appear in.
Most of the control information for @sc{sccs} files appears on lines
which are marked as special by the character whose value is 1 (ASCII
SOH); this is usually referred to as @samp{^A}. Lines in @sc{sccs}
files always end with a line feed (ASCII LF) rather than a carriage
return (ASCII CR) followed by a line feed.
@node The Header, The Body, File Format Overview, File Format
@section The Header
There are several parts to the @sc{sccs} file header:-
@iftex
@enumerate
@item The checksum line
@item The delta table
@item The authorised users section
@item The file flags
@item The file description
@end enumerate
@end iftex
@menu
* Checksum Line::
* Delta Table::
* Authorised User List::
* Global Flags Section::
* File Description::
* Example Header::
@end menu
@node Checksum Line, Delta Table, , The Header
@subsection Checksum
The first line of an @sc{sccs} file contains the checksum, preceded by
@samp{^Ah}. The checksum is in decimal and is generated by adding
together the values of all the characters in the file, and taking the
result modulo 65536. A checksum line might look like this:-
@example
^Ah36650
@end example
On systems whose C implementation considers the @code{char} type to be
unsigned, characters with their highest bit set appear to be considered
positive, and on machines with a signed @code{char} type, these
characters appear to be considered negative. This seems to mean that
these two types of machines will not agree on the correctness of an
@sc{sccs} file's checksum.
@cindex BitKeeper
The @emph{BitKeeper} suite uses @samp{^AH} to introduce its checksum
line rather than @samp{^Ah}, but the checksum is computed in the same
way.
@node Delta Table, Authorised User List, Checksum Line, The Header
@subsection The Delta Table
The checksum is followed by the delta table. Each entry describes one
version stored in the history file, and is composed of three lines plus
some comment lines. The first line introduces a new delta table entry
and has the form
@example
@code{^As 00001/00000/00010}
@end example
The three numbers represent the numbers of lines inserted, deleted and
unchanged in this version (with respect to its predecessor). For the
oldest version in the history file, the numbers of lines deleted and
unchanged should be zero and the number of lines inserted is the number
of lines in the initial version of the working file. These numbers are
always five digits long. If the true count of inserted, deleted or
unchanged lines is greater than 99999, then the fields will still only
contain 99999.
The second line has the form
@example
@code{^AD 1.5 68/12/31 23:59:59 james 5 4}
@end example
@noindent
Here, the @samp{D} indicates that this is a normal delta. The only
other type of delta is the removed delta. Removed deltas are created
with the @code{rmdel} program and are labelled with an @samp{R} instead
of a @samp{D}. This is followed by the @sc{sid}, which will have either
two or four fields separated by a decimal point (ASCII code 46 decimal).
A @sc{sid} with only two fields (release and level) is said to be on the
trunk of the revision tree. A @sc{sid} with the full four fields (the
last two are the branch number and the sequence number) is said to be a
``branch revision''. Each field in the @sc{sid}, if present, must
contain a positive integer no larger than 9999. This means that
@samp{1.0} would not be a valid version number, for example.
The third and fourth fields on this line are the date and time at which
this delta was added to the history file (rather than, for example, the
modification time of the working file which was checked in). The year
is represented with only two digits, and is deemed to be in the range
1969 to 2068 (@pxref{Year 2000 Issues}). Despite having only two year
digits, the date is in ISO order (year/month/day). The time is
indicated using 24-hour clock notation. The date in the above example
is the latest date it is possible to represent in an @sc{sccs} file.
The fifth field is the name of the user who checked this version in.
For the gratification of pedants, it should be noted that this is the
name associated with the @emph{actual} user-id rather than the
@emph{effective} user-id, or the name appearing in the system log as the
user who logged in on the controlling terminal.
The final two fields are called @dfn{delta sequence numbers}, or
@dfn{seqnos}. They are for the internal use of the implementation and
should not be confused with ``sequence numbers'', which are the final
fields of four-field (``branch'') @sc{sids}. The seqno of the delta
added last will be larger than that of any other delta. Each delta has
a unique seqno. The first of these two fields is the seqno of this
delta itself, and the second field is the seqno of its predecessor (that
is, the version which had been checked out with @code{get -e}). The
seqno 0 is special and appears only as the (nonexistent) predecessor of
the first delta.
Since the delta table entries appear in reverse order of addition
(i.e. new entries are always added at the top), the initial delta appears
at the foot of the delta table. Many of the @sc{sccs} utilities define
their cutoffs in such a way that they can stop traversing the delta
table when they find a delta which is too old.
After the @samp{^Ad} line there may be several lines which indicate
lists of included, excluded or ignored sequence numbers for this delta.
I don't understand this area of the functionality of @sc{sccs} very
well, so any description here may be vague or incorrect. The CSSC
implementation may also be incomplete in this area.
The list of included seqnos is introduced with @samp{^Ai}, the
excluded seqnos with @samp{^Ax}, and ignored seqnos with @samp{^Ag}.
These are followed by a space character, and then the list itself, which
is a space-separated list of integers.
If the @sc{mr}-validation flag (@pxref{Flags}) was turned on at the time
of the creation of this delta, one or more lines of the form
@example
^Am mr1
^Am mr2
^Am mr3
^Am mr4
@end example
may occur. These lines constitute a list of Modification Request
Numbers, one on each line.
The next part of the delta table entry is the delta commentary.
This comment is intended to contain a description of the changes made in
this delta, and is written and read by humans. This may extend over one
or many lines, each introduced with @samp{^Ac}, like this:-
@example
^Ac The end of the world
^Ac as we know it
@end example
If there is no comment for a particular delta, because it was suppressed
with the @code{-y} option to @code{delta} or @code{cdc}, or because the
user was presented with a prompt for comments but just typed the return
key, an empty @samp{^Ac} control line will appear at this point.
CSSC is currently slightly incorrect in this area. If the comment is
suppressed with the @code{-y} option, it emits no @samp{^Ac} lines at
all.
@cindex BitKeeper
The @emph{BitKeeper} suite uses comment lines of the form @samp{^AcX}
(where @samp{X} is a non-blank character) to store data which is
specific to BitKeeper. This data is ignored by @sc{cssc}, which
provides read-only support for BitKeeper files. These special lines
are distinguished from normal comment lines by the fact that there is
no space after the @samp{c}:-
@example
^AcHathlon.transmeta.com
^AcK09043
^AcParch/arm/boot/Makefile
^AcRe1f91d8bfa21c521
^AcV4
^AcX0x821
^AcZ-08:00
@end example
Some @sc{sccs} files contain an MR list which follows rather than
precedes the comments for a delta, but this is unusual.
The comment block, and in fact the whole delta table entry, is
terminated by a control line of the form
@example
^Ae
@end example
To illustrate this further, here are two more delta table entries from
an @sc{sccs} file:-
@example
^As 00001/00000/00007
^Ad D 1.2 99/12/31 23:59:59 mcvoy 2 1
^Ac Added an extra line
^Ae
^As 00007/00000/00000
^Ad D 1.1 69/01/01 00:00:00 dmr 1 0
^Ac created at the dawn of time
^Ae
@end example
@node Authorised User List, Global Flags Section, Delta Table, The Header
@subsection Authorised User List
Next, there is the list of authorised users, introduced by a @samp{^Au}
line. Only users in the authorised users list can modify the @sc{sccs}
file. This list always appears (though many implementations will not
complain if you remove it with an editor) but is often empty. One user
login name appears on each line. Lines can alternatively contain
numbers, denoting whole groups of users (as listed in @file{/etc/group}
on many systems). The authorised-users list is terminated with a
@samp{^AU} line. Some broken implementations emit lines of the form
@samp{^AU 0} here instead; the polite thing to do is to ignore gaffes of
this sort. This is of course what CSSC does.
@node Global Flags Section, File Description, Authorised User List, The Header
@subsection The Global Flags Section
The file flags section occurs after the authorised-users list. Each
file flag occurs on a separate line and are possibly followed by their
values (except the boolean flags, whose mere presence is sufficient).
These lines look like this:-
@example
^Af f e 0
^Af f n
^Af f q Q-flag-value
^Af f v /bin/true
@end example
The @samp{e} flag, if set to a nonzero value, indicates that the
controlled file is binary and is therefore stored in uuencoded form in
the file body. If this flag is set to zero or is missing, then the file
body is not encoded. See @ref{Flags} for information about the other
possible flag letters and their meanings. See @ref{Interoperability}
for information about sharing @sc{sccs} files with other implementations
of @sc{sccs}.
The @samp{e} flag is a boolean flag but is stored within the @sc{sccs}
file with a value, as shown in the example above. When @sc{cssc}
initially writes the @sc{sccs} file header for a new @sc{sccs} fiel
created with @code{admin -i}, it does not know if the initial body of
the file is binary or not, so @samp{^Af f e 0} is written into the
header and if the file turns out to need encoding, @code{admin} will
seek back to the header and change @samp{^Af f e 0} to @samp{^Af f e
1}. If binary file support is disabled (@pxref{Binary File Support},
@samp{^Af f e 0} is still used but will never be changed to @samp{^Af
f e 1}.
@cindex Solaris
The value for the @samp{y} flag is stored as a space-separated list of
keyword letters, even though the letters were separated by commas when
they were passed to @code{admin -fy}. This flag is an extension
introduced by Sun Solaris 8. See @ref{Interoperability} for a
discussion of the interoperability of @sc{cssc} with other @sc{sccs}
implementations.
@node File Description, Example Header, Global Flags Section, The Header
@subsection File Description
The flags section is followed by the descriptive text for the history
file. This section is intended to contain text which might contain a
copyright statement, or might indicate the purpose of a file or
contain special instructions, and so on. This section starts with a
@samp{^At} control line and is terminated with a @samp{^AT} control
line:-
@example
^At
This is the blah blah...
... blah.
^AT
@end example
The @samp{^AT} control line marks the end of the @sc{sccs} file's
header. The following line is the first line of the file body.
@node Example Header, , File Description, The Header
@subsection Example SCCS File Header
This example also includes the file body, since the body is short.
@example
^Ah38213
^As 00002/00000/00000
^Ad D 1.3 98/11/22 18:25:43 james 3 2
^Ax 2
^Am 99
^Ac This delta was produced using "get -e -x1.2 s.foo" and
^Ac then "delta s.foo".
^Ae
^As 00001/00000/00000
^Ad D 1.2 98/11/22 18:22:56 james 2 1
^Am mr1
^Am mr2
^Am
^Ac comment goes here.
^Ae
^As 00000/00000/00000
^Ad D 1.1 98/11/22 18:21:11 james 1 0
^Ac date and time created 98/11/22 18:21:11 by james
^Ae
^Au
^AU
^Af e 0
^Af n
^Af q UMSP
^Af v /bin/true
^At
Descriptive text
^AT
^AI 3
this delta was made from a working file which was gotten for editing
but excluded the delta named 1.2.
^AE 3
^AI 2
blurg
^AE 2
^AI 1
^AE 1
@end example
@node The Body, , The Header, File Format
@section The Body
The body of an @sc{sccs} file is usually much longer than its header,
but contains fewer ingredients. It contains control lines, which signal
the beginning or end of a chunk of user data, and the user data itself.
If, for example, you added the text @samp{I was here} to the controlled
file as a delta whose delta sequence number was 7, the history might
contain these lines:-
@example
^AI 7
I was here
^AE 7
@end example
I currently have no clear understanding of the interaction of excluded,
included or excluded revisions with the normal check-in processing.
Hence I can't thoroughly explain the precise meaning of the @samp{^AI},
@samp{^AE} and @samp{^AD} control lines. This section will be completed
at a future date. If you have an understanding of these issues, please
let me (@email{jay@@gnu.org}) know.
@c TODO: complete this section.
@node Interoperability, Environment, File Format, Top
@chapter Interoperability
This part of the @sc{cssc} manual describes how @sc{cssc}
interoperates with @sc{sccs}. For the enormous majority of cases,
this occurs seamlessly; however sometimes it is not possible for
@sc{cssc} to pick ``one right way'' to proceed unaided. Circumstances
where this occurs are described in detail, below.
In order to interoperate better with other implementations of
@sc{sccs}, the @sc{cssc} suite can also be configured to turn off
several features which provide flexibility beyond that which is
available in some other implementations of @sc{sccs}. Some other
interoperability features of @sc{cssc} exist to maintain compatibility
but do not need to be turned off.
@menu
* Binary File Support:: Enabling or disabling support for binary files.
* Executable File Support:: Support for a SCO extension.
* BitKeeper:: Limited support for Bitkeeper files exists.
* Maximum Line Length:: Limiting the length of lines in the SCCS file.
* Limitations of diff:: Diff has limits too, on many non-GNU systems.
* Configuration:: Viewing the current configuration.
* Bug-for-Bug:: We go to great lengths to be compatible
* Incompatibilities:: Sometimes we cannot be fully compatible
* SCCS Version Differences:: Versions of @sc{sccs} behave inconsistently
* CSSC Extensions:: Behaviour which is specific to CSSC.
@end menu
@node Binary File Support, Executable File Support, , Interoperability
@section Binary File Support
Binary file support can be turned off when you run ``configure'' by
specifying the @code{--disable-binary} option. This will cause
@code{admin} to refuse to create an SCCS file whose ``e'' flag is set
(@pxref{Flags}). The @code{admin} program would normally do this if the
user requested it via the @code{-b} option or if it discovered that the
file could not safely be stored in the normal @sc{sccs} file format.
This setting can be overridden with the environment variable
@env{CSSC_BINARY_SUPPORT}; for a description of how to use this
environment variable, see @ref{Environment,,Environment Variables}.
If you use @sc{cssc} with support for encoded SCCS files turned off,
encoded files will still be handled; @sc{cssc} will just refuse to
create a new one. This provides as great a degree of interoperability
with other implementations of @sc{sccs} as possible.
@node Executable File Support, BitKeeper, Binary File Support, Interoperability
@section Executable File Support
The support that @sc{cssc} provides for binary files allows the
controlled file to contain any sequence of bytes. That doesn't
imply that the controlled file is used for any particular purpose.
For example, JPEG files can contain non-ASCII acharacters.
This should be contrasted with support for @emph{executable} files,
which have a specific Unix file mode bit set (see the manual page for
@code{chmod} for more details). Unix executable files may or may not
be binary files. It's common to control shell scripts with
@sc{cssc}, for example. Shell scripts are normaly executable but not
binary.
@cindex SCO
If the @code{x} flag is set, @sc{cssc} will generate a g-file whose
execute bits are set. This feature exists for compatibility with SCO
OpenServer's @sc{sccs}. Do not use this feature if you wish to
interoperate with other implementations of @sc{sccs}. Setting this
flag with @code{admin -fx} generates a warning about this.
@node BitKeeper, Maximum Line Length, Executable File Support, Interoperability
@section BitKeeper
@cindex BitKeeper
Read-only support is provided for files produced by the BitKeeper
suite. Flags and information which are specific to BitKeeper is
ignored by @sc{cssc}. At the moment, it is not possible to turn off
support for BitKeeper files, but a warning message is issued when one
is encountered.
Actions on BitKeeper files that @sc{cssc} will not perform include
@itemize @bullet
@item get -e
@item delta
@item cdc
@item rmdel
@item Some options to admin
@end itemize
@sc{cssc} does not prevent the use of @code{unget} on BitKeeper files,
because @code{unget} does not examine the @sc{sccs} file header (and
therefore has no way to determine if the file is a BitKeeper file or
not).
@node Maximum Line Length, Limitations of diff, BitKeeper, Interoperability
@section Maximum Line Length
@cindex Line length
By default, CSSC enforces no line length limits. The @sc{cssc} tools
will correctly process input files containing lines of arbitrary
length, subject to the limits of available memory. The system command
@code{diff} may impose its own limit however; this is discussed below
(@pxref{Limitations of diff}).
If you are working with a binary file (that is, the @samp{-b} option
to @code{admin} was used when the history file was created), the
encoding mechanism used by @sc{cssc} (and those @sc{sccs}
implementations that support binary files) ensures that data is
encoded before being stored in the body of the history file, and so
the ``binary'' file can contain any sequence of bytes at all - the
``line length'' is no longer important.
Most other implementations of @sc{sccs} do however have an upper limit
on the maximum length of line that can be handled in a text file (that
is, those versions of @sc{sccs} which have such a limit do not apply
this limit for binary files). To set such a limit in @sc{cssc}, use
the @code{--enable-max-line-length=N} option to ``configure''. This
sets the limit to the specified value.
This setting can be overridden with the environment variable
@env{CSSC_MAX_LINE_LENGTH}; for a description of how to use this
environment variable, see @ref{Environment,,Environment Variables}.
To determine the current setting of the line length limit, run
@code{admin -V} and read the output.
If (and only if) you have configured CSSC with such a maximum line
length limitation, the lengths of input lines are checked as they are
being read. When @sc{cssc} is adding a new delta to an existing file,
if it finds an input line which is longer than N characters, it will
fail with an explanatory message (the alternative would be that an
SCCS file would be generated that could not be read by other
implementations of @sc{sccs} having a lower line length limit).
When @sc{cssc} is creating a new SCCS file in response to the
@code{admin -i} command, one of two things will happen when an
over-length line is found. If binary file support is enabled, the
@sc{sccs} file will automatically be created as an encoded file.
Otherwise, @code{admin} will fail with an explanatory message.
When the @sc{cssc} tools are reading a history file, the lines in the
@sc{sccs} file are not subject to the limits described above; that is,
@sc{cssc} imposes these limits on lines it puts @emph{into} the
@sc{sccs} file, but not on lines it reads @emph{from} the @sc{sccs}
file. This means that the @sc{cssc} @code{get} utility will cope with
arbitrarily long lines in the @sc{sccs} file, even if @sc{cssc} has
been configured in sauch a way that @code{delta} would not put such
long lines into the history file.
@node Limitations of diff, Configuration, Maximum Line Length, Interoperability
@section Limitations of diff
@cindex Line length
The @code{diff} utility may have limits on the lengths of lines that
it can process, though the GNU @code{diff} program has no such limits.
This means that if you are using @sc{cssc} in combination with a
@code{diff} which has a line length limit, that limit will apply to
the operation of the @sc{cssc} @code{delta} and @code{sccsdiff}
programs (though not to any other component of @sc{cssc}).
This kind of problem may cause @code{delta} to fail because the file
you are checking in contains an over-length line. However, because
@sc{sccs} files may be operated on by @sc{sccs} implementations that
have different upper limits, you might also find that the delta you
checked out from the history file already contained a line which is
longer than can be coped with by your @code{delta} utility. GNU
@sc{cssc} can always be switched back a mode in which there is no line
length limit (i.e. the mode which is usually the default) and so can
be used to work around such situations.
Bear in mind that implementations of @code{diff} and @sc{sccs} on a
given system can have @emph{different} limits on the sizes of lines
that can be handled by @code{delta}, @code{get} and @code{diff}. This
is not the case with the GNU system however, which has no such limits.
The @code{diff} utility will also fail if the last line in one of the
files being compared does not end in a newline. To work around this
you can either encode the file as a binary file (@pxref{admin}) or add
a terminating newline (which is usually the best course of action).
The @code{diff} program to be used by the @sc{cssc} tools is selected
when the @code{configure} script is run, before @sc{cssc} is compiled.
@ref{Configuration} explains how you can determine which diff command
is used by @sc{cssc}.
@node Configuration, Bug-for-Bug, Limitations of diff, Interoperability
@section Checking the Current Configuration
@cindex Line length
To discover how a particular installation of @sc{cssc} is configured,
pass the @code{-V} option to any of the @sc{cssc} tools. The
``configure'' script defaults to not limiting the maximum line length,
but you must specifically indicate if binary file support is to be
enabled or not when running ``configure''.
@c The configuration options in effect at the time this file was formatted
@c are as below :-
@c
@c @include config-info.texi
@node Bug-for-Bug, Incompatibilities, Configuration, Interoperability
@section Bug-for-Bug Compatibility
Some other implementations of @sc{sccs} have bugs, too. Where we know
about these and can work around them, we do this. Please note that
these bugs only affect @emph{some} other versions of @sc{sccs} - if
they affected all versions, they'd be the correct behaviour of
@sc{cssc} too!
@itemize @bullet
@item
Some versions of @sc{sccs} had a Y2K-related problem where the tens
digit in the year fields within the delta table of the SCCS file
contains a colon (`:') rather than a digit. When reading files,
@sc{cssc} correctly understands this to be a zero and issues a warning
message. The fault is corrected if the SCCS file is being modified.
@xref{Year 2000 Issues}.
@item
@cindex Data General
Some versions of the Data General implementation were changed to use
four-digit years in the p-file instead of two-digit years, apparently
as part of a Y2K-fix. While arguably this in fact might have been the
right way to fix the problem, none of the other @sc{sccs}
implementations went along with the idea. @xref{Year 2000 Issues}. If
the file is being modified, the year is written back out as a
two-digit field.
@item
Although it is unusual for SCCS files to have ``^A m'' lines after
``^A c'' lines, this does sometimes occur. CSSC accepts either
order, but always emits the MR numbers before the comments for each
delta.
@item
CSSC accepts ``^A m'' lines with no argument, although this is
unusual. This may in fact not actually be a bug.
@item
Some versions of @sc{sccs} (allegedly some versions of the Sun Code Manager
product) emit lines of the form ``^AU 0'' instead of ``^A U''. CSSC
accepts either but only produces the latter. Similar situations
exist for lines of the form ``^At 0'' and ``^A T 0''.
@end itemize
@node Incompatibilities, SCCS Version Differences, Bug-for-Bug, Interoperability
@section Incompatibilities
There are some features of @sc{sccs} implementations with which
@sc{cssc} cannot maintain compatibility.
@itemize @bullet
@item
The @sc{cssc} behaviour of correcting the problems mentioned above may
not be compatible with those versions of @sc{sccs} which actually
exhibit those problems (then again, some of them are not able to read
their own output in these circumstances, either).
@item
@cindex BitKeeper
The BitSCCS product, part of the BitKeeper suite, uses special comment
lines in the delta table, of the form ``^Ac_'' where ``_'' is some
character other than a space. When @sc{cssc} sees these, it will
avoid changing the SCCS file (though it will still work for read-only
operations, even though the significance of the special comment is
ignored). File flags which are specific to BitKeeper are also treated
in this way.
@end itemize
@node SCCS Version Differences, CSSC Extensions, Incompatibilities, Interoperability
@section SCCS Version Differences
This section outlines some of the ways in which various versions of
@sc{sccs} differ from each other and therefore sometimes from
@sc{cssc}.
@subsection Binary file support and line lengths
@cindex Line length
The various versions of @sc{sccs} differ in their level of support for
binary files (@pxref{Binary File Support}), and in the maximum line
length that they will support (@pxref{Maximum Line Length}.
@subsection sccsdiff
There are some small variations in the way that the several versions
of @code{sccsdiff} behave. These are outlined in the table below :-
@table @asis
@item Solaris 8
@cindex Solaris
Prints a separator line between the @code{diff} output for each
s-file. This separator is output before the first set of diff output,
even if only one s-file has been named on the command line.
@item Solaris 2.6 and many other versions of Unix
Does not print a separator.
@end table
@subsection admin
There are a few differences in the behaviour of the @code{admin}
command across the various SCCS Implementations :-
@table @asis
@item The @option{-n} option
@cindex Dynix
Some versions of Dynix do not allow the use of the @option{-n} option
without the @option{-i} option. A workaround is to use @code{-n
-i/dev/null} instead.
@item Binary file support
Most implementations of @sc{sccs} do not support the encoding of
binary files, either automatically or by the use of the @option{-b}
option to @code{admin}. See @ref{Binary File Support}, for more
information.
@item Executable file support
@cindex SCO
The SCO OpenServer implementation of @sc{sccs} provides an @code{x}
flag, which turns on the executable bits of the mode of the g-file
when it is created. Other versions of @sc{sccs} do not have this
feature. While @sc{csssc} provides this feature also, its use is not
recommended. The @code{prt -f} command does not indicate the value of
the @code{x} flag.
@item Initial delta
The @option{-r} option is used to specify the release of the initial
delta. Some implementations of @sc{sccs} allow this to be used to
specify more components of a @sc{sid} than just the release number.
The @sc{cssc} version of @code{admin} allows this usage but issues a
warning message. If the @option{-r} option is used to specify a
non-trunk @sc{sid} (that is, a @sc{sid} with more than two
components), this is allowed but some of the other tools in the
@sc{cssc} suite will not work correctly on the resulting file.
@end table
@subsection prt
If the ``encoded'' flag is set, some versions of @code{prt} (but not
the @sc{cssc} version) omit a newline in the output and so the next
thing follows immediately on the same line.
@subsection get
@cindex Solaris
Sun Solaris 8 features a @code{y} flag. If the @code{y} flag is set
in the @sc{sccs} file, only the specified @sc{sccs} keywords will be
expanded in the gotten file (assuming that the @option{-k} and
@option{-e} options are not used).
@cindex SCO
The @code{get} command on SCO OpenServer honours the setting of the
@code{x} flag. This is described above.
For a discussion of the interoperability of @sc{cssc} with other
@sc{sccs} implementations, see @ref{Interoperability}. For a
description of the @code{x} and @code{y} flags, see @ref{Flags}.
@node CSSC Extensions,, SCCS Version Differences, Interoperability
@section CSSC Extensions
@cindex Extensions
There are some respects in which @sc{cssc} behaves unlike other
versions of @sc{sccs}. These differences mainly relate to the removal
of arbitrary limits or problems, and generally do not pose an
interoperability problem. The most important extensions are
listed below.
@table @asis
@item Line Length
@cindex Line length
By default, CSSC enforces no line length limits. @xref{Maximum Line
Length}.
@item Date handling
The @option{-c} option to @code{get} supports four-digit years.
@xref{The Good News}.
@item Binary file handling
@cindex Pipes
When you generate a new @sc{sccs} file with @code{admin -i}, the
@code{admin} command will automatically determine if the file needs to
be encoded. Other versions of @sc{sccs} which do this rely on being
able to seek in the input file specified as the argument to the
@option{-i} option, which means that this is not possible if the
initial file body is being read by a pipe. The @sc{cssc}
implementation of @code{admin} does not have this limitation, since it
seeks on the file being created instead. @xref{Unemulated Features}.
@item Combinations of features
Various other @sc{sccs} implementations have extensions (for example
the @code{x} and @code{y} flags and binary file encoding). The
@sc{cssc} suite attempts to honour all of these extensions, and is
probably the only implementation which has all these features. If you
try to use a feature which is specific to only one implementation of
@sc{sccs}, @sc{cssc} will issue a warning that what you are doing is
not portable.
If you use features of @sc{cssc} which are extensions originating in
more than one other @sc{sccs} implementation, for example both the
@code{x} and the @code{y} flags, you have effectively tied yourself to
@sc{cssc}. Once you are in that position, you are no longer able to
interoperate with any other version of @sc{sccs} (since, in this
example, any other version of @sc{sccs} will fail to understand either
the @code{x} or the @code{y} flag). If interoperability with other
versions of @sc{sccs} is no longer an issue, you might as well bite
the bullet and migrate to a more modern configuration control system
entirely. @xref{Overview}.
@item Validation
The @sc{cssc} implementation of @code{val} implements some checks that
other implementations lack. Howver, it is not complete, and so there
are also checks that other implementations make that @sc{cssc} does
not.
@item Error Messages
The error messages issued by @sc{cssc} are intended to be
self-explanatory and so lack reference numbers like @samp{(ge4)}.
@item Closed File Descriptors
If you invoke @sc{cssc} with file descriptor 0, 1 or 2 closed, that
file descriptor is attached to @file{/dev/null}. This prevents error
messages going into a file opened by @sc{cssc} for writing (for
example an @sc{sccs} file).
@item Read-only reaction to unsupported features
If @sc{cssc} discovers a construct in an @sc{sccs} file which it
doesn't understand, it will avoid modifying the file (though read-only
tools like @code{prt} and @code{get} will still work).
@item Invoking other tools
It is usual for @sc{cssc} to invoke other programs, for example
@code{diff} and the MR-validator specified by the @code{v} flag.
However, with the exception of the @code{sccsdiff} shell script, the
tools within the @sc{cssc} suite do not invoke each other. For
example, @code{delta} does not invoke @code{get}. This behaviour is
different to the traditional architecture of @sc{sccs} and might
introduce subtle differences of behaviour. Any such differences are
bugs; see @ref{Problems,,Reporting Bugs}.
@item Environment
Some environment variables are specific to @sc{cssc}.
@xref{Environment,,Environment Variables}.
@end table
See also @ref{Incomplete,,Missing Features and other Problems}.
@node Environment, Incomplete, Interoperability, Top
@chapter Environment Variables
Several environment variables control the behaviour of @sc{cssc}. This
section explains what these variables are and how they work.
@menu
* Child Processes:: CSSC tools run other programs occasionally.
* Configuration Variables:: Variables that turn features on or off.
* Other Variables:: Miscellaneous other variables you might use.
@end menu
@node Child Processes, Configuration Variables, , Environment
@section Child Processes
Unlike some other implementations of @sc{sccs}, @sc{cssc} tools do not
usually execute each other. This means for example that @code{delta}
does not invoke @code{get} to extract the previous version of the file,
and @code{prs} doesn't use @code{get} when processing the @code{:GB:}
keyword.
There are a small number of exceptions to this rule :-
@table @code
@item sccs
The @code{sccs} driver program can be used to invoke any of the other
tools in the suite. @xref{Known Problems}, for a discussion of the
issues this raises.
@item delta
The @code{delta} program runs a program to validate the Modification
Request Numbers offered by the user. @xref{Modification Request
Numbers}.
@item sccsdiff
The @code{sccsdiff} program is a shell script, and invokes
@code{get}, @code{diff} and @code{pr}, as well as other tools such as
@code{cat}, @code{test} and @code{rm}. The @code{sccsdiff} program must
not be installed set-user-id.
@end table
The driver program @code{sccs} takes a number of precautionary steps
if it detects that it is running set-user-id or set-group-id. These
steps are described below, as part of the discussion of each
environment variable.
@node Configuration Variables, Other Variables, Child Processes, Environment
@section Configuration Variables
When ``configure'' is run, some default behaviours are set. These can
be overridden with the use of environment variables as described below.
@subsection CSSC_BINARY_SUPPORT
The @env{CSSC_BINARY_SUPPORT} environment variable controls whether
@sc{cssc} will create ``encoded'' @sc{sccs} files. The three valid
values for this variable are as follows :-
@table @asis
@item @samp{enabled}
@sc{cssc} will create encoded @sc{sccs} files if required
@item @samp{disabled}
@sc{cssc} will not create encoded @sc{sccs} files
@item unset
The default behaviour is used; this default will be the same as for
one of @samp{enabled} or @samp{disabled}. The default is set by
passing either @code{--enable-binary} or @code{--disable-binary} to
``configure'' when @sc{cssc} is compiled. If this option was not
specified, the default value is @samp{enabled}. For more information
see @ref{Interoperability}.
@end table
This variable is unset by the @code{sccs} driver program, if it is
installed set-user-id or set-group-id.
@subsection CSSC_MAX_LINE_LENGTH
The @env{CSSC_MAX_LINE_LENGTH} environment variable controls the maximum
length of lines that @sc{cssc} will allow to go into an @sc{sccs} file.
This variable should be set to a decimal integer.
The default behaviour of @sc{cssc} when this variable is unset is
described in @ref{Interoperability}.
This variable is unset by the @code{sccs} driver program, if it is
installed set-user-id or set-group-id.
@node Other Variables, , Configuration Variables, Environment
@section Other Variables
@subsection USER
If ``configure'' detects that UIDs are not supported on the system you
are running on (that is, you are compiling on a system that doesn't look
at all like Unix) then the environment variable USER is used to
determine the invoking user's name. This is then the name which is used
in the p-file and in the delta information for new deltas. This
username is also compared against the list of authorised users by
@code{delta}. Of course, this doesn't provide much security but in the
absence of user ID support, @sc{cssc} can't tell who users really are
anyway.
The behaviour of @sc{cssc} with respect to this option is not sensitive
to whether or not programs are installed set-user-id, because this
variable is only consulted on systems where set-user-id is not
supported. This may be a problem on systems where it is possible to
grant enhanced privileges to a program, but which do not look like
Unix to the ``configure'' program.
@subsection CSSC_SHOW_SEQSTATE
If set, the environment variable @env{CSSC_SHOW_SEQSTATE} will cause
@sc{cssc} to emit debugging information about the delta table to stderr.
This is only of use when debugging @sc{cssc}.
@subsection PROJECTDIR
The @env{PROJECTDIR} environment variable is used only by the
@code{sccs} driver program. This variable is ignored if the
@code{sccs} program is installed with the set-user-ID bit set. See
@ref{Known Problems}, for other remarks concerning setuid execution.
The @env{PROJECTDIR} variable is used to locate the @sc{sccs} history
file corresponding to a filename given on the command line. If the
value of @env{PROJECTDIR} starts with a `/', it is used as an absolute
directory name. If @env{PROJECTDIR} does not start with a slash, it is
assumed to be the name of a user, and @sc{sccs} files are assumed to be
in the subdirectory ``src'' or ``source'' beneath their home directory.
@subsection PATH
Normally, the @code{sccs} driver program locates the other tools by
searching the directories specified in @env{PATH}, but if it is
running set-user-id or set-group-id, a compiled-in value is used
instead. By default, this value is is @file{/usr/sccs}.
If @sc{sccs} is not privileged, it will fall back on the compiled-in
value in order to find the other tools if they are not found in any of
the directories in @env{$PATH}.
In normal operation, @code{sccs diffs} will use the system @code{diff}
command by searching the @env{PATH} environment variable. This doesn't
happen if it is running set-user-id or set-group-id.
@subsection LD_LIBRARY_PATH
None of the programs in the @sc{cssc} suite take any specific action
regarding the @env{LD_LIBRARY_PATH} environment variable, but your
system libraries may take notice of it (or decide not to do so, for
example when a program is running set-user-id or set-group-id).
@subsection TMPDIR
The @code{sccsdiff} program ignores the setting of the @env{TMPDIR}
environment variable. Temporary files with predictable names are
created in the @file{/tmp} directory. @xref{Known Problems}.
@subsection Locale variables
The @code{sccs} driver program uses the @code{setlocale} function, whose
behaviour depends on several implementation-dependent environment
variables. If you are using the GNU C library, these variables are
@env{LC_COLLATE},
@env{LC_CTYPE},
@env{LC_MESSAGES},
@env{LC_MONETARY},
@env{LC_NUMERIC},
@env{LC_TIME},
and
@env{LANG}. The @code{setlocale} function is not called if @sc{sccs}
is running set-user-id or set-group-id.
@node Incomplete, Year 2000 Issues, Environment, Top
@chapter Missing Features and other Problems
@cindex missing features
@menu
* Missing Features:: Some features of SCCS are not provided.
* Known Problems:: Known problems with CSSC.
* Unemulated Features:: Problems with SCCS that CSSC doesn't share.
@end menu
@node Missing Features, Known Problems, , Incomplete
@section Missing Features
@itemize @bullet
@item
Documentation is incomplete or missing. That includes this document.
@item
Some programs are missing, that is, some programs are present in the
@sc{sccs} suite and absent from this one.
@item
@cindex Failures during multiple-file processing
On platforms where the C++ compiler used to compile CSSC does not
support exceptions, the normal mechanism for recovering from an error
in the processing of an SCCS file is unavailable. This means that if
such an error occurs, the program will immediately make a fatal exit,
as opposed to carrying on with the next file. In order to fix this
problem, please either CSSC with a compiler which has working support
for exceptions, or process just one file at a time.
@item
@cindex Warning messages
Some programs behave subtly differently to their original counterparts.
Error messages are different, and also extra warnings are provided in
some circumstances. All other differences are also bugs. Please report
them (@pxref{Problems,,Reporting Bugs}).
@item
@cindex Known bugs
Known bugs are listed on the bug tracking system at
@uref{http://savannah.gnu.org/bugs/?group=cssc}. Some historical known
issues are listed in the file @file{docs/BUGS}. Once this file has
become obsolete it will be removed from the distribution.
If an item on the TODO list (see the file @file{docs/TODO}) has in
fact been fixed, this is a bug in the TODO list. Please report this via
the bug tracking system.
@item
Some programs are partially implemented. Not all programs support all
the command-line options of their original counterparts. Also, some
features are currently missing. If you would like support for some
feature that is missing, please request it in the same way you would
report a bug; I'd like to know which features are required first.
@end itemize
@node Known Problems, Unemulated Features, Missing Features, Incomplete
@section Known Problems
There are a small number of known problems documented in the files
@samp{docs/BUGS} and @samp{docs/TODO}. These will be fixed at some
point in the future. Future problems should be reported via the
@sc{cssc} Bug Tracker, at @uref{http://savannah.gnu.org/bugs/?group=cssc}.
@cindex Security problems
@cindex Insecurity
@cindex Buffer overflows
@noindent
There are also some security problems with this code:-
@enumerate
@cindex Race conditions
@item Temporary file races ---
@sc{cssc} opens many temporary files, most of them with very predictable
names. This can be used as a lever for compromising the security of a
system, often by anticipating the name of a file which will be opened at
some point, and creating a symbolic link of the same name. Most of the
temporary files used are created in the same directory as the @sc{sccs}
file itself. @sc{cssc} should not be used by the owners of files whose
security is important, especially to control files whose @sc{sccs} file
is in a world-writable directory. @xref{Filenames}.
The @code{sccsdiff} program ignores the setting of the @env{TMPDIR}
environment variable. Temporary files with predictable names are
created in the @file{/tmp} directory.
@cindex Setuid execution, why not to do it
@item Setuid execution ---
It is common to install an extra set of binaries with the set-user-id
bit turned on in their modes, to allow a specified group of users to
make revisions to some important files. There are many ways in which a
setuid program can be used by malicious users to gain access to the
security privileges of the user as whom a program runs. @sc{cssc} has
not been reviewed with the relevant security issues in mind. Please do
not install @sc{cssc} programs with the set-user-id or set-group-id bits
turned on.
@item Environment variables ---
@sc{cssc} invokes external programs, notably the @code{diff} command and
the program specified as the @sc{mr} validation program. Some
@sc{cssc} programs (for example @code{sccsdiff}) invoke others. This
is done without ``cleaning up'' the environment, and so this is another
reason not to use the set-user-id bit for @sc{cssc} programs.
@xref{Environment,,Environment Variables}.
@end enumerate
Please refer to the section of the GNU General Public License entitled
``NO WARRANTY'' for information regarding the lack of warranty for this
program. @sc{cssc} is @emph{not} a secure program, please do not rely
on it to behave in a secure fashion.
Contributions of code or patches to fix these problems are, as always,
gleefully welcomed. Please submit these to the maintainer.
Additionally, there is currently one problem that may not ever be fixed.
This problem occurs only in the @code{prt} program when the list of
ignored or excluded deltas is present for a @sc{sid} @emph{but that list is
empty}. In this case @sc{sccs} prints the @samp{Included:} or
@samp{Excluded:} line in its output (with no numbers afterward) and
@sc{cssc} prints nothing. Since ``fixing'' this problem would require a
horrible kludge, this has not been done. It is not expected that this
will cause a problem for any users; if this is a problem for you, let
the maintainer know and it will be fixed.
@node Unemulated Features, ,Known Problems, Incomplete
@section Unemulated Features
There are some features of (some implementations of) the traditional
@sc{sccs} suite which it may not be desirable to copy.
@enumerate
@cindex Pipes
@item
If an @sc{sccs} file is created with the @option{-i} option, and it turns
out to need encoding, then genuine @sc{sccs} seeks back to the start of
the file and encodes it. However, if the input file is not seekable,
for example if it is a pipe, then this doesn't always work. The
@sc{sccs} file is then sometimes created containing only the initial
part of the body, before the offending segment of the file. The exit
value of the @code{admin} program is nevertheless still zero. Tests for
this situation are in @file{tests/binary/seeking.sh} but these tests are
only carried out if the program under test seems to be @sc{cssc} rather
than the genuine @sc{sccs} suite. The @sc{cssc} suite does not have
this problem, and will always detect the need to encode the file, and
will successfully complete the process (it does not try to seek on the
input pipe).
@item
@cindex Line length
The normal configuration for @sc{cssc} is that it supports binary files
and has no limit on line length in file with which it deals. Both of
these features may be different to the features of some version of
@sc{sccs} with which you want to interoperate. See
@ref{Interoperability} for more information on how to achieve better
interoperability with other implementations of @sc{sccs}.
@item
If you have a hard link to an @sc{sccs} file, then @sc{sccs} programs
would ``break'' the hard link because the @sc{sccs} file is
rewritten. For this reason, @sc{sccs} checks the link count on the
file before using it. The @sc{sccs} suite also does this. While
@sc{cssc} does this consistently, @sc{sccs} does not - for example the
@sc{val} program does not do this check.
@c val does not do this check on Solaris 2.6.
@end enumerate
There are also a small number of respects in which various
implementations differ from each other; in such cases @sc{cssc} picks
a suitable alternative; @ref{SCCS Version Differences}.
@node Year 2000 Issues, Testing, Incomplete, Top
@chapter Year 2000 Issues
@cindex Year 2000
Primordial (but not current) versions of the genuine @sc{sccs} suite
fail to work correctly in and after the year 2000. The commands
affected are @code{get} and @code{prs}. Unix vendors have ensured that
the version of @sc{sccs} that they currently ship works correctly in the
year 2000. Sun Microsystems, for example, state in their Year 2000 FAQ
(@uref{http://www.sun.com/y2000/faq.html})
@cindex Sun Microsystems, Inc.
@cindex X/Open
@quotation
@sp 1
@bullet{}
@strong{Does Sun see any problems with the source code control system
(@sc{sccs})?}
@c @* causes a line break.
@*
No, Sun has adopted the X/Open Commands and Utilities Issue 5
standard, the year 2000 compliant version of @sc{sccs} will
not be affected by the end of century transition. The X/Open
standard states that old dates held in ("yy/mm/dd") format does
not change in ``s.'' files, but the values ``yy'' which range
from 69 -- 99 are to be interpreted as 1969 -- 1999 respectively.
Values of ``yy'' which range from 00 -- 68 are to be interpreted
as 2000 -- 2068 respectively. This interpretation ensures that
the year 2000 compliant version of @sc{sccs} will work at least
to the year 2068. By implementing X/Open's standard, Sun has
ensured @sc{sccs} user's compatibility with other providers of
the @sc{sccs} utility. For more information please refer to:
@uref{http://www.xopen.org/public/tech/base/year2000.html}
@sp 2
Copyright @copyright{} 1994 -- 1997 Sun Microsystems, Inc.,
901 San Antonio Road, Palo Alto, CA 94303 USA.
All rights reserved.
@sp 2
@end quotation
@menu
* The Good News:: CSSC works with all dates from 1969 to 2038...
* The Bad News:: ...but with hiccups on some operating systems.
* Year 2000 Summary:: Parting words on date issues
@end menu
@node The Good News, The Bad News, Year 2000 Issues, Year 2000 Issues
@section The Good News
Two-digit years are a problem in two places: firstly, within the actual
@sc{sccs} files, and secondly within command-line options. The
two-digit year fields in the @sc{sccs} files are correctly dealt with
according to the strategy mandated by X/Open. The command-line options
are also dealt with similarly.
@cindex Extensions
@sc{cssc} provides an additional feature for your convenience. If the
argument to the @option{-c} option of @code{get}, @code{prt}, or
@code{prs} contains more than twelve digits, the first two are
understood to be the century part of the year. For example,
@samp{971120193000} and @samp{19971120193000} both represent exactly the
same time (7:30 p.m. on November 20, 1997). The fields of a date can be
separated with other (non-digit) characters, and so
@samp{1997/11/20-19:30:00} also denotes the same time (but
@samp{1997/11/20} is an error because there are fewer than twelve
digits).
Some versions of SCCS are not year 2000 compliant and write incorrect
timestamps into SCCS files. @sc{cssc} correctly understands the
intended date, and will fix this problem when re-writing the file
(@pxref{Bug-for-Bug,,Bug-for-Bug Compatibility}).
@sc{cssc} represents dates internally in a way that works for
Gregorian dates up to at least the year 32767 AD on all systems. Some
countries didn't recognise the Gregorian calendar system until the
early twentieth century but this of course is not really a problem
now. The useful life of @sc{sccs} is from 1969 until 2068. Years are
stored in two-digit form in @sc{sccs} files and so although @sc{cssc}
has no such limits internally, it's not possible to indicate a year
outside this range in an @sc{sccs} file if you want to retain
compatibility with other implementations of @sc{sccs}. All the
@sc{cssc} programs will successfully work with any date in this range,
all the way up to 2068, on all systems.
In this future, years after 2068 may be represented as four-digit
fields, but @sc{cssc} doesn't do this yet.
The @sc{cssc} test suite (@pxref{Testing,,The Test Suite}) contains
some test files which may be useful in determining the date range with
which your usual @sc{sccs} implementation will cope. These are in the
directory @file{tests/year-2000}.
@node The Bad News, Year 2000 Summary, The Good News, Year 2000 Issues
@section The Bad News
It's not all good news though. When new deltas are created with the
@code{delta} command, @sc{cssc} must consult the operating system to
find the current date and time. Some operating systems have a limited
range of date representation. For example, the development system I use
for most of the work on @sc{cssc} can't report any date later than
Tuesday Jan 19 03:14:07 2038 as the current time. When running on such
systems, @sc{cssc} will still be able to work with @sc{sccs} files
containing dates after this, but activities involving the current time
will not work correctly.
This date breakdown occurs most obviously with the date stamp that the
@code{delta} program gives each delta in the @sc{sccs} file, but also
with the commentary-change message of @code{cdc} and the default comment
produced by @code{admin} when an @sc{sccs} file is created.
@node Year 2000 Summary, , The Bad News, Year 2000 Issues
@section Year 2000 Summary
To summarise, all reporting activities of @sc{cssc} will work correctly
throughout the range of time representable in an @sc{sccs} file (that
is, from 1969 to 2068 inclusive). However, commands which modify
@sc{sccs} files and need to add dates may fail earlier than this (but
then again, may not, depending on your operating system).
Now that you know that whatever version of @sc{sccs} you are using has
probably been fixed by the vendor, and that even if your vendor's
@sc{sccs} implementation cannot be updated for some reason, @sc{cssc} is
Year-2000 compliant and to an extent Year-2038 compliant, I'd like you
to remember the conversion effort that this has saved you. I'd also
like to urge to to actually use that effort to convert your existing
projects from @sc{sccs} to a more modern version control system, for
example GNU CVS. There are other considerations besides Year-2000
compliance, after all. @sc{cssc} is not called ``Compatibly Stupid
Source Control'' for nothing.
@node Testing, Problems, Year 2000 Issues, Top
@chapter The Test Suite
@cindex test suite
The test suite is the most important single component of the @sc{cssc}
suite. It ensures that ports to new platforms are working correctly,
and that changes in one part of the suite don't accidentally break
anything else.
The test suites cannot cover everything. More are needed. If you only
ever contribute one thing to CSSC, make it a new test case. This
chapter explains how to run the test suite and also how to write new
test cases.
@menu
* Running the tests:: Running the test cases.
* Writing new test cases:: Writing new test cases.
@end menu
@node Running the tests, Writing new test cases, , Testing
@section Running the tests
@cindex testing
@cindex Checking the suite
Running the test cases is quite simple. Typically, you might do it
after compiling but before installing @sc{cssc}. After running
``configure'', you might compile @sc{cssc} with
@example
make
@end example
and test it with
@example
make check
@end example
@noindent
The full test suite takes just over five minutes to run on a 486 running
Linux. If everything works correctly, you will see messages like:-
@smallexample
cd tests && make all-tests
make[1]: Entering directory `..../CSSC/compile-here/tests'
cd ../lndir && make
make[2]: Entering directory `..../CSSC/compile-here/lndir'
make[2]: `lndir' is up to date.
make[2]: Leaving directory `..../CSSC/compile-here/lndir'
../lndir/lndir ../../Master-Source/tests
../../Master-Source/tests/get:
command-names: .././common/command-names
test-common: .././common/test-common
@exdent ...more messages from lndir...
/bin/sh -ec 'cd admin && for i in *.sh ; \
do \
/bin/sh $i || break; \
done'
C1...passed
C2...passed
@exdent .... more output ....
C12...passed
C13...passed
PASS comment.sh:
v1...passed
@exdent .... more output ....
b11...passed
b12...passed
PASS flags.sh:
@exdent .... more output ....
Tests passed.
make[1]: Leaving directory `..../CSSC/compile-here/tests'
@end smallexample
If something goes wrong you will see a ``FAIL'' message, which looks
something like this:-
@smallexample
C1...FAIL comment.sh C1: ../../admin -ifoo s.new.txt:
Expected return value 0, got return value 1
make[1]: *** [test-admin] Error 1
make[1]: Leaving directory `..../CSSC/compile-here/tests'
Tests failed.
make: *** [all-tests] Error 2
@end smallexample
@noindent
The thing to remember is that when you run @code{make check}, the
@code{make} program will print on the last line a message saying
``Error'' only if the tests have failed.
If the test suite does indicate that the tests have failed, please
submit a bug report (@pxref{Problems,,Reporting Bugs}). Please include in your bug
report
@itemize @bullet
@item
The output of the test suite (you may find the Unix @code{script}
program invaluable for this)
@item
The contents of the directory containing the test that failed (if you
compiled with separate source and object directories, I just want the
one in the ``object'' directory).
@item
As much information about your system as you think is useful, for
example the names and versions of the operating system and compiler that
you are using.
@end itemize
If you want to run just some of the tests, there are rules in the
makefile for just running some of them. For example, the tests in the
directory @code{tests/admin} can be run with @code{make test-admin}.
Each test directory is named after one of the @sc{cssc} programs. This
indicates which program the tests concentrate on verifying. Inevitably
these tests will use more than just one @sc{cssc} program; for example,
most of the tests involve using @code{admin} to create a @sc{sccs} file
in the first place. However, the directory indicates which tool those
tests concentrate on.
It is possible for a test to neither pass or fail, but just go wrong.
This can happen when the test script comes upon something that prevents
the test itself working correctly, for example, because it can't remove
a temporary file or uudecode a built-in sample @sc{sccs} file. When
this happens you get output much like this:-
@example
$ sh flags.sh
rm: foo: Permission denied
flags.sh: Test could not be completed
@end example
@noindent
The part before the colon (@code{flags.sh}) indicates which script
could not be completed. No further tests will be attempted.
Diagnosing the problem may or may not be simple. In this case, it's
not hard; the problem is that the test suite is trying to clear away
any temporary files but it can't remove the file ``foo'' (because the
current directory was made read-only to force the test to miscarry, in
this contrived case). When the test suite miscarries like this and
you can't find the problem, please follow the bug-reporting procedure
(@pxref{Problems,,Reporting Bugs}), but please indicate that it is a
miscarriage in the test suite rather than a concrete test failure.
@node Writing new test cases, , Running the tests, Testing
@section Writing new test cases
@cindex Contributing test cases
The test cases are really just shell scripts. They are suitable for
@code{/bin/sh} on most machines. The procedure for running these is
explained in @ref{Running the tests}. These shell scripts read in some
common function definitions (mostly from
@code{tests/common/test-common}) and then proceed to conduct the tests.
This section explains those commands used in the test scripts that are
not simply normal shell commands. Normal shell commands like @code{sed}
and @code{grep} are not described.
The best approach for writing new test scripts or just individual new
test cases is to first think of some aspect that needs better test
coverage, and then to write the test script, basing it on an existing
script. To make sure that your new tests are really checking for the
right things, you can run them against an existing @sc{sccs}
implementation other than @sc{cssc}.
@menu
* Testing the Test Suite: testing tests. How to test the test suite itself
* docommand:: Run a command, checking its return value and output.
* remove:: Remove a file if it is present.
* success:: Declare that a test has passed.
* fail:: Declare that a test has failed.
* echo_nonl:: Print a string without a following argument.
* miscarry:: When a test case cannot be run.
* real-thing:: Some test scripts need to know which features to expect.
* need-prt:: Not all implementations have prt
@end menu
@node testing tests, docommand, , Writing new test cases
@subsection Testing the Test Suite
The best strategy for testing the @sc{cssc} test suite itself is to
run it against a genuine edition of @sc{sccs}, if you have one
available. Before running @code{make check}, set the environment
variable @samp{dir} to point to the directory containing the programs
to be tested; this should usually be @w{@file{/usr/sccs}}.
In many implementations of @sc{sccs}, some of the tools execute others
(for example, @code{delta} often executes @code{get} to retrieve the
previous version of the controlled file). This means that to
correctly test the test suite, your @code{PATH} environment variable
should be set up to select the @sc{sccs} tools you want to test. Here
is an example of the correct way to set up the environment to test
@sc{sccs} tools in @file{/usr/ccs/bin} :-
@example
dir=/usr/ccs/bin
PATH=/usr/ccs/bin:$PATH
export dir
make check
@end example
When you are sure that the test script is expecting the correct
behaviour from programs under test, you can then run it against
@sc{cssc}. After all, if you're going to set out writing your test by
assuming that @sc{cssc} is correct in the area under test, of what
value is the test?
@node docommand, remove, testing tests, Writing new test cases
@subsection docommand
@cindex docommand
The @code{docommand} function runs a specified program, and checks its
return value, standard output and error output against an expected
version. If any mismatch occurs, @code{fail} is called. The
@code{docommand} function is invoked with up to six arguments:-
@example
docommand [--silent] @var{label} @var{command} @var{retval} @var{stdout} @var{stderr}
@end example
The @code{docommand} function normally prints the label to indicate what
stage the current test script has reached, followed by ``done'' when it
has finished. The @code{--silent} option turns off this behaviour, so
that if nothing goes wrong, no progress message is printed. This is
occasionally used for commands that have already been tested by a script
and are known to work, but which must be repeated several times in order
to make some other kind of test, which is yet to come. I recommend you
try to avoid using this option.
The other arguments to @code{docommand} are:-
@table @var
@item label
This is what is printed to indicate what is going on when the test
starts. If all goes according to plan, it is followed by
@samp{...done}.
@item command
This is the command to be executed, with all the required arguments.
@item retval
This is the expected return value. If @var{command} exits returning any
other value, @code{fail} will be called. If the test should not care
about the return value, use @samp{IGNORE} as @var{retval}.
@item stdout
This is the text expected on the standard output of @var{command}. If
the test should not care about the standard output, use @samp{IGNORE} as
@var{stdout}.
@item stderr
This is the text expected on the error output of @var{command}. If
the test should not care about the error output, use @samp{IGNORE} as
@var{stderr}.
@end table
This command will run @code{admin} with three arguments, and expect it
to produce no output at all and return the value zero:-
@example
docommand C5 "$@{admin@} -ifoo -yMyComment $s" 0 "" ""
@end example
This command does something similar, but the command is expected to
fail, returning 1 as its exit status:-
@example
# We should not be able to admin -i if the s-file already exists.
docommand I7 "$@{admin@} -ifoo $s" 1 "" IGNORE
@end example
@noindent
In the example above, the error messages produced by @sc{sccs} and
@sc{cssc} are different, but both indicate the same thing. However,
since the messages are different, @samp{IGNORE} is used.
The @var{stdout} and @var{stderr} arguments are processed with the
@code{echo_nonl} function, and so escape codes are valid and indeed
heavily used:-
@example
# Test the -m (annotate SID) option with several deltas...
docommand N4 "$get -p -m $s" 0 \
"1.1\tline1\n1.1\tline2\n1.2\tline3\n" \
IGNORE
@end example
@node remove, success, docommand, Writing new test cases
@subsection remove
@cindex docommand function for test scripts
The @code{remove} function is for clearing up temporary files after
tests have finished, and for making sure that no instance of a file that
a test is supposed to create already exists before the test is made.
Typical usage is this:-
@example
f=1test
s=s.$f
p=p.$f
remove $f $s $p
@end example
@noindent
The @code{remove} function is defined as:-
@example
remove () @{ rm -rf $* || miscarry Could not remove $* ; @}
@end example
@node success, fail, remove, Writing new test cases
@subsection success
@cindex success function for test scripts
The @code{success} function prints a message indicating that the current
test script has passed, and exits successfully. This is always done at
the foot of a test script.
@node fail, echo_nonl, success, Writing new test cases
@subsection fail
If a test fails, it is usually because one of the @code{docommand} calls
fails, and so direct calls to the @code{fail} function are rare.
However, if you do want to call this function directly, you should
supply as its argument a short description of what has gone wrong. For
example, the @code{docommand} function uses @code{fail} in the following
way:-
@example
fail "$label: $1: Expected return value $2, got return value $rv"
@end example
@node echo_nonl, miscarry, fail, Writing new test cases
@subsection echo_nonl
@cindex echo
@cindex ekko
The @code{echo_nonl} function outputs its argument, without a following
newline. Escape codes as for @code{echo(1)} are understood. Depending
on the actual flavour of system that the test suite is running on, this
might internally use @code{echo -n} or @code{echo -e .....\c}.
Please do not use either the @option{-n} or @option{-e} options for
@code{echo(1)} directly in test scripts, because they don't work in the
same way on all machines. The @code{echo_nonl} function is provided for
this reason; therefore, please use it. Please note also that while the
@code{printf(1)} command may seem superior, it absolutely cannot be used
because not all systems provide it.
Typical usage of @code{echo_nonl} might be:-
@example
echo_nonl Please wait while I finish what I am doing...
# ...
echo done
@end example
@node miscarry, real-thing, echo_nonl, Writing new test cases
@subsection miscarry
The @code{miscarry} function is used to indicate that while the test
suite has not found a problem with the programs being tested, there has
been some other kind of problem that prevents further testing.
@noindent
Typical usage might be:-
@example
remove foo
echo '%M%' > foo
test `cat foo` = '%M%' || miscarry cannot create file foo.
@end example
@node real-thing, need-prt, miscarry, Writing new test cases
@subsection real-thing
The various implementations of @sc{sccs} vary in several different
ways, but the @sc{cssc} test suite tries very hard to pass when run
against any genuine implementation of @sc{sccs} unless it has a
definite bug. This means for example that although the @sc{cssc}
version of @code{admin -i} will support automatic switch-over to
binary mode for a file provided via stdin, and the test suite tests
this, the same property is not required of @sc{sccs} itself.
The @file{real-thing} script checks if we are actually tesing a real
implementation of @sc{sccs}. It sets the environment variable
@env{TESTING_CSSC} to @samp{true} or @samp{false}, depending on whether
we are testing CSSC or not.
If you are really interested in whether the implementation being
tested supports binary files or not, you should be using the
@file{config-data} script instead.
@node need-prt, , real-thing, Writing new test cases
@subsection need-prt
The possible non-availability of @code{prt} is another thing that the
@sc{cssc} test suite needs to know about in order to run successfully
against all working versions of @sc{sccs}. Some versions of @sc{sccs}
lack the @code{prt} program. For this reason, the tests for this tool
(in the @file{tests/prt} directory) are skipped if @code{prt} is
missing. When writing test scripts, you should never use @code{prt}
unless you are actually testing @code{prt} itself (you can almost
always use @code{prs} instead).
If your test is specifically designed to test the functionality of
@code{prt} itself on the other hand, just source @file{need-prt}
before the first test. The @file{need-prt} script will skip the
remainder of the invoking test script if @code{prt} is missing. You
might use it like this, for example :-
@example
#! /bin/sh
. ../common/test-common
. ../common/need-prt
s=s.testfile
remove $s
docommand e1 "$@{prt@} $s" 1 IGNORE IGNORE
success
@end example
@node Problems, Copying, Testing, Top
@chapter Reporting Bugs
@cindex bugs
@cindex problems
@cindex maintainer
If you find a bug in GNU @code{CSSC}, please report this via the
@sc{cssc} bug tracking system at @uref{http://savannah.gnu.org/bugs/?group=cssc}.
Please include the version number, which you can find by giving the
option @w{@option{--version}} to any @code{CSSC} command. Also include in
your message the output that the program produced and the output you
expected. An @file{s.} file and instructions for reproducing the error
are almost essential unless the bug is very trivial. If you are
unable to send the actual s-file itself due to confidentiality
concerns, you can mask the contents by using the script
@file{mogrify.awk}, which removes the contents of an SCCS file while
preserving its structure. You will need to use @code{admin -z} on the
result in order to correct the checksum of the transformed version of
the file. If you do this, please make sure that you
check that the problem still occurs with the transformed version of
the file.
@refill
You may also find it helpful to join the mailing list. See the file
@file{docs/mailing-list.txt} for information about the mailing list.
@cindex Questions about CSSC
@cindex Comments about CSSC
@cindex Suggestions for the improvement of CSSC
If you have other questions, comments or suggestions about GNU
@code{CSSC}, contact the maintainer via electronic mail to
@w{@samp{jay@@gnu.org}} .
@node Copying, GNU Free Documentation License, Problems, Top
@c @ignore
@unnumbered GNU General Public License
@cindex GPL
@include gpl-3.0.texi
@c @end ignore
@node GNU Free Documentation License, BSD Code, Copying, Top
@unnumbered GNU Free Documentation License
@include fdl.texi
@node BSD Code, Glossary, GNU Free Documentation License, Top
@unnumbered BSD Code
@cindex BSD
@cindex FreeBSD
The program @code{sccs}, its source code, and its accompanying
documentation are covered by the following license:-
@sp 1
@quotation
Copyright (C) 1998, 1999 @*
Free Software Foundation, Inc. All rights reserved.
Copyright (c) 1980, 1993 @*
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
@enumerate
@item
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
@item
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
@item
Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
@end enumerate
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
@end quotation
@sp 1
The original version of the copyright notice above dates from 1993, as
you can see. However, since that time a change has been made to the BSD
license by UCB itself. This change is described on the following letter,
@iftex
@footnote{Obviously, while this version has been typeset, the original
file is plain ASCII and will therefore look slightly different}
@end iftex
which is available on the BSD FTP site in the file
@file{README.Impt.License.Change} :-
@sp 1
@need 10000
@quotation
July 22, 1999
To All Licensees, Distributors of Any Version of BSD:
As you know, certain of the Berkeley Software Distribution (``BSD'') source
code files require that further distributions of products containing all or
portions of the software, acknowledge within their advertising materials
that such products contain software developed by UC Berkeley and its
contributors.
Specifically, the provision reads:
@example
" * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors."
@end example
Effective immediately, licensees and distributors are no longer required to
include the acknowledgement within advertising materials. Accordingly, the
foregoing paragraph of those BSD Unix files containing it is hereby deleted
in its entirety.
@sp 1
William Hoskins
@*
Director, Office of Technology Licensing
@*
University of California, Berkeley
@*
@end quotation
@sp 1
This change has been made to the file @file{COPYING.bsd} which
accompanies the BSD-derived code.
@node Glossary, Concept Index, BSD Code, Top
@unnumbered Glossary
@table @asis
@item archive
In the context of @sc{sccs} and @sc{cssc}, This means the same as
``history file''.
@item branch
Notionally, a branch is a parallel or forked stream of changes. See
``branching''.
@item body
The actual data within the version-controlled file is called the
``body'', though this is also sometimes used to refer to that part of
the @sc{sccs} history file that contains data from the body of the
controlled file (that is, information @emph{from} the file as opposed
to information @emph{about} the file).
@item branching
Multiple lines of development are called branches; a branch is created
by editing a version of a file which already has a derived version
(e.g. editing version 1.2 when version 1.3 already exists).
@item checkin comment
The @code{delta} program asks for a checkin comment; this is a comment
which summarised the nature of the change which has just been made to
the file.
@item controlled file
This is the (working copy of a) file which is version-controlled with
an @sc{sccs} history file (that is, a file which is managed by
@sc{sccs} or @sc{cssc}).
@item d-file
@xref{Filenames}.
@item delta
Each revision of a controlled file, as recorded in an @sc{sccs} file
is called a @emph{delta}. This is also the name of the program used
to check in such changes to the file.
@item delta table
This is the section of the @sc{sccs} file which records information
about each change that has been made (other than the actual contents
of the file at that version).
@item excluded delta
An excluded delta is one which was specified with the @code{-x} option
to @code{get}. See @ref{get options,,Options for @code{get}}.
@item g-file
See @emph{gotten file}.
@item gotten file
This is the working copy of the file; this is read-only unless the
file has been checked out for editing.
@item history file
Also known as an @sc{sccs} archive or ``s-file''. When @sc{sccs} or @sc{cssc}
is used to keep a historical record of previous versions of the
contents of a file, the file in which this historical information is
recorded is called the ``history file''. Sometimes there are known as
``s-files'' or ``archives'' (though ``archive'' is more often used in
relation to the @code{ar} and @code{tar} utilities).
@item ignored delta
An ignored delta is one which was specified with the @code{-g} option
to @code{delta}. @xref{delta options,,Options for @code{delta}}.
@item included delta
An included delta is one which was specified with the @code{-i} option
to @code{get}. See @ref{get options,,Options for @code{get}}.
@item keyword
It is sometimes useful to include information in the gotten file about
what its version number is and so on. Since this information changes
with each revision of the file, it makes sense for @sc{sccs} (or
@sc{cssc}) to keep track of this information and place it in the gotten
file accordingly. If a file is checked out for editing, placeholders
can be edited into the file which; these are later expanded when the
file is checked out read-only. See @ref{Keyword Substitution}. The
same name is also sometimes used for the argument following the @code{-d}
option for @code{prs}. See @ref{Data Keywords,,
Data Keywords for the @option{-d} option of @code{prs}}.
@item level
The second component of the @emph{SID}.
@item MR number
Modification Request numbers; if the @samp{v} flag is set in the
@sc{sccs} file, you will be prompted for ``MR numbers'' when you check
in a new revision. These are not used internally by @sc{cssc} but may
be used to link changes to external things (for example bug report
numbers). @xref{delta options,,Options for @code{delta}}.
@item p-file
@xref{Filenames}.
@item q-file
@xref{Filenames}.
@item release
The first component of the @emph{SID}.
@item revision
A @emph{revision} is a specific version of a file which is controlled
with an @sc{sccs} history file.
@item sequence number
The ``sequence number'' is a decimal number used within the @sc{sccs}
history file to identify a particular revision (or delta) of the
file. These numbers are normally not user-visible (except in the
output of @code{prt} and @code{prs}). These are sometimes referred to
as a ``seqno'' in order to distinguish them from the fourth component
of a SID.
@item s-file
The @sc{sccs} history file is sometimes referred to as the
@emph{s-file}. See also @ref{Filenames}.
@item SID
Each revision of a file controlled with an @sc{sccs} history file is
identified by a ``SID''. This is a series of numbers separated by
dots. A complete SID always has either two components (for revisions
which lie on the trunk) or four components (for revisions that lie on
a branch). Examples are 1.1, 1.2 (which both lie on the trunk),
1.3.1.1, 1.3.1.2 (which both lie on a branch) and 1.3.2.1 (which lies
on a different branch). The four components of the SID are, left to
right, the @emph{release}, the @emph{level}, the @emph{branch} and the
@emph{sequence number}. See also @emph{sequence number}, above.
@item trunk
The trunk consists of those deltas within a history file which do not
lie on branches; trunk revisions have only two components in their
SID. Normally these are the main sequence of changes to the file.
@item x-file
@xref{Filenames}.
@item z-file
@xref{Filenames}.
@end table
@node Concept Index, , Glossary, Top
@unnumbered Concept Index
@printindex cp
@shortcontents
@contents
@bye
CSSC-1.3.0/docs/config-info.texi.in 0000644 0000000 0000000 00000000267 11372221630 013565 0000000 0000000 @multitable @columnfractions .5 .5
@item Binary SCCS file creation allowed
@tab @enable_binary@
@item Maximum SCCS file line length
@tab @max_line_length_description@
@end multitable
CSSC-1.3.0/docs/style.txt 0000644 0000000 0000000 00000003045 11374025765 012002 0000000 0000000 Notes on the coding style used in the maintenance of CSSC
----------------------------------------------------------
1. Indentation.
The indentation used by the code may look random to you, but
it is quite simple, really. MySC, the package on which CSSC
is based, was written with a K&R indentation style. New code
written for CSSC, or rewritten code, is indented according to
the GNU style (that is, with Emacs's default indentation
rules). This is deliberate; please don't re-indent code
UNLESS you are rewriting it. New code for CSSC should be
indented in the GNU fashion.
2. Design.
Much of the design of CSSC is inherited from MySC. MySC was
written when the C++ language was quite different to the way
it is now, and when GCC was a much less good C++ compiler.
Hence it has features which now seem non-optimal. While
redesigning CSSC to be more elegant might be nice, it is far
more important to make it work *correctly*. Redesign has been
deliberately avoided unless it can be done in the course of
other work required for the sake of correctness.
3. Comments
Yes, please. But no "//" comments in the C code, though
they're fine for the C++ code.
4. Other aspects of the coding style.
Most of the other aspects of the coding for this project
follow the GNU guidelines. The only exception is the
function call notation; while the GNU standard stipulates
"f ()", I strongly prefer "f()". If there is actually a
reason to eschew one in favour of the other, please let me
know.
--
James Youngman
CSSC-1.3.0/docs/gpl-3.0.texi 0000644 0000000 0000000 00000104413 11362630513 012043 0000000 0000000 @c The GNU General Public License.
@center Version 3, 29 June 2007
@c This file is intended to be included within another document,
@c hence no sectioning command or @node.
@display
Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
@end display
@heading Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom
to share and change all versions of a program---to make sure it remains
free software for all its users. We, the Free Software Foundation,
use the GNU General Public License for most of our software; it
applies also to any other work released this way by its authors. You
can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you
have certain responsibilities if you distribute copies of the
software, or if you modify it: responsibilities to respect the freedom
of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too,
receive or can get the source code. And you must show them these
terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the
manufacturer can do so. This is fundamentally incompatible with the
aim of protecting users' freedom to change the software. The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products. If such problems arise substantially in
other domains, we stand ready to extend this provision to those
domains in future versions of the GPL, as needed to protect the
freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish
to avoid the special danger that patents applied to a free program
could make it effectively proprietary. To prevent this, the GPL
assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
@heading TERMS AND CONDITIONS
@enumerate 0
@item Definitions.
``This License'' refers to version 3 of the GNU General Public License.
``Copyright'' also means copyright-like laws that apply to other kinds
of works, such as semiconductor masks.
``The Program'' refers to any copyrightable work licensed under this
License. Each licensee is addressed as ``you''. ``Licensees'' and
``recipients'' may be individuals or organizations.
To ``modify'' a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of
an exact copy. The resulting work is called a ``modified version'' of
the earlier work or a work ``based on'' the earlier work.
A ``covered work'' means either the unmodified Program or a work based
on the Program.
To ``propagate'' a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To ``convey'' a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user
through a computer network, with no transfer of a copy, is not
conveying.
An interactive user interface displays ``Appropriate Legal Notices'' to
the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
@item Source Code.
The ``source code'' for a work means the preferred form of the work for
making modifications to it. ``Object code'' means any non-source form
of a work.
A ``Standard Interface'' means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The ``System Libraries'' of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
``Major Component'', in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The ``Corresponding Source'' for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users can
regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same
work.
@item Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey,
without conditions so long as your license otherwise remains in force.
You may convey covered works to others for the sole purpose of having
them make modifications exclusively for you, or provide you with
facilities for running those works, provided that you comply with the
terms of this License in conveying all material for which you do not
control copyright. Those thus making or running the covered works for
you must do so exclusively on your behalf, under your direction and
control, on terms that prohibit them from making any copies of your
copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the
conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
@item Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such
circumvention is effected by exercising rights under this License with
respect to the covered work, and you disclaim any intention to limit
operation or modification of the work as a means of enforcing, against
the work's users, your or third parties' legal rights to forbid
circumvention of technological measures.
@item Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
@item Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these
conditions:
@enumerate a
@item
The work must carry prominent notices stating that you modified it,
and giving a relevant date.
@item
The work must carry prominent notices stating that it is released
under this License and any conditions added under section 7. This
requirement modifies the requirement in section 4 to ``keep intact all
notices''.
@item
You must license the entire work, as a whole, under this License to
anyone who comes into possession of a copy. This License will
therefore apply, along with any applicable section 7 additional terms,
to the whole of the work, and all its parts, regardless of how they
are packaged. This License gives no permission to license the work in
any other way, but it does not invalidate such permission if you have
separately received it.
@item
If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your work
need not make them do so.
@end enumerate
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
``aggregate'' if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
@item Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of
sections 4 and 5, provided that you also convey the machine-readable
Corresponding Source under the terms of this License, in one of these
ways:
@enumerate a
@item
Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium customarily
used for software interchange.
@item
Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a written
offer, valid for at least three years and valid for as long as you
offer spare parts or customer support for that product model, to give
anyone who possesses the object code either (1) a copy of the
Corresponding Source for all the software in the product that is
covered by this License, on a durable physical medium customarily used
for software interchange, for a price no more than your reasonable
cost of physically performing this conveying of source, or (2) access
to copy the Corresponding Source from a network server at no charge.
@item
Convey individual copies of the object code with a copy of the written
offer to provide the Corresponding Source. This alternative is
allowed only occasionally and noncommercially, and only if you
received the object code with such an offer, in accord with subsection
6b.
@item
Convey the object code by offering access from a designated place
(gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to copy
the object code is a network server, the Corresponding Source may be
on a different server (operated by you or a third party) that supports
equivalent copying facilities, provided you maintain clear directions
next to the object code saying where to find the Corresponding Source.
Regardless of what server hosts the Corresponding Source, you remain
obligated to ensure that it is available for as long as needed to
satisfy these requirements.
@item
Convey the object code using peer-to-peer transmission, provided you
inform other peers where the object code and Corresponding Source of
the work are being offered to the general public at no charge under
subsection 6d.
@end enumerate
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A ``User Product'' is either (1) a ``consumer product'', which means any
tangible personal property which is normally used for personal,
family, or household purposes, or (2) anything designed or sold for
incorporation into a dwelling. In determining whether a product is a
consumer product, doubtful cases shall be resolved in favor of
coverage. For a particular product received by a particular user,
``normally used'' refers to a typical or common use of that class of
product, regardless of the status of the particular user or of the way
in which the particular user actually uses, or expects or is expected
to use, the product. A product is a consumer product regardless of
whether the product has substantial commercial, industrial or
non-consumer uses, unless such uses represent the only significant
mode of use of the product.
``Installation Information'' for a User Product means any methods,
procedures, authorization keys, or other information required to
install and execute modified versions of a covered work in that User
Product from a modified version of its Corresponding Source. The
information must suffice to ensure that the continued functioning of
the modified object code is in no case prevented or interfered with
solely because modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or
updates for a work that has been modified or installed by the
recipient, or for the User Product in which it has been modified or
installed. Access to a network may be denied when the modification
itself materially and adversely affects the operation of the network
or violates the rules and protocols for communication across the
network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
@item Additional Terms.
``Additional permissions'' are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders
of that material) supplement the terms of this License with terms:
@enumerate a
@item
Disclaiming warranty or limiting liability differently from the terms
of sections 15 and 16 of this License; or
@item
Requiring preservation of specified reasonable legal notices or author
attributions in that material or in the Appropriate Legal Notices
displayed by works containing it; or
@item
Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
@item
Limiting the use for publicity purposes of names of licensors or
authors of the material; or
@item
Declining to grant rights under trademark law for use of some trade
names, trademarks, or service marks; or
@item
Requiring indemnification of licensors and authors of that material by
anyone who conveys the material (or modified versions of it) with
contractual assumptions of liability to the recipient, for any
liability that these contractual assumptions directly impose on those
licensors and authors.
@end enumerate
All other non-permissive additional terms are considered ``further
restrictions'' within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions; the
above requirements apply either way.
@item Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
@item Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run
a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
@item Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An ``entity transaction'' is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
@item Patents.
A ``contributor'' is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's ``contributor version''.
A contributor's ``essential patent claims'' are all patent claims owned
or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, ``control'' includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a ``patent license'' is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To ``grant'' such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. ``Knowingly relying'' means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is ``discriminatory'' if it does not include within the
scope of its coverage, prohibits the exercise of, or is conditioned on
the non-exercise of one or more of the rights that are specifically
granted under this License. You may not convey a covered work if you
are a party to an arrangement with a third party that is in the
business of distributing software, under which you make payment to the
third party based on the extent of your activity of conveying the
work, and under which the third party grants, to any of the parties
who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by
you (or copies made from those copies), or (b) primarily for and in
connection with specific products or compilations that contain the
covered work, unless you entered into that arrangement, or that patent
license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
@item No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey
a covered work so as to satisfy simultaneously your obligations under
this License and any other pertinent obligations, then as a
consequence you may not convey it at all. For example, if you agree
to terms that obligate you to collect a royalty for further conveying
from those to whom you convey the Program, the only way you could
satisfy both those terms and this License would be to refrain entirely
from conveying the Program.
@item Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
@item Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions
of the GNU General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies that a certain numbered version of the GNU General Public
License ``or any later version'' applies to it, you have the option of
following the terms and conditions either of that numbered version or
of any later version published by the Free Software Foundation. If
the Program does not specify a version number of the GNU General
Public License, you may choose any version ever published by the Free
Software Foundation.
If the Program specifies that a proxy can decide which future versions
of the GNU General Public License can be used, that proxy's public
statement of acceptance of a version permanently authorizes you to
choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
@item Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
@item Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
@item Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
@end enumerate
@heading END OF TERMS AND CONDITIONS
@heading How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the ``copyright'' line and a pointer to where the full notice is found.
@smallexample
@var{one line to give the program's name and a brief idea of what it does.}
Copyright (C) @var{year} @var{name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see @url{http://www.gnu.org/licenses/}.
@end smallexample
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
@smallexample
@var{program} Copyright (C) @var{year} @var{name of author}
This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
This is free software, and you are welcome to redistribute it
under certain conditions; type @samp{show c} for details.
@end smallexample
The hypothetical commands @samp{show w} and @samp{show c} should show
the appropriate parts of the General Public License. Of course, your
program's commands might be different; for a GUI interface, you would
use an ``about box''.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a ``copyright disclaimer'' for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
@url{http://www.gnu.org/licenses/}.
The GNU General Public License does not permit incorporating your
program into proprietary programs. If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use
the GNU Lesser General Public License instead of this License. But
first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
CSSC-1.3.0/docs/Makefile.am 0000644 0000000 0000000 00000000605 11374025765 012134 0000000 0000000 ## CSSC's docs/Makefile.am.
info_TEXINFOS = cssc.texi
cssc_TEXINFOS = gpl-3.0.texi fdl.texi
EXTRA_DIST = BUGS TODO CREDITS TESTING \
missing.txt patches.txt \
Platforms mailing-list.txt style.txt \
.ispell_english
# The .ispell_english file is included in the distribution because it
# is useful for the list of correct spellings in this document to
# accompany the document itself.
CSSC-1.3.0/docs/TODO 0000644 0000000 0000000 00000010223 11374025765 010565 0000000 0000000 This file is mostly obsolete. One day I will go through it and remove
the tasks that have been done, and convert any remaining tasks to
enhancement requests or bugs on SourceForge.
2001-07-14 James Youngman
* Does "delta" handle disk-full gracefully? (SourceForge task id
34497).
1999-04-05 James Youngman
* If the user specifies a list of included deltas and one of the
manually-included deltas is NEWER than the supplied cutoff date,
do we get the delta, or not? (This is SourceForge task id 34490)
1998-06-02 James Youngman
* Determine if execv("foo", argv) under glibc2 on Linux will run a
"foo" in the current directory. See if unsetting $PATH makes a
difference. There may be security implications here for
bsd/sccs.c (see try_to_exec). (This is SourceForge task id 34491).
1998-04-08 James Youngman
* Find out if SCO's "unget" produces any output. We currently
output a SID but it looks like SCO's does not.
(This is SourceForge task ID 34492).
* also, tests/prt/all-512.txt suffers from the fact that
SCO does not have "prt"! No idea if it exists
but lives in a funny place, etc.
(This is SourceForge task ID 34493).
1998-02-08 James Youngman
* Find out if genuine SCCS works when the s-file's name
contains a space. Find out particularly if the right
thing happens when delta invokes diff.
(This is SourceForge task ID 34494)
1998-02-01 James Youngman
* tests: Testing for binary files:
OK, check that "prs -d:GB:", "prs -d:BD:" and "prt -b" work OK.
Also check zero-length files, keyword substitution, large
binary files.
(SourceForge task ID 34498).
1998-01-25 James Youngman
* bodyio.cc: Test what happens if the text input ends with
"%A", that is, the peeked character is EOF. At the moment,
we ungetc(EOF); is that valid?
(This is SourceForge task id 34495)
* bodyio.cc: Test for sane behaviour if we get a disk-full
condition while writing the body part of an SCCS file
with admin -i. Especially important for text files;
we probably want to avoid retrying with binary encoding.
(This is SourceForge task ID 34496)
Wed Nov 12 00:00:44 1997 James Youngman
(This is SourceForge task ID 34487)
* Write test cases for admin's -h, -l, -V, and -z flags.
* Write test cases for delta's -g, -n, -p, -r, -s flags.
* Write test cases for get's -i, -l, -lp flags.
Mon Aug 4 23:33:16 1997 James Youngman
* Check that Dave Bodenstab's changes also provide for running the
test suite under SunOS, as I suspect -- because all that was
required was the ability to select a shell other than /bin/sh.
(This is SourceForge task id 34499)
Sat Jun 28 12:25:12 1997 James Youngman
* Allow the utilities to be built with a shared library containing
at least $(SFILE_OBJS) and $(COMMON_OBJS). May have to provide
two version numbers, one for the library and one for each app. I
don't expect to need/want to support user code linking against the
library, the intent is just to conserve disk space and perhaps
system memory too. [ 2000-12-03: JY: not certain if this is a
good plan ]
(This is SourceForge task id 34500)
Sun May 25 16:27:05 1997 James Youngman
* Complete the test cases in admin/flags.sh.
(This is SourceForge task ID 34501).
Sat May 3 11:45:19 1997 James Youngman
* Check the interaction between any -r option to get and the
release floors and ceilings. (SourceForge task ID 34489).
* Write a shell script for converting SCCS files to RCS files; use
the Bourne shell, since not everybody has the C shell [suggested
by RMS].
(This is SourceForge task ID 34503).
CSSC-1.3.0/docs/cssc.info 0000644 0000000 0000000 00000700747 11374030477 011722 0000000 0000000 This is /home/james/source/GNU/CSSC/git/cssc/docs/cssc.info, produced
by makeinfo version 4.13 from
/home/james/source/GNU/CSSC/git/cssc/docs/cssc.texi.
INFO-DIR-SECTION Miscellaneous
START-INFO-DIR-ENTRY
* cssc: (cssc). The GNU work-alike replacement for SCCS.
END-INFO-DIR-ENTRY
This file documents the GNU `cssc' package for working with SCCS
files.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License".
File: cssc.info, Node: Top, Next: Overview, Up: (dir)
This file documents the GNU `cssc' package for working with SCCS
files.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License".
This file documents the GNU `CSSC' package, which is a work-alike
for the traditional Unix SCCS suite.
This is edition 1.10, for CSSC Version 1.3.0.
* Menu:
* Overview:: Preliminary information.
* Interface:: How to use the suite.
* Invoking CSSC Programs:: How to run the individual CSSC programs.
* Filenames:: Names of files used by CSSC.
* File Format:: Description of the SCCS file format
* Interoperability:: Interoperating with other versions of SCCS.
* Environment:: How environment variables affect CSSC.
* Incomplete:: Missing Features.
* Year 2000 Issues:: Status of CSSC with regard to the Millennium.
* Testing:: How to run the test suite and write new cases.
* Problems:: Reporting bugs.
* Copying:: How you can copy and share `CSSC'.
* GNU Free Documentation License:: Copying and sharing this manual.
* BSD Code:: Parts of the code are from BSD.
* Glossary:: Definition of some terms relating to CSSC.
* Concept Index:: Index of concepts.
File: cssc.info, Node: Overview, Next: Interface, Prev: Top, Up: Top
1 Overview
**********
The GNU CSSC program is designed to be a compatible replacement for the
traditional Unix SCCS suite.
While it is strongly suggested that new projects not use this
package, sometimes existing projects require the use of SCCS files.
While conversion to other formats is possible, this is also sometimes
impractical. See the documentation for CVS and RCS. *Note What is
CVS?: (cvs)What is CVS?. See also the manual pages for RCS.
GNU CSSC is published under the GNU General Public License, which is
designed to protect your rights, as the user of this program. You have
the right to modify this program, and distribute it. You also have
responsibilities to those to whom you distribute copies, as detailed in
the license. *Note GNU General Public License: Copying.
GNU CSSC was originally based on the public-domain package MySC,
which was written by Ross Ridge. The enhancement work was done by James
Youngman.
The `sccs' program itself and its accompanying documentation
`sccs.me' and `sccs.1' were written by Eric Allman, and are covered by
the BSD license (*note BSD Code::).
File: cssc.info, Node: Interface, Next: Invoking CSSC Programs, Prev: Overview, Up: Top
2 How to use the suite
**********************
By far the easiest way to use CSSC (or indeed SCCS) is to use VC-mode
in GNU Emacs. *Note Version Systems: (emacs)Version Systems.
If you can't use VC-mode, the BSD command `sccs' is a good
interface to the SCCS suite (and hence CSSC).
Other than that, you will need to use each of the programs in the
suite individually.
File: cssc.info, Node: Invoking CSSC Programs, Next: Filenames, Prev: Interface, Up: Top
3 Invoking CSSC programs
************************
The menu items are arranged in approximate order of frequency of use,
except `admin', which is first because you have to use it to start with.
* Menu:
* admin:: Creating and administering SCCS files.
* sccs:: A more helpful front-end from BSD.
* get:: Checking-out a version for compilation or editing.
* delta:: Checking-in a revised version.
* what:: Identifying versions of files.
* sccsdiff:: Finding the changes between two revisions.
* unget:: When it all goes horribly wrong...
* prs:: Displaying the revision history of a file.
* sact:: Show which SCCS files are being edited.
* rmdel:: Expunging changes or backing out of a check-in.
* cdc:: Changing revision comments after the fact.
* prt:: Printing the delta table of a file.
* comb:: Creating a shell archive of an SCCS file.
* help:: Unimplemented hints on obscure error messages.
* val:: Validating an SCCS file for integrity.
File: cssc.info, Node: admin, Next: cdc, Up: Invoking CSSC Programs
3.1 `admin'
===========
To create an SCCS archive of a source file `foo.c', do
admin -ifoo.c s.foo.c
This creates the archive file `s.foo.c' and initialises it with the
current contents of your source file, `foo.c'. If you use Emacs as
your editor, you can just use `C-x v i' instead.
Another frequently-used option is `-b', which indicates that the
file is to be treated as a binary file rather than as text. You might
want to do this because the file actually contains binary data, or just
characters that have other meanings within an SCCS file, for example
`^A', the character whose code is 1.
`-aXXX'
Add user or group XXX to the list of those authorised to check
revisions in (that is, use `get -e' and `delta'). Users must be
specified by name and groups by numeric ID.
This feature is often used in conjunction with a setuid
installation of the `sccs' driver program (*note sccs::). This is
not a good idea because the CSSC suite is not secure (*note Known
Problems::).
`-b'
Ensure that the file is encoded as a binary file. This option only
works in conjunction with the `-n' or `-i' options.
This option is not available if binary file support is turned off
(*note Interoperability::) though this can be re-enabled if
necessary with an environment variable (*note Environment
Variables: Environment.).
`-dF'
Delete flag F from the flags present in the file (*note Flags::).
When using `admin -dl' to unlock a release, you need to specify
which release should be unlocked. For example `admin -dla'
unlocks all releases, while `admin -dl2' unlocks only release 2.
This means that `admin -dl' will do nothing, since no release was
specified. If all releases are locked, attempting to unlock just
one release will have no effect.
`-eXXX'
Erase the specified user or group from the list of those
authorised to check revisions in or out.
`-fF[XXX]'
Add the flag F (with optional value XXX) to the file's flags
(*note Flags::). For example, `-fv/tmp/checkit' sets the
MR-validation flag to `/tmp/checkit'.
`-h'
Check the SCCS file. The exit value will be 0 if the file is
valid, and not 0 otherwise. The checks made are the same as those
made for `val'. Some problems with the SCCS file may not be
diagnosed.
Warning messages may be emitted, indicating things that may or may
not be wrong (e.g. time apparently going backwards), but if no
actual errors are encountered, the exit value will still be zero.
This option is silently incompatible with all the other options;
the specified SCCS files will not be modified by `admin' if the
`-h' flag is used.
`-iFOO'
Initialise the SCCS file with the contents of the file FOO. If no
argument is given, read from standard input. This implies the
`-n' option.
`-mMR-LIST'
When initialising a file, add the specified list of MR numbers
(*note Modification Request Numbers::) to the delta commentary for
the initial version. This list can be empty. The specified MRs
are validated according to the setting of the V flag, which should
be set (*note Flags::). If the V flag is set but has no value
(i.e. is set to the empty string), validation silently succeeds.
If the V flag is not set, the `-m' option causes `delta' to fail.
`-n'
Create a new SCCS file. Unless `-i' is also used, the new file
will contain control information but the body will be initially
empty. Some versions of SCCS require the `-i' option to be
specified if `-n' is used. Therefore for greatest portability,
specify `-i/dev/null' if you want an empty initial body. *note
Interoperability::.
`-rN'
Set the initial release number to N. The initial level within
that release is always 1. Some versions of SCCS allow you to
specify actual an actual SID here (for example `1.2' or
`1.8.2.1'). CSSC also allows this, but emits a warning. If you
use the `-r' option, you must also use the `-i' option (not just
the `-n' option). If the initial SID you specify is not on the
trunk, some tools will fail to work with the resulting file. See
also *Note SCCS Version Differences::.
`-tDESC'
Read in descriptive text for this file from `DESC'. This replaces
any existing description. If no argument, remove any existing
description (this is illegal if `-i' or `-n' is used).
`-V'
Display version information.
`-yADAYADA'
When initialising a file, set the comment for that delta to
ADAYADA. If the option is given just as `-y', the comment is
recorded as empty. The following word in the argument list is not
used as the comment. _Note that this behaviour is different to
most Unix programs, but is the same as the behaviour of traditional
SCCS_.
`-z'
Fix the checksum information. The SCCS file is still validated by
CSSC; apart from possibly having an incorrect checksum, the s-file
must be valid. If you use this option on an SCCS file which
really is invalid, then the attempt may fail or _silently write
out a valid but incorrect file_. This option does not work on
BitKeeper files. Use this option with _extreme_ care.
File: cssc.info, Node: Flags, Next: Modification Request Numbers, Up: admin
3.1.1 Flags
-----------
Flags are set and cleared with the `admin' program. *Note admin::.
Boolean Flags
.............
`b'
Enable branch deltas: this enables the `-b' option of get (*note
get::).
`e'
This flag indicates that the file controlled by this SCCS file is a
binary file, and hence the body of the SCCS file is uuencoded.
This flag can only be set with the `-b' option of `admin' at the
time the file is created (or if admin takes it upon itself to set
this flag automatically), and cannot be unset. The circumstances
under which this can happen are discussed in *note
Interoperability::.
`f'
This flag is specific to the _BitKeeper_ suite, and is only
supported if CSSC has recognised the file as a BitKeeper file.
CSSC does not understand the significance of this flag.
`i'
Make `get' and `delta' exit unsuccessfully when the `Warning: No
id keywords' message is issued.
`j'
Enables concurrent updates: if you try to get a revision for
editing, this normally fails if another user already has the file
locked. Setting the `j' flag overrides this.
`n'
Create empty releases when the `-r' option to `get' is used to
skip releases. These empty releases can later serve as branch
points.
`x'
Sets the executable bit on the g-file. This flag is a SCO
OpenServer extension and is not supported by other versions of
SCCS. Setting this flag with `admin -fx' generates a warning to
this effect. If CSSC is simply processing a file which already has
this flag set, no message will be generated. See *note
Interoperability:: for more information on compatibility between
CSSC and other implementations of SCCS.
Other Flags
...........
`c'
Set the release ceiling. Releases higher than the ceiling cannot
be checked out.
`f'
Set the release floor. Releases lower then the release floor
cannot be checked out.
`d'
Set the default delta which is used when the `get' command is given
without the `-r' option. The default behaviour for `get' is
defined in *note get::.
`l'
Set the locked release list. These releases cannot be checked out
with `get -e'. The special value `a' denotes all releases.
`q'
Sets the value substituted for the `%Q%' keyword as described in
*note Keyword Substitution::. This flag is referred to in the
output of SCCS as `csect name', and is variously referred to here
as that, or the "user flag" or the "Q flag".
`m'
Sets the overridden value for the `%M%' keyword as described in
*note Keyword Substitution::.
`t'
Sets the value for the `%Y%' keyword as described in *note Keyword
Substitution::.
`v'
Sets the name of the program used to validate MR (modification
request) numbers; MRs are described in *note Modification Request
Numbers::. This flag can be set to the empty string, in which case
MRs are allowed and the validation silently succeeds without any
program being run.
`y'
By default, all keywords are expanded in the gotten file. See
*note Keyword Substitution:: for a list of such keywords. This
flag can be set to a list of letters separated by commas, in which
case keyword expansion will be limited to the specified keywords.
For example, `admin -fyQ,M,Y' restricts keyword expansion so that
`%Q%', `%M%' and `%Y%' are expanded, while other keywords such as
`%Z%' are not. This flag is an extension introduced by Sun
Solaris 8. See *note Interoperability:: for a discussion of the
interoperability of CSSC with other SCCS implementations.
File: cssc.info, Node: Modification Request Numbers, Prev: Flags, Up: admin
3.1.2 Modification Request Numbers
----------------------------------
MRs are identifiers that can be specified when checking in a revision
using `delta' (or even using `admin', when creating a file).
If the `v' ("validate") flag is set, the user running `delta' is
prompted for MR numbers as well as revision comments. If this flag is
not set, no validation is performed and no MR numbers are prompted for.
If the `-m' option is given on the command line for `delta', the user
is not prompted.
MR numbers are not required by CSSC to be actual numbers; they may
contain any non-whitespace printable characters; other implementations
may not be so flexible.
MR numbers are frequently used to tie code revisions to other
things, for example engineering change management documents or
bug-tracking databases. If your change management systems are
computer-based, you can use the validation program to ensure that the
offered MR number is valid and that the calling user is allowed to
change the file.
The first argument passed to the validation program is the name of
the g-file and the following arguments are the MR numbers offered. The
validating program should return zero if all the MR numbers are
acceptable.
One might think that it would be useful to associate the MR number
with the action of checking out for a modification (`get -e'), but this
is not possible with SCCS. If you want to do that kind of thing, you
must use a more advanced system, for example GNU CVS.
File: cssc.info, Node: cdc, Next: comb, Prev: admin, Up: Invoking CSSC Programs
3.2 `cdc'
=========
The `cdc' command allows you to add comments to the commentary for a
particular delta in an SCCS file. Any delta in the file (other than
ones removed with `rmdel') can be modified.
If a comment is not specified on the command line, comments are
accepted via standard input.
If the special argument name `-' is being used, this means that a
list of files to operate on is being read from standard input, and
therefore the `-y' option is mandatory in this case.
The new comments are prepended to the existing comment for that
delta, followed by a line of the form `*** CHANGED *** yy/mm/dd hh:mm:ss
who'. This is followed by the original comment. Comments cannot be
removed using `cdc', but they can be added.
Only three options are supported:-
`-mMR-LIST'
The specified (space-separated) list of MRs is added to the
MR-list for the relevant delta. If more than one MR number is to
be added, the whole option should be quoted, to protect the spaces.
If an MR is prefixed with an exclamation mark (`!'), then the
indicated delta is removed from the existing list of MRs for the
delta. The file comment is modified to indicate what MRs have been
removed. If an MR to be removed is in fact not present in any
case, this is silently ignored. and the comment is not updated for
that MR. If you do not also want to add to the comment for the
delta, specify an empty comment option (that, is, a bare `-y').
`-rSID'
This indicates which delta is to be changed. It must refer to an
existing delta in the file, which has not been removed with
`rmdel'.
`-yCOMMENT'
This option introduces a comment to be added to the commentary for
the specified SID. If more than one line is needed, it is a good
idea to enclose the option in quotation marks to ensure that the
shell includes them in the argument passed to `cdc'. An empty `-y'
option can be used to indicate that the commentary for this delta
is not to be modified (this is only useful when the `-m' option is
used). If the `-y' option is not given, the user is prompted for
comments.
File: cssc.info, Node: comb, Next: delta, Prev: cdc, Up: Invoking CSSC Programs
3.3 `comb'
==========
This program is not yet implemented or documented in the manual, there
are no tests for it in the test suite yet, but it is part of SCCS so it
will eventually be implemented.
File: cssc.info, Node: delta, Next: get, Prev: comb, Up: Invoking CSSC Programs
3.4 `delta'
===========
The `delta' command is used to add a new revision to the ones already
stored in an SCCS file. Before being able to do this you need to run
`get -e' to check the file out for editing.
A new revision is created by the `delta' program. These revisions
are each identified by a unique "SID". A SID looks like `1.2.3.4',
where the four numbers are the "release", "level", "branch" and
"sequence" numbers.
New revisions on the main sequence (the "trunk") have no branch or
sequence numbers and so just have two number components (`1.2', for
example).
When a new version is checked in, `delta' usually prompts for
comments describing the changes just made. At this point you can enter
any comments, separating lines with backslash-newline pairs. An
unescaped newline terminates the comment, allowing operation to
continue.
Sometimes, running `delta' results in the creation of a branch in
the SCCS file; this is controlled by the `get' command at the time the
file is checked out for editing (*note Making Branches: branches.).
The `delta' program checks to see if you are authorised to check in
a delta to this file. The list of authorised users can be maintained
with the `admin' program (*note admin::). If the MR-validation flag
(*note Flags::) is set, you must also supply a valid MR-number in order
to be able to check in your change.
* Menu:
* Basic Usage: delta usage. Frequently-used `delta' commands
* Options: delta options. Full list of options
File: cssc.info, Node: delta usage, Next: delta options, Up: delta
3.4.1 Basic usage for `delta'
-----------------------------
Although there are several valid command-line options for `delta', they
are not frequently used; the most common usage of delta is
delta SCCS/s.umsp.c
and this command simply applies the changes to the file `umsp.c' to the
SCCS file which tracks it. Though it is possible to specify the
comment and MR-number for this change using command-line options, it's
more common to type them when prompted, unless `delta' is being driven
by another program; either way, it's unusual to specify options for
`delta' on the command line.
Note that the filename you specify on the command line is that of the
SCCS file, not the filename of the working file. The BSD wrapper
program, sccs(1), will guess the correct filename for you, but this
doesn't happen unless you do actually invoke it (`sccs delta umsp.c'
for example).
File: cssc.info, Node: delta options, Prev: delta usage, Up: delta
3.4.2 Options for `delta'
-------------------------
`-gSID-LIST'
The specified list of deltas are to be ignored when the version
being checked in is retrieved using `get'. The list is a list of
SIDs separated by commas, or can contain ranges of SIDs (these are
indicated by a dash). Untested.
`-mMR-LIST'
Specify the indicated list of MR numbers (separated by spaces) for
this change (*note Modification Request Numbers::). If the V flag
(*note Flags::) is set, `delta' will prompt for MR numbers if none
are given on the command line. If the V flag has a non-empty
value, as opposed to just being set, then the supplied list of MR
numbers will be verified using that program. The requested delta
will not be made if this validation fails (the validation program
returns a nonzero exit status).
When the V flag is set, deltas _must_ be checked in using this
flag. If you are using Emacs's vc-mode, you can do this by setting
the variable VC-CHECKIN-FLAGS to `"-m2677"' if the MR with which
you are working is numbered 2677, for example.
`-n'
If this option is given, the edited file is not deleted once
processing has succeeded. The edited file is referred to as the
"g-file", since it is the file which was previously "gotten" by
the `get' command.
`-p'
Display the differences between the old and new versions of the
file during processing. The output of `diff' is echoed on the
standard output.
`-r'
If several versions are checked out, the `-r' command-line option
is used to specify which checked-out version this change is in
reference to. When `get' is used to check out a version for
editing, it announces two SIDs:-
3.1
new delta 3.2
402 lines
One identifies the version forming the basis of the change, and the
other specifies the SID that the new version will be assigned once
it is checked in again. Either of these two SIDs (in this case,
3.1 or 3.2) can be used for the `-r' option of `delta'.
`-s'
Suppress warning or confirmation messages. Error messages go to
standard error. This option is not covered in the test suite.
`-y'
Specify a comment for the revision log. This option is usually
quoted to protect the spaces contained in it. An empty comment
can be specified by just using a naked `-y'. If this option is
not given on the command line, `delta' will prompt the user for a
comment.
File: cssc.info, Node: get, Next: help, Prev: delta, Up: Invoking CSSC Programs
3.5 `get'
=========
The `get' command is to retrieve previous revisions from an SCCS file.
With the `-e' option, it also locks the gotten revision so that a
modified version can be checked in later using `delta'.
* Menu:
* Basic Usage: get usage. Frequently-used `get' commands
* Options: get options. Full list of options.
* Branches: branches. How branches are made.
* Keywords: Keyword Substitution. Keyword Substitution
* Included Excluded and Ignored deltas:: Here Be Dragons...
File: cssc.info, Node: get usage, Next: get options, Up: get
3.5.1 Basic Usage for `get'
---------------------------
There are very few common basic usage patterns for `get'. Below,
`s.foo.c' denotes the name of any existing SCCS file.
`get s.foo.c'
Get a copy of the most recent trunk revision of `s.foo.c' into the
file `foo.c'.
`get -Gbar s.foo.c'
Get a version from `s.foo.c', into `bar' rather than the default
`foo.c'. The file produced by `get' is often referred to as the
"g-file".
`get -r1.3 s.foo.c'
Get revision 1.3 from `s.foo.c' into `foo.c'. The `-G' option can
be used to set the name of the gotten file.
`get -p s.foo.c'
Get the most recent trunk revision, and print it on standard
output. The `-r' option could also be used to specify some other
revision.
Unless you specify the `-k' or `-e' option, the retrieved file will
be created read-only.
File: cssc.info, Node: get options, Next: branches, Prev: get usage, Up: get
3.5.2 Options for `get'
-----------------------
Full description of options
`-aN'
Retrieve the version corresponding to the delta sequence number N.
Mainly for use by other programs in the suite.
`-b'
Create a new branch when the resulting file is checked back in.
Used with the `-e' option. If the `-e' option is not given, or if
the `b' (branch) flag is not set in the SCCS file, this option has
no effect; a branch is not made. If the version to be checked out
for editing has a successor, a branch is created whether or not the
`-b' flag is present (*note branches: branches.).
`-cwhen'
Get the version that was current at the time specified by when.
The format of the argument is [cc]yy[mm[dd[hh[mm[ss]]]]]. Any
fields omitted (except "cc") assume their maximum possible values
so that if you specify `-c92', you get the latest version which
was available in the year 1992. It is possible to give four
digits for the year as a CSSC-specific extension, but only if none
of the other fields are omitted. If only two digits are used and
the resulting value is less than 69, the year is assumed to be in
the twenty-first century (*note prs options:: and *note Year 2000
Issues::).
`-D'
Turns on debugging output, indicating what is going on as the SCCS
file is read. This option may go away or have its behaviour
change in the near future.
`-e'
Indicates that the retrieved version is for editing. When checked
back in the resulting file will have a new revision number. The
retrieved file is writable, and keyword substitution does not take
place. A "p-file" is created; this file contains information
about what versions of the s-file are being edited, and by whom.
Unless the `j' flag is set (*note Flags::), `get -e' will fail if
someone else already has the file locked. If the list of
authorised users in the SCCS file is not empty, you must be in
that list in order to use this option.
`-g'
Do a dry-run, showing what version would be retrieved, but don't
actually get the file. This is sometimes done by scripts, just to
test the exit status.
`-GFOO'
Name the gotten file `FOO', instead of the default name.
`-iLIST'
Include the deltas for the listed SIDs. See also `-x'.
`-k'
Avoid doing keyword substitution (*note Keyword Substitution::).
This is assumed when `-e' is specified. The gotten file is
writable.
`-l'
Generates a delta summary file in the current working directory.
The name of the file is `l.foo' where `foo' is the name that would
normally be used for the gotten file. The name of the delta
summary file is not affected by the `-G' option. The delta
summary file is similar in content to the output of `prt', though
it contains less information.
`-lp'
This is obsolete; use `-L' instead.
`-L'
Generate a delta summary as for the `-l' option, but print it on
stdout instead of creating a file. If `-L' and `-p' are both
specified, the delta summary is printed first.
`-m'
Prepend to each line of the result the SID corresponding to the
`delta' which introduced this line to the file.
`-n'
Precede each line of output with the module name, before any SID
added with the `-m' option.
`-p'
Write the result to the standard output, rather than to a file.
`-rX'
Retrieve version X, rather than the default.
`-s'
Run silently.
`-t'
Get the "top" delta for the indicated release. The default
behaviour of `get' is to get the highest revision on the trunk.
The `-t' option only modifies this behaviour in the situation
where the topmost trunk revision is a branch point. In this case,
the `-t' option causes the topmost revision on this branch to be
retrieved. In other words, the `-t' option removes the
restriction that the retrieved version should be on the trunk.
This option is used by `comb' (*note comb::) and by the driver
program `sccs' from BSD (*note sccs::).
`-V'
Show version information.
`-wXXX'
When performing keyword substitution (*note Keyword
Substitution::), use XXX rather than `%Z%%M% %I%' as the
substitution value for %W%.
`-xLIST'
Exclude the indicated deltas from the result. Deltas are
indicated by specifying the SID at which they arrived in the file.
File: cssc.info, Node: branches, Next: Keyword Substitution, Prev: get options, Up: get
3.5.3 Making Branches
---------------------
Normally, editing revision 1.1 of a file produces revision 1.2. Editing
that produces revision 1.3, and so on. Sometimes, however, we need to
make a change to an earlier version which has already been superseded.
This might happen, for example, when a bug has been reported in a
released version of a file; a rapid bug-fix is required, but you're in
the middle of working towards a new release. A viable strategy is to
make a branch at the previously-released version, modify that to fix the
bug (and release this bug-fix). Meanwhile, development can be continued
along the "main trunk", and the same bug-fix can be incorporated in
this, ready for the next release later on.
When you check out a version of a file for editing, CSSC tells you
what the SID of the new version will be. For normal progress along the
trunk, the "level number" is incremented. This is the second numeric
element of the SID. In general, a SID is composed of four numbers
`R.L.B.S', where "R" stands for "Release", "L" stands for "Level", "B"
stands for "Branch", and "S" stands for "Sequence number" (not the same
as the sequence numbers produced in the output of `prt').
Trunk revisions have only two components; you can think of the branch
and sequence numbers as being zero. Non-trunk revisions have four
components. When a branch is created from an existing SID, the release
and level numbers are copied, the branch number is set to the lowest
unused value for that release and level, and the sequence number is set
to one. Hence the first branch from version 1.1 will be version
1.1.1.1, and if a branch is made from that, its SID will be 1.1.2.1.
Branches are made from any given version when that version already
has a successor. For example, a `get -e' on version 1.1 will result in
a branch (1.1.1.1) if version 1.2 exists, and a `get -e' on version
1.2.1.1 will result in a branch (1.2.2.1) if version 1.2.1.2 exists.
If the "enable branches" flag is set, it is also possible to make
branches for revisions that do not have successors. This is done with
the `-b' flag of `get'.
File: cssc.info, Node: Keyword Substitution, Next: Included Excluded and Ignored deltas, Prev: branches, Up: get
3.5.4 Keyword Substitution
--------------------------
Keyword substitution is performed unless the `-k' option or the `-e'
option is given to `get'.
*note what:: contains a keyword substitution example.
The keywords are all of the form `%x%' where x stands for an
upper-case letter, one of:
A
Expands to the same as `%Z% %Y% %M% %I% %Z%'.
B
The branch number of the gotten version
C
Current line in the output file
D
The date at the time the file was gotten, in the form yy/mm/dd.
The year is always represented as two digits but this is not
ambiguous since the two-digit year is no later than 2068 (*note
Year 2000 Issues::).
E
The date that the newest delta in the gotten file was applied,
yy/mm/dd. The year is always represented as two digits but this is
not ambiguous since the two-digit year is no later than 2068
(*note Year 2000 Issues::).
F
Name of the SCCS file, for example `s.foo.c'.
G
As for %E%, but in the US format mm/dd/yy.
H
As for %D%, but in the US format mm/dd/yy.
I
Expands to the same as %R%.%L%.%B%.%S%, that is, the SID of the
retrieved version.
L
The level number of the retrieved version.
M
Module name: the value of the `m' (module) flag, or the base name
of the SCCS file with the `s.' removed if the module flag is unset.
P
Full name of the SCCS file.
Q
Value of the `q' flag. The `q' flag has no other purpose, and can
be set with `admin -fqfoo'. *Note Flags::.
R
Release number of the retrieved version.
S
Sequence number of the retrieved version.
T
Current time (hh:mm:ss) when the file was retrieved, see %D% and
%H%.
W
Expands to %Z% %M% %I% or the argument for the `-w' flag, if
given.
Y
Value of the `t' (module type) flag.
Z
The literal string `@(#)'. *Note what::.
Some of the keywords listed above have expansions that are described
in terms of the contents of other keywords. This expansion is
performed as if the `y' flag in the SCCS file is not set. For example,
`admin -fyA' will cause the `%I%' keyword not to be expanded, but the
`%A%' keyword is still fully expanded, even though it is defined in
terms of `%I%'.
File: cssc.info, Node: Included Excluded and Ignored deltas, Prev: Keyword Substitution, Up: get
3.6 Included Excluded and Ignored deltas
========================================
This section describes how included, excluded and ignored deltas are
handled by CSSC. Little documentation is available on how SCCS handles
this, and so while this section describes how CSSC works, it may in
fact not be an accurate description of how CSSC _should_ work.
If you spot a defect in this section (or of course any other section)
of the CSSC manual, please report this as a bug (*note Reporting Bugs:
Problems.).
3.6.1 The Usual Case
--------------------
The usual case is where none of the deltas in the SCCS file has any
included, excluded or ignored deltas. All the lines in the body of the
SCCS file are there because they were first inserted by a particular
delta. All of these lines are copied through to the gotten file,
unless they are deleted by a later delta. For example if an SCCS file
contains deltas 1.1 and 1.2, then all the lines from delta 1.2 will be
included, and all the lines from delta 1.1 which are not deteled in
version 1.2 are also included.
3.6.2 Included Deltas
---------------------
Normally the contents of the gotten delta is included in the output,
along with all the non-deleted lines of its ancestors. However, a
delta can also specify that some other delta should be included. This
really only makes a difference when there is a branch in the file.
For example, if delta 1.5 includes 1.3.1.5, then the gotten file will
include the contents of versions 1.1 through to 1.5, plus the contents
of the 1.3.1 branch up to and including 1.3.1.5. Lines which were
(say) added in 1.2 but delted in 1.3.1.1 will not appear in the output,
since we have included a delta that deletes them.
3.6.3 Excluded Deltas
---------------------
Excluding a delta is, unsurprisingly, more or less the opposite of
including one. The exclusion of a delta supercedes the inclusion of a
delta. One might specify, for example, that delta 1.6 should exclude
delta 1.5 (for example to back out of any changes it made). Exclusion
can also be used to reverse the effect of an inclusion. Suppose that
delta 1.6 in the example from the section above excludes 1.3.1.5, then
1.6 will include the contents of deltas 1.1 through to 1.4, plus the
contents of delta 1.5 itself, but it will not include the data from the
1.3.1 branch that would have been used if we had gotten delta 1.5.
3.6.4 Ignored Deltas
--------------------
Ignored deltas are "silent"; that is, lines which are added by a delta
which is (explicitly or implcitly) included will not appear in the
gotten file. Conversely, lines deleted by an ignored delta will still
appear in the gotten file.
File: cssc.info, Node: help, Next: prs, Prev: get, Up: Invoking CSSC Programs
3.7 `help'
==========
This module is not implemented, and it probably will never be, because
it exists to translate the sometimes obscure error messages produced by
(genuine) SCCS. These messages come with identifying codes (like
"(ge4)"); one might type `help ge4' to translate an obscure message
into a more readable message detailing what has gone wrong. The
problem with this approach is that it results in a program called
`help' on the user's path. When a naive user types `help' they are
probably not looking for an explanation of an obscure message from
SCCS. In fact, `help' is in any case a shell builtin for GNU Bash.
Explanations of any obscure or unusual error messages belong in this
manual, and so no `sccs-help' program is provided or planned.
File: cssc.info, Node: prs, Next: prt, Prev: help, Up: Invoking CSSC Programs
3.8 `prs'
=========
The `prs' command (mnemonic: "print revision summary") prints
information about an SCCS file in a user-defined format. There are
options for selecting which deltas are reported on; selection is
possible by check-in time or by SID. The format of the output can also
be specified on the command line. All parts of an SCCS file can be
dumped with `prs'. Those parts which appear once per delta can be
uniquely identified by SID or by time.
Typical uses for `prs' are
* Producing an audit trail of who changed what, and why, for example
for a software release report, or for ISO 9000 documentation.
* Discovering how a particular piece of code became broken, and
deducing which change broke it. The `get -m' command is also
useful for this, see *note Options for `get': get options.
* Listing all changes made on Friday afternoons, as a preparation for
extra checking.
* Menu:
* Basic Usage: prs usage. Frequently-used `prs' commands
* Options: prs options. Full list of options
* Keywords: Data Keywords. Data Keyword Substitution
File: cssc.info, Node: prs usage, Next: prs options, Up: prs
3.8.1 Basic Usage for `prs'
---------------------------
Here are some examples of the use of prs, with explanations of what they
do.
`prs s.myfile.c'
Show information about all the versions of `myfile.c'.
`prs SCCS'
Show information about all the SCCS files in the directory `SCCS'.
`prs -e -d:P: s.main.c | sort -u'
Show which users have made changes to main.c.
`prs -l -c`date +%y%m%d --date "last week"` SCCS'
Examine all the SCCS files in the directory `SCCS'. Show any deltas
that have been created since last week.
File: cssc.info, Node: prs options, Next: Data Keywords, Prev: prs usage, Up: prs
3.8.2 Options for `prs'
-----------------------
`-a'
Include even removed deltas in the output. Removed deltas have a
type "R", as output by the :DT: keyword.
`-c[CC]YYMMDDHHMMSS'
Specifies the time of the "cutoff". When this option is given, the
delta selected by `prs' is the last one checked in before the
cutoff. As usual, any fields left unspecified in the cutoff are
given the maximum legal value (for example, the seconds field
defaults to 59). The fields can be separated by any non-numeric
character, for example `-c97/11/02-11:25:42'.
As an extension specific to CSSC, if the argument contains more
than twelve (12) digits, and the first four characters are all
digits, it is assumed that a four-digit year form has been used.
This means that you can say `-c1997/11/02-11:25:42' to mean the
same as the above.
In line with the X/Open CAE Specification, Commands and Utilities
(version 2, September 1994, pages 588 and 361), if the century
field is _not_ given and the year is less than 69, it is assumed
to be a year in the twenty-first century. The X/Open document
does not mandate a four-digit year specifier, but it would not
make sense to apply this rule if a four-digit year is specified.
*Note Year 2000 Issues::.
This behaviour is usually not the one required, and hence the `-e'
or `-l' options are specified too.
`-dFORMAT'
This specifies the data format for the output. Because the default
output format is sensible, this is typically used either in a shell
script which will process the output further, or by a human to
retrieve information which is not shown by default. See *note
Data Keywords:: for the various keywords that can be used. Any
characters in the data format which are not part of a keyword are
output as well.
If one specifies the `-d' option, `prs' by default only gives
information about the latest delta. To restore the default
behavior of showing all the deltas, use the `-e' option as well.
`-e'
Makes the `-c' option select deltas created at or earlier than the
specified time. Makes the `-r' option select deltas before and
including the one specified by the indicated SID.
`-l'
As the `-e' option, but select only later deltas rather than
earlier ones.
`-rSID'
Specifies the SID for which information is provided. If blank, the
latest delta is selected.
File: cssc.info, Node: Data Keywords, Prev: prs options, Up: prs
3.8.3 Data Keywords for the `-d' option of `prs'
------------------------------------------------
3.8.3.1 Global Keywords
.......................
These keywords expand to the same thing, no matter which version is
being examined. Many of these are SCCS file flags (*note Flags::).
`:BD:'
Emits the body of the SCCS file, that is, the part containing all
the delta information. Note that since this is dumped verbatim, it
contains control characters. If you want a more readable format,
consider using the `-b' option of `prt' (*note prt options::).
`:BF:'
Indicates the setting (`yes' or `no') of the branch flag.
`:CB:'
Indicates the value of the release number ceiling flag.
`:Ds:'
The default SID to check out (See *note Flags:: and *note get::).
`:F:'
Name of the SCCS file.
`:FB:'
Indicates the value of the release floor boundary flag.
`:FD:'
File descriptive text (*note admin::).
`:FL:'
List of SCCS file flags.
`:J:'
Value (`yes' or `no') of the joint-edit flag.
`:KF:'
Value (`yes' or `no') of the keyword-warning flag (*note admin::).
`:LK:'
Value of the locked-releases flag.
`:M:'
The module name (the value of the `m' flag).
`:MF:'
The value (`yes' or `no') of the MR validation flag (*note
delta::).
`:MP:'
The value of the MR validation program flag (*note delta::). This
is usually the name of an executable file.
`:ND:'
The value of the null-delta (`n') flag (`yes' or `no').
`:Q:'
The value of the (user-defined) Q flag (arbitrary one-line text).
`:PN:'
The full path name of the SCCS file.
`:UN:'
List of users authorised to make deltas to this file (one per
line). This list can be modified with the use of the options `-a'
and `-e' of `admin'; if this list is empty, any user is allowed to
use `delta' on this file (subject to the usual file permissions
checks made by the operating system). However, in this case the
`UN' data keyword somewhat curiously expands to `none'.
`:Y:'
Value of the module-type flag.
The `:BD:', `:FD:', `:FL:' and `:UN:' keywords from this section may
expand to strings containing newlines.
3.8.3.2 Version-specific Keywords
.................................
These keywords expand to data that is specific to a particular version.
`:A:'
Expands to `:Z::Y: :M: :I::Z:', useful for `what'.
`:B:'
Branch number of SID
`:C:'
Comments for this delta. These may extend over several lines.
`:D:'
Date (yy/mm/dd) that this version was checked in. Expands to
`:Dy:/:Dm:/:Dd:'. The year is always represented as two digits but
is not ambiguous since the two-digit year is no later than 2068
(*note Year 2000 Issues::).
`:Dd:'
Day-of-month on which the delta was checked in (two digits).
`:Dg:'
Sequence numbers of ignored deltas (separated by white space).
`:DI:'
Expands to `:Dn:/:Dx:/:Dg:' (sequence numbers
included/excluded/ignored).
`:DL:'
Expands to `:Li:/:Ld:/:Lu:' (lines inserted/deleted/unchanged).
`:Dm:'
Month when this version as checked in (two digits).
`:Dn:'
Sequence numbers of included deltas (separated by white space).
`:DP:'
Sequence number of the delta that precedes this one.
`:DS:'
Sequence number of this delta.
`:Dt:'
Expands to `:DT: :I: :D: :T: :P: :DS: :DP:'.
`:DT:'
Delta type: `R' (removed) or `D' (normal).
`:Dx:'
Sequence numbers of excluded deltas (separated by white space).
`:Dy:'
Year when this version was checked in. The year is always
represented as two digits but is not ambiguous since the two-digit
year is no later than 2068 (*note Year 2000 Issues::).
`:GB:'
The body for this version, as distinct from the body of the SCCS
file itself, which is obtained with `:BD:'. Keyword expansion
will be performed in the same way as if `get' had been used.
`:I:'
The SID of this version.
`:L:'
The level component of the SID (that is, the second number).
`:Ld:'
Number of lines deleted in this version, with respect to its
predecessor.
`:Li:'
Number of lines inserted in this version, with respect to its
predecessor.
`:Lu:'
Number of lines unchanged in this version, with respect to its
predecessor.
`:MR:'
The MR numbers specified when this delta was created.
`:P:'
Perpetrator: the login name of the user who created this delta.
`:R:'
The release number of the SID (the first number).
`:S:'
The sequence number of the SID. Don't confuse this with the delta
sequence numbers (*note Delta Table::), which are internal
identifiers for deltas which are output by the keywords :DI:,
:Dn:, :Dx: and :Dg:.
`:T:'
Time that this version was checked in (`:Th:::Tm:::Ts:').
`:Th:'
Hours component of check-in time (`:T:').
`:Tm:'
Minutes component of check-in time (`:T:').
`:Ts:'
Seconds component of check-in time (`:T:').
`:W:'
Shorthand for `:Z::M::I:', suitable for `what' (*note what::).
`:Z:'
Expands to `@(#)' (*note what::).
The `:C:', `:GB:' and `:MR:' keywords from this section may expand
to strings containing newlines.
File: cssc.info, Node: prt, Next: rmdel, Prev: prs, Up: Invoking CSSC Programs
3.9 `prt'
=========
The `prt' command provides information about an SCCS file without
modifying it. There are many options, though the default behaviour is
usually appropriate. It is possible to select what revisions to print
information on, by SID or by date.
Some SCCS implementations lack the `prt' command, though none lack
the `prs' command (*note prs::) which is otherwise quite similar.
* Menu:
* Basic usage: prt usage. Frequently-used `prt' commands
* Options: prt options. Full list of options
* Output format: prt output. The format of `prt''s output
File: cssc.info, Node: prt usage, Next: prt options, Up: prt
3.9.1 Basic usage for `prt'
---------------------------
The output provided by `prt' when no options are given is sufficient
most of the time, and so it's common to use it without any options:-
prt s.umsp.c
The default output contains slightly more information than the output
of `get -L'. If you require more detail, the `-e' ("everything")
option produces more detail:-
prt -e s.umsp.c
As usual, any argument that is the name of a directory causes all SCCS
files in that directory to be processed; the special argument `-'
indicates that a list of SCCS files are to be read from `prt''s
standard input.
File: cssc.info, Node: prt options, Next: prt output, Prev: prt usage, Up: prt
3.9.2 Options for `prt'
-----------------------
`-a'
"All deltas"; this means that the output will include "removed"
deltas. Removed deltas exist after `rmdel' has been used to remove
a delta.
`-b'
Print the body of the SCCS file. This is printed in a readable
format. The control character `^A' (Control-A, ASCII code 1) which
starts some lines of an SCCS file is printed as three asterisks,
`***'. Lines that do not start with the control character are
indented by one tab stop. For encoded (binary) files, the encoded
form of the file data is printed (this is what actually appears in
the SCCS file itself). If you want to extract the actual body of
the SCCS file, use the `:BD:' keyword of `prs' (*note Data
Keywords::.
`-d'
Print information about the deltas in the file, as opposed to
information about the SCCS file itself (for example the authorised
users). This is the default behaviour. The default behaviour is
turned off by the `-b', `-f', `-t' and `-u' flags, but specifying
`-d' on the command line again will ensure that the delta
information is printed.
`-e'
"Everything"; Means the same as `-i -u -f -t -d'.
`-c[CC]YYMMDDHHMMSS'
Specifies the time of the "cutoff". When this option is given,
`prt' stops printing delta information when it reaches a SID at
least as old as the cutoff. As usual, any fields left unspecified
in the cutoff are given the maximum legal value (for example, the
seconds field defaults to 59). The fields can be separated by any
non-numeric character, for example `-c97/11/02-11:25:42'.
As an extension specific to CSSC, if the argument contains more
than twelve (12) digits, and the first four characters are all
digits, it is assumed that a four-digit year form has been used.
This means that you can say `-c1997/11/02-11:25:42' to mean the
same as the above.
In line with the X/Open CAE Specification, Commands and Utilities
(version 2, September 1994, pages 588 and 361), if the century
field is _not_ given and the year is less than 69, it is assumed
to be a year in the twenty-first century. The X/Open document
does not mandate a four-digit year specifier, but it would not
make sense to apply this rule if a four-digit year is specified.
*Note Year 2000 Issues::.
The `-c' and `-r' options are mutually exclusive.
`-f'
Print the flags of the SCCS file (*note Flags::).
`-i'
Print the serial numbers of included, excluded, and ignored deltas.
`-r[CC]YYMMDDHHMMSS'
Specifies a cutoff, as with the `-c' option, but with the opposite
sense; that is, nothing is printed for deltas that are more recent
than the indicated time.
The `-c' and `-r' options are mutually exclusive.
`-s'
Print only a summary line for each delta (that is, the MR list and
comments and so on are omitted).
`-t'
Print the text description of the SCCS file, as set by `admin -t'
(*note admin::).
`-u'
Print the list of users and group IDs authorised to make deltas,
one per line.
`-ySID'
Print only information for deltas as new as the specified SID. If
the argument part is empty, that is, the option used is simply
`-y', the most recent delta is selected. The oder in which delta
information is stored within the SCCS file is such that the SID
selected by this option will be the last one printed.
If the `-y' option is used in conjunction with either the `-c' or
the -Y option, processing stops when either condition (date or SID
match) is satisfied.
File: cssc.info, Node: prt output, Prev: prt options, Up: prt
3.9.3 `prt' output format
-------------------------
The output format is fixed, though parts of the output can be omitted.
1. The header
* Newline
* SCCS file name, followed by a colon
* Two further newlines.
2. Delta table information (for `-d', `-e', also the default, but
not if `-b', `-f', `-t', `-u' are specified). This section is
printed once for each selected delta.
This begins with a newline as a separator (except when a cutoff is
being used, in which case the SCCS file name is used, followed by
a colon and a TAB character).
* Delta type
'R' for removed deltas (*note rmdel::), and 'D' for ordinary
ones.
* TAB
* Delta creation time (YY/MM/DD hh:mm:ss)
* The login name of the user who created this delta
* Sequence number of this delta
* Sequence number of the previous delta
* Line statistics `inserted/deleted/unchanged'. These
statistics are capped at 99999, due to a limitation in the
file format.
* Newline
3. Delta detail information
This section is printed once for each selected delta, unless the
`-s' option has been specified.
* Included deltas
* Excluded deltas
* Ignored deltas
* MR numbers
* Delta comments
4. Global information
Once information has been printed for each of the selected deltas,
the global information is printed. This consists of
* List of authorised users and group IDs (if the list is blank,
`everyone' is printed)
* The SCCS file flags (*note Flags::) are printed.
* The description of the SCCS file is printed (this is
the description set by the `-t' option of `admin').
* The body of the SCCS file is printed, in a readable format.
The control character `^A' that begins some lines is
printed as `*** ', and other lines are printed indented
by one tab stop. Other than that, the body is printed
as found in the SCCS file. This means that binary
files are left encoded.
File: cssc.info, Node: rmdel, Next: sact, Prev: prt, Up: Invoking CSSC Programs
3.10 `rmdel'
============
The `rmdel' ("Remove Delta") command allows the last version last
checked in to an SCCS file to be removed again. Typically, one does
this after realizing that newly checked in version doesn't compile, or
doesn't work, and the fix is simple. In the author's opinion, it's
almost always better to be honest about mistakes, and just make a new
delta for the fixed version.
The SID of a removed delta is soon re-used by `delta', usually for
the fixed version.
The `rmdel' command takes only one option, `-r', which specifies the
SID of the version to be removed. This option is mandatory.
The `rmdel' command will fail if you hadn't checked in that
revision, or if it is in use in some way. For example, `rmdel' fails
if the specified SID is not the latest revision on its branch, or if it
has been checked out for editing.
As usual, any number of SCCS files can be named on the command line.
The special argument `-' indicates that the list of files to be
operated on should be read from standard input. If an argument is a
directory, the RMDEL command is applied to all SCCS files in that
directory.
File: cssc.info, Node: sact, Next: sccs, Prev: rmdel, Up: Invoking CSSC Programs
3.11 `sact'
===========
The `sact' ("Show Editing Activity") command provides a summary of
which files are currently checked out for editing. For each
checked-out file, a summary line is given. This line is of the form
`old-SID new-SID user date time'.
`old-SID'
Identifies the revision that was checked out for editing.
`new-SID'
This is the SID that will be allocated by `delta' when the working
file is checked in again.
`user'
The login name of the user who checked out the file.
`date time'
The date and time at which the checking-out was done.
No output is produced for SCCS files that are not currently locked
for editing. If a directory is specified on the command line, the whole
directory is examined. Directory hierarchies are not descended beyond
this one level. If `-' is given as an argument, filenames are read
from standard input.
Note that times in SCCS files (and lock-files) are stored as local
time, so if you are collaborating with developers in another time zone,
the date shown will be in their local time for files that they are
editing.
File: cssc.info, Node: sccs, Next: sccsdiff, Prev: sact, Up: Invoking CSSC Programs
3.12 `sccs'
===========
The `sccs' utility is available with `CSSC'. The code has been adapted
to support GNU Autoconf, but it should function in the same way. The
only difference between the operation of the original BSD `sccs'
program and that of the one provided by `CSSC' is that way that the
called programs are searched for. While the original program has the
paths hard-coded in as `/usr/sccs/*', the version accompanying `CSSC'
first searches for them on the PATH, and then falls back on
`/usr/sccs/*'. If the executable is running set-user-id, the `PATH'
environment variable is ignored. The `sccs' program itself should be
fairly secure, but the other programs in the suite are not. *Note
Known Problems::, for more information.
The `sccs' program is documented in its online manual page, and also
in `An Introduction to the Source Code Control System' by Eric Allman,
a copy of which is included with this suite.
Unlike all the other parts of the suite, the `sccs' program and its
accompanying documentation are covered by the BSD copyright license; see
*note BSD Code::, and the file `COPYING.bsd', for more information.
The original BSD version of the `sccs' program can easily be found
on BSD mirrors, for example `ftp://ftp.freebsd.org/'.
File: cssc.info, Node: sccsdiff, Next: unget, Prev: sccs, Up: Invoking CSSC Programs
3.13 `sccsdiff'
===============
The `sccsdiff' command compares two revisions stored in an SCCS file,
using the system utility `diff'. Options can be passed on to `diff',
for example to set the output format. As with the other utilities in
the suite, `sccsdiff' will operate on a list of s-files, but unlike
most of the others, it will not process directories named on the
command line.
If you wish to compare the working copy of a file with a version
stored in the s-file, you should use the command `sccs diffs' (*note
sccs::).
The options for `sccsdiff' are described below.
`--help'
This option is provided by CSSC but not by other SCCS
implementations. It briefly describes the usage of the program.
`--version'
Indicates the version information for the `sccsdiff' program.
`-p'
The differences are piped through pr, rather than just being output
directly.
`-rSID'
This option is used to select a revision from the s-file. It
must be specified exactly twice, in order to select a pair of
revisions to compare.
All other options not appearing above are passed on to the `diff'
program. All the non-option arguments will be processed in turn as
SCCS files.
File: cssc.info, Node: unget, Next: val, Prev: sccsdiff, Up: Invoking CSSC Programs
3.14 `unget'
============
The `unget' command is used to reverse the effect of `get -e'.
Typically you might do this when you embark on an edit of a file, and
it all goes horribly wrong. Using `unget' allows you to revert to a
previously-known state. In fact, if you have exercised some care in
checking in new revisions, perhaps using a test suite, then `unget' can
be used to return you to the last working version.
3.14.1 Options for `unget'
--------------------------
`-n'
Do not delete the g-file which you were editing
`-s'
Operate silently
`-rSID'
When joint editing is enabled (*note Flags::), several versions
may be checked out for editing. If this is the case, SID must be
used to indicate which edit is to be aborted.
File: cssc.info, Node: val, Next: what, Prev: unget, Up: Invoking CSSC Programs
3.15 `val'
==========
The `val' command is used to validate a (possibly suspect) SCCS file.
If an SCCS command reports that the checksum of an SCCS file is
incorrect, this may mean that the file has been corrupted. In this
case, `val' may help to confirm this (but *note Why val doesn't solve
the whole problem: Paranoia.).
Example usages:-
val s.foo
val -mfoo s.foo
val -r1.2 s.foo
val s.foo s.bar SCCS/s.*
val /proj/python/spam/spam/eggs/spam
* Menu:
* Options for val:: Full list of options
* Validation Warnings:: Some potential problems result in warnings
* Return Value:: What val's return value means
* Paranoia:: Why your file might still be corrupt
File: cssc.info, Node: Options for val, Next: Validation Warnings, Up: val
3.15.1 Options for `val'
------------------------
`-mNAME'
Assert that the module name flag of the SCCS file is set to NAME.
The return value of VAL will be zero only if all the other checks
succeed and the history file has its module name flag set to this
value. *Note Flags::, for a description of the SCCS file flags.
`-s'
Silent operation; suppress any error or warning messages that would
otherwise be emitted; the return value of the program will still
indicate the existence and general nature of any problems.
`-V'
Display version information . This option does not exist in the
traditional SCCS implementation.
`-rWANTED'
Validation will succeed if the SID WANTED is valid, unambiguous,
and present in the history file.
`-yTYPE'
Assert that the module type flag of the SCCS file is set to TYPE.
The return value of VAL will be zero only if all the other checks
succeed and the history file has its module name flag set to this
value. *Note Flags::, for a description of the SCCS file flags.
File: cssc.info, Node: Validation Warnings, Next: Return Value, Prev: Options for val, Up: val
3.15.2 Validation Warnings
--------------------------
Some possible problems with SCCS files are not definitively errors. In
these situations, `val' will emit a warning message but the validation
will not fail (that is, if there are no other problems the return value
will be zero). An explanation of the possible warnings appears below.
WARNING: date for version 1.1 is later than the date for version 1.2
This message indicates that a delta exists in the history file
where the "parent" delta has a delta creation time which is later
than the creation time of the "child" delta. This is a warning
only because the delta creation time is measured in local time,
and so if two developers with different time locale settings both
edit the file in a short period of time, this can happen. If all
the developers who create deltas in a history file use the same
timezone settings, this should not happen.
Some versions of SCCS, but not CSSC exhibit a peculiar behaviour
in these circumstances, and do not include in the gotten file any
lines apparently inserted after the date of the delta which has
been selected. This applies to `get' but more importantly also
applies to the temporary file generated by DELTA which is compared
with the working copy of tyhe file. Once this has happened there
is no way to recover from this problem other than to hand-edit the
SCCS file.
Unknown special comment intro
This message is displayed when a "c" control line is seen in the
body of the SCCS file in which the initial "c" is not followed
immediately by a space. Lines of this type are used as an
extension mechanism by some other SCCS implementations, notably the
_BitKeeper_ suite, and CSSC knows about this, but if it sees a
construction it doesn't recognise, this warning is issued.
The 'y' flag specifies a keyword letter 'X' but %X% is not a recognised SCCS keyword
This message is displayed when the `y' flag of the SCCS file is
set to a value which includes a keyword letter which is not known.
This is harmless unless you intended to set the flag to some other
value. *note Flags::.
File: cssc.info, Node: Return Value, Next: Paranoia, Prev: Validation Warnings, Up: val
3.15.3 Return Value
-------------------
The value returned by the `val' program depends on the outcome of the
validation as follows :-
0
Validation succeeded. No problems were detected. A small number
of potential problems may exist without causing a non-zero return
value; see *note Validation Warnings::, for more information.
1
The `-m' option was used but the module name did not match.
2
The `-y' option was used but the module type did not match.
4
The `-r' option was used but the specified SID was ambiguous, or
not present in the history file.
8
The `-r' option was used but the specified SID was invalid.
16
Either the named file could not be opened, or it is not an SCCS
history file.
32
The history file is corrupt.
64
An invalid option letter was used on the command line.
128
One of the files named on the command line was not present.
File: cssc.info, Node: Paranoia, Prev: Return Value, Up: val
3.15.4 Why val doesn't solve the whole problem
----------------------------------------------
Things that paranoid people might bear in mind are
* Not all accidental changes to an SCCS file will necessarily make
the file invalid.
* Since the checksum of an SCCS file is of finite length, there is a
finite (though small) chance that a random change will not be
detected by the checksum
* If data is corrupted in the memory of a program, then the program
will write the incorrect data out to the history file and set the
checksum accordingly (in other words, an on-disk checksum only
protects the data while it is on the disk).
* Even if `val' concludes that a history file is structurally valid,
this does not mean that the file contains what you thought it did
(for example, perhaps the file was corrupted by having another,
valid, SCCS file copied over it, or perhaps it was overwritten by
an old backup version).
* Consumer-grade hardware (for example commodity PCs) generally lacks
error-correcting memory.
Things that an optimistic person might bear in mind are
* The chances of a random change simultaneously fooling the checksum
and the checks that `val' does are very small indeed.
* Hardware failures rarely cause file corruption. The use of ECC
memory substantially reduces your changes of having undetected data
corruption.
* When CSSC operates on an SCCS file, most of the checks that `val'
performs are done anyway (CSSC differs slightly in this respect
from the traditional SCCS toolset).
The summary is that it is theoretically possible to fool the
integrity checks performed by the SCCS file checksum and by `val' but
the checksum isn't fooled often and the chances of fooling both
together are very small. The use of quality hardware reduces the
chance of data corruption yet further.
File: cssc.info, Node: what, Prev: val, Up: Invoking CSSC Programs
3.16 `what'
===========
The `what' program is designed to search in files for the recognition
string `@(#)'. All the strings it finds matching this are printed on
standard output.
The exit status of `what' if zero is a matching string as found, and
1 otherwise.
3.16.1 Options for `what'
-------------------------
`what [-s] [-V] file [file ...]'
`-s'
Exit successfully after finding the first string.
`-V'
Show version information for `what'.
3.16.2 Example
--------------
While the file is being edited (either at first or after `get -e'):-
#ifndef CONFIG_NO_SCCS_IDS
static const char sccs_id[] = "%W%";
#endif
When the file is checked out for compiling (with `get'):-
#ifndef CONFIG_NO_SCCS_IDS
static const char sccs_id[] = "@(#)foo.c 1.3";
#endif
After compiling:-
$ what foo
foo:
foo.c 1.3
If the executable is linked from several source files, you will get a
line of output for each string containing the identification string
`@(#)'. This is useful for finding out exactly what code went into an
executable. This technique also works on object files, archive
libraries, text files, and in fact any sorts of files at all.
Unlike the `strings' command, there is no way to make `what' operate
on standard input. The data would need to be written to a file first.
The rationale for the preprocessor construct `CONFIG_NO_SCCS_IDS' is
that sometimes compilers or lint-pickers complain that the variable
SCCS_ID is unused, and defining `CONFIG_NO_SCCS_IDS' will remove these
IDs and thus silence the warnings.
File: cssc.info, Node: Filenames, Next: File Format, Prev: Invoking CSSC Programs, Up: Top
4 Filenames
***********
Temporary files are used during normal operation of CSSC (and SCCS).
Many of these are given fixed names. The prefixes for the various
files used by CSSC are listed in the table below.
`s.'
The history file itself.
`l.'
The delta summary file created by `get -l'. Unlike the other
files in this table, the l-file is created in the current
directory.
`p.'
The file containing the list of edit locks.
`z.'
The lock file used to arbitrate access to the history file. The
running CSSC (or SCCS) program puts its PID into this file. Some
versions of SCCS (but _not_ CSSC) will break the lock after 60
seconds if the specified PID is not running on the local machine.
In order to work more reliably over networked file systems, CSSC
will not do this; stale lock files would have to be removed
manually.
`x.'
Temporary file into which is written the new s-file. Once
processing is complete, the old s-file is replaced by the x-file.
`q.'
Temporary file into which is written the new p-file
`d.'
Temporary file used by delta; contains the gotten body of the
previous version (which we run diff against). This filename is
used by SCCS in the same situation, but according to the SCCS
manual pages, it puts the output of `diff' in this file instead.
`u.'
Encoded version of the gotten file; created by delta.
Except for the l-file, all of the temporary files in the above table
are created in the same directory as the s-file. The l-file is created
in the current working directory.
Since these filenames are always fixed, it is important that the
permissions on the directory containing the SCCS file be secure;
otherwise you have a security vulnerability where a malicious user can
cause you to accidentally over-write files you own or have access to,
but they do not. If you are the super-user, they can use this feature
to overwrite any file on the system.
File: cssc.info, Node: File Format, Next: Interoperability, Prev: Filenames, Up: Top
5 File Format
*************
This chapter provides a description of the format of SCCS files. It is
_not authoritative_, and may not match some of the peculiarities of
your vendor's implementation.
* Menu:
* File Format Overview:: An overview of the file format
* The Header:: Format of the header of SCCS files
* The Body:: Format of the body of SCCS files
File: cssc.info, Node: File Format Overview, Next: The Header, Up: File Format
5.1 Overview
============
An SCCS file contains two parts, the header and the body. The header
contains information about both the file as a whole and also
information about each version stored in the file. After this comes the
body itself, which is a stream of fragments from the controlled file
interspersed with control information which indicates which versions
these fragments appear in.
Most of the control information for SCCS files appears on lines
which are marked as special by the character whose value is 1 (ASCII
SOH); this is usually referred to as `^A'. Lines in SCCS files always
end with a line feed (ASCII LF) rather than a carriage return (ASCII
CR) followed by a line feed.
File: cssc.info, Node: The Header, Next: The Body, Prev: File Format Overview, Up: File Format
5.2 The Header
==============
There are several parts to the SCCS file header:-
* Menu:
* Checksum Line::
* Delta Table::
* Authorised User List::
* Global Flags Section::
* File Description::
* Example Header::
File: cssc.info, Node: Checksum Line, Next: Delta Table, Up: The Header
5.2.1 Checksum
--------------
The first line of an SCCS file contains the checksum, preceded by
`^Ah'. The checksum is in decimal and is generated by adding together
the values of all the characters in the file, and taking the result
modulo 65536. A checksum line might look like this:-
^Ah36650
On systems whose C implementation considers the `char' type to be
unsigned, characters with their highest bit set appear to be considered
positive, and on machines with a signed `char' type, these characters
appear to be considered negative. This seems to mean that these two
types of machines will not agree on the correctness of an SCCS file's
checksum.
The _BitKeeper_ suite uses `^AH' to introduce its checksum line
rather than `^Ah', but the checksum is computed in the same way.
File: cssc.info, Node: Delta Table, Next: Authorised User List, Prev: Checksum Line, Up: The Header
5.2.2 The Delta Table
---------------------
The checksum is followed by the delta table. Each entry describes one
version stored in the history file, and is composed of three lines plus
some comment lines. The first line introduces a new delta table entry
and has the form
`^As 00001/00000/00010'
The three numbers represent the numbers of lines inserted, deleted
and unchanged in this version (with respect to its predecessor). For
the oldest version in the history file, the numbers of lines deleted and
unchanged should be zero and the number of lines inserted is the number
of lines in the initial version of the working file. These numbers are
always five digits long. If the true count of inserted, deleted or
unchanged lines is greater than 99999, then the fields will still only
contain 99999.
The second line has the form
`^AD 1.5 68/12/31 23:59:59 james 5 4'
Here, the `D' indicates that this is a normal delta. The only other
type of delta is the removed delta. Removed deltas are created with
the `rmdel' program and are labelled with an `R' instead of a `D'.
This is followed by the SID, which will have either two or four fields
separated by a decimal point (ASCII code 46 decimal). A SID with only
two fields (release and level) is said to be on the trunk of the
revision tree. A SID with the full four fields (the last two are the
branch number and the sequence number) is said to be a "branch
revision". Each field in the SID, if present, must contain a positive
integer no larger than 9999. This means that `1.0' would not be a
valid version number, for example.
The third and fourth fields on this line are the date and time at
which this delta was added to the history file (rather than, for
example, the modification time of the working file which was checked
in). The year is represented with only two digits, and is deemed to be
in the range 1969 to 2068 (*note Year 2000 Issues::). Despite having
only two year digits, the date is in ISO order (year/month/day). The
time is indicated using 24-hour clock notation. The date in the above
example is the latest date it is possible to represent in an SCCS file.
The fifth field is the name of the user who checked this version in.
For the gratification of pedants, it should be noted that this is the
name associated with the _actual_ user-id rather than the _effective_
user-id, or the name appearing in the system log as the user who logged
in on the controlling terminal.
The final two fields are called "delta sequence numbers", or
"seqnos". They are for the internal use of the implementation and
should not be confused with "sequence numbers", which are the final
fields of four-field ("branch") SIDS. The seqno of the delta added
last will be larger than that of any other delta. Each delta has a
unique seqno. The first of these two fields is the seqno of this delta
itself, and the second field is the seqno of its predecessor (that is,
the version which had been checked out with `get -e'). The seqno 0 is
special and appears only as the (nonexistent) predecessor of the first
delta.
Since the delta table entries appear in reverse order of addition
(i.e. new entries are always added at the top), the initial delta
appears at the foot of the delta table. Many of the SCCS utilities
define their cutoffs in such a way that they can stop traversing the
delta table when they find a delta which is too old.
After the `^Ad' line there may be several lines which indicate lists
of included, excluded or ignored sequence numbers for this delta. I
don't understand this area of the functionality of SCCS very well, so
any description here may be vague or incorrect. The CSSC
implementation may also be incomplete in this area.
The list of included seqnos is introduced with `^Ai', the excluded
seqnos with `^Ax', and ignored seqnos with `^Ag'. These are followed
by a space character, and then the list itself, which is a
space-separated list of integers.
If the MR-validation flag (*note Flags::) was turned on at the time
of the creation of this delta, one or more lines of the form
^Am mr1
^Am mr2
^Am mr3
^Am mr4
may occur. These lines constitute a list of Modification Request
Numbers, one on each line.
The next part of the delta table entry is the delta commentary.
This comment is intended to contain a description of the changes made in
this delta, and is written and read by humans. This may extend over one
or many lines, each introduced with `^Ac', like this:-
^Ac The end of the world
^Ac as we know it
If there is no comment for a particular delta, because it was
suppressed with the `-y' option to `delta' or `cdc', or because the
user was presented with a prompt for comments but just typed the return
key, an empty `^Ac' control line will appear at this point.
CSSC is currently slightly incorrect in this area. If the comment is
suppressed with the `-y' option, it emits no `^Ac' lines at all.
The _BitKeeper_ suite uses comment lines of the form `^AcX' (where
`X' is a non-blank character) to store data which is specific to
BitKeeper. This data is ignored by CSSC, which provides read-only
support for BitKeeper files. These special lines are distinguished
from normal comment lines by the fact that there is no space after the
`c':-
^AcHathlon.transmeta.com
^AcK09043
^AcParch/arm/boot/Makefile
^AcRe1f91d8bfa21c521
^AcV4
^AcX0x821
^AcZ-08:00
Some SCCS files contain an MR list which follows rather than
precedes the comments for a delta, but this is unusual.
The comment block, and in fact the whole delta table entry, is
terminated by a control line of the form
^Ae
To illustrate this further, here are two more delta table entries
from an SCCS file:-
^As 00001/00000/00007
^Ad D 1.2 99/12/31 23:59:59 mcvoy 2 1
^Ac Added an extra line
^Ae
^As 00007/00000/00000
^Ad D 1.1 69/01/01 00:00:00 dmr 1 0
^Ac created at the dawn of time
^Ae
File: cssc.info, Node: Authorised User List, Next: Global Flags Section, Prev: Delta Table, Up: The Header
5.2.3 Authorised User List
--------------------------
Next, there is the list of authorised users, introduced by a `^Au'
line. Only users in the authorised users list can modify the SCCS
file. This list always appears (though many implementations will not
complain if you remove it with an editor) but is often empty. One user
login name appears on each line. Lines can alternatively contain
numbers, denoting whole groups of users (as listed in `/etc/group' on
many systems). The authorised-users list is terminated with a `^AU'
line. Some broken implementations emit lines of the form `^AU 0' here
instead; the polite thing to do is to ignore gaffes of this sort. This
is of course what CSSC does.
File: cssc.info, Node: Global Flags Section, Next: File Description, Prev: Authorised User List, Up: The Header
5.2.4 The Global Flags Section
------------------------------
The file flags section occurs after the authorised-users list. Each
file flag occurs on a separate line and are possibly followed by their
values (except the boolean flags, whose mere presence is sufficient).
These lines look like this:-
^Af f e 0
^Af f n
^Af f q Q-flag-value
^Af f v /bin/true
The `e' flag, if set to a nonzero value, indicates that the
controlled file is binary and is therefore stored in uuencoded form in
the file body. If this flag is set to zero or is missing, then the file
body is not encoded. See *note Flags:: for information about the other
possible flag letters and their meanings. See *note Interoperability::
for information about sharing SCCS files with other implementations of
SCCS.
The `e' flag is a boolean flag but is stored within the SCCS file
with a value, as shown in the example above. When CSSC initially
writes the SCCS file header for a new SCCS fiel created with `admin
-i', it does not know if the initial body of the file is binary or not,
so `^Af f e 0' is written into the header and if the file turns out to
need encoding, `admin' will seek back to the header and change `^Af f e
0' to `^Af f e 1'. If binary file support is disabled (*note Binary
File Support::, `^Af f e 0' is still used but will never be changed to
`^Af f e 1'.
The value for the `y' flag is stored as a space-separated list of
keyword letters, even though the letters were separated by commas when
they were passed to `admin -fy'. This flag is an extension introduced
by Sun Solaris 8. See *note Interoperability:: for a discussion of the
interoperability of CSSC with other SCCS implementations.
File: cssc.info, Node: File Description, Next: Example Header, Prev: Global Flags Section, Up: The Header
5.2.5 File Description
----------------------
The flags section is followed by the descriptive text for the history
file. This section is intended to contain text which might contain a
copyright statement, or might indicate the purpose of a file or contain
special instructions, and so on. This section starts with a `^At'
control line and is terminated with a `^AT' control line:-
^At
This is the blah blah...
... blah.
^AT
The `^AT' control line marks the end of the SCCS file's header. The
following line is the first line of the file body.
File: cssc.info, Node: Example Header, Prev: File Description, Up: The Header
5.2.6 Example SCCS File Header
------------------------------
This example also includes the file body, since the body is short.
^Ah38213
^As 00002/00000/00000
^Ad D 1.3 98/11/22 18:25:43 james 3 2
^Ax 2
^Am 99
^Ac This delta was produced using "get -e -x1.2 s.foo" and
^Ac then "delta s.foo".
^Ae
^As 00001/00000/00000
^Ad D 1.2 98/11/22 18:22:56 james 2 1
^Am mr1
^Am mr2
^Am
^Ac comment goes here.
^Ae
^As 00000/00000/00000
^Ad D 1.1 98/11/22 18:21:11 james 1 0
^Ac date and time created 98/11/22 18:21:11 by james
^Ae
^Au
^AU
^Af e 0
^Af n
^Af q UMSP
^Af v /bin/true
^At
Descriptive text
^AT
^AI 3
this delta was made from a working file which was gotten for editing
but excluded the delta named 1.2.
^AE 3
^AI 2
blurg
^AE 2
^AI 1
^AE 1
File: cssc.info, Node: The Body, Prev: The Header, Up: File Format
5.3 The Body
============
The body of an SCCS file is usually much longer than its header, but
contains fewer ingredients. It contains control lines, which signal
the beginning or end of a chunk of user data, and the user data itself.
If, for example, you added the text `I was here' to the controlled file
as a delta whose delta sequence number was 7, the history might contain
these lines:-
^AI 7
I was here
^AE 7
I currently have no clear understanding of the interaction of
excluded, included or excluded revisions with the normal check-in
processing. Hence I can't thoroughly explain the precise meaning of
the `^AI', `^AE' and `^AD' control lines. This section will be
completed at a future date. If you have an understanding of these
issues, please let me () know.
File: cssc.info, Node: Interoperability, Next: Environment, Prev: File Format, Up: Top
6 Interoperability
******************
This part of the CSSC manual describes how CSSC interoperates with
SCCS. For the enormous majority of cases, this occurs seamlessly;
however sometimes it is not possible for CSSC to pick "one right way"
to proceed unaided. Circumstances where this occurs are described in
detail, below.
In order to interoperate better with other implementations of SCCS,
the CSSC suite can also be configured to turn off several features
which provide flexibility beyond that which is available in some other
implementations of SCCS. Some other interoperability features of CSSC
exist to maintain compatibility but do not need to be turned off.
* Menu:
* Binary File Support:: Enabling or disabling support for binary files.
* Executable File Support:: Support for a SCO extension.
* BitKeeper:: Limited support for Bitkeeper files exists.
* Maximum Line Length:: Limiting the length of lines in the SCCS file.
* Limitations of diff:: Diff has limits too, on many non-GNU systems.
* Configuration:: Viewing the current configuration.
* Bug-for-Bug:: We go to great lengths to be compatible
* Incompatibilities:: Sometimes we cannot be fully compatible
* SCCS Version Differences:: Versions of SCCS behave inconsistently
* CSSC Extensions:: Behaviour which is specific to CSSC.
File: cssc.info, Node: Binary File Support, Next: Executable File Support, Up: Interoperability
6.1 Binary File Support
=======================
Binary file support can be turned off when you run "configure" by
specifying the `--disable-binary' option. This will cause `admin' to
refuse to create an SCCS file whose "e" flag is set (*note Flags::).
The `admin' program would normally do this if the user requested it via
the `-b' option or if it discovered that the file could not safely be
stored in the normal SCCS file format.
This setting can be overridden with the environment variable
`CSSC_BINARY_SUPPORT'; for a description of how to use this environment
variable, see *note Environment Variables: Environment.
If you use CSSC with support for encoded SCCS files turned off,
encoded files will still be handled; CSSC will just refuse to create a
new one. This provides as great a degree of interoperability with
other implementations of SCCS as possible.
File: cssc.info, Node: Executable File Support, Next: BitKeeper, Prev: Binary File Support, Up: Interoperability
6.2 Executable File Support
===========================
The support that CSSC provides for binary files allows the controlled
file to contain any sequence of bytes. That doesn't imply that the
controlled file is used for any particular purpose. For example, JPEG
files can contain non-ASCII acharacters.
This should be contrasted with support for _executable_ files, which
have a specific Unix file mode bit set (see the manual page for `chmod'
for more details). Unix executable files may or may not be binary
files. It's common to control shell scripts with CSSC, for example.
Shell scripts are normaly executable but not binary.
If the `x' flag is set, CSSC will generate a g-file whose execute
bits are set. This feature exists for compatibility with SCO
OpenServer's SCCS. Do not use this feature if you wish to interoperate
with other implementations of SCCS. Setting this flag with `admin -fx'
generates a warning about this.
File: cssc.info, Node: BitKeeper, Next: Maximum Line Length, Prev: Executable File Support, Up: Interoperability
6.3 BitKeeper
=============
Read-only support is provided for files produced by the BitKeeper
suite. Flags and information which are specific to BitKeeper is
ignored by CSSC. At the moment, it is not possible to turn off support
for BitKeeper files, but a warning message is issued when one is
encountered.
Actions on BitKeeper files that CSSC will not perform include
* get -e
* delta
* cdc
* rmdel
* Some options to admin
CSSC does not prevent the use of `unget' on BitKeeper files, because
`unget' does not examine the SCCS file header (and therefore has no way
to determine if the file is a BitKeeper file or not).
File: cssc.info, Node: Maximum Line Length, Next: Limitations of diff, Prev: BitKeeper, Up: Interoperability
6.4 Maximum Line Length
=======================
By default, CSSC enforces no line length limits. The CSSC tools will
correctly process input files containing lines of arbitrary length,
subject to the limits of available memory. The system command `diff'
may impose its own limit however; this is discussed below (*note
Limitations of diff::).
If you are working with a binary file (that is, the `-b' option to
`admin' was used when the history file was created), the encoding
mechanism used by CSSC (and those SCCS implementations that support
binary files) ensures that data is encoded before being stored in the
body of the history file, and so the "binary" file can contain any
sequence of bytes at all - the "line length" is no longer important.
Most other implementations of SCCS do however have an upper limit on
the maximum length of line that can be handled in a text file (that is,
those versions of SCCS which have such a limit do not apply this limit
for binary files). To set such a limit in CSSC, use the
`--enable-max-line-length=N' option to "configure". This sets the
limit to the specified value.
This setting can be overridden with the environment variable
`CSSC_MAX_LINE_LENGTH'; for a description of how to use this
environment variable, see *note Environment Variables: Environment. To
determine the current setting of the line length limit, run `admin -V'
and read the output.
If (and only if) you have configured CSSC with such a maximum line
length limitation, the lengths of input lines are checked as they are
being read. When CSSC is adding a new delta to an existing file, if it
finds an input line which is longer than N characters, it will fail
with an explanatory message (the alternative would be that an SCCS file
would be generated that could not be read by other implementations of
SCCS having a lower line length limit).
When CSSC is creating a new SCCS file in response to the `admin -i'
command, one of two things will happen when an over-length line is
found. If binary file support is enabled, the SCCS file will
automatically be created as an encoded file. Otherwise, `admin' will
fail with an explanatory message.
When the CSSC tools are reading a history file, the lines in the
SCCS file are not subject to the limits described above; that is, CSSC
imposes these limits on lines it puts _into_ the SCCS file, but not on
lines it reads _from_ the SCCS file. This means that the CSSC `get'
utility will cope with arbitrarily long lines in the SCCS file, even if
CSSC has been configured in sauch a way that `delta' would not put such
long lines into the history file.
File: cssc.info, Node: Limitations of diff, Next: Configuration, Prev: Maximum Line Length, Up: Interoperability
6.5 Limitations of diff
=======================
The `diff' utility may have limits on the lengths of lines that it can
process, though the GNU `diff' program has no such limits. This means
that if you are using CSSC in combination with a `diff' which has a
line length limit, that limit will apply to the operation of the CSSC
`delta' and `sccsdiff' programs (though not to any other component of
CSSC).
This kind of problem may cause `delta' to fail because the file you
are checking in contains an over-length line. However, because SCCS
files may be operated on by SCCS implementations that have different
upper limits, you might also find that the delta you checked out from
the history file already contained a line which is longer than can be
coped with by your `delta' utility. GNU CSSC can always be switched
back a mode in which there is no line length limit (i.e. the mode which
is usually the default) and so can be used to work around such
situations.
Bear in mind that implementations of `diff' and SCCS on a given
system can have _different_ limits on the sizes of lines that can be
handled by `delta', `get' and `diff'. This is not the case with the
GNU system however, which has no such limits.
The `diff' utility will also fail if the last line in one of the
files being compared does not end in a newline. To work around this
you can either encode the file as a binary file (*note admin::) or add
a terminating newline (which is usually the best course of action).
The `diff' program to be used by the CSSC tools is selected when the
`configure' script is run, before CSSC is compiled. *note
Configuration:: explains how you can determine which diff command is
used by CSSC.
File: cssc.info, Node: Configuration, Next: Bug-for-Bug, Prev: Limitations of diff, Up: Interoperability
6.6 Checking the Current Configuration
======================================
To discover how a particular installation of CSSC is configured, pass
the `-V' option to any of the CSSC tools. The "configure" script
defaults to not limiting the maximum line length, but you must
specifically indicate if binary file support is to be enabled or not
when running "configure".
File: cssc.info, Node: Bug-for-Bug, Next: Incompatibilities, Prev: Configuration, Up: Interoperability
6.7 Bug-for-Bug Compatibility
=============================
Some other implementations of SCCS have bugs, too. Where we know about
these and can work around them, we do this. Please note that these
bugs only affect _some_ other versions of SCCS - if they affected all
versions, they'd be the correct behaviour of CSSC too!
* Some versions of SCCS had a Y2K-related problem where the tens
digit in the year fields within the delta table of the SCCS file
contains a colon (`:') rather than a digit. When reading files,
CSSC correctly understands this to be a zero and issues a warning
message. The fault is corrected if the SCCS file is being
modified. *Note Year 2000 Issues::.
* Some versions of the Data General implementation were changed to
use four-digit years in the p-file instead of two-digit years,
apparently as part of a Y2K-fix. While arguably this in fact
might have been the right way to fix the problem, none of the
other SCCS implementations went along with the idea. *Note Year
2000 Issues::. If the file is being modified, the year is written
back out as a two-digit field.
* Although it is unusual for SCCS files to have "^A m" lines after
"^A c" lines, this does sometimes occur. CSSC accepts either
order, but always emits the MR numbers before the comments for each
delta.
* CSSC accepts "^A m" lines with no argument, although this is
unusual. This may in fact not actually be a bug.
* Some versions of SCCS (allegedly some versions of the Sun Code
Manager product) emit lines of the form "^AU 0" instead of "^A U".
CSSC accepts either but only produces the latter. Similar
situations exist for lines of the form "^At 0" and "^A T 0".
File: cssc.info, Node: Incompatibilities, Next: SCCS Version Differences, Prev: Bug-for-Bug, Up: Interoperability
6.8 Incompatibilities
=====================
There are some features of SCCS implementations with which CSSC cannot
maintain compatibility.
* The CSSC behaviour of correcting the problems mentioned above may
not be compatible with those versions of SCCS which actually
exhibit those problems (then again, some of them are not able to
read their own output in these circumstances, either).
* The BitSCCS product, part of the BitKeeper suite, uses special
comment lines in the delta table, of the form "^Ac_" where "_" is
some character other than a space. When CSSC sees these, it will
avoid changing the SCCS file (though it will still work for
read-only operations, even though the significance of the special
comment is ignored). File flags which are specific to BitKeeper
are also treated in this way.
File: cssc.info, Node: SCCS Version Differences, Next: CSSC Extensions, Prev: Incompatibilities, Up: Interoperability
6.9 SCCS Version Differences
============================
This section outlines some of the ways in which various versions of
SCCS differ from each other and therefore sometimes from CSSC.
6.9.1 Binary file support and line lengths
------------------------------------------
The various versions of SCCS differ in their level of support for
binary files (*note Binary File Support::), and in the maximum line
length that they will support (*note Maximum Line Length::.
6.9.2 sccsdiff
--------------
There are some small variations in the way that the several versions of
`sccsdiff' behave. These are outlined in the table below :-
Solaris 8
Prints a separator line between the `diff' output for each s-file.
This separator is output before the first set of diff output, even
if only one s-file has been named on the command line.
Solaris 2.6 and many other versions of Unix
Does not print a separator.
6.9.3 admin
-----------
There are a few differences in the behaviour of the `admin' command
across the various SCCS Implementations :-
The `-n' option
Some versions of Dynix do not allow the use of the `-n' option
without the `-i' option. A workaround is to use `-n -i/dev/null'
instead.
Binary file support
Most implementations of SCCS do not support the encoding of binary
files, either automatically or by the use of the `-b' option to
`admin'. See *note Binary File Support::, for more information.
Executable file support
The SCO OpenServer implementation of SCCS provides an `x' flag,
which turns on the executable bits of the mode of the g-file when
it is created. Other versions of SCCS do not have this feature.
While CSSSC provides this feature also, its use is not
recommended. The `prt -f' command does not indicate the value of
the `x' flag.
Initial delta
The `-r' option is used to specify the release of the initial
delta. Some implementations of SCCS allow this to be used to
specify more components of a SID than just the release number.
The CSSC version of `admin' allows this usage but issues a warning
message. If the `-r' option is used to specify a non-trunk SID
(that is, a SID with more than two components), this is allowed
but some of the other tools in the CSSC suite will not work
correctly on the resulting file.
6.9.4 prt
---------
If the "encoded" flag is set, some versions of `prt' (but not the CSSC
version) omit a newline in the output and so the next thing follows
immediately on the same line.
6.9.5 get
---------
Sun Solaris 8 features a `y' flag. If the `y' flag is set in the SCCS
file, only the specified SCCS keywords will be expanded in the gotten
file (assuming that the `-k' and `-e' options are not used).
The `get' command on SCO OpenServer honours the setting of the `x'
flag. This is described above.
For a discussion of the interoperability of CSSC with other SCCS
implementations, see *note Interoperability::. For a description of
the `x' and `y' flags, see *note Flags::.
File: cssc.info, Node: CSSC Extensions, Prev: SCCS Version Differences, Up: Interoperability
6.10 CSSC Extensions
====================
There are some respects in which CSSC behaves unlike other versions of
SCCS. These differences mainly relate to the removal of arbitrary
limits or problems, and generally do not pose an interoperability
problem. The most important extensions are listed below.
Line Length
By default, CSSC enforces no line length limits. *Note Maximum
Line Length::.
Date handling
The `-c' option to `get' supports four-digit years. *Note The
Good News::.
Binary file handling
When you generate a new SCCS file with `admin -i', the `admin'
command will automatically determine if the file needs to be
encoded. Other versions of SCCS which do this rely on being able
to seek in the input file specified as the argument to the `-i'
option, which means that this is not possible if the initial file
body is being read by a pipe. The CSSC implementation of `admin'
does not have this limitation, since it seeks on the file being
created instead. *Note Unemulated Features::.
Combinations of features
Various other SCCS implementations have extensions (for example
the `x' and `y' flags and binary file encoding). The CSSC suite
attempts to honour all of these extensions, and is probably the
only implementation which has all these features. If you try to
use a feature which is specific to only one implementation of
SCCS, CSSC will issue a warning that what you are doing is not
portable.
If you use features of CSSC which are extensions originating in
more than one other SCCS implementation, for example both the `x'
and the `y' flags, you have effectively tied yourself to CSSC.
Once you are in that position, you are no longer able to
interoperate with any other version of SCCS (since, in this
example, any other version of SCCS will fail to understand either
the `x' or the `y' flag). If interoperability with other versions
of SCCS is no longer an issue, you might as well bite the bullet
and migrate to a more modern configuration control system
entirely. *Note Overview::.
Validation
The CSSC implementation of `val' implements some checks that other
implementations lack. Howver, it is not complete, and so there
are also checks that other implementations make that CSSC does not.
Error Messages
The error messages issued by CSSC are intended to be
self-explanatory and so lack reference numbers like `(ge4)'.
Closed File Descriptors
If you invoke CSSC with file descriptor 0, 1 or 2 closed, that
file descriptor is attached to `/dev/null'. This prevents error
messages going into a file opened by CSSC for writing (for example
an SCCS file).
Read-only reaction to unsupported features
If CSSC discovers a construct in an SCCS file which it doesn't
understand, it will avoid modifying the file (though read-only
tools like `prt' and `get' will still work).
Invoking other tools
It is usual for CSSC to invoke other programs, for example `diff'
and the MR-validator specified by the `v' flag. However, with the
exception of the `sccsdiff' shell script, the tools within the
CSSC suite do not invoke each other. For example, `delta' does
not invoke `get'. This behaviour is different to the traditional
architecture of SCCS and might introduce subtle differences of
behaviour. Any such differences are bugs; see *note Reporting
Bugs: Problems.
Environment
Some environment variables are specific to CSSC. *Note
Environment Variables: Environment.
See also *note Missing Features and other Problems: Incomplete.
File: cssc.info, Node: Environment, Next: Incomplete, Prev: Interoperability, Up: Top
7 Environment Variables
***********************
Several environment variables control the behaviour of CSSC. This
section explains what these variables are and how they work.
* Menu:
* Child Processes:: CSSC tools run other programs occasionally.
* Configuration Variables:: Variables that turn features on or off.
* Other Variables:: Miscellaneous other variables you might use.
File: cssc.info, Node: Child Processes, Next: Configuration Variables, Up: Environment
7.1 Child Processes
===================
Unlike some other implementations of SCCS, CSSC tools do not usually
execute each other. This means for example that `delta' does not
invoke `get' to extract the previous version of the file, and `prs'
doesn't use `get' when processing the `:GB:' keyword.
There are a small number of exceptions to this rule :-
`sccs'
The `sccs' driver program can be used to invoke any of the other
tools in the suite. *Note Known Problems::, for a discussion of
the issues this raises.
`delta'
The `delta' program runs a program to validate the Modification
Request Numbers offered by the user. *Note Modification Request
Numbers::.
`sccsdiff'
The `sccsdiff' program is a shell script, and invokes `get',
`diff' and `pr', as well as other tools such as `cat', `test' and
`rm'. The `sccsdiff' program must not be installed set-user-id.
The driver program `sccs' takes a number of precautionary steps if
it detects that it is running set-user-id or set-group-id. These steps
are described below, as part of the discussion of each environment
variable.
File: cssc.info, Node: Configuration Variables, Next: Other Variables, Prev: Child Processes, Up: Environment
7.2 Configuration Variables
===========================
When "configure" is run, some default behaviours are set. These can be
overridden with the use of environment variables as described below.
7.2.1 CSSC_BINARY_SUPPORT
-------------------------
The `CSSC_BINARY_SUPPORT' environment variable controls whether CSSC
will create "encoded" SCCS files. The three valid values for this
variable are as follows :-
`enabled'
CSSC will create encoded SCCS files if required
`disabled'
CSSC will not create encoded SCCS files
unset
The default behaviour is used; this default will be the same as for
one of `enabled' or `disabled'. The default is set by passing
either `--enable-binary' or `--disable-binary' to "configure" when
CSSC is compiled. If this option was not specified, the default
value is `enabled'. For more information see *note
Interoperability::.
This variable is unset by the `sccs' driver program, if it is
installed set-user-id or set-group-id.
7.2.2 CSSC_MAX_LINE_LENGTH
--------------------------
The `CSSC_MAX_LINE_LENGTH' environment variable controls the maximum
length of lines that CSSC will allow to go into an SCCS file. This
variable should be set to a decimal integer.
The default behaviour of CSSC when this variable is unset is
described in *note Interoperability::.
This variable is unset by the `sccs' driver program, if it is
installed set-user-id or set-group-id.
File: cssc.info, Node: Other Variables, Prev: Configuration Variables, Up: Environment
7.3 Other Variables
===================
7.3.1 USER
----------
If "configure" detects that UIDs are not supported on the system you
are running on (that is, you are compiling on a system that doesn't look
at all like Unix) then the environment variable USER is used to
determine the invoking user's name. This is then the name which is used
in the p-file and in the delta information for new deltas. This
username is also compared against the list of authorised users by
`delta'. Of course, this doesn't provide much security but in the
absence of user ID support, CSSC can't tell who users really are anyway.
The behaviour of CSSC with respect to this option is not sensitive
to whether or not programs are installed set-user-id, because this
variable is only consulted on systems where set-user-id is not
supported. This may be a problem on systems where it is possible to
grant enhanced privileges to a program, but which do not look like Unix
to the "configure" program.
7.3.2 CSSC_SHOW_SEQSTATE
------------------------
If set, the environment variable `CSSC_SHOW_SEQSTATE' will cause CSSC
to emit debugging information about the delta table to stderr. This is
only of use when debugging CSSC.
7.3.3 PROJECTDIR
----------------
The `PROJECTDIR' environment variable is used only by the `sccs' driver
program. This variable is ignored if the `sccs' program is installed
with the set-user-ID bit set. See *note Known Problems::, for other
remarks concerning setuid execution.
The `PROJECTDIR' variable is used to locate the SCCS history file
corresponding to a filename given on the command line. If the value of
`PROJECTDIR' starts with a `/', it is used as an absolute directory
name. If `PROJECTDIR' does not start with a slash, it is assumed to be
the name of a user, and SCCS files are assumed to be in the
subdirectory "src" or "source" beneath their home directory.
7.3.4 PATH
----------
Normally, the `sccs' driver program locates the other tools by
searching the directories specified in `PATH', but if it is running
set-user-id or set-group-id, a compiled-in value is used instead. By
default, this value is is `/usr/sccs'.
If SCCS is not privileged, it will fall back on the compiled-in
value in order to find the other tools if they are not found in any of
the directories in `$PATH'.
In normal operation, `sccs diffs' will use the system `diff' command
by searching the `PATH' environment variable. This doesn't happen if
it is running set-user-id or set-group-id.
7.3.5 LD_LIBRARY_PATH
---------------------
None of the programs in the CSSC suite take any specific action
regarding the `LD_LIBRARY_PATH' environment variable, but your system
libraries may take notice of it (or decide not to do so, for example
when a program is running set-user-id or set-group-id).
7.3.6 TMPDIR
------------
The `sccsdiff' program ignores the setting of the `TMPDIR' environment
variable. Temporary files with predictable names are created in the
`/tmp' directory. *Note Known Problems::.
7.3.7 Locale variables
----------------------
The `sccs' driver program uses the `setlocale' function, whose
behaviour depends on several implementation-dependent environment
variables. If you are using the GNU C library, these variables are
`LC_COLLATE', `LC_CTYPE', `LC_MESSAGES', `LC_MONETARY', `LC_NUMERIC',
`LC_TIME', and `LANG'. The `setlocale' function is not called if SCCS
is running set-user-id or set-group-id.
File: cssc.info, Node: Incomplete, Next: Year 2000 Issues, Prev: Environment, Up: Top
8 Missing Features and other Problems
*************************************
* Menu:
* Missing Features:: Some features of SCCS are not provided.
* Known Problems:: Known problems with CSSC.
* Unemulated Features:: Problems with SCCS that CSSC doesn't share.
File: cssc.info, Node: Missing Features, Next: Known Problems, Up: Incomplete
8.1 Missing Features
====================
* Documentation is incomplete or missing. That includes this
document.
* Some programs are missing, that is, some programs are present in
the SCCS suite and absent from this one.
* On platforms where the C++ compiler used to compile CSSC does not
support exceptions, the normal mechanism for recovering from an
error in the processing of an SCCS file is unavailable. This
means that if such an error occurs, the program will immediately
make a fatal exit, as opposed to carrying on with the next file.
In order to fix this problem, please either CSSC with a compiler
which has working support for exceptions, or process just one file
at a time.
* Some programs behave subtly differently to their original
counterparts. Error messages are different, and also extra
warnings are provided in some circumstances. All other
differences are also bugs. Please report them (*note Reporting
Bugs: Problems.).
* Known bugs are listed on the bug tracking system at
`http://savannah.gnu.org/bugs/?group=cssc'. Some historical known
issues are listed in the file `docs/BUGS'. Once this file has
become obsolete it will be removed from the distribution.
If an item on the TODO list (see the file `docs/TODO') has in fact
been fixed, this is a bug in the TODO list. Please report this via
the bug tracking system.
* Some programs are partially implemented. Not all programs support
all the command-line options of their original counterparts.
Also, some features are currently missing. If you would like
support for some feature that is missing, please request it in the
same way you would report a bug; I'd like to know which features
are required first.
File: cssc.info, Node: Known Problems, Next: Unemulated Features, Prev: Missing Features, Up: Incomplete
8.2 Known Problems
==================
There are a small number of known problems documented in the files
`docs/BUGS' and `docs/TODO'. These will be fixed at some point in the
future. Future problems should be reported via the CSSC Bug Tracker,
at `http://savannah.gnu.org/bugs/?group=cssc'.
There are also some security problems with this code:-
1. Temporary file races -- CSSC opens many temporary files, most of
them with very predictable names. This can be used as a lever
for compromising the security of a system, often by anticipating
the name of a file which will be opened at some point, and
creating a symbolic link of the same name. Most of the temporary
files used are created in the same directory as the SCCS file
itself. CSSC should not be used by the owners of files whose
security is important, especially to control files whose SCCS file
is in a world-writable directory. *Note Filenames::.
The `sccsdiff' program ignores the setting of the `TMPDIR'
environment variable. Temporary files with predictable names are
created in the `/tmp' directory.
2. Setuid execution -- It is common to install an extra set of
binaries with the set-user-id bit turned on in their modes, to
allow a specified group of users to make revisions to some
important files. There are many ways in which a setuid program
can be used by malicious users to gain access to the security
privileges of the user as whom a program runs. CSSC has not been
reviewed with the relevant security issues in mind. Please do not
install CSSC programs with the set-user-id or set-group-id bits
turned on.
3. Environment variables -- CSSC invokes external programs, notably
the `diff' command and the program specified as the MR validation
program. Some CSSC programs (for example `sccsdiff') invoke
others. This is done without "cleaning up" the environment, and
so this is another reason not to use the set-user-id bit for CSSC
programs. *Note Environment Variables: Environment.
Please refer to the section of the GNU General Public License
entitled "NO WARRANTY" for information regarding the lack of warranty
for this program. CSSC is _not_ a secure program, please do not rely
on it to behave in a secure fashion.
Contributions of code or patches to fix these problems are, as
always, gleefully welcomed. Please submit these to the maintainer.
Additionally, there is currently one problem that may not ever be
fixed. This problem occurs only in the `prt' program when the list of
ignored or excluded deltas is present for a SID _but that list is
empty_. In this case SCCS prints the `Included:' or `Excluded:' line
in its output (with no numbers afterward) and CSSC prints nothing.
Since "fixing" this problem would require a horrible kludge, this has
not been done. It is not expected that this will cause a problem for
any users; if this is a problem for you, let the maintainer know and it
will be fixed.
File: cssc.info, Node: Unemulated Features, Prev: Known Problems, Up: Incomplete
8.3 Unemulated Features
=======================
There are some features of (some implementations of) the traditional
SCCS suite which it may not be desirable to copy.
1. If an SCCS file is created with the `-i' option, and it turns out
to need encoding, then genuine SCCS seeks back to the start of the
file and encodes it. However, if the input file is not seekable,
for example if it is a pipe, then this doesn't always work. The
SCCS file is then sometimes created containing only the initial
part of the body, before the offending segment of the file. The
exit value of the `admin' program is nevertheless still zero.
Tests for this situation are in `tests/binary/seeking.sh' but
these tests are only carried out if the program under test seems
to be CSSC rather than the genuine SCCS suite. The CSSC suite
does not have this problem, and will always detect the need to
encode the file, and will successfully complete the process (it
does not try to seek on the input pipe).
2. The normal configuration for CSSC is that it supports binary files
and has no limit on line length in file with which it deals. Both
of these features may be different to the features of some version
of SCCS with which you want to interoperate. See *note
Interoperability:: for more information on how to achieve better
interoperability with other implementations of SCCS.
3. If you have a hard link to an SCCS file, then SCCS programs would
"break" the hard link because the SCCS file is rewritten. For
this reason, SCCS checks the link count on the file before using
it. The SCCS suite also does this. While CSSC does this
consistently, SCCS does not - for example the VAL program does not
do this check.
There are also a small number of respects in which various
implementations differ from each other; in such cases CSSC picks a
suitable alternative; *note SCCS Version Differences::.
File: cssc.info, Node: Year 2000 Issues, Next: Testing, Prev: Incomplete, Up: Top
9 Year 2000 Issues
******************
Primordial (but not current) versions of the genuine SCCS suite fail to
work correctly in and after the year 2000. The commands affected are
`get' and `prs'. Unix vendors have ensured that the version of SCCS
that they currently ship works correctly in the year 2000. Sun
Microsystems, for example, state in their Year 2000 FAQ
(`http://www.sun.com/y2000/faq.html')
* *Does Sun see any problems with the source code control system
(SCCS)?*
No, Sun has adopted the X/Open Commands and Utilities Issue 5
standard, the year 2000 compliant version of SCCS will not be
affected by the end of century transition. The X/Open standard
states that old dates held in ("yy/mm/dd") format does not change
in "s." files, but the values "yy" which range from 69 - 99 are to
be interpreted as 1969 - 1999 respectively. Values of "yy" which
range from 00 - 68 are to be interpreted as 2000 - 2068
respectively. This interpretation ensures that the year 2000
compliant version of SCCS will work at least to the year 2068. By
implementing X/Open's standard, Sun has ensured SCCS user's
compatibility with other providers of the SCCS utility. For more
information please refer to:
`http://www.xopen.org/public/tech/base/year2000.html'
Copyright (C) 1994 - 1997 Sun Microsystems, Inc., 901 San Antonio
Road, Palo Alto, CA 94303 USA. All rights reserved.
* Menu:
* The Good News:: CSSC works with all dates from 1969 to 2038...
* The Bad News:: ...but with hiccups on some operating systems.
* Year 2000 Summary:: Parting words on date issues
File: cssc.info, Node: The Good News, Next: The Bad News, Prev: Year 2000 Issues, Up: Year 2000 Issues
9.1 The Good News
=================
Two-digit years are a problem in two places: firstly, within the actual
SCCS files, and secondly within command-line options. The two-digit
year fields in the SCCS files are correctly dealt with according to the
strategy mandated by X/Open. The command-line options are also dealt
with similarly.
CSSC provides an additional feature for your convenience. If the
argument to the `-c' option of `get', `prt', or `prs' contains more
than twelve digits, the first two are understood to be the century part
of the year. For example, `971120193000' and `19971120193000' both
represent exactly the same time (7:30 p.m. on November 20, 1997). The
fields of a date can be separated with other (non-digit) characters,
and so `1997/11/20-19:30:00' also denotes the same time (but
`1997/11/20' is an error because there are fewer than twelve digits).
Some versions of SCCS are not year 2000 compliant and write incorrect
timestamps into SCCS files. CSSC correctly understands the intended
date, and will fix this problem when re-writing the file (*note
Bug-for-Bug Compatibility: Bug-for-Bug.).
CSSC represents dates internally in a way that works for Gregorian
dates up to at least the year 32767 AD on all systems. Some countries
didn't recognise the Gregorian calendar system until the early
twentieth century but this of course is not really a problem now. The
useful life of SCCS is from 1969 until 2068. Years are stored in
two-digit form in SCCS files and so although CSSC has no such limits
internally, it's not possible to indicate a year outside this range in
an SCCS file if you want to retain compatibility with other
implementations of SCCS. All the CSSC programs will successfully work
with any date in this range, all the way up to 2068, on all systems.
In this future, years after 2068 may be represented as four-digit
fields, but CSSC doesn't do this yet.
The CSSC test suite (*note The Test Suite: Testing.) contains some
test files which may be useful in determining the date range with which
your usual SCCS implementation will cope. These are in the directory
`tests/year-2000'.
File: cssc.info, Node: The Bad News, Next: Year 2000 Summary, Prev: The Good News, Up: Year 2000 Issues
9.2 The Bad News
================
It's not all good news though. When new deltas are created with the
`delta' command, CSSC must consult the operating system to find the
current date and time. Some operating systems have a limited range of
date representation. For example, the development system I use for
most of the work on CSSC can't report any date later than Tuesday Jan
19 03:14:07 2038 as the current time. When running on such systems,
CSSC will still be able to work with SCCS files containing dates after
this, but activities involving the current time will not work correctly.
This date breakdown occurs most obviously with the date stamp that
the `delta' program gives each delta in the SCCS file, but also with
the commentary-change message of `cdc' and the default comment produced
by `admin' when an SCCS file is created.
File: cssc.info, Node: Year 2000 Summary, Prev: The Bad News, Up: Year 2000 Issues
9.3 Year 2000 Summary
=====================
To summarise, all reporting activities of CSSC will work correctly
throughout the range of time representable in an SCCS file (that is,
from 1969 to 2068 inclusive). However, commands which modify SCCS
files and need to add dates may fail earlier than this (but then again,
may not, depending on your operating system).
Now that you know that whatever version of SCCS you are using has
probably been fixed by the vendor, and that even if your vendor's SCCS
implementation cannot be updated for some reason, CSSC is Year-2000
compliant and to an extent Year-2038 compliant, I'd like you to
remember the conversion effort that this has saved you. I'd also like
to urge to to actually use that effort to convert your existing
projects from SCCS to a more modern version control system, for example
GNU CVS. There are other considerations besides Year-2000 compliance,
after all. CSSC is not called "Compatibly Stupid Source Control" for
nothing.
File: cssc.info, Node: Testing, Next: Problems, Prev: Year 2000 Issues, Up: Top
10 The Test Suite
*****************
The test suite is the most important single component of the CSSC
suite. It ensures that ports to new platforms are working correctly,
and that changes in one part of the suite don't accidentally break
anything else.
The test suites cannot cover everything. More are needed. If you
only ever contribute one thing to CSSC, make it a new test case. This
chapter explains how to run the test suite and also how to write new
test cases.
* Menu:
* Running the tests:: Running the test cases.
* Writing new test cases:: Writing new test cases.
File: cssc.info, Node: Running the tests, Next: Writing new test cases, Up: Testing
10.1 Running the tests
======================
Running the test cases is quite simple. Typically, you might do it
after compiling but before installing CSSC. After running "configure",
you might compile CSSC with
make
and test it with
make check
The full test suite takes just over five minutes to run on a 486 running
Linux. If everything works correctly, you will see messages like:-
cd tests && make all-tests
make[1]: Entering directory `..../CSSC/compile-here/tests'
cd ../lndir && make
make[2]: Entering directory `..../CSSC/compile-here/lndir'
make[2]: `lndir' is up to date.
make[2]: Leaving directory `..../CSSC/compile-here/lndir'
../lndir/lndir ../../Master-Source/tests
../../Master-Source/tests/get:
command-names: .././common/command-names
test-common: .././common/test-common
...more messages from lndir...
/bin/sh -ec 'cd admin && for i in *.sh ; \
do \
/bin/sh $i || break; \
done'
C1...passed
C2...passed
.... more output ....
C12...passed
C13...passed
PASS comment.sh:
v1...passed
.... more output ....
b11...passed
b12...passed
PASS flags.sh:
.... more output ....
Tests passed.
make[1]: Leaving directory `..../CSSC/compile-here/tests'
If something goes wrong you will see a "FAIL" message, which looks
something like this:-
C1...FAIL comment.sh C1: ../../admin -ifoo s.new.txt:
Expected return value 0, got return value 1
make[1]: *** [test-admin] Error 1
make[1]: Leaving directory `..../CSSC/compile-here/tests'
Tests failed.
make: *** [all-tests] Error 2
The thing to remember is that when you run `make check', the `make'
program will print on the last line a message saying "Error" only if
the tests have failed.
If the test suite does indicate that the tests have failed, please
submit a bug report (*note Reporting Bugs: Problems.). Please include
in your bug report
* The output of the test suite (you may find the Unix `script'
program invaluable for this)
* The contents of the directory containing the test that failed (if
you compiled with separate source and object directories, I just
want the one in the "object" directory).
* As much information about your system as you think is useful, for
example the names and versions of the operating system and
compiler that you are using.
If you want to run just some of the tests, there are rules in the
makefile for just running some of them. For example, the tests in the
directory `tests/admin' can be run with `make test-admin'. Each test
directory is named after one of the CSSC programs. This indicates
which program the tests concentrate on verifying. Inevitably these
tests will use more than just one CSSC program; for example, most of
the tests involve using `admin' to create a SCCS file in the first
place. However, the directory indicates which tool those tests
concentrate on.
It is possible for a test to neither pass or fail, but just go wrong.
This can happen when the test script comes upon something that prevents
the test itself working correctly, for example, because it can't remove
a temporary file or uudecode a built-in sample SCCS file. When this
happens you get output much like this:-
$ sh flags.sh
rm: foo: Permission denied
flags.sh: Test could not be completed
The part before the colon (`flags.sh') indicates which script could not
be completed. No further tests will be attempted. Diagnosing the
problem may or may not be simple. In this case, it's not hard; the
problem is that the test suite is trying to clear away any temporary
files but it can't remove the file "foo" (because the current directory
was made read-only to force the test to miscarry, in this contrived
case). When the test suite miscarries like this and you can't find the
problem, please follow the bug-reporting procedure (*note Reporting
Bugs: Problems.), but please indicate that it is a miscarriage in the
test suite rather than a concrete test failure.
File: cssc.info, Node: Writing new test cases, Prev: Running the tests, Up: Testing
10.2 Writing new test cases
===========================
The test cases are really just shell scripts. They are suitable for
`/bin/sh' on most machines. The procedure for running these is
explained in *note Running the tests::. These shell scripts read in
some common function definitions (mostly from
`tests/common/test-common') and then proceed to conduct the tests.
This section explains those commands used in the test scripts that are
not simply normal shell commands. Normal shell commands like `sed' and
`grep' are not described.
The best approach for writing new test scripts or just individual new
test cases is to first think of some aspect that needs better test
coverage, and then to write the test script, basing it on an existing
script. To make sure that your new tests are really checking for the
right things, you can run them against an existing SCCS implementation
other than CSSC.
* Menu:
* Testing the Test Suite: testing tests. How to test the test suite itself
* docommand:: Run a command, checking its return value and output.
* remove:: Remove a file if it is present.
* success:: Declare that a test has passed.
* fail:: Declare that a test has failed.
* echo_nonl:: Print a string without a following argument.
* miscarry:: When a test case cannot be run.
* real-thing:: Some test scripts need to know which features to expect.
* need-prt:: Not all implementations have prt
File: cssc.info, Node: testing tests, Next: docommand, Up: Writing new test cases
10.2.1 Testing the Test Suite
-----------------------------
The best strategy for testing the CSSC test suite itself is to run it
against a genuine edition of SCCS, if you have one available. Before
running `make check', set the environment variable `dir' to point to
the directory containing the programs to be tested; this should usually
be `/usr/sccs'.
In many implementations of SCCS, some of the tools execute others
(for example, `delta' often executes `get' to retrieve the previous
version of the controlled file). This means that to correctly test the
test suite, your `PATH' environment variable should be set up to select
the SCCS tools you want to test. Here is an example of the correct way
to set up the environment to test SCCS tools in `/usr/ccs/bin' :-
dir=/usr/ccs/bin
PATH=/usr/ccs/bin:$PATH
export dir
make check
When you are sure that the test script is expecting the correct
behaviour from programs under test, you can then run it against CSSC.
After all, if you're going to set out writing your test by assuming
that CSSC is correct in the area under test, of what value is the test?
File: cssc.info, Node: docommand, Next: remove, Prev: testing tests, Up: Writing new test cases
10.2.2 docommand
----------------
The `docommand' function runs a specified program, and checks its
return value, standard output and error output against an expected
version. If any mismatch occurs, `fail' is called. The `docommand'
function is invoked with up to six arguments:-
docommand [--silent] LABEL COMMAND RETVAL STDOUT STDERR
The `docommand' function normally prints the label to indicate what
stage the current test script has reached, followed by "done" when it
has finished. The `--silent' option turns off this behaviour, so that
if nothing goes wrong, no progress message is printed. This is
occasionally used for commands that have already been tested by a script
and are known to work, but which must be repeated several times in order
to make some other kind of test, which is yet to come. I recommend you
try to avoid using this option.
The other arguments to `docommand' are:-
LABEL
This is what is printed to indicate what is going on when the test
starts. If all goes according to plan, it is followed by
`...done'.
COMMAND
This is the command to be executed, with all the required
arguments.
RETVAL
This is the expected return value. If COMMAND exits returning any
other value, `fail' will be called. If the test should not care
about the return value, use `IGNORE' as RETVAL.
STDOUT
This is the text expected on the standard output of COMMAND. If
the test should not care about the standard output, use `IGNORE' as
STDOUT.
STDERR
This is the text expected on the error output of COMMAND. If the
test should not care about the error output, use `IGNORE' as
STDERR.
This command will run `admin' with three arguments, and expect it to
produce no output at all and return the value zero:-
docommand C5 "${admin} -ifoo -yMyComment $s" 0 "" ""
This command does something similar, but the command is expected to
fail, returning 1 as its exit status:-
# We should not be able to admin -i if the s-file already exists.
docommand I7 "${admin} -ifoo $s" 1 "" IGNORE
In the example above, the error messages produced by SCCS and CSSC are
different, but both indicate the same thing. However, since the
messages are different, `IGNORE' is used.
The STDOUT and STDERR arguments are processed with the `echo_nonl'
function, and so escape codes are valid and indeed heavily used:-
# Test the -m (annotate SID) option with several deltas...
docommand N4 "$get -p -m $s" 0 \
"1.1\tline1\n1.1\tline2\n1.2\tline3\n" \
IGNORE
File: cssc.info, Node: remove, Next: success, Prev: docommand, Up: Writing new test cases
10.2.3 remove
-------------
The `remove' function is for clearing up temporary files after tests
have finished, and for making sure that no instance of a file that a
test is supposed to create already exists before the test is made.
Typical usage is this:-
f=1test
s=s.$f
p=p.$f
remove $f $s $p
The `remove' function is defined as:-
remove () { rm -rf $* || miscarry Could not remove $* ; }
File: cssc.info, Node: success, Next: fail, Prev: remove, Up: Writing new test cases
10.2.4 success
--------------
The `success' function prints a message indicating that the current
test script has passed, and exits successfully. This is always done at
the foot of a test script.
File: cssc.info, Node: fail, Next: echo_nonl, Prev: success, Up: Writing new test cases
10.2.5 fail
-----------
If a test fails, it is usually because one of the `docommand' calls
fails, and so direct calls to the `fail' function are rare. However,
if you do want to call this function directly, you should supply as its
argument a short description of what has gone wrong. For example, the
`docommand' function uses `fail' in the following way:-
fail "$label: $1: Expected return value $2, got return value $rv"
File: cssc.info, Node: echo_nonl, Next: miscarry, Prev: fail, Up: Writing new test cases
10.2.6 echo_nonl
----------------
The `echo_nonl' function outputs its argument, without a following
newline. Escape codes as for `echo(1)' are understood. Depending on
the actual flavour of system that the test suite is running on, this
might internally use `echo -n' or `echo -e .....\c'.
Please do not use either the `-n' or `-e' options for `echo(1)'
directly in test scripts, because they don't work in the same way on
all machines. The `echo_nonl' function is provided for this reason;
therefore, please use it. Please note also that while the `printf(1)'
command may seem superior, it absolutely cannot be used because not all
systems provide it.
Typical usage of `echo_nonl' might be:-
echo_nonl Please wait while I finish what I am doing...
# ...
echo done
File: cssc.info, Node: miscarry, Next: real-thing, Prev: echo_nonl, Up: Writing new test cases
10.2.7 miscarry
---------------
The `miscarry' function is used to indicate that while the test suite
has not found a problem with the programs being tested, there has been
some other kind of problem that prevents further testing.
Typical usage might be:-
remove foo
echo '%M%' > foo
test `cat foo` = '%M%' || miscarry cannot create file foo.
File: cssc.info, Node: real-thing, Next: need-prt, Prev: miscarry, Up: Writing new test cases
10.2.8 real-thing
-----------------
The various implementations of SCCS vary in several different ways, but
the CSSC test suite tries very hard to pass when run against any
genuine implementation of SCCS unless it has a definite bug. This
means for example that although the CSSC version of `admin -i' will
support automatic switch-over to binary mode for a file provided via
stdin, and the test suite tests this, the same property is not required
of SCCS itself.
The `real-thing' script checks if we are actually tesing a real
implementation of SCCS. It sets the environment variable
`TESTING_CSSC' to `true' or `false', depending on whether we are
testing CSSC or not.
If you are really interested in whether the implementation being
tested supports binary files or not, you should be using the
`config-data' script instead.
File: cssc.info, Node: need-prt, Prev: real-thing, Up: Writing new test cases
10.2.9 need-prt
---------------
The possible non-availability of `prt' is another thing that the CSSC
test suite needs to know about in order to run successfully against all
working versions of SCCS. Some versions of SCCS lack the `prt'
program. For this reason, the tests for this tool (in the `tests/prt'
directory) are skipped if `prt' is missing. When writing test scripts,
you should never use `prt' unless you are actually testing `prt' itself
(you can almost always use `prs' instead).
If your test is specifically designed to test the functionality of
`prt' itself on the other hand, just source `need-prt' before the first
test. The `need-prt' script will skip the remainder of the invoking
test script if `prt' is missing. You might use it like this, for
example :-
#! /bin/sh
. ../common/test-common
. ../common/need-prt
s=s.testfile
remove $s
docommand e1 "${prt} $s" 1 IGNORE IGNORE
success
File: cssc.info, Node: Problems, Next: Copying, Prev: Testing, Up: Top
11 Reporting Bugs
*****************
If you find a bug in GNU `CSSC', please report this via the CSSC bug
tracking system at `http://savannah.gnu.org/bugs/?group=cssc'. Please
include the version number, which you can find by giving the option
`--version' to any `CSSC' command. Also include in your message the
output that the program produced and the output you expected. An `s.'
file and instructions for reproducing the error are almost essential
unless the bug is very trivial. If you are unable to send the actual
s-file itself due to confidentiality concerns, you can mask the
contents by using the script `mogrify.awk', which removes the contents
of an SCCS file while preserving its structure. You will need to use
`admin -z' on the result in order to correct the checksum of the
transformed version of the file. If you do this, please make sure that
you check that the problem still occurs with the transformed version of
the file.
You may also find it helpful to join the mailing list. See the file
`docs/mailing-list.txt' for information about the mailing list.
If you have other questions, comments or suggestions about GNU
`CSSC', contact the maintainer via electronic mail to `jay@gnu.org' .
File: cssc.info, Node: Copying, Next: GNU Free Documentation License, Prev: Problems, Up: Top
GNU General Public License
**************************
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Preamble
========
The GNU General Public License is a free, copyleft license for software
and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains
free software for all its users. We, the Free Software Foundation, use
the GNU General Public License for most of our software; it applies
also to any other work released this way by its authors. You can apply
it to your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you
have certain responsibilities if you distribute copies of the software,
or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the
manufacturer can do so. This is fundamentally incompatible with the
aim of protecting users' freedom to change the software. The
systematic pattern of such abuse occurs in the area of products for
individuals to use, which is precisely where it is most unacceptable.
Therefore, we have designed this version of the GPL to prohibit the
practice for those products. If such problems arise substantially in
other domains, we stand ready to extend this provision to those domains
in future versions of the GPL, as needed to protect the freedom of
users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
====================
0. Definitions.
"This License" refers to version 3 of the GNU General Public
License.
"Copyright" also means copyright-like laws that apply to other
kinds of works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the
work in a fashion requiring copyright permission, other than the
making of an exact copy. The resulting work is called a "modified
version" of the earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work
based on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it
on a computer or modifying a private copy. Propagation includes
copying, distribution (with or without modification), making
available to the public, and in some countries other activities as
well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user
through a computer network, with no transfer of a copy, is not
conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to
the extent that warranties are provided), that licensees may
convey the work under this License, and how to view a copy of this
License. If the interface presents a list of user commands or
options, such as a menu, a prominent item in the list meets this
criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any
non-source form of a work.
A "Standard Interface" means an interface that either is an
official standard defined by a recognized standards body, or, in
the case of interfaces specified for a particular programming
language, one that is widely used among developers working in that
language.
The "System Libraries" of an executable work include anything,
other than the work as a whole, that (a) is included in the normal
form of packaging a Major Component, but which is not part of that
Major Component, and (b) serves only to enable use of the work
with that Major Component, or to implement a Standard Interface
for which an implementation is available to the public in source
code form. A "Major Component", in this context, means a major
essential component (kernel, window system, and so on) of the
specific operating system (if any) on which the executable work
runs, or a compiler used to produce the work, or an object code
interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including
scripts to control those activities. However, it does not include
the work's System Libraries, or general-purpose tools or generally
available free programs which are used unmodified in performing
those activities but which are not part of the work. For example,
Corresponding Source includes interface definition files
associated with source files for the work, and the source code for
shared libraries and dynamically linked subprograms that the work
is specifically designed to require, such as by intimate data
communication or control flow between those subprograms and other
parts of the work.
The Corresponding Source need not include anything that users can
regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running
a covered work is covered by this License only if the output,
given its content, constitutes a covered work. This License
acknowledges your rights of fair use or other equivalent, as
provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise
remains in force. You may convey covered works to others for the
sole purpose of having them make modifications exclusively for
you, or provide you with facilities for running those works,
provided that you comply with the terms of this License in
conveying all material for which you do not control copyright.
Those thus making or running the covered works for you must do so
exclusively on your behalf, under your direction and control, on
terms that prohibit them from making any copies of your
copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section
10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under
article 11 of the WIPO copyright treaty adopted on 20 December
1996, or similar laws prohibiting or restricting circumvention of
such measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such
circumvention is effected by exercising rights under this License
with respect to the covered work, and you disclaim any intention
to limit operation or modification of the work as a means of
enforcing, against the work's users, your or third parties' legal
rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the
code; keep intact all notices of the absence of any warranty; and
give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these
conditions:
a. The work must carry prominent notices stating that you
modified it, and giving a relevant date.
b. The work must carry prominent notices stating that it is
released under this License and any conditions added under
section 7. This requirement modifies the requirement in
section 4 to "keep intact all notices".
c. You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable
section 7 additional terms, to the whole of the work, and all
its parts, regardless of how they are packaged. This License
gives no permission to license the work in any other way, but
it does not invalidate such permission if you have separately
received it.
d. If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has
interactive interfaces that do not display Appropriate Legal
Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered
work, and which are not combined with it such as to form a larger
program, in or on a volume of a storage or distribution medium, is
called an "aggregate" if the compilation and its resulting
copyright are not used to limit the access or legal rights of the
compilation's users beyond what the individual works permit.
Inclusion of a covered work in an aggregate does not cause this
License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this
License, in one of these ways:
a. Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b. Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for
as long as you offer spare parts or customer support for that
product model, to give anyone who possesses the object code
either (1) a copy of the Corresponding Source for all the
software in the product that is covered by this License, on a
durable physical medium customarily used for software
interchange, for a price no more than your reasonable cost of
physically performing this conveying of source, or (2) access
to copy the Corresponding Source from a network server at no
charge.
c. Convey individual copies of the object code with a copy of
the written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially,
and only if you received the object code with such an offer,
in accord with subsection 6b.
d. Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access
to the Corresponding Source in the same way through the same
place at no further charge. You need not require recipients
to copy the Corresponding Source along with the object code.
If the place to copy the object code is a network server, the
Corresponding Source may be on a different server (operated
by you or a third party) that supports equivalent copying
facilities, provided you maintain clear directions next to
the object code saying where to find the Corresponding Source.
Regardless of what server hosts the Corresponding Source, you
remain obligated to ensure that it is available for as long
as needed to satisfy these requirements.
e. Convey the object code using peer-to-peer transmission,
provided you inform other peers where the object code and
Corresponding Source of the work are being offered to the
general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is
excluded from the Corresponding Source as a System Library, need
not be included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means
any tangible personal property which is normally used for personal,
family, or household purposes, or (2) anything designed or sold for
incorporation into a dwelling. In determining whether a product
is a consumer product, doubtful cases shall be resolved in favor of
coverage. For a particular product received by a particular user,
"normally used" refers to a typical or common use of that class of
product, regardless of the status of the particular user or of the
way in which the particular user actually uses, or expects or is
expected to use, the product. A product is a consumer product
regardless of whether the product has substantial commercial,
industrial or non-consumer uses, unless such uses represent the
only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to
install and execute modified versions of a covered work in that
User Product from a modified version of its Corresponding Source.
The information must suffice to ensure that the continued
functioning of the modified object code is in no case prevented or
interfered with solely because modification has been made.
If you convey an object code work under this section in, or with,
or specifically for use in, a User Product, and the conveying
occurs as part of a transaction in which the right of possession
and use of the User Product is transferred to the recipient in
perpetuity or for a fixed term (regardless of how the transaction
is characterized), the Corresponding Source conveyed under this
section must be accompanied by the Installation Information. But
this requirement does not apply if neither you nor any third party
retains the ability to install modified object code on the User
Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not
include a requirement to continue to provide support service,
warranty, or updates for a work that has been modified or
installed by the recipient, or for the User Product in which it
has been modified or installed. Access to a network may be denied
when the modification itself materially and adversely affects the
operation of the network or violates the rules and protocols for
communication across the network.
Corresponding Source conveyed, and Installation Information
provided, in accord with this section must be in a format that is
publicly documented (and with an implementation available to the
public in source code form), and must require no special password
or key for unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of
this License by making exceptions from one or more of its
conditions. Additional permissions that are applicable to the
entire Program shall be treated as though they were included in
this License, to the extent that they are valid under applicable
law. If additional permissions apply only to part of the Program,
that part may be used separately under those permissions, but the
entire Program remains governed by this License without regard to
the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part
of it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material
you add to a covered work, you may (if authorized by the copyright
holders of that material) supplement the terms of this License
with terms:
a. Disclaiming warranty or limiting liability differently from
the terms of sections 15 and 16 of this License; or
b. Requiring preservation of specified reasonable legal notices
or author attributions in that material or in the Appropriate
Legal Notices displayed by works containing it; or
c. Prohibiting misrepresentation of the origin of that material,
or requiring that modified versions of such material be
marked in reasonable ways as different from the original
version; or
d. Limiting the use for publicity purposes of names of licensors
or authors of the material; or
e. Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f. Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified
versions of it) with contractual assumptions of liability to
the recipient, for any liability that these contractual
assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as
you received it, or any part of it, contains a notice stating that
it is governed by this License along with a term that is a further
restriction, you may remove that term. If a license document
contains a further restriction but permits relicensing or
conveying under this License, you may add to a covered work
material governed by the terms of that license document, provided
that the further restriction does not survive such relicensing or
conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in
the form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights
under this License (including any patent licenses granted under
the third paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly
and finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from
that copyright holder, and you cure the violation prior to 30 days
after your receipt of the notice.
Termination of your rights under this section does not terminate
the licenses of parties who have received copies or rights from
you under this License. If your rights have been terminated and
not permanently reinstated, you do not qualify to receive new
licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer
transmission to receive a copy likewise does not require
acceptance. However, nothing other than this License grants you
permission to propagate or modify any covered work. These actions
infringe copyright if you do not accept this License. Therefore,
by modifying or propagating a covered work, you indicate your
acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not
responsible for enforcing compliance by third parties with this
License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a
covered work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or
could give under the previous paragraph, plus a right to
possession of the Corresponding Source of the work from the
predecessor in interest, if the predecessor has it or can get it
with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you
may not impose a license fee, royalty, or other charge for
exercise of rights granted under this License, and you may not
initiate litigation (including a cross-claim or counterclaim in a
lawsuit) alleging that any patent claim is infringed by making,
using, selling, offering for sale, or importing the Program or any
portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.
The work thus licensed is called the contributor's "contributor
version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner,
permitted by this License, of making, using, or selling its
contributor version, but do not include claims that would be
infringed only as a consequence of further modification of the
contributor version. For purposes of this definition, "control"
includes the right to grant patent sublicenses in a manner
consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide,
royalty-free patent license under the contributor's essential
patent claims, to make, use, sell, offer for sale, import and
otherwise run, modify and propagate the contents of its
contributor version.
In the following three paragraphs, a "patent license" is any
express agreement or commitment, however denominated, not to
enforce a patent (such as an express permission to practice a
patent or covenant not to sue for patent infringement). To
"grant" such a patent license to a party means to make such an
agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent
license, and the Corresponding Source of the work is not available
for anyone to copy, free of charge and under the terms of this
License, through a publicly available network server or other
readily accessible means, then you must either (1) cause the
Corresponding Source to be so available, or (2) arrange to deprive
yourself of the benefit of the patent license for this particular
work, or (3) arrange, in a manner consistent with the requirements
of this License, to extend the patent license to downstream
recipients. "Knowingly relying" means you have actual knowledge
that, but for the patent license, your conveying the covered work
in a country, or your recipient's use of the covered work in a
country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate,
modify or convey a specific copy of the covered work, then the
patent license you grant is automatically extended to all
recipients of the covered work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that
are specifically granted under this License. You may not convey a
covered work if you are a party to an arrangement with a third
party that is in the business of distributing software, under
which you make payment to the third party based on the extent of
your activity of conveying the work, and under which the third
party grants, to any of the parties who would receive the covered
work from you, a discriminatory patent license (a) in connection
with copies of the covered work conveyed by you (or copies made
from those copies), or (b) primarily for and in connection with
specific products or compilations that contain the covered work,
unless you entered into that arrangement, or that patent license
was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order,
agreement or otherwise) that contradict the conditions of this
License, they do not excuse you from the conditions of this
License. If you cannot convey a covered work so as to satisfy
simultaneously your obligations under this License and any other
pertinent obligations, then as a consequence you may not convey it
at all. For example, if you agree to terms that obligate you to
collect a royalty for further conveying from those to whom you
convey the Program, the only way you could satisfy both those
terms and this License would be to refrain entirely from conveying
the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a
single combined work, and to convey the resulting work. The terms
of this License will continue to apply to the part which is the
covered work, but the special requirements of the GNU Affero
General Public License, section 13, concerning interaction through
a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new
versions of the GNU General Public License from time to time.
Such new versions will be similar in spirit to the present
version, but may differ in detail to address new problems or
concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU
General Public License "or any later version" applies to it, you
have the option of following the terms and conditions either of
that numbered version or of any later version published by the
Free Software Foundation. If the Program does not specify a
version number of the GNU General Public License, you may choose
any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that
proxy's public statement of acceptance of a version permanently
authorizes you to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely
approximates an absolute waiver of all civil liability in
connection with the Program, unless a warranty or assumption of
liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
===========================
How to Apply These Terms to Your New Programs
=============================================
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
Copyright (C) YEAR NAME OF AUTHOR
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see `http://www.gnu.org/licenses/'.
Also add information on how to contact you by electronic and paper
mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
PROGRAM Copyright (C) YEAR NAME OF AUTHOR
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, your
program's commands might be different; for a GUI interface, you would
use an "about box".
You should also get your employer (if you work as a programmer) or
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. For more information on this, and how to apply and follow
the GNU GPL, see `http://www.gnu.org/licenses/'.
The GNU General Public License does not permit incorporating your
program into proprietary programs. If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the
GNU Lesser General Public License instead of this License. But first,
please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
File: cssc.info, Node: GNU Free Documentation License, Next: BSD Code, Prev: Copying, Up: Top
GNU Free Documentation License
******************************
Version 1.3, 3 November 2008
Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
`http://fsf.org/'
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or
noncommercially. Secondarily, this License preserves for the
author and publisher a way to get credit for their work, while not
being considered responsible for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense.
It complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for
free software, because free software needs free documentation: a
free program should come with manuals providing the same freedoms
that the software does. But this License is not limited to
software manuals; it can be used for any textual work, regardless
of subject matter or whether it is published as a printed book.
We recommend this License principally for works whose purpose is
instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium,
that contains a notice placed by the copyright holder saying it
can be distributed under the terms of this License. Such a notice
grants a world-wide, royalty-free license, unlimited in duration,
to use that work under the conditions stated herein. The
"Document", below, refers to any such manual or work. Any member
of the public is a licensee, and is addressed as "you". You
accept the license if you copy, modify or distribute the work in a
way requiring permission under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section
of the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall
subject (or to related matters) and contains nothing that could
fall directly within that overall subject. (Thus, if the Document
is in part a textbook of mathematics, a Secondary Section may not
explain any mathematics.) The relationship could be a matter of
historical connection with the subject or with related matters, or
of legal, commercial, philosophical, ethical or political position
regarding them.
The "Invariant Sections" are certain Secondary Sections whose
titles are designated, as being those of Invariant Sections, in
the notice that says that the Document is released under this
License. If a section does not fit the above definition of
Secondary then it is not allowed to be designated as Invariant.
The Document may contain zero Invariant Sections. If the Document
does not identify any Invariant Sections then there are none.
The "Cover Texts" are certain short passages of text that are
listed, as Front-Cover Texts or Back-Cover Texts, in the notice
that says that the Document is released under this License. A
Front-Cover Text may be at most 5 words, and a Back-Cover Text may
be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images
composed of pixels) generic paint programs or (for drawings) some
widely available drawing editor, and that is suitable for input to
text formatters or for automatic translation to a variety of
formats suitable for input to text formatters. A copy made in an
otherwise Transparent file format whose markup, or absence of
markup, has been arranged to thwart or discourage subsequent
modification by readers is not Transparent. An image format is
not Transparent if used for any substantial amount of text. A
copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format,
SGML or XML using a publicly available DTD, and
standard-conforming simple HTML, PostScript or PDF designed for
human modification. Examples of transparent image formats include
PNG, XCF and JPG. Opaque formats include proprietary formats that
can be read and edited only by proprietary word processors, SGML or
XML for which the DTD and/or processing tools are not generally
available, and the machine-generated HTML, PostScript or PDF
produced by some word processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the
material this License requires to appear in the title page. For
works in formats which do not have any title page as such, "Title
Page" means the text near the most prominent appearance of the
work's title, preceding the beginning of the body of the text.
The "publisher" means any person or entity that distributes copies
of the Document to the public.
A section "Entitled XYZ" means a named subunit of the Document
whose title either is precisely XYZ or contains XYZ in parentheses
following text that translates XYZ in another language. (Here XYZ
stands for a specific section name mentioned below, such as
"Acknowledgements", "Dedications", "Endorsements", or "History".)
To "Preserve the Title" of such a section when you modify the
Document means that it remains a section "Entitled XYZ" according
to this definition.
The Document may include Warranty Disclaimers next to the notice
which states that this License applies to the Document. These
Warranty Disclaimers are considered to be included by reference in
this License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and
has no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License
applies to the Document are reproduced in all copies, and that you
add no other conditions whatsoever to those of this License. You
may not use technical measures to obstruct or control the reading
or further copying of the copies you make or distribute. However,
you may accept compensation in exchange for copies. If you
distribute a large enough number of copies you must also follow
the conditions in section 3.
You may also lend copies, under the same conditions stated above,
and you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly
have printed covers) of the Document, numbering more than 100, and
the Document's license notice requires Cover Texts, you must
enclose the copies in covers that carry, clearly and legibly, all
these Cover Texts: Front-Cover Texts on the front cover, and
Back-Cover Texts on the back cover. Both covers must also clearly
and legibly identify you as the publisher of these copies. The
front cover must present the full title with all words of the
title equally prominent and visible. You may add other material
on the covers in addition. Copying with changes limited to the
covers, as long as they preserve the title of the Document and
satisfy these conditions, can be treated as verbatim copying in
other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto
adjacent pages.
If you publish or distribute Opaque copies of the Document
numbering more than 100, you must either include a
machine-readable Transparent copy along with each Opaque copy, or
state in or with each Opaque copy a computer-network location from
which the general network-using public has access to download
using public-standard network protocols a complete Transparent
copy of the Document, free of added material. If you use the
latter option, you must take reasonably prudent steps, when you
begin distribution of Opaque copies in quantity, to ensure that
this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you
distribute an Opaque copy (directly or through your agents or
retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of
the Document well before redistributing any large number of
copies, to give them a chance to provide you with an updated
version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document
under the conditions of sections 2 and 3 above, provided that you
release the Modified Version under precisely this License, with
the Modified Version filling the role of the Document, thus
licensing distribution and modification of the Modified Version to
whoever possesses a copy of it. In addition, you must do these
things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title
distinct from that of the Document, and from those of
previous versions (which should, if there were any, be listed
in the History section of the Document). You may use the
same title as a previous version if the original publisher of
that version gives permission.
B. List on the Title Page, as authors, one or more persons or
entities responsible for authorship of the modifications in
the Modified Version, together with at least five of the
principal authors of the Document (all of its principal
authors, if it has fewer than five), unless they release you
from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license
notice giving the public permission to use the Modified
Version under the terms of this License, in the form shown in
the Addendum below.
G. Preserve in that license notice the full lists of Invariant
Sections and required Cover Texts given in the Document's
license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title,
and add to it an item stating at least the title, year, new
authors, and publisher of the Modified Version as given on
the Title Page. If there is no section Entitled "History" in
the Document, create one stating the title, year, authors,
and publisher of the Document as given on its Title Page,
then add an item describing the Modified Version as stated in
the previous sentence.
J. Preserve the network location, if any, given in the Document
for public access to a Transparent copy of the Document, and
likewise the network locations given in the Document for
previous versions it was based on. These may be placed in
the "History" section. You may omit a network location for a
work that was published at least four years before the
Document itself, or if the original publisher of the version
it refers to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications",
Preserve the Title of the section, and preserve in the
section all the substance and tone of each of the contributor
acknowledgements and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section
titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled
"Endorsements" or to conflict in title with any Invariant
Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no
material copied from the Document, you may at your option
designate some or all of these sections as invariant. To do this,
add their titles to the list of Invariant Sections in the Modified
Version's license notice. These titles must be distinct from any
other section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text
has been approved by an organization as the authoritative
definition of a standard.
You may add a passage of up to five words as a Front-Cover Text,
and a passage of up to 25 words as a Back-Cover Text, to the end
of the list of Cover Texts in the Modified Version. Only one
passage of Front-Cover Text and one of Back-Cover Text may be
added by (or through arrangements made by) any one entity. If the
Document already includes a cover text for the same cover,
previously added by you or by arrangement made by the same entity
you are acting on behalf of, you may not add another; but you may
replace the old one, on explicit permission from the previous
publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this
License give permission to use their names for publicity for or to
assert or imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under
this License, under the terms defined in section 4 above for
modified versions, provided that you include in the combination
all of the Invariant Sections of all of the original documents,
unmodified, and list them all as Invariant Sections of your
combined work in its license notice, and that you preserve all
their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name
but different contents, make the title of each such section unique
by adding at the end of it, in parentheses, the name of the
original author or publisher of that section if known, or else a
unique number. Make the same adjustment to the section titles in
the list of Invariant Sections in the license notice of the
combined work.
In the combination, you must combine any sections Entitled
"History" in the various original documents, forming one section
Entitled "History"; likewise combine any sections Entitled
"Acknowledgements", and any sections Entitled "Dedications". You
must delete all sections Entitled "Endorsements."
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other
documents released under this License, and replace the individual
copies of this License in the various documents with a single copy
that is included in the collection, provided that you follow the
rules of this License for verbatim copying of each of the
documents in all other respects.
You may extract a single document from such a collection, and
distribute it individually under this License, provided you insert
a copy of this License into the extracted document, and follow
this License in all other respects regarding verbatim copying of
that document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other
separate and independent documents or works, in or on a volume of
a storage or distribution medium, is called an "aggregate" if the
copyright resulting from the compilation is not used to limit the
legal rights of the compilation's users beyond what the individual
works permit. When the Document is included in an aggregate, this
License does not apply to the other works in the aggregate which
are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half
of the entire aggregate, the Document's Cover Texts may be placed
on covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic
form. Otherwise they must appear on printed covers that bracket
the whole aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section
4. Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also
include the original English version of this License and the
original versions of those notices and disclaimers. In case of a
disagreement between the translation and the original version of
this License or a notice or disclaimer, the original version will
prevail.
If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to
Preserve its Title (section 1) will typically require changing the
actual title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense, or distribute it is void,
and will automatically terminate your rights under this License.
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly
and finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from
that copyright holder, and you cure the violation prior to 30 days
after your receipt of the notice.
Termination of your rights under this section does not terminate
the licenses of parties who have received copies or rights from
you under this License. If your rights have been terminated and
not permanently reinstated, receipt of a copy of some or all of
the same material does not give you any rights to use it.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of
the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
`http://www.gnu.org/copyleft/'.
Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered
version of this License "or any later version" applies to it, you
have the option of following the terms and conditions either of
that specified version or of any later version that has been
published (not as a draft) by the Free Software Foundation. If
the Document does not specify a version number of this License,
you may choose any version ever published (not as a draft) by the
Free Software Foundation. If the Document specifies that a proxy
can decide which future versions of this License can be used, that
proxy's public statement of acceptance of a version permanently
authorizes you to choose that version for the Document.
11. RELICENSING
"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
World Wide Web server that publishes copyrightable works and also
provides prominent facilities for anybody to edit those works. A
public wiki that anybody can edit is an example of such a server.
A "Massive Multiauthor Collaboration" (or "MMC") contained in the
site means any set of copyrightable works thus published on the MMC
site.
"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
license published by Creative Commons Corporation, a not-for-profit
corporation with a principal place of business in San Francisco,
California, as well as future copyleft versions of that license
published by that same organization.
"Incorporate" means to publish or republish a Document, in whole or
in part, as part of another Document.
An MMC is "eligible for relicensing" if it is licensed under this
License, and if all works that were first published under this
License somewhere other than this MMC, and subsequently
incorporated in whole or in part into the MMC, (1) had no cover
texts or invariant sections, and (2) were thus incorporated prior
to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the
site under CC-BY-SA on the same site at any time before August 1,
2009, provided the MMC is eligible for relicensing.
ADDENDUM: How to use this License for your documents
====================================================
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and license
notices just after the title page:
Copyright (C) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
If you have Invariant Sections, Front-Cover Texts and Back-Cover
Texts, replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with
the Front-Cover Texts being LIST, and with the Back-Cover Texts
being LIST.
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License, to
permit their use in free software.
File: cssc.info, Node: BSD Code, Next: Glossary, Prev: GNU Free Documentation License, Up: Top
BSD Code
********
The program `sccs', its source code, and its accompanying
documentation are covered by the following license:-
Copyright (C) 1998, 1999
Free Software Foundation, Inc. All rights reserved.
Copyright (c) 1980, 1993
The Regents of the University of California. All rights
reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
3. Neither the name of the University nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The original version of the copyright notice above dates from 1993,
as you can see. However, since that time a change has been made to the
BSD license by UCB itself. This change is described on the following
letter, which is available on the BSD FTP site in the file
`README.Impt.License.Change' :-
July 22, 1999
To All Licensees, Distributors of Any Version of BSD:
As you know, certain of the Berkeley Software Distribution ("BSD")
source code files require that further distributions of products
containing all or portions of the software, acknowledge within
their advertising materials that such products contain software
developed by UC Berkeley and its contributors.
Specifically, the provision reads:
" * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors."
Effective immediately, licensees and distributors are no longer
required to include the acknowledgement within advertising
materials. Accordingly, the foregoing paragraph of those BSD Unix
files containing it is hereby deleted in its entirety.
William Hoskins
Director, Office of Technology Licensing
University of California, Berkeley
This change has been made to the file `COPYING.bsd' which
accompanies the BSD-derived code.
File: cssc.info, Node: Glossary, Next: Concept Index, Prev: BSD Code, Up: Top
Glossary
********
archive
In the context of SCCS and CSSC, This means the same as "history
file".
branch
Notionally, a branch is a parallel or forked stream of changes.
See "branching".
body
The actual data within the version-controlled file is called the
"body", though this is also sometimes used to refer to that part of
the SCCS history file that contains data from the body of the
controlled file (that is, information _from_ the file as opposed
to information _about_ the file).
branching
Multiple lines of development are called branches; a branch is
created by editing a version of a file which already has a derived
version (e.g. editing version 1.2 when version 1.3 already exists).
checkin comment
The `delta' program asks for a checkin comment; this is a comment
which summarised the nature of the change which has just been made
to the file.
controlled file
This is the (working copy of a) file which is version-controlled
with an SCCS history file (that is, a file which is managed by
SCCS or CSSC).
d-file
*Note Filenames::.
delta
Each revision of a controlled file, as recorded in an SCCS file is
called a _delta_. This is also the name of the program used to
check in such changes to the file.
delta table
This is the section of the SCCS file which records information
about each change that has been made (other than the actual
contents of the file at that version).
excluded delta
An excluded delta is one which was specified with the `-x' option
to `get'. See *note Options for `get': get options.
g-file
See _gotten file_.
gotten file
This is the working copy of the file; this is read-only unless the
file has been checked out for editing.
history file
Also known as an SCCS archive or "s-file". When SCCS or CSSC is
used to keep a historical record of previous versions of the
contents of a file, the file in which this historical information
is recorded is called the "history file". Sometimes there are
known as "s-files" or "archives" (though "archive" is more often
used in relation to the `ar' and `tar' utilities).
ignored delta
An ignored delta is one which was specified with the `-g' option
to `delta'. *Note Options for `delta': delta options.
included delta
An included delta is one which was specified with the `-i' option
to `get'. See *note Options for `get': get options.
keyword
It is sometimes useful to include information in the gotten file
about what its version number is and so on. Since this
information changes with each revision of the file, it makes sense
for SCCS (or CSSC) to keep track of this information and place it
in the gotten file accordingly. If a file is checked out for
editing, placeholders can be edited into the file which; these are
later expanded when the file is checked out read-only. See *note
Keyword Substitution::. The same name is also sometimes used for
the argument following the `-d' option for `prs'. See *note Data
Keywords for the `-d' option of `prs': Data Keywords.
level
The second component of the _SID_.
MR number
Modification Request numbers; if the `v' flag is set in the SCCS
file, you will be prompted for "MR numbers" when you check in a
new revision. These are not used internally by CSSC but may be
used to link changes to external things (for example bug report
numbers). *Note Options for `delta': delta options.
p-file
*Note Filenames::.
q-file
*Note Filenames::.
release
The first component of the _SID_.
revision
A _revision_ is a specific version of a file which is controlled
with an SCCS history file.
sequence number
The "sequence number" is a decimal number used within the SCCS
history file to identify a particular revision (or delta) of the
file. These numbers are normally not user-visible (except in the
output of `prt' and `prs'). These are sometimes referred to as a
"seqno" in order to distinguish them from the fourth component of
a SID.
s-file
The SCCS history file is sometimes referred to as the _s-file_.
See also *note Filenames::.
SID
Each revision of a file controlled with an SCCS history file is
identified by a "SID". This is a series of numbers separated by
dots. A complete SID always has either two components (for
revisions which lie on the trunk) or four components (for
revisions that lie on a branch). Examples are 1.1, 1.2 (which
both lie on the trunk), 1.3.1.1, 1.3.1.2 (which both lie on a
branch) and 1.3.2.1 (which lies on a different branch). The four
components of the SID are, left to right, the _release_, the
_level_, the _branch_ and the _sequence number_. See also
_sequence number_, above.
trunk
The trunk consists of those deltas within a history file which do
not lie on branches; trunk revisions have only two components in
their SID. Normally these are the main sequence of changes to the
file.
x-file
*Note Filenames::.
z-file
*Note Filenames::.
File: cssc.info, Node: Concept Index, Prev: Glossary, Up: Top
Concept Index
*************
[index ]
* Menu:
* @(#): what. (line 6)
* Activity summary: sact. (line 6)
* admin: admin. (line 6)
* Audit trailing: prs. (line 6)
* author: Overview. (line 21)
* Authorisation: admin. (line 18)
* backing out of changes: rmdel. (line 6)
* Binary files: admin. (line 29)
* BitKeeper <1>: Incompatibilities. (line 14)
* BitKeeper <2>: BitKeeper. (line 6)
* BitKeeper <3>: Delta Table. (line 108)
* BitKeeper <4>: Checksum Line. (line 20)
* BitKeeper <5>: Validation Warnings. (line 31)
* BitKeeper <6>: Flags. (line 25)
* BitKeeper: admin. (line 118)
* branch number: delta. (line 10)
* Branching <1>: branches. (line 6)
* Branching: Flags. (line 11)
* BSD <1>: BSD Code. (line 6)
* BSD: Overview. (line 21)
* Buffer overflows: Known Problems. (line 11)
* bug-fixing released code: branches. (line 6)
* bugs: Problems. (line 6)
* cdc: cdc. (line 6)
* censoring revisions: rmdel. (line 6)
* change delta commentary: cdc. (line 6)
* change summary: sccsdiff. (line 6)
* Change summary: prt. (line 6)
* changes, checking in: delta. (line 6)
* checking in changes: delta. (line 6)
* checking in new revisions: delta. (line 6)
* Checking sccs files for validity: val. (line 6)
* Checking the suite: Running the tests. (line 6)
* checking-out previous revisions: get. (line 6)
* checksum: admin. (line 55)
* comb: comb. (line 6)
* comment, changing: cdc. (line 6)
* Comments about CSSC: Problems. (line 24)
* committing changes: delta. (line 6)
* Concurrent editing: Flags. (line 31)
* Contributing test cases: Writing new test cases.
(line 6)
* creating SCCS files: admin. (line 6)
* Cuddlier interface: sccs. (line 6)
* CVS: Overview. (line 9)
* Data General: Bug-for-Bug. (line 18)
* deleting revisions: rmdel. (line 6)
* delta: delta. (line 6)
* delta comment, changing: cdc. (line 6)
* differences between revisions: sccsdiff. (line 6)
* docommand: docommand. (line 6)
* docommand function for test scripts: remove. (line 6)
* Dumping SCCS files: prs. (line 6)
* Dynix: SCCS Version Differences.
(line 37)
* echo: echo_nonl. (line 6)
* ekko: echo_nonl. (line 6)
* Emacs: Interface. (line 6)
* Eric Allman: Overview. (line 21)
* Extensions <1>: The Good News. (line 12)
* Extensions: CSSC Extensions. (line 6)
* Failures during multiple-file processing: Missing Features. (line 12)
* Flags: Flags. (line 6)
* forking: branches. (line 6)
* FreeBSD: BSD Code. (line 6)
* front-end tools: sccs. (line 6)
* g-file: get usage. (line 14)
* get: get. (line 6)
* GPL: Copying. (line 6)
* help program: help. (line 6)
* identification string: what. (line 6)
* initial release number: admin. (line 92)
* initialising SCCS history files: admin. (line 6)
* Insecurity: Known Problems. (line 11)
* interface: Interface. (line 6)
* invoking: Invoking CSSC Programs.
(line 6)
* Keyword Substitution <1>: Validation Warnings. (line 39)
* Keyword Substitution <2>: Keyword Substitution.
(line 6)
* Keyword Substitution <3>: get options. (line 60)
* Keyword Substitution: Flags. (line 30)
* Known bugs: Missing Features. (line 27)
* level number: delta. (line 10)
* Line length <1>: Unemulated Features. (line 23)
* Line length <2>: CSSC Extensions. (line 12)
* Line length <3>: SCCS Version Differences.
(line 12)
* Line length <4>: Configuration. (line 6)
* Line length <5>: Limitations of diff. (line 6)
* Line length: Maximum Line Length. (line 6)
* locking revisions for update: get. (line 6)
* maintainer: Problems. (line 6)
* Making branches: Flags. (line 11)
* missing features: Incomplete. (line 6)
* Modification summary: prt. (line 6)
* modifying released code: branches. (line 6)
* mr-numbers: Modification Request Numbers.
(line 6)
* MySC: Overview. (line 21)
* new versions: get. (line 6)
* obsolete releases: Flags. (line 60)
* Oops, it didn't compile: rmdel. (line 6)
* overview: Overview. (line 6)
* p-file: get options. (line 38)
* Pipes <1>: Unemulated Features. (line 9)
* Pipes: CSSC Extensions. (line 20)
* problems: Problems. (line 6)
* prs: prs. (line 6)
* prt: prt. (line 6)
* Questions about CSSC: Problems. (line 24)
* Race conditions: Known Problems. (line 13)
* release number: delta. (line 10)
* Restricting access to history files: admin. (line 18)
* retrieving previous revisions: get. (line 6)
* Reverting to where you were before you broke it: unget. (line 6)
* Revision summary: prt. (line 6)
* revision summary: prs. (line 6)
* rmdel: rmdel. (line 6)
* Ross Ridge: Overview. (line 21)
* sact: sact. (line 6)
* sccs: sccs. (line 6)
* SCCS ID: what. (line 26)
* sccs-admin: admin. (line 6)
* sccs-cdc: cdc. (line 6)
* sccs-comb: comb. (line 6)
* sccs-delta: delta. (line 6)
* sccs-get: get. (line 6)
* sccs-help: help. (line 6)
* sccs-prs: prs. (line 6)
* sccs-prt: prt. (line 6)
* sccs-rmdel: rmdel. (line 6)
* sccs-sact: sact. (line 6)
* sccs-sccsdiff: sccsdiff. (line 6)
* sccs-unget: unget. (line 6)
* sccs-val: val. (line 6)
* sccsdiff: sccsdiff. (line 6)
* SCO <1>: SCCS Version Differences.
(line 47)
* SCO <2>: Executable File Support.
(line 17)
* SCO: Flags. (line 44)
* Security problems: Known Problems. (line 11)
* sequence number: delta. (line 10)
* Setuid execution, why not to do it: Known Problems. (line 27)
* SID: delta. (line 10)
* Simultaneous editing: Flags. (line 31)
* Solaris <1>: SCCS Version Differences.
(line 23)
* Solaris <2>: Global Flags Section.
(line 34)
* Solaris: Flags. (line 94)
* success function for test scripts: success. (line 6)
* Suggestions for the improvement of CSSC: Problems. (line 24)
* Summary of changes to a history file: prt. (line 6)
* Summary of SCCS file: prs. (line 6)
* Sun Microsystems, Inc.: Year 2000 Issues. (line 13)
* test suite: Testing. (line 6)
* testing: Running the tests. (line 6)
* time travel <1>: Validation Warnings. (line 21)
* time travel: get options. (line 21)
* undoing revisions: rmdel. (line 6)
* unget: unget. (line 6)
* val: val. (line 6)
* validating SCCS files: val. (line 6)
* Validity checking: val. (line 6)
* VC-mode: Interface. (line 6)
* Version identifiers: Keyword Substitution.
(line 6)
* Warning messages: Missing Features. (line 21)
* what: what. (line 6)
* Whodunit: prs. (line 6)
* X/Open: Year 2000 Issues. (line 13)
* Year 2000 <1>: Year 2000 Issues. (line 6)
* Year 2000 <2>: prt options. (line 34)
* Year 2000 <3>: Data Keywords. (line 97)
* Year 2000 <4>: prs options. (line 11)
* Year 2000 <5>: Keyword Substitution.
(line 24)
* Year 2000: get options. (line 21)
Tag Table:
Node: Top847
Node: Overview2527
Node: Interface3727
Node: Invoking CSSC Programs4210
Node: admin5384
Node: Flags10827
Node: Modification Request Numbers14623
Node: cdc16205
Node: comb18476
Node: delta18762
Node: delta usage20372
Node: delta options21333
Node: get23959
Node: get usage24596
Node: get options25539
Node: branches30125
Node: Keyword Substitution32365
Node: Included Excluded and Ignored deltas34741
Node: help37525
Node: prs38376
Node: prs usage39585
Node: prs options40204
Node: Data Keywords42811
Node: prt48139
Node: prt usage48814
Node: prt options49503
Node: prt output53286
Node: rmdel55589
Node: sact56824
Node: sccs58019
Node: sccsdiff59384
Node: unget60700
Node: val61555
Node: Options for val62368
Node: Validation Warnings63533
Node: Return Value65860
Node: Paranoia66883
Node: what68877
Node: Filenames70573
Node: File Format72672
Node: File Format Overview73130
Node: The Header73918
Node: Checksum Line74236
Node: Delta Table75114
Node: Authorised User List81279
Node: Global Flags Section82102
Node: File Description83945
Node: Example Header84632
Node: The Body85645
Node: Interoperability86529
Node: Binary File Support88004
Node: Executable File Support88984
Node: BitKeeper90054
Node: Maximum Line Length90824
Node: Limitations of diff93584
Node: Configuration95421
Node: Bug-for-Bug95907
Node: Incompatibilities97797
Node: SCCS Version Differences98779
Node: CSSC Extensions101987
Node: Environment105818
Node: Child Processes106308
Node: Configuration Variables107539
Node: Other Variables109117
Node: Incomplete112669
Node: Missing Features113028
Node: Known Problems114951
Node: Unemulated Features118119
Node: Year 2000 Issues120213
Node: The Good News121980
Node: The Bad News124247
Node: Year 2000 Summary125206
Node: Testing126292
Node: Running the tests126980
Node: Writing new test cases131177
Node: testing tests132925
Node: docommand134155
Node: remove136850
Node: success137367
Node: fail137659
Node: echo_nonl138189
Node: miscarry139081
Node: real-thing139545
Node: need-prt140485
Node: Problems141520
Node: Copying142821
Node: GNU Free Documentation License180378
Node: BSD Code205518
Node: Glossary209041
Node: Concept Index214393
End Tag Table
CSSC-1.3.0/docs/.ispell_english 0000644 0000000 0000000 00000001062 11362630513 013066 0000000 0000000 admin
authoraddr
CAE
cc
cdc
cindex
CONFIG
const
csect
cssc
cvs
desc
devel
dfn
dir
docommand
docs
email
emph
endif
exdent
fF
filll
finalout
foo
gpl
grep
gzip
http
IDS
ifinfo
ifndef
iftex
kbd
mr
MySC
noindent
org
printf
printindex
prs
prt
pt
pxref
ref
rel
retval
rmdel
sact
samp
sc
sccs
sccsdiff
sed
setchapternewpage
setfilename
settitle
shortcontents
sid
smallexample
stderr
stdout
subsubsection
texi
texinfo
titlepage
TODO
umsp
unescaped
unget
unnumberedsubsubsec
unset
url
uudecode
uuencode
val
var
VC
vskip
www
xopen
xref
xxx
yMyComment
Youngman
yymmddhhmmss
CSSC-1.3.0/docs/Platforms 0000644 0000000 0000000 00000023323 11374025765 011774 0000000 0000000 Porting People
--------------
The following people have helped ensure that CSSC has worked on
these platforms (at some stage):
James Youngman Red Hat Linux (x86)
4.1,4.2,5.0,5.1,5.2,5.9,
6.0, 6.2, 7.0, 7.1, 7.1.93
James Youngman Debian GNU/Linux versions
2.2 (SPARC64, Alpha),
3.0 (x86), 3.1 (x86),
5.0 (x86_64),
squeeze (x86_64).
James Youngman HPUX 9 (PA-RISC)
James Youngman Solaris 2.6 (SPARC),
Solaris 2.8 (SPARC)
Lars Hecking Solaris-2.5.1
Malcolm Boff Solaris-2.5.1
Lars Hecking IRIX 6.3 (GCC 2.7.x
configured for IRIX 5.3)
Lars Hecking IRIX 6.3 (GCC 2.8.0)
Richard Polton IRIX 5.3
Dave Bodenstab FreeBSD-2.0.5-950622-SNAP
Andy Sharp FreeBSD-2.2.2-RELEASE
James Youngman FreeBSD 4.3-RELEASE (x86)
Lars Hecking [*] SunOS 4
Mark Reynolds SunOS 4.1.3
Lars Hecking [*] AmigaOS (ixemul)
Andrew Bardsley [*] GNU Hurd
James Youngman Dynix/ptx 4.2
Mark Reynolds Ultrix 4.2 [SEE BELOW!]
Brad Crittenden Mac OS X [SEE BELOW]
Clement T. Cole MS Services for Unix /
Interix 3.0 SP-7.0.1701.1
[*] These entries denote that CSSC compiled successfully but the test
suite was not run.
Some of the platforms mentioned above are far from current. While
CSSC has worked on them at some point, quite a lot of changes to the
code have been made, so it's likely that at least some of these
platforms no longer work. This is not a policy decision, it's just
that I lack access to most of these systems.
Because GNU CSSC uses GNU "autoconf" to generate configuration
scripts, it's reasonable to expect CSSC to work on almost any version
of Unix with little or no modification. If modification is required,
it is best to modify "configure.ac" appropriately and let "configure"
determine what needs to be done. However, if you do not have GNU
Autoconf installed you will not be able to regenerate "configure" from
"configure.ac". In any case, please let know about
these required modifications (see the README file in the distribution
directory). Don't forget also to explain clearly *why* these
modifications are required, and on what systems.
The Makefile generated by the configure script appears to work with
GNU make but not always with the "make" utility that comes with all
platforms; if the "include" line makes your "make" utility fall over,
try GNU make.
If you wish to install GNU Autoconf, you can obtain it from the GNU
Project's FTP site, ftp.gnu.org. You will probably also find GNU
Automake useful.
CSSC has not, as far as I know, been widely tested with C++ compilers
other than GCC:-
Sun CC 5.5 Compiles, test suite unreported
EPC C++ Compiles, test suite passes
IRIX CC Fails to compile (see below)
Older versions of CSSC have been built and tested with most of the
versions of GCC between 2.7 and 3.4, including EGCS. At the time, the
code built correctly and the test suite passes. This does not mean
that if you try to compile the code with GCC 2.7 now, everything will
be fine. However, you should not have too many problems, even so.
Notes for specific platforms
============================
GNU/Linux
---------
The code should build without problems as-is. There is a workaround
for a bug in a few versions of glibc. See "GNU libc" below for more
details.
Solaris
-------
You need to build CSSC using GNU make because of the way that the
dependencies are used in the Makefile.
HPUX
----
To compile on HPUX 9 you have to use GNU make and /bin/posix/sh:
$ SHELL=/bin/posix/sh $SHELL ./configure
$ gmake SHELL=/bin/posix/sh
IRIX
----
To compile on IRIX it appears that GNU make is required. CSSC also
does not compile with IRIX's native cc, "CC". The IRIX compiler seems
not to support static template instantiation. (Thanks to Achim
Hoffmann for this information).
Ultrix 4.2
----------
Mark Reynolds has run the test suite on this platform (at CSSC version
0.11 alpha.pl2). All the tests except one pass. In the failing test,
we get a coredump:-
> All tests pass, except that anything involving get -r ANYTHING -p
> ... or get -r ANYTHING -s core dump. Again, when I have isolated the
> problem I will send a more detailed report along with (hopefully)
> patches.
To run the tests on this platform, one must use Bash :-
> Because this OS is so ancient, it is not possible to run "make
> check" out of the box. Both "sh" and "sh5" (the Sys V version of sh)
> give syntax errors loading the defs in common. However "make
> SHELL=bash check" does run (I'm using bash 2.03).
NetBSD
------
The Texinfo feature @env{} is not supported by version 1.68 of
Makeinfo which comes with some versions of NetBSD. To work around
this problem, you could apply the following sed command to
"cssc.texi":-
sed -e 's/@env{\([^]]*\)}/@code{\1}/'
FreeBSD
-------
You will need to build with GNU make.
GNU libc
--------
GNU libc 2.2.3 has a bug in it which means that if you use GCC 2.97 or
later, classes cannot have member functions called "printf". The
configure script works around this problem (by turning off
optimisation). The glibc bug is fixed in glibc 2.2.4. CSSC compiles
successfully under GCC version 3.01, with this workaround in place.
Windows NT / Cygwin
-------------------
See also "Microsoft Services for Unix", below.
CSSC's history files and working files must be stored and used on a
Cygwin file system mounted in 'binary mode' not 'text mode'.
CSSC compiles under the CYGWIN environment for Windows NT. CSSC
support under the Cygwin environment is nearly up to the standard of
Unix implementations, but there are three significant areas in which
it falls short :-
1. Files are often created with the wrong mode, but for the most part
the relevant program changes the mode of the output file to the
correct value immediately after closing the file.
2. The "Atomic" NFS locking support is done on Unix with the use of
link(2) and requires the ability to use link(2) on an open file; this
is a feature which is not supported under the Cygwin environment.
For this reason, it is unsafe to use the Cygwin version of CSSC on
SCCS files which are mounted via an NT NFS client. If, on the other hand,
the files are mounted via Samba, this should be safe (but has not been
tested).
3. Set-user-id execution will not work properly. Because of the
insecure nature of the current code base, this mode of operation
is not currently supported anyway, but this is liable to be
especially poor under Windows NT due to the significant differences in
the security models of Unix and Windows NT. The Cygwin environment
does provide tools for resolving this problem, but this has not been done.
A small number of the test cases for the "sccs.exe" binary fail under
CYGWIN; this is because, although they do the right thing, the output
messages are in the wrong order. The reason behind this is that under
Unix when you use "sccs unedit" the output of "get" appears before the
output of the "unget()" function, even though the unget() happens
first. This is because the output of the unget() function is buffered
and hence is only flushed to the output file when the parent process
exits. The stdio buffering arrangements for CYGWIN seem to be
slightly different, and this changes the ordering. For this reason,
test "h1" currently fails, and is skipped for CYGWIN.
Microsoft Services for Unix / Interix 3.0
-----------------------------------------
The following arguments were used for "configure":
./configure CFLAGS=-D_ALL_SOURCE CXXFLAGS=-D_ALL_SOURCE \
--build=i386 --host=i386-pc-interix --disable-nls \
--enable-binary --prefix=/usr/local \
--libexecdir=/usr/local/bin
gmake csscutildir=/usr/local/bin
Clement T. Cole reports that the above works with GNU GCC 2.93.x, but
not with the default SFU compiler (2.72).
Mac OS X
--------
According to Brad Crittenden , CSSC fails to compile
under Mac OS X with the default compiler (GCC 3.1). However, it does
work with the alternate compiler, GCC 2.95. To switch compilers,
execute the command "sudo gcc_select 2". To switch back, issue the
command "sudo gcc_select 3". You may also find it helpful to read the
Porting Guide at
.
If you attempt to compile with GCC 3.1. you may see the following error :-
g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c file.cc
filelock.h:50: storage size of `_ZTI9file_lock' isn't known
I don't know how to fix this error in any other way than to use GCC
version 2.95 instead, as described above. CSSC is know to work on
other systems with GCC 4.4, but I have no more up-to-date information
about the situaion on Mac OS X.
CSSC-1.3.0/docs/BUGS 0000644 0000000 0000000 00000000455 11374025765 010566 0000000 0000000 ************************ THIS FILE IS OBSOLETE! ***********************
Bugs for CSSC are recorded on the CSSC bug tracking system at
https://savannah.gnu.org/bugs/?group=cssc.
There are also some historical bugs at
http://sourceforge.net/projects/CSSC.
Local Variables:
mode: Text
End:
CSSC-1.3.0/docs/missing.txt 0000644 0000000 0000000 00000000744 11362630513 012304 0000000 0000000 The Time-stamp: line indicates when this file was last modified.
Time-stamp: <1999-03-13 11:52:17 james>
This file points out features of SCCS that are missing from CSSC, by
accident or design, but are not currently listed in the TODO file.
The reason they're not listed in the TODO file is generally either
that they involve a lot of work or that I don't think they're
important.
sccs-comb is not implemented.
sccs-help is not implemented. It won't be, either (see the manual).
CSSC-1.3.0/docs/Makefile.in 0000644 0000000 0000000 00000117422 11465500150 012136 0000000 0000000 # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = docs
DIST_COMMON = $(cssc_TEXINFOS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config-info.texi.in TODO \
texinfo.tex
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/cloexec.m4 $(top_srcdir)/m4/ctype.m4 \
$(top_srcdir)/m4/dirent-safer.m4 $(top_srcdir)/m4/dirent_h.m4 \
$(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dos.m4 \
$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/errno_h.m4 \
$(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-o.m4 \
$(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \
$(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \
$(top_srcdir)/m4/getdtablesize.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mode_t.m4 \
$(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/onceonly.m4 \
$(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
$(top_srcdir)/m4/signal_h.m4 $(top_srcdir)/m4/stat.m4 \
$(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
$(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/symlink.m4 \
$(top_srcdir)/m4/sys_file_h.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
$(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/time_h.m4 \
$(top_srcdir)/m4/ungetc.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/warn-on-use.m4 \
$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = config-info.texi
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
INFO_DEPS = $(srcdir)/cssc.info
TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
DVIS = cssc.dvi
PDFS = cssc.pdf
PSS = cssc.ps
HTMLS = cssc.html
TEXINFOS = cssc.texi
TEXI2DVI = texi2dvi
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
DVIPS = dvips
am__installdirs = "$(DESTDIR)$(infodir)"
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONFIG_DIFF_COMMAND = @CONFIG_DIFF_COMMAND@
CONFIG_INCLUDE = @CONFIG_INCLUDE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
ENOLINK_VALUE = @ENOLINK_VALUE@
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FCLOSE = @GNULIB_FCLOSE@
GNULIB_FCNTL = @GNULIB_FCNTL@
GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
GNULIB_FLOCK = @GNULIB_FLOCK@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF = @GNULIB_FPRINTF@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FSEEK = @GNULIB_FSEEK@
GNULIB_FSEEKO = @GNULIB_FSEEKO@
GNULIB_FSTATAT = @GNULIB_FSTATAT@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTELL = @GNULIB_FTELL@
GNULIB_FTELLO = @GNULIB_FTELLO@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
GNULIB_FWRITE = @GNULIB_FWRITE@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDELIM = @GNULIB_GETDELIM@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
GNULIB_GETLINE = @GNULIB_GETLINE@
GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
GNULIB_MBRLEN = @GNULIB_MBRLEN@
GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
GNULIB_MBSCHR = @GNULIB_MBSCHR@
GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
GNULIB_MBSINIT = @GNULIB_MBSINIT@
GNULIB_MBSLEN = @GNULIB_MBSLEN@
GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
GNULIB_MBSSEP = @GNULIB_MBSSEP@
GNULIB_MBSSPN = @GNULIB_MBSSPN@
GNULIB_MBSSTR = @GNULIB_MBSSTR@
GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
GNULIB_MEMCHR = @GNULIB_MEMCHR@
GNULIB_MEMMEM = @GNULIB_MEMMEM@
GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
GNULIB_MKFIFO = @GNULIB_MKFIFO@
GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
GNULIB_MKNOD = @GNULIB_MKNOD@
GNULIB_MKNODAT = @GNULIB_MKNODAT@
GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
GNULIB_MKTIME = @GNULIB_MKTIME@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
GNULIB_SCANDIR = @GNULIB_SCANDIR@
GNULIB_SETENV = @GNULIB_SETENV@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
GNULIB_STAT = @GNULIB_STAT@
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
GNULIB_STRDUP = @GNULIB_STRDUP@
GNULIB_STRERROR = @GNULIB_STRERROR@
GNULIB_STRNCAT = @GNULIB_STRNCAT@
GNULIB_STRNDUP = @GNULIB_STRNDUP@
GNULIB_STRNLEN = @GNULIB_STRNLEN@
GNULIB_STRPBRK = @GNULIB_STRPBRK@
GNULIB_STRPTIME = @GNULIB_STRPTIME@
GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
GNULIB_UNSETENV = @GNULIB_UNSETENV@
GNULIB_USLEEP = @GNULIB_USLEEP@
GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
GNULIB_VPRINTF = @GNULIB_VPRINTF@
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
GNULIB_WCTOB = @GNULIB_WCTOB@
GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
GNULIB_WRITE = @GNULIB_WRITE@
GREP = @GREP@
GXX = @GXX@
HAVE_ALPHASORT = @HAVE_ALPHASORT@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CHOWN = @HAVE_CHOWN@
HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FCNTL = @HAVE_FCNTL@
HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FLOCK = @HAVE_FLOCK@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
HAVE_FTELLO = @HAVE_FTELLO@
HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
HAVE_FUTIMENS = @HAVE_FUTIMENS@
HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
HAVE_GETGROUPS = @HAVE_GETGROUPS@
HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GRANTPT = @HAVE_GRANTPT@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_LCHMOD = @HAVE_LCHMOD@
HAVE_LCHOWN = @HAVE_LCHOWN@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
HAVE_LOCALTIME_R = @HAVE_LOCALTIME_R@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_MBSLEN = @HAVE_MBSLEN@
HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
HAVE_MEMCHR = @HAVE_MEMCHR@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
HAVE_MKDIRAT = @HAVE_MKDIRAT@
HAVE_MKDTEMP = @HAVE_MKDTEMP@
HAVE_MKFIFO = @HAVE_MKFIFO@
HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
HAVE_MKNOD = @HAVE_MKNOD@
HAVE_MKNODAT = @HAVE_MKNODAT@
HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OS_H = @HAVE_OS_H@
HAVE_PIPE2 = @HAVE_PIPE2@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_PREAD = @HAVE_PREAD@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PWRITE = @HAVE_PWRITE@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
HAVE_REALPATH = @HAVE_REALPATH@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
HAVE_RPMATCH = @HAVE_RPMATCH@
HAVE_SCANDIR = @HAVE_SCANDIR@
HAVE_SETENV = @HAVE_SETENV@
HAVE_SIGACTION = @HAVE_SIGACTION@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_SIGSET_T = @HAVE_SIGSET_T@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
HAVE_STRCASESTR = @HAVE_STRCASESTR@
HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
HAVE_STRPBRK = @HAVE_STRPBRK@
HAVE_STRPTIME = @HAVE_STRPTIME@
HAVE_STRSEP = @HAVE_STRSEP@
HAVE_STRTOD = @HAVE_STRTOD@
HAVE_STRTOLL = @HAVE_STRTOLL@
HAVE_STRTOULL = @HAVE_STRTOULL@
HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_FILE_H = @HAVE_SYS_FILE_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TTYNAME_R = @HAVE_TTYNAME_R@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
HAVE_UNSETENV = @HAVE_UNSETENV@
HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
HAVE_USLEEP = @HAVE_USLEEP@
HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
HAVE_VASPRINTF = @HAVE_VASPRINTF@
HAVE_VDPRINTF = @HAVE_VDPRINTF@
HAVE_WCHAR_H = @HAVE_WCHAR_H@
HAVE_WCHAR_T = @HAVE_WCHAR_T@
HAVE_WCRTOMB = @HAVE_WCRTOMB@
HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
HAVE_WINT_T = @HAVE_WINT_T@
HAVE__BOOL = @HAVE__BOOL@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@
NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
NEXT_CTYPE_H = @NEXT_CTYPE_H@
NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
NEXT_STDARG_H = @NEXT_STDARG_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STDINT_H = @NEXT_STDINT_H@
NEXT_STDIO_H = @NEXT_STDIO_H@
NEXT_STDLIB_H = @NEXT_STDLIB_H@
NEXT_STRING_H = @NEXT_STRING_H@
NEXT_SYS_FILE_H = @NEXT_SYS_FILE_H@
NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@
NEXT_TIME_H = @NEXT_TIME_H@
NEXT_UNISTD_H = @NEXT_UNISTD_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PR = @PR@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
REPLACE_FSTAT = @REPLACE_FSTAT@
REPLACE_FSTATAT = @REPLACE_FSTATAT@
REPLACE_FTELL = @REPLACE_FTELL@
REPLACE_FTELLO = @REPLACE_FTELLO@
REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
REPLACE_MBRLEN = @REPLACE_MBRLEN@
REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
REPLACE_MBSINIT = @REPLACE_MBSINIT@
REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
REPLACE_MKDIR = @REPLACE_MKDIR@
REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SETENV = @REPLACE_SETENV@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_UNSETENV = @REPLACE_UNSETENV@
REPLACE_USLEEP = @REPLACE_USLEEP@
REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
REPLACE_VPRINTF = @REPLACE_VPRINTF@
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
REPLACE_WCTOB = @REPLACE_WCTOB@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REPLACE_WRITE = @REPLACE_WRITE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
STDARG_H = @STDARG_H@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
UNAME = @UNAME@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
VALGRIND = @VALGRIND@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
ZCAT_PROGRAM = @ZCAT_PROGRAM@
abs_aux_dir = @abs_aux_dir@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
enable_binary = @enable_binary@
exec_prefix = @exec_prefix@
gl_LIBOBJS = @gl_LIBOBJS@
gl_LTLIBOBJS = @gl_LTLIBOBJS@
gltests_LIBOBJS = @gltests_LIBOBJS@
gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
gltests_WITNESS = @gltests_WITNESS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
max_line_length_description = @max_line_length_description@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
info_TEXINFOS = cssc.texi
cssc_TEXINFOS = gpl-3.0.texi fdl.texi
EXTRA_DIST = BUGS TODO CREDITS TESTING \
missing.txt patches.txt \
Platforms mailing-list.txt style.txt \
.ispell_english
all: all-am
.SUFFIXES:
.SUFFIXES: .dvi .html .info .pdf .ps .texi
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu docs/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
config-info.texi: $(top_builddir)/config.status $(srcdir)/config-info.texi.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
.texi.info:
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
am__cwd=`pwd` && $(am__cd) $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
done; \
else :; fi && \
cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $@ $<; \
then \
rc=0; \
$(am__cd) $(srcdir); \
else \
rc=$$?; \
$(am__cd) $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \
rm -rf $$backupdir; exit $$rc
.texi.dvi:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2DVI) $<
.texi.pdf:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2PDF) $<
.texi.html:
rm -rf $(@:.html=.htp)
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $(@:.html=.htp) $<; \
then \
rm -rf $@; \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
else \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
exit 1; \
fi
$(srcdir)/cssc.info: cssc.texi $(cssc_TEXINFOS)
cssc.dvi: cssc.texi $(cssc_TEXINFOS)
cssc.pdf: cssc.texi $(cssc_TEXINFOS)
cssc.html: cssc.texi $(cssc_TEXINFOS)
.dvi.ps:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) -o $@ $<
uninstall-dvi-am:
@$(NORMAL_UNINSTALL)
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
rm -f "$(DESTDIR)$(dvidir)/$$f"; \
done
uninstall-html-am:
@$(NORMAL_UNINSTALL)
@list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
done
uninstall-info-am:
@$(PRE_UNINSTALL)
@if test -d '$(DESTDIR)$(infodir)' && \
(install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
done; \
else :; fi
@$(NORMAL_UNINSTALL)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \
done
uninstall-pdf-am:
@$(NORMAL_UNINSTALL)
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
done
uninstall-ps-am:
@$(NORMAL_UNINSTALL)
@list='$(PSS)'; test -n "$(psdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
rm -f "$(DESTDIR)$(psdir)/$$f"; \
done
dist-info: $(INFO_DEPS)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for base in $$list; do \
case $$base in \
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
if test -f $$file; then \
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
test -f "$(distdir)/$$relfile" || \
cp -p $$file "$(distdir)/$$relfile"; \
else :; fi; \
done; \
done
mostlyclean-aminfo:
-rm -rf cssc.aux cssc.cp cssc.cps cssc.fn cssc.fns cssc.ky cssc.kys \
cssc.log cssc.pg cssc.pgs cssc.tmp cssc.toc cssc.tp cssc.tps \
cssc.vr cssc.vrs
clean-aminfo:
-test -z "cssc.dvi cssc.pdf cssc.ps cssc.html" \
|| rm -rf cssc.dvi cssc.pdf cssc.ps cssc.html
maintainer-clean-aminfo:
@list='$(INFO_DEPS)'; for i in $$list; do \
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-info
check-am: all-am
check: check-am
all-am: Makefile $(INFO_DEPS)
installdirs:
for dir in "$(DESTDIR)$(infodir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am: $(DVIS)
html: html-am
html-am: $(HTMLS)
info: info-am
info-am: $(INFO_DEPS)
install-data-am: install-info-am
install-dvi: install-dvi-am
install-dvi-am: $(DVIS)
@$(NORMAL_INSTALL)
test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
done
install-exec-am:
install-html: install-html-am
install-html-am: $(HTMLS)
@$(NORMAL_INSTALL)
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
for p in $$list; do \
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
$(am__strip_dir) \
if test -d "$$d$$p"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
$(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
else \
list2="$$list2 $$d$$p"; \
fi; \
done; \
test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
done; }
install-info: install-info-am
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
if test -f $$ifile; then \
echo "$$ifile"; \
else : ; fi; \
done; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
@$(POST_INSTALL)
@if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
done; \
else : ; fi
install-man:
install-pdf: install-pdf-am
install-pdf-am: $(PDFS)
@$(NORMAL_INSTALL)
test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
install-ps: install-ps-am
install-ps-am: $(PSS)
@$(NORMAL_INSTALL)
test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
@list='$(PSS)'; test -n "$(psdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am: $(PDFS)
ps: ps-am
ps-am: $(PSS)
uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
uninstall-pdf-am uninstall-ps-am
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
clean-libtool dist-info distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-aminfo \
maintainer-clean-generic mostlyclean mostlyclean-aminfo \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-dvi-am uninstall-html-am \
uninstall-info-am uninstall-pdf-am uninstall-ps-am
# The .ispell_english file is included in the distribution because it
# is useful for the list of correct spellings in this document to
# accompany the document itself.
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
CSSC-1.3.0/docs/texinfo.tex 0000644 0000000 0000000 00001100351 11366250247 012272 0000000 0000000 % texinfo.tex -- TeX macros to handle Texinfo files.
%
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2009-08-14.15}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
% 2007, 2008, 2009 Free Software Foundation, Inc.
%
% This texinfo.tex 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 3 of the
% License, or (at your option) any later version.
%
% This texinfo.tex file 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, see .
%
% As a special exception, when this file is read by TeX when processing
% a Texinfo source document, you may use the result without
% restriction. (This has been our intent since Texinfo was invented.)
%
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
% ftp://tug.org/tex/texinfo.tex
% (and all CTAN mirrors, see http://www.ctan.org).
% The texinfo.tex in any given distribution could well be out
% of date, so if that's what you're using, please check.
%
% Send bug reports to bug-texinfo@gnu.org. Please include including a
% complete document in each bug report with which we can reproduce the
% problem. Patches are, of course, greatly appreciated.
%
% To process a Texinfo manual with TeX, it's most reliable to use the
% texi2dvi shell script that comes with the distribution. For a simple
% manual foo.texi, however, you can get away with this:
% tex foo.texi
% texindex foo.??
% tex foo.texi
% tex foo.texi
% dvips foo.dvi -o # or whatever; this makes foo.ps.
% The extra TeX runs get the cross-reference information correct.
% Sometimes one run after texindex suffices, and sometimes you need more
% than two; texi2dvi does it as many times as necessary.
%
% It is possible to adapt texinfo.tex for other languages, to some
% extent. You can get the existing language-specific files from the
% full Texinfo distribution.
%
% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
\message{Loading texinfo [version \texinfoversion]:}
% If in a .fmt file, print the version number
% and turn on active characters that we couldn't do earlier because
% they might have appeared in the input file name.
\everyjob{\message{[Texinfo version \texinfoversion]}%
\catcode`+=\active \catcode`\_=\active}
\chardef\other=12
% We never want plain's \outer definition of \+ in Texinfo.
% For @tex, we can use \tabalign.
\let\+ = \relax
% Save some plain tex macros whose names we will redefine.
\let\ptexb=\b
\let\ptexbullet=\bullet
\let\ptexc=\c
\let\ptexcomma=\,
\let\ptexdot=\.
\let\ptexdots=\dots
\let\ptexend=\end
\let\ptexequiv=\equiv
\let\ptexexclam=\!
\let\ptexfootnote=\footnote
\let\ptexgtr=>
\let\ptexhat=^
\let\ptexi=\i
\let\ptexindent=\indent
\let\ptexinsert=\insert
\let\ptexlbrace=\{
\let\ptexless=<
\let\ptexnewwrite\newwrite
\let\ptexnoindent=\noindent
\let\ptexplus=+
\let\ptexrbrace=\}
\let\ptexslash=\/
\let\ptexstar=\*
\let\ptext=\t
\let\ptextop=\top
{\catcode`\'=\active
\global\let\ptexquoteright'}% Math-mode def from plain.tex.
\let\ptexraggedright=\raggedright
% If this character appears in an error message or help string, it
% starts a new line in the output.
\newlinechar = `^^J
% Use TeX 3.0's \inputlineno to get the line number, for better error
% messages, but if we're using an old version of TeX, don't do anything.
%
\ifx\inputlineno\thisisundefined
\let\linenumber = \empty % Pre-3.0.
\else
\def\linenumber{l.\the\inputlineno:\space}
\fi
% Set up fixed words for English if not already set.
\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
\ifx\putwordin\undefined \gdef\putwordin{in}\fi
\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
\ifx\putwordof\undefined \gdef\putwordof{of}\fi
\ifx\putwordon\undefined \gdef\putwordon{on}\fi
\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
%
\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
%
\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
% Since the category of space is not known, we have to be careful.
\chardef\spacecat = 10
\def\spaceisspace{\catcode`\ =\spacecat}
% sometimes characters are active, so we need control sequences.
\chardef\colonChar = `\:
\chardef\commaChar = `\,
\chardef\dashChar = `\-
\chardef\dotChar = `\.
\chardef\exclamChar= `\!
\chardef\lquoteChar= `\`
\chardef\questChar = `\?
\chardef\rquoteChar= `\'
\chardef\semiChar = `\;
\chardef\underChar = `\_
% Ignore a token.
%
\def\gobble#1{}
% The following is used inside several \edef's.
\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
% Hyphenation fixes.
\hyphenation{
Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
ap-pen-dix bit-map bit-maps
data-base data-bases eshell fall-ing half-way long-est man-u-script
man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
spell-ing spell-ings
stand-alone strong-est time-stamp time-stamps which-ever white-space
wide-spread wrap-around
}
% Margin to add to right of even pages, to left of odd pages.
\newdimen\bindingoffset
\newdimen\normaloffset
\newdimen\pagewidth \newdimen\pageheight
% For a final copy, take out the rectangles
% that mark overfull boxes (in case you have decided
% that the text looks ok even though it passes the margin).
%
\def\finalout{\overfullrule=0pt}
% @| inserts a changebar to the left of the current line. It should
% surround any changed text. This approach does *not* work if the
% change spans more than two lines of output. To handle that, we would
% have adopt a much more difficult approach (putting marks into the main
% vertical list for the beginning and end of each change).
%
\def\|{%
% \vadjust can only be used in horizontal mode.
\leavevmode
%
% Append this vertical mode material after the current line in the output.
\vadjust{%
% We want to insert a rule with the height and depth of the current
% leading; that is exactly what \strutbox is supposed to record.
\vskip-\baselineskip
%
% \vadjust-items are inserted at the left edge of the type. So
% the \llap here moves out into the left-hand margin.
\llap{%
%
% For a thicker or thinner bar, change the `1pt'.
\vrule height\baselineskip width1pt
%
% This is the space between the bar and the text.
\hskip 12pt
}%
}%
}
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
% since that produces some useless output on the terminal. We also make
% some effort to order the tracing commands to reduce output in the log
% file; cf. trace.sty in LaTeX.
%
\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
\def\loggingall{%
\tracingstats2
\tracingpages1
\tracinglostchars2 % 2 gives us more in etex
\tracingparagraphs1
\tracingoutput1
\tracingmacros2
\tracingrestores1
\showboxbreadth\maxdimen \showboxdepth\maxdimen
\ifx\eTeXversion\undefined\else % etex gives us more logging
\tracingscantokens1
\tracingifs1
\tracinggroups1
\tracingnesting2
\tracingassigns1
\fi
\tracingcommands3 % 3 gives us more in etex
\errorcontextlines16
}%
% add check for \lastpenalty to plain's definitions. If the last thing
% we did was a \nobreak, we don't want to insert more space.
%
\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
\removelastskip\penalty-50\smallskip\fi\fi}
\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
\removelastskip\penalty-100\medskip\fi\fi}
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
\removelastskip\penalty-200\bigskip\fi\fi}
% For @cropmarks command.
% Do @cropmarks to get crop marks.
%
\newif\ifcropmarks
\let\cropmarks = \cropmarkstrue
%
% Dimensions to add cropmarks at corners.
% Added by P. A. MacKay, 12 Nov. 1986
%
\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
\newdimen\cornerlong \cornerlong=1pc
\newdimen\cornerthick \cornerthick=.3pt
\newdimen\topandbottommargin \topandbottommargin=.75in
% Output a mark which sets \thischapter, \thissection and \thiscolor.
% We dump everything together because we only have one kind of mark.
% This works because we only use \botmark / \topmark, not \firstmark.
%
% A mark contains a subexpression of the \ifcase ... \fi construct.
% \get*marks macros below extract the needed part using \ifcase.
%
% Another complication is to let the user choose whether \thischapter
% (\thissection) refers to the chapter (section) in effect at the top
% of a page, or that at the bottom of a page. The solution is
% described on page 260 of The TeXbook. It involves outputting two
% marks for the sectioning macros, one before the section break, and
% one after. I won't pretend I can describe this better than DEK...
\def\domark{%
\toks0=\expandafter{\lastchapterdefs}%
\toks2=\expandafter{\lastsectiondefs}%
\toks4=\expandafter{\prevchapterdefs}%
\toks6=\expandafter{\prevsectiondefs}%
\toks8=\expandafter{\lastcolordefs}%
\mark{%
\the\toks0 \the\toks2
\noexpand\or \the\toks4 \the\toks6
\noexpand\else \the\toks8
}%
}
% \topmark doesn't work for the very first chapter (after the title
% page or the contents), so we use \firstmark there -- this gets us
% the mark with the chapter defs, unless the user sneaks in, e.g.,
% @setcolor (or @url, or @link, etc.) between @contents and the very
% first @chapter.
\def\gettopheadingmarks{%
\ifcase0\topmark\fi
\ifx\thischapter\empty \ifcase0\firstmark\fi \fi
}
\def\getbottomheadingmarks{\ifcase1\botmark\fi}
\def\getcolormarks{\ifcase2\topmark\fi}
% Avoid "undefined control sequence" errors.
\def\lastchapterdefs{}
\def\lastsectiondefs{}
\def\prevchapterdefs{}
\def\prevsectiondefs{}
\def\lastcolordefs{}
% Main output routine.
\chardef\PAGE = 255
\output = {\onepageout{\pagecontents\PAGE}}
\newbox\headlinebox
\newbox\footlinebox
% \onepageout takes a vbox as an argument. Note that \pagecontents
% does insertions, but you have to call it yourself.
\def\onepageout#1{%
\ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
%
\ifodd\pageno \advance\hoffset by \bindingoffset
\else \advance\hoffset by -\bindingoffset\fi
%
% Do this outside of the \shipout so @code etc. will be expanded in
% the headline as they should be, not taken literally (outputting ''code).
\ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
\setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
\ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
\setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
%
{%
% Have to do this stuff outside the \shipout because we want it to
% take effect in \write's, yet the group defined by the \vbox ends
% before the \shipout runs.
%
\indexdummies % don't expand commands in the output.
\normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example.
% We don't want .vr (or whatever) entries like this:
% \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
% "\acronym" won't work when it's read back in;
% it needs to be
% {\code {{\tt \backslashcurfont }acronym}
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
%
\ifcropmarks \vbox to \outervsize\bgroup
\hsize = \outerhsize
\vskip-\topandbottommargin
\vtop to0pt{%
\line{\ewtop\hfil\ewtop}%
\nointerlineskip
\line{%
\vbox{\moveleft\cornerthick\nstop}%
\hfill
\vbox{\moveright\cornerthick\nstop}%
}%
\vss}%
\vskip\topandbottommargin
\line\bgroup
\hfil % center the page within the outer (page) hsize.
\ifodd\pageno\hskip\bindingoffset\fi
\vbox\bgroup
\fi
%
\unvbox\headlinebox
\pagebody{#1}%
\ifdim\ht\footlinebox > 0pt
% Only leave this space if the footline is nonempty.
% (We lessened \vsize for it in \oddfootingyyy.)
% The \baselineskip=24pt in plain's \makefootline has no effect.
\vskip 24pt
\unvbox\footlinebox
\fi
%
\ifcropmarks
\egroup % end of \vbox\bgroup
\hfil\egroup % end of (centering) \line\bgroup
\vskip\topandbottommargin plus1fill minus1fill
\boxmaxdepth = \cornerthick
\vbox to0pt{\vss
\line{%
\vbox{\moveleft\cornerthick\nsbot}%
\hfill
\vbox{\moveright\cornerthick\nsbot}%
}%
\nointerlineskip
\line{\ewbot\hfil\ewbot}%
}%
\egroup % \vbox from first cropmarks clause
\fi
}% end of \shipout\vbox
}% end of group with \indexdummies
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi
}
\newinsert\margin \dimen\margin=\maxdimen
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
{\catcode`\@ =11
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
% marginal hacks, juha@viisa.uucp (Juha Takala)
\ifvoid\margin\else % marginal info is present
\rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
\dimen@=\dp#1\relax \unvbox#1\relax
\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
}
% Here are the rules for the cropmarks. Note that they are
% offset so that the space between them is truly \outerhsize or \outervsize
% (P. A. MacKay, 12 November, 1986)
%
\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
\def\nstop{\vbox
{\hrule height\cornerthick depth\cornerlong width\cornerthick}}
\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
\def\nsbot{\vbox
{\hrule height\cornerlong depth\cornerthick width\cornerthick}}
% Parse an argument, then pass it to #1. The argument is the rest of
% the input line (except we remove a trailing comment). #1 should be a
% macro which expects an ordinary undelimited TeX argument.
%
\def\parsearg{\parseargusing{}}
\def\parseargusing#1#2{%
\def\argtorun{#2}%
\begingroup
\obeylines
\spaceisspace
#1%
\parseargline\empty% Insert the \empty token, see \finishparsearg below.
}
{\obeylines %
\gdef\parseargline#1^^M{%
\endgroup % End of the group started in \parsearg.
\argremovecomment #1\comment\ArgTerm%
}%
}
% First remove any @comment, then any @c comment.
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
% Each occurrence of `\^^M' or `\^^M' is replaced by a single space.
%
% \argremovec might leave us with trailing space, e.g.,
% @end itemize @c foo
% This space token undergoes the same procedure and is eventually removed
% by \finishparsearg.
%
\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
\def\temp{#3}%
\ifx\temp\empty
% Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
\let\temp\finishparsearg
\else
\let\temp\argcheckspaces
\fi
% Put the space token in:
\temp#1 #3\ArgTerm
}
% If a _delimited_ argument is enclosed in braces, they get stripped; so
% to get _exactly_ the rest of the line, we had to prevent such situation.
% We prepended an \empty token at the very beginning and we expand it now,
% just before passing the control to \argtorun.
% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
% either the null string, or it ends with \^^M---thus there is no danger
% that a pair of braces would be stripped.
%
% But first, we have to remove the trailing space token.
%
\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
% \parseargdef\foo{...}
% is roughly equivalent to
% \def\foo{\parsearg\Xfoo}
% \def\Xfoo#1{...}
%
% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
% favourite TeX trick. --kasal, 16nov03
\def\parseargdef#1{%
\expandafter \doparseargdef \csname\string#1\endcsname #1%
}
\def\doparseargdef#1#2{%
\def#2{\parsearg#1}%
\def#1##1%
}
% Several utility definitions with active space:
{
\obeyspaces
\gdef\obeyedspace{ }
% Make each space character in the input produce a normal interword
% space in the output. Don't allow a line break at this space, as this
% is used only in environments like @example, where each line of input
% should produce a line of output anyway.
%
\gdef\sepspaces{\obeyspaces\let =\tie}
% If an index command is used in an @example environment, any spaces
% therein should become regular spaces in the raw index file, not the
% expansion of \tie (\leavevmode \penalty \@M \ ).
\gdef\unsepspaces{\let =\space}
}
\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
% Define the framework for environments in texinfo.tex. It's used like this:
%
% \envdef\foo{...}
% \def\Efoo{...}
%
% It's the responsibility of \envdef to insert \begingroup before the
% actual body; @end closes the group after calling \Efoo. \envdef also
% defines \thisenv, so the current environment is known; @end checks
% whether the environment name matches. The \checkenv macro can also be
% used to check whether the current environment is the one expected.
%
% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
% are not treated as environments; they don't open a group. (The
% implementation of @end takes care not to call \endgroup in this
% special case.)
% At run-time, environments start with this:
\def\startenvironment#1{\begingroup\def\thisenv{#1}}
% initialize
\let\thisenv\empty
% ... but they get defined via ``\envdef\foo{...}'':
\long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
% Check whether we're in the right environment:
\def\checkenv#1{%
\def\temp{#1}%
\ifx\thisenv\temp
\else
\badenverr
\fi
}
% Environment mismatch, #1 expected:
\def\badenverr{%
\errhelp = \EMsimple
\errmessage{This command can appear only \inenvironment\temp,
not \inenvironment\thisenv}%
}
\def\inenvironment#1{%
\ifx#1\empty
out of any environment%
\else
in environment \expandafter\string#1%
\fi
}
% @end foo executes the definition of \Efoo.
% But first, it executes a specialized version of \checkenv
%
\parseargdef\end{%
\if 1\csname iscond.#1\endcsname
\else
% The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
\expandafter\checkenv\csname#1\endcsname
\csname E#1\endcsname
\endgroup
\fi
}
\newhelp\EMsimple{Press RETURN to continue.}
%% Simple single-character @ commands
% @@ prints an @
% Kludge this until the fonts are right (grr).
\def\@{{\tt\char64}}
% This is turned off because it was never documented
% and you can use @w{...} around a quote to suppress ligatures.
%% Define @` and @' to be the same as ` and '
%% but suppressing ligatures.
%\def\`{{`}}
%\def\'{{'}}
% Used to generate quoted braces.
\def\mylbrace {{\tt\char123}}
\def\myrbrace {{\tt\char125}}
\let\{=\mylbrace
\let\}=\myrbrace
\begingroup
% Definitions to produce \{ and \} commands for indices,
% and @{ and @} for the aux/toc files.
\catcode`\{ = \other \catcode`\} = \other
\catcode`\[ = 1 \catcode`\] = 2
\catcode`\! = 0 \catcode`\\ = \other
!gdef!lbracecmd[\{]%
!gdef!rbracecmd[\}]%
!gdef!lbraceatcmd[@{]%
!gdef!rbraceatcmd[@}]%
!endgroup
% @comma{} to avoid , parsing problems.
\let\comma = ,
% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
\let\, = \c
\let\dotaccent = \.
\def\ringaccent#1{{\accent23 #1}}
\let\tieaccent = \t
\let\ubaraccent = \b
\let\udotaccent = \d
% Other special characters: @questiondown @exclamdown @ordf @ordm
% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
\def\questiondown{?`}
\def\exclamdown{!`}
\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
% Dotless i and dotless j, used for accents.
\def\imacro{i}
\def\jmacro{j}
\def\dotless#1{%
\def\temp{#1}%
\ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
\else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
\else \errmessage{@dotless can be used only with i or j}%
\fi\fi
}
% The \TeX{} logo, as in plain, but resetting the spacing so that a
% period following counts as ending a sentence. (Idea found in latex.)
%
\edef\TeX{\TeX \spacefactor=1000 }
% @LaTeX{} logo. Not quite the same results as the definition in
% latex.ltx, since we use a different font for the raised A; it's most
% convenient for us to use an explicitly smaller font, rather than using
% the \scriptstyle font (since we don't reset \scriptstyle and
% \scriptscriptstyle).
%
\def\LaTeX{%
L\kern-.36em
{\setbox0=\hbox{T}%
\vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
\kern-.15em
\TeX
}
% Be sure we're in horizontal mode when doing a tie, since we make space
% equivalent to this in @example-like environments. Otherwise, a space
% at the beginning of a line will start with \penalty -- and
% since \penalty is valid in vertical mode, we'd end up putting the
% penalty on the vertical list instead of in the new paragraph.
{\catcode`@ = 11
% Avoid using \@M directly, because that causes trouble
% if the definition is written into an index file.
\global\let\tiepenalty = \@M
\gdef\tie{\leavevmode\penalty\tiepenalty\ }
}
% @: forces normal size whitespace following.
\def\:{\spacefactor=1000 }
% @* forces a line break.
\def\*{\hfil\break\hbox{}\ignorespaces}
% @/ allows a line break.
\let\/=\allowbreak
% @. is an end-of-sentence period.
\def\.{.\spacefactor=\endofsentencespacefactor\space}
% @! is an end-of-sentence bang.
\def\!{!\spacefactor=\endofsentencespacefactor\space}
% @? is an end-of-sentence query.
\def\?{?\spacefactor=\endofsentencespacefactor\space}
% @frenchspacing on|off says whether to put extra space after punctuation.
%
\def\onword{on}
\def\offword{off}
%
\parseargdef\frenchspacing{%
\def\temp{#1}%
\ifx\temp\onword \plainfrenchspacing
\else\ifx\temp\offword \plainnonfrenchspacing
\else
\errhelp = \EMsimple
\errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
\fi\fi
}
% @w prevents a word break. Without the \leavevmode, @w at the
% beginning of a paragraph, when TeX is still in vertical mode, would
% produce a whole line of output instead of starting the paragraph.
\def\w#1{\leavevmode\hbox{#1}}
% @group ... @end group forces ... to be all on one page, by enclosing
% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
% to keep its height that of a normal line. According to the rules for
% \topskip (p.114 of the TeXbook), the glue inserted is
% max (\topskip - \ht (first item), 0). If that height is large,
% therefore, no glue is inserted, and the space between the headline and
% the text is small, which looks bad.
%
% Another complication is that the group might be very large. This can
% cause the glue on the previous page to be unduly stretched, because it
% does not have much material. In this case, it's better to add an
% explicit \vfill so that the extra space is at the bottom. The
% threshold for doing this is if the group is more than \vfilllimit
% percent of a page (\vfilllimit can be changed inside of @tex).
%
\newbox\groupbox
\def\vfilllimit{0.7}
%
\envdef\group{%
\ifnum\catcode`\^^M=\active \else
\errhelp = \groupinvalidhelp
\errmessage{@group invalid in context where filling is enabled}%
\fi
\startsavinginserts
%
\setbox\groupbox = \vtop\bgroup
% Do @comment since we are called inside an environment such as
% @example, where each end-of-line in the input causes an
% end-of-line in the output. We don't want the end-of-line after
% the `@group' to put extra space in the output. Since @group
% should appear on a line by itself (according to the Texinfo
% manual), we don't worry about eating any user text.
\comment
}
%
% The \vtop produces a box with normal height and large depth; thus, TeX puts
% \baselineskip glue before it, and (when the next line of text is done)
% \lineskip glue after it. Thus, space below is not quite equal to space
% above. But it's pretty close.
\def\Egroup{%
% To get correct interline space between the last line of the group
% and the first line afterwards, we have to propagate \prevdepth.
\endgraf % Not \par, as it may have been set to \lisppar.
\global\dimen1 = \prevdepth
\egroup % End the \vtop.
% \dimen0 is the vertical size of the group's box.
\dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
% \dimen2 is how much space is left on the page (more or less).
\dimen2 = \pageheight \advance\dimen2 by -\pagetotal
% if the group doesn't fit on the current page, and it's a big big
% group, force a page break.
\ifdim \dimen0 > \dimen2
\ifdim \pagetotal < \vfilllimit\pageheight
\page
\fi
\fi
\box\groupbox
\prevdepth = \dimen1
\checkinserts
}
%
% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
% message, so this ends up printing `@group can only ...'.
%
\newhelp\groupinvalidhelp{%
group can only be used in environments such as @example,^^J%
where each line of input produces a line of output.}
% @need space-in-mils
% forces a page break if there is not space-in-mils remaining.
\newdimen\mil \mil=0.001in
% Old definition--didn't work.
%\parseargdef\need{\par %
%% This method tries to make TeX break the page naturally
%% if the depth of the box does not fit.
%{\baselineskip=0pt%
%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
%\prevdepth=-1000pt
%}}
\parseargdef\need{%
% Ensure vertical mode, so we don't make a big box in the middle of a
% paragraph.
\par
%
% If the @need value is less than one line space, it's useless.
\dimen0 = #1\mil
\dimen2 = \ht\strutbox
\advance\dimen2 by \dp\strutbox
\ifdim\dimen0 > \dimen2
%
% Do a \strut just to make the height of this box be normal, so the
% normal leading is inserted relative to the preceding line.
% And a page break here is fine.
\vtop to #1\mil{\strut\vfil}%
%
% TeX does not even consider page breaks if a penalty added to the
% main vertical list is 10000 or more. But in order to see if the
% empty box we just added fits on the page, we must make it consider
% page breaks. On the other hand, we don't want to actually break the
% page after the empty box. So we use a penalty of 9999.
%
% There is an extremely small chance that TeX will actually break the
% page at this \penalty, if there are no other feasible breakpoints in
% sight. (If the user is using lots of big @group commands, which
% almost-but-not-quite fill up a page, TeX will have a hard time doing
% good page breaking, for example.) However, I could not construct an
% example where a page broke at this \penalty; if it happens in a real
% document, then we can reconsider our strategy.
\penalty9999
%
% Back up by the size of the box, whether we did a page break or not.
\kern -#1\mil
%
% Do not allow a page break right after this kern.
\nobreak
\fi
}
% @br forces paragraph break (and is undocumented).
\let\br = \par
% @page forces the start of a new page.
%
\def\page{\par\vfill\supereject}
% @exdent text....
% outputs text on separate line in roman font, starting at standard page margin
% This records the amount of indent in the innermost environment.
% That's how much \exdent should take out.
\newskip\exdentamount
% This defn is used inside fill environments such as @defun.
\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
% This defn is used inside nofill environments such as @example.
\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
\leftline{\hskip\leftskip{\rm#1}}}}
% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
% paragraph. For more general purposes, use the \margin insertion
% class. WHICH is `l' or `r'.
%
\newskip\inmarginspacing \inmarginspacing=1cm
\def\strutdepth{\dp\strutbox}
%
\def\doinmargin#1#2{\strut\vadjust{%
\nobreak
\kern-\strutdepth
\vtop to \strutdepth{%
\baselineskip=\strutdepth
\vss
% if you have multiple lines of stuff to put here, you'll need to
% make the vbox yourself of the appropriate size.
\ifx#1l%
\llap{\ignorespaces #2\hskip\inmarginspacing}%
\else
\rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
\fi
\null
}%
}}
\def\inleftmargin{\doinmargin l}
\def\inrightmargin{\doinmargin r}
%
% @inmargin{TEXT [, RIGHT-TEXT]}
% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
% else use TEXT for both).
%
\def\inmargin#1{\parseinmargin #1,,\finish}
\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0 > 0pt
\def\lefttext{#1}% have both texts
\def\righttext{#2}%
\else
\def\lefttext{#1}% have only one text
\def\righttext{#1}%
\fi
%
\ifodd\pageno
\def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
\else
\def\temp{\inleftmargin\lefttext}%
\fi
\temp
}
% @include FILE -- \input text of FILE.
%
\def\include{\parseargusing\filenamecatcodes\includezzz}
\def\includezzz#1{%
\pushthisfilestack
\def\thisfile{#1}%
{%
\makevalueexpandable % we want to expand any @value in FILE.
\turnoffactive % and allow special characters in the expansion
\indexnofonts % Allow `@@' and other weird things in file names.
\edef\temp{\noexpand\input #1 }%
%
% This trickery is to read FILE outside of a group, in case it makes
% definitions, etc.
\expandafter
}\temp
\popthisfilestack
}
\def\filenamecatcodes{%
\catcode`\\=\other
\catcode`~=\other
\catcode`^=\other
\catcode`_=\other
\catcode`|=\other
\catcode`<=\other
\catcode`>=\other
\catcode`+=\other
\catcode`-=\other
\catcode`\`=\other
\catcode`\'=\other
}
\def\pushthisfilestack{%
\expandafter\pushthisfilestackX\popthisfilestack\StackTerm
}
\def\pushthisfilestackX{%
\expandafter\pushthisfilestackY\thisfile\StackTerm
}
\def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
\gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
}
\def\popthisfilestack{\errthisfilestackempty}
\def\errthisfilestackempty{\errmessage{Internal error:
the stack of filenames is empty.}}
\def\thisfile{}
% @center line
% outputs that line, centered.
%
\parseargdef\center{%
\ifhmode
\let\next\centerH
\else
\let\next\centerV
\fi
\next{\hfil \ignorespaces#1\unskip \hfil}%
}
\def\centerH#1{%
{%
\hfil\break
\advance\hsize by -\leftskip
\advance\hsize by -\rightskip
\line{#1}%
\break
}%
}
\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
% @sp n outputs n lines of vertical space
\parseargdef\sp{\vskip #1\baselineskip}
% @comment ...line which is ignored...
% @c is the same as @comment
% @ignore ... @end ignore is another way to write a comment
\def\comment{\begingroup \catcode`\^^M=\other%
\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
\commentxxx}
{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
\let\c=\comment
% @paragraphindent NCHARS
% We'll use ems for NCHARS, close enough.
% NCHARS can also be the word `asis' or `none'.
% We cannot feasibly implement @paragraphindent asis, though.
%
\def\asisword{asis} % no translation, these are keywords
\def\noneword{none}
%
\parseargdef\paragraphindent{%
\def\temp{#1}%
\ifx\temp\asisword
\else
\ifx\temp\noneword
\defaultparindent = 0pt
\else
\defaultparindent = #1em
\fi
\fi
\parindent = \defaultparindent
}
% @exampleindent NCHARS
% We'll use ems for NCHARS like @paragraphindent.
% It seems @exampleindent asis isn't necessary, but
% I preserve it to make it similar to @paragraphindent.
\parseargdef\exampleindent{%
\def\temp{#1}%
\ifx\temp\asisword
\else
\ifx\temp\noneword
\lispnarrowing = 0pt
\else
\lispnarrowing = #1em
\fi
\fi
}
% @firstparagraphindent WORD
% If WORD is `none', then suppress indentation of the first paragraph
% after a section heading. If WORD is `insert', then do indent at such
% paragraphs.
%
% The paragraph indentation is suppressed or not by calling
% \suppressfirstparagraphindent, which the sectioning commands do.
% We switch the definition of this back and forth according to WORD.
% By default, we suppress indentation.
%
\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
\def\insertword{insert}
%
\parseargdef\firstparagraphindent{%
\def\temp{#1}%
\ifx\temp\noneword
\let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
\else\ifx\temp\insertword
\let\suppressfirstparagraphindent = \relax
\else
\errhelp = \EMsimple
\errmessage{Unknown @firstparagraphindent option `\temp'}%
\fi\fi
}
% Here is how we actually suppress indentation. Redefine \everypar to
% \kern backwards by \parindent, and then reset itself to empty.
%
% We also make \indent itself not actually do anything until the next
% paragraph.
%
\gdef\dosuppressfirstparagraphindent{%
\gdef\indent{%
\restorefirstparagraphindent
\indent
}%
\gdef\noindent{%
\restorefirstparagraphindent
\noindent
}%
\global\everypar = {%
\kern -\parindent
\restorefirstparagraphindent
}%
}
\gdef\restorefirstparagraphindent{%
\global \let \indent = \ptexindent
\global \let \noindent = \ptexnoindent
\global \everypar = {}%
}
% @asis just yields its argument. Used with @table, for example.
%
\def\asis#1{#1}
% @math outputs its argument in math mode.
%
% One complication: _ usually means subscripts, but it could also mean
% an actual _ character, as in @math{@var{some_variable} + 1}. So make
% _ active, and distinguish by seeing if the current family is \slfam,
% which is what @var uses.
{
\catcode`\_ = \active
\gdef\mathunderscore{%
\catcode`\_=\active
\def_{\ifnum\fam=\slfam \_\else\sb\fi}%
}
}
% Another complication: we want \\ (and @\) to output a \ character.
% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
% this is not advertised and we don't care. Texinfo does not
% otherwise define @\.
%
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
%
\def\math{%
\tex
\mathunderscore
\let\\ = \mathbackslash
\mathactive
% make the texinfo accent commands work in math mode
\let\"=\ddot
\let\'=\acute
\let\==\bar
\let\^=\hat
\let\`=\grave
\let\u=\breve
\let\v=\check
\let\~=\tilde
\let\dotaccent=\dot
$\finishmath
}
\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
% Some active characters (such as <) are spaced differently in math.
% We have to reset their definitions in case the @math was an argument
% to a command which sets the catcodes (such as @item or @section).
%
{
\catcode`^ = \active
\catcode`< = \active
\catcode`> = \active
\catcode`+ = \active
\catcode`' = \active
\gdef\mathactive{%
\let^ = \ptexhat
\let< = \ptexless
\let> = \ptexgtr
\let+ = \ptexplus
\let' = \ptexquoteright
}
}
% Some math mode symbols.
\def\bullet{$\ptexbullet$}
\def\geq{\ifmmode \ge\else $\ge$\fi}
\def\leq{\ifmmode \le\else $\le$\fi}
\def\minus{\ifmmode -\else $-$\fi}
% @dots{} outputs an ellipsis using the current font.
% We do .5em per period so that it has the same spacing in the cm
% typewriter fonts as three actual period characters; on the other hand,
% in other typewriter fonts three periods are wider than 1.5em. So do
% whichever is larger.
%
\def\dots{%
\leavevmode
\setbox0=\hbox{...}% get width of three periods
\ifdim\wd0 > 1.5em
\dimen0 = \wd0
\else
\dimen0 = 1.5em
\fi
\hbox to \dimen0{%
\hskip 0pt plus.25fil
.\hskip 0pt plus1fil
.\hskip 0pt plus1fil
.\hskip 0pt plus.5fil
}%
}
% @enddots{} is an end-of-sentence ellipsis.
%
\def\enddots{%
\dots
\spacefactor=\endofsentencespacefactor
}
% @comma{} is so commas can be inserted into text without messing up
% Texinfo's parsing.
%
\let\comma = ,
% @refill is a no-op.
\let\refill=\relax
% If working on a large document in chapters, it is convenient to
% be able to disable indexing, cross-referencing, and contents, for test runs.
% This is done with @novalidate (before @setfilename).
%
\newif\iflinks \linkstrue % by default we want the aux files.
\let\novalidate = \linksfalse
% @setfilename is done at the beginning of every texinfo file.
% So open here the files we need to have open while reading the input.
% This makes it possible to make a .fmt file for texinfo.
\def\setfilename{%
\fixbackslash % Turn off hack to swallow `\input texinfo'.
\iflinks
\tryauxfile
% Open the new aux file. TeX will close it automatically at exit.
\immediate\openout\auxfile=\jobname.aux
\fi % \openindices needs to do some work in any case.
\openindices
\let\setfilename=\comment % Ignore extra @setfilename cmds.
%
% If texinfo.cnf is present on the system, read it.
% Useful for site-wide @afourpaper, etc.
\openin 1 texinfo.cnf
\ifeof 1 \else \input texinfo.cnf \fi
\closein 1
%
\comment % Ignore the actual filename.
}
% Called from \setfilename.
%
\def\openindices{%
\newindex{cp}%
\newcodeindex{fn}%
\newcodeindex{vr}%
\newcodeindex{tp}%
\newcodeindex{ky}%
\newcodeindex{pg}%
}
% @bye.
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
\message{pdf,}
% adobe `portable' document format
\newcount\tempnum
\newcount\lnkcount
\newtoks\filename
\newcount\filenamelength
\newcount\pgn
\newtoks\toksA
\newtoks\toksB
\newtoks\toksC
\newtoks\toksD
\newbox\boxA
\newcount\countA
\newif\ifpdf
\newif\ifpdfmakepagedest
% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
% can be set). So we test for \relax and 0 as well as \undefined,
% borrowed from ifpdf.sty.
\ifx\pdfoutput\undefined
\else
\ifx\pdfoutput\relax
\else
\ifcase\pdfoutput
\else
\pdftrue
\fi
\fi
\fi
% PDF uses PostScript string constants for the names of xref targets,
% for display in the outlines, and in other places. Thus, we have to
% double any backslashes. Otherwise, a name like "\node" will be
% interpreted as a newline (\n), followed by o, d, e. Not good.
% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
% (and related messages, the final outcome is that it is up to the TeX
% user to double the backslashes and otherwise make the string valid, so
% that's what we do).
% double active backslashes.
%
{\catcode`\@=0 \catcode`\\=\active
@gdef@activebackslashdouble{%
@catcode`@\=@active
@let\=@doublebackslash}
}
% To handle parens, we must adopt a different approach, since parens are
% not active characters. hyperref.dtx (which has the same problem as
% us) handles it with this amazing macro to replace tokens, with minor
% changes for Texinfo. It is included here under the GPL by permission
% from the author, Heiko Oberdiek.
%
% #1 is the tokens to replace.
% #2 is the replacement.
% #3 is the control sequence with the string.
%
\def\HyPsdSubst#1#2#3{%
\def\HyPsdReplace##1#1##2\END{%
##1%
\ifx\\##2\\%
\else
#2%
\HyReturnAfterFi{%
\HyPsdReplace##2\END
}%
\fi
}%
\xdef#3{\expandafter\HyPsdReplace#3#1\END}%
}
\long\def\HyReturnAfterFi#1\fi{\fi#1}
% #1 is a control sequence in which to do the replacements.
\def\backslashparens#1{%
\xdef#1{#1}% redefine it as its expansion; the definition is simply
% \lastnode when called from \setref -> \pdfmkdest.
\HyPsdSubst{(}{\realbackslash(}{#1}%
\HyPsdSubst{)}{\realbackslash)}{#1}%
}
\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
with PDF output, and none of those formats could be found. (.eps cannot
be supported due to the design of the PDF format; use regular TeX (DVI
output) for that.)}
\ifpdf
%
% Color manipulation macros based on pdfcolor.tex,
% except using rgb instead of cmyk; the latter is said to render as a
% very dark gray on-screen and a very dark halftone in print, instead
% of actual black.
\def\rgbDarkRed{0.50 0.09 0.12}
\def\rgbBlack{0 0 0}
%
% k sets the color for filling (usual text, etc.);
% K sets the color for stroking (thin rules, e.g., normal _'s).
\def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
%
% Set color, and create a mark which defines \thiscolor accordingly,
% so that \makeheadline knows which color to restore.
\def\setcolor#1{%
\xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
\domark
\pdfsetcolor{#1}%
}
%
\def\maincolor{\rgbBlack}
\pdfsetcolor{\maincolor}
\edef\thiscolor{\maincolor}
\def\lastcolordefs{}
%
\def\makefootline{%
\baselineskip24pt
\line{\pdfsetcolor{\maincolor}\the\footline}%
}
%
\def\makeheadline{%
\vbox to 0pt{%
\vskip-22.5pt
\line{%
\vbox to8.5pt{}%
% Extract \thiscolor definition from the marks.
\getcolormarks
% Typeset the headline with \maincolor, then restore the color.
\pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
}%
\vss
}%
\nointerlineskip
}
%
%
\pdfcatalog{/PageMode /UseOutlines}
%
% #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
\def\dopdfimage#1#2#3{%
\def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
\def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
%
% pdftex (and the PDF format) support .png, .jpg, .pdf (among
% others). Let's try in that order.
\let\pdfimgext=\empty
\begingroup
\openin 1 #1.png \ifeof 1
\openin 1 #1.jpg \ifeof 1
\openin 1 #1.jpeg \ifeof 1
\openin 1 #1.JPG \ifeof 1
\openin 1 #1.pdf \ifeof 1
\openin 1 #1.PDF \ifeof 1
\errhelp = \nopdfimagehelp
\errmessage{Could not find image file #1 for pdf}%
\else \gdef\pdfimgext{PDF}%
\fi
\else \gdef\pdfimgext{pdf}%
\fi
\else \gdef\pdfimgext{JPG}%
\fi
\else \gdef\pdfimgext{jpeg}%
\fi
\else \gdef\pdfimgext{jpg}%
\fi
\else \gdef\pdfimgext{png}%
\fi
\closein 1
\endgroup
%
% without \immediate, ancient pdftex seg faults when the same image is
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
\immediate\pdfimage
\else
\immediate\pdfximage
\fi
\ifdim \wd0 >0pt width \imagewidth \fi
\ifdim \wd2 >0pt height \imageheight \fi
\ifnum\pdftexversion<13
#1.\pdfimgext
\else
{#1.\pdfimgext}%
\fi
\ifnum\pdftexversion < 14 \else
\pdfrefximage \pdflastximage
\fi}
%
\def\pdfmkdest#1{{%
% We have to set dummies so commands such as @code, and characters
% such as \, aren't expanded when present in a section title.
\indexnofonts
\turnoffactive
\activebackslashdouble
\makevalueexpandable
\def\pdfdestname{#1}%
\backslashparens\pdfdestname
\safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
%
% used to mark target names; must be expandable.
\def\pdfmkpgn#1{#1}
%
% by default, use a color that is dark enough to print on paper as
% nearly black, but still distinguishable for online viewing.
\def\urlcolor{\rgbDarkRed}
\def\linkcolor{\rgbDarkRed}
\def\endlink{\setcolor{\maincolor}\pdfendlink}
%
% Adding outlines to PDF; macros for calculating structure of outlines
% come from Petr Olsak
\def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
\else \csname#1\endcsname \fi}
\def\advancenumber#1{\tempnum=\expnumber{#1}\relax
\advance\tempnum by 1
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
%
% #1 is the section text, which is what will be displayed in the
% outline by the pdf viewer. #2 is the pdf expression for the number
% of subentries (or empty, for subsubsections). #3 is the node text,
% which might be empty if this toc entry had no corresponding node.
% #4 is the page number
%
\def\dopdfoutline#1#2#3#4{%
% Generate a link to the node text if that exists; else, use the
% page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't
% seem worth the trouble, since most documents are normally structured.
\def\pdfoutlinedest{#3}%
\ifx\pdfoutlinedest\empty
\def\pdfoutlinedest{#4}%
\else
% Doubled backslashes in the name.
{\activebackslashdouble \xdef\pdfoutlinedest{#3}%
\backslashparens\pdfoutlinedest}%
\fi
%
% Also double the backslashes in the display string.
{\activebackslashdouble \xdef\pdfoutlinetext{#1}%
\backslashparens\pdfoutlinetext}%
%
\pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
\begingroup
% Thanh's hack / proper braces in bookmarks
\edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
%
% Read toc silently, to get counts of subentries for \pdfoutline.
\def\numchapentry##1##2##3##4{%
\def\thischapnum{##2}%
\def\thissecnum{0}%
\def\thissubsecnum{0}%
}%
\def\numsecentry##1##2##3##4{%
\advancenumber{chap\thischapnum}%
\def\thissecnum{##2}%
\def\thissubsecnum{0}%
}%
\def\numsubsecentry##1##2##3##4{%
\advancenumber{sec\thissecnum}%
\def\thissubsecnum{##2}%
}%
\def\numsubsubsecentry##1##2##3##4{%
\advancenumber{subsec\thissubsecnum}%
}%
\def\thischapnum{0}%
\def\thissecnum{0}%
\def\thissubsecnum{0}%
%
% use \def rather than \let here because we redefine \chapentry et
% al. a second time, below.
\def\appentry{\numchapentry}%
\def\appsecentry{\numsecentry}%
\def\appsubsecentry{\numsubsecentry}%
\def\appsubsubsecentry{\numsubsubsecentry}%
\def\unnchapentry{\numchapentry}%
\def\unnsecentry{\numsecentry}%
\def\unnsubsecentry{\numsubsecentry}%
\def\unnsubsubsecentry{\numsubsubsecentry}%
\readdatafile{toc}%
%
% Read toc second time, this time actually producing the outlines.
% The `-' means take the \expnumber as the absolute number of
% subentries, which we calculated on our first read of the .toc above.
%
% We use the node names as the destinations.
\def\numchapentry##1##2##3##4{%
\dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
\def\numsecentry##1##2##3##4{%
\dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
\def\numsubsecentry##1##2##3##4{%
\dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
\def\numsubsubsecentry##1##2##3##4{% count is always zero
\dopdfoutline{##1}{}{##3}{##4}}%
%
% PDF outlines are displayed using system fonts, instead of
% document fonts. Therefore we cannot use special characters,
% since the encoding is unknown. For example, the eogonek from
% Latin 2 (0xea) gets translated to a | character. Info from
% Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
%
% xx to do this right, we have to translate 8-bit characters to
% their "best" equivalent, based on the @documentencoding. Right
% now, I guess we'll just let the pdf reader have its way.
\indexnofonts
\setupdatafile
\catcode`\\=\active \otherbackslash
\input \tocreadfilename
\endgroup
}
%
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
\else\let\nextsp\skipspaces
\ifx\p\space\else\addtokens{\filename}{\PP}%
\advance\filenamelength by 1
\fi
\fi
\nextsp}
\def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
\ifnum\pdftexversion < 14
\let \startlink \pdfannotlink
\else
\let \startlink \pdfstartlink
\fi
% make a live url in pdf output.
\def\pdfurl#1{%
\begingroup
% it seems we really need yet another set of dummies; have not
% tried to figure out what each command should do in the context
% of @url. for now, just make @/ a no-op, that's the only one
% people have actually reported a problem with.
%
\normalturnoffactive
\def\@{@}%
\let\/=\empty
\makevalueexpandable
% do we want to go so far as to use \indexnofonts instead of just
% special-casing \var here?
\def\var##1{##1}%
%
\leavevmode\setcolor{\urlcolor}%
\startlink attr{/Border [0 0 0]}%
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
\endgroup}
\def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
\def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
\def\maketoks{%
\expandafter\poptoks\the\toksA|ENDTOKS|\relax
\ifx\first0\adn0
\else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
\else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
\else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
\else
\ifnum0=\countA\else\makelink\fi
\ifx\first.\let\next=\done\else
\let\next=\maketoks
\addtokens{\toksB}{\the\toksD}
\ifx\first,\addtokens{\toksB}{\space}\fi
\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\next}
\def\makelink{\addtokens{\toksB}%
{\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
\def\pdflink#1{%
\startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
\setcolor{\linkcolor}#1\endlink}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
\else
% non-pdf mode
\let\pdfmkdest = \gobble
\let\pdfurl = \gobble
\let\endlink = \relax
\let\setcolor = \gobble
\let\pdfsetcolor = \gobble
\let\pdfmakeoutlines = \relax
\fi % \ifx\pdfoutput
\message{fonts,}
% Change the current font style to #1, remembering it in \curfontstyle.
% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
% italics, not bold italics.
%
\def\setfontstyle#1{%
\def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
\csname ten#1\endcsname % change the current font
}
% Select #1 fonts with the current style.
%
\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
\def\rm{\fam=0 \setfontstyle{rm}}
\def\it{\fam=\itfam \setfontstyle{it}}
\def\sl{\fam=\slfam \setfontstyle{sl}}
\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
\def\tt{\fam=\ttfam \setfontstyle{tt}}
% Unfortunately, we have to override this for titles and the like, since
% in those cases "rm" is bold. Sigh.
\def\rmisbold{\rm\def\curfontstyle{bf}}
% Texinfo sort of supports the sans serif font style, which plain TeX does not.
% So we set up a \sf.
\newfam\sffam
\def\sf{\fam=\sffam \setfontstyle{sf}}
\let\li = \sf % Sometimes we call it \li, not \sf.
% We don't need math for this font style.
\def\ttsl{\setfontstyle{ttsl}}
% Default leading.
\newdimen\textleading \textleading = 13.2pt
% Set the baselineskip to #1, and the lineskip and strut size
% correspondingly. There is no deep meaning behind these magic numbers
% used as factors; they just match (closely enough) what Knuth defined.
%
\def\lineskipfactor{.08333}
\def\strutheightpercent{.70833}
\def\strutdepthpercent {.29167}
%
% can get a sort of poor man's double spacing by redefining this.
\def\baselinefactor{1}
%
\def\setleading#1{%
\dimen0 = #1\relax
\normalbaselineskip = \baselinefactor\dimen0
\normallineskip = \lineskipfactor\normalbaselineskip
\normalbaselines
\setbox\strutbox =\hbox{%
\vrule width0pt height\strutheightpercent\baselineskip
depth \strutdepthpercent \baselineskip
}%
}
% PDF CMaps. See also LaTeX's t1.cmap.
%
% do nothing with this by default.
\expandafter\let\csname cmapOT1\endcsname\gobble
\expandafter\let\csname cmapOT1IT\endcsname\gobble
\expandafter\let\csname cmapOT1TT\endcsname\gobble
% if we are producing pdf, and we have \pdffontattr, then define cmaps.
% (\pdffontattr was introduced many years ago, but people still run
% older pdftex's; it's easy to conditionalize, so we do.)
\ifpdf \ifx\pdffontattr\undefined \else
\begingroup
\catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
\catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
%%DocumentNeededResources: ProcSet (CIDInit)
%%IncludeResource: ProcSet (CIDInit)
%%BeginResource: CMap (TeX-OT1-0)
%%Title: (TeX-OT1-0 TeX OT1 0)
%%Version: 1.000
%%EndComments
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (TeX)
/Ordering (OT1)
/Supplement 0
>> def
/CMapName /TeX-OT1-0 def
/CMapType 2 def
1 begincodespacerange
<00> <7F>
endcodespacerange
8 beginbfrange
<00> <01> <0393>
<09> <0A> <03A8>
<23> <26> <0023>
<28> <3B> <0028>
<3F> <5B> <003F>
<5D> <5E> <005D>
<61> <7A> <0061>
<7B> <7C> <2013>
endbfrange
40 beginbfchar
<02> <0398>
<03> <039B>
<04> <039E>
<05> <03A0>
<06> <03A3>
<07> <03D2>
<08> <03A6>
<0B> <00660066>
<0C> <00660069>
<0D> <0066006C>
<0E> <006600660069>
<0F> <00660066006C>
<10> <0131>
<11> <0237>
<12> <0060>
<13> <00B4>
<14> <02C7>
<15> <02D8>
<16> <00AF>
<17> <02DA>
<18> <00B8>
<19> <00DF>
<1A> <00E6>
<1B> <0153>
<1C> <00F8>
<1D> <00C6>
<1E> <0152>
<1F> <00D8>
<21> <0021>
<22> <201D>
<27> <2019>
<3C> <00A1>
<3D> <003D>
<3E> <00BF>
<5C> <201C>
<5F> <02D9>
<60> <2018>
<7D> <02DD>
<7E> <007E>
<7F> <00A8>
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end
%%EndResource
%%EOF
}\endgroup
\expandafter\edef\csname cmapOT1\endcsname#1{%
\pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
}%
%
% \cmapOT1IT
\begingroup
\catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
\catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
%%DocumentNeededResources: ProcSet (CIDInit)
%%IncludeResource: ProcSet (CIDInit)
%%BeginResource: CMap (TeX-OT1IT-0)
%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
%%Version: 1.000
%%EndComments
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (TeX)
/Ordering (OT1IT)
/Supplement 0
>> def
/CMapName /TeX-OT1IT-0 def
/CMapType 2 def
1 begincodespacerange
<00> <7F>
endcodespacerange
8 beginbfrange
<00> <01> <0393>
<09> <0A> <03A8>
<25> <26> <0025>
<28> <3B> <0028>
<3F> <5B> <003F>
<5D> <5E> <005D>
<61> <7A> <0061>
<7B> <7C> <2013>
endbfrange
42 beginbfchar
<02> <0398>
<03> <039B>
<04> <039E>
<05> <03A0>
<06> <03A3>
<07> <03D2>
<08> <03A6>
<0B> <00660066>
<0C> <00660069>
<0D> <0066006C>
<0E> <006600660069>
<0F> <00660066006C>
<10> <0131>
<11> <0237>
<12> <0060>
<13> <00B4>
<14> <02C7>
<15> <02D8>
<16> <00AF>
<17> <02DA>
<18> <00B8>
<19> <00DF>
<1A> <00E6>
<1B> <0153>
<1C> <00F8>
<1D> <00C6>
<1E> <0152>
<1F> <00D8>
<21> <0021>
<22> <201D>
<23> <0023>
<24> <00A3>
<27> <2019>
<3C> <00A1>
<3D> <003D>
<3E> <00BF>
<5C> <201C>
<5F> <02D9>
<60> <2018>
<7D> <02DD>
<7E> <007E>
<7F> <00A8>
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end
%%EndResource
%%EOF
}\endgroup
\expandafter\edef\csname cmapOT1IT\endcsname#1{%
\pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
}%
%
% \cmapOT1TT
\begingroup
\catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
\catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
%%DocumentNeededResources: ProcSet (CIDInit)
%%IncludeResource: ProcSet (CIDInit)
%%BeginResource: CMap (TeX-OT1TT-0)
%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
%%Version: 1.000
%%EndComments
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (TeX)
/Ordering (OT1TT)
/Supplement 0
>> def
/CMapName /TeX-OT1TT-0 def
/CMapType 2 def
1 begincodespacerange
<00> <7F>
endcodespacerange
5 beginbfrange
<00> <01> <0393>
<09> <0A> <03A8>
<21> <26> <0021>
<28> <5F> <0028>
<61> <7E> <0061>
endbfrange
32 beginbfchar
<02> <0398>
<03> <039B>
<04> <039E>
<05> <03A0>
<06> <03A3>
<07> <03D2>
<08> <03A6>
<0B> <2191>
<0C> <2193>
<0D> <0027>
<0E> <00A1>
<0F> <00BF>
<10> <0131>
<11> <0237>
<12> <0060>
<13> <00B4>
<14> <02C7>
<15> <02D8>
<16> <00AF>
<17> <02DA>
<18> <00B8>
<19> <00DF>
<1A> <00E6>
<1B> <0153>
<1C> <00F8>
<1D> <00C6>
<1E> <0152>
<1F> <00D8>
<20> <2423>
<27> <2019>
<60> <2018>
<7F> <00A8>
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end
%%EndResource
%%EOF
}\endgroup
\expandafter\edef\csname cmapOT1TT\endcsname#1{%
\pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
}%
\fi\fi
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
% empty to omit).
\def\setfont#1#2#3#4#5{%
\font#1=\fontprefix#2#3 scaled #4
\csname cmap#5\endcsname#1%
}
% This is what gets called when #5 of \setfont is empty.
\let\cmap\gobble
% emacs-page end of cmaps
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
% before you read in texinfo.tex.
\ifx\fontprefix\undefined
\def\fontprefix{cm}
\fi
% Support font families that don't use the same naming scheme as CM.
\def\rmshape{r}
\def\rmbshape{bx} %where the normal face is bold
\def\bfshape{b}
\def\bxshape{bx}
\def\ttshape{tt}
\def\ttbshape{tt}
\def\ttslshape{sltt}
\def\itshape{ti}
\def\itbshape{bxti}
\def\slshape{sl}
\def\slbshape{bxsl}
\def\sfshape{ss}
\def\sfbshape{ss}
\def\scshape{csc}
\def\scbshape{csc}
% Definitions for a main text size of 11pt. This is the default in
% Texinfo.
%
\def\definetextfontsizexi{%
% Text fonts (11.2pt, magstep1).
\def\textnominalsize{11pt}
\edef\mainmagstep{\magstephalf}
\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
\font\texti=cmmi10 scaled \mainmagstep
\font\textsy=cmsy10 scaled \mainmagstep
\def\textecsize{1095}
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstep1}{OT1}
\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
\setfont\smallrm\rmshape{9}{1000}{OT1}
\setfont\smalltt\ttshape{9}{1000}{OT1TT}
\setfont\smallbf\bfshape{10}{900}{OT1}
\setfont\smallit\itshape{9}{1000}{OT1IT}
\setfont\smallsl\slshape{9}{1000}{OT1}
\setfont\smallsf\sfshape{9}{1000}{OT1}
\setfont\smallsc\scshape{10}{900}{OT1}
\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
\font\smalli=cmmi9
\font\smallsy=cmsy9
\def\smallecsize{0900}
% Fonts for small examples (8pt).
\def\smallernominalsize{8pt}
\setfont\smallerrm\rmshape{8}{1000}{OT1}
\setfont\smallertt\ttshape{8}{1000}{OT1TT}
\setfont\smallerbf\bfshape{10}{800}{OT1}
\setfont\smallerit\itshape{8}{1000}{OT1IT}
\setfont\smallersl\slshape{8}{1000}{OT1}
\setfont\smallersf\sfshape{8}{1000}{OT1}
\setfont\smallersc\scshape{10}{800}{OT1}
\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
\font\smalleri=cmmi8
\font\smallersy=cmsy8
\def\smallerecsize{0800}
% Fonts for title page (20.4pt):
\def\titlenominalsize{20pt}
\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
\let\titlebf=\titlerm
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
\def\titleecsize{2074}
% Chapter (and unnumbered) fonts (17.28pt).
\def\chapnominalsize{17pt}
\setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
\setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
\setfont\chapsl\slbshape{10}{\magstep3}{OT1}
\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
\setfont\chapsf\sfbshape{17}{1000}{OT1}
\let\chapbf=\chaprm
\setfont\chapsc\scbshape{10}{\magstep3}{OT1}
\font\chapi=cmmi12 scaled \magstep2
\font\chapsy=cmsy10 scaled \magstep3
\def\chapecsize{1728}
% Section fonts (14.4pt).
\def\secnominalsize{14pt}
\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
\setfont\secsl\slbshape{10}{\magstep2}{OT1}
\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
\setfont\secsf\sfbshape{12}{\magstep1}{OT1}
\let\secbf\secrm
\setfont\secsc\scbshape{10}{\magstep2}{OT1}
\font\seci=cmmi12 scaled \magstep1
\font\secsy=cmsy10 scaled \magstep2
\def\sececsize{1440}
% Subsection fonts (13.15pt).
\def\ssecnominalsize{13pt}
\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
\setfont\ssecit\itbshape{10}{1315}{OT1IT}
\setfont\ssecsl\slbshape{10}{1315}{OT1}
\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
\let\ssecbf\ssecrm
\setfont\ssecsc\scbshape{10}{1315}{OT1}
\font\sseci=cmmi12 scaled \magstephalf
\font\ssecsy=cmsy10 scaled 1315
\def\ssececsize{1200}
% Reduced fonts for @acro in text (10pt).
\def\reducednominalsize{10pt}
\setfont\reducedrm\rmshape{10}{1000}{OT1}
\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
\setfont\reducedbf\bfshape{10}{1000}{OT1}
\setfont\reducedit\itshape{10}{1000}{OT1IT}
\setfont\reducedsl\slshape{10}{1000}{OT1}
\setfont\reducedsf\sfshape{10}{1000}{OT1}
\setfont\reducedsc\scshape{10}{1000}{OT1}
\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
\font\reducedi=cmmi10
\font\reducedsy=cmsy10
\def\reducedecsize{1000}
% reset the current fonts
\textfonts
\rm
} % end of 11pt text font size definitions
% Definitions to make the main text be 10pt Computer Modern, with
% section, chapter, etc., sizes following suit. This is for the GNU
% Press printing of the Emacs 22 manual. Maybe other manuals in the
% future. Used with @smallbook, which sets the leading to 12pt.
%
\def\definetextfontsizex{%
% Text fonts (10pt).
\def\textnominalsize{10pt}
\edef\mainmagstep{1000}
\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
\font\texti=cmmi10 scaled \mainmagstep
\font\textsy=cmsy10 scaled \mainmagstep
\def\textecsize{1000}
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
\setfont\smallrm\rmshape{9}{1000}{OT1}
\setfont\smalltt\ttshape{9}{1000}{OT1TT}
\setfont\smallbf\bfshape{10}{900}{OT1}
\setfont\smallit\itshape{9}{1000}{OT1IT}
\setfont\smallsl\slshape{9}{1000}{OT1}
\setfont\smallsf\sfshape{9}{1000}{OT1}
\setfont\smallsc\scshape{10}{900}{OT1}
\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
\font\smalli=cmmi9
\font\smallsy=cmsy9
\def\smallecsize{0900}
% Fonts for small examples (8pt).
\def\smallernominalsize{8pt}
\setfont\smallerrm\rmshape{8}{1000}{OT1}
\setfont\smallertt\ttshape{8}{1000}{OT1TT}
\setfont\smallerbf\bfshape{10}{800}{OT1}
\setfont\smallerit\itshape{8}{1000}{OT1IT}
\setfont\smallersl\slshape{8}{1000}{OT1}
\setfont\smallersf\sfshape{8}{1000}{OT1}
\setfont\smallersc\scshape{10}{800}{OT1}
\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
\font\smalleri=cmmi8
\font\smallersy=cmsy8
\def\smallerecsize{0800}
% Fonts for title page (20.4pt):
\def\titlenominalsize{20pt}
\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
\let\titlebf=\titlerm
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
\def\titleecsize{2074}
% Chapter fonts (14.4pt).
\def\chapnominalsize{14pt}
\setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
\setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
\setfont\chapsl\slbshape{10}{\magstep2}{OT1}
\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
\setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
\let\chapbf\chaprm
\setfont\chapsc\scbshape{10}{\magstep2}{OT1}
\font\chapi=cmmi12 scaled \magstep1
\font\chapsy=cmsy10 scaled \magstep2
\def\chapecsize{1440}
% Section fonts (12pt).
\def\secnominalsize{12pt}
\setfont\secrm\rmbshape{12}{1000}{OT1}
\setfont\secit\itbshape{10}{\magstep1}{OT1IT}
\setfont\secsl\slbshape{10}{\magstep1}{OT1}
\setfont\sectt\ttbshape{12}{1000}{OT1TT}
\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
\setfont\secsf\sfbshape{12}{1000}{OT1}
\let\secbf\secrm
\setfont\secsc\scbshape{10}{\magstep1}{OT1}
\font\seci=cmmi12
\font\secsy=cmsy10 scaled \magstep1
\def\sececsize{1200}
% Subsection fonts (10pt).
\def\ssecnominalsize{10pt}
\setfont\ssecrm\rmbshape{10}{1000}{OT1}
\setfont\ssecit\itbshape{10}{1000}{OT1IT}
\setfont\ssecsl\slbshape{10}{1000}{OT1}
\setfont\ssectt\ttbshape{10}{1000}{OT1TT}
\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
\setfont\ssecsf\sfbshape{10}{1000}{OT1}
\let\ssecbf\ssecrm
\setfont\ssecsc\scbshape{10}{1000}{OT1}
\font\sseci=cmmi10
\font\ssecsy=cmsy10
\def\ssececsize{1000}
% Reduced fonts for @acro in text (9pt).
\def\reducednominalsize{9pt}
\setfont\reducedrm\rmshape{9}{1000}{OT1}
\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
\setfont\reducedbf\bfshape{10}{900}{OT1}
\setfont\reducedit\itshape{9}{1000}{OT1IT}
\setfont\reducedsl\slshape{9}{1000}{OT1}
\setfont\reducedsf\sfshape{9}{1000}{OT1}
\setfont\reducedsc\scshape{10}{900}{OT1}
\setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
\font\reducedi=cmmi9
\font\reducedsy=cmsy9
\def\reducedecsize{0900}
% reduce space between paragraphs
\divide\parskip by 2
% reset the current fonts
\textfonts
\rm
} % end of 10pt text font size definitions
% We provide the user-level command
% @fonttextsize 10
% (or 11) to redefine the text font size. pt is assumed.
%
\def\xword{10}
\def\xiword{11}
%
\parseargdef\fonttextsize{%
\def\textsizearg{#1}%
\wlog{doing @fonttextsize \textsizearg}%
%
% Set \globaldefs so that documents can use this inside @tex, since
% makeinfo 4.8 does not support it, but we need it nonetheless.
%
\begingroup \globaldefs=1
\ifx\textsizearg\xword \definetextfontsizex
\else \ifx\textsizearg\xiword \definetextfontsizexi
\else
\errhelp=\EMsimple
\errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
\fi\fi
\endgroup
}
% In order for the font changes to affect most math symbols and letters,
% we have to define the \textfont of the standard families. Since
% texinfo doesn't allow for producing subscripts and superscripts except
% in the main text, we don't bother to reset \scriptfont and
% \scriptscriptfont (which would also require loading a lot more fonts).
%
\def\resetmathfonts{%
\textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
\textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
\textfont\ttfam=\tentt \textfont\sffam=\tensf
}
% The font-changing commands redefine the meanings of \tenSTYLE, instead
% of just \STYLE. We do this because \STYLE needs to also set the
% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
% \tenSTYLE to set the current font.
%
% Each font-changing command also sets the names \lsize (one size lower)
% and \lllsize (three sizes lower). These relative commands are used in
% the LaTeX logo and acronyms.
%
% This all needs generalizing, badly.
%
\def\textfonts{%
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
\let\tenttsl=\textttsl
\def\curfontsize{text}%
\def\lsize{reduced}\def\lllsize{smaller}%
\resetmathfonts \setleading{\textleading}}
\def\titlefonts{%
\let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
\let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
\let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
\let\tenttsl=\titlettsl
\def\curfontsize{title}%
\def\lsize{chap}\def\lllsize{subsec}%
\resetmathfonts \setleading{25pt}}
\def\titlefont#1{{\titlefonts\rmisbold #1}}
\def\chapfonts{%
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
\let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
\let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
\let\tenttsl=\chapttsl
\def\curfontsize{chap}%
\def\lsize{sec}\def\lllsize{text}%
\resetmathfonts \setleading{19pt}}
\def\secfonts{%
\let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
\let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
\let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
\let\tenttsl=\secttsl
\def\curfontsize{sec}%
\def\lsize{subsec}\def\lllsize{reduced}%
\resetmathfonts \setleading{16pt}}
\def\subsecfonts{%
\let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
\let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
\let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
\let\tenttsl=\ssecttsl
\def\curfontsize{ssec}%
\def\lsize{text}\def\lllsize{small}%
\resetmathfonts \setleading{15pt}}
\let\subsubsecfonts = \subsecfonts
\def\reducedfonts{%
\let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
\let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
\let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
\let\tenttsl=\reducedttsl
\def\curfontsize{reduced}%
\def\lsize{small}\def\lllsize{smaller}%
\resetmathfonts \setleading{10.5pt}}
\def\smallfonts{%
\let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
\let\tenttsl=\smallttsl
\def\curfontsize{small}%
\def\lsize{smaller}\def\lllsize{smaller}%
\resetmathfonts \setleading{10.5pt}}
\def\smallerfonts{%
\let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
\let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
\let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
\let\tenttsl=\smallerttsl
\def\curfontsize{smaller}%
\def\lsize{smaller}\def\lllsize{smaller}%
\resetmathfonts \setleading{9.5pt}}
% Fonts for short table of contents.
\setfont\shortcontrm\rmshape{12}{1000}{OT1}
\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
\setfont\shortcontsl\slshape{12}{1000}{OT1}
\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
% Define these just so they can be easily changed for other fonts.
\def\angleleft{$\langle$}
\def\angleright{$\rangle$}
% Set the fonts to use with the @small... environments.
\let\smallexamplefonts = \smallfonts
% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
% can fit this many characters:
% 8.5x11=86 smallbook=72 a4=90 a5=69
% If we use \scriptfonts (8pt), then we can fit this many characters:
% 8.5x11=90+ smallbook=80 a4=90+ a5=77
% For me, subjectively, the few extra characters that fit aren't worth
% the additional smallness of 8pt. So I'm making the default 9pt.
%
% By the way, for comparison, here's what fits with @example (10pt):
% 8.5x11=71 smallbook=60 a4=75 a5=58
% --karl, 24jan03.
% Set up the default fonts, so we can use them for creating boxes.
%
\definetextfontsizexi
\message{markup,}
% Check if we are currently using a typewriter font. Since all the
% Computer Modern typewriter fonts have zero interword stretch (and
% shrink), and it is reasonable to expect all typewriter fonts to have
% this property, we can check that font parameter.
%
\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
% define and register \INITMACRO to be called on markup style changes.
% \INITMACRO can check \currentmarkupstyle for the innermost
% style and the set of \ifmarkupSTYLE switches for all styles
% currently in effect.
\newif\ifmarkupvar
\newif\ifmarkupsamp
\newif\ifmarkupkey
%\newif\ifmarkupfile % @file == @samp.
%\newif\ifmarkupoption % @option == @samp.
\newif\ifmarkupcode
\newif\ifmarkupkbd
%\newif\ifmarkupenv % @env == @code.
%\newif\ifmarkupcommand % @command == @code.
\newif\ifmarkuptex % @tex (and part of @math, for now).
\newif\ifmarkupexample
\newif\ifmarkupverb
\newif\ifmarkupverbatim
\let\currentmarkupstyle\empty
\def\setupmarkupstyle#1{%
\csname markup#1true\endcsname
\def\currentmarkupstyle{#1}%
\markupstylesetup
}
\let\markupstylesetup\empty
\def\defmarkupstylesetup#1{%
\expandafter\def\expandafter\markupstylesetup
\expandafter{\markupstylesetup #1}%
\def#1%
}
% Markup style setup for left and right quotes.
\defmarkupstylesetup\markupsetuplq{%
\expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname
\ifx\temp\relax \markupsetuplqdefault \else \temp \fi
}
\defmarkupstylesetup\markupsetuprq{%
\expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname
\ifx\temp\relax \markupsetuprqdefault \else \temp \fi
}
{
\catcode`\'=\active
\catcode`\`=\active
\gdef\markupsetuplqdefault{\let`\lq}
\gdef\markupsetuprqdefault{\let'\rq}
\gdef\markupsetcodequoteleft{\let`\codequoteleft}
\gdef\markupsetcodequoteright{\let'\codequoteright}
\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
}
\let\markupsetuplqcode \markupsetcodequoteleft
\let\markupsetuprqcode \markupsetcodequoteright
\let\markupsetuplqexample \markupsetcodequoteleft
\let\markupsetuprqexample \markupsetcodequoteright
\let\markupsetuplqverb \markupsetcodequoteleft
\let\markupsetuprqverb \markupsetcodequoteright
\let\markupsetuplqverbatim \markupsetcodequoteleft
\let\markupsetuprqverbatim \markupsetcodequoteright
\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
% Allow an option to not replace quotes with a regular directed right
% quote/apostrophe (char 0x27), but instead use the undirected quote
% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
% the default, but it works for pasting with more pdf viewers (at least
% evince), the lilypond developers report. xpdf does work with the
% regular 0x27.
%
\def\codequoteright{%
\expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
\expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
'%
\else \char'15 \fi
\else \char'15 \fi
}
%
% and a similar option for the left quote char vs. a grave accent.
% Modern fonts display ASCII 0x60 as a grave accent, so some people like
% the code environments to do likewise.
%
\def\codequoteleft{%
\expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
\expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
% [Knuth] pp. 380,381,391
% \relax disables Spanish ligatures ?` and !` of \tt font.
\relax`%
\else \char'22 \fi
\else \char'22 \fi
}
% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
\def\noligaturesquoteleft{\relax\lq}
% Count depth in font-changes, for error checks
\newcount\fontdepth \fontdepth=0
%% Add scribe-like font environments, plus @l for inline lisp (usually sans
%% serif) and @ii for TeX italic
% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
% unless the following character is such as not to need one.
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
\ptexslash\fi\fi\fi}
\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
% like \smartslanted except unconditionally uses \ttsl.
% @var is set to this for defun arguments.
\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
% @cite is like \smartslanted except unconditionally use \sl. We never want
% ttsl for book titles, do we?
\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
\let\i=\smartitalic
\let\slanted=\smartslanted
\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
\let\dfn=\smartslanted
\let\emph=\smartitalic
% Explicit font changes: @r, @sc, undocumented @ii.
\def\r#1{{\rm #1}} % roman font
\def\sc#1{{\smallcaps#1}} % smallcaps font
\def\ii#1{{\it #1}} % italic font
% @b, explicit bold. Also @strong.
\def\b#1{{\bf #1}}
\let\strong=\b
% @sansserif, explicit sans.
\def\sansserif#1{{\sf #1}}
% We can't just use \exhyphenpenalty, because that only has effect at
% the end of a paragraph. Restore normal hyphenation at the end of the
% group within which \nohyphenation is presumably called.
%
\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
\def\restorehyphenation{\hyphenchar\font = `- }
% Set sfcode to normal for the chars that usually have another value.
% Can't use plain's \frenchspacing because it uses the `\x notation, and
% sometimes \x has an active definition that messes things up.
%
\catcode`@=11
\def\plainfrenchspacing{%
\sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
\sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
\def\endofsentencespacefactor{1000}% for @. and friends
}
\def\plainnonfrenchspacing{%
\sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
\sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
\def\endofsentencespacefactor{3000}% for @. and friends
}
\catcode`@=\other
\def\endofsentencespacefactor{3000}% default
% @t, explicit typewriter.
\def\t#1{%
{\tt \rawbackslash \plainfrenchspacing #1}%
\null
}
% @samp.
\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
% definition of @key that produces a lozenge. Doesn't adjust to text size.
%\setfont\keyrm\rmshape{8}{1000}{OT1}
%\font\keysy=cmsy9
%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
% \vbox{\hrule\kern-0.4pt
% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
% \kern-0.4pt\hrule}%
% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
% definition of @key with no lozenge. If the current font is already
% monospace, don't change it; that way, we respect @kbdinputstyle. But
% if it isn't monospace, then use \tt.
%
\def\key#1{{\setupmarkupstyle{key}%
\nohyphenation
\ifmonospace\else\tt\fi
#1}\null}
% ctrl is no longer a Texinfo command.
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
% @file, @option are the same as @samp.
\let\file=\samp
\let\option=\samp
% @code is a modification of @t,
% which makes spaces the same size as normal in the surrounding text.
\def\tclose#1{%
{%
% Change normal interword space to be same as for the current font.
\spaceskip = \fontdimen2\font
%
% Switch to typewriter.
\tt
%
% But `\ ' produces the large typewriter interword space.
\def\ {{\spaceskip = 0pt{} }}%
%
% Turn off hyphenation.
\nohyphenation
%
\rawbackslash
\plainfrenchspacing
#1%
}%
\null
}
% We *must* turn on hyphenation at `-' and `_' in @code.
% Otherwise, it is too hard to avoid overfull hboxes
% in the Emacs manual, the Library manual, etc.
% Unfortunately, TeX uses one parameter (\hyphenchar) to control
% both hyphenation at - and hyphenation within words.
% We must therefore turn them both off (\tclose does that)
% and arrange explicitly to hyphenate at a dash.
% -- rms.
{
\catcode`\-=\active \catcode`\_=\active
\catcode`\'=\active \catcode`\`=\active
\global\let'=\rq \global\let`=\lq % default definitions
%
\global\def\code{\begingroup
\setupmarkupstyle{code}%
% The following should really be moved into \setupmarkupstyle handlers.
\catcode\dashChar=\active \catcode\underChar=\active
\ifallowcodebreaks
\let-\codedash
\let_\codeunder
\else
\let-\realdash
\let_\realunder
\fi
\codex
}
}
\def\realdash{-}
\def\codedash{-\discretionary{}{}{}}
\def\codeunder{%
% this is all so @math{@code{var_name}+1} can work. In math mode, _
% is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
% will therefore expand the active definition of _, which is us
% (inside @code that is), therefore an endless loop.
\ifusingtt{\ifmmode
\mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
\else\normalunderscore \fi
\discretionary{}{}{}}%
{\_}%
}
\def\codex #1{\tclose{#1}\endgroup}
% An additional complication: the above will allow breaks after, e.g.,
% each of the four underscores in __typeof__. This is undesirable in
% some manuals, especially if they don't have long identifiers in
% general. @allowcodebreaks provides a way to control this.
%
\newif\ifallowcodebreaks \allowcodebreakstrue
\def\keywordtrue{true}
\def\keywordfalse{false}
\parseargdef\allowcodebreaks{%
\def\txiarg{#1}%
\ifx\txiarg\keywordtrue
\allowcodebreakstrue
\else\ifx\txiarg\keywordfalse
\allowcodebreaksfalse
\else
\errhelp = \EMsimple
\errmessage{Unknown @allowcodebreaks option `\txiarg'}%
\fi\fi
}
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
% `example' (@kbd uses ttsl only inside of @example and friends),
% or `code' (@kbd uses normal tty font always).
\parseargdef\kbdinputstyle{%
\def\txiarg{#1}%
\ifx\txiarg\worddistinct
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
\else\ifx\txiarg\wordexample
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
\else\ifx\txiarg\wordcode
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
\else
\errhelp = \EMsimple
\errmessage{Unknown @kbdinputstyle option `\txiarg'}%
\fi\fi\fi
}
\def\worddistinct{distinct}
\def\wordexample{example}
\def\wordcode{code}
% Default is `distinct'.
\kbdinputstyle distinct
\def\xkey{\key}
\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
\ifx\one\xkey\ifx\threex\three \key{#2}%
\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
\let\indicateurl=\code
\let\env=\code
\let\command=\code
% @clicksequence{File @click{} Open ...}
\def\clicksequence#1{\begingroup #1\endgroup}
% @clickstyle @arrow (by default)
\parseargdef\clickstyle{\def\click{#1}}
\def\click{\arrow}
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
% second argument specifying the text to display and an optional third
% arg as text to display instead of (rather than in addition to) the url
% itself. First (mandatory) arg is the url. Perhaps eventually put in
% a hypertex \special here.
%
\def\uref#1{\douref #1,,,\finish}
\def\douref#1,#2,#3,#4\finish{\begingroup
\unsepspaces
\pdfurl{#1}%
\setbox0 = \hbox{\ignorespaces #3}%
\ifdim\wd0 > 0pt
\unhbox0 % third arg given, show only that
\else
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0 > 0pt
\ifpdf
\unhbox0 % PDF: 2nd arg given, show only it
\else
\unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
\fi
\else
\code{#1}% only url given, so show it
\fi
\fi
\endlink
\endgroup}
% @url synonym for @uref, since that's how everyone uses it.
%
\let\url=\uref
% rms does not like angle brackets --karl, 17may97.
% So now @email is just like @uref, unless we are pdf.
%
%\def\email#1{\angleleft{\tt #1}\angleright}
\ifpdf
\def\email#1{\doemail#1,,\finish}
\def\doemail#1,#2,#3\finish{\begingroup
\unsepspaces
\pdfurl{mailto:#1}%
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
\endlink
\endgroup}
\else
\let\email=\uref
\fi
% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
%
\def\dmn#1{\thinspace #1}
% @l was never documented to mean ``switch to the Lisp font'',
% and it is not used as such in any manual I can find. We need it for
% Polish suppressed-l. --karl, 22sep96.
%\def\l#1{{\li #1}\null}
% @acronym for "FBI", "NATO", and the like.
% We print this one point size smaller, since it's intended for
% all-uppercase.
%
\def\acronym#1{\doacronym #1,,\finish}
\def\doacronym#1,#2,#3\finish{%
{\selectfonts\lsize #1}%
\def\temp{#2}%
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
}
% @abbr for "Comput. J." and the like.
% No font change, but don't do end-of-sentence spacing.
%
\def\abbr#1{\doabbr #1,,\finish}
\def\doabbr#1,#2,#3\finish{%
{\plainfrenchspacing #1}%
\def\temp{#2}%
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
}
\message{glyphs,}
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
%
% Since these characters are used in examples, they should be an even number of
% \tt widths. Each \tt character is 1en, so two makes it 1em.
%
\def\point{$\star$}
\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
% The @error{} command.
% Adapted from the TeXbook's \boxit.
%
\newbox\errorbox
%
{\tentt \global\dimen0 = 3em}% Width of the box.
\dimen2 = .55pt % Thickness of rules
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
%
\setbox\errorbox=\hbox to \dimen0{\hfil
\hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
\advance\hsize by -2\dimen2 % Rules.
\vbox{%
\hrule height\dimen2
\hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
\vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
\kern3pt\vrule width\dimen2}% Space to right.
\hrule height\dimen2}
\hfil}
%
\def\error{\leavevmode\lower.7ex\copy\errorbox}
% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
%
\def\pounds{{\it\$}}
% @euro{} comes from a separate font, depending on the current style.
% We use the free feym* fonts from the eurosym package by Henrik
% Theiling, which support regular, slanted, bold and bold slanted (and
% "outlined" (blackboard board, sort of) versions, which we don't need).
% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
%
% Although only regular is the truly official Euro symbol, we ignore
% that. The Euro is designed to be slightly taller than the regular
% font height.
%
% feymr - regular
% feymo - slanted
% feybr - bold
% feybo - bold slanted
%
% There is no good (free) typewriter version, to my knowledge.
% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
% Hmm.
%
% Also doesn't work in math. Do we need to do math with euro symbols?
% Hope not.
%
%
\def\euro{{\eurofont e}}
\def\eurofont{%
% We set the font at each command, rather than predefining it in
% \textfonts and the other font-switching commands, so that
% installations which never need the symbol don't have to have the
% font installed.
%
% There is only one designed size (nominal 10pt), so we always scale
% that to the current nominal size.
%
% By the way, simply using "at 1em" works for cmr10 and the like, but
% does not work for cmbx10 and other extended/shrunken fonts.
%
\def\eurosize{\csname\curfontsize nominalsize\endcsname}%
%
\ifx\curfontstyle\bfstylename
% bold:
\font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
\else
% regular:
\font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
\fi
\thiseurofont
}
% Glyphs from the EC fonts. We don't use \let for the aliases, because
% sometimes we redefine the original macro, and the alias should reflect
% the redefinition.
%
% Use LaTeX names for the Icelandic letters.
\def\DH{{\ecfont \char"D0}} % Eth
\def\dh{{\ecfont \char"F0}} % eth
\def\TH{{\ecfont \char"DE}} % Thorn
\def\th{{\ecfont \char"FE}} % thorn
%
\def\guillemetleft{{\ecfont \char"13}}
\def\guillemotleft{\guillemetleft}
\def\guillemetright{{\ecfont \char"14}}
\def\guillemotright{\guillemetright}
\def\guilsinglleft{{\ecfont \char"0E}}
\def\guilsinglright{{\ecfont \char"0F}}
\def\quotedblbase{{\ecfont \char"12}}
\def\quotesinglbase{{\ecfont \char"0D}}
%
% This positioning is not perfect (see the ogonek LaTeX package), but
% we have the precomposed glyphs for the most common cases. We put the
% tests to use those glyphs in the single \ogonek macro so we have fewer
% dummy definitions to worry about for index entries, etc.
%
% ogonek is also used with other letters in Lithuanian (IOU), but using
% the precomposed glyphs for those is not so easy since they aren't in
% the same EC font.
\def\ogonek#1{{%
\def\temp{#1}%
\ifx\temp\macrocharA\Aogonek
\else\ifx\temp\macrochara\aogonek
\else\ifx\temp\macrocharE\Eogonek
\else\ifx\temp\macrochare\eogonek
\else
\ecfont \setbox0=\hbox{#1}%
\ifdim\ht0=1ex\accent"0C #1%
\else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
\fi
\fi\fi\fi\fi
}%
}
\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
%
% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
\def\ecfont{%
% We can't distinguish serif/sans and italic/slanted, but this
% is used for crude hacks anyway (like adding French and German
% quotes to documents typeset with CM, where we lose kerning), so
% hopefully nobody will notice/care.
\edef\ecsize{\csname\curfontsize ecsize\endcsname}%
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
\ifx\curfontstyle\bfstylename
% bold:
\font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
\else
% regular:
\font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
\fi
\thisecfont
}
% @registeredsymbol - R in a circle. The font for the R should really
% be smaller yet, but lllsize is the best we can do for now.
% Adapted from the plain.tex definition of \copyright.
%
\def\registeredsymbol{%
$^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
\hfil\crcr\Orb}}%
}$%
}
% @textdegree - the normal degrees sign.
%
\def\textdegree{$^\circ$}
% Laurent Siebenmann reports \Orb undefined with:
% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
% so we'll define it if necessary.
%
\ifx\Orb\undefined
\def\Orb{\mathhexbox20D}
\fi
% Quotes.
\chardef\quotedblleft="5C
\chardef\quotedblright=`\"
\chardef\quoteleft=`\`
\chardef\quoteright=`\'
\message{page headings,}
\newskip\titlepagetopglue \titlepagetopglue = 1.5in
\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
% First the title page. Must do @settitle before @titlepage.
\newif\ifseenauthor
\newif\iffinishedtitlepage
% Do an implicit @contents or @shortcontents after @end titlepage if the
% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
%
\newif\ifsetcontentsaftertitlepage
\let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
\newif\ifsetshortcontentsaftertitlepage
\let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
\endgroup\page\hbox{}\page}
\envdef\titlepage{%
% Open one extra group, as we want to close it in the middle of \Etitlepage.
\begingroup
\parindent=0pt \textfonts
% Leave some space at the very top of the page.
\vglue\titlepagetopglue
% No rule at page bottom unless we print one at the top with @title.
\finishedtitlepagetrue
%
% Most title ``pages'' are actually two pages long, with space
% at the top of the second. We don't want the ragged left on the second.
\let\oldpage = \page
\def\page{%
\iffinishedtitlepage\else
\finishtitlepage
\fi
\let\page = \oldpage
\page
\null
}%
}
\def\Etitlepage{%
\iffinishedtitlepage\else
\finishtitlepage
\fi
% It is important to do the page break before ending the group,
% because the headline and footline are only empty inside the group.
% If we use the new definition of \page, we always get a blank page
% after the title page, which we certainly don't want.
\oldpage
\endgroup
%
% Need this before the \...aftertitlepage checks so that if they are
% in effect the toc pages will come out with page numbers.
\HEADINGSon
%
% If they want short, they certainly want long too.
\ifsetshortcontentsaftertitlepage
\shortcontents
\contents
\global\let\shortcontents = \relax
\global\let\contents = \relax
\fi
%
\ifsetcontentsaftertitlepage
\contents
\global\let\contents = \relax
\global\let\shortcontents = \relax
\fi
}
\def\finishtitlepage{%
\vskip4pt \hrule height 2pt width \hsize
\vskip\titlepagebottomglue
\finishedtitlepagetrue
}
%%% Macros to be used within @titlepage:
\let\subtitlerm=\tenrm
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
\parseargdef\title{%
\checkenv\titlepage
\leftline{\titlefonts\rmisbold #1}
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
}
\parseargdef\subtitle{%
\checkenv\titlepage
{\subtitlefont \rightline{#1}}%
}
% @author should come last, but may come many times.
% It can also be used inside @quotation.
%
\parseargdef\author{%
\def\temp{\quotation}%
\ifx\thisenv\temp
\def\quotationauthor{#1}% printed in \Equotation.
\else
\checkenv\titlepage
\ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
{\secfonts\rmisbold \leftline{#1}}%
\fi
}
%%% Set up page headings and footings.
\let\thispage=\folio
\newtoks\evenheadline % headline on even pages
\newtoks\oddheadline % headline on odd pages
\newtoks\evenfootline % footline on even pages
\newtoks\oddfootline % footline on odd pages
% Now make TeX use those variables
\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
\else \the\evenheadline \fi}}
\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
\else \the\evenfootline \fi}\HEADINGShook}
\let\HEADINGShook=\relax
% Commands to set those variables.
% For example, this is what @headings on does
% @evenheading @thistitle|@thispage|@thischapter
% @oddheading @thischapter|@thispage|@thistitle
% @evenfooting @thisfile||
% @oddfooting ||@thisfile
\def\evenheading{\parsearg\evenheadingxxx}
\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
\def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\def\oddheading{\parsearg\oddheadingxxx}
\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
\def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
\def\evenfooting{\parsearg\evenfootingxxx}
\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
\def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\def\oddfooting{\parsearg\oddfootingxxx}
\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
\def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
\global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
%
% Leave some space for the footline. Hopefully ok to assume
% @evenfooting will not be used by itself.
\global\advance\pageheight by -12pt
\global\advance\vsize by -12pt
}
\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
% @evenheadingmarks top \thischapter <- chapter at the top of a page
% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
%
% The same set of arguments for:
%
% @oddheadingmarks
% @evenfootingmarks
% @oddfootingmarks
% @everyheadingmarks
% @everyfootingmarks
\def\evenheadingmarks{\headingmarks{even}{heading}}
\def\oddheadingmarks{\headingmarks{odd}{heading}}
\def\evenfootingmarks{\headingmarks{even}{footing}}
\def\oddfootingmarks{\headingmarks{odd}{footing}}
\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
\headingmarks{odd}{heading}{#1} }
\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
\headingmarks{odd}{footing}{#1} }
% #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
\def\headingmarks#1#2#3 {%
\expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
\global\expandafter\let\csname get#1#2marks\endcsname \temp
}
\everyheadingmarks bottom
\everyfootingmarks bottom
% @headings double turns headings on for double-sided printing.
% @headings single turns headings on for single-sided printing.
% @headings off turns them off.
% @headings on same as @headings double, retained for compatibility.
% @headings after turns on double-sided headings after this page.
% @headings doubleafter turns on double-sided headings after this page.
% @headings singleafter turns on single-sided headings after this page.
% By default, they are off at the start of a document,
% and turned `on' after @end titlepage.
\def\headings #1 {\csname HEADINGS#1\endcsname}
\def\HEADINGSoff{%
\global\evenheadline={\hfil} \global\evenfootline={\hfil}
\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
\HEADINGSoff
% When we turn headings on, set the page number to 1.
% For double-sided printing, put current file name in lower left corner,
% chapter name on inside top of right hand pages, document
% title on inside top of left hand pages, and page numbers on outside top
% edge of all pages.
\def\HEADINGSdouble{%
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
\let\contentsalignmacro = \chappager
% For single-sided printing, chapter title goes across top left of page,
% page number on top right.
\def\HEADINGSsingle{%
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\let\contentsalignmacro = \chappager
}
\def\HEADINGSon{\HEADINGSdouble}
\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
\let\HEADINGSdoubleafter=\HEADINGSafter
\def\HEADINGSdoublex{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
\def\HEADINGSsinglex{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\let\contentsalignmacro = \chappager
}
% Subroutines used in generating headings
% This produces Day Month Year style of output.
% Only define if not already defined, in case a txi-??.tex file has set
% up a different format (e.g., txi-cs.tex does this).
\ifx\today\undefined
\def\today{%
\number\day\space
\ifcase\month
\or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
\or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
\or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
\fi
\space\number\year}
\fi
% @settitle line... specifies the title of the document, for headings.
% It generates no output of its own.
\def\thistitle{\putwordNoTitle}
\def\settitle{\parsearg{\gdef\thistitle}}
\message{tables,}
% Tables -- @table, @ftable, @vtable, @item(x).
% default indentation of table text
\newdimen\tableindent \tableindent=.8in
% default indentation of @itemize and @enumerate text
\newdimen\itemindent \itemindent=.3in
% margin between end of table item and start of table text.
\newdimen\itemmargin \itemmargin=.1in
% used internally for \itemindent minus \itemmargin
\newdimen\itemmax
% Note @table, @ftable, and @vtable define @item, @itemx, etc., with
% these defs.
% They also define \itemindex
% to index the item name in whatever manner is desired (perhaps none).
\newif\ifitemxneedsnegativevskip
\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
\def\internalBitem{\smallbreak \parsearg\itemzzz}
\def\internalBitemx{\itemxpar \parsearg\itemzzz}
\def\itemzzz #1{\begingroup %
\advance\hsize by -\rightskip
\advance\hsize by -\tableindent
\setbox0=\hbox{\itemindicate{#1}}%
\itemindex{#1}%
\nobreak % This prevents a break before @itemx.
%
% If the item text does not fit in the space we have, put it on a line
% by itself, and do not allow a page break either before or after that
% line. We do not start a paragraph here because then if the next
% command is, e.g., @kindex, the whatsit would get put into the
% horizontal list on a line by itself, resulting in extra blank space.
\ifdim \wd0>\itemmax
%
% Make this a paragraph so we get the \parskip glue and wrapping,
% but leave it ragged-right.
\begingroup
\advance\leftskip by-\tableindent
\advance\hsize by\tableindent
\advance\rightskip by0pt plus1fil
\leavevmode\unhbox0\par
\endgroup
%
% We're going to be starting a paragraph, but we don't want the
% \parskip glue -- logically it's part of the @item we just started.
\nobreak \vskip-\parskip
%
% Stop a page break at the \parskip glue coming up. However, if
% what follows is an environment such as @example, there will be no
% \parskip glue; then the negative vskip we just inserted would
% cause the example and the item to crash together. So we use this
% bizarre value of 10001 as a signal to \aboveenvbreak to insert
% \parskip glue after all. Section titles are handled this way also.
%
\penalty 10001
\endgroup
\itemxneedsnegativevskipfalse
\else
% The item text fits into the space. Start a paragraph, so that the
% following text (if any) will end up on the same line.
\noindent
% Do this with kerns and \unhbox so that if there is a footnote in
% the item text, it can migrate to the main vertical list and
% eventually be printed.
\nobreak\kern-\tableindent
\dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
\unhbox0
\nobreak\kern\dimen0
\endgroup
\itemxneedsnegativevskiptrue
\fi
}
\def\item{\errmessage{@item while not in a list environment}}
\def\itemx{\errmessage{@itemx while not in a list environment}}
% @table, @ftable, @vtable.
\envdef\table{%
\let\itemindex\gobble
\tablecheck{table}%
}
\envdef\ftable{%
\def\itemindex ##1{\doind {fn}{\code{##1}}}%
\tablecheck{ftable}%
}
\envdef\vtable{%
\def\itemindex ##1{\doind {vr}{\code{##1}}}%
\tablecheck{vtable}%
}
\def\tablecheck#1{%
\ifnum \the\catcode`\^^M=\active
\endgroup
\errmessage{This command won't work in this context; perhaps the problem is
that we are \inenvironment\thisenv}%
\def\next{\doignore{#1}}%
\else
\let\next\tablex
\fi
\next
}
\def\tablex#1{%
\def\itemindicate{#1}%
\parsearg\tabley
}
\def\tabley#1{%
{%
\makevalueexpandable
\edef\temp{\noexpand\tablez #1\space\space\space}%
\expandafter
}\temp \endtablez
}
\def\tablez #1 #2 #3 #4\endtablez{%
\aboveenvbreak
\ifnum 0#1>0 \advance \leftskip by #1\mil \fi
\ifnum 0#2>0 \tableindent=#2\mil \fi
\ifnum 0#3>0 \advance \rightskip by #3\mil \fi
\itemmax=\tableindent
\advance \itemmax by -\itemmargin
\advance \leftskip by \tableindent
\exdentamount=\tableindent
\parindent = 0pt
\parskip = \smallskipamount
\ifdim \parskip=0pt \parskip=2pt \fi
\let\item = \internalBitem
\let\itemx = \internalBitemx
}
\def\Etable{\endgraf\afterenvbreak}
\let\Eftable\Etable
\let\Evtable\Etable
\let\Eitemize\Etable
\let\Eenumerate\Etable
% This is the counter used by @enumerate, which is really @itemize
\newcount \itemno
\envdef\itemize{\parsearg\doitemize}
\def\doitemize#1{%
\aboveenvbreak
\itemmax=\itemindent
\advance\itemmax by -\itemmargin
\advance\leftskip by \itemindent
\exdentamount=\itemindent
\parindent=0pt
\parskip=\smallskipamount
\ifdim\parskip=0pt \parskip=2pt \fi
%
% Try typesetting the item mark that if the document erroneously says
% something like @itemize @samp (intending @table), there's an error
% right away at the @itemize. It's not the best error message in the
% world, but it's better than leaving it to the @item. This means if
% the user wants an empty mark, they have to say @w{} not just @w.
\def\itemcontents{#1}%
\setbox0 = \hbox{\itemcontents}%
%
% @itemize with no arg is equivalent to @itemize @bullet.
\ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
%
\let\item=\itemizeitem
}
% Definition of @item while inside @itemize and @enumerate.
%
\def\itemizeitem{%
\advance\itemno by 1 % for enumerations
{\let\par=\endgraf \smallbreak}% reasonable place to break
{%
% If the document has an @itemize directly after a section title, a
% \nobreak will be last on the list, and \sectionheading will have
% done a \vskip-\parskip. In that case, we don't want to zero
% parskip, or the item text will crash with the heading. On the
% other hand, when there is normal text preceding the item (as there
% usually is), we do want to zero parskip, or there would be too much
% space. In that case, we won't have a \nobreak before. At least
% that's the theory.
\ifnum\lastpenalty<10000 \parskip=0in \fi
\noindent
\hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
%
\vadjust{\penalty 1200}}% not good to break after first line of item.
\flushcr
}
% \splitoff TOKENS\endmark defines \first to be the first token in
% TOKENS, and \rest to be the remainder.
%
\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
% Allow an optional argument of an uppercase letter, lowercase letter,
% or number, to specify the first label in the enumerated list. No
% argument is the same as `1'.
%
\envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
\def\enumeratey #1 #2\endenumeratey{%
% If we were given no argument, pretend we were given `1'.
\def\thearg{#1}%
\ifx\thearg\empty \def\thearg{1}\fi
%
% Detect if the argument is a single token. If so, it might be a
% letter. Otherwise, the only valid thing it can be is a number.
% (We will always have one token, because of the test we just made.
% This is a good thing, since \splitoff doesn't work given nothing at
% all -- the first parameter is undelimited.)
\expandafter\splitoff\thearg\endmark
\ifx\rest\empty
% Only one token in the argument. It could still be anything.
% A ``lowercase letter'' is one whose \lccode is nonzero.
% An ``uppercase letter'' is one whose \lccode is both nonzero, and
% not equal to itself.
% Otherwise, we assume it's a number.
%
% We need the \relax at the end of the \ifnum lines to stop TeX from
% continuing to look for a .
%
\ifnum\lccode\expandafter`\thearg=0\relax
\numericenumerate % a number (we hope)
\else
% It's a letter.
\ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
\lowercaseenumerate % lowercase letter
\else
\uppercaseenumerate % uppercase letter
\fi
\fi
\else
% Multiple tokens in the argument. We hope it's a number.
\numericenumerate
\fi
}
% An @enumerate whose labels are integers. The starting integer is
% given in \thearg.
%
\def\numericenumerate{%
\itemno = \thearg
\startenumeration{\the\itemno}%
}
% The starting (lowercase) letter is in \thearg.
\def\lowercaseenumerate{%
\itemno = \expandafter`\thearg
\startenumeration{%
% Be sure we're not beyond the end of the alphabet.
\ifnum\itemno=0
\errmessage{No more lowercase letters in @enumerate; get a bigger
alphabet}%
\fi
\char\lccode\itemno
}%
}
% The starting (uppercase) letter is in \thearg.
\def\uppercaseenumerate{%
\itemno = \expandafter`\thearg
\startenumeration{%
% Be sure we're not beyond the end of the alphabet.
\ifnum\itemno=0
\errmessage{No more uppercase letters in @enumerate; get a bigger
alphabet}
\fi
\char\uccode\itemno
}%
}
% Call \doitemize, adding a period to the first argument and supplying the
% common last two arguments. Also subtract one from the initial value in
% \itemno, since @item increments \itemno.
%
\def\startenumeration#1{%
\advance\itemno by -1
\doitemize{#1.}\flushcr
}
% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
% to @enumerate.
%
\def\alphaenumerate{\enumerate{a}}
\def\capsenumerate{\enumerate{A}}
\def\Ealphaenumerate{\Eenumerate}
\def\Ecapsenumerate{\Eenumerate}
% @multitable macros
% Amy Hendrickson, 8/18/94, 3/6/96
%
% @multitable ... @end multitable will make as many columns as desired.
% Contents of each column will wrap at width given in preamble. Width
% can be specified either with sample text given in a template line,
% or in percent of \hsize, the current width of text on page.
% Table can continue over pages but will only break between lines.
% To make preamble:
%
% Either define widths of columns in terms of percent of \hsize:
% @multitable @columnfractions .25 .3 .45
% @item ...
%
% Numbers following @columnfractions are the percent of the total
% current hsize to be used for each column. You may use as many
% columns as desired.
% Or use a template:
% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
% @item ...
% using the widest term desired in each column.
% Each new table line starts with @item, each subsequent new column
% starts with @tab. Empty columns may be produced by supplying @tab's
% with nothing between them for as many times as empty columns are needed,
% ie, @tab@tab@tab will produce two empty columns.
% @item, @tab do not need to be on their own lines, but it will not hurt
% if they are.
% Sample multitable:
% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
% @item first col stuff @tab second col stuff @tab third col
% @item
% first col stuff
% @tab
% second col stuff
% @tab
% third col
% @item first col stuff @tab second col stuff
% @tab Many paragraphs of text may be used in any column.
%
% They will wrap at the width determined by the template.
% @item@tab@tab This will be in third column.
% @end multitable
% Default dimensions may be reset by user.
% @multitableparskip is vertical space between paragraphs in table.
% @multitableparindent is paragraph indent in table.
% @multitablecolmargin is horizontal space to be left between columns.
% @multitablelinespace is space to leave between table items, baseline
% to baseline.
% 0pt means it depends on current normal line spacing.
%
\newskip\multitableparskip
\newskip\multitableparindent
\newdimen\multitablecolspace
\newskip\multitablelinespace
\multitableparskip=0pt
\multitableparindent=6pt
\multitablecolspace=12pt
\multitablelinespace=0pt
% Macros used to set up halign preamble:
%
\let\endsetuptable\relax
\def\xendsetuptable{\endsetuptable}
\let\columnfractions\relax
\def\xcolumnfractions{\columnfractions}
\newif\ifsetpercent
% #1 is the @columnfraction, usually a decimal number like .5, but might
% be just 1. We just use it, whatever it is.
%
\def\pickupwholefraction#1 {%
\global\advance\colcount by 1
\expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
\setuptable
}
\newcount\colcount
\def\setuptable#1{%
\def\firstarg{#1}%
\ifx\firstarg\xendsetuptable
\let\go = \relax
\else
\ifx\firstarg\xcolumnfractions
\global\setpercenttrue
\else
\ifsetpercent
\let\go\pickupwholefraction
\else
\global\advance\colcount by 1
\setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
% separator; typically that is always in the input, anyway.
\expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
\fi
\fi
\ifx\go\pickupwholefraction
% Put the argument back for the \pickupwholefraction call, so
% we'll always have a period there to be parsed.
\def\go{\pickupwholefraction#1}%
\else
\let\go = \setuptable
\fi%
\fi
\go
}
% multitable-only commands.
%
% @headitem starts a heading row, which we typeset in bold.
% Assignments have to be global since we are inside the implicit group
% of an alignment entry. \everycr resets \everytab so we don't have to
% undo it ourselves.
\def\headitemfont{\b}% for people to use in the template row; not changeable
\def\headitem{%
\checkenv\multitable
\crcr
\global\everytab={\bf}% can't use \headitemfont since the parsing differs
\the\everytab % for the first item
}%
%
% A \tab used to include \hskip1sp. But then the space in a template
% line is not enough. That is bad. So let's go back to just `&' until
% we again encounter the problem the 1sp was intended to solve.
% --karl, nathan@acm.org, 20apr99.
\def\tab{\checkenv\multitable &\the\everytab}%
% @multitable ... @end multitable definitions:
%
\newtoks\everytab % insert after every tab.
%
\envdef\multitable{%
\vskip\parskip
\startsavinginserts
%
% @item within a multitable starts a normal row.
% We use \def instead of \let so that if one of the multitable entries
% contains an @itemize, we don't choke on the \item (seen as \crcr aka
% \endtemplate) expanding \doitemize.
\def\item{\crcr}%
%
\tolerance=9500
\hbadness=9500
\setmultitablespacing
\parskip=\multitableparskip
\parindent=\multitableparindent
\overfullrule=0pt
\global\colcount=0
%
\everycr = {%
\noalign{%
\global\everytab={}%
\global\colcount=0 % Reset the column counter.
% Check for saved footnotes, etc.
\checkinserts
% Keeps underfull box messages off when table breaks over pages.
%\filbreak
% Maybe so, but it also creates really weird page breaks when the
% table breaks over pages. Wouldn't \vfil be better? Wait until the
% problem manifests itself, so it can be fixed for real --karl.
}%
}%
%
\parsearg\domultitable
}
\def\domultitable#1{%
% To parse everything between @multitable and @item:
\setuptable#1 \endsetuptable
%
% This preamble sets up a generic column definition, which will
% be used as many times as user calls for columns.
% \vtop will set a single line and will also let text wrap and
% continue for many paragraphs if desired.
\halign\bgroup &%
\global\advance\colcount by 1
\multistrut
\vtop{%
% Use the current \colcount to find the correct column width:
\hsize=\expandafter\csname col\the\colcount\endcsname
%
% In order to keep entries from bumping into each other
% we will add a \leftskip of \multitablecolspace to all columns after
% the first one.
%
% If a template has been used, we will add \multitablecolspace
% to the width of each template entry.
%
% If the user has set preamble in terms of percent of \hsize we will
% use that dimension as the width of the column, and the \leftskip
% will keep entries from bumping into each other. Table will start at
% left margin and final column will justify at right margin.
%
% Make sure we don't inherit \rightskip from the outer environment.
\rightskip=0pt
\ifnum\colcount=1
% The first column will be indented with the surrounding text.
\advance\hsize by\leftskip
\else
\ifsetpercent \else
% If user has not set preamble in terms of percent of \hsize
% we will advance \hsize by \multitablecolspace.
\advance\hsize by \multitablecolspace
\fi
% In either case we will make \leftskip=\multitablecolspace:
\leftskip=\multitablecolspace
\fi
% Ignoring space at the beginning and end avoids an occasional spurious
% blank line, when TeX decides to break the line at the space before the
% box from the multistrut, so the strut ends up on a line by itself.
% For example:
% @multitable @columnfractions .11 .89
% @item @code{#}
% @tab Legal holiday which is valid in major parts of the whole country.
% Is automatically provided with highlighting sequences respectively
% marking characters.
\noindent\ignorespaces##\unskip\multistrut
}\cr
}
\def\Emultitable{%
\crcr
\egroup % end the \halign
\global\setpercentfalse
}
\def\setmultitablespacing{%
\def\multistrut{\strut}% just use the standard line spacing
%
% Compute \multitablelinespace (if not defined by user) for use in
% \multitableparskip calculation. We used define \multistrut based on
% this, but (ironically) that caused the spacing to be off.
% See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
\ifdim\multitablelinespace=0pt
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
\global\advance\multitablelinespace by-\ht0
\fi
%% Test to see if parskip is larger than space between lines of
%% table. If not, do nothing.
%% If so, set to same dimension as multitablelinespace.
\ifdim\multitableparskip>\multitablelinespace
\global\multitableparskip=\multitablelinespace
\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
%% than skip between lines in the table.
\fi%
\ifdim\multitableparskip=0pt
\global\multitableparskip=\multitablelinespace
\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
%% than skip between lines in the table.
\fi}
\message{conditionals,}
% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
% @ifnotxml always succeed. They currently do nothing; we don't
% attempt to check whether the conditionals are properly nested. But we
% have to remember that they are conditionals, so that @end doesn't
% attempt to close an environment group.
%
\def\makecond#1{%
\expandafter\let\csname #1\endcsname = \relax
\expandafter\let\csname iscond.#1\endcsname = 1
}
\makecond{iftex}
\makecond{ifnotdocbook}
\makecond{ifnothtml}
\makecond{ifnotinfo}
\makecond{ifnotplaintext}
\makecond{ifnotxml}
% Ignore @ignore, @ifhtml, @ifinfo, and the like.
%
\def\direntry{\doignore{direntry}}
\def\documentdescription{\doignore{documentdescription}}
\def\docbook{\doignore{docbook}}
\def\html{\doignore{html}}
\def\ifdocbook{\doignore{ifdocbook}}
\def\ifhtml{\doignore{ifhtml}}
\def\ifinfo{\doignore{ifinfo}}
\def\ifnottex{\doignore{ifnottex}}
\def\ifplaintext{\doignore{ifplaintext}}
\def\ifxml{\doignore{ifxml}}
\def\ignore{\doignore{ignore}}
\def\menu{\doignore{menu}}
\def\xml{\doignore{xml}}
% Ignore text until a line `@end #1', keeping track of nested conditionals.
%
% A count to remember the depth of nesting.
\newcount\doignorecount
\def\doignore#1{\begingroup
% Scan in ``verbatim'' mode:
\obeylines
\catcode`\@ = \other
\catcode`\{ = \other
\catcode`\} = \other
%
% Make sure that spaces turn into tokens that match what \doignoretext wants.
\spaceisspace
%
% Count number of #1's that we've seen.
\doignorecount = 0
%
% Swallow text until we reach the matching `@end #1'.
\dodoignore{#1}%
}
{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
\obeylines %
%
\gdef\dodoignore#1{%
% #1 contains the command name as a string, e.g., `ifinfo'.
%
% Define a command to find the next `@end #1'.
\long\def\doignoretext##1^^M@end #1{%
\doignoretextyyy##1^^M@#1\_STOP_}%
%
% And this command to find another #1 command, at the beginning of a
% line. (Otherwise, we would consider a line `@c @ifset', for
% example, to count as an @ifset for nesting.)
\long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
%
% And now expand that command.
\doignoretext ^^M%
}%
}
\def\doignoreyyy#1{%
\def\temp{#1}%
\ifx\temp\empty % Nothing found.
\let\next\doignoretextzzz
\else % Found a nested condition, ...
\advance\doignorecount by 1
\let\next\doignoretextyyy % ..., look for another.
% If we're here, #1 ends with ^^M\ifinfo (for example).
\fi
\next #1% the token \_STOP_ is present just after this macro.
}
% We have to swallow the remaining "\_STOP_".
%
\def\doignoretextzzz#1{%
\ifnum\doignorecount = 0 % We have just found the outermost @end.
\let\next\enddoignore
\else % Still inside a nested condition.
\advance\doignorecount by -1
\let\next\doignoretext % Look for the next @end.
\fi
\next
}
% Finish off ignored text.
{ \obeylines%
% Ignore anything after the last `@end #1'; this matters in verbatim
% environments, where otherwise the newline after an ignored conditional
% would result in a blank line in the output.
\gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
}
% @set VAR sets the variable VAR to an empty value.
% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
%
% Since we want to separate VAR from REST-OF-LINE (which might be
% empty), we can't just use \parsearg; we have to insert a space of our
% own to delimit the rest of the line, and then take it out again if we
% didn't need it.
% We rely on the fact that \parsearg sets \catcode`\ =10.
%
\parseargdef\set{\setyyy#1 \endsetyyy}
\def\setyyy#1 #2\endsetyyy{%
{%
\makevalueexpandable
\def\temp{#2}%
\edef\next{\gdef\makecsname{SET#1}}%
\ifx\temp\empty
\next{}%
\else
\setzzz#2\endsetzzz
\fi
}%
}
% Remove the trailing space \setxxx inserted.
\def\setzzz#1 \endsetzzz{\next{#1}}
% @clear VAR clears (i.e., unsets) the variable VAR.
%
\parseargdef\clear{%
{%
\makevalueexpandable
\global\expandafter\let\csname SET#1\endcsname=\relax
}%
}
% @value{foo} gets the text saved in variable foo.
\def\value{\begingroup\makevalueexpandable\valuexxx}
\def\valuexxx#1{\expandablevalue{#1}\endgroup}
{
\catcode`\- = \active \catcode`\_ = \active
%
\gdef\makevalueexpandable{%
\let\value = \expandablevalue
% We don't want these characters active, ...
\catcode`\-=\other \catcode`\_=\other
% ..., but we might end up with active ones in the argument if
% we're called from @code, as @code{@value{foo-bar_}}, though.
% So \let them to their normal equivalents.
\let-\realdash \let_\normalunderscore
}
}
% We have this subroutine so that we can handle at least some @value's
% properly in indexes (we call \makevalueexpandable in \indexdummies).
% The command has to be fully expandable (if the variable is set), since
% the result winds up in the index file. This means that if the
% variable's value contains other Texinfo commands, it's almost certain
% it will fail (although perhaps we could fix that with sufficient work
% to do a one-level expansion on the result, instead of complete).
%
\def\expandablevalue#1{%
\expandafter\ifx\csname SET#1\endcsname\relax
{[No value for ``#1'']}%
\message{Variable `#1', used in @value, is not set.}%
\else
\csname SET#1\endcsname
\fi
}
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
%
% To get special treatment of `@end ifset,' call \makeond and the redefine.
%
\makecond{ifset}
\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
\def\doifset#1#2{%
{%
\makevalueexpandable
\let\next=\empty
\expandafter\ifx\csname SET#2\endcsname\relax
#1% If not set, redefine \next.
\fi
\expandafter
}\next
}
\def\ifsetfail{\doignore{ifset}}
% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
% defined with @set, or has been undefined with @clear.
%
% The `\else' inside the `\doifset' parameter is a trick to reuse the
% above code: if the variable is not set, do nothing, if it is set,
% then redefine \next to \ifclearfail.
%
\makecond{ifclear}
\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
\def\ifclearfail{\doignore{ifclear}}
% @dircategory CATEGORY -- specify a category of the dir file
% which this file should belong to. Ignore this in TeX.
\let\dircategory=\comment
% @defininfoenclose.
\let\definfoenclose=\comment
\message{indexing,}
% Index generation facilities
% Define \newwrite to be identical to plain tex's \newwrite
% except not \outer, so it can be used within macros and \if's.
\edef\newwrite{\makecsname{ptexnewwrite}}
% \newindex {foo} defines an index named foo.
% It automatically defines \fooindex such that
% \fooindex ...rest of line... puts an entry in the index foo.
% It also defines \fooindfile to be the number of the output channel for
% the file that accumulates this index. The file's extension is foo.
% The name of an index should be no more than 2 characters long
% for the sake of vms.
%
\def\newindex#1{%
\iflinks
\expandafter\newwrite \csname#1indfile\endcsname
\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
\fi
\expandafter\xdef\csname#1index\endcsname{% % Define @#1index
\noexpand\doindex{#1}}
}
% @defindex foo == \newindex{foo}
%
\def\defindex{\parsearg\newindex}
% Define @defcodeindex, like @defindex except put all entries in @code.
%
\def\defcodeindex{\parsearg\newcodeindex}
%
\def\newcodeindex#1{%
\iflinks
\expandafter\newwrite \csname#1indfile\endcsname
\openout \csname#1indfile\endcsname \jobname.#1
\fi
\expandafter\xdef\csname#1index\endcsname{%
\noexpand\docodeindex{#1}}%
}
% @synindex foo bar makes index foo feed into index bar.
% Do this instead of @defindex foo if you don't want it as a separate index.
%
% @syncodeindex foo bar similar, but put all entries made for index foo
% inside @code.
%
\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
% #3 the target index (bar).
\def\dosynindex#1#2#3{%
% Only do \closeout if we haven't already done it, else we'll end up
% closing the target index.
\expandafter \ifx\csname donesynindex#2\endcsname \relax
% The \closeout helps reduce unnecessary open files; the limit on the
% Acorn RISC OS is a mere 16 files.
\expandafter\closeout\csname#2indfile\endcsname
\expandafter\let\csname donesynindex#2\endcsname = 1
\fi
% redefine \fooindfile:
\expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
\expandafter\let\csname#2indfile\endcsname=\temp
% redefine \fooindex:
\expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
}
% Define \doindex, the driver for all \fooindex macros.
% Argument #1 is generated by the calling \fooindex macro,
% and it is "foo", the name of the index.
% \doindex just uses \parsearg; it calls \doind for the actual work.
% This is because \doind is more useful to call from other macros.
% There is also \dosubind {index}{topic}{subtopic}
% which makes an entry in a two-level index such as the operation index.
\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
\def\singleindexer #1{\doind{\indexname}{#1}}
% like the previous two, but they put @code around the argument.
\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
% Take care of Texinfo commands that can appear in an index entry.
% Since there are some commands we want to expand, and others we don't,
% we have to laboriously prevent expansion for those that we don't.
%
\def\indexdummies{%
\escapechar = `\\ % use backslash in output files.
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
\def\ {\realbackslash\space }%
%
% Need these in case \tex is in effect and \{ is a \delimiter again.
% But can't use \lbracecmd and \rbracecmd because texindex assumes
% braces and backslashes are used only as delimiters.
\let\{ = \mylbrace
\let\} = \myrbrace
%
% I don't entirely understand this, but when an index entry is
% generated from a macro call, the \endinput which \scanmacro inserts
% causes processing to be prematurely terminated. This is,
% apparently, because \indexsorttmp is fully expanded, and \endinput
% is an expandable command. The redefinition below makes \endinput
% disappear altogether for that purpose -- although logging shows that
% processing continues to some further point. On the other hand, it
% seems \endinput does not hurt in the printed index arg, since that
% is still getting written without apparent harm.
%
% Sample source (mac-idx3.tex, reported by Graham Percival to
% help-texinfo, 22may06):
% @macro funindex {WORD}
% @findex xyz
% @end macro
% ...
% @funindex commtest
%
% The above is not enough to reproduce the bug, but it gives the flavor.
%
% Sample whatsit resulting:
% .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
%
% So:
\let\endinput = \empty
%
% Do the redefinitions.
\commondummies
}
% For the aux and toc files, @ is the escape character. So we want to
% redefine everything using @ as the escape character (instead of
% \realbackslash, still used for index files). When everything uses @,
% this will be simpler.
%
\def\atdummies{%
\def\@{@@}%
\def\ {@ }%
\let\{ = \lbraceatcmd
\let\} = \rbraceatcmd
%
% Do the redefinitions.
\commondummies
\otherbackslash
}
% Called from \indexdummies and \atdummies.
%
\def\commondummies{%
%
% \definedummyword defines \#1 as \string\#1\space, thus effectively
% preventing its expansion. This is used only for control% words,
% not control letters, because the \space would be incorrect for
% control characters, but is needed to separate the control word
% from whatever follows.
%
% For control letters, we have \definedummyletter, which omits the
% space.
%
% These can be used both for control words that take an argument and
% those that do not. If it is followed by {arg} in the input, then
% that will dutifully get written to the index (or wherever).
%
\def\definedummyword ##1{\def##1{\string##1\space}}%
\def\definedummyletter##1{\def##1{\string##1}}%
\let\definedummyaccent\definedummyletter
%
\commondummiesnofonts
%
\definedummyletter\_%
%
% Non-English letters.
\definedummyword\AA
\definedummyword\AE
\definedummyword\DH
\definedummyword\L
\definedummyword\O
\definedummyword\OE
\definedummyword\TH
\definedummyword\aa
\definedummyword\ae
\definedummyword\dh
\definedummyword\exclamdown
\definedummyword\l
\definedummyword\o
\definedummyword\oe
\definedummyword\ordf
\definedummyword\ordm
\definedummyword\questiondown
\definedummyword\ss
\definedummyword\th
%
% Although these internal commands shouldn't show up, sometimes they do.
\definedummyword\bf
\definedummyword\gtr
\definedummyword\hat
\definedummyword\less
\definedummyword\sf
\definedummyword\sl
\definedummyword\tclose
\definedummyword\tt
%
\definedummyword\LaTeX
\definedummyword\TeX
%
% Assorted special characters.
\definedummyword\bullet
\definedummyword\comma
\definedummyword\copyright
\definedummyword\registeredsymbol
\definedummyword\dots
\definedummyword\enddots
\definedummyword\equiv
\definedummyword\error
\definedummyword\euro
\definedummyword\guillemetleft
\definedummyword\guillemetright
\definedummyword\guilsinglleft
\definedummyword\guilsinglright
\definedummyword\expansion
\definedummyword\minus
\definedummyword\ogonek
\definedummyword\pounds
\definedummyword\point
\definedummyword\print
\definedummyword\quotedblbase
\definedummyword\quotedblleft
\definedummyword\quotedblright
\definedummyword\quoteleft
\definedummyword\quoteright
\definedummyword\quotesinglbase
\definedummyword\result
\definedummyword\textdegree
%
% We want to disable all macros so that they are not expanded by \write.
\macrolist
%
\normalturnoffactive
%
% Handle some cases of @value -- where it does not contain any
% (non-fully-expandable) commands.
\makevalueexpandable
}
% \commondummiesnofonts: common to \commondummies and \indexnofonts.
%
\def\commondummiesnofonts{%
% Control letters and accents.
\definedummyletter\!%
\definedummyaccent\"%
\definedummyaccent\'%
\definedummyletter\*%
\definedummyaccent\,%
\definedummyletter\.%
\definedummyletter\/%
\definedummyletter\:%
\definedummyaccent\=%
\definedummyletter\?%
\definedummyaccent\^%
\definedummyaccent\`%
\definedummyaccent\~%
\definedummyword\u
\definedummyword\v
\definedummyword\H
\definedummyword\dotaccent
\definedummyword\ogonek
\definedummyword\ringaccent
\definedummyword\tieaccent
\definedummyword\ubaraccent
\definedummyword\udotaccent
\definedummyword\dotless
%
% Texinfo font commands.
\definedummyword\b
\definedummyword\i
\definedummyword\r
\definedummyword\sc
\definedummyword\t
%
% Commands that take arguments.
\definedummyword\acronym
\definedummyword\cite
\definedummyword\code
\definedummyword\command
\definedummyword\dfn
\definedummyword\email
\definedummyword\emph
\definedummyword\env
\definedummyword\file
\definedummyword\kbd
\definedummyword\key
\definedummyword\math
\definedummyword\option
\definedummyword\pxref
\definedummyword\ref
\definedummyword\samp
\definedummyword\strong
\definedummyword\tie
\definedummyword\uref
\definedummyword\url
\definedummyword\var
\definedummyword\verb
\definedummyword\w
\definedummyword\xref
}
% \indexnofonts is used when outputting the strings to sort the index
% by, and when constructing control sequence names. It eliminates all
% control sequences and just writes whatever the best ASCII sort string
% would be for a given command (usually its argument).
%
\def\indexnofonts{%
% Accent commands should become @asis.
\def\definedummyaccent##1{\let##1\asis}%
% We can just ignore other control letters.
\def\definedummyletter##1{\let##1\empty}%
% Hopefully, all control words can become @asis.
\let\definedummyword\definedummyaccent
%
\commondummiesnofonts
%
% Don't no-op \tt, since it isn't a user-level command
% and is used in the definitions of the active chars like <, >, |, etc.
% Likewise with the other plain tex font commands.
%\let\tt=\asis
%
\def\ { }%
\def\@{@}%
% how to handle braces?
\def\_{\normalunderscore}%
%
% Non-English letters.
\def\AA{AA}%
\def\AE{AE}%
\def\DH{DZZ}%
\def\L{L}%
\def\OE{OE}%
\def\O{O}%
\def\TH{ZZZ}%
\def\aa{aa}%
\def\ae{ae}%
\def\dh{dzz}%
\def\exclamdown{!}%
\def\l{l}%
\def\oe{oe}%
\def\ordf{a}%
\def\ordm{o}%
\def\o{o}%
\def\questiondown{?}%
\def\ss{ss}%
\def\th{zzz}%
%
\def\LaTeX{LaTeX}%
\def\TeX{TeX}%
%
% Assorted special characters.
% (The following {} will end up in the sort string, but that's ok.)
\def\bullet{bullet}%
\def\comma{,}%
\def\copyright{copyright}%
\def\dots{...}%
\def\enddots{...}%
\def\equiv{==}%
\def\error{error}%
\def\euro{euro}%
\def\expansion{==>}%
\def\guillemetleft{<<}%
\def\guillemetright{>>}%
\def\guilsinglleft{<}%
\def\guilsinglright{>}%
\def\minus{-}%
\def\point{.}%
\def\pounds{pounds}%
\def\print{-|}%
\def\quotedblbase{"}%
\def\quotedblleft{"}%
\def\quotedblright{"}%
\def\quoteleft{`}%
\def\quoteright{'}%
\def\quotesinglbase{,}%
\def\registeredsymbol{R}%
\def\result{=>}%
\def\textdegree{o}%
%
% We need to get rid of all macros, leaving only the arguments (if present).
% Of course this is not nearly correct, but it is the best we can do for now.
% makeinfo does not expand macros in the argument to @deffn, which ends up
% writing an index entry, and texindex isn't prepared for an index sort entry
% that starts with \.
%
% Since macro invocations are followed by braces, we can just redefine them
% to take a single TeX argument. The case of a macro invocation that
% goes to end-of-line is not handled.
%
\macrolist
}
\let\indexbackslash=0 %overridden during \printindex.
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
% Most index entries go through here, but \dosubind is the general case.
% #1 is the index name, #2 is the entry text.
\def\doind#1#2{\dosubind{#1}{#2}{}}
% Workhorse for all \fooindexes.
% #1 is name of index, #2 is stuff to put there, #3 is subentry --
% empty if called from \doind, as we usually are (the main exception
% is with most defuns, which call us directly).
%
\def\dosubind#1#2#3{%
\iflinks
{%
% Store the main index entry text (including the third arg).
\toks0 = {#2}%
% If third arg is present, precede it with a space.
\def\thirdarg{#3}%
\ifx\thirdarg\empty \else
\toks0 = \expandafter{\the\toks0 \space #3}%
\fi
%
\edef\writeto{\csname#1indfile\endcsname}%
%
\safewhatsit\dosubindwrite
}%
\fi
}
% Write the entry in \toks0 to the index file:
%
\def\dosubindwrite{%
% Put the index entry in the margin if desired.
\ifx\SETmarginindex\relax\else
\insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
\fi
%
% Remember, we are within a group.
\indexdummies % Must do this here, since \bf, etc expand at this stage
\def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
% so it will be output as is; and it will print as backslash.
%
% Process the index entry with all font commands turned off, to
% get the string to sort by.
{\indexnofonts
\edef\temp{\the\toks0}% need full expansion
\xdef\indexsorttmp{\temp}%
}%
%
% Set up the complete index entry, with both the sort key and
% the original text, including any font commands. We write
% three arguments to \entry to the .?? file (four in the
% subentry case), texindex reduces to two when writing the .??s
% sorted result.
\edef\temp{%
\write\writeto{%
\string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
}%
\temp
}
% Take care of unwanted page breaks/skips around a whatsit:
%
% If a skip is the last thing on the list now, preserve it
% by backing up by \lastskip, doing the \write, then inserting
% the skip again. Otherwise, the whatsit generated by the
% \write or \pdfdest will make \lastskip zero. The result is that
% sequences like this:
% @end defun
% @tindex whatever
% @defun ...
% will have extra space inserted, because the \medbreak in the
% start of the @defun won't see the skip inserted by the @end of
% the previous defun.
%
% But don't do any of this if we're not in vertical mode. We
% don't want to do a \vskip and prematurely end a paragraph.
%
% Avoid page breaks due to these extra skips, too.
%
% But wait, there is a catch there:
% We'll have to check whether \lastskip is zero skip. \ifdim is not
% sufficient for this purpose, as it ignores stretch and shrink parts
% of the skip. The only way seems to be to check the textual
% representation of the skip.
%
% The following is almost like \def\zeroskipmacro{0.0pt} except that
% the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
%
\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
%
\newskip\whatsitskip
\newcount\whatsitpenalty
%
% ..., ready, GO:
%
\def\safewhatsit#1{%
\ifhmode
#1%
\else
% \lastskip and \lastpenalty cannot both be nonzero simultaneously.
\whatsitskip = \lastskip
\edef\lastskipmacro{\the\lastskip}%
\whatsitpenalty = \lastpenalty
%
% If \lastskip is nonzero, that means the last item was a
% skip. And since a skip is discardable, that means this
% -\whatsitskip glue we're inserting is preceded by a
% non-discardable item, therefore it is not a potential
% breakpoint, therefore no \nobreak needed.
\ifx\lastskipmacro\zeroskipmacro
\else
\vskip-\whatsitskip
\fi
%
#1%
%
\ifx\lastskipmacro\zeroskipmacro
% If \lastskip was zero, perhaps the last item was a penalty, and
% perhaps it was >=10000, e.g., a \nobreak. In that case, we want
% to re-insert the same penalty (values >10000 are used for various
% signals); since we just inserted a non-discardable item, any
% following glue (such as a \parskip) would be a breakpoint. For example:
%
% @deffn deffn-whatever
% @vindex index-whatever
% Description.
% would allow a break between the index-whatever whatsit
% and the "Description." paragraph.
\ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
\else
% On the other hand, if we had a nonzero \lastskip,
% this make-up glue would be preceded by a non-discardable item
% (the whatsit from the \write), so we must insert a \nobreak.
\nobreak\vskip\whatsitskip
\fi
\fi
}
% The index entry written in the file actually looks like
% \entry {sortstring}{page}{topic}
% or
% \entry {sortstring}{page}{topic}{subtopic}
% The texindex program reads in these files and writes files
% containing these kinds of lines:
% \initial {c}
% before the first topic whose initial is c
% \entry {topic}{pagelist}
% for a topic that is used without subtopics
% \primary {topic}
% for the beginning of a topic that is used with subtopics
% \secondary {subtopic}{pagelist}
% for each subtopic.
% Define the user-accessible indexing commands
% @findex, @vindex, @kindex, @cindex.
\def\findex {\fnindex}
\def\kindex {\kyindex}
\def\cindex {\cpindex}
\def\vindex {\vrindex}
\def\tindex {\tpindex}
\def\pindex {\pgindex}
\def\cindexsub {\begingroup\obeylines\cindexsub}
{\obeylines %
\gdef\cindexsub "#1" #2^^M{\endgroup %
\dosubind{cp}{#2}{#1}}}
% Define the macros used in formatting output of the sorted index material.
% @printindex causes a particular index (the ??s file) to get printed.
% It does not print any chapter heading (usually an @unnumbered).
%
\parseargdef\printindex{\begingroup
\dobreak \chapheadingskip{10000}%
%
\smallfonts \rm
\tolerance = 9500
\plainfrenchspacing
\everypar = {}% don't want the \kern\-parindent from indentation suppression.
%
% See if the index file exists and is nonempty.
% Change catcode of @ here so that if the index file contains
% \initial {@}
% as its first line, TeX doesn't complain about mismatched braces
% (because it thinks @} is a control sequence).
\catcode`\@ = 11
\openin 1 \jobname.#1s
\ifeof 1
% \enddoublecolumns gets confused if there is no text in the index,
% and it loses the chapter title and the aux file entries for the
% index. The easiest way to prevent this problem is to make sure
% there is some text.
\putwordIndexNonexistent
\else
%
% If the index file exists but is empty, then \openin leaves \ifeof
% false. We have to make TeX try to read something from the file, so
% it can discover if there is anything in it.
\read 1 to \temp
\ifeof 1
\putwordIndexIsEmpty
\else
% Index files are almost Texinfo source, but we use \ as the escape
% character. It would be better to use @, but that's too big a change
% to make right now.
\def\indexbackslash{\backslashcurfont}%
\catcode`\\ = 0
\escapechar = `\\
\begindoublecolumns
\input \jobname.#1s
\enddoublecolumns
\fi
\fi
\closein 1
\endgroup}
% These macros are used by the sorted index file itself.
% Change them to control the appearance of the index.
\def\initial#1{{%
% Some minor font changes for the special characters.
\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
%
% Remove any glue we may have, we'll be inserting our own.
\removelastskip
%
% We like breaks before the index initials, so insert a bonus.
\nobreak
\vskip 0pt plus 3\baselineskip
\penalty 0
\vskip 0pt plus -3\baselineskip
%
% Typeset the initial. Making this add up to a whole number of
% baselineskips increases the chance of the dots lining up from column
% to column. It still won't often be perfect, because of the stretch
% we need before each entry, but it's better.
%
% No shrink because it confuses \balancecolumns.
\vskip 1.67\baselineskip plus .5\baselineskip
\leftline{\secbf #1}%
% Do our best not to break after the initial.
\nobreak
\vskip .33\baselineskip plus .1\baselineskip
}}
% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
% then page number (#2) flushed to the right margin. It is used for index
% and table of contents entries. The paragraph is indented by \leftskip.
%
% A straightforward implementation would start like this:
% \def\entry#1#2{...
% But this freezes the catcodes in the argument, and can cause problems to
% @code, which sets - active. This problem was fixed by a kludge---
% ``-'' was active throughout whole index, but this isn't really right.
%
% The right solution is to prevent \entry from swallowing the whole text.
% --kasal, 21nov03
\def\entry{%
\begingroup
%
% Start a new paragraph if necessary, so our assignments below can't
% affect previous text.
\par
%
% Do not fill out the last line with white space.
\parfillskip = 0in
%
% No extra space above this paragraph.
\parskip = 0in
%
% Do not prefer a separate line ending with a hyphen to fewer lines.
\finalhyphendemerits = 0
%
% \hangindent is only relevant when the entry text and page number
% don't both fit on one line. In that case, bob suggests starting the
% dots pretty far over on the line. Unfortunately, a large
% indentation looks wrong when the entry text itself is broken across
% lines. So we use a small indentation and put up with long leaders.
%
% \hangafter is reset to 1 (which is the value we want) at the start
% of each paragraph, so we need not do anything with that.
\hangindent = 2em
%
% When the entry text needs to be broken, just fill out the first line
% with blank space.
\rightskip = 0pt plus1fil
%
% A bit of stretch before each entry for the benefit of balancing
% columns.
\vskip 0pt plus1pt
%
% Swallow the left brace of the text (first parameter):
\afterassignment\doentry
\let\temp =
}
\def\doentry{%
\bgroup % Instead of the swallowed brace.
\noindent
\aftergroup\finishentry
% And now comes the text of the entry.
}
\def\finishentry#1{%
% #1 is the page number.
%
% The following is kludged to not output a line of dots in the index if
% there are no page numbers. The next person who breaks this will be
% cursed by a Unix daemon.
\setbox\boxA = \hbox{#1}%
\ifdim\wd\boxA = 0pt
\ %
\else
%
% If we must, put the page number on a line of its own, and fill out
% this line with blank space. (The \hfil is overwhelmed with the
% fill leaders glue in \indexdotfill if the page number does fit.)
\hfil\penalty50
\null\nobreak\indexdotfill % Have leaders before the page number.
%
% The `\ ' here is removed by the implicit \unskip that TeX does as
% part of (the primitive) \par. Without it, a spurious underfull
% \hbox ensues.
\ifpdf
\pdfgettoks#1.%
\ \the\toksA
\else
\ #1%
\fi
\fi
\par
\endgroup
}
% Like plain.tex's \dotfill, except uses up at least 1 em.
\def\indexdotfill{\cleaders
\hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
\def\primary #1{\line{#1\hfil}}
\newskip\secondaryindent \secondaryindent=0.5cm
\def\secondary#1#2{{%
\parfillskip=0in
\parskip=0in
\hangindent=1in
\hangafter=1
\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
\ifpdf
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
\else
#2
\fi
\par
}}
% Define two-column mode, which we use to typeset indexes.
% Adapted from the TeXbook, page 416, which is to say,
% the manmac.tex format used to print the TeXbook itself.
\catcode`\@=11
\newbox\partialpage
\newdimen\doublecolumnhsize
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
% Grab any single-column material above us.
\output = {%
%
% Here is a possibility not foreseen in manmac: if we accumulate a
% whole lot of material, we might end up calling this \output
% routine twice in a row (see the doublecol-lose test, which is
% essentially a couple of indexes with @setchapternewpage off). In
% that case we just ship out what is in \partialpage with the normal
% output routine. Generally, \partialpage will be empty when this
% runs and this will be a no-op. See the indexspread.tex test case.
\ifvoid\partialpage \else
\onepageout{\pagecontents\partialpage}%
\fi
%
\global\setbox\partialpage = \vbox{%
% Unvbox the main output page.
\unvbox\PAGE
\kern-\topskip \kern\baselineskip
}%
}%
\eject % run that output routine to set \partialpage
%
% Use the double-column output routine for subsequent pages.
\output = {\doublecolumnout}%
%
% Change the page size parameters. We could do this once outside this
% routine, in each of @smallbook, @afourpaper, and the default 8.5x11
% format, but then we repeat the same computation. Repeating a couple
% of assignments once per index is clearly meaningless for the
% execution time, so we may as well do it in one place.
%
% First we halve the line length, less a little for the gutter between
% the columns. We compute the gutter based on the line length, so it
% changes automatically with the paper format. The magic constant
% below is chosen so that the gutter has the same value (well, +-<1pt)
% as it did when we hard-coded it.
%
% We put the result in a separate register, \doublecolumhsize, so we
% can restore it in \pagesofar, after \hsize itself has (potentially)
% been clobbered.
%
\doublecolumnhsize = \hsize
\advance\doublecolumnhsize by -.04154\hsize
\divide\doublecolumnhsize by 2
\hsize = \doublecolumnhsize
%
% Double the \vsize as well. (We don't need a separate register here,
% since nobody clobbers \vsize.)
\vsize = 2\vsize
}
% The double-column output routine for all double-column pages except
% the last.
%
\def\doublecolumnout{%
\splittopskip=\topskip \splitmaxdepth=\maxdepth
% Get the available space for the double columns -- the normal
% (undoubled) page height minus any material left over from the
% previous page.
\dimen@ = \vsize
\divide\dimen@ by 2
\advance\dimen@ by -\ht\partialpage
%
% box0 will be the left-hand column, box2 the right.
\setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
\onepageout\pagesofar
\unvbox255
\penalty\outputpenalty
}
%
% Re-output the contents of the output page -- any previous material,
% followed by the two boxes we just split, in box0 and box2.
\def\pagesofar{%
\unvbox\partialpage
%
\hsize = \doublecolumnhsize
\wd0=\hsize \wd2=\hsize
\hbox to\pagewidth{\box0\hfil\box2}%
}
%
% All done with double columns.
\def\enddoublecolumns{%
% The following penalty ensures that the page builder is exercised
% _before_ we change the output routine. This is necessary in the
% following situation:
%
% The last section of the index consists only of a single entry.
% Before this section, \pagetotal is less than \pagegoal, so no
% break occurs before the last section starts. However, the last
% section, consisting of \initial and the single \entry, does not
% fit on the page and has to be broken off. Without the following
% penalty the page builder will not be exercised until \eject
% below, and by that time we'll already have changed the output
% routine to the \balancecolumns version, so the next-to-last
% double-column page will be processed with \balancecolumns, which
% is wrong: The two columns will go to the main vertical list, with
% the broken-off section in the recent contributions. As soon as
% the output routine finishes, TeX starts reconsidering the page
% break. The two columns and the broken-off section both fit on the
% page, because the two columns now take up only half of the page
% goal. When TeX sees \eject from below which follows the final
% section, it invokes the new output routine that we've set after
% \balancecolumns below; \onepageout will try to fit the two columns
% and the final section into the vbox of \pageheight (see
% \pagebody), causing an overfull box.
%
% Note that glue won't work here, because glue does not exercise the
% page builder, unlike penalties (see The TeXbook, pp. 280-281).
\penalty0
%
\output = {%
% Split the last of the double-column material. Leave it on the
% current page, no automatic page break.
\balancecolumns
%
% If we end up splitting too much material for the current page,
% though, there will be another page break right after this \output
% invocation ends. Having called \balancecolumns once, we do not
% want to call it again. Therefore, reset \output to its normal
% definition right away. (We hope \balancecolumns will never be
% called on to balance too much material, but if it is, this makes
% the output somewhat more palatable.)
\global\output = {\onepageout{\pagecontents\PAGE}}%
}%
\eject
\endgroup % started in \begindoublecolumns
%
% \pagegoal was set to the doubled \vsize above, since we restarted
% the current page. We're now back to normal single-column
% typesetting, so reset \pagegoal to the normal \vsize (after the
% \endgroup where \vsize got restored).
\pagegoal = \vsize
}
%
% Called at the end of the double column material.
\def\balancecolumns{%
\setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
\dimen@ = \ht0
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
\divide\dimen@ by 2 % target to split to
%debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
\splittopskip = \topskip
% Loop until we get a decent breakpoint.
{%
\vbadness = 10000
\loop
\global\setbox3 = \copy0
\global\setbox1 = \vsplit3 to \dimen@
\ifdim\ht3>\dimen@
\global\advance\dimen@ by 1pt
\repeat
}%
%debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
\setbox0=\vbox to\dimen@{\unvbox1}%
\setbox2=\vbox to\dimen@{\unvbox3}%
%
\pagesofar
}
\catcode`\@ = \other
\message{sectioning,}
% Chapters, sections, etc.
% \unnumberedno is an oxymoron, of course. But we count the unnumbered
% sections so that we can refer to them unambiguously in the pdf
% outlines by their "section number". We avoid collisions with chapter
% numbers by starting them at 10000. (If a document ever has 10000
% chapters, we're in trouble anyway, I'm sure.)
\newcount\unnumberedno \unnumberedno = 10000
\newcount\chapno
\newcount\secno \secno=0
\newcount\subsecno \subsecno=0
\newcount\subsubsecno \subsubsecno=0
% This counter is funny since it counts through charcodes of letters A, B, ...
\newcount\appendixno \appendixno = `\@
%
% \def\appendixletter{\char\the\appendixno}
% We do the following ugly conditional instead of the above simple
% construct for the sake of pdftex, which needs the actual
% letter in the expansion, not just typeset.
%
\def\appendixletter{%
\ifnum\appendixno=`A A%
\else\ifnum\appendixno=`B B%
\else\ifnum\appendixno=`C C%
\else\ifnum\appendixno=`D D%
\else\ifnum\appendixno=`E E%
\else\ifnum\appendixno=`F F%
\else\ifnum\appendixno=`G G%
\else\ifnum\appendixno=`H H%
\else\ifnum\appendixno=`I I%
\else\ifnum\appendixno=`J J%
\else\ifnum\appendixno=`K K%
\else\ifnum\appendixno=`L L%
\else\ifnum\appendixno=`M M%
\else\ifnum\appendixno=`N N%
\else\ifnum\appendixno=`O O%
\else\ifnum\appendixno=`P P%
\else\ifnum\appendixno=`Q Q%
\else\ifnum\appendixno=`R R%
\else\ifnum\appendixno=`S S%
\else\ifnum\appendixno=`T T%
\else\ifnum\appendixno=`U U%
\else\ifnum\appendixno=`V V%
\else\ifnum\appendixno=`W W%
\else\ifnum\appendixno=`X X%
\else\ifnum\appendixno=`Y Y%
\else\ifnum\appendixno=`Z Z%
% The \the is necessary, despite appearances, because \appendixletter is
% expanded while writing the .toc file. \char\appendixno is not
% expandable, thus it is written literally, thus all appendixes come out
% with the same letter (or @) in the toc without it.
\else\char\the\appendixno
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
% Each @chapter defines these (using marks) as the number+name, number
% and name of the chapter. Page headings and footings can use
% these. @section does likewise.
\def\thischapter{}
\def\thischapternum{}
\def\thischaptername{}
\def\thissection{}
\def\thissectionnum{}
\def\thissectionname{}
\newcount\absseclevel % used to calculate proper heading level
\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
% @raisesections: treat @section as chapter, @subsection as section, etc.
\def\raisesections{\global\advance\secbase by -1}
\let\up=\raisesections % original BFox name
% @lowersections: treat @chapter as section, @section as subsection, etc.
\def\lowersections{\global\advance\secbase by 1}
\let\down=\lowersections % original BFox name
% we only have subsub.
\chardef\maxseclevel = 3
%
% A numbered section within an unnumbered changes to unnumbered too.
% To achive this, remember the "biggest" unnum. sec. we are currently in:
\chardef\unmlevel = \maxseclevel
%
% Trace whether the current chapter is an appendix or not:
% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
\def\chapheadtype{N}
% Choose a heading macro
% #1 is heading type
% #2 is heading level
% #3 is text for heading
\def\genhead#1#2#3{%
% Compute the abs. sec. level:
\absseclevel=#2
\advance\absseclevel by \secbase
% Make sure \absseclevel doesn't fall outside the range:
\ifnum \absseclevel < 0
\absseclevel = 0
\else
\ifnum \absseclevel > 3
\absseclevel = 3
\fi
\fi
% The heading type:
\def\headtype{#1}%
\if \headtype U%
\ifnum \absseclevel < \unmlevel
\chardef\unmlevel = \absseclevel
\fi
\else
% Check for appendix sections:
\ifnum \absseclevel = 0
\edef\chapheadtype{\headtype}%
\else
\if \headtype A\if \chapheadtype N%
\errmessage{@appendix... within a non-appendix chapter}%
\fi\fi
\fi
% Check for numbered within unnumbered:
\ifnum \absseclevel > \unmlevel
\def\headtype{U}%
\else
\chardef\unmlevel = 3
\fi
\fi
% Now print the heading:
\if \headtype U%
\ifcase\absseclevel
\unnumberedzzz{#3}%
\or \unnumberedseczzz{#3}%
\or \unnumberedsubseczzz{#3}%
\or \unnumberedsubsubseczzz{#3}%
\fi
\else
\if \headtype A%
\ifcase\absseclevel
\appendixzzz{#3}%
\or \appendixsectionzzz{#3}%
\or \appendixsubseczzz{#3}%
\or \appendixsubsubseczzz{#3}%
\fi
\else
\ifcase\absseclevel
\chapterzzz{#3}%
\or \seczzz{#3}%
\or \numberedsubseczzz{#3}%
\or \numberedsubsubseczzz{#3}%
\fi
\fi
\fi
\suppressfirstparagraphindent
}
% an interface:
\def\numhead{\genhead N}
\def\apphead{\genhead A}
\def\unnmhead{\genhead U}
% @chapter, @appendix, @unnumbered. Increment top-level counter, reset
% all lower-level sectioning counters to zero.
%
% Also set \chaplevelprefix, which we prepend to @float sequence numbers
% (e.g., figures), q.v. By default (before any chapter), that is empty.
\let\chaplevelprefix = \empty
%
\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
\def\chapterzzz#1{%
% section resetting is \global in case the chapter is in a group, such
% as an @include file.
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\chapno by 1
%
% Used for \float.
\gdef\chaplevelprefix{\the\chapno.}%
\resetallfloatnos
%
% \putwordChapter can contain complex things in translations.
\toks0=\expandafter{\putwordChapter}%
\message{\the\toks0 \space \the\chapno}%
%
% Write the actual heading.
\chapmacro{#1}{Ynumbered}{\the\chapno}%
%
% So @section and the like are numbered underneath this chapter.
\global\let\section = \numberedsec
\global\let\subsection = \numberedsubsec
\global\let\subsubsection = \numberedsubsubsec
}
\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
%
\def\appendixzzz#1{%
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\appendixno by 1
\gdef\chaplevelprefix{\appendixletter.}%
\resetallfloatnos
%
% \putwordAppendix can contain complex things in translations.
\toks0=\expandafter{\putwordAppendix}%
\message{\the\toks0 \space \appendixletter}%
%
\chapmacro{#1}{Yappendix}{\appendixletter}%
%
\global\let\section = \appendixsec
\global\let\subsection = \appendixsubsec
\global\let\subsubsection = \appendixsubsubsec
}
\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
\def\unnumberedzzz#1{%
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\unnumberedno by 1
%
% Since an unnumbered has no number, no prefix for figures.
\global\let\chaplevelprefix = \empty
\resetallfloatnos
%
% This used to be simply \message{#1}, but TeX fully expands the
% argument to \message. Therefore, if #1 contained @-commands, TeX
% expanded them. For example, in `@unnumbered The @cite{Book}', TeX
% expanded @cite (which turns out to cause errors because \cite is meant
% to be executed, not expanded).
%
% Anyway, we don't want the fully-expanded definition of @cite to appear
% as a result of the \message, we just want `@cite' itself. We use
% \the to achieve this: TeX expands \the only once,
% simply yielding the contents of . (We also do this for
% the toc entries.)
\toks0 = {#1}%
\message{(\the\toks0)}%
%
\chapmacro{#1}{Ynothing}{\the\unnumberedno}%
%
\global\let\section = \unnumberedsec
\global\let\subsection = \unnumberedsubsec
\global\let\subsubsection = \unnumberedsubsubsec
}
% @centerchap is like @unnumbered, but the heading is centered.
\outer\parseargdef\centerchap{%
% Well, we could do the following in a group, but that would break
% an assumption that \chapmacro is called at the outermost level.
% Thus we are safer this way: --kasal, 24feb04
\let\centerparametersmaybe = \centerparameters
\unnmhead0{#1}%
\let\centerparametersmaybe = \relax
}
% @top is like @unnumbered.
\let\top\unnumbered
% Sections.
\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
\def\seczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
}
\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
\def\appendixsectionzzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
}
\let\appendixsec\appendixsection
\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
\def\unnumberedseczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
}
% Subsections.
\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
\def\numberedsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
}
\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
\def\appendixsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Yappendix}%
{\appendixletter.\the\secno.\the\subsecno}%
}
\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
\def\unnumberedsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Ynothing}%
{\the\unnumberedno.\the\secno.\the\subsecno}%
}
% Subsubsections.
\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
\def\numberedsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Ynumbered}%
{\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
}
\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
\def\appendixsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Yappendix}%
{\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
}
\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
\def\unnumberedsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Ynothing}%
{\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
}
% These macros control what the section commands do, according
% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
% Define them by default for a numbered chapter.
\let\section = \numberedsec
\let\subsection = \numberedsubsec
\let\subsubsection = \numberedsubsubsec
% Define @majorheading, @heading and @subheading
% NOTE on use of \vbox for chapter headings, section headings, and such:
% 1) We use \vbox rather than the earlier \line to permit
% overlong headings to fold.
% 2) \hyphenpenalty is set to 10000 because hyphenation in a
% heading is obnoxious; this forbids it.
% 3) Likewise, headings look best if no \parindent is used, and
% if justification is not attempted. Hence \raggedright.
\def\majorheading{%
{\advance\chapheadingskip by 10pt \chapbreak }%
\parsearg\chapheadingzzz
}
\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
\def\chapheadingzzz#1{%
{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
\parindent=0pt\ptexraggedright
\rmisbold #1\hfill}}%
\bigskip \par\penalty 200\relax
\suppressfirstparagraphindent
}
% @heading, @subheading, @subsubheading.
\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
\suppressfirstparagraphindent}
\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
\suppressfirstparagraphindent}
\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
\suppressfirstparagraphindent}
% These macros generate a chapter, section, etc. heading only
% (including whitespace, linebreaking, etc. around it),
% given all the information in convenient, parsed form.
%%% Args are the skip and penalty (usually negative)
\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
%%% Define plain chapter starts, and page on/off switching for it
% Parameter controlling skip before chapter headings (if needed)
\newskip\chapheadingskip
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
\def\chappager{\par\vfill\supereject}
% Because \domark is called before \chapoddpage, the filler page will
% get the headings for the next chapter, which is wrong. But we don't
% care -- we just disable all headings on the filler page.
\def\chapoddpage{%
\chappager
\ifodd\pageno \else
\begingroup
\evenheadline={\hfil}\evenfootline={\hfil}%
\oddheadline={\hfil}\oddfootline={\hfil}%
\hbox to 0pt{}%
\chappager
\endgroup
\fi
}
\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
\def\CHAPPAGoff{%
\global\let\contentsalignmacro = \chappager
\global\let\pchapsepmacro=\chapbreak
\global\let\pagealignmacro=\chappager}
\def\CHAPPAGon{%
\global\let\contentsalignmacro = \chappager
\global\let\pchapsepmacro=\chappager
\global\let\pagealignmacro=\chappager
\global\def\HEADINGSon{\HEADINGSsingle}}
\def\CHAPPAGodd{%
\global\let\contentsalignmacro = \chapoddpage
\global\let\pchapsepmacro=\chapoddpage
\global\let\pagealignmacro=\chapoddpage
\global\def\HEADINGSon{\HEADINGSdouble}}
\CHAPPAGon
% Chapter opening.
%
% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
% Yappendix, Yomitfromtoc), #3 the chapter number.
%
% To test against our argument.
\def\Ynothingkeyword{Ynothing}
\def\Yomitfromtockeyword{Yomitfromtoc}
\def\Yappendixkeyword{Yappendix}
%
\def\chapmacro#1#2#3{%
% Insert the first mark before the heading break (see notes for \domark).
\let\prevchapterdefs=\lastchapterdefs
\let\prevsectiondefs=\lastsectiondefs
\gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
\gdef\thissection{}}%
%
\def\temptype{#2}%
\ifx\temptype\Ynothingkeyword
\gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
\gdef\thischapter{\thischaptername}}%
\else\ifx\temptype\Yomitfromtockeyword
\gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
\gdef\thischapter{}}%
\else\ifx\temptype\Yappendixkeyword
\toks0={#1}%
\xdef\lastchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\appendixletter}%
% \noexpand\putwordAppendix avoids expanding indigestible
% commands in some of the translations.
\gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
\noexpand\thischapternum:
\noexpand\thischaptername}%
}%
\else
\toks0={#1}%
\xdef\lastchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\the\chapno}%
% \noexpand\putwordChapter avoids expanding indigestible
% commands in some of the translations.
\gdef\noexpand\thischapter{\noexpand\putwordChapter{}
\noexpand\thischapternum:
\noexpand\thischaptername}%
}%
\fi\fi\fi
%
% Output the mark. Pass it through \safewhatsit, to take care of
% the preceding space.
\safewhatsit\domark
%
% Insert the chapter heading break.
\pchapsepmacro
%
% Now the second mark, after the heading break. No break points
% between here and the heading.
\let\prevchapterdefs=\lastchapterdefs
\let\prevsectiondefs=\lastsectiondefs
\domark
%
{%
\chapfonts \rmisbold
%
% Have to define \lastsection before calling \donoderef, because the
% xref code eventually uses it. On the other hand, it has to be called
% after \pchapsepmacro, or the headline will change too soon.
\gdef\lastsection{#1}%
%
% Only insert the separating space if we have a chapter/appendix
% number, and don't print the unnumbered ``number''.
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unnchap}%
\else\ifx\temptype\Yomitfromtockeyword
\setbox0 = \hbox{}% contents like unnumbered, but no toc entry
\def\toctype{omit}%
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
\def\toctype{app}%
\else
\setbox0 = \hbox{#3\enspace}%
\def\toctype{numchap}%
\fi\fi\fi
%
% Write the toc entry for this chapter. Must come before the
% \donoderef, because we include the current node name in the toc
% entry, and \donoderef resets it to empty.
\writetocentry{\toctype}{#1}{#3}%
%
% For pdftex, we have to write out the node definition (aka, make
% the pdfdest) after any page break, but before the actual text has
% been typeset. If the destination for the pdf outline is after the
% text, then jumping from the outline may wind up with the text not
% being visible, for instance under high magnification.
\donoderef{#2}%
%
% Typeset the actual heading.
\nobreak % Avoid page breaks at the interline glue.
\vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
\hangindent=\wd0 \centerparametersmaybe
\unhbox0 #1\par}%
}%
\nobreak\bigskip % no page break after a chapter title
\nobreak
}
% @centerchap -- centered and unnumbered.
\let\centerparametersmaybe = \relax
\def\centerparameters{%
\advance\rightskip by 3\rightskip
\leftskip = \rightskip
\parfillskip = 0pt
}
% I don't think this chapter style is supported any more, so I'm not
% updating it with the new noderef stuff. We'll see. --karl, 11aug03.
%
\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
%
\def\unnchfopen #1{%
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
\parindent=0pt\ptexraggedright
\rmisbold #1\hfill}}\bigskip \par\nobreak
}
\def\chfopen #1#2{\chapoddpage {\chapfonts
\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
\par\penalty 5000 %
}
\def\centerchfopen #1{%
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
\parindent=0pt
\hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
}
\def\CHAPFopen{%
\global\let\chapmacro=\chfopen
\global\let\centerchapmacro=\centerchfopen}
% Section titles. These macros combine the section number parts and
% call the generic \sectionheading to do the printing.
%
\newskip\secheadingskip
\def\secheadingbreak{\dobreak \secheadingskip{-1000}}
% Subsection titles.
\newskip\subsecheadingskip
\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
% Subsubsection titles.
\def\subsubsecheadingskip{\subsecheadingskip}
\def\subsubsecheadingbreak{\subsecheadingbreak}
% Print any size, any type, section title.
%
% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
% section number.
%
\def\seckeyword{sec}
%
\def\sectionheading#1#2#3#4{%
{%
% Switch to the right set of fonts.
\csname #2fonts\endcsname \rmisbold
%
\def\sectionlevel{#2}%
\def\temptype{#3}%
%
% Insert first mark before the heading break (see notes for \domark).
\let\prevsectiondefs=\lastsectiondefs
\ifx\temptype\Ynothingkeyword
\ifx\sectionlevel\seckeyword
\gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
\gdef\thissection{\thissectionname}}%
\fi
\else\ifx\temptype\Yomitfromtockeyword
% Don't redefine \thissection.
\else\ifx\temptype\Yappendixkeyword
\ifx\sectionlevel\seckeyword
\toks0={#1}%
\xdef\lastsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
% \noexpand\putwordSection avoids expanding indigestible
% commands in some of the translations.
\gdef\noexpand\thissection{\noexpand\putwordSection{}
\noexpand\thissectionnum:
\noexpand\thissectionname}%
}%
\fi
\else
\ifx\sectionlevel\seckeyword
\toks0={#1}%
\xdef\lastsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
% \noexpand\putwordSection avoids expanding indigestible
% commands in some of the translations.
\gdef\noexpand\thissection{\noexpand\putwordSection{}
\noexpand\thissectionnum:
\noexpand\thissectionname}%
}%
\fi
\fi\fi\fi
%
% Go into vertical mode. Usually we'll already be there, but we
% don't want the following whatsit to end up in a preceding paragraph
% if the document didn't happen to have a blank line.
\par
%
% Output the mark. Pass it through \safewhatsit, to take care of
% the preceding space.
\safewhatsit\domark
%
% Insert space above the heading.
\csname #2headingbreak\endcsname
%
% Now the second mark, after the heading break. No break points
% between here and the heading.
\let\prevsectiondefs=\lastsectiondefs
\domark
%
% Only insert the space after the number if we have a section number.
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unn}%
\gdef\lastsection{#1}%
\else\ifx\temptype\Yomitfromtockeyword
% for @headings -- no section number, don't include in toc,
% and don't redefine \lastsection.
\setbox0 = \hbox{}%
\def\toctype{omit}%
\let\sectionlevel=\empty
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{#4\enspace}%
\def\toctype{app}%
\gdef\lastsection{#1}%
\else
\setbox0 = \hbox{#4\enspace}%
\def\toctype{num}%
\gdef\lastsection{#1}%
\fi\fi\fi
%
% Write the toc entry (before \donoderef). See comments in \chapmacro.
\writetocentry{\toctype\sectionlevel}{#1}{#4}%
%
% Write the node reference (= pdf destination for pdftex).
% Again, see comments in \chapmacro.
\donoderef{#3}%
%
% Interline glue will be inserted when the vbox is completed.
% That glue will be a valid breakpoint for the page, since it'll be
% preceded by a whatsit (usually from the \donoderef, or from the
% \writetocentry if there was no node). We don't want to allow that
% break, since then the whatsits could end up on page n while the
% section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
\nobreak
%
% Output the actual section heading.
\vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
\hangindent=\wd0 % zero if no section number
\unhbox0 #1}%
}%
% Add extra space after the heading -- half of whatever came above it.
% Don't allow stretch, though.
\kern .5 \csname #2headingskip\endcsname
%
% Do not let the kern be a potential breakpoint, as it would be if it
% was followed by glue.
\nobreak
%
% We'll almost certainly start a paragraph next, so don't let that
% glue accumulate. (Not a breakpoint because it's preceded by a
% discardable item.)
\vskip-\parskip
%
% This is purely so the last item on the list is a known \penalty >
% 10000. This is so \startdefun can avoid allowing breakpoints after
% section headings. Otherwise, it would insert a valid breakpoint between:
%
% @section sec-whatever
% @deffn def-whatever
\penalty 10001
}
\message{toc,}
% Table of contents.
\newwrite\tocfile
% Write an entry to the toc file, opening it if necessary.
% Called from @chapter, etc.
%
% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
% We append the current node name (if any) and page number as additional
% arguments for the \{chap,sec,...}entry macros which will eventually
% read this. The node name is used in the pdf outlines as the
% destination to jump to.
%
% We open the .toc file for writing here instead of at @setfilename (or
% any other fixed time) so that @contents can be anywhere in the document.
% But if #1 is `omit', then we don't do anything. This is used for the
% table of contents chapter openings themselves.
%
\newif\iftocfileopened
\def\omitkeyword{omit}%
%
\def\writetocentry#1#2#3{%
\edef\writetoctype{#1}%
\ifx\writetoctype\omitkeyword \else
\iftocfileopened\else
\immediate\openout\tocfile = \jobname.toc
\global\tocfileopenedtrue
\fi
%
\iflinks
{\atdummies
\edef\temp{%
\write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
\temp
}%
\fi
\fi
%
% Tell \shipout to create a pdf destination on each page, if we're
% writing pdf. These are used in the table of contents. We can't
% just write one on every page because the title pages are numbered
% 1 and 2 (the page numbers aren't printed), and so are the first
% two pages of the document. Thus, we'd have two destinations named
% `1', and two named `2'.
\ifpdf \global\pdfmakepagedesttrue \fi
}
% These characters do not print properly in the Computer Modern roman
% fonts, so we must take special care. This is more or less redundant
% with the Texinfo input format setup at the end of this file.
%
\def\activecatcodes{%
\catcode`\"=\active
\catcode`\$=\active
\catcode`\<=\active
\catcode`\>=\active
\catcode`\\=\active
\catcode`\^=\active
\catcode`\_=\active
\catcode`\|=\active
\catcode`\~=\active
}
% Read the toc file, which is essentially Texinfo input.
\def\readtocfile{%
\setupdatafile
\activecatcodes
\input \tocreadfilename
}
\newskip\contentsrightmargin \contentsrightmargin=1in
\newcount\savepageno
\newcount\lastnegativepageno \lastnegativepageno = -1
% Prepare to read what we've written to \tocfile.
%
\def\startcontents#1{%
% If @setchapternewpage on, and @headings double, the contents should
% start on an odd page, unlike chapters. Thus, we maintain
% \contentsalignmacro in parallel with \pagealignmacro.
% From: Torbjorn Granlund
\contentsalignmacro
\immediate\closeout\tocfile
%
% Don't need to put `Contents' or `Short Contents' in the headline.
% It is abundantly clear what they are.
\chapmacro{#1}{Yomitfromtoc}{}%
%
\savepageno = \pageno
\begingroup % Set up to handle contents files properly.
\raggedbottom % Worry more about breakpoints than the bottom.
\advance\hsize by -\contentsrightmargin % Don't use the full line length.
%
% Roman numerals for page numbers.
\ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
}
% redefined for the two-volume lispref. We always output on
% \jobname.toc even if this is redefined.
%
\def\tocreadfilename{\jobname.toc}
% Normal (long) toc.
%
\def\contents{%
\startcontents{\putwordTOC}%
\openin 1 \tocreadfilename\space
\ifeof 1 \else
\readtocfile
\fi
\vfill \eject
\contentsalignmacro % in case @setchapternewpage odd is in effect
\ifeof 1 \else
\pdfmakeoutlines
\fi
\closein 1
\endgroup
\lastnegativepageno = \pageno
\global\pageno = \savepageno
}
% And just the chapters.
\def\summarycontents{%
\startcontents{\putwordShortTOC}%
%
\let\numchapentry = \shortchapentry
\let\appentry = \shortchapentry
\let\unnchapentry = \shortunnchapentry
% We want a true roman here for the page numbers.
\secfonts
\let\rm=\shortcontrm \let\bf=\shortcontbf
\let\sl=\shortcontsl \let\tt=\shortconttt
\rm
\hyphenpenalty = 10000
\advance\baselineskip by 1pt % Open it up a little.
\def\numsecentry##1##2##3##4{}
\let\appsecentry = \numsecentry
\let\unnsecentry = \numsecentry
\let\numsubsecentry = \numsecentry
\let\appsubsecentry = \numsecentry
\let\unnsubsecentry = \numsecentry
\let\numsubsubsecentry = \numsecentry
\let\appsubsubsecentry = \numsecentry
\let\unnsubsubsecentry = \numsecentry
\openin 1 \tocreadfilename\space
\ifeof 1 \else
\readtocfile
\fi
\closein 1
\vfill \eject
\contentsalignmacro % in case @setchapternewpage odd is in effect
\endgroup
\lastnegativepageno = \pageno
\global\pageno = \savepageno
}
\let\shortcontents = \summarycontents
% Typeset the label for a chapter or appendix for the short contents.
% The arg is, e.g., `A' for an appendix, or `3' for a chapter.
%
\def\shortchaplabel#1{%
% This space should be enough, since a single number is .5em, and the
% widest letter (M) is 1em, at least in the Computer Modern fonts.
% But use \hss just in case.
% (This space doesn't include the extra space that gets added after
% the label; that gets put in by \shortchapentry above.)
%
% We'd like to right-justify chapter numbers, but that looks strange
% with appendix letters. And right-justifying numbers and
% left-justifying letters looks strange when there is less than 10
% chapters. Have to read the whole toc once to know how many chapters
% there are before deciding ...
\hbox to 1em{#1\hss}%
}
% These macros generate individual entries in the table of contents.
% The first argument is the chapter or section name.
% The last argument is the page number.
% The arguments in between are the chapter number, section number, ...
% Chapters, in the main contents.
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
%
% Chapters, in the short toc.
% See comments in \dochapentry re vbox and related settings.
\def\shortchapentry#1#2#3#4{%
\tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
}
% Appendices, in the main contents.
% Need the word Appendix, and a fixed-size box.
%
\def\appendixbox#1{%
% We use M since it's probably the widest letter.
\setbox0 = \hbox{\putwordAppendix{} M}%
\hbox to \wd0{\putwordAppendix{} #1\hss}}
%
\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
% Unnumbered chapters.
\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
% Sections.
\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
\let\appsecentry=\numsecentry
\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
% Subsections.
\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
\let\appsubsecentry=\numsubsecentry
\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
% And subsubsections.
\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
\let\appsubsubsecentry=\numsubsubsecentry
\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
% This parameter controls the indentation of the various levels.
% Same as \defaultparindent.
\newdimen\tocindent \tocindent = 15pt
% Now for the actual typesetting. In all these, #1 is the text and #2 is the
% page number.
%
% If the toc has to be broken over pages, we want it to be at chapters
% if at all possible; hence the \penalty.
\def\dochapentry#1#2{%
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
\chapentryfonts
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup
\nobreak\vskip .25\baselineskip plus.1\baselineskip
}
\def\dosecentry#1#2{\begingroup
\secentryfonts \leftskip=\tocindent
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup}
\def\dosubsecentry#1#2{\begingroup
\subsecentryfonts \leftskip=2\tocindent
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup}
\def\dosubsubsecentry#1#2{\begingroup
\subsubsecentryfonts \leftskip=3\tocindent
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup}
% We use the same \entry macro as for the index entries.
\let\tocentry = \entry
% Space between chapter (or whatever) number and the title.
\def\labelspace{\hskip1em \relax}
\def\dopageno#1{{\rm #1}}
\def\doshortpageno#1{{\rm #1}}
\def\chapentryfonts{\secfonts \rm}
\def\secentryfonts{\textfonts}
\def\subsecentryfonts{\textfonts}
\def\subsubsecentryfonts{\textfonts}
\message{environments,}
% @foo ... @end foo.
% @tex ... @end tex escapes into raw Tex temporarily.
% One exception: @ is still an escape character, so that @end tex works.
% But \@ or @@ will get a plain tex @ character.
\envdef\tex{%
\setupmarkupstyle{tex}%
\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
\catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
\catcode `\%=14
\catcode `\+=\other
\catcode `\"=\other
\catcode `\|=\other
\catcode `\<=\other
\catcode `\>=\other
\catcode`\`=\other
\catcode`\'=\other
\escapechar=`\\
%
\let\b=\ptexb
\let\bullet=\ptexbullet
\let\c=\ptexc
\let\,=\ptexcomma
\let\.=\ptexdot
\let\dots=\ptexdots
\let\equiv=\ptexequiv
\let\!=\ptexexclam
\let\i=\ptexi
\let\indent=\ptexindent
\let\noindent=\ptexnoindent
\let\{=\ptexlbrace
\let\+=\tabalign
\let\}=\ptexrbrace
\let\/=\ptexslash
\let\*=\ptexstar
\let\t=\ptext
\expandafter \let\csname top\endcsname=\ptextop % outer
\let\frenchspacing=\plainfrenchspacing
%
\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
\def\@{@}%
}
% There is no need to define \Etex.
% Define @lisp ... @end lisp.
% @lisp environment forms a group so it can rebind things,
% including the definition of @end lisp (which normally is erroneous).
% Amount to narrow the margins by for @lisp.
\newskip\lispnarrowing \lispnarrowing=0.4in
% This is the definition that ^^M gets inside @lisp, @example, and other
% such environments. \null is better than a space, since it doesn't
% have any width.
\def\lisppar{\null\endgraf}
% This space is always present above and below environments.
\newskip\envskipamount \envskipamount = 0pt
% Make spacing and below environment symmetrical. We use \parskip here
% to help in doing that, since in @example-like environments \parskip
% is reset to zero; thus the \afterenvbreak inserts no space -- but the
% start of the next paragraph will insert \parskip.
%
\def\aboveenvbreak{{%
% =10000 instead of <10000 because of a special case in \itemzzz and
% \sectionheading, q.v.
\ifnum \lastpenalty=10000 \else
\advance\envskipamount by \parskip
\endgraf
\ifdim\lastskip<\envskipamount
\removelastskip
% it's not a good place to break if the last penalty was \nobreak
% or better ...
\ifnum\lastpenalty<10000 \penalty-50 \fi
\vskip\envskipamount
\fi
\fi
}}
\let\afterenvbreak = \aboveenvbreak
% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
% also clear it, so that its embedded environments do the narrowing again.
\let\nonarrowing=\relax
% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
% environment contents.
\font\circle=lcircle10
\newdimen\circthick
\newdimen\cartouter\newdimen\cartinner
\newskip\normbskip\newskip\normpskip\newskip\normlskip
\circthick=\fontdimen8\circle
%
\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
\def\ctr{{\hskip 6pt\circle\char'010}}
\def\cbl{{\circle\char'012\hskip -6pt}}
\def\cbr{{\hskip 6pt\circle\char'011}}
\def\carttop{\hbox to \cartouter{\hskip\lskip
\ctl\leaders\hrule height\circthick\hfil\ctr
\hskip\rskip}}
\def\cartbot{\hbox to \cartouter{\hskip\lskip
\cbl\leaders\hrule height\circthick\hfil\cbr
\hskip\rskip}}
%
\newskip\lskip\newskip\rskip
\envdef\cartouche{%
\ifhmode\par\fi % can't be in the midst of a paragraph.
\startsavinginserts
\lskip=\leftskip \rskip=\rightskip
\leftskip=0pt\rightskip=0pt % we want these *outside*.
\cartinner=\hsize \advance\cartinner by-\lskip
\advance\cartinner by-\rskip
\cartouter=\hsize
\advance\cartouter by 18.4pt % allow for 3pt kerns on either
% side, and for 6pt waste from
% each corner char, and rule thickness
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
\let\nonarrowing = t%
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
\hbox\bgroup
\hskip\lskip
\vrule\kern3pt
\vbox\bgroup
\kern3pt
\hsize=\cartinner
\baselineskip=\normbskip
\lineskip=\normlskip
\parskip=\normpskip
\vskip -\parskip
\comment % For explanation, see the end of \def\group.
}
\def\Ecartouche{%
\ifhmode\par\fi
\kern3pt
\egroup
\kern3pt\vrule
\hskip\rskip
\egroup
\cartbot
\egroup
\checkinserts
}
% This macro is called at the beginning of all the @example variants,
% inside a group.
\newdimen\nonfillparindent
\def\nonfillstart{%
\aboveenvbreak
\hfuzz = 12pt % Don't be fussy
\sepspaces % Make spaces be word-separators rather than space tokens.
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output
\parskip = 0pt
% Turn off paragraph indentation but redefine \indent to emulate
% the normal \indent.
\nonfillparindent=\parindent
\parindent = 0pt
\let\indent\nonfillindent
%
\emergencystretch = 0pt % don't try to avoid overfull boxes
\ifx\nonarrowing\relax
\advance \leftskip by \lispnarrowing
\exdentamount=\lispnarrowing
\else
\let\nonarrowing = \relax
\fi
\let\exdent=\nofillexdent
}
\begingroup
\obeyspaces
% We want to swallow spaces (but not other tokens) after the fake
% @indent in our nonfill-environments, where spaces are normally
% active and set to @tie, resulting in them not being ignored after
% @indent.
\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
\gdef\nonfillindentcheck{%
\ifx\temp %
\expandafter\nonfillindentgobble%
\else%
\leavevmode\nonfillindentbox%
\fi%
}%
\endgroup
\def\nonfillindentgobble#1{\nonfillindent}
\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
% If you want all examples etc. small: @set dispenvsize small.
% If you want even small examples the full size: @set dispenvsize nosmall.
% This affects the following displayed environments:
% @example, @display, @format, @lisp
%
\def\smallword{small}
\def\nosmallword{nosmall}
\let\SETdispenvsize\relax
\def\setnormaldispenv{%
\ifx\SETdispenvsize\smallword
% end paragraph for sake of leading, in case document has no blank
% line. This is redundant with what happens in \aboveenvbreak, but
% we need to do it before changing the fonts, and it's inconvenient
% to change the fonts afterward.
\ifnum \lastpenalty=10000 \else \endgraf \fi
\smallexamplefonts \rm
\fi
}
\def\setsmalldispenv{%
\ifx\SETdispenvsize\nosmallword
\else
\ifnum \lastpenalty=10000 \else \endgraf \fi
\smallexamplefonts \rm
\fi
}
% We often define two environments, @foo and @smallfoo.
% Let's do it by one command:
\def\makedispenv #1#2{
\expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
\expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
\expandafter\let\csname E#1\endcsname \afterenvbreak
\expandafter\let\csname Esmall#1\endcsname \afterenvbreak
}
% Define two synonyms:
\def\maketwodispenvs #1#2#3{
\makedispenv{#1}{#3}
\makedispenv{#2}{#3}
}
% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
%
% @smallexample and @smalllisp: use smaller fonts.
% Originally contributed by Pavel@xerox.
%
\maketwodispenvs {lisp}{example}{%
\nonfillstart
\tt\setupmarkupstyle{example}%
\let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
\gobble % eat return
}
% @display/@smalldisplay: same as @lisp except keep current font.
%
\makedispenv {display}{%
\nonfillstart
\gobble
}
% @format/@smallformat: same as @display except don't narrow margins.
%
\makedispenv{format}{%
\let\nonarrowing = t%
\nonfillstart
\gobble
}
% @flushleft: same as @format, but doesn't obey \SETdispenvsize.
\envdef\flushleft{%
\let\nonarrowing = t%
\nonfillstart
\gobble
}
\let\Eflushleft = \afterenvbreak
% @flushright.
%
\envdef\flushright{%
\let\nonarrowing = t%
\nonfillstart
\advance\leftskip by 0pt plus 1fill
\gobble
}
\let\Eflushright = \afterenvbreak
% @raggedright does more-or-less normal line breaking but no right
% justification. From plain.tex.
\envdef\raggedright{%
\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
}
\let\Eraggedright\par
\envdef\raggedleft{%
\parindent=0pt \leftskip0pt plus2em
\spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
\hbadness=10000 % Last line will usually be underfull, so turn off
% badness reporting.
}
\let\Eraggedleft\par
\envdef\raggedcenter{%
\parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
\spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
\hbadness=10000 % Last line will usually be underfull, so turn off
% badness reporting.
}
\let\Eraggedcenter\par
% @quotation does normal linebreaking (hence we can't use \nonfillstart)
% and narrows the margins. We keep \parskip nonzero in general, since
% we're doing normal filling. So, when using \aboveenvbreak and
% \afterenvbreak, temporarily make \parskip 0.
%
\def\quotationstart{%
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
\parindent=0pt
%
% @cartouche defines \nonarrowing to inhibit narrowing at next level down.
\ifx\nonarrowing\relax
\advance\leftskip by \lispnarrowing
\advance\rightskip by \lispnarrowing
\exdentamount = \lispnarrowing
\else
\let\nonarrowing = \relax
\fi
\parsearg\quotationlabel
}
\envdef\quotation{%
\setnormaldispenv
\quotationstart
}
\envdef\smallquotation{%
\setsmalldispenv
\quotationstart
}
\let\Esmallquotation = \Equotation
% We have retained a nonzero parskip for the environment, since we're
% doing normal filling.
%
\def\Equotation{%
\par
\ifx\quotationauthor\undefined\else
% indent a bit.
\leftline{\kern 2\leftskip \sl ---\quotationauthor}%
\fi
{\parskip=0pt \afterenvbreak}%
}
% If we're given an argument, typeset it in bold with a colon after.
\def\quotationlabel#1{%
\def\temp{#1}%
\ifx\temp\empty \else
{\bf #1: }%
\fi
}
% LaTeX-like @verbatim...@end verbatim and @verb{...}
% If we want to allow any as delimiter,
% we need the curly braces so that makeinfo sees the @verb command, eg:
% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
%
% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
%
% [Knuth] p.344; only we need to do the other characters Texinfo sets
% active too. Otherwise, they get lost as the first character on a
% verbatim line.
\def\dospecials{%
\do\ \do\\\do\{\do\}\do\$\do\&%
\do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
\do\<\do\>\do\|\do\@\do+\do\"%
% Don't do the quotes -- if we do, @set txicodequoteundirected and
% @set txicodequotebacktick will not have effect on @verb and
% @verbatim, and ?` and !` ligatures won't get disabled.
%\do\`\do\'%
}
%
% [Knuth] p. 380
\def\uncatcodespecials{%
\def\do##1{\catcode`##1=\other}\dospecials}
%
% Setup for the @verb command.
%
% Eight spaces for a tab
\begingroup
\catcode`\^^I=\active
\gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
\endgroup
%
\def\setupverb{%
\tt % easiest (and conventionally used) font for verbatim
\def\par{\leavevmode\endgraf}%
\setupmarkupstyle{verb}%
\tabeightspaces
% Respect line breaks,
% print special symbols as themselves, and
% make each space count
% must do in this order:
\obeylines \uncatcodespecials \sepspaces
}
% Setup for the @verbatim environment
%
% Real tab expansion
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
%
\def\starttabbox{\setbox0=\hbox\bgroup}
%
\begingroup
\catcode`\^^I=\active
\gdef\tabexpand{%
\catcode`\^^I=\active
\def^^I{\leavevmode\egroup
\dimen0=\wd0 % the width so far, or since the previous tab
\divide\dimen0 by\tabw
\multiply\dimen0 by\tabw % compute previous multiple of \tabw
\advance\dimen0 by\tabw % advance to next multiple of \tabw
\wd0=\dimen0 \box0 \starttabbox
}%
}
\endgroup
% start the verbatim environment.
\def\setupverbatim{%
\let\nonarrowing = t%
\nonfillstart
% Easiest (and conventionally used) font for verbatim
\tt
\def\par{\leavevmode\egroup\box0\endgraf}%
\tabexpand
\setupmarkupstyle{verbatim}%
% Respect line breaks,
% print special symbols as themselves, and
% make each space count
% must do in this order:
\obeylines \uncatcodespecials \sepspaces
\everypar{\starttabbox}%
}
% Do the @verb magic: verbatim text is quoted by unique
% delimiter characters. Before first delimiter expect a
% right brace, after last delimiter expect closing brace:
%
% \def\doverb'{'#1'}'{#1}
%
% [Knuth] p. 382; only eat outer {}
\begingroup
\catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
\gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
\endgroup
%
\def\verb{\begingroup\setupverb\doverb}
%
%
% Do the @verbatim magic: define the macro \doverbatim so that
% the (first) argument ends when '@end verbatim' is reached, ie:
%
% \def\doverbatim#1@end verbatim{#1}
%
% For Texinfo it's a lot easier than for LaTeX,
% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
% we need not redefine '\', '{' and '}'.
%
% Inspired by LaTeX's verbatim command set [latex.ltx]
%
\begingroup
\catcode`\ =\active
\obeylines %
% ignore everything up to the first ^^M, that's the newline at the end
% of the @verbatim input line itself. Otherwise we get an extra blank
% line in the output.
\xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}%
% We really want {...\end verbatim} in the body of the macro, but
% without the active space; thus we have to use \xdef and \gobble.
\endgroup
%
\envdef\verbatim{%
\setupverbatim\doverbatim
}
\let\Everbatim = \afterenvbreak
% @verbatiminclude FILE - insert text of file in verbatim environment.
%
\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
%
\def\doverbatiminclude#1{%
{%
\makevalueexpandable
\setupverbatim
\indexnofonts % Allow `@@' and other weird things in file names.
\input #1
\afterenvbreak
}%
}
% @copying ... @end copying.
% Save the text away for @insertcopying later.
%
% We save the uninterpreted tokens, rather than creating a box.
% Saving the text in a box would be much easier, but then all the
% typesetting commands (@smallbook, font changes, etc.) have to be done
% beforehand -- and a) we want @copying to be done first in the source
% file; b) letting users define the frontmatter in as flexible order as
% possible is very desirable.
%
\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
%
\def\insertcopying{%
\begingroup
\parindent = 0pt % paragraph indentation looks wrong on title page
\scanexp\copyingtext
\endgroup
}
\message{defuns,}
% @defun etc.
\newskip\defbodyindent \defbodyindent=.4in
\newskip\defargsindent \defargsindent=50pt
\newskip\deflastargmargin \deflastargmargin=18pt
\newcount\defunpenalty
% Start the processing of @deffn:
\def\startdefun{%
\ifnum\lastpenalty<10000
\medbreak
\defunpenalty=10003 % Will keep this @deffn together with the
% following @def command, see below.
\else
% If there are two @def commands in a row, we'll have a \nobreak,
% which is there to keep the function description together with its
% header. But if there's nothing but headers, we need to allow a
% break somewhere. Check specifically for penalty 10002, inserted
% by \printdefunline, instead of 10000, since the sectioning
% commands also insert a nobreak penalty, and we don't want to allow
% a break between a section heading and a defun.
%
% As a minor refinement, we avoid "club" headers by signalling
% with penalty of 10003 after the very first @deffn in the
% sequence (see above), and penalty of 10002 after any following
% @def command.
\ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
%
% Similarly, after a section heading, do not allow a break.
% But do insert the glue.
\medskip % preceded by discardable penalty, so not a breakpoint
\fi
%
\parindent=0in
\advance\leftskip by \defbodyindent
\exdentamount=\defbodyindent
}
\def\dodefunx#1{%
% First, check whether we are in the right environment:
\checkenv#1%
%
% As above, allow line break if we have multiple x headers in a row.
% It's not a great place, though.
\ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
%
% And now, it's time to reuse the body of the original defun:
\expandafter\gobbledefun#1%
}
\def\gobbledefun#1\startdefun{}
% \printdefunline \deffnheader{text}
%
\def\printdefunline#1#2{%
\begingroup
% call \deffnheader:
#1#2 \endheader
% common ending:
\interlinepenalty = 10000
\advance\rightskip by 0pt plus 1fil
\endgraf
\nobreak\vskip -\parskip
\penalty\defunpenalty % signal to \startdefun and \dodefunx
% Some of the @defun-type tags do not enable magic parentheses,
% rendering the following check redundant. But we don't optimize.
\checkparencounts
\endgroup
}
\def\Edefun{\endgraf\medbreak}
% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
% the only thing remaining is to define \deffnheader.
%
\def\makedefun#1{%
\expandafter\let\csname E#1\endcsname = \Edefun
\edef\temp{\noexpand\domakedefun
\makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
\temp
}
% \domakedefun \deffn \deffnx \deffnheader
%
% Define \deffn and \deffnx, without parameters.
% \deffnheader has to be defined explicitly.
%
\def\domakedefun#1#2#3{%
\envdef#1{%
\startdefun
\parseargusing\activeparens{\printdefunline#3}%
}%
\def#2{\dodefunx#1}%
\def#3%
}
%%% Untyped functions:
% @deffn category name args
\makedefun{deffn}{\deffngeneral{}}
% @deffn category class name args
\makedefun{defop}#1 {\defopon{#1\ \putwordon}}
% \defopon {category on}class name args
\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
% \deffngeneral {subind}category name args
%
\def\deffngeneral#1#2 #3 #4\endheader{%
% Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
\dosubind{fn}{\code{#3}}{#1}%
\defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
}
%%% Typed functions:
% @deftypefn category type name args
\makedefun{deftypefn}{\deftypefngeneral{}}
% @deftypeop category class type name args
\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
% \deftypeopon {category on}class type name args
\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
% \deftypefngeneral {subind}category type name args
%
\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
\dosubind{fn}{\code{#4}}{#1}%
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
%%% Typed variables:
% @deftypevr category type var args
\makedefun{deftypevr}{\deftypecvgeneral{}}
% @deftypecv category class type var args
\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
% \deftypecvof {category of}class type var args
\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
% \deftypecvgeneral {subind}category type var args
%
\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
\dosubind{vr}{\code{#4}}{#1}%
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
%%% Untyped variables:
% @defvr category var args
\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
% @defcv category class var args
\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
% \defcvof {category of}class var args
\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
%%% Type:
% @deftp category name args
\makedefun{deftp}#1 #2 #3\endheader{%
\doind{tp}{\code{#2}}%
\defname{#1}{}{#2}\defunargs{#3\unskip}%
}
% Remaining @defun-like shortcuts:
\makedefun{defun}{\deffnheader{\putwordDeffunc} }
\makedefun{defmac}{\deffnheader{\putwordDefmac} }
\makedefun{defspec}{\deffnheader{\putwordDefspec} }
\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
\makedefun{defvar}{\defvrheader{\putwordDefvar} }
\makedefun{defopt}{\defvrheader{\putwordDefopt} }
\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
\makedefun{defmethod}{\defopon\putwordMethodon}
\makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
\makedefun{defivar}{\defcvof\putwordInstanceVariableof}
\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
% \defname, which formats the name of the @def (not the args).
% #1 is the category, such as "Function".
% #2 is the return type, if any.
% #3 is the function name.
%
% We are followed by (but not passed) the arguments, if any.
%
\def\defname#1#2#3{%
% Get the values of \leftskip and \rightskip as they were outside the @def...
\advance\leftskip by -\defbodyindent
%
% How we'll format the type name. Putting it in brackets helps
% distinguish it from the body text that may end up on the next line
% just below it.
\def\temp{#1}%
\setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
%
% Figure out line sizes for the paragraph shape.
% The first line needs space for \box0; but if \rightskip is nonzero,
% we need only space for the part of \box0 which exceeds it:
\dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
% The continuations:
\dimen2=\hsize \advance\dimen2 by -\defargsindent
% (plain.tex says that \dimen1 should be used only as global.)
\parshape 2 0in \dimen0 \defargsindent \dimen2
%
% Put the type name to the right margin.
\noindent
\hbox to 0pt{%
\hfil\box0 \kern-\hsize
% \hsize has to be shortened this way:
\kern\leftskip
% Intentionally do not respect \rightskip, since we need the space.
}%
%
% Allow all lines to be underfull without complaint:
\tolerance=10000 \hbadness=10000
\exdentamount=\defbodyindent
{%
% defun fonts. We use typewriter by default (used to be bold) because:
% . we're printing identifiers, they should be in tt in principle.
% . in languages with many accents, such as Czech or French, it's
% common to leave accents off identifiers. The result looks ok in
% tt, but exceedingly strange in rm.
% . we don't want -- and --- to be treated as ligatures.
% . this still does not fix the ?` and !` ligatures, but so far no
% one has made identifiers using them :).
\df \tt
\def\temp{#2}% return value type
\ifx\temp\empty\else \tclose{\temp} \fi
#3% output function name
}%
{\rm\enskip}% hskip 0.5 em of \tenrm
%
\boldbrax
% arguments will be output next, if any.
}
% Print arguments in slanted roman (not ttsl), inconsistently with using
% tt for the name. This is because literal text is sometimes needed in
% the argument list (groff manual), and ttsl and tt are not very
% distinguishable. Prevent hyphenation at `-' chars.
%
\def\defunargs#1{%
% use sl by default (not ttsl),
% tt for the names.
\df \sl \hyphenchar\font=0
%
% On the other hand, if an argument has two dashes (for instance), we
% want a way to get ttsl. Let's try @var for that.
\def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
#1%
\sl\hyphenchar\font=45
}
% We want ()&[] to print specially on the defun line.
%
\def\activeparens{%
\catcode`\(=\active \catcode`\)=\active
\catcode`\[=\active \catcode`\]=\active
\catcode`\&=\active
}
% Make control sequences which act like normal parenthesis chars.
\let\lparen = ( \let\rparen = )
% Be sure that we always have a definition for `(', etc. For example,
% if the fn name has parens in it, \boldbrax will not be in effect yet,
% so TeX would otherwise complain about undefined control sequence.
{
\activeparens
\global\let(=\lparen \global\let)=\rparen
\global\let[=\lbrack \global\let]=\rbrack
\global\let& = \&
\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
\gdef\magicamp{\let&=\amprm}
}
\newcount\parencount
% If we encounter &foo, then turn on ()-hacking afterwards
\newif\ifampseen
\def\amprm#1 {\ampseentrue{\bf\ }}
\def\parenfont{%
\ifampseen
% At the first level, print parens in roman,
% otherwise use the default font.
\ifnum \parencount=1 \rm \fi
\else
% The \sf parens (in \boldbrax) actually are a little bolder than
% the contained text. This is especially needed for [ and ] .
\sf
\fi
}
\def\infirstlevel#1{%
\ifampseen
\ifnum\parencount=1
#1%
\fi
\fi
}
\def\bfafterword#1 {#1 \bf}
\def\opnr{%
\global\advance\parencount by 1
{\parenfont(}%
\infirstlevel \bfafterword
}
\def\clnr{%
{\parenfont)}%
\infirstlevel \sl
\global\advance\parencount by -1
}
\newcount\brackcount
\def\lbrb{%
\global\advance\brackcount by 1
{\bf[}%
}
\def\rbrb{%
{\bf]}%
\global\advance\brackcount by -1
}
\def\checkparencounts{%
\ifnum\parencount=0 \else \badparencount \fi
\ifnum\brackcount=0 \else \badbrackcount \fi
}
% these should not use \errmessage; the glibc manual, at least, actually
% has such constructs (when documenting function pointers).
\def\badparencount{%
\message{Warning: unbalanced parentheses in @def...}%
\global\parencount=0
}
\def\badbrackcount{%
\message{Warning: unbalanced square brackets in @def...}%
\global\brackcount=0
}
\message{macros,}
% @macro.
% To do this right we need a feature of e-TeX, \scantokens,
% which we arrange to emulate with a temporary file in ordinary TeX.
\ifx\eTeXversion\undefined
\newwrite\macscribble
\def\scantokens#1{%
\toks0={#1}%
\immediate\openout\macscribble=\jobname.tmp
\immediate\write\macscribble{\the\toks0}%
\immediate\closeout\macscribble
\input \jobname.tmp
}
\fi
\def\scanmacro#1{%
\begingroup
\newlinechar`\^^M
\let\xeatspaces\eatspaces
% Undo catcode changes of \startcontents and \doprintindex
% When called from @insertcopying or (short)caption, we need active
% backslash to get it printed correctly. Previously, we had
% \catcode`\\=\other instead. We'll see whether a problem appears
% with macro expansion. --kasal, 19aug04
\catcode`\@=0 \catcode`\\=\active \escapechar=`\@
% ... and \example
\spaceisspace
%
% Append \endinput to make sure that TeX does not see the ending newline.
% I've verified that it is necessary both for e-TeX and for ordinary TeX
% --kasal, 29nov03
\scantokens{#1\endinput}%
\endgroup
}
\def\scanexp#1{%
\edef\temp{\noexpand\scanmacro{#1}}%
\temp
}
\newcount\paramno % Count of parameters
\newtoks\macname % Macro name
\newif\ifrecursive % Is it recursive?
% List of all defined macros in the form
% \definedummyword\macro1\definedummyword\macro2...
% Currently is also contains all @aliases; the list can be split
% if there is a need.
\def\macrolist{}
% Add the macro to \macrolist
\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
\def\addtomacrolistxxx#1{%
\toks0 = \expandafter{\macrolist\definedummyword#1}%
\xdef\macrolist{\the\toks0}%
}
% Utility routines.
% This does \let #1 = #2, with \csnames; that is,
% \let \csname#1\endcsname = \csname#2\endcsname
% (except of course we have to play expansion games).
%
\def\cslet#1#2{%
\expandafter\let
\csname#1\expandafter\endcsname
\csname#2\endcsname
}
% Trim leading and trailing spaces off a string.
% Concepts from aro-bend problem 15 (see CTAN).
{\catcode`\@=11
\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
\def\unbrace#1{#1}
\unbrace{\gdef\trim@@@ #1 } #2@{#1}
}
% Trim a single trailing ^^M off a string.
{\catcode`\^^M=\other \catcode`\Q=3%
\gdef\eatcr #1{\eatcra #1Q^^MQ}%
\gdef\eatcra#1^^MQ{\eatcrb#1Q}%
\gdef\eatcrb#1Q#2Q{#1}%
}
% Macro bodies are absorbed as an argument in a context where
% all characters are catcode 10, 11 or 12, except \ which is active
% (as in normal texinfo). It is necessary to change the definition of \.
% Non-ASCII encodings make 8-bit characters active, so un-activate
% them to avoid their expansion. Must do this non-globally, to
% confine the change to the current group.
% It's necessary to have hard CRs when the macro is executed. This is
% done by making ^^M (\endlinechar) catcode 12 when reading the macro
% body, and then making it the \newlinechar in \scanmacro.
\def\scanctxt{%
\catcode`\"=\other
\catcode`\+=\other
\catcode`\<=\other
\catcode`\>=\other
\catcode`\@=\other
\catcode`\^=\other
\catcode`\_=\other
\catcode`\|=\other
\catcode`\~=\other
\ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
}
\def\scanargctxt{%
\scanctxt
\catcode`\\=\other
\catcode`\^^M=\other
}
\def\macrobodyctxt{%
\scanctxt
\catcode`\{=\other
\catcode`\}=\other
\catcode`\^^M=\other
\usembodybackslash
}
\def\macroargctxt{%
\scanctxt
\catcode`\\=\other
}
% \mbodybackslash is the definition of \ in @macro bodies.
% It maps \foo\ => \csname macarg.foo\endcsname => #N
% where N is the macro parameter number.
% We define \csname macarg.\endcsname to be \realbackslash, so
% \\ in macro replacement text gets you a backslash.
{\catcode`@=0 @catcode`@\=@active
@gdef@usembodybackslash{@let\=@mbodybackslash}
@gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
}
\expandafter\def\csname macarg.\endcsname{\realbackslash}
\def\macro{\recursivefalse\parsearg\macroxxx}
\def\rmacro{\recursivetrue\parsearg\macroxxx}
\def\macroxxx#1{%
\getargs{#1}% now \macname is the macname and \argl the arglist
\ifx\argl\empty % no arguments
\paramno=0%
\else
\expandafter\parsemargdef \argl;%
\fi
\if1\csname ismacro.\the\macname\endcsname
\message{Warning: redefining \the\macname}%
\else
\expandafter\ifx\csname \the\macname\endcsname \relax
\else \errmessage{Macro name \the\macname\space already defined}\fi
\global\cslet{macsave.\the\macname}{\the\macname}%
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
\addtomacrolist{\the\macname}%
\fi
\begingroup \macrobodyctxt
\ifrecursive \expandafter\parsermacbody
\else \expandafter\parsemacbody
\fi}
\parseargdef\unmacro{%
\if1\csname ismacro.#1\endcsname
\global\cslet{#1}{macsave.#1}%
\global\expandafter\let \csname ismacro.#1\endcsname=0%
% Remove the macro name from \macrolist:
\begingroup
\expandafter\let\csname#1\endcsname \relax
\let\definedummyword\unmacrodo
\xdef\macrolist{\macrolist}%
\endgroup
\else
\errmessage{Macro #1 not defined}%
\fi
}
% Called by \do from \dounmacro on each macro. The idea is to omit any
% macro definitions that have been changed to \relax.
%
\def\unmacrodo#1{%
\ifx #1\relax
% remove this
\else
\noexpand\definedummyword \noexpand#1%
\fi
}
% This makes use of the obscure feature that if the last token of a
% is #, then the preceding argument is delimited by
% an opening brace, and that opening brace is not consumed.
\def\getargs#1{\getargsxxx#1{}}
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
\def\getmacname #1 #2\relax{\macname={#1}}
\def\getmacargs#1{\def\argl{#1}}
% Parse the optional {params} list. Set up \paramno and \paramlist
% so \defmacro knows what to do. Define \macarg.blah for each blah
% in the params list, to be ##N where N is the position in that list.
% That gets used by \mbodybackslash (above).
% We need to get `macro parameter char #' into several definitions.
% The technique used is stolen from LaTeX: let \hash be something
% unexpandable, insert that wherever you need a #, and then redefine
% it to # just before using the token list produced.
%
% The same technique is used to protect \eatspaces till just before
% the macro is used.
\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
\let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
\def\parsemargdefxxx#1,{%
\if#1;\let\next=\relax
\else \let\next=\parsemargdefxxx
\advance\paramno by 1%
\expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
{\xeatspaces{\hash\the\paramno}}%
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
% These two commands read recursive and nonrecursive macro bodies.
% (They're different since rec and nonrec macros end differently.)
\long\def\parsemacbody#1@end macro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
\long\def\parsermacbody#1@end rmacro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
% This defines the macro itself. There are six cases: recursive and
% nonrecursive macros of zero, one, and many arguments.
% Much magic with \expandafter here.
% \xdef is used so that macro definitions will survive the file
% they're defined in; @include reads the file inside a group.
\def\defmacro{%
\let\hash=##% convert placeholders to macro parameter chars
\ifrecursive
\ifcase\paramno
% 0
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\scanmacro{\temp}}%
\or % 1
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
\noexpand\braceorline
\expandafter\noexpand\csname\the\macname xxx\endcsname}%
\expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup\noexpand\scanmacro{\temp}}%
\else % many
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
\noexpand\csname\the\macname xx\endcsname}%
\expandafter\xdef\csname\the\macname xx\endcsname##1{%
\expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
\expandafter\expandafter
\expandafter\xdef
\expandafter\expandafter
\csname\the\macname xxx\endcsname
\paramlist{\egroup\noexpand\scanmacro{\temp}}%
\fi
\else
\ifcase\paramno
% 0
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\norecurse{\the\macname}%
\noexpand\scanmacro{\temp}\egroup}%
\or % 1
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
\noexpand\braceorline
\expandafter\noexpand\csname\the\macname xxx\endcsname}%
\expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup
\noexpand\norecurse{\the\macname}%
\noexpand\scanmacro{\temp}\egroup}%
\else % many
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
\expandafter\noexpand\csname\the\macname xx\endcsname}%
\expandafter\xdef\csname\the\macname xx\endcsname##1{%
\expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
\expandafter\expandafter
\expandafter\xdef
\expandafter\expandafter
\csname\the\macname xxx\endcsname
\paramlist{%
\egroup
\noexpand\norecurse{\the\macname}%
\noexpand\scanmacro{\temp}\egroup}%
\fi
\fi}
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
% \braceorline decides whether the next nonwhitespace character is a
% {. If so it reads up to the closing }, if not, it reads the whole
% line. Whatever was read is then fed to the next control sequence
% as an argument (by \parsebrace or \parsearg)
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
\ifx\nchar\bgroup\else
\expandafter\parsearg
\fi \macnamexxx}
% @alias.
% We need some trickery to remove the optional spaces around the equal
% sign. Just make them active and then expand them all to nothing.
\def\alias{\parseargusing\obeyspaces\aliasxxx}
\def\aliasxxx #1{\aliasyyy#1\relax}
\def\aliasyyy #1=#2\relax{%
{%
\expandafter\let\obeyedspace=\empty
\addtomacrolist{#1}%
\xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
}%
\next
}
\message{cross references,}
\newwrite\auxfile
\newif\ifhavexrefs % True if xref values are known.
\newif\ifwarnedxrefs % True if we warned once that they aren't known.
% @inforef is relatively simple.
\def\inforef #1{\inforefzzz #1,,,,**}
\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
node \samp{\ignorespaces#1{}}}
% @node's only job in TeX is to define \lastnode, which is used in
% cross-references. The @node line might or might not have commas, and
% might or might not have spaces before the first comma, like:
% @node foo , bar , ...
% We don't want such trailing spaces in the node name.
%
\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
%
% also remove a trailing comma, in case of something like this:
% @node Help-Cross, , , Cross-refs
\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
\let\nwnode=\node
\let\lastnode=\empty
% Write a cross-reference definition for the current node. #1 is the
% type (Ynumbered, Yappendix, Ynothing).
%
\def\donoderef#1{%
\ifx\lastnode\empty\else
\setref{\lastnode}{#1}%
\global\let\lastnode=\empty
\fi
}
% @anchor{NAME} -- define xref target at arbitrary point.
%
\newcount\savesfregister
%
\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
% anchor), which consists of three parts:
% 1) NAME-title - the current sectioning name taken from \lastsection,
% or the anchor name.
% 2) NAME-snt - section number and type, passed as the SNT arg, or
% empty for anchors.
% 3) NAME-pg - the page number.
%
% This is called from \donoderef, \anchor, and \dofloat. In the case of
% floats, there is an additional part, which is not written here:
% 4) NAME-lof - the text as it should appear in a @listoffloats.
%
\def\setref#1#2{%
\pdfmkdest{#1}%
\iflinks
{%
\atdummies % preserve commands, but don't expand them
\edef\writexrdef##1##2{%
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
##1}{##2}}% these are parameters of \writexrdef
}%
\toks0 = \expandafter{\lastsection}%
\immediate \writexrdef{title}{\the\toks0 }%
\immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
\safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout
}%
\fi
}
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
% the node name, #2 the name of the Info cross-reference, #3 the printed
% node name, #4 the name of the Info file, #5 the name of the printed
% manual. All but the node name can be omitted.
%
\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
\def\ref#1{\xrefX[#1,,,,,,,]}
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
\unsepspaces
\def\printedmanual{\ignorespaces #5}%
\def\printedrefname{\ignorespaces #3}%
\setbox1=\hbox{\printedmanual\unskip}%
\setbox0=\hbox{\printedrefname\unskip}%
\ifdim \wd0 = 0pt
% No printed node name was explicitly given.
\expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
% Use the node name inside the square brackets.
\def\printedrefname{\ignorespaces #1}%
\else
% Use the actual chapter/section title appear inside
% the square brackets. Use the real section title if we have it.
\ifdim \wd1 > 0pt
% It is in another manual, so we don't have it.
\def\printedrefname{\ignorespaces #1}%
\else
\ifhavexrefs
% We know the real title if we have the xref values.
\def\printedrefname{\refx{#1-title}{}}%
\else
% Otherwise just copy the Info node name.
\def\printedrefname{\ignorespaces #1}%
\fi%
\fi
\fi
\fi
%
% Make link in pdf output.
\ifpdf
{\indexnofonts
\turnoffactive
% This expands tokens, so do it after making catcode changes, so _
% etc. don't get their TeX definitions.
\getfilename{#4}%
%
% See comments at \activebackslashdouble.
{\activebackslashdouble \xdef\pdfxrefdest{#1}%
\backslashparens\pdfxrefdest}%
%
\leavevmode
\startlink attr{/Border [0 0 0]}%
\ifnum\filenamelength>0
goto file{\the\filename.pdf} name{\pdfxrefdest}%
\else
goto name{\pdfmkpgn{\pdfxrefdest}}%
\fi
}%
\setcolor{\linkcolor}%
\fi
%
% Float references are printed completely differently: "Figure 1.2"
% instead of "[somenode], p.3". We distinguish them by the
% LABEL-title being set to a magic string.
{%
% Have to otherify everything special to allow the \csname to
% include an _ in the xref name, etc.
\indexnofonts
\turnoffactive
\expandafter\global\expandafter\let\expandafter\Xthisreftitle
\csname XR#1-title\endcsname
}%
\iffloat\Xthisreftitle
% If the user specified the print name (third arg) to the ref,
% print it instead of our usual "Figure 1.2".
\ifdim\wd0 = 0pt
\refx{#1-snt}{}%
\else
\printedrefname
\fi
%
% if the user also gave the printed manual name (fifth arg), append
% "in MANUALNAME".
\ifdim \wd1 > 0pt
\space \putwordin{} \cite{\printedmanual}%
\fi
\else
% node/anchor (non-float) references.
%
% If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
% insert empty discretionaries after hyphens, which means that it will
% not find a line break at a hyphen in a node names. Since some manuals
% are best written with fairly long node names, containing hyphens, this
% is a loss. Therefore, we give the text of the node name again, so it
% is as if TeX is seeing it for the first time.
\ifdim \wd1 > 0pt
\putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
\else
% _ (for example) has to be the character _ for the purposes of the
% control sequence corresponding to the node, but it has to expand
% into the usual \leavevmode...\vrule stuff for purposes of
% printing. So we \turnoffactive for the \refx-snt, back on for the
% printing, back off for the \refx-pg.
{\turnoffactive
% Only output a following space if the -snt ref is nonempty; for
% @unnumbered and @anchor, it won't be.
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
\ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
}%
% output the `[mynode]' via a macro so it can be overridden.
\xrefprintnodename\printedrefname
%
% But we always want a comma and a space:
,\space
%
% output the `page 3'.
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
\fi
\fi
\endlink
\endgroup}
% This macro is called from \xrefX for the `[nodename]' part of xref
% output. It's a separate macro only so it can be changed more easily,
% since square brackets don't work well in some documents. Particularly
% one that Bob is working on :).
%
\def\xrefprintnodename#1{[#1]}
% Things referred to by \setref.
%
\def\Ynothing{}
\def\Yomitfromtoc{}
\def\Ynumbered{%
\ifnum\secno=0
\putwordChapter@tie \the\chapno
\else \ifnum\subsecno=0
\putwordSection@tie \the\chapno.\the\secno
\else \ifnum\subsubsecno=0
\putwordSection@tie \the\chapno.\the\secno.\the\subsecno
\else
\putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
\fi\fi\fi
}
\def\Yappendix{%
\ifnum\secno=0
\putwordAppendix@tie @char\the\appendixno{}%
\else \ifnum\subsecno=0
\putwordSection@tie @char\the\appendixno.\the\secno
\else \ifnum\subsubsecno=0
\putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
\else
\putwordSection@tie
@char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
\fi\fi\fi
}
% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
% If its value is nonempty, SUFFIX is output afterward.
%
\def\refx#1#2{%
{%
\indexnofonts
\otherbackslash
\expandafter\global\expandafter\let\expandafter\thisrefX
\csname XR#1\endcsname
}%
\ifx\thisrefX\relax
% If not defined, say something at least.
\angleleft un\-de\-fined\angleright
\iflinks
\ifhavexrefs
\message{\linenumber Undefined cross reference `#1'.}%
\else
\ifwarnedxrefs\else
\global\warnedxrefstrue
\message{Cross reference values unknown; you must run TeX again.}%
\fi
\fi
\fi
\else
% It's defined, so just use it.
\thisrefX
\fi
#2% Output the suffix in any case.
}
% This is the macro invoked by entries in the aux file. Usually it's
% just a \def (we prepend XR to the control sequence name to avoid
% collisions). But if this is a float type, we have more work to do.
%
\def\xrdef#1#2{%
{% The node name might contain 8-bit characters, which in our current
% implementation are changed to commands like @'e. Don't let these
% mess up the control sequence name.
\indexnofonts
\turnoffactive
\xdef\safexrefname{#1}%
}%
%
\expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
%
% Was that xref control sequence that we just defined for a float?
\expandafter\iffloat\csname XR\safexrefname\endcsname
% it was a float, and we have the (safe) float type in \iffloattype.
\expandafter\let\expandafter\floatlist
\csname floatlist\iffloattype\endcsname
%
% Is this the first time we've seen this float type?
\expandafter\ifx\floatlist\relax
\toks0 = {\do}% yes, so just \do
\else
% had it before, so preserve previous elements in list.
\toks0 = \expandafter{\floatlist\do}%
\fi
%
% Remember this xref in the control sequence \floatlistFLOATTYPE,
% for later use in \listoffloats.
\expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
{\safexrefname}}%
\fi
}
% Read the last existing aux file, if any. No error if none exists.
%
\def\tryauxfile{%
\openin 1 \jobname.aux
\ifeof 1 \else
\readdatafile{aux}%
\global\havexrefstrue
\fi
\closein 1
}
\def\setupdatafile{%
\catcode`\^^@=\other
\catcode`\^^A=\other
\catcode`\^^B=\other
\catcode`\^^C=\other
\catcode`\^^D=\other
\catcode`\^^E=\other
\catcode`\^^F=\other
\catcode`\^^G=\other
\catcode`\^^H=\other
\catcode`\^^K=\other
\catcode`\^^L=\other
\catcode`\^^N=\other
\catcode`\^^P=\other
\catcode`\^^Q=\other
\catcode`\^^R=\other
\catcode`\^^S=\other
\catcode`\^^T=\other
\catcode`\^^U=\other
\catcode`\^^V=\other
\catcode`\^^W=\other
\catcode`\^^X=\other
\catcode`\^^Z=\other
\catcode`\^^[=\other
\catcode`\^^\=\other
\catcode`\^^]=\other
\catcode`\^^^=\other
\catcode`\^^_=\other
% It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
% in xref tags, i.e., node names. But since ^^e4 notation isn't
% supported in the main text, it doesn't seem desirable. Furthermore,
% that is not enough: for node names that actually contain a ^
% character, we would end up writing a line like this: 'xrdef {'hat
% b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
% argument, and \hat is not an expandable control sequence. It could
% all be worked out, but why? Either we support ^^ or we don't.
%
% The other change necessary for this was to define \auxhat:
% \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
% and then to call \auxhat in \setq.
%
\catcode`\^=\other
%
% Special characters. Should be turned off anyway, but...
\catcode`\~=\other
\catcode`\[=\other
\catcode`\]=\other
\catcode`\"=\other
\catcode`\_=\other
\catcode`\|=\other
\catcode`\<=\other
\catcode`\>=\other
\catcode`\$=\other
\catcode`\#=\other
\catcode`\&=\other
\catcode`\%=\other
\catcode`+=\other % avoid \+ for paranoia even though we've turned it off
%
% This is to support \ in node names and titles, since the \
% characters end up in a \csname. It's easier than
% leaving it active and making its active definition an actual \
% character. What I don't understand is why it works in the *value*
% of the xrdef. Seems like it should be a catcode12 \, and that
% should not typeset properly. But it works, so I'm moving on for
% now. --karl, 15jan04.
\catcode`\\=\other
%
% Make the characters 128-255 be printing characters.
{%
\count1=128
\def\loop{%
\catcode\count1=\other
\advance\count1 by 1
\ifnum \count1<256 \loop \fi
}%
}%
%
% @ is our escape character in .aux files, and we need braces.
\catcode`\{=1
\catcode`\}=2
\catcode`\@=0
}
\def\readdatafile#1{%
\begingroup
\setupdatafile
\input\jobname.#1
\endgroup}
\message{insertions,}
% including footnotes.
\newcount \footnoteno
% The trailing space in the following definition for supereject is
% vital for proper filling; pages come out unaligned when you do a
% pagealignmacro call if that space before the closing brace is
% removed. (Generally, numeric constants should always be followed by a
% space to prevent strange expansion errors.)
\def\supereject{\par\penalty -20000\footnoteno =0 }
% @footnotestyle is meaningful for info output only.
\let\footnotestyle=\comment
{\catcode `\@=11
%
% Auto-number footnotes. Otherwise like plain.
\gdef\footnote{%
\let\indent=\ptexindent
\let\noindent=\ptexnoindent
\global\advance\footnoteno by \@ne
\edef\thisfootno{$^{\the\footnoteno}$}%
%
% In case the footnote comes at the end of a sentence, preserve the
% extra spacing after we do the footnote number.
\let\@sf\empty
\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
%
% Remove inadvertent blank space before typesetting the footnote number.
\unskip
\thisfootno\@sf
\dofootnote
}%
% Don't bother with the trickery in plain.tex to not require the
% footnote text as a parameter. Our footnotes don't need to be so general.
%
% Oh yes, they do; otherwise, @ifset (and anything else that uses
% \parseargline) fails inside footnotes because the tokens are fixed when
% the footnote is read. --karl, 16nov96.
%
\gdef\dofootnote{%
\insert\footins\bgroup
% We want to typeset this text as a normal paragraph, even if the
% footnote reference occurs in (for example) a display environment.
% So reset some parameters.
\hsize=\pagewidth
\interlinepenalty\interfootnotelinepenalty
\splittopskip\ht\strutbox % top baseline for broken footnotes
\splitmaxdepth\dp\strutbox
\floatingpenalty\@MM
\leftskip\z@skip
\rightskip\z@skip
\spaceskip\z@skip
\xspaceskip\z@skip
\parindent\defaultparindent
%
\smallfonts \rm
%
% Because we use hanging indentation in footnotes, a @noindent appears
% to exdent this text, so make it be a no-op. makeinfo does not use
% hanging indentation so @noindent can still be needed within footnote
% text after an @example or the like (not that this is good style).
\let\noindent = \relax
%
% Hang the footnote text off the number. Use \everypar in case the
% footnote extends for more than one paragraph.
\everypar = {\hang}%
\textindent{\thisfootno}%
%
% Don't crash into the line above the footnote text. Since this
% expands into a box, it must come within the paragraph, lest it
% provide a place where TeX can split the footnote.
\footstrut
\futurelet\next\fo@t
}
}%end \catcode `\@=11
% In case a @footnote appears in a vbox, save the footnote text and create
% the real \insert just after the vbox finished. Otherwise, the insertion
% would be lost.
% Similarly, if a @footnote appears inside an alignment, save the footnote
% text to a box and make the \insert when a row of the table is finished.
% And the same can be done for other insert classes. --kasal, 16nov03.
% Replace the \insert primitive by a cheating macro.
% Deeper inside, just make sure that the saved insertions are not spilled
% out prematurely.
%
\def\startsavinginserts{%
\ifx \insert\ptexinsert
\let\insert\saveinsert
\else
\let\checkinserts\relax
\fi
}
% This \insert replacement works for both \insert\footins{foo} and
% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
%
\def\saveinsert#1{%
\edef\next{\noexpand\savetobox \makeSAVEname#1}%
\afterassignment\next
% swallow the left brace
\let\temp =
}
\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
\def\placesaveins#1{%
\ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
{\box#1}%
}
% eat @SAVE -- beware, all of them have catcode \other:
{
\def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
\gdef\gobblesave @SAVE{}
}
% initialization:
\def\newsaveins #1{%
\edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
\next
}
\def\newsaveinsX #1{%
\csname newbox\endcsname #1%
\expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
\checksaveins #1}%
}
% initialize:
\let\checkinserts\empty
\newsaveins\footins
\newsaveins\margin
% @image. We use the macros from epsf.tex to support this.
% If epsf.tex is not installed and @image is used, we complain.
%
% Check for and read epsf.tex up front. If we read it only at @image
% time, we might be inside a group, and then its definitions would get
% undone and the next image would fail.
\openin 1 = epsf.tex
\ifeof 1 \else
% Do not bother showing banner with epsf.tex v2.7k (available in
% doc/epsf.tex and on ctan).
\def\epsfannounce{\toks0 = }%
\input epsf.tex
\fi
\closein 1
%
% We will only complain once about lack of epsf.tex.
\newif\ifwarnednoepsf
\newhelp\noepsfhelp{epsf.tex must be installed for images to
work. It is also included in the Texinfo distribution, or you can get
it from ftp://tug.org/tex/epsf.tex.}
%
\def\image#1{%
\ifx\epsfbox\undefined
\ifwarnednoepsf \else
\errhelp = \noepsfhelp
\errmessage{epsf.tex not found, images will be ignored}%
\global\warnednoepsftrue
\fi
\else
\imagexxx #1,,,,,\finish
\fi
}
%
% Arguments to @image:
% #1 is (mandatory) image filename; we tack on .eps extension.
% #2 is (optional) width, #3 is (optional) height.
% #4 is (ignored optional) html alt text.
% #5 is (ignored optional) extension.
% #6 is just the usual extra ignored arg for parsing this stuff.
\newif\ifimagevmode
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
\nobreak\medskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
\fi
%
% Leave vertical mode so that indentation from an enclosing
% environment such as @quotation is respected. On the other hand, if
% it's at the top level, we don't want the normal paragraph indentation.
\noindent
%
% Output the image.
\ifpdf
\dopdfimage{#1}{#2}{#3}%
\else
% \epsfbox itself resets \epsf?size at each figure.
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
\epsfbox{#1.eps}%
\fi
%
\ifimagevmode \medskip \fi % space after the standalone image
\endgroup}
% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
% etc. We don't actually implement floating yet, we always include the
% float "here". But it seemed the best name for the future.
%
\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
% There may be a space before second and/or third parameter; delete it.
\def\eatcommaspace#1, {#1,}
% #1 is the optional FLOATTYPE, the text label for this float, typically
% "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
% this float will not be numbered and cannot be referred to.
%
% #2 is the optional xref label. Also must be present for the float to
% be referable.
%
% #3 is the optional positioning argument; for now, it is ignored. It
% will somehow specify the positions allowed to float to (here, top, bottom).
%
% We keep a separate counter for each FLOATTYPE, which we reset at each
% chapter-level command.
\let\resetallfloatnos=\empty
%
\def\dofloat#1,#2,#3,#4\finish{%
\let\thiscaption=\empty
\let\thisshortcaption=\empty
%
% don't lose footnotes inside @float.
%
% BEWARE: when the floats start float, we have to issue warning whenever an
% insert appears inside a float which could possibly float. --kasal, 26may04
%
\startsavinginserts
%
% We can't be used inside a paragraph.
\par
%
\vtop\bgroup
\def\floattype{#1}%
\def\floatlabel{#2}%
\def\floatloc{#3}% we do nothing with this yet.
%
\ifx\floattype\empty
\let\safefloattype=\empty
\else
{%
% the floattype might have accents or other special characters,
% but we need to use it in a control sequence name.
\indexnofonts
\turnoffactive
\xdef\safefloattype{\floattype}%
}%
\fi
%
% If label is given but no type, we handle that as the empty type.
\ifx\floatlabel\empty \else
% We want each FLOATTYPE to be numbered separately (Figure 1,
% Table 1, Figure 2, ...). (And if no label, no number.)
%
\expandafter\getfloatno\csname\safefloattype floatno\endcsname
\global\advance\floatno by 1
%
{%
% This magic value for \lastsection is output by \setref as the
% XREFLABEL-title value. \xrefX uses it to distinguish float
% labels (which have a completely different output format) from
% node and anchor labels. And \xrdef uses it to construct the
% lists of floats.
%
\edef\lastsection{\floatmagic=\safefloattype}%
\setref{\floatlabel}{Yfloat}%
}%
\fi
%
% start with \parskip glue, I guess.
\vskip\parskip
%
% Don't suppress indentation if a float happens to start a section.
\restorefirstparagraphindent
}
% we have these possibilities:
% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
% @float Foo,lbl & no caption: Foo 1.1
% @float Foo & @caption{Cap}: Foo: Cap
% @float Foo & no caption: Foo
% @float ,lbl & Caption{Cap}: 1.1: Cap
% @float ,lbl & no caption: 1.1
% @float & @caption{Cap}: Cap
% @float & no caption:
%
\def\Efloat{%
\let\floatident = \empty
%
% In all cases, if we have a float type, it comes first.
\ifx\floattype\empty \else \def\floatident{\floattype}\fi
%
% If we have an xref label, the number comes next.
\ifx\floatlabel\empty \else
\ifx\floattype\empty \else % if also had float type, need tie first.
\appendtomacro\floatident{\tie}%
\fi
% the number.
\appendtomacro\floatident{\chaplevelprefix\the\floatno}%
\fi
%
% Start the printed caption with what we've constructed in
% \floatident, but keep it separate; we need \floatident again.
\let\captionline = \floatident
%
\ifx\thiscaption\empty \else
\ifx\floatident\empty \else
\appendtomacro\captionline{: }% had ident, so need a colon between
\fi
%
% caption text.
\appendtomacro\captionline{\scanexp\thiscaption}%
\fi
%
% If we have anything to print, print it, with space before.
% Eventually this needs to become an \insert.
\ifx\captionline\empty \else
\vskip.5\parskip
\captionline
%
% Space below caption.
\vskip\parskip
\fi
%
% If have an xref label, write the list of floats info. Do this
% after the caption, to avoid chance of it being a breakpoint.
\ifx\floatlabel\empty \else
% Write the text that goes in the lof to the aux file as
% \floatlabel-lof. Besides \floatident, we include the short
% caption if specified, else the full caption if specified, else nothing.
{%
\atdummies
%
% since we read the caption text in the macro world, where ^^M
% is turned into a normal character, we have to scan it back, so
% we don't write the literal three characters "^^M" into the aux file.
\scanexp{%
\xdef\noexpand\gtemp{%
\ifx\thisshortcaption\empty
\thiscaption
\else
\thisshortcaption
\fi
}%
}%
\immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
\ifx\gtemp\empty \else : \gtemp \fi}}%
}%
\fi
\egroup % end of \vtop
%
% place the captured inserts
%
% BEWARE: when the floats start floating, we have to issue warning
% whenever an insert appears inside a float which could possibly
% float. --kasal, 26may04
%
\checkinserts
}
% Append the tokens #2 to the definition of macro #1, not expanding either.
%
\def\appendtomacro#1#2{%
\expandafter\def\expandafter#1\expandafter{#1#2}%
}
% @caption, @shortcaption
%
\def\caption{\docaption\thiscaption}
\def\shortcaption{\docaption\thisshortcaption}
\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
\def\defcaption#1#2{\egroup \def#1{#2}}
% The parameter is the control sequence identifying the counter we are
% going to use. Create it if it doesn't exist and assign it to \floatno.
\def\getfloatno#1{%
\ifx#1\relax
% Haven't seen this figure type before.
\csname newcount\endcsname #1%
%
% Remember to reset this floatno at the next chap.
\expandafter\gdef\expandafter\resetallfloatnos
\expandafter{\resetallfloatnos #1=0 }%
\fi
\let\floatno#1%
}
% \setref calls this to get the XREFLABEL-snt value. We want an @xref
% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
% first read the @float command.
%
\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
% Magic string used for the XREFLABEL-title value, so \xrefX can
% distinguish floats from other xref types.
\def\floatmagic{!!float!!}
% #1 is the control sequence we are passed; we expand into a conditional
% which is true if #1 represents a float ref. That is, the magic
% \lastsection value which we \setref above.
%
\def\iffloat#1{\expandafter\doiffloat#1==\finish}
%
% #1 is (maybe) the \floatmagic string. If so, #2 will be the
% (safe) float type for this float. We set \iffloattype to #2.
%
\def\doiffloat#1=#2=#3\finish{%
\def\temp{#1}%
\def\iffloattype{#2}%
\ifx\temp\floatmagic
}
% @listoffloats FLOATTYPE - print a list of floats like a table of contents.
%
\parseargdef\listoffloats{%
\def\floattype{#1}% floattype
{%
% the floattype might have accents or other special characters,
% but we need to use it in a control sequence name.
\indexnofonts
\turnoffactive
\xdef\safefloattype{\floattype}%
}%
%
% \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
\expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
\ifhavexrefs
% if the user said @listoffloats foo but never @float foo.
\message{\linenumber No `\safefloattype' floats to list.}%
\fi
\else
\begingroup
\leftskip=\tocindent % indent these entries like a toc
\let\do=\listoffloatsdo
\csname floatlist\safefloattype\endcsname
\endgroup
\fi
}
% This is called on each entry in a list of floats. We're passed the
% xref label, in the form LABEL-title, which is how we save it in the
% aux file. We strip off the -title and look up \XRLABEL-lof, which
% has the text we're supposed to typeset here.
%
% Figures without xref labels will not be included in the list (since
% they won't appear in the aux file).
%
\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
\def\listoffloatsdoentry#1-title\finish{{%
% Can't fully expand XR#1-lof because it can contain anything. Just
% pass the control sequence. On the other hand, XR#1-pg is just the
% page number, and we want to fully expand that so we can get a link
% in pdf output.
\toksA = \expandafter{\csname XR#1-lof\endcsname}%
%
% use the same \entry macro we use to generate the TOC and index.
\edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
\writeentry
}}
\message{localization,}
% For single-language documents, @documentlanguage is usually given very
% early, just after @documentencoding. Single argument is the language
% (de) or locale (de_DE) abbreviation.
%
{
\catcode`\_ = \active
\globaldefs=1
\parseargdef\documentlanguage{\begingroup
\let_=\normalunderscore % normal _ character for filenames
\tex % read txi-??.tex file in plain TeX.
% Read the file by the name they passed if it exists.
\openin 1 txi-#1.tex
\ifeof 1
\documentlanguagetrywithoutunderscore{#1_\finish}%
\else
\globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
\endgroup % end raw TeX
\endgroup}
%
% If they passed de_DE, and txi-de_DE.tex doesn't exist,
% try txi-de.tex.
%
\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
\openin 1 txi-#1.tex
\ifeof 1
\errhelp = \nolanghelp
\errmessage{Cannot read language file txi-#1.tex}%
\else
\globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
}
}% end of special _ catcode
%
\newhelp\nolanghelp{The given language definition file cannot be found or
is empty. Maybe you need to install it? Putting it in the current
directory should work if nowhere else does.}
% This macro is called from txi-??.tex files; the first argument is the
% \language name to set (without the "\lang@" prefix), the second and
% third args are \{left,right}hyphenmin.
%
% The language names to pass are determined when the format is built.
% See the etex.log file created at that time, e.g.,
% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
%
% With TeX Live 2008, etex now includes hyphenation patterns for all
% available languages. This means we can support hyphenation in
% Texinfo, at least to some extent. (This still doesn't solve the
% accented characters problem.)
%
\catcode`@=11
\def\txisetlanguage#1#2#3{%
% do not set the language if the name is undefined in the current TeX.
\expandafter\ifx\csname lang@#1\endcsname \relax
\message{no patterns for #1}%
\else
\global\language = \csname lang@#1\endcsname
\fi
% but there is no harm in adjusting the hyphenmin values regardless.
\global\lefthyphenmin = #2\relax
\global\righthyphenmin = #3\relax
}
% Helpers for encodings.
% Set the catcode of characters 128 through 255 to the specified number.
%
\def\setnonasciicharscatcode#1{%
\count255=128
\loop\ifnum\count255<256
\global\catcode\count255=#1\relax
\advance\count255 by 1
\repeat
}
\def\setnonasciicharscatcodenonglobal#1{%
\count255=128
\loop\ifnum\count255<256
\catcode\count255=#1\relax
\advance\count255 by 1
\repeat
}
% @documentencoding sets the definition of non-ASCII characters
% according to the specified encoding.
%
\parseargdef\documentencoding{%
% Encoding being declared for the document.
\def\declaredencoding{\csname #1.enc\endcsname}%
%
% Supported encodings: names converted to tokens in order to be able
% to compare them with \ifx.
\def\ascii{\csname US-ASCII.enc\endcsname}%
\def\latnine{\csname ISO-8859-15.enc\endcsname}%
\def\latone{\csname ISO-8859-1.enc\endcsname}%
\def\lattwo{\csname ISO-8859-2.enc\endcsname}%
\def\utfeight{\csname UTF-8.enc\endcsname}%
%
\ifx \declaredencoding \ascii
\asciichardefs
%
\else \ifx \declaredencoding \lattwo
\setnonasciicharscatcode\active
\lattwochardefs
%
\else \ifx \declaredencoding \latone
\setnonasciicharscatcode\active
\latonechardefs
%
\else \ifx \declaredencoding \latnine
\setnonasciicharscatcode\active
\latninechardefs
%
\else \ifx \declaredencoding \utfeight
\setnonasciicharscatcode\active
\utfeightchardefs
%
\else
\message{Unknown document encoding #1, ignoring.}%
%
\fi % utfeight
\fi % latnine
\fi % latone
\fi % lattwo
\fi % ascii
}
% A message to be logged when using a character that isn't available
% the default font encoding (OT1).
%
\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
% Take account of \c (plain) vs. \, (Texinfo) difference.
\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
% First, make active non-ASCII characters in order for them to be
% correctly categorized when TeX reads the replacement text of
% macros containing the character definitions.
\setnonasciicharscatcode\active
%
% Latin1 (ISO-8859-1) character definitions.
\def\latonechardefs{%
\gdef^^a0{~}
\gdef^^a1{\exclamdown}
\gdef^^a2{\missingcharmsg{CENT SIGN}}
\gdef^^a3{{\pounds}}
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
\gdef^^a5{\missingcharmsg{YEN SIGN}}
\gdef^^a6{\missingcharmsg{BROKEN BAR}}
\gdef^^a7{\S}
\gdef^^a8{\"{}}
\gdef^^a9{\copyright}
\gdef^^aa{\ordf}
\gdef^^ab{\guillemetleft}
\gdef^^ac{$\lnot$}
\gdef^^ad{\-}
\gdef^^ae{\registeredsymbol}
\gdef^^af{\={}}
%
\gdef^^b0{\textdegree}
\gdef^^b1{$\pm$}
\gdef^^b2{$^2$}
\gdef^^b3{$^3$}
\gdef^^b4{\'{}}
\gdef^^b5{$\mu$}
\gdef^^b6{\P}
%
\gdef^^b7{$^.$}
\gdef^^b8{\cedilla\ }
\gdef^^b9{$^1$}
\gdef^^ba{\ordm}
%
\gdef^^bb{\guilletright}
\gdef^^bc{$1\over4$}
\gdef^^bd{$1\over2$}
\gdef^^be{$3\over4$}
\gdef^^bf{\questiondown}
%
\gdef^^c0{\`A}
\gdef^^c1{\'A}
\gdef^^c2{\^A}
\gdef^^c3{\~A}
\gdef^^c4{\"A}
\gdef^^c5{\ringaccent A}
\gdef^^c6{\AE}
\gdef^^c7{\cedilla C}
\gdef^^c8{\`E}
\gdef^^c9{\'E}
\gdef^^ca{\^E}
\gdef^^cb{\"E}
\gdef^^cc{\`I}
\gdef^^cd{\'I}
\gdef^^ce{\^I}
\gdef^^cf{\"I}
%
\gdef^^d0{\DH}
\gdef^^d1{\~N}
\gdef^^d2{\`O}
\gdef^^d3{\'O}
\gdef^^d4{\^O}
\gdef^^d5{\~O}
\gdef^^d6{\"O}
\gdef^^d7{$\times$}
\gdef^^d8{\O}
\gdef^^d9{\`U}
\gdef^^da{\'U}
\gdef^^db{\^U}
\gdef^^dc{\"U}
\gdef^^dd{\'Y}
\gdef^^de{\TH}
\gdef^^df{\ss}
%
\gdef^^e0{\`a}
\gdef^^e1{\'a}
\gdef^^e2{\^a}
\gdef^^e3{\~a}
\gdef^^e4{\"a}
\gdef^^e5{\ringaccent a}
\gdef^^e6{\ae}
\gdef^^e7{\cedilla c}
\gdef^^e8{\`e}
\gdef^^e9{\'e}
\gdef^^ea{\^e}
\gdef^^eb{\"e}
\gdef^^ec{\`{\dotless i}}
\gdef^^ed{\'{\dotless i}}
\gdef^^ee{\^{\dotless i}}
\gdef^^ef{\"{\dotless i}}
%
\gdef^^f0{\dh}
\gdef^^f1{\~n}
\gdef^^f2{\`o}
\gdef^^f3{\'o}
\gdef^^f4{\^o}
\gdef^^f5{\~o}
\gdef^^f6{\"o}
\gdef^^f7{$\div$}
\gdef^^f8{\o}
\gdef^^f9{\`u}
\gdef^^fa{\'u}
\gdef^^fb{\^u}
\gdef^^fc{\"u}
\gdef^^fd{\'y}
\gdef^^fe{\th}
\gdef^^ff{\"y}
}
% Latin9 (ISO-8859-15) encoding character definitions.
\def\latninechardefs{%
% Encoding is almost identical to Latin1.
\latonechardefs
%
\gdef^^a4{\euro}
\gdef^^a6{\v S}
\gdef^^a8{\v s}
\gdef^^b4{\v Z}
\gdef^^b8{\v z}
\gdef^^bc{\OE}
\gdef^^bd{\oe}
\gdef^^be{\"Y}
}
% Latin2 (ISO-8859-2) character definitions.
\def\lattwochardefs{%
\gdef^^a0{~}
\gdef^^a1{\ogonek{A}}
\gdef^^a2{\u{}}
\gdef^^a3{\L}
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
\gdef^^a5{\v L}
\gdef^^a6{\'S}
\gdef^^a7{\S}
\gdef^^a8{\"{}}
\gdef^^a9{\v S}
\gdef^^aa{\cedilla S}
\gdef^^ab{\v T}
\gdef^^ac{\'Z}
\gdef^^ad{\-}
\gdef^^ae{\v Z}
\gdef^^af{\dotaccent Z}
%
\gdef^^b0{\textdegree}
\gdef^^b1{\ogonek{a}}
\gdef^^b2{\ogonek{ }}
\gdef^^b3{\l}
\gdef^^b4{\'{}}
\gdef^^b5{\v l}
\gdef^^b6{\'s}
\gdef^^b7{\v{}}
\gdef^^b8{\cedilla\ }
\gdef^^b9{\v s}
\gdef^^ba{\cedilla s}
\gdef^^bb{\v t}
\gdef^^bc{\'z}
\gdef^^bd{\H{}}
\gdef^^be{\v z}
\gdef^^bf{\dotaccent z}
%
\gdef^^c0{\'R}
\gdef^^c1{\'A}
\gdef^^c2{\^A}
\gdef^^c3{\u A}
\gdef^^c4{\"A}
\gdef^^c5{\'L}
\gdef^^c6{\'C}
\gdef^^c7{\cedilla C}
\gdef^^c8{\v C}
\gdef^^c9{\'E}
\gdef^^ca{\ogonek{E}}
\gdef^^cb{\"E}
\gdef^^cc{\v E}
\gdef^^cd{\'I}
\gdef^^ce{\^I}
\gdef^^cf{\v D}
%
\gdef^^d0{\DH}
\gdef^^d1{\'N}
\gdef^^d2{\v N}
\gdef^^d3{\'O}
\gdef^^d4{\^O}
\gdef^^d5{\H O}
\gdef^^d6{\"O}
\gdef^^d7{$\times$}
\gdef^^d8{\v R}
\gdef^^d9{\ringaccent U}
\gdef^^da{\'U}
\gdef^^db{\H U}
\gdef^^dc{\"U}
\gdef^^dd{\'Y}
\gdef^^de{\cedilla T}
\gdef^^df{\ss}
%
\gdef^^e0{\'r}
\gdef^^e1{\'a}
\gdef^^e2{\^a}
\gdef^^e3{\u a}
\gdef^^e4{\"a}
\gdef^^e5{\'l}
\gdef^^e6{\'c}
\gdef^^e7{\cedilla c}
\gdef^^e8{\v c}
\gdef^^e9{\'e}
\gdef^^ea{\ogonek{e}}
\gdef^^eb{\"e}
\gdef^^ec{\v e}
\gdef^^ed{\'\i}
\gdef^^ee{\^\i}
\gdef^^ef{\v d}
%
\gdef^^f0{\dh}
\gdef^^f1{\'n}
\gdef^^f2{\v n}
\gdef^^f3{\'o}
\gdef^^f4{\^o}
\gdef^^f5{\H o}
\gdef^^f6{\"o}
\gdef^^f7{$\div$}
\gdef^^f8{\v r}
\gdef^^f9{\ringaccent u}
\gdef^^fa{\'u}
\gdef^^fb{\H u}
\gdef^^fc{\"u}
\gdef^^fd{\'y}
\gdef^^fe{\cedilla t}
\gdef^^ff{\dotaccent{}}
}
% UTF-8 character definitions.
%
% This code to support UTF-8 is based on LaTeX's utf8.def, with some
% changes for Texinfo conventions. It is included here under the GPL by
% permission from Frank Mittelbach and the LaTeX team.
%
\newcount\countUTFx
\newcount\countUTFy
\newcount\countUTFz
\gdef\UTFviiiTwoOctets#1#2{\expandafter
\UTFviiiDefined\csname u8:#1\string #2\endcsname}
%
\gdef\UTFviiiThreeOctets#1#2#3{\expandafter
\UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
%
\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
\UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
\gdef\UTFviiiDefined#1{%
\ifx #1\relax
\message{\linenumber Unicode char \string #1 not defined for Texinfo}%
\else
\expandafter #1%
\fi
}
\begingroup
\catcode`\~13
\catcode`\"12
\def\UTFviiiLoop{%
\global\catcode\countUTFx\active
\uccode`\~\countUTFx
\uppercase\expandafter{\UTFviiiTmp}%
\advance\countUTFx by 1
\ifnum\countUTFx < \countUTFy
\expandafter\UTFviiiLoop
\fi}
\countUTFx = "C2
\countUTFy = "E0
\def\UTFviiiTmp{%
\xdef~{\noexpand\UTFviiiTwoOctets\string~}}
\UTFviiiLoop
\countUTFx = "E0
\countUTFy = "F0
\def\UTFviiiTmp{%
\xdef~{\noexpand\UTFviiiThreeOctets\string~}}
\UTFviiiLoop
\countUTFx = "F0
\countUTFy = "F4
\def\UTFviiiTmp{%
\xdef~{\noexpand\UTFviiiFourOctets\string~}}
\UTFviiiLoop
\endgroup
\begingroup
\catcode`\"=12
\catcode`\<=12
\catcode`\.=12
\catcode`\,=12
\catcode`\;=12
\catcode`\!=12
\catcode`\~=13
\gdef\DeclareUnicodeCharacter#1#2{%
\countUTFz = "#1\relax
\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
\begingroup
\parseXMLCharref
\def\UTFviiiTwoOctets##1##2{%
\csname u8:##1\string ##2\endcsname}%
\def\UTFviiiThreeOctets##1##2##3{%
\csname u8:##1\string ##2\string ##3\endcsname}%
\def\UTFviiiFourOctets##1##2##3##4{%
\csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter
\gdef\UTFviiiTmp{#2}%
\endgroup}
\gdef\parseXMLCharref{%
\ifnum\countUTFz < "A0\relax
\errhelp = \EMsimple
\errmessage{Cannot define Unicode char value < 00A0}%
\else\ifnum\countUTFz < "800\relax
\parseUTFviiiA,%
\parseUTFviiiB C\UTFviiiTwoOctets.,%
\else\ifnum\countUTFz < "10000\relax
\parseUTFviiiA;%
\parseUTFviiiA,%
\parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
\else
\parseUTFviiiA;%
\parseUTFviiiA,%
\parseUTFviiiA!%
\parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
\fi\fi\fi
}
\gdef\parseUTFviiiA#1{%
\countUTFx = \countUTFz
\divide\countUTFz by 64
\countUTFy = \countUTFz
\multiply\countUTFz by 64
\advance\countUTFx by -\countUTFz
\advance\countUTFx by 128
\uccode `#1\countUTFx
\countUTFz = \countUTFy}
\gdef\parseUTFviiiB#1#2#3#4{%
\advance\countUTFz by "#10\relax
\uccode `#3\countUTFz
\uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
\endgroup
\def\utfeightchardefs{%
\DeclareUnicodeCharacter{00A0}{\tie}
\DeclareUnicodeCharacter{00A1}{\exclamdown}
\DeclareUnicodeCharacter{00A3}{\pounds}
\DeclareUnicodeCharacter{00A8}{\"{ }}
\DeclareUnicodeCharacter{00A9}{\copyright}
\DeclareUnicodeCharacter{00AA}{\ordf}
\DeclareUnicodeCharacter{00AB}{\guillemetleft}
\DeclareUnicodeCharacter{00AD}{\-}
\DeclareUnicodeCharacter{00AE}{\registeredsymbol}
\DeclareUnicodeCharacter{00AF}{\={ }}
\DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
\DeclareUnicodeCharacter{00B4}{\'{ }}
\DeclareUnicodeCharacter{00B8}{\cedilla{ }}
\DeclareUnicodeCharacter{00BA}{\ordm}
\DeclareUnicodeCharacter{00BB}{\guillemetright}
\DeclareUnicodeCharacter{00BF}{\questiondown}
\DeclareUnicodeCharacter{00C0}{\`A}
\DeclareUnicodeCharacter{00C1}{\'A}
\DeclareUnicodeCharacter{00C2}{\^A}
\DeclareUnicodeCharacter{00C3}{\~A}
\DeclareUnicodeCharacter{00C4}{\"A}
\DeclareUnicodeCharacter{00C5}{\AA}
\DeclareUnicodeCharacter{00C6}{\AE}
\DeclareUnicodeCharacter{00C7}{\cedilla{C}}
\DeclareUnicodeCharacter{00C8}{\`E}
\DeclareUnicodeCharacter{00C9}{\'E}
\DeclareUnicodeCharacter{00CA}{\^E}
\DeclareUnicodeCharacter{00CB}{\"E}
\DeclareUnicodeCharacter{00CC}{\`I}
\DeclareUnicodeCharacter{00CD}{\'I}
\DeclareUnicodeCharacter{00CE}{\^I}
\DeclareUnicodeCharacter{00CF}{\"I}
\DeclareUnicodeCharacter{00D0}{\DH}
\DeclareUnicodeCharacter{00D1}{\~N}
\DeclareUnicodeCharacter{00D2}{\`O}
\DeclareUnicodeCharacter{00D3}{\'O}
\DeclareUnicodeCharacter{00D4}{\^O}
\DeclareUnicodeCharacter{00D5}{\~O}
\DeclareUnicodeCharacter{00D6}{\"O}
\DeclareUnicodeCharacter{00D8}{\O}
\DeclareUnicodeCharacter{00D9}{\`U}
\DeclareUnicodeCharacter{00DA}{\'U}
\DeclareUnicodeCharacter{00DB}{\^U}
\DeclareUnicodeCharacter{00DC}{\"U}
\DeclareUnicodeCharacter{00DD}{\'Y}
\DeclareUnicodeCharacter{00DE}{\TH}
\DeclareUnicodeCharacter{00DF}{\ss}
\DeclareUnicodeCharacter{00E0}{\`a}
\DeclareUnicodeCharacter{00E1}{\'a}
\DeclareUnicodeCharacter{00E2}{\^a}
\DeclareUnicodeCharacter{00E3}{\~a}
\DeclareUnicodeCharacter{00E4}{\"a}
\DeclareUnicodeCharacter{00E5}{\aa}
\DeclareUnicodeCharacter{00E6}{\ae}
\DeclareUnicodeCharacter{00E7}{\cedilla{c}}
\DeclareUnicodeCharacter{00E8}{\`e}
\DeclareUnicodeCharacter{00E9}{\'e}
\DeclareUnicodeCharacter{00EA}{\^e}
\DeclareUnicodeCharacter{00EB}{\"e}
\DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
\DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
\DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
\DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
\DeclareUnicodeCharacter{00F0}{\dh}
\DeclareUnicodeCharacter{00F1}{\~n}
\DeclareUnicodeCharacter{00F2}{\`o}
\DeclareUnicodeCharacter{00F3}{\'o}
\DeclareUnicodeCharacter{00F4}{\^o}
\DeclareUnicodeCharacter{00F5}{\~o}
\DeclareUnicodeCharacter{00F6}{\"o}
\DeclareUnicodeCharacter{00F8}{\o}
\DeclareUnicodeCharacter{00F9}{\`u}
\DeclareUnicodeCharacter{00FA}{\'u}
\DeclareUnicodeCharacter{00FB}{\^u}
\DeclareUnicodeCharacter{00FC}{\"u}
\DeclareUnicodeCharacter{00FD}{\'y}
\DeclareUnicodeCharacter{00FE}{\th}
\DeclareUnicodeCharacter{00FF}{\"y}
\DeclareUnicodeCharacter{0100}{\=A}
\DeclareUnicodeCharacter{0101}{\=a}
\DeclareUnicodeCharacter{0102}{\u{A}}
\DeclareUnicodeCharacter{0103}{\u{a}}
\DeclareUnicodeCharacter{0104}{\ogonek{A}}
\DeclareUnicodeCharacter{0105}{\ogonek{a}}
\DeclareUnicodeCharacter{0106}{\'C}
\DeclareUnicodeCharacter{0107}{\'c}
\DeclareUnicodeCharacter{0108}{\^C}
\DeclareUnicodeCharacter{0109}{\^c}
\DeclareUnicodeCharacter{0118}{\ogonek{E}}
\DeclareUnicodeCharacter{0119}{\ogonek{e}}
\DeclareUnicodeCharacter{010A}{\dotaccent{C}}
\DeclareUnicodeCharacter{010B}{\dotaccent{c}}
\DeclareUnicodeCharacter{010C}{\v{C}}
\DeclareUnicodeCharacter{010D}{\v{c}}
\DeclareUnicodeCharacter{010E}{\v{D}}
\DeclareUnicodeCharacter{0112}{\=E}
\DeclareUnicodeCharacter{0113}{\=e}
\DeclareUnicodeCharacter{0114}{\u{E}}
\DeclareUnicodeCharacter{0115}{\u{e}}
\DeclareUnicodeCharacter{0116}{\dotaccent{E}}
\DeclareUnicodeCharacter{0117}{\dotaccent{e}}
\DeclareUnicodeCharacter{011A}{\v{E}}
\DeclareUnicodeCharacter{011B}{\v{e}}
\DeclareUnicodeCharacter{011C}{\^G}
\DeclareUnicodeCharacter{011D}{\^g}
\DeclareUnicodeCharacter{011E}{\u{G}}
\DeclareUnicodeCharacter{011F}{\u{g}}
\DeclareUnicodeCharacter{0120}{\dotaccent{G}}
\DeclareUnicodeCharacter{0121}{\dotaccent{g}}
\DeclareUnicodeCharacter{0124}{\^H}
\DeclareUnicodeCharacter{0125}{\^h}
\DeclareUnicodeCharacter{0128}{\~I}
\DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
\DeclareUnicodeCharacter{012A}{\=I}
\DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
\DeclareUnicodeCharacter{012C}{\u{I}}
\DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
\DeclareUnicodeCharacter{0130}{\dotaccent{I}}
\DeclareUnicodeCharacter{0131}{\dotless{i}}
\DeclareUnicodeCharacter{0132}{IJ}
\DeclareUnicodeCharacter{0133}{ij}
\DeclareUnicodeCharacter{0134}{\^J}
\DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
\DeclareUnicodeCharacter{0139}{\'L}
\DeclareUnicodeCharacter{013A}{\'l}
\DeclareUnicodeCharacter{0141}{\L}
\DeclareUnicodeCharacter{0142}{\l}
\DeclareUnicodeCharacter{0143}{\'N}
\DeclareUnicodeCharacter{0144}{\'n}
\DeclareUnicodeCharacter{0147}{\v{N}}
\DeclareUnicodeCharacter{0148}{\v{n}}
\DeclareUnicodeCharacter{014C}{\=O}
\DeclareUnicodeCharacter{014D}{\=o}
\DeclareUnicodeCharacter{014E}{\u{O}}
\DeclareUnicodeCharacter{014F}{\u{o}}
\DeclareUnicodeCharacter{0150}{\H{O}}
\DeclareUnicodeCharacter{0151}{\H{o}}
\DeclareUnicodeCharacter{0152}{\OE}
\DeclareUnicodeCharacter{0153}{\oe}
\DeclareUnicodeCharacter{0154}{\'R}
\DeclareUnicodeCharacter{0155}{\'r}
\DeclareUnicodeCharacter{0158}{\v{R}}
\DeclareUnicodeCharacter{0159}{\v{r}}
\DeclareUnicodeCharacter{015A}{\'S}
\DeclareUnicodeCharacter{015B}{\'s}
\DeclareUnicodeCharacter{015C}{\^S}
\DeclareUnicodeCharacter{015D}{\^s}
\DeclareUnicodeCharacter{015E}{\cedilla{S}}
\DeclareUnicodeCharacter{015F}{\cedilla{s}}
\DeclareUnicodeCharacter{0160}{\v{S}}
\DeclareUnicodeCharacter{0161}{\v{s}}
\DeclareUnicodeCharacter{0162}{\cedilla{t}}
\DeclareUnicodeCharacter{0163}{\cedilla{T}}
\DeclareUnicodeCharacter{0164}{\v{T}}
\DeclareUnicodeCharacter{0168}{\~U}
\DeclareUnicodeCharacter{0169}{\~u}
\DeclareUnicodeCharacter{016A}{\=U}
\DeclareUnicodeCharacter{016B}{\=u}
\DeclareUnicodeCharacter{016C}{\u{U}}
\DeclareUnicodeCharacter{016D}{\u{u}}
\DeclareUnicodeCharacter{016E}{\ringaccent{U}}
\DeclareUnicodeCharacter{016F}{\ringaccent{u}}
\DeclareUnicodeCharacter{0170}{\H{U}}
\DeclareUnicodeCharacter{0171}{\H{u}}
\DeclareUnicodeCharacter{0174}{\^W}
\DeclareUnicodeCharacter{0175}{\^w}
\DeclareUnicodeCharacter{0176}{\^Y}
\DeclareUnicodeCharacter{0177}{\^y}
\DeclareUnicodeCharacter{0178}{\"Y}
\DeclareUnicodeCharacter{0179}{\'Z}
\DeclareUnicodeCharacter{017A}{\'z}
\DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
\DeclareUnicodeCharacter{017C}{\dotaccent{z}}
\DeclareUnicodeCharacter{017D}{\v{Z}}
\DeclareUnicodeCharacter{017E}{\v{z}}
\DeclareUnicodeCharacter{01C4}{D\v{Z}}
\DeclareUnicodeCharacter{01C5}{D\v{z}}
\DeclareUnicodeCharacter{01C6}{d\v{z}}
\DeclareUnicodeCharacter{01C7}{LJ}
\DeclareUnicodeCharacter{01C8}{Lj}
\DeclareUnicodeCharacter{01C9}{lj}
\DeclareUnicodeCharacter{01CA}{NJ}
\DeclareUnicodeCharacter{01CB}{Nj}
\DeclareUnicodeCharacter{01CC}{nj}
\DeclareUnicodeCharacter{01CD}{\v{A}}
\DeclareUnicodeCharacter{01CE}{\v{a}}
\DeclareUnicodeCharacter{01CF}{\v{I}}
\DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
\DeclareUnicodeCharacter{01D1}{\v{O}}
\DeclareUnicodeCharacter{01D2}{\v{o}}
\DeclareUnicodeCharacter{01D3}{\v{U}}
\DeclareUnicodeCharacter{01D4}{\v{u}}
\DeclareUnicodeCharacter{01E2}{\={\AE}}
\DeclareUnicodeCharacter{01E3}{\={\ae}}
\DeclareUnicodeCharacter{01E6}{\v{G}}
\DeclareUnicodeCharacter{01E7}{\v{g}}
\DeclareUnicodeCharacter{01E8}{\v{K}}
\DeclareUnicodeCharacter{01E9}{\v{k}}
\DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
\DeclareUnicodeCharacter{01F1}{DZ}
\DeclareUnicodeCharacter{01F2}{Dz}
\DeclareUnicodeCharacter{01F3}{dz}
\DeclareUnicodeCharacter{01F4}{\'G}
\DeclareUnicodeCharacter{01F5}{\'g}
\DeclareUnicodeCharacter{01F8}{\`N}
\DeclareUnicodeCharacter{01F9}{\`n}
\DeclareUnicodeCharacter{01FC}{\'{\AE}}
\DeclareUnicodeCharacter{01FD}{\'{\ae}}
\DeclareUnicodeCharacter{01FE}{\'{\O}}
\DeclareUnicodeCharacter{01FF}{\'{\o}}
\DeclareUnicodeCharacter{021E}{\v{H}}
\DeclareUnicodeCharacter{021F}{\v{h}}
\DeclareUnicodeCharacter{0226}{\dotaccent{A}}
\DeclareUnicodeCharacter{0227}{\dotaccent{a}}
\DeclareUnicodeCharacter{0228}{\cedilla{E}}
\DeclareUnicodeCharacter{0229}{\cedilla{e}}
\DeclareUnicodeCharacter{022E}{\dotaccent{O}}
\DeclareUnicodeCharacter{022F}{\dotaccent{o}}
\DeclareUnicodeCharacter{0232}{\=Y}
\DeclareUnicodeCharacter{0233}{\=y}
\DeclareUnicodeCharacter{0237}{\dotless{j}}
\DeclareUnicodeCharacter{02DB}{\ogonek{ }}
\DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
\DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
\DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
\DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
\DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
\DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
\DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
\DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
\DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
\DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
\DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
\DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
\DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
\DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
\DeclareUnicodeCharacter{1E20}{\=G}
\DeclareUnicodeCharacter{1E21}{\=g}
\DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
\DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
\DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
\DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
\DeclareUnicodeCharacter{1E26}{\"H}
\DeclareUnicodeCharacter{1E27}{\"h}
\DeclareUnicodeCharacter{1E30}{\'K}
\DeclareUnicodeCharacter{1E31}{\'k}
\DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
\DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
\DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
\DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
\DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
\DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
\DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
\DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
\DeclareUnicodeCharacter{1E3E}{\'M}
\DeclareUnicodeCharacter{1E3F}{\'m}
\DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
\DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
\DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
\DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
\DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
\DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
\DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
\DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
\DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
\DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
\DeclareUnicodeCharacter{1E54}{\'P}
\DeclareUnicodeCharacter{1E55}{\'p}
\DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
\DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
\DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
\DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
\DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
\DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
\DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
\DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
\DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
\DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
\DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
\DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
\DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
\DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
\DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
\DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
\DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
\DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
\DeclareUnicodeCharacter{1E7C}{\~V}
\DeclareUnicodeCharacter{1E7D}{\~v}
\DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
\DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
\DeclareUnicodeCharacter{1E80}{\`W}
\DeclareUnicodeCharacter{1E81}{\`w}
\DeclareUnicodeCharacter{1E82}{\'W}
\DeclareUnicodeCharacter{1E83}{\'w}
\DeclareUnicodeCharacter{1E84}{\"W}
\DeclareUnicodeCharacter{1E85}{\"w}
\DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
\DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
\DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
\DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
\DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
\DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
\DeclareUnicodeCharacter{1E8C}{\"X}
\DeclareUnicodeCharacter{1E8D}{\"x}
\DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
\DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
\DeclareUnicodeCharacter{1E90}{\^Z}
\DeclareUnicodeCharacter{1E91}{\^z}
\DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
\DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
\DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
\DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
\DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
\DeclareUnicodeCharacter{1E97}{\"t}
\DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
\DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
\DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
\DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
\DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
\DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
\DeclareUnicodeCharacter{1EBC}{\~E}
\DeclareUnicodeCharacter{1EBD}{\~e}
\DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
\DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
\DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
\DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
\DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
\DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
\DeclareUnicodeCharacter{1EF2}{\`Y}
\DeclareUnicodeCharacter{1EF3}{\`y}
\DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
\DeclareUnicodeCharacter{1EF8}{\~Y}
\DeclareUnicodeCharacter{1EF9}{\~y}
\DeclareUnicodeCharacter{2013}{--}
\DeclareUnicodeCharacter{2014}{---}
\DeclareUnicodeCharacter{2018}{\quoteleft}
\DeclareUnicodeCharacter{2019}{\quoteright}
\DeclareUnicodeCharacter{201A}{\quotesinglbase}
\DeclareUnicodeCharacter{201C}{\quotedblleft}
\DeclareUnicodeCharacter{201D}{\quotedblright}
\DeclareUnicodeCharacter{201E}{\quotedblbase}
\DeclareUnicodeCharacter{2022}{\bullet}
\DeclareUnicodeCharacter{2026}{\dots}
\DeclareUnicodeCharacter{2039}{\guilsinglleft}
\DeclareUnicodeCharacter{203A}{\guilsinglright}
\DeclareUnicodeCharacter{20AC}{\euro}
\DeclareUnicodeCharacter{2192}{\expansion}
\DeclareUnicodeCharacter{21D2}{\result}
\DeclareUnicodeCharacter{2212}{\minus}
\DeclareUnicodeCharacter{2217}{\point}
\DeclareUnicodeCharacter{2261}{\equiv}
}% end of \utfeightchardefs
% US-ASCII character definitions.
\def\asciichardefs{% nothing need be done
\relax
}
% Make non-ASCII characters printable again for compatibility with
% existing Texinfo documents that may use them, even without declaring a
% document encoding.
%
\setnonasciicharscatcode \other
\message{formatting,}
\newdimen\defaultparindent \defaultparindent = 15pt
\chapheadingskip = 15pt plus 4pt minus 2pt
\secheadingskip = 12pt plus 3pt minus 2pt
\subsecheadingskip = 9pt plus 2pt minus 2pt
% Prevent underfull vbox error messages.
\vbadness = 10000
% Don't be so finicky about underfull hboxes, either.
\hbadness = 2000
% Following George Bush, get rid of widows and orphans.
\widowpenalty=10000
\clubpenalty=10000
% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
% using an old version of TeX, don't do anything. We want the amount of
% stretch added to depend on the line length, hence the dependence on
% \hsize. We call this whenever the paper size is set.
%
\def\setemergencystretch{%
\ifx\emergencystretch\thisisundefined
% Allow us to assign to \emergencystretch anyway.
\def\emergencystretch{\dimen0}%
\else
\emergencystretch = .15\hsize
\fi
}
% Parameters in order: 1) textheight; 2) textwidth;
% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
% 7) physical page height; 8) physical page width.
%
% We also call \setleading{\textleading}, so the caller should define
% \textleading. The caller should also set \parskip.
%
\def\internalpagesizes#1#2#3#4#5#6#7#8{%
\voffset = #3\relax
\topskip = #6\relax
\splittopskip = \topskip
%
\vsize = #1\relax
\advance\vsize by \topskip
\outervsize = \vsize
\advance\outervsize by 2\topandbottommargin
\pageheight = \vsize
%
\hsize = #2\relax
\outerhsize = \hsize
\advance\outerhsize by 0.5in
\pagewidth = \hsize
%
\normaloffset = #4\relax
\bindingoffset = #5\relax
%
\ifpdf
\pdfpageheight #7\relax
\pdfpagewidth #8\relax
% if we don't reset these, they will remain at "1 true in" of
% whatever layout pdftex was dumped with.
\pdfhorigin = 1 true in
\pdfvorigin = 1 true in
\fi
%
\setleading{\textleading}
%
\parindent = \defaultparindent
\setemergencystretch
}
% @letterpaper (the default).
\def\letterpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
\textleading = 13.2pt
%
% If page is nothing but text, make it come out even.
\internalpagesizes{607.2pt}{6in}% that's 46 lines
{\voffset}{.25in}%
{\bindingoffset}{36pt}%
{11in}{8.5in}%
}}
% Use @smallbook to reset parameters for 7x9.25 trim size.
\def\smallbook{{\globaldefs = 1
\parskip = 2pt plus 1pt
\textleading = 12pt
%
\internalpagesizes{7.5in}{5in}%
{-.2in}{0in}%
{\bindingoffset}{16pt}%
{9.25in}{7in}%
%
\lispnarrowing = 0.3in
\tolerance = 700
\hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = .5cm
}}
% Use @smallerbook to reset parameters for 6x9 trim size.
% (Just testing, parameters still in flux.)
\def\smallerbook{{\globaldefs = 1
\parskip = 1.5pt plus 1pt
\textleading = 12pt
%
\internalpagesizes{7.4in}{4.8in}%
{-.2in}{-.4in}%
{0pt}{14pt}%
{9in}{6in}%
%
\lispnarrowing = 0.25in
\tolerance = 700
\hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = .4cm
}}
% Use @afourpaper to print on European A4 paper.
\def\afourpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
\textleading = 13.2pt
%
% Double-side printing via postscript on Laserjet 4050
% prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
% To change the settings for a different printer or situation, adjust
% \normaloffset until the front-side and back-side texts align. Then
% do the same for \bindingoffset. You can set these for testing in
% your texinfo source file like this:
% @tex
% \global\normaloffset = -6mm
% \global\bindingoffset = 10mm
% @end tex
\internalpagesizes{673.2pt}{160mm}% that's 51 lines
{\voffset}{\hoffset}%
{\bindingoffset}{44pt}%
{297mm}{210mm}%
%
\tolerance = 700
\hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = 5mm
}}
% Use @afivepaper to print on European A5 paper.
% From romildo@urano.iceb.ufop.br, 2 July 2000.
% He also recommends making @example and @lisp be small.
\def\afivepaper{{\globaldefs = 1
\parskip = 2pt plus 1pt minus 0.1pt
\textleading = 12.5pt
%
\internalpagesizes{160mm}{120mm}%
{\voffset}{\hoffset}%
{\bindingoffset}{8pt}%
{210mm}{148mm}%
%
\lispnarrowing = 0.2in
\tolerance = 800
\hfuzz = 1.2pt
\contentsrightmargin = 0pt
\defbodyindent = 2mm
\tableindent = 12mm
}}
% A specific text layout, 24x15cm overall, intended for A4 paper.
\def\afourlatex{{\globaldefs = 1
\afourpaper
\internalpagesizes{237mm}{150mm}%
{\voffset}{4.6mm}%
{\bindingoffset}{7mm}%
{297mm}{210mm}%
%
% Must explicitly reset to 0 because we call \afourpaper.
\globaldefs = 0
}}
% Use @afourwide to print on A4 paper in landscape format.
\def\afourwide{{\globaldefs = 1
\afourpaper
\internalpagesizes{241mm}{165mm}%
{\voffset}{-2.95mm}%
{\bindingoffset}{7mm}%
{297mm}{210mm}%
\globaldefs = 0
}}
% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
% Perhaps we should allow setting the margins, \topskip, \parskip,
% and/or leading, also. Or perhaps we should compute them somehow.
%
\parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
\def\pagesizesyyy#1,#2,#3\finish{{%
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
\globaldefs = 1
%
\parskip = 3pt plus 2pt minus 1pt
\setleading{\textleading}%
%
\dimen0 = #1\relax
\advance\dimen0 by \voffset
%
\dimen2 = \hsize
\advance\dimen2 by \normaloffset
%
\internalpagesizes{#1}{\hsize}%
{\voffset}{\normaloffset}%
{\bindingoffset}{44pt}%
{\dimen0}{\dimen2}%
}}
% Set default to letter.
%
\letterpaper
\message{and turning on texinfo input format.}
% DEL is a comment character, in case @c does not suffice.
\catcode`\^^? = 14
% Define macros to output various characters with catcode for normal text.
\catcode`\"=\other
\catcode`\~=\other
\catcode`\^=\other
\catcode`\_=\other
\catcode`\|=\other
\catcode`\<=\other
\catcode`\>=\other
\catcode`\+=\other
\catcode`\$=\other
\def\normaldoublequote{"}
\def\normaltilde{~}
\def\normalcaret{^}
\def\normalunderscore{_}
\def\normalverticalbar{|}
\def\normalless{<}
\def\normalgreater{>}
\def\normalplus{+}
\def\normaldollar{$}%$ font-lock fix
% This macro is used to make a character print one way in \tt
% (where it can probably be output as-is), and another way in other fonts,
% where something hairier probably needs to be done.
%
% #1 is what to print if we are indeed using \tt; #2 is what to print
% otherwise. Since all the Computer Modern typewriter fonts have zero
% interword stretch (and shrink), and it is reasonable to expect all
% typewriter fonts to have this, we can check that font parameter.
%
\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
% Same as above, but check for italic font. Actually this also catches
% non-italic slanted fonts since it is impossible to distinguish them from
% italic fonts. But since this is only used by $ and it uses \sl anyway
% this is not a problem.
\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
% Turn off all special characters except @
% (and those which the user can use as if they were ordinary).
% Most of these we simply print from the \tt font, but for some, we can
% use math or other variants that look better in normal text.
\catcode`\"=\active
\def\activedoublequote{{\tt\char34}}
\let"=\activedoublequote
\catcode`\~=\active
\def~{{\tt\char126}}
\chardef\hat=`\^
\catcode`\^=\active
\def^{{\tt \hat}}
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
\let\realunder=_
% Subroutine for the previous macro.
\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
\catcode`\|=\active
\def|{{\tt\char124}}
\chardef \less=`\<
\catcode`\<=\active
\def<{{\tt \less}}
\chardef \gtr=`\>
\catcode`\>=\active
\def>{{\tt \gtr}}
\catcode`\+=\active
\def+{{\tt \char 43}}
\catcode`\$=\active
\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
% If a .fmt file is being used, characters that might appear in a file
% name cannot be active until we have parsed the command line.
% So turn them off again, and have \everyjob (or @setfilename) turn them on.
% \otherifyactive is called near the end of this file.
\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
% Used sometimes to turn off (effectively) the active characters even after
% parsing them.
\def\turnoffactive{%
\normalturnoffactive
\otherbackslash
}
\catcode`\@=0
% \backslashcurfont outputs one backslash character in current font,
% as in \char`\\.
\global\chardef\backslashcurfont=`\\
\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
% \realbackslash is an actual character `\' with catcode other, and
% \doublebackslash is two of them (for the pdf outlines).
{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
% In texinfo, backslash is an active character; it prints the backslash
% in fixed width font.
\catcode`\\=\active
@def@normalbackslash{{@tt@backslashcurfont}}
% On startup, @fixbackslash assigns:
% @let \ = @normalbackslash
% \rawbackslash defines an active \ to do \backslashcurfont.
% \otherbackslash defines an active \ to be a literal `\' character with
% catcode other.
@gdef@rawbackslash{@let\=@backslashcurfont}
@gdef@otherbackslash{@let\=@realbackslash}
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
% the literal character `\'.
%
@def@normalturnoffactive{%
@let\=@normalbackslash
@let"=@normaldoublequote
@let~=@normaltilde
@let^=@normalcaret
@let_=@normalunderscore
@let|=@normalverticalbar
@let<=@normalless
@let>=@normalgreater
@let+=@normalplus
@let$=@normaldollar %$ font-lock fix
@markupsetuplqdefault
@markupsetuprqdefault
@unsepspaces
}
% Make _ and + \other characters, temporarily.
% This is canceled by @fixbackslash.
@otherifyactive
% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
% That is what \eatinput is for; after that, the `\' should revert to printing
% a backslash.
%
@gdef@eatinput input texinfo{@fixbackslash}
@global@let\ = @eatinput
% On the other hand, perhaps the file did not have a `\input texinfo'. Then
% the first `\' in the file would cause an error. This macro tries to fix
% that, assuming it is called before the first `\' could plausibly occur.
% Also turn back on active characters that might appear in the input
% file name, in case not using a pre-dumped format.
%
@gdef@fixbackslash{%
@ifx\@eatinput @let\ = @normalbackslash @fi
@catcode`+=@active
@catcode`@_=@active
}
% Say @foo, not \foo, in error messages.
@escapechar = `@@
% These look ok in all fonts, so just make them not special.
@catcode`@& = @other
@catcode`@# = @other
@catcode`@% = @other
@c Finally, make ` and ' active, so that txicodequoteundirected and
@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
@c don't make ` and ' active, @code will not get them as active chars.
@c Do this last of all since we use ` in the previous @catcode assignments.
@catcode`@'=@active
@catcode`@`=@active
@markupsetuplqdefault
@markupsetuprqdefault
@c Local variables:
@c eval: (add-hook 'write-file-hooks 'time-stamp)
@c page-delimiter: "^\\\\message"
@c time-stamp-start: "def\\\\texinfoversion{"
@c time-stamp-format: "%:y-%02m-%02d.%02H"
@c time-stamp-end: "}"
@c End:
@c vim:sw=2:
@ignore
arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
@end ignore
CSSC-1.3.0/ChangeLog.2 0000644 0000000 0000000 00000232645 11362630513 011063 0000000 0000000 2001-11-23 james_youngman
* /cvsroot/cssc/gnu/CSSC/tests/prs/format.sh:
Initial version - qworks on Solaris SCCS, not on CSSC.
2001-09-29 james_youngman
* /cvsroot/cssc/gnu/CSSC/testutils/last-time.c, /cvsroot/cssc/gnu/CSSC/testutils/realpwd.cc, /cvsroot/cssc/gnu/CSSC/testutils/seeker.c, /cvsroot/cssc/gnu/CSSC/testutils/user.c, /cvsroot/cssc/gnu/CSSC/testutils/uu_decode.c, /cvsroot/cssc/gnu/CSSC/testutils/yammer.c, /cvsroot/cssc/gnu/CSSC/testutils/yes.c, /cvsroot/cssc/gnu/CSSC/unused/_chmod.cc, /cvsroot/cssc/gnu/CSSC/unused/dosfile.cc, /cvsroot/cssc/gnu/CSSC/unused/dummy.cc, /cvsroot/cssc/gnu/CSSC/unused/ffsync.cc, /cvsroot/cssc/gnu/CSSC/unused/fsync.cc, /cvsroot/cssc/gnu/CSSC/unused/pipe.cc, /cvsroot/cssc/gnu/CSSC/unused/pipe.h, /cvsroot/cssc/gnu/CSSC/unused/sid_list.cc, /cvsroot/cssc/gnu/CSSC/admin.cc, /cvsroot/cssc/gnu/CSSC/autogen.sh, /cvsroot/cssc/gnu/CSSC/bodyio.cc, /cvsroot/cssc/gnu/CSSC/bodyio.h, /cvsroot/cssc/gnu/CSSC/bsd/sccs.c, /cvsroot/cssc/gnu/CSSC/canonify.cc, /cvsroot/cssc/gnu/CSSC/cap.cc, /cvsroot/cssc/gnu/CSSC/cdc.cc, /cvsroot/cssc/gnu/CSSC/configure.in, /cvsroot/cssc/gnu/CSSC/cssc.h, /cvsroot/cssc/gnu/CSSC/defaults.h, /cvsroot/cssc/gnu/CSSC/delta.cc, /cvsroot/cssc/gnu/CSSC/delta.h, /cvsroot/cssc/gnu/CSSC/delta-iterator.cc, /cvsroot/cssc/gnu/CSSC/delta-iterator.h, /cvsroot/cssc/gnu/CSSC/delta-table.cc, /cvsroot/cssc/gnu/CSSC/delta-table.h, /cvsroot/cssc/gnu/CSSC/docs/gpl.texi, /cvsroot/cssc/gnu/CSSC/dtbl-prepend.cc, /cvsroot/cssc/gnu/CSSC/encoding.cc, /cvsroot/cssc/gnu/CSSC/environment.cc, /cvsroot/cssc/gnu/CSSC/err_no.h, /cvsroot/cssc/gnu/CSSC/except.h, /cvsroot/cssc/gnu/CSSC/fatalsig.cc, /cvsroot/cssc/gnu/CSSC/fdclosed.cc, /cvsroot/cssc/gnu/CSSC/file.cc, /cvsroot/cssc/gnu/CSSC/filediff.cc, /cvsroot/cssc/gnu/CSSC/filediff.h, /cvsroot/cssc/gnu/CSSC/file.h, /cvsroot/cssc/gnu/CSSC/fileiter.cc, /cvsroot/cssc/gnu/CSSC/fileiter.h, /cvsroot/cssc/gnu/CSSC/filelock.h, /cvsroot/cssc/gnu/CSSC/filepos.h, /cvsroot/cssc/gnu/CSSC/fnsplit.cc, /cvsroot/cssc/gnu/CSSC/get.cc, /cvsroot/cssc/gnu/CSSC/ioerr.h, /cvsroot/cssc/gnu/CSSC/linebuf.cc, /cvsroot/cssc/gnu/CSSC/linebuf.h, /cvsroot/cssc/gnu/CSSC/list.cc, /cvsroot/cssc/gnu/CSSC/l-split.cc, /cvsroot/cssc/gnu/CSSC/my-getopt.cc, /cvsroot/cssc/gnu/CSSC/my-getopt.h, /cvsroot/cssc/gnu/CSSC/mylist.h, /cvsroot/cssc/gnu/CSSC/mystring.cc, /cvsroot/cssc/gnu/CSSC/mystring.h, /cvsroot/cssc/gnu/CSSC/pf-add.cc, /cvsroot/cssc/gnu/CSSC/pf-del.cc, /cvsroot/cssc/gnu/CSSC/pfile.cc, /cvsroot/cssc/gnu/CSSC/pfile.h, /cvsroot/cssc/gnu/CSSC/prompt.cc, /cvsroot/cssc/gnu/CSSC/prs.cc, /cvsroot/cssc/gnu/CSSC/prt.cc, /cvsroot/cssc/gnu/CSSC/quit.cc, /cvsroot/cssc/gnu/CSSC/quit.h, /cvsroot/cssc/gnu/CSSC/release.h, /cvsroot/cssc/gnu/CSSC/rel_list.cc, /cvsroot/cssc/gnu/CSSC/rel_list.h, /cvsroot/cssc/gnu/CSSC/relvbr.h, /cvsroot/cssc/gnu/CSSC/rl-merge.cc, /cvsroot/cssc/gnu/CSSC/rmdel.cc, /cvsroot/cssc/gnu/CSSC/run.cc, /cvsroot/cssc/gnu/CSSC/run.h, /cvsroot/cssc/gnu/CSSC/sact.cc, /cvsroot/cssc/gnu/CSSC/sccsdate.cc, /cvsroot/cssc/gnu/CSSC/sccsdate.h, /cvsroot/cssc/gnu/CSSC/sccs-delta.cc, /cvsroot/cssc/gnu/CSSC/sccsfile.cc, /cvsroot/cssc/gnu/CSSC/sccsfile.h, /cvsroot/cssc/gnu/CSSC/sccsname.cc, /cvsroot/cssc/gnu/CSSC/sccsname.h, /cvsroot/cssc/gnu/CSSC/seqstate.cc, /cvsroot/cssc/gnu/CSSC/seqstate.h, /cvsroot/cssc/gnu/CSSC/sf-add.cc, /cvsroot/cssc/gnu/CSSC/sf-admin.cc, /cvsroot/cssc/gnu/CSSC/sf-cdc.cc, /cvsroot/cssc/gnu/CSSC/sf-chkid.cc, /cvsroot/cssc/gnu/CSSC/sf-chkmr.h, /cvsroot/cssc/gnu/CSSC/sf-delta.cc, /cvsroot/cssc/gnu/CSSC/sf-get2.cc, /cvsroot/cssc/gnu/CSSC/sf-get3.cc, /cvsroot/cssc/gnu/CSSC/sf-get.cc, /cvsroot/cssc/gnu/CSSC/sf-kw.cc, /cvsroot/cssc/gnu/CSSC/sf-prs.cc, /cvsroot/cssc/gnu/CSSC/sf-prt.cc, /cvsroot/cssc/gnu/CSSC/sf-rmdel.cc, /cvsroot/cssc/gnu/CSSC/sf-val.cc, /cvsroot/cssc/gnu/CSSC/sf-write.cc, /cvsroot/cssc/gnu/CSSC/showconfig.cc, /cvsroot/cssc/gnu/CSSC/show-disp.sh, /cvsroot/cssc/gnu/CSSC/sid.cc, /cvsroot/cssc/gnu/CSSC/sid.h, /cvsroot/cssc/gnu/CSSC/sid_list.h, /cvsroot/cssc/gnu/CSSC/sl-merge.h, /cvsroot/cssc/gnu/CSSC/split.cc, /cvsroot/cssc/gnu/CSSC/stack.h, /cvsroot/cssc/gnu/CSSC/strstr.c, /cvsroot/cssc/gnu/CSSC/sysdep.h, /cvsroot/cssc/gnu/CSSC/unget.cc, /cvsroot/cssc/gnu/CSSC/val.cc, /cvsroot/cssc/gnu/CSSC/valcodes.h, /cvsroot/cssc/gnu/CSSC/version.h, /cvsroot/cssc/gnu/CSSC/what.cc, /cvsroot/cssc/gnu/CSSC/writesubst.cc:
Updated copyright year and FSF address
2001-09-23 james_youngman
* /cvsroot/cssc/gnu/CSSC/configure.in:
Updated version number (to identify versions checked out from the CVS
repository).
* /cvsroot/cssc/gnu/CSSC/configure.in:
removed CVSDEVEL tag prior to release
* /cvsroot/cssc/gnu/CSSC/ChangeLog: updated from checkin messages
* /cvsroot/cssc/gnu/CSSC/NEWS: Brought up to date with recent changes.
* /cvsroot/cssc/gnu/CSSC/get.cc:
Give up privileges while manipulating the g-file, because the g-file
is owned by the euid of the process which invoked "get", not by the
set-user-id ownfer of the "get" file. This is related to Sourceforge
bug ID 458485.
* /cvsroot/cssc/gnu/CSSC/file.cc:
Minor correction to error message in set_file_mode() (don't have a
newline in the middle of it).
2001-09-23 james_youngman
* /cvsroot/cssc/gnu/CSSC/get.cc:
Give up privileges while manipulating the g-file, because the g-file
is owned by the euid of the process which invoked "get", not by the
set-user-id ownfer of the "get" file. This is related to Sourceforge
bug ID 458485.
* /cvsroot/cssc/gnu/CSSC/file.cc:
Minor correction to error message in set_file_mode() (don't have a
newline in the middle of it).
2001-09-16 james_youngman
* /cvsroot/cssc/gnu/CSSC/Makefile.am, /cvsroot/cssc/gnu/CSSC/pf-add.cc, /cvsroot/cssc/gnu/CSSC/pf-del.cc, /cvsroot/cssc/gnu/CSSC/pfile.h, /cvsroot/cssc/gnu/CSSC/sf-delta.cc, /cvsroot/cssc/gnu/CSSC/tests/rmdel/basic.sh, /cvsroot/cssc/gnu/CSSC/unget.cc:
Cope correctly in sccs_pfile::update() if there was no previously existing p-file
* /cvsroot/cssc/gnu/CSSC/pf-add.cc:
SF bug #444221: Create the p-file with mode 0644 (not 0666) but still allow concurrent edits
* /cvsroot/cssc/gnu/CSSC/docs/CREDITS, /cvsroot/cssc/gnu/CSSC/docs/CREDITS.short.txt:
(Credits for) patch to fix malloc()ed buffer size from Jeff Sheinberg
* /cvsroot/cssc/gnu/CSSC/bsd/sccs.c:
Patch to fix malloc()ed buffer size from Jeff Sheinberg
2001-08-30 james_youngman
* /cvsroot/cssc/gnu/CSSC/tests/binary/binbasic.sh:
Executables have different names under Windows.
2001-08-29 james_youngman
* /cvsroot/cssc/gnu/CSSC/testutils/decompress_stdin.sh.in:
Shell script which decompresses its input.
* /cvsroot/cssc/gnu/CSSC/tests/binary/eightbit.sh, /cvsroot/cssc/gnu/CSSC/tests/get/sf111140.sh, /cvsroot/cssc/gnu/CSSC/tests/get/sid-select.sh, /cvsroot/cssc/gnu/CSSC/tests/get/subst.sh, /cvsroot/cssc/gnu/CSSC/tests/prt/all-512.sh, /cvsroot/cssc/gnu/CSSC/tests/prt/default.sh, /cvsroot/cssc/gnu/CSSC/tests/prt/nodel.sh, /cvsroot/cssc/gnu/CSSC/autogen.sh, /cvsroot/cssc/gnu/CSSC/configure.in, /cvsroot/cssc/gnu/CSSC/cssc.h, /cvsroot/cssc/gnu/CSSC/docs/Platforms, /cvsroot/cssc/gnu/CSSC/docs/texinfo.tex, /cvsroot/cssc/gnu/CSSC/file.cc, /cvsroot/cssc/gnu/CSSC/file.h, /cvsroot/cssc/gnu/CSSC/get.cc, /cvsroot/cssc/gnu/CSSC/Makefile.am, /cvsroot/cssc/gnu/CSSC/README, /cvsroot/cssc/gnu/CSSC/sccsfile.cc, /cvsroot/cssc/gnu/CSSC/sccsfile.h, /cvsroot/cssc/gnu/CSSC/sf-add.cc, /cvsroot/cssc/gnu/CSSC/sf-admin.cc, /cvsroot/cssc/gnu/CSSC/sf-delta.cc, /cvsroot/cssc/gnu/CSSC/sf-rmdel.cc, /cvsroot/cssc/gnu/CSSC/sf-write.cc:
Changes to support CYGWIN (compiles and builds with B20.1).
* /cvsroot/cssc/gnu/CSSC/tests/bsd-sccs/driver-basic.sh:
Altered test case h1 to account for buffering differences on CYGWIN.
* /cvsroot/cssc/gnu/CSSC/testutils/uu_decode.c:
Changes for file format compatibility with uuencode.
* /cvsroot/cssc/gnu/CSSC/INSTALL:
Updated INSTALL file from automake distribution.
* /cvsroot/cssc/gnu/CSSC/missing, /cvsroot/cssc/gnu/CSSC/mkinstalldirs:
Updated the utilities which are distributed but come from the automake
distribytion (automake -a -c copies them in).
* /cvsroot/cssc/gnu/CSSC/COPYING:
Updated address of FSF from COPYING file in automake distribution.
2001-08-28 james_youngman
* /cvsroot/cssc/gnu/CSSC/testutils/Makefile.am, /cvsroot/cssc/gnu/CSSC/testutils/uu_decode.c:
Added uu_decode.c, replacing the system uudecode utility, since not all
systems have the latter.
2001-08-25 james_youngman
* /cvsroot/cssc/gnu/CSSC/docs/Platforms:
Added remarks about "printf" macro bug in glibc 2.2.3.
* /cvsroot/cssc/gnu/CSSC/unused/.cvsignore, /cvsroot/cssc/gnu/CSSC/bsd/.cvsignore, /cvsroot/cssc/gnu/CSSC/auxfiles/.cvsignore:
ignore Makefile.in
* /cvsroot/cssc/gnu/CSSC/.cvsignore, /cvsroot/cssc/gnu/CSSC/tests/.cvsignore, /cvsroot/cssc/gnu/CSSC/testutils/.cvsignore:
Added some .cvsignore files to reduce the noise in the output of the update command
* /cvsroot/cssc/gnu/CSSC/docs/.cvsignore, /cvsroot/cssc/gnu/CSSC/docs/Platforms, /cvsroot/cssc/gnu/CSSC/docs/URLs:
Added info about how to patch cssc.texi to format it with old versions of Makefinfo, for example on NetBSD
* /cvsroot/cssc/gnu/CSSC/acconfig.h, /cvsroot/cssc/gnu/CSSC/configure.in, /cvsroot/cssc/gnu/CSSC/Makefile.am, /cvsroot/cssc/gnu/CSSC/mystring.h:
Changes to permit compilation with GCC v3 and GLIBC 2.2.3
2001-08-18 james_youngman
* /cvsroot/cssc/gnu/CSSC/docs/mailing-list.txt:
Updated the installation instructions to bring them into line with the
actual method for subscribing to a Mailman mailng list.
2001-07-31 james_youngman
* /cvsroot/cssc/gnu/CSSC/docs/Platforms:
Added updated info about which versions of Red Hat Linux this has been
tested on.
* /cvsroot/cssc/gnu/CSSC/docs/cssc.texi, /cvsroot/cssc/gnu/CSSC/testutils/ekko.c, /cvsroot/cssc/gnu/CSSC/testutils/seeker.c, /cvsroot/cssc/gnu/CSSC/testutils/yammer.c, /cvsroot/cssc/gnu/CSSC/bsd/sccs.c, /cvsroot/cssc/gnu/CSSC/docs/Makefile.am, /cvsroot/cssc/gnu/CSSC/fatalsig.cc, /cvsroot/cssc/gnu/CSSC/file.cc, /cvsroot/cssc/gnu/CSSC/get.cc, /cvsroot/cssc/gnu/CSSC/Makefile.am, /cvsroot/cssc/gnu/CSSC/pfile.cc, /cvsroot/cssc/gnu/CSSC/quit.cc, /cvsroot/cssc/gnu/CSSC/quit.h, /cvsroot/cssc/gnu/CSSC/run.cc, /cvsroot/cssc/gnu/CSSC/sccsfile.h, /cvsroot/cssc/gnu/CSSC/sf-delta.cc, /cvsroot/cssc/gnu/CSSC/sf-get2.cc, /cvsroot/cssc/gnu/CSSC/sf-get.cc, /cvsroot/cssc/gnu/CSSC/sf-prs.cc, /cvsroot/cssc/gnu/CSSC/sf-write.cc, /cvsroot/cssc/gnu/CSSC/writesubst.cc:
Eliminated some compiler warnings (gcc version 2.96 2000073).
2001-07-15 james_youngman
* /cvsroot/cssc/gnu/CSSC/admin.cc, /cvsroot/cssc/gnu/CSSC/bodyio.cc, /cvsroot/cssc/gnu/CSSC/bsd/sccs.c, /cvsroot/cssc/gnu/CSSC/configure.in, /cvsroot/cssc/gnu/CSSC/cssc.h, /cvsroot/cssc/gnu/CSSC/defaults.h, /cvsroot/cssc/gnu/CSSC/docs/cssc.texi, /cvsroot/cssc/gnu/CSSC/environment.cc, /cvsroot/cssc/gnu/CSSC/file.cc, /cvsroot/cssc/gnu/CSSC/Makefile.am, /cvsroot/cssc/gnu/CSSC/NEWS, /cvsroot/cssc/gnu/CSSC/README, /cvsroot/cssc/gnu/CSSC/sf-delta.cc, /cvsroot/cssc/gnu/CSSC/showconfig.cc, /cvsroot/cssc/gnu/CSSC/tests/common/config-data, /cvsroot/cssc/gnu/CSSC/what.cc:
As well as allowing binary file support to be turned off and a maximum
line length setting to be used, allow these to be overridden with
environment vvariables.
* /cvsroot/cssc/gnu/CSSC/tests/get/included.sh:
SourceForge bug number 441423: on NetBSD-1.5W, the sed "a" command
appears to eat the newline. Hence we replace the old single-step sed
command above with a three-step approach which doesn't use "a".
* /cvsroot/cssc/gnu/CSSC/docs/cssc.texi:
Added sensible header to HTML output; indicate the version number in
the top node of the Info file.
2001-07-14 james_youngman
* /cvsroot/cssc/gnu/CSSC/docs/TODO:
Added all the tasks to the SourceForge task tracker (each task in the
TODO file is now annotated with its SourceForge task ID).
* /cvsroot/cssc/gnu/CSSC/NEWS:
Added SourceForge bug id for the concurrent-edit problem.
* /cvsroot/cssc/gnu/CSSC/ChangeLog:
Updated wrt newest checking comments.
* /cvsroot/cssc/gnu/CSSC/README: Add remark about "--disable-binary".
* /cvsroot/cssc/gnu/CSSC/acconfig.h, /cvsroot/cssc/gnu/CSSC/admin.cc, /cvsroot/cssc/gnu/CSSC/auxfiles/CSSC.spec.in, /cvsroot/cssc/gnu/CSSC/bodyio.cc, /cvsroot/cssc/gnu/CSSC/docs/config-info.texi.in, /cvsroot/cssc/gnu/CSSC/docs/cssc.texi, /cvsroot/cssc/gnu/CSSC/docs/Makefile.am, /cvsroot/cssc/gnu/CSSC/Makefile.am, /cvsroot/cssc/gnu/CSSC/NEWS, /cvsroot/cssc/gnu/CSSC/README, /cvsroot/cssc/gnu/CSSC/sf-delta.cc, /cvsroot/cssc/gnu/CSSC/sf-get2.cc, /cvsroot/cssc/gnu/CSSC/showconfig.cc, /cvsroot/cssc/gnu/CSSC/tests/binary/auto.sh, /cvsroot/cssc/gnu/CSSC/tests/binary/binbasic.sh, /cvsroot/cssc/gnu/CSSC/tests/binary/diff.sh, /cvsroot/cssc/gnu/CSSC/tests/binary/eightbit.sh, /cvsroot/cssc/gnu/CSSC/tests/binary/seeking.sh, /cvsroot/cssc/gnu/CSSC/tests/common/config-data, /cvsroot/cssc/gnu/CSSC/val.cc, /cvsroot/cssc/gnu/CSSC/version.h:
Provide new configure option, --disable-binary, which removes support
for creating binary SCCS files. If we find an existing binary SCCS file,
we can still work with it. Also allow the setting of a maximum line length
in order to provide better interoperability with other SCCS implementations.
* /cvsroot/cssc/gnu/CSSC/configure.in:
Allow the disabling of binary file support and the setting of a maximum
SCCS file line length (for interoperability).
2001-07-10 james_youngman
* /cvsroot/cssc/gnu/CSSC/get.cc, /cvsroot/cssc/gnu/CSSC/sccsfile.h, /cvsroot/cssc/gnu/CSSC/sf-get2.cc:
SourceForge bug 439146: concurrent edits cause assert failure
First cut at solving the problem.
* /cvsroot/cssc/gnu/CSSC/cdc.cc, /cvsroot/cssc/gnu/CSSC/delta.cc, /cvsroot/cssc/gnu/CSSC/get.cc, /cvsroot/cssc/gnu/CSSC/pf-del.cc, /cvsroot/cssc/gnu/CSSC/prs.cc, /cvsroot/cssc/gnu/CSSC/rmdel.cc, /cvsroot/cssc/gnu/CSSC/sccsfile.cc, /cvsroot/cssc/gnu/CSSC/sccsname.h, /cvsroot/cssc/gnu/CSSC/sf-admin.cc, /cvsroot/cssc/gnu/CSSC/sf-delta.cc, /cvsroot/cssc/gnu/CSSC/unget.cc, /cvsroot/cssc/gnu/CSSC/val.cc:
Various changes relating to correct NULL pointer 'spelling', in the
interests of greater portability.
2001-07-08 james_youngman
* /cvsroot/cssc/gnu/CSSC/ChangeLog, /cvsroot/cssc/gnu/CSSC/NEWS:
Updated ChangeLog and NEWS files prior to release.
* /cvsroot/cssc/gnu/CSSC/configure.in: Bumped version to 0.12alpha.pl0.
2001-07-06 james_youngman
* sid_list.h:
Source forge bug #438857; coredump if a range list has an empty element (e.g.
a comma at the end or two commas in a row).
2001-06-26 james_youngman
* docs/cssc.texi: Minor formatting changes
2001-06-03 james_youngman
* tests/get/s.incl_excl_1.input:
SourceForge BUG 417990: s.incl_excl_1.input missing from CVS.
2000-12-03 james_youngman
* README:
We now provide "val". Also include note about unsetting ${sccs}
before running the test suite.
* NEWS: Added further info about more additions & bugfixes
* tests/get/excl_ig_1.sh:
Added extra test script; one of the tests fails on CSSC but is currently commented out
* docs/borrowed-files.txt: Added list of files sourced from elsewhere
* docs/TODO: Reconsidered some decisions.
* sf-get.cc:
Removed redundant "0 ||" expression in if statement (leftover from debugging)
* install-sh, missing, mkinstalldirs:
Updated various scripts used bu the automake/autoconf stuff with the
latest versions of those files as obtained from the Automake
distribution.
* tests/get/s.incl_excl_1: New file.
2000-12-02 james_youngman
* ChangeLog:
Updated ChangeLog from CVS repository, including the latest checkin
comments.
2000-11-26 James Youngman
* /cvsroot/cssc/gnu/CSSC/sccsname.cc, /cvsroot/cssc/gnu/CSSC/cap.cc, /cvsroot/cssc/gnu/CSSC/delta-iterator.cc, /cvsroot/cssc/gnu/CSSC/fdclosed.cc, /cvsroot/cssc/gnu/CSSC/my-getopt.cc, /cvsroot/cssc/gnu/CSSC/sid_list.h, /cvsroot/cssc/gnu/CSSC/stack.h:
Partial fix for SF bug #123246 (GCC-specific assumptions + typos)
2000-11-19 James Youngman
* /cvsroot/cssc/gnu/CSSC/seqstate.cc, /cvsroot/cssc/gnu/CSSC/seqstate.h, /cvsroot/cssc/gnu/CSSC/sf-get.cc, /cvsroot/cssc/gnu/CSSC/tests/get/sf111140.sh, /cvsroot/cssc/gnu/CSSC/tests/get/sf111140.wtd, /cvsroot/cssc/gnu/CSSC/tests/get/sf111140_testcase.uue, /cvsroot/cssc/gnu/CSSC/testutils/compare_gets.sh, /cvsroot/cssc/gnu/CSSC/testutils/mogrify.awk, /cvsroot/cssc/gnu/CSSC/NEWS:
Fix for long-standing bug: we now can correctly extract
files containing deltas which include other deltas with
the ^Ai construct (e.g. branch merges). We may still not
handle "get -i" correctly yet though. Also, no similar
fix for the excluded delta situation (I have no example
file demonstrating that problem). This is recorded as
SourceForge bug 111140. A test for this bug is also now
included.
* /cvsroot/cssc/gnu/CSSC/docs/cssc.texi, /cvsroot/cssc/gnu/CSSC/bsd/COPYING.bsd:
Updated BSD license & documentation to remove advertising clause
* /cvsroot/cssc/gnu/CSSC/unused/configs/README:
Include README file to explain the contents of the directory
* /cvsroot/cssc/gnu/CSSC/docs/patches.txt:
Indicate that patches can be submitted via the SourceForge Patch Manager.
* /cvsroot/cssc/gnu/CSSC/configure.in:
A test commit, changing the suffix on the version number (to emphasise
the fact that it's the CVS code). Real purpose is to test the CVS checkin
notification facility.
2000-11-12 James Youngman
* /cvsroot/cssc/gnu/CSSC/fatalsig.cc:
Added new file to resolve Sourceforge bug 110909.
* /cvsroot/cssc/gnu/CSSC/Makefile.am, /cvsroot/cssc/gnu/CSSC/configure.in, /cvsroot/cssc/gnu/CSSC/quit.cc, /cvsroot/cssc/gnu/CSSC/quit.h:
Delete the z-file when we get a fatal signal (fix for Sourceforge
bug number 110909).
* /cvsroot/cssc/gnu/CSSC/sf-get2.cc: Fixed bug 110537.
2000-11-05 James Youngman
* /cvsroot/cssc/gnu/CSSC/fileiter.cc:
Fixed SourceForge bug 121605 (coredump when fileiter is passed a directory
name ending in a slash).
* /cvsroot/cssc/gnu/CSSC/tests/admin/locks.sh:
Test case covering SourceForge bug 111140 (admin -dla coredumps).
* /cvsroot/cssc/gnu/CSSC/rel_list.cc, /cvsroot/cssc/gnu/CSSC/sf-admin.cc, /cvsroot/cssc/gnu/CSSC/sf-write.cc:
Fixed SourceForge bug #121599: "admin -dla" crashes
2000-09-17 James Youngman
* /cvsroot/cssc/gnu/CSSC/show-disp.sh:
Removed spurious extra newlines (I wonder when they started appearing?)
2000-08-05 James Youngman
* /cvsroot/cssc/gnu/CSSC/show-disp.sh:
Updated copyright year and added ID header comment.
* /cvsroot/cssc/gnu/CSSC/show-disp.sh:
Use the -z3 option to compress data for "cvs status" because we have a
long link with low bandwidth, often. However, we don't use -z9
because that would be worse for faster links.
* /cvsroot/cssc/gnu/CSSC/NEWS, /cvsroot/cssc/gnu/CSSC/configure.in:
Added in information about recent changes.
* /cvsroot/cssc/gnu/CSSC/docs/cssc.texi:
Resolved conflict on line containing the URL of the CSSC bug reporting page.
* /cvsroot/cssc/gnu/CSSC/tests/get/sid-select2.sh:
Added test case for [ Bug #110537 ] Invalid SID got in branch where Rtrunk
greater than Rbranch
2000-08-04 James Youngman
* /cvsroot/cssc/gnu/CSSC/show-disp.sh:
Cope with CVS servers as well as local filesystem CVSROOTs.
2000-08-03 James Youngman
* /cvsroot/cssc/gnu/CSSC/docs/cssc.texi, /cvsroot/cssc/gnu/CSSC/README, /cvsroot/cssc/gnu/CSSC/docs/BUGS:
Fixed some incorrect SourceForge URLs.
* /cvsroot/cssc/gnu/CSSC/docs/CREDITS: Corrected some spelling errors.
2000-07-18 James Youngman
* /cvsroot/cssc/gnu/CSSC/Makefile.am: Added relvbr.h to noinst_HEADERS.
* /cvsroot/cssc/gnu/CSSC/docs/cssc.texi:
Updated with details of the web site and changed the bug-reporting
procedure.
* /cvsroot/cssc/gnu/CSSC/ChangeLog:
Brought into line with recent changes.
* /cvsroot/cssc/gnu/CSSC/auxfiles/CSSC.spec.in: Updated the URL.
* /cvsroot/cssc/gnu/CSSC/docs/BUGS:
Refer to the bug tracking system at SourceForge.
* /cvsroot/cssc/gnu/CSSC/AUTHORS:
Inserted reference to file docs/CREDITS in the "AUTHORS" file.
* /cvsroot/cssc/gnu/CSSC/README:
Added information about SourceForge to the README.
* /cvsroot/cssc/gnu/CSSC/configure.in: Bumped the patchlevel.
* /cvsroot/cssc/gnu/CSSC/NEWS, /cvsroot/cssc/gnu/CSSC/docs/CREDITS.short.txt, /cvsroot/cssc/gnu/CSSC/docs/CREDITS:
Brought into line with recent changes.
* /cvsroot/cssc/gnu/CSSC/bsd/sccs.c:
Patch from Albert John FitzPatrick III ;
Added support for "unget".
* /cvsroot/cssc/gnu/CSSC/delta.cc:
Accept list of MRs on input even if the input is not a TTY since
allegedly other implementations do this.
2000-03-19 James Youngman
* tests/get/subst.sh, sf-get2.cc, sid.cc, sid.h:
Patches from Mark Fortescue relating to SID selection and cutoff dates.
* relvbr.h:
Removed remarks about MySC, since this file has never been part of MySC.
* relvbr.h: Fix by Mark Fortescue .
* rmdel.cc, cdc.cc: Fix from Frank van Maarseveen :
A setuid cdc/rmdel will not unlock (i.e. remove the z-file) in
case of an error. Most obvious error is when the invoker is not
the creator of the delta.
Both cdc and rmdel revoke setuid permission when the real user
is not the creator of the delta. However, this should be restored
_before_ reaching the end of the 'try' scope because on leaving
it the z-file is removed indirectly by the sccs_file destructor.
Attached you will find a patch which solves this problem.
A more correct solution would be not to swap uid/euid but
to print something like:
ERROR [/usr/src/xxx/SCCS/s.main.c]:
Must be owner of file or to use this command.(rc4)
* docs/cssc.texi:
Support for SCCS files in which timestamps have been corrupted by
non-Y2K-compliant versions of SCCS. These files are correctly
understood on reading, and are fixed if the file is ever re-written by
CSSC. (The Sun version of SCCS also performs the same fix). Patches
to do this were provided by Peter Kjellerstedt
* delta-table.cc, delta-table.h, sf-get2.cc:
Sergey Ostashenko provided patches to allow the processing of SCCS
files with gaps in the chain of used sequence numbers, and to allow
two deltas to have the same sequence number, on the condition that one
of them is a removed delta.
* sccsdate.cc:
Patch by Peter Kjellerstedt for cleaning up after broken versions of
SCCS.
Some non y2k-compliant versions of SCCS will use a ":" in the decade
field of the date in the year 2000 (since the ASCII code for ':' is
one greater than that for '0'). Changed the relevant sccs_date
constructor to figure out the right value in this case. A warning
message is issued when this happens.
* tests/bsd-sccs/driver-basic.sh, tests/cdc/2comment.sh, tests/cdc/4order.sh, tests/delta/basic2.sh, tests/delta/ignored.sh, tests/delta/iterbasic.sh, tests/get/annotate.sh, tests/get/create.sh, tests/get/doubleinc.sh, testutils/lndir.c, testutils/seeker.c, docs/BUGS, docs/CREDITS, docs/CREDITS.short.txt, docs/FIXED, docs/Platforms, docs/cssc.texi, bsd/sccs.c, run.cc, sccsfile.cc, sccsfile.h, sccsname.h, seqstate.cc, seqstate.h, sf-delta.cc, sf-get.cc, sf-get2.cc, sf-get3.cc, sf-prs.cc, val.cc, visibility.cc, ChangeLog, Makefile.am, NEWS, configure.in, file.cc, linebuf.cc, quit.cc:
Reverted trunk files to same contents as 0.11 patchlevel 3.
1999-12-09 Mark Fortescue
* relvbr.h, sf-get2.cc, sid.cc, sid.h
Fixed a problem with branching
* sf-get2.cc, tests/get/subst.sh
Fixed a problem with Cutoff Dates
1999-06-27 James Youngman
* quit.cc, sccsfile.cc, file.cc:
Improved the error message which is issued when you try to open a
nonexistent SCCS file.
* docs/CREDITS, docs/CREDITS.short.txt, docs/Platforms:
Bugfixes from Hyman Rosen and Mark Reynolds
* sf-get.cc:
Mark Reynolds : GCC 2.8.1 on VAX Ultrix 4.2 doesn't
seem to get this call right. Since subst_fn is always write_subst
anyway, we work around it by using the function pointer just as a
boolean variable. Yeuch.
* bsd/sccs.c:
Mark Reynolds : If $LANG is not set, setlocale()
fails on VAX Ultrix 4.2.
1999-06-26 James Youngman
* tests/admin/lockfail.sh:
Fail correctly, but don't coredump, when we fail to create a lock file.
Bug report by Michael Ubell .
* tests/admin/lockfail.sh: New file.
* file.cc, sccsname.h:
Fail correctly, but don't coredump, when we fail to create a lock file.
Bug report by Michael Ubell .
* run.cc: Fixed typos.
* tests/cdc/2comment.sh, tests/cdc/4order.sh:
Use egrep, not grep, because on SunOS 4.1.3, grep(1) doesn't like the
long regexps...
* run.cc: SunOS 4.1.3 doesn't like fflush(NULL). (Mark Reynolds)
* testutils/seeker.c, testutils/lndir.c:
Vax Ultrix 4.2 requires . (Mark Reynolds)
* sccsfile.cc: Compatibility fixes provided by Hyman Rosen.
* val.cc: Fixed the name of the executable passed to set_prg_name().
1999-04-21 James Youngman
* ChangeLog: Added changes to date.
* docs/Makefile.am: Added texinfo.tex to the distribution.
* configure.in, sccsfile.cc, sf-delta.cc, sf-get.cc, sf-get2.cc, sf-get3.cc, sf-prs.cc, sf-prt.cc, sf-rmdel.cc, NEWS:
Removed some dead code.
* seqstate.h, seqstate.cc: Removed dependency on the STL header.
1999-04-18 James Youngman
* docs/texinfo.tex: Automake likes texinfo.tex to be present.
* delta.h, dtbl-prepend.cc, fileiter.h, prs.cc, prt.cc,
rel_list.cc, rel_list.h, rl-merge.cc, rmdel.cc, run.h, sact.cc,
seqstate.cc, seqstate.h, sf-cdc.cc, sf-chkmr.h, sf-get.cc,
sf-get3.cc, sf-prs.cc, sf-prt.cc, sf-rmdel.cc, sf-write.cc,
unget.cc, ChangeLog, delta-table.cc, delta-table.h: Updated
copyright statements for those files modified this weekend.
* configure.in:
Commented out AM_PROG_INSTALL, since automake seems not to like it
any more.
* tests/bsd-sccs/driver-basic.sh:
Disable test h2, since currently we don't pass it. FIXME!
* tests/rmdel/basic.sh: *** empty log message ***
* tests/bsd-sccs/driver-basic.sh:
Added test for "sccs unedit" ensuring we delete the gotten file.
* docs/Platforms, docs/TODO, auxfiles/CSSC.spec.in:
*** empty log message ***
* pfile.cc, pfile.h, prs.cc, prt.cc, quit.cc, rel_list.cc,
rel_list.h, rl-merge.cc, rmdel.cc, run.cc, run.h, sact.cc,
sccsfile.cc, sccsfile.h, seqstate.cc, seqstate.h, sf-admin.cc,
sf-cdc.cc, sf-chkmr.h, sf-delta.cc, sf-get.cc, sf-get2.cc,
sf-get3.cc, sf-prs.cc, sf-prt.cc, sf-rmdel.cc, sf-write.cc,
unget.cc, admin.cc, cdc.cc, delta-table.cc, delta-table.h,
delta.cc, delta.h, dtbl-prepend.cc, fileiter.h, get.cc,
l-split.cc, list.cc, mylist.h, mystring.h: Changes for correct
support of included deltas in branches (a rewrite of seqstate.cc
and seqstate.h).
* tests/get/included.sh:
Enable the test, now that we support included non-ancestor branches.
* NEWS, README, configure.in: Updates for 0.11alpha.pl0
* docs/cssc.texi: Updated version for next release.
* docs/BUGS: Added bug report for "unget" deleting the wrong g-file.
* bsd/sccs.c: Use tmpfile() rather than mktemp() in unget(), because
glibc-2.1-0.990311 has a broken mktemp() (it returns an empty string).
1999-03-29 James Youngman
* tests/get/included.sh: Tests for included deltas.
1999-03-21 James Youngman
* Released 0.10beta.pl1.
* docs/cssc.texi: Updated version for release.
* docs/CREDITS.short.txt:
File containing brief list of people who have contributed to CSSC.
* docs/CREDITS: Added relevant people.
* configure.in: Bumped version to 0.10beta.pl1
* auxfiles/CSSC.spec.in:
Folded in change from Michael Sterrett and Aron
Griffis which puts symlinks in /usr/bin (or
whatever directory), pointing at the stuff in /usr/libexec/cssc.
The effect is to have /usr/bin/get and so on.
* bsd/sccs.c:
Applied patch from Greg A. Woods which eliminates compiler warnings
from sccs.c, without changing how the program works (I hope!).
* docs/Platforms: Updated with respect to C++ compiler compatibility.
* configure.in: Moved version.cc to the front of the AC_OUTPUT() list.
* run.cc: Modification from Greg A. Woods; eliminates compiler warning.
* docs/cssc.texi: Minor corrections (typos, etc).
* testutils/README:
Minor tweak suggested by Greg A. Woods (specify UTC in time)
1999-03-20 James Youngman
* Released 0.10beta.pl0.
* docs/cssc.texi: Updated version number.
* bsd/sccs.c, docs/cssc.texi, delta.cc, configure.in:
Updated copyright messages of those files edited so far in 1999.
* tests/prs/keywords.sh: Use "echo_nonl" instead of "echo -n".
* configure.in, ChangeLog, NEWS: Go to 0.10beta-pl0 from 0.09alpha-pl4.
* docs/cssc.texi:
Cosmetic changes to make texinfo-3.12f happy about my use of @xref.
(in this case, by adding punctuation after each use).
1999-03-19 James Youngman
* testutils/realpwd.cc, sf-delta.cc, sf-get2.cc, sid.cc, what.cc, bodyio.cc, cdc.cc, delta-iterator.cc, my-getopt.cc, mystring.cc, mystring.h, pfile.h, quit.cc, quit.h, run.cc:
Fixes to make CSSC compiler under the EPC C++ compiler (and probably
other C++ compilers, too).
1999-03-15 James Youngman
* Released 0.09alpha.pl4.
* ChangeLog, NEWS, configure.in: Comments etc. for 0.09alpha.pl4.
* docs/cssc.texi: Marginally improved documentation for "delta -p"
* bsd/sccs.c: Fixed "sccs sccsdiff". Bug reported by Achim Hoffmann.
1999-03-14 James Youngman
* docs/cssc.texi, ChangeLog, delta.cc, sccsfile.h, sf-delta.cc:
Implemented the -p option of delta.
* docs/TODO:
Added tests to make sure we correctly count the number of lines initially inserted by admin -i.
* bsd/sccs.c: Tweaks to execv() usage in try_to_exec().
Also, ensure that PREFIX is absolute, and refuse to run otherwise.
* configure.in: Eliminate duplicate checks for abort() and wait().
* auxfiles/CSSC.spec.in: Corrected the URL.
* tests/delta/n-option.sh: Added tests for the -n option of delta.
* tests/admin/i-option.sh:
Check that the "initial number of lines" is correct for admin -i.
1999-03-13 James Youngman
* configure.in: Bumped to 0.09alpha.pl3.
* NEWS: Added NEWS remark regarding the removal of AC_C_CONST.
* tests/admin/r-option.sh: val has now been implemented.
* docs/TODO, docs/cssc.texi, docs/missing.txt, sccsfile.cc, sccsfile.h, sf-admin.cc, sf-delta.cc, what.cc, NEWS, admin.cc, configure.in, file.cc, get.cc, pfile.cc, quit.cc, run.cc:
Allow "admin -ifoo -r1.2.2.1 s.foo", and make it work correctly.
Also added tests for the -r option.
* tests/admin/init-mr.sh: Corrected an error message.
1998-12-12 James Youngman
* docs/cssc.texi:
Warn that "admin -z" may silently fix errors and get it wrong.
* val.cc, sf-val.cc, sf-write.cc, quit.cc, quit.h, sccsfile.cc, except.h, file.cc, get.cc, bodyio.cc, delta-table.cc:
Enhancements to "val".
1998-12-10 James Youngman
* configure.in: Went to 0.09alpha.pl2.
1998-12-09 James Youngman
* NEWS: Added news for CSSC-0.09alpha-pl2.
* sccsfile.h:
Added declarations of functions implemented in sf-val.cc and also a
forward declaration of class delta_iterator.
* what.cc: Duh. getchar() returns int, remember?
* sf-prt.cc:
If a (mystring*) flag in the SCCS file is not NULL, then the flag must
be set even if the length of the string is zero; consider lines like
"^Af v" rather than "^A f v ".
* sid.h, sid.cc: Implemented sid::as_string().
* sccsfile.cc:
We have to be careful to not crash on input lines like "^Af v". That
is, bufchar(4) may well be zero for a flag line! Thanks to William
W. Austin for this diagnosis.
* sf-val.cc:
Traverse the delta table checking some things. Not finished yet.
1998-11-29 James Youngman
* docs/cssc.texi, docs/TODO, val.cc, sf-val.cc, sccsfile.h, Makefile.am, NEWS:
Initial implementation of "val".
* sf-admin.cc: Make it possible to delete the "m" flag.
* valcodes.h: Return codes for "val".
* docs/CREDITS: Fixed typo.
1998-11-21 James Youngman
* admin.cc: Ensure that if we specified -h, we do *nothing* else.
* tests/admin/admin-hz.sh:
Make sure that if we specify -h and -z, we do not update the checksum.
* tests/admin/admin-hz.sh:
Added tests for the -h and the -z options of admin.
* docs/cssc.texi: Elaborated on comments about "admin -z".
* sf-get.cc:
For get(), ensure that the file was not opened with the mode
FIX_CHECKSUM, because that doesn't make sense.
* sccsfile.cc:
Emit helpful message if we fail to open the s-file. If we are doing
"admin -z", don't complain if the checsum was previously wrong.
* sccsfile.h: Added new open mode FIX_CHECKSUM.
* admin.cc: Better operation of the -z (reset checksum) option.
* sf-write.cc:
Rethought update_checksum(). It now works even though the s-file is
mode 444 (which is what it should be).
* file.cc: Eliminated compiler warning.
1998-11-13 James Youngman
* NEWS: Added changes for 0.09alpha.pl1.
* configure.in: Bumped up the patchlevel.
* docs/cssc.texi: Documented sccsdiff.
* run.cc: Call errormsg_with_errno() correctly.
1998-11-12 James Youngman
* cdc.cc: Reformatted the error message that you get when trying to get
arguments from stdin without also using the -y option.
1998-11-01 James Youngman
* docs/FIXED: Added fixes from Dick Streefland.
* testutils/Makefile.am: Added the "yammer" program.
* docs/Platforms: Also tested on Red Hat 5.1.
* docs/CREDITS: Added credit to Greg Woods.
* tests/binary/seeking.sh: Avoid requiring the "nl" utility.
* testutils/yammer.c:
This program is not installed as part of CSSC. It's just used by
the test suite. It takes two arguments, the first being a repeat
count, and the second being a string that should be repeated that
many times. For example, "yammer 2 blah" should emit
1 blah
2 blah
The program was designed to eliminate the requirement to do
yes blah | nl | head -2
because some systems, for example NetBSD/SPARC 1.3.2, lack the "nl"
utility.
* run.cc:
When calling errormsg_with_errno(), actually pass errno as the first argument.
1998-10-29 James Youngman
* sccsfile.cc:
Added toleration for some features that Larry is putting into
BitKeeper.
* auxfiles/Makefile.am: Added newline at the end of the file.
* show-disp.sh:
Don't use the --lint --posix for awk, because only GNU awk likes them.
1998-10-21 James Youngman
* file.cc:
Use stat(2) rather than fstat(2), so that the file locking does indeed
work over NFS.
1998-10-20 James Youngman
* auxfiles/Makefile.am:
Ensure that CSSC.spec and CSSC.spec.in both get distributed.
* tests/get/no-sfile.sh:
Added no-sfile.sh, which tests for the existence of a bug pointed out
by Dick Streefland (we core dump when we
should exit with status 1, if no SCCS file is specified for some
tools)
* unget.cc, sf-prs.cc, sf-get2.cc, sact.cc, rmdel.cc, run.cc, prt.cc, prs.cc, get.cc, fileiter.cc, fileiter.h, delta.cc, cdc.cc, admin.cc:
Patches from Dick Streefland :-
> I'm sending you three patches for CSSC-0.09alpha.pl0. Patch #1 fixes
> two prototype mismatches. Patch #2 makes sure that "get" and "prs"
> return a proper exit status in the case of an output file error
> (e.g. disk full). Patch #3 fixes the problem that when you invoke
> one of the tools without an SCCS file, it will abort with a core
> dump. Abort() is called because an exception is raised that is not
> handled. I removed the exception, and added explicit tests in each
> tool.
1998-09-07 James Youngman
* file.h: Added fcreate() flag enum for atomic locking over NFS.
* file.cc:
Made the lockfile create more robustly atomic over NFS by using the
lock-then-stat approach. Fall back on using the regular open() with
O_EXCL if it look slike the underlying filesystem does not support
hard links.
1998-09-06 James Youngman
* sf-delta.cc, pf-del.cc, bodyio.cc:
Use fcreate() to create files for writing, rather than fopen().
This allows us to use open(.., O_CREAT|O_EXCL).
* get.cc:
If we fail to add the lock to the p-file, delete the gotten editable file.
* docs/cssc.texi:
Documented the various prefixes used for files, temporary and otherwise.
* tests/get/writable.sh:
Make sure "get -k" produces a writable g-file and "get" without -k
does not.
* tests/admin/i-option.sh, sf-write.cc, sf-delta.cc, sccsfile.h, sccsfile.cc, pf-del.cc, get.cc, pf-add.cc, file.cc, bodyio.cc, bodyio.h:
Take special care to close and delete temporary files if an exception
is thrown.
* README: Typo.
1998-09-05 James Youngman
* configure.in:
Generate auxfiles/CSSC.spec from auxfiles/CSSC.spec.in, to get the
version number substituted.
* auxfiles/CSSC.spec.in, auxfiles/CSSC.spec:
Generate CSSC.spec from CSSC.spec.in, using substitution of @VERSION@.
1998-09-04 James Youngman
* NEWS: UPdated for 0.09alpha.pl0.
* ChangeLog: Added in the changes for 0.09alpha.pl0.
* README: Fixed typo.
1998-09-03 James Youngman
* except.h: Declarations of exceptions.
* Makefile.am: Added except.h.
* tests/prt/exists.sh:
Added tests that check for correct behabiour when the s-file is
absent.
* sact.cc: Catch exceptions in main().
* shorter/rmdel.cs, shorter/sact.cs, shorter/unget.cs, shorter/what.cs, shorter/README, shorter/admin.cs, shorter/cdc.cs, shorter/delta.cs, shorter/get.cs, shorter/prs.cs, shorter/Makefile.in:
We have not been keeping these files up to date and haven't used
them at all, and we planned not to have to use them. So they're
obsolete.
* tests/get/create.sh:
Make the test suite miscarry if the test files can not be created.
* tests/initial/root.sh, tests/Makefile.am:
Make sure we start the test suite by making sure that we're not
running as root.
1998-09-02 James Youngman
* tests/common/not-root:
If the code inside the subshell exits with a nonzero exit status, make
sure that the "outer" shell does too -- so that the miscarry() takes
effect.
* tests/bsd-sccs/driver-basic.sh:
Remove the SCCS directory too, when the test is finished.
* sid_list.h, unget.cc, sf-write.cc, sf-prs.cc, sf-get2.cc, sf-kw.cc, sf-get.cc, sf-delta.cc, sf-admin.cc, sccsfile.h, sccsfile.cc, run.cc, quit.h, rel_list.cc, rmdel.cc, prt.cc, quit.cc, pf-add.cc, pfile.cc, prs.cc, filepos.h, get.cc, file.cc, fileiter.cc, delta.cc, configure.in, delta-table.cc, bodyio.cc, cdc.cc, acconfig.h, admin.cc:
On systems that support exceptions, handle errors by throwing
exceptions. On systems that don't support exceptions, handle some
errors by returning back up the calling sequence, and some by calling
exit() in quit(). This means that only systems with exceptions will
allow the second file to be processed if the first fails.
* docs/cssc.texi:
"admin -h" is actually unimplemented, rather than just untested.
* tests/rmdel/exists.sh, tests/unget/exists.sh, tests/prs/exists.sh, tests/prs/keywords.sh:
Added tests that check for correct behaviour when the s-file does
not exist.
1998-08-22 James Youngman
* sf-write.cc: Eliminate unused-parameter warning.
1998-08-15 James Youngman
* docs/TODO: We now use getpwuid() instead of getlogin().
1998-08-14 James Youngman
* unget.cc, sf-write.cc, sid_list.h, sf-prs.cc, sf-get3.cc, sf-kw.cc, sf-get2.cc, sf-get.cc, sf-delta.cc, sccsfile.h, rel_list.cc, fileiter.cc, filepos.h, get.cc, file.cc, file.h, delta.cc, admin.cc:
Use errormsg() or errormsg_with_errno() more, instead of quit().
1998-08-13 James Youngman
* auxfiles/CSSC.spec, configure.in: Bumped to 0.09alpha.pl0.
* README: Indicate how to generate all the neccesary files after a "cvs
checkout".
* bodyio.h, bodyio.cc, sf-delta.cc, sf-admin.cc:
Handle I/O errors without calling quit().
* sf-get2.cc:
Added reminder to check if we handle the %W% keyword correctly.
* sf-get.cc, l-split.cc, delta.cc:
Cosmetic changes to the code formatting.
* sf-prt.cc:
Use errormsg_with_errno(), not quit(), and return a failure status
intead of exiting on the spot when there is a problem (so that we can
continue to process the next file).
* sf-prs.cc: Cosmetic changes to the code formatting.
* pfile.cc:
Added ctor_quit(), a synonym for quit(), which indicates that it is
being called from a constructor. These are the failure points that
can't be replaced with a "return false", but only with an exception.
* fileiter.cc: Cosmetic changes to the code formatting.
* cssc.h: Don't need to worry about getlogin() any more.
* unget.cc: Return a failure status if pfile.update() had failed.
* sid.cc:
Use assert(), not quit(), to detect logic errors in the program.
* sf-write.cc, sf-delta.cc:
Use errormsg_with_errno(), not quit(), and return a failure status
intead of exiting on the spot when there is a problem (so that we can
continue to process the next file).
* sccsfile.cc:
Use errormsg_with_errno(), not quit(), and return a failure status
intead of exiting on the spot when there is a problem (so that we can
continue to process the next file).
Added ctor_quit(), a synonym for quit(), which indicates that it is
being called from a constructor. These are the failure points that
can't be replaced with a "return false", but only with an exception.
* quit.h, quit.cc:
Added ctor_quit(), a synonym for quit(), which indicates that it is
being called from a constructor. These are the failure points that
can't be replaced with a "return false", but only with an exception.
* pf-del.cc:
Use errormsg_with_errno(), not quit(), and return a failure status
intead of exiting on the spot when there is a problem (so that we can
continue to process the next file).
* file.cc: Use getpwuid(), not getlogin(), for get_user_name().
1998-08-12 James Youngman
* pfile.h: Make update() return a boolean indication of success.
1998-06-19 James Youngman
* NEWS, ChangeLog:
Normal prerelease modifications to ChangeLog, NEWS, etc.
* configure.in, auxfiles/CSSC.spec: Bumped the patchlevel.
* mystring.cc:
re-fixed bug in find_last_of(). First bugfix had a bug.
* bsd/sccs.c:
Use our own error code definitions taken from the glibc .
This is to avoid a compiler error due to the redifinition on Solaris
(with GCC installed).
* bsd/sccs.1: Documented the various possible error codes.
1998-06-16 James Youngman
* configure.in: Bumped version to 0.08alpha-pl0.
* ChangeLog: *** empty log message ***
* auxfiles/CSSC.spec: Changed version to 0.08alpha-pl0.
* docs/FIXED: Added a report of the mystring::find_last_of() bug.
* docs/CREDITS: Added apology to Achim Hoffmann.
* docs/style.txt:
"f()" vs. "f ()": added plea for any reason to prefer one over the
other.
* docs/cssc.texi:
Indicate that the fatal-exit-on-error problem is being worked on.
* NEWS: *** empty log message ***
* docs/cssc.texi:
Added a short remark about Emacs's VC-mode in the section on delta; if
an SCCS file has the V flag set, you need to put an -m option in
vc-checkin-flags in order to be able to check in revisions within
Emacs.
* sccsfile.cc:
Oops. Include if STDC_HEADERS is defined, because
HAVE_CTYPE_H is not defined by our configure.in.
* mystring.cc:
Fixed find_last_of(). We were finding the FIRST occurrence of the
target rather than the last. Argh! How stupid is that?
* tests/prs/keywords.sh: Make sure prs accepts an empty "-r" option.
1998-06-15 James Youngman
* fileiter.cc:
When reading a list of filenames from stdin, trim off the newline that
separates the filenames.
* sf-write.cc, sf-prs.cc, sf-prt.cc, sf-rmdel.cc, sf-get.cc,
sf-get2.cc, sf-cdc.cc, sf-delta.cc, sccsfile.h, sf-add.cc,
sf-admin.cc, quit.cc, quit.h, rmdel.cc, file.cc, get.cc, prt.cc,
cdc.cc, delta.cc, admin.cc:
Don't use quit(); rather, use errormsg() and make a fatal exit
from the function which we are now executing. When this
propagates up to the top level, remember the error so we cal later
exit with a return value of 1, but nevertheless continue to
process command-line arguments.
* prs.cc:
Allow the -r option to have no argument, without producing an error.
When processing SCCS files, allow any of them to fail without this
causing the whole operation to abort, but remember the fact and exit
with a return value of 1 (hence use errormsg() rather than quit() for
producing error messages).
1998-06-14 James Youngman
* unused/Makefile.am, unused/README, quit.cc, configure.in,
Makefile.am:
Moved some files into the "unused" directory, which we now add into
the distribution. They may be useful for ports or something.
* unused/sid_list.cc, unused/pipe.cc, unused/pipe.h,
unused/ffsync.cc, unused/fsync.cc, unused/move-if-change,
unused/dosfile.cc, unused/dummy.cc, unused/_chmod.cc, dosfile.cc,
ffsync.cc, move-if-change, pipe.cc, pipe.h, sid_list.cc,
_chmod.cc, dummy.cc, fsync.cc:
Moved some files into the "unused" directory; we don't use them
any more and keeping them aroung means that they have to be
considered during global search and replace operations. That's
just making more work for myself. These files are the contents of
the $(rainyday_src) macro in the makefile.
* unget.cc, sccsfile.cc, sact.cc, rmdel.cc, run.cc, quit.cc,
quit.h, prt.cc, pipe.cc, prs.cc, pf-add.cc, pfile.h, get.cc,
file.cc, delta.cc, admin.cc, cdc.cc:
Changes to avoid using quit(); rather, we want to emit an error
message and return an error status to the caller. This allows an
SCCS program to process a list of files without quitting
prematurely because there was somethign wrong with some file early
in the list. More changes remain to be done for this to be
complete.
* Makefile.am: Added dosfile.cc and ffsync.cc.
* dosfile.cc, ffsync.cc:
Moved some system-dependent code out of file.cc.
* delta.cc:
Use errormsg() rather than quit() so that if the first file fails, the
second may still be processed.
1998-06-13 James Youngman
* README:
Added some basic remarks about configuuring the destination directory
to the "QuickStart" section of the file. Also, change the sample test
script to send the version information too.
* fdclosed.cc:
Fixed copyright date and removed extraneous #include of err_no.h.
* fdclosed.cc: Fixed the comments.
* Makefile.am, fdclosed.cc:
Provide a static object constructor that ensures that file descriptors
0, 1 and 2 are not closed at the start. Otherwise we might printf()
to stdout and accidentally modify a file we fopened() for writing.
* bsd/Makefile.am: Define PREFIX to be $(csscutildir) by default.
1998-06-11 James Youngman
* ChangeLog, NEWS: Final additions for 0.07alpha.pl3.
* bsd/Makefile.am:
Even though sccs.1 is in man_MANS, we still need to get it added to
EXTRA_DIST in order to get it in the distribution. Argh.
1998-06-10 James Youngman
* configure.in: Bumped the patchlevel.
* auxfiles/CSSC.spec:
Fixe dchangelog, added sccs manpage, included all the info files.
* NEWS, ChangeLog: Added changes for CSSC-0.07alpha-pl3.
* bsd/Makefile.am:
Added COPYNG.bsd to the distribution. Also .ispell_english.
Added the manual page sccs.1 too.
* tests/common/test-common, tests/common/not-root,
tests/bsd-sccs/driver-basic.sh: Ensure the test suite is not run
by root (because that makes "test -w" return misleading results).
1998-06-09 James Youngman
* auxfiles/CSSC.spec, docs/CREDITS, NEWS, configure.in:
Bumped to CSSC-0.07alpha-pl2
* sccsfile.cc:
Fixes to tolerate spurious arguments on ^AU and ^At lines.
This problem reported by Marko Rauhamaa .
1998-06-08 James Youngman
* NEWS, ChangeLog: Summarised changes for 0.07alpha-pl1.
* auxfiles/CSSC.spec, configure.in: Bumped to 0.07 patchlevel 1.
* prompt.cc: Allow newlines to be escaped with a backslash.
* sf-get.cc:
Don't warn about keyword substitution not being done for binary files;
I don't think it should be done in any case.
* tests/admin/abspath.sh:
Use a less complicated way of building the command. We seem to have
a small problem with this:- anthonyc@nag.co.uk sees
"/zome/anthonyc/.../s.bar: no such file or directory".
^ Note that the z for the lockfile name appears here!
* tests/prt/reportmr.sh:
Some shells don't like two assignments on one line, for example
"g=reportmr.1 s=inputs/s.$g". With these shells, the $g in the second
assignment expands to nothing. "ash" version 0.2 is like this. Bash
version 1.14.7 is not.
* bsd/sccs.c: Support "sccs cdc".
If we use "sccs create -b foo", pass the "-b" flag to "admin", but not
to "get". Passing it to "get" would mean "create a branch" rather
than "binary" and we're not checking the file out for editing anyway.
This at the request of .
1998-06-06 James Youngman
* bsd/sccs.c:
Be as careful about running setgid as we are about running setuid.
* bsd/sccs.c:
Insist on the compile-time macro SCCSDIR having been set if the program
is installed set-user-id (what about set-group-id?).
* tests/bsd-sccs/driver-basic.sh:
Unset $LANG so that the tests for sccs(1) don't fail on systems
which are mosconfigured, just because they are misconfigured.
* docs/TODO: *** empty log message ***
* NEWS: Added update for version 0.07alpha-pl0.
* ChangeLog: Updated for version 0.07alpha-pl0.
* configure.in: Bumped to version 0.07.
* auxfiles/CSSC.spec: *** empty log message ***
* tests/common/command-names:
Set ${sccs} here in tests/bsd-driver/*, and not this file. We keep it
out of command-names since we currently need to run sccs in order to
decide if we need to pass it the --prefix option. That would slow all
the other tests down.
* tests/bsd-sccs/driver-basic.sh:
Set ${sccs} here in this file. We keep it out of common/command-names
since we currently need to run sccs in order to decide if we need to
pass it the --prefix option. That would slow all the other tests
down.
* tests/prt/nodel.sh, tests/prt/default.sh:
Remove s.testfile when the test is complete.
* bsd/sccs.c, bsd/sccs.1:
Modified to work with portability hints provided by Automake
(e.g. sys_siglist[], struct dirent vs. struct direct, and so on); also
other portability enhancements.
Modifued some of the string handling for greater protection against
buffer-overflow.
Added extra options to sccs (--cssc, --prefix) to allow the
program to be tested before the sub-programs (edmin, get, etc.)
are installed in their final positions. Added --version and -V
options (which do the same thing).
Documented this in the manpage; also added a COPYING section and
added some more entries in the SEE ALSO section.
Folded pathnames.h into sccs.c.
* bsd/Makefile.am: Rolled pathnames.h into sccs.c.
* bsd/.ispell_english: Removed entries containing punctuation or
digits; ispell doesn't like them.
* bsd/pathnames.h: Rolled the few remaining definitions into sccs.c
* bsd/pathnames.h:
Don't use absolute paths for the locations of the subcommands.
1998-05-30 James Youngman
* tests/bsd-sccs/driver-basic.sh: Added tests for "sccs check".
* tests/bsd-sccs/driver-basic.sh:
Added tests for deledit, delget, fix, tell, rmdel, what, enter, edit,
clean, unedit and info.
* configure.in, acconfig.h:
Detect sys_suglist, for bsd/sccs. Also detect . Bump
patchlevel to 9 (though we may end up making a new release instead).
* sccsfile.cc:
find_any_delta(sid id): will find even removed deltas. This is part
of the "sccs fix" bugfix.
* tests/common/command-names:
Oops. Set sccs=sccs as a last resort if we can't find it.
* delta-table.cc, sf-get2.cc, sccsfile.h, delta-table.h:
When getting a delta for editing, and the trunk successor has been
rmdel'ed, reuse it (this is required for "sccs fix" to work properly,
and it's the way real-sccs works).
* tests/rmdel/edit.sh:
Tests that do "delta" after an "rmdel" to make sure the right things
happen.
1998-05-28 James Youngman
* bsd/sccs.c:
Cope in a more portable way with the status return from a child.
* bsd/sccs.c: Allow "sccs -V -V -V" without generating a coredump.
* bsd/sccs.c:
Some portability improvements; don't need sig_t; cope without
sys_siglist if we don't have it. This mostly affects Linux with libc
version 5 and below, I think.
1998-05-27 James Youngman
* bsd/sccs.c, bsd/.ispell_english, bsd/pathnames.h:
Some range chacking corrections, correctiosn to the PREFIX macro, etc.
* bsd/COPYING.bsd:
Explained why part of CSSC is published under the BSD license
* docs/TODO:
Added note about considering the use of getpwuid() in preference to getlogin().
Removed TODO entries from some stuff that's been done.
* README:
We now support binary files; remove the statement that we do not...
* what.cc, sccsfile.cc, bodyio.cc, cssc.h:
Removed some unused configuration macros.
Renamed CONFIG_BINARY_FILE to CONFIG_OPEN_SCCS_FILES_IN_BINARY_MODE.
* scripts/change-suffix, unused/change-suffix:
change-suffix should be in scripts, not unused :-)
* unused/change-suffix: Moved change-suffix into "unused".
* change-suffix: Moved change-suffix unti "unused".
* tests/bsd-sccs/driver-basic.sh, tests/Makefile.am:
Added tests for the driver program "sccs".
* tests/common/test-common: Use ../../testutils/ekko as a fallback.
* tests/common/command-names: Added entry for the "sccs" command.
1998-05-25 James Youngman
* defaults.h: Removed some unused features.
* docs/CREDITS:
Added info about the BSD-derived code (sccs.c and friends).
* AUTHORS: Added info about the BSD-derived code (sccs.c and firends).
* docs/cssc.texi:
Added documentation about sccs.c, the BSD copyright notice, and added
some more concept index entries.
1998-05-23 James Youngman
* bsd/sccs.c:
Some attempts at increased security and portability. No tests for
this program yet though, so no certainty that this works.
1998-05-12 James Youngman
* tests/prt/inputs/s.reportmr.1:
Oops. I'd been working with a different file in the compilation
directory.
* ChangeLog: *** empty log message ***
* configure.in: Moved to 0.06alpha.pl8
* NEWS: Additions for 0.06pl8.
1998-05-11 James Youngman
* testutils/README: Fixed typo.
* tests/prt/inputs/s.reportmr.1, tests/prt/reportmr.sh:
New tests for those cases where there are MRs to be reported.
* sf-prt.cc, prt.cc:
Make sure the MR list (etc.) is formatted correctly when we are
printing one delta per line.
1998-05-10 James Youngman
* bodyio.cc:
Don't store the result of getc() in a char, use an int -- that way, we
can detect EOF.
* sf-write.cc:
Remove comment discussing broken behaviour with "admin -i" and
nonseekable binary standard input that has now been fixed.
* testutils/lndir.c: Ignore CVS directories too.
1998-05-09 James Youngman
* sf-rmdel.cc, sid.cc, sccs-delta.cc, sccsname.cc, prs.cc,
quit.cc, pipe.cc, fsync.cc, pf-add.cc, file.cc, fileiter.cc,
delta.cc, cdc.cc, delta-table.cc:
Get the name of the file right, in each file's comment header.
* sf-write.cc, sccsfile.h:
Fixed some compilation errors; warnings about passing "unsigned *pSum" when "int *pSum" is required.
* docs/Platforms, docs/CREDITS, docs/FIXED, docs/BUGS:
Updated lists of outstanding anb fixed bugs, added people to CREDITS,
and did some housekeeping in Platforms.
* docs/cssc.texi:
Added clarification that the file that must be specified on the
"delta" command line is that of the s-file, not the working file.
1998-05-08 James Youngman
* CSSC-0.06alpha.pl7 released.
* NEWS, configure.in, ChangeLog: Released 0.06alpha.pl7.
* docs/cssc.texi: Added header for install-info.
* auxfiles/CSSC.spec:
Included mods from John Interrante ,
except his patch to pathname.h; must apply that RSN.
* sf-delta.cc, seqstate.cc, seqstate.h, sccsfile.cc,
delta-iterator.h, Makefile.am: Fixed bug in seqstate.h that
manifested with Codemgr SCCS files. This required the
introduction of seqstate.cc and a modification to sf-delta.cc as
well.
1998-05-06 James Youngman
* seqstate.h:
Reindented to prepare for new code which maintaind the state of the
"deleting" flag differently.
1998-05-05 James Youngman
* CSSC-0.06alpha.pl6 released.
* NEWS: Added entry about "sccs.c".
1998-05-04 James Youngman
* bsd/sccs.c, bsd/pathnames.h, Makefile.am:
Attempted to make the location of "sccs" configurable. Also attempted to add const modifiers where useful.
* NEWS: Added "-t" option.
* sccsfile.cc:
Use signed arithmetic for checksums. I *think* that matches the
"real" SCCS. Also produce what I hope are more useful messages when
the checksum is incorrect (or even the checksum header is missing).
* sccsfile.h:
Use signed arithmetic for checksums. I *think* that matches the
"real" SCCS.
* configure.in: Added the "bsd" directory.
* tests/get/branch.sh:
Added note about the SCO version of "unget" being silent.
* docs/cssc.texi:
texi2html doesn't expand homegrown macros, so we have to write the
maintainer's email address out by hand in each place.
* docs/Platforms: Added note for IRIX.
* sid.h: Removed a #pragma -- they're not portable anyway.
* pipe.h: Use "class foo : public bar {}" not "class foo : bar { }".
* pfile.h: Removed a #pragma -- they're not portable anyway.
* mystring.h:
Added comment about functions disalbigiated only by the constness of
*this. Some versions of the IRIX C++ compiler don't like that (error
3392).
* linebuf.h: Actually remove a #pragma that had been commented out.
* filelock.h: Explicitly use "private" in inheritance spec
(e.g. 'class foo : private bar {}') ,
we can't just leave it out.
* fileiter.cc:
If an argument is a directory which is named so as to end in a slash,
don't coredump.
1998-03-18 James Youngman
* bsd/sccs.c: Reindented with GNU Indent.
* bsd/sccs.c: Many const-correctness changes.
1998-03-17 James Youngman
* bsd/Makefile.am, bsd/Makefile.bsd, bsd/COPYING.bsd, bsd/Makefile:
Updated the copyright info. There is a different copyright situation
locally in this dir.
* bsd/sccs.c:
Eliminated many compiler warnings. Partial Autoconf conversion.
* bsd/sccs.c: Use stdarg.h instead of old-style /*VARARGS1*/ etc.
1998-03-16 James Youngman
* bsd/sccs.me, bsd/sccs.c, bsd/pathnames.h, bsd/sccs.1, bsd/Makefile:
Added files from the Berkeley sccs.c implementation.
1998-03-15 James Youngman
* tests/get/t-option.sh, docs/style.txt, docs/get-spec.txt, docs/cssc.texi, docs/Makefile.am, docs/TODO, sf-get2.cc, get.cc, Makefile.am:
Implemented the "-t" option of get.
* tests/get/t-option.sh: Tests for the -t option of get.
1998-03-14 James Youngman
* sccsdate.cc, sccsfile.cc, sf-get.cc, configure.in, file.cc, filediff.cc, admin.cc, bodyio.cc:
Fixed some compiler warnings, no change in functionality.
* docs/Makefile.am: Added mailing-list.txt.
* docs/mailing-list.txt:
Information about the mailing list for GNU CSSC.
* docs/patches.txt:
Requested that people specify the purpose of the submitted patch, and
delete all editor backup files before generating it.
* testutils/lndir.c, testutils/ekko.c:
Eliminate some compiler warnings; falling off the end of int-returning
functions and that sort of thing.
* testutils/seeker.c:
setlinebuf() is not a standard ISO-C library function and SCO Unix
(for example) does not provide it. It has an exact setvbuf()
equivalent, so use that instead.
1998-03-11 James Youngman
* auxfiles/Makefile.am, Makefile.am, configure.in:
Added the "auxfiles" directory so that CSSC.spec is distributed.
* ChangeLog, NEWS: Detailed the updates for CSSC-0.06alpha-pl5.
* auxfiles/CSSC.spec, configure.in: Bumped patchlevel to 5.
* docs/FIXED, docs/BUGS: Oops. Left a fixed bug in eocs/BUGS --
and the patchlevel number for the first fixed version was wrong.
All better now.
* tests/rmdel/basic.sh:
Make sure that the revision we tried to remove is actually now absent.
* tests/common/command-names, tests/rmdel/basic.sh, docs/BUGS,
docs/CREDITS, docs/Platforms, tests/Makefile.am, sf-rmdel.cc:
Fixed bug in "rmdel" reported by Peter Kjellerstedt. "rmdel" had
been deleting all the control lines.
1998-03-10 James Youngman
* docs/FIXED, auxfiles/CSSC.spec, NEWS, configure.in, ChangeLog:
Miscellaneous updates for 0.06-pl4.
* tests/Makefile.am:
Don't export CVS directories into the distribution.
* admin.cc:
Absolute pathnames now work; bug reported by Wolfhard Straehle.
* tests/admin/abspath.sh:
Test for bug reported by Wolfhard Str\"ahle; admin -n /abs/path/s.foo
fails because the "admin" code checks for an "s." after the first
slash when in fact it should check for an "s." after the LAST one.
1998-03-10 James Youngman
* get.cc:
Fixes from Peter Kjellerstedt. First, correct output when a direcory
is specified on the command line (get should always print the name of
the current s-file). Second, when multiple files are specified on the
command line, don't corrupt the requested SID value by updating it
with an actual SID value from some particular s-file.
* sccsdiff.sh.in: Support for filenames containing spaces.
* filediff.cc, filediff.h, sf-delta.cc:
Better support for files whose names have spaces in them.
1998-03-09 James Youngman
* filediff.h, filediff.cc:
finish() returns a bool; false if the child process returned nonzero.
* sf-delta.cc, fileiter.cc:
Make FileDiff::finish() return a bool; it returns false if pclose()
indicates that the spawned process returned a nonzero exit status.
[ REVERSED -- this was a BAD idea, diff returns 1 if the
files differ! ]
* sccsdiff.sh.in:
Bug report from Richard Polton: IRIX's pr(1) requires a space between
the "-h" and its argument.
1998-03-04 James Youngman
* tests/common/real-thing: Define TESTING_CSSC if $dir points at
CSSC programs rather than SCCS programs.
* tests/binary/auto.sh: Use $TESTING_CSSC to determine of we
should run those tests that CSSC should pass but (some verisions
of) SCCS cannot, instead of abusing $expect_fail.
* docs/BUGS, docs/FIXED: Some entries moved from BUGS to FIXED.
1998-03-01 James Youngman
* Version 0.06alpha-pl3
* auxfiles/CSSC.spec: 0.06alpha-pl3
* configure.in, ChangeLog, NEWS:
Updated the NEWS and ChangeLog files (0.06alpha-pl3)
* tests/binary/auto.sh, tests/binary/seeking.sh:
Tests for binary files and the "-i" option of admin.
* docs/cssc.texi:
Genuine SCCS doesn't always properly recover from finding out that
the "-i" file for admin needs encoding, after having read some of it.
* bodyio.cc, admin.cc:
When generating a new SCCS file using the "-i" option of admin,
we no longer need to be able to seek on that file if the input
turns out to need encoding after we have read some of it.
* tests/admin/i-option.sh: We no longer do fgetpos() on stdin.
1998-02-28 James Youngman
* xalloc.cc, xalloc.h, Makefile.am:
Removed xalloc.cc and xalloc.h completely.
* show-disp.sh:
Cope correctly with locally removed files when the actual working file
has been deleted.
* docs/CREDITS, xalloc.cc, sl-merge.h, stack.h, sid_list.cc,
sid_list.h, sid.cc, run.cc, seqstate.h, pipe.cc, linebuf.cc,
linebuf.h, delta-table.cc, l-split.cc, cssc.h: Patches from
Richard Polton to eliminate our xalloc.h wrapper for operator new,
as various versions of GCC differ on the exception throwing
specification -- if we don't have to override the operator new, we
don't have to get the declaration right :-)
* admin.cc:
Turn off buffering on stdin, as a workaround for a bug in glibc 2.0.6.
* tests/common/test-common: success(): Delete temporary files.
* tests/admin/i-option.sh, tests/admin/t-option.sh:
Temporarily mark the "admin -i" tests "expect-fail".
1998-02-24 James Youngman
* auxfiles/CSSC.spec: Updated the version.
* tests/binary/char255.uue:
This file contains one character (uuencoded), the ASCII code 255.
1998-02-23 James Youngman
* configure.in: Bumped version to 0.06alpha.pl2
* ChangeLog.1, ChangeLog: *** empty log message ***
* tests/binary/eightbit.sh, tests/binary/diff.sh, tests/Makefile.am:
Run the binary-file tests as part of "make check". Small fixes to
those tests.
* tests/binary/eightbit.sh, bodyio.cc, NEWS:
Fixes to allow the character whose code is 255 to be properly handled.
* tests/binary/eightbit.sh: Tests involving 8-bit bodies.
* tests/binary/s.umsp.uue: SCCS file containing 8-bit characters.
* docs/BUGS, docs/FIXED, sf-write.cc, sccsfile.cc: Checksum is now
8-bit-clean, due to richardp@scopic.com and
Peter.Kjellerstedt@axis.com.
* testutils/Makefile.am:
Added seeker.c, which tests for a particular bug in GNU libc 2.0.6.
* unget.cc, what.cc, rmdel.cc, sact.cc, prt.cc, my-getopt.h,
prs.cc, get.cc, my-getopt.cc, fileiter.h, delta.cc, fileiter.cc,
admin.cc, cdc.cc: Renamed class getopt to class CSSC_Options, to
avoid conflict with getopt(3) on systems such as netbsd-1.2 (as
installed on melange.gnu.org)
* testutils/seeker.c:
Test program which determines if fgetpos() works correctly on stdin.
1998-02-21 James Youngman
* auxfiles/CSSC.spec: Corrected source file name.
* auxfiles/CSSC.spec: Strip the installed binaries.
* NEWS: Updated for CSSC-0.06devel-pl1.
* ChangeLog: *** empty log message ***
* what.cc, sid_list.cc, unget.cc, sf-prt.cc, sf-prs.cc,
sf-get2.cc, sf-kw.cc, sf-get.cc, sf-chkid.cc, sf-delta.cc,
sf-cdc.cc, sccsfile.h, sact.cc, sccsfile.cc, run.cc, run.h,
rel_list.h, rmdel.cc, prt.cc, prompt.cc, prs.cc, pipe.h, pfile.h,
pipe.cc, mystring.h, pfile.cc, mystring.cc, my-getopt.h, mylist.h,
linebuf.h, my-getopt.cc, l-split.cc, linebuf.cc, get.cc, ioerr.h,
fileiter.h, filepos.h, file.cc, delta.cc, encoding.cc, cssc.h,
defaults.h, bodyio.h, cdc.cc, bodyio.cc: Updated the year in the
copyright message for all those files modified so far in 1998.
* docs/FIXED, docs/TODO, docs/BUGS: Added some bug reports.
* unget.cc, sact.cc, sf-get.cc, rmdel.cc, prs.cc, prt.cc, my-getopt.cc, my-getopt.h, fileiter.h, get.cc, fileiter.cc, cdc.cc, delta.cc, admin.cc:
Modified option processing so that "get s.foo -Gbaz" is equivalent
to "get -Gbaz s.foo".
* configure.in: Bumped version to 0.06-pl1.
* docs/cssc.texi: Minor punctuation corrections.
* tests/prs/keywords.sh: Added test for :PN:.
* Makefile.am, sf-prs.cc:
The prs keyword :PN: needs to produce the full pathname of the SCCS
file, not just the name as specified on the command line.
* tests/get/optorder.sh: Initial version.
1998-02-20 James Youngman
* sf-write.cc:
Cope in a more user-friendly way with the prior existence of "x.foo".
* docs/BUGS:
Some bug reports from Peter Kjellerstedt
and Dave Bodenstab .
* tests/get/sep_subst.sh:
Make sure the substitution happens for the actual gotten delta, not
the delta to which the current line belongs.
* tests/get/sep_subst.sh: *** empty log message ***
* tests/get/sep_subst.sh:
Make sure that the delta information substituted for each line is the
information for the delta that we are actually getting, not the delta
information for the delta which last touched that line.
1998-02-12 James Youngman