#!/bin/sh -
#	$Id: s_vms,v 1.1.1.1.2.2 2000/02/08 00:44:15 noriko Exp $
#
# Build the VMS files.

msgc="/* DO NOT EDIT: automatically built by dist/distrib. */"

. RELEASE

f=../build_vms/db.h
echo "Building $f"
rm -f $f
(echo "$msgc" && sed \
    -e 's/@u_int8_decl@/typedef unsigned char u_int8_t;/' \
    -e 's/@int16_decl@/typedef short int16_t;/' \
    -e 's/@u_int16_decl@/typedef unsigned short u_int16_t;/' \
    -e 's/@int32_decl@/typedef int int32_t;/' \
    -e 's/@u_int32_decl@/typedef unsigned int u_int32_t;/' \
    -e '/@u_char_decl@/d' \
    -e '/@u_short_decl@/d' \
    -e '/@u_int_decl@/d' \
    -e '/@u_long_decl@/d' \
    -e '/@ssize_t_decl@/d' \
    -e "s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/" \
    -e "s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/" \
    -e "s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/" \
    -e "s/@DB_VERSION_STRING@/\"$DB_VERSION_STRING\"/" \
    < ../include/db.src) > $f
chmod 444 $f

f=../build_vms/db_int.h
echo "Building $f"
rm -f $f
(echo "$msgc" && sed \
    -e 's/@db_align_t_decl@/typedef unsigned long db_align_t;/' \
    -e 's/@db_alignp_t_decl@/typedef unsigned long db_alignp_t;/' \
    < ../include/db_int.src) > $f
chmod 444 $f
