#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission.  M.I.T. makes no representations about the
# suitability of this software for any purpose.  It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.  It can only install one file at a time, a restriction
# shared with many OS's install programs.


# set DOITPROG to echo to test this script

# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"


# put in absolute paths if you don't have them in your path; or use env. vars.

mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"

transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""

while [ x"$1" != x ]; do
    case $1 in
	-c) instcmd="$cpprog"
	    shift
	    continue;;

	-d) dir_arg=true
	    shift
	    continue;;

	-m) chmodcmd="$chmodprog $2"
	    shift
	    shift
	    continue;;

	-o) chowncmd="$chownprog $2"
	    shift
	    shift
	    continue;;

	-g) chgrpcmd="$chgrpprog $2"
	    shift
	    shift
	    continue;;

	-s) stripcmd="$stripprog"
	    shift
	    continue;;

	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
	    shift
	    continue;;

	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
	    shift
	    continue;;

	*)  if [ x"$src" = x ]
	    then
		src=$1
	    else
		# this colon is to work around a 386BSD /bin/sh bug
		:
		dst=$1
	    fi
	    shift
	    continue;;
    esac
done

if [ x"$src" = x ]
then
	echo "install:	no input file specified"
	exit 1
else
	true
fi

if [ x"$dir_arg" != x ]; then
	dst=$src
	src=""
	
	if [ -d $dst ]; then
		instcmd=:
		chmodcmd=""
	else
		instcmd=mkdir
	fi
else

# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad 
# if $src (and thus $dsttmp) contains '*'.

	if [ -f $src -o -d $src ]
	then
		true
	else
		echo "install:  $src does not exist"
		exit 1
	fi
	
	if [ x"$dst" = x ]
	then
		echo "install:	no destination specified"
		exit 1
	else
		true
	fi

# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic

	if [ -d $dst ]
	then
		dst="$dst"/`basename $src`
	else
		true
	fi
fi

## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`

# Make sure that the destination directory exists.
#  this part is taken from Noah Friedman's mkinstalldirs script

# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='	
'
IFS="${IFS-${defaultIFS}}"

oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"

pathcomp=''

while [ $# -ne 0 ] ; do
	pathcomp="${pathcomp}${1}"
	shift

	if [ ! -d "${pathcomp}" ] ;
        then
		$mkdirprog "${pathcomp}"
	else
		true
	fi

	pathcomp="${pathcomp}/"
done
fi

if [ x"$dir_arg" != x ]
then
	$doit $instcmd $dst &&

	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else

# If we're going to rename the final executable, determine the name now.

	if [ x"$transformarg" = x ] 
	then
		dstfile=`basename $dst`
	else
		dstfile=`basename $dst $transformbasename | 
			sed $transformarg`$transformbasename
	fi

# don't allow the sed command to completely eliminate the filename

	if [ x"$dstfile" = x ] 
	then
		dstfile=`basename $dst`
	else
		true
	fi

# Make a temp file name in the proper directory.

	dsttmp=$dstdir/#inst.$$#

# Move or copy the file name to the temp name

	$doit $instcmd $src $dsttmp &&

	trap "rm -f ${dsttmp}" 0 &&

# and set any options; do chmod last to preserve setuid bits

# If any of these fail, we abort the whole thing.  If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.

	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&

# Now rename the file to the real destination.

	$doit $rmcmd -f $dstdir/$dstfile &&
	$doit $mvcmd $dsttmp $dstdir/$dstfile 

fi &&


exit 0
                                  e COM_GR_P_REQ_LEN(p)		( 7 )  C        > C      #define COM_GR_P_ACK_LEN(p)		( 13 + COM_GR_P_ACK_GPAR_LEN(p) )  D        Y D      #define COM_GR_P_LEN(p)			( COM_BUF_MIN_LEN + COM_GR_P_REQ_LEN(p) + COM_GR_P_ACK_LEN(p) )  E         F         F         G        S G      #define COM_GR_P_REQ_GA_ID(p)		( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.req_ga_id)  H        ^ H      #define COM_GR_P_REQ_DRAW_PER_ID(p)	( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.req_draw_per_id)  I        X I      #define COM_GR_P_REQ_BLOCK_ID(p)	( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.req_block_id)  J         K        c K      #define COM_GR_P_ACK_SELL_OBJ_CODE(p)	( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.ack_sell_obj_code )  L        ^ L      #define COM_GR_P_ACK_GAME_REV_NO(p)	( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.ack_game_rev_no)  M        X M       #define COM_GR_P_ACK_BLOCK_ID(p)	( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.ack_block_id)  N        a N      #define COM_GR_P_ACK_BLOCK_REV_NO(p)	( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.ack_block_rev_no )  O        T O      #define COM_GR_P_ACK_PG_ID(p)		( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.ack_pg_id )  P        ^ P      #define COM_GR_P_ACK_DRAW_PER_ID(p)	( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.ack_draw_per_id)  Q        o Q       #define COM_GR_P_ACK_HFB_COMPRESSED_DATA(p) ( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.ack_hfb_compressed_data )  R        Y R      #define COM_GR_P_ACK_GPAR_LEN(p)	( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.ack_gpar_len )  S        [ S      #define COM_GR_P_ACK_GPAR_DATA(p)	( COM_PTR(p)->com_un.v19.v19_u1.v19_u1_v4.ack_gpar_data )  T         U        " U      #define COM_GR_P_REQ_LEN(p)		( 7 )  V        > V       #define COM_GR_P_ACK_LEN(p)		( 13 + COM_GR_P_ACK_GPAR_LEN(p) )  W        Y W      #define COM_GR_P_LEN(p)			( COM_BUF_MIN_LEN + COM_GR_P_REQ_LEN(p) + COM_GR_P_ACK_LEN(p) )   3      /* Game Parameters - Specific */  3    3          3      /* Game Parameters - Specific */  G          G      /* Game Parameters - Specific */  G     , 4 bytes Game version  H  G     H  G   9  I  L     I  L   9  J  I     J  I   9  L  N     L  N   9  M  L      M  L   9  N  I     N  I   9  O  M     O  M   9  P  G     P  G   9  Q  L     Q  L   9  R  T     R  T   9  S  I     S  I   9  T  J     T  J   9  H     4  I     4  J     4  L     4  M     4  N     4  O     4  P     4  Q     4  R     4  S     4  T     4  V     4  W     4  X     4  X       X  6   4  X  M   4  H       H       H     9  I       I       I     9   J       J       J     9  L       L       L     9  M       M       M     9  N       N       N     9  O       O       O     9  P       P       P     9  Q       Q       Q     9  R       R       R     9  S       S       S     9  T       T       T     9  V       V       V     9  W       W       W     9  X       X       X     9  X                                                                                                                                                                                                                                                                                        ION_TXT	    Character(17) '      	BANK_FILE_TXT		    Character(19) $      	LETTER_TXT		    Character( 9)-      	CHOICE_BANK_TYPE_TXT	    Character(23) /      	CHOICE_LETTER_TYPE_TXT	    Character(17)       1              UNREG_PLS_TXT		    Character(29)    /              REG_PLS_TXT		    Character(29)    0              SUBS_PLS_TXT		    Character(29)   .              INTER_PLS_TXT		    Character(29)/              IBASIC_PLS_TXT		    Character(29) 0              SINGLE_WAGER_TXT	    Character(29)*              WAGER_TXT		    Character(10)      5              PLAYER_CARD_RANGE_TXT	    Character(20)       /*matmatmat --------------------------------------------------------------------------------------------------------------------------------------- */7              IBASIC_PROVIDER_RANGE_TXT   Character(20)       /*matmatmat --------------------------------------------------------------------------------------------------------------------------------------- */      4              SPECIFIC_DRAW_TXT	    Character(14)   6              SPEC_DRAW_DISBL_TXT	    Character(16)   ,              MSG_TXT6		    Character(80)   4              SELECT_REGION_TXT	    Character(15)   ,              MSG_TXT7		    Character(80)   0              TAPE_LBL_TXT		    Character(11)   ,              MSG_TXT8		    Character(80)   4              TAPE_DATA_SET_TXT	    Character(14)   -              OK_BUTTON		    Character(04)    1              CANCEL_BUTTON		    Character(12)    3              BANK_TRANSF_TXT		    Character(39)    3              BANK_TRANSF_ANS1	    Character(19)    3              BANK_TRANSF_ANS2	    Character(27)    1              TEST_MODE_TXT		    Character(09)    ,              LP_TMODE		    Character(01)   ,              RP_TMODE		    Character(01)   /              M_INVALID_KEY		    Character(80)  +              MSG_TXT1		    Character(80)   +              MSG_TXT2		    Character(80)   +              MSG_TXT3		    Character(80)   +              MSG_TXT4		    Character(80)   +              MSG_TXT5		    Character(80)         0              FILE_FORMAT_TXT		    Character(13)2              FILE_FORMAT_PC_TXT	    Character(02)6              FILE_FORMAT_MAG_TAPE_TXT    Character(9)+      	OUTPUT_FILENAME_TXT	    Character(5) 7              TEMPLATE_MISSING_TXT        Character(80) &          End Data                    &                                                Form Data 0              /* Field names, Buttons, etc... */      )      	SINGLE_WAGER_BUTT	    Character(2)       *      	UNREG_ALL_BANK_SET	    Byte integer'      	UNREG_BUTT_ALL		    Character(2) '      	UNREG_BUTT_LOW		    Character(2) '      	UNREG_BUTT_MED		    Character(2) (      	UNREG_BUTT_HIGH		    Character(2)-      	UNREG_BUTT_MED_LETTER	    Character(2) .      	UNREG_BUTT_HIGH_LETTER	    Character(2)/      	L_BRACK_UNREG_MED_LETTER    Character(1) /      	L_BRACK_UNREG_HIGH_LETTER   Character(1)       4              UNREG_BUTT_ALL_LETTER	    Character(2)/      	L_BRACK_UNREG_ALL_LETTER    Character(1)       (      	REG_ALL_BANK_SET	    Byte integer%      	REG_BUTT_ALL		    Character(2) %      	REG_BUTT_LOW		    Character(2) %      	REG_BUTT_MED		    Character(2) &      	REG_BUTT_HIGH		    Character(2)+      	REG_BUTT_MED_LETTER	    Character(2) ,      	REG_BUTT_HIGH_LETTER	    Character(2).      	L_BRACK_REG_MED_LETTER	    Character(1)/      	L_BRACK_REG_HIGH_LETTER	    Character(1)       2              REG_BUTT_ALL_LETTER	    Character(2).      	L_BRACK_REG_ALL_LETTER	    Character(1)      )      	SUBS_ALL_BANK_SET	    Byte integer       -      	L_BRACK_SUBS_BUTT_ALL	    Character(1) &      	SUBS_BUTT_ALL		    Character(2)      -      	L_BRACK_SUBS_BUTT_LOW	    Character(1) &      	SUBS_BUTT_LOW		    Character(2)      -      	L_BRACK_SUBS_BUTT_MED	    Character(1) &      	SUBS_BUTT_MED		    Character(2)      .      	L_BRACK_SUBS_BUTT_HIGH	    Character(1)'      	SUBS_BUTT_HIGH		    Character(2)       ,      	SUBS_BUTT_MED_LETTER	    Character(2)-      	SUBS_BUTT_HIGH_LETTER	    Character(2) /      	L_BRACK_SUBS_MED_LETTER	    Character(1) /      	L_BRACK_SUBS_HIGH_LETTER    Character(1)       3              SUBS_BUTT_ALL_LETTER	    Character(2) /      	L_BRACK_SUBS_ALL_LETTER	    Character(1)       *      	INTER_ALL_BANK_SET	    Byte integer      .     	L_BRACK_INTER_BUTT_ALL	    Character(1)'     	INTER_BUTT_ALL		    Character(2)      .     	L_BRACK_INTER_BUTT_LOW	    Character(1).             INTER_BUTT_LOW		    Character(2)     .     	L_BRACK_INTER_BUTT_MED	    Character(1).             INTER_BUTT_MED		    Character(2) 	    / 
    	L_BRACK_INTER_BUTT_HIGH	    Character(1) /             INTER_BUTT_HIGH		    Character(2)      4 
            INTER_BUTT_MED_LETTER	    Character(2)/     	L_BRACK_INTER_MED_LETTER    Character(1)      5             INTER_BUTT_HIGH_LETTER	    Character(2) /     	L_BRACK_INTER_HIGH_LETTER   Character(1)      4             INTER_BUTT_ALL_LETTER	    Character(2)/     	L_BRACK_INTER_ALL_LETTER    Character(1)      (     	IBASIC_BUTT_ALL		    Character(2)     -             PLAYER_TXT		    Character(40)   !     	DECISION		    Character(1) !     	WIN_TYP			    Character(8) 5             SELECT_SPEC_DRAW	    Character(2)       (     	TEST_MODE_BUTTON	    Character(1)     6             FILE_FORMAT_PC_BUTTON       Character(1)6             FILE_FORMAT_MAG_TAPE_BUTTON Character(1)#      	IS_OK			    Longword Integer  !        End Data "     #        Copy- $            "PUBLIC_SRC:LANGUAGES.IFDL_INC"  %        End Copy@ &  C /*  CMS REPLACEMENT HISTORY, Element LANGUAGES.IFDL_INC */I '  C /*  *6    21-NOV-2003 10:26:07 JHM "[082-B1 ] Add Tatts-english" */ D (  C /*  *5    11-SEP-2002 16:05:04 MLA "[072-16 ] Added Arabic" */U )  C /*  *4    11-DEC-2000 14:38:23 PLN "[063-37 ] Added a new language - Polish" */ _ *  C /*  *3    27-SEP-1999 15:49:51 JHM "[063    ] Adding new languages Spanish and Hebrew" */ X +  C /*  *2    17-AUG-1999 21:17:50 PLN "[051-26 ] Added a new language - Hungarian" */\ ,  C /*  *1    28-JUN-1996 14:21:48 PLN "Language definitions for use by DECforms files" */@ -  C /*  CMS REPLACEMENT HISTORY, Element LANGUAGES.IFDL_INC */L .  C /* @@ ****************************************************************L /  C **  Copyright  EssNet AB                                           **L 0  C **                                                                  **L 1  C **  MODULE    : Language definitions.                               **L 2  C **                                                                  **L 3  C **  TYPE      : DecForms (IFDL) include file.                       **L 4  C **                                                                  **L 5  C **  FILE NAME : languages.ifdl_inc                                  **L 6  C **                                                                  **L 7  C **  USAGE     : Copy                                                **L 8  C **                  "publi