#!/bin/sh
# command to create S_load_time.c file
# that contains the date that this version of S-PLUS was loaded
# along with a structure to allow initialiation of all hash tables
# from included chapters

# syntax Splus BOOTSTRAP libraries

(
set ld $*	# ld_init is the init file for core S-PLUS
echo '#include "S.h"'
for i
do
	echo "extern x_h `basename $i`_init[];"
done
echo "x_h *init_entries[] = {"
for i
do
	echo "`basename $i`_init,"
done
echo "0};"

date|sed 's/.*/char load_time[] ="S &";/'
echo "extern vector *Sfun(); vfun_ptr do_not_optimize_this_away=Sfun;"
) > S_load_time.c
