#!/bin/sh

VERSION=$1

if [ ! -f glib-$VERSION.tar.gz ]; then
	echo "ERROR: glib-$VERSION.tar.gz does not exist..."
	exit 1
fi

echo ""

echo "Checking glib-$VERSION.tar.gz..."
tar xfz glib-$VERSION.tar.gz


for file in README NEWS
do
	echo -n "$file... "
	if [ "x`grep $VERSION glib-$VERSION/$file | wc -l | awk -F' ' '{print $1}'`" == "x1" ]; then
		echo "ok"
	else
		echo "failed."
		exit 1
	fi
done

echo -n "INSTALL..."
if [ "x`grep $VERSION glib-$VERSION/INSTALL | wc -l | awk -F' ' '{print $1}'`" == "x2" ]; then 
	echo "ok" 
else
	echo "failed."
	exit 1
fi

echo ""
echo "Number of lines in created documentation files:"

wc -l glib-$VERSION/docs/*.html | grep -v total
wc -l glib-$VERSION/docs/*.info | grep -v total

rm -rf glib-$VERSION
                                                                                                                                                                                                                                                                                    d CPU time:        0 00:00:01.97      Elapsed time:       0 00:06:18.67F.EXE" B         -------------------------------------------------------- :   BKG          job terminated at 18-MAY-2005 10:19:13.50 
  Accounting information:EQ   Buffered I/O count:               6880      Peak working set size:       2176 Q   Direct I/O count:                  567      Peak virtual size:         169872 Q   Page faults:                       370      Mounted volumes:                0tQ   Charge    I   **	The program processes 3 Main Transactions:                          **INK  **                                                                          **NI@  **	1. Pay Transaction                                                  **I'X  **	2. Cancel Pay Transaction					    **'/  **	3. High Winner Request Transaction				    **/N f  **                                                                          **N                                                                        N  **  INTERFACES/ENTRY POINTS:                                                **NN`s  **                                                                          **NI   **	MBX_OP_PAY       : Mailbox at which OP_PAY receives messages from   **IB  **		           OP_MAIN and OP_TPCTRL.                           **B@  **								            **I  **	MBX_OP_PAY_UPD   : Mailbox at which OP_PAY receives messages        **I                                                                    ;  **			   from OP_MAIN.                                    **;N   **                                                                          **NI!  **	MBX_OP_MAIN_TRANS: Mailbox to which OP_PAY returns messages to      **I`  **			   OP_MAIN.					    **N /  **                                                                          **NN  **  ENVIRONMENT: OP_PAY is one of a number of cooperating processes         **N                                                                   N@<  **               started and stopped by OP_TPCTRL.                          **NN  **                                                                          **NNI  **                                                                          **NO   ** ^^ ************************************************************************/O V   `  #include <descrip.h> d  #include <errno.h>  #include <iodef.h>@q  #include <lib$routines.h>  #include <libdef.h>               ~  #include <math.h> 	  #include <rms.h>
  #include <ssdef.h>`  #include <starlet.h> 
  #include <stdio.h>  #include <string.h> @   ,  #include "elos_src:amf_str.h"   #include "elos_src:asa_cb_str.h" & :  #include "elos_src:asa_gbl_info_str.h"&!  #include "elos_src:asa_rec_str.h"!`G  #include "elos_src:asa_str.h"   #include "elos_src:cur_str.h"T  #include "elos_src:dia_str.h" @  #include "elos_src:tp_mem_str.h"                              &a  #include "elos_src:tp_mem_games_str.h"&  #include "elos_src:rvc_str.h"  o!  #include "elos_src:open_close.h" "  #include "elos_src:srf_str.h""`|$  #include "elos_src:hdr_flds_str.h""! &  #include "elos_src:txn_hdr_str.h"!#'  #include "elos_src:txn_route_str.h"#@)  #include "elos_src:mul_str.h"*  #include "elos_src:pcf_str.h",  #include "elos_src:tcs_str.h"" -  #include "elos_src:tran_id_flds.h"""*/  #include "elos_src:trans_object.h""                           #`0  #include "elos_src:trans_rec_str.h"#" 82  #include "elos_src:txn_addr_str.h""#3  #include "elos_src:txn_state_str.h"#@E5  #include "elos_src:vwt_str.h"6  #include "elos_src:wid_str.h"+R8  #include "elos_src:front_counter_cps_str.h"+& 9  #include "elos_src:elos_date_pkg_pt.h"&"_;  #include "elos_src:money_pkg_pt.h"" `<  #include "elos_src:igf_pkg_pt.h" " m>  #include "elos_src:tra_debug_pt.h"" ?  #include "elos_src:tra_pkg_pt.h"  @zA                                         C  #include "public_src:common.h")D  #include "public_src:customer_id_tbl.h"  ) F  #include "elos_src:sysparams.h"$G  #include "elos_src:parameter_elos.h"$`I  #include "elos_src:lic_def.h" J  #include "elos_src:cuspar.h"(L  #include "elos_src:amf_def.h"@M  #include "elos_src:asa_def.h"5O  #include "elos_src:cur_def.h"P  #include "elos_src:dia_def.h" CR  #include "elos_src:pcf_def.h" S  #include "elos_src:tp_mem_def.h"                                          `PU  #include "public_src:efl_def.h" V  #include "public_src:erl_pkg.h"]X  #include "elos_src:srf_def.h"@Y  #include "public_src:mbx_def.h"j[  #include "elos_src:rvc_def.h"\  #include "elos_src:tra_def.h" x^  #include "elos_src:txn_def.h"_  #include "elos_src:txn_tbl.h"`a  #include "elos_src:filenames.h"! c  #include "public_src:file_desc.h"!d  #include "public_src:onlmess.h""@f  #include "public_src:vms_status.h""!g  #include "public_src:languages.h"!    &i  #include "elos_src:etr_def.h"$ j  #include "elos_src:op_pay_log_txt.h"$ 3l  #include "elos_src:op_pay_txt.h" &`m  #include "elos_src:repl_receipt_def.h"& Ao  #include "elos_src:tip_def.h"#p  #include "elos_src:pl_coupon_str.h"#@Nr  #include "elos_src:ows_str.h" s   "[u  #include "public_src:byt_pkg_pt.h""% v  #include "public_src:erl_logerr_pt.h"%'hx  #include "public_src:lan_language_pt.h"'%`y  #include "public_src:period_pkg_pt.h"%                                     # v{  #include "public_src:sys_serv_pt.h"##|  #include "public_src:time_pkg_pt.h"#"@~  #include "public_src:tim_int_pt.h""!	  #include "elos_src:node_pkg_pt.h"!  #include "elos_src:asa_io_pt.h"    #include "elos_src:asr_pkg_pt.h"   #include "elos_src:cur_io_pt.h" `$  #include "elos_src:cus_pkg_pt.h"    #include "elos_src:dia_io_pt.h" 1  #include "elos_src:efl_int_pt.h"  @  #include "elos_src:etr_pkg_pt.h"  >  #include "elos_src:fog_lib_pt.h"                       ō  #include "elos_src:gdf_io_pt.h"! L  #include "elos_src:image_io_pt.h"! Ґ  #include "elos_src:its_pkg_pt.h"  `Y  #include "elos_src:lic_pkg_pt.h"    #include "elos_src:mbx_io_pt.h"f  #include "elos_src:mul_io_pt.h"@  #include "elos_src:tcs_io_pt.h"s  #include "elos_src:ows_io_pt.h"   #include "elos_src:ows_pkg_pt.h"    #include "elos_src:pcf_io_pt.h"  #include "elos_src:round_pt.h"`  #include "elos_src:rvc_io_pt.h"                                        #include "elos_src:srf_io_pt.h"  #include "elos_src:tgp_io_pt.h"#@"  #include "elos_src:tp_mem_pkg_pt.h"#ਤ  #include "elos_src:tra_io_pt.h"$/  #include "elos_src:txns_search_pt.h"$'   #include "elos_src:throughput_pkg_pt.h"' <  #include "elos_src:wid_pkg_pt.h" `ê  #include "elos_src:vwt_io_pt.h"% J  #include "elos_src:pl_coupon_io_pt.h"%'Э  #include "elos_src:pl_coupon_misc_pt.h"'@W  #include "elos_src:i2d_str.h"%ݰ  #include "elos_src:i2d_info_pkg_pt.h"%    %d  #include "elos_src:draw_game_io_pt.h"%   #include "elos_src:sqlcommon.h"q  #include "elos_src:tif_io_pt.h"`  #include "elos_src:tif_def.h"   #include "elos_src:tc_pkg_pt.h"    @  $  /* ------------------------------ */$$  /* CONSTANT AND MACRO DEFINITIONS */$$    /* ------------------------------ */$    `-  #define PROG_NAME  "OP_PAY"     :  #define	PAID_STATUS( i ) \5@      ( ( OWS_CUR_PAYSTATUS    ( i ) EQL PS_PAID ) OR \5          rn;p 	    } 	    cpay_no++;I 	    break;s   	case CSEL_TYPE:  1 	    TIF_WID( tif_p ) = CAN_SELL_V8_WID( tra_p );	  * 	    /* =============================== */* 	    /* Handle subscription cancel sell */* 	    /* =============================== */  N 	    if ( BIT_SET( CAN_SELL_V8_STATISTICS( tra_p ), SUBSCRIPTION_BIT      ) ORG 		 BIT_SET( CAN_SELL_V8_STATISTICS( tra_p ), SUBSCRIPTION_ACT_BIT  ) OR H 		 BIT_SET( CAN_SELL_V8_STATISTICS( tra_p ), SUBSCRIPTION_PROL_BIT ) ) {  e 		status = find_tif_file ( &tif_id, tra_p, tif_p, wid_extract_dayno ( CAN_SELL_V8_WID_PTR(tra_p) ) );  		 		if ( OKAY(status) ) {E  5 		    status = tif_write( tif_id, ( char * ) tif_p );A 		    if ( OKAY(status) ) {) 			*was_written_p = TRUE;O 		    }T9 		    if ( NT OKAY ( status ) AND status NEQ RMS$_DUP ) {ln 			erl_runerror( status, logfile_idx, PP_TRANSF_420_WRITETIF, wid_extract_dayno(CAN_SELL_V8_WID_PTR(tra_p)) );
 			return; 		    }( 		}p: 		else if ( NT OKAY ( status ) AND status NEQ RMS$_FNF ) {  s 		    erl_runerror( status, logfile_idx, PP_TRANSF_410_OPENTIF, wid_extract_dayno ( CAN_SELL_V8_WID_PTR(tra_p) ) );C 		    return ; 		}			  6 		status = find_tif_file ( &tif_id, tra_p, tif_p, 0 ); 		if ( status EQL RMS$_FNF ) {  ' 		    tif_make_path( tif_filename, 0 ); 3 		    status = tif_create( tif_filename, &tif_id );b  ! 		    if ( NT OKAY ( status ) ) { L 			erl_runerror( status, logfile_idx, PP_TRANSF_400_CREFILE, tif_filename );
 			return; 		    }   : 		    status = find_tif_file ( &tif_id, tra_p, tif_p, 0 ); 		}6   		if ( NT OKAY ( status ) ) {lD 		    erl_runerror( status, logfile_idx, PP_TRANSF_430_OPENTIF, 0 ); 		    return ; 		}C  1 		status = tif_write( tif_id, ( char * ) tif_p );d 		if ( OKAY(status) ) {R 		    *was_written_p = TRUE; 		}T5 		if ( NT OKAY ( status ) AND status NEQ RMS$_DUP ) { D 		    erl_runerror( status, logfile_idx, PP_TRANSF_440_WRITETIF, 0);
 		    return;N 		}(   		subs_csel_no++;P 		break; 	    }  & 	    /* =========================== */& 	    /* Handle ordinary cancel sell */& 	    /* =========================== */  h 	    status = find_tif_file ( &tif_id, tra_p, tif_p, wid_extract_dayno ( CAN_SELL_V8_WID_PTR(tra_p) ) );! 	    if ( status EQL RMS$_FNF ) { 	 		return;  	    }% 	    else if ( NT OKAY ( status ) ) {D= 		erl_runerror( status, logfile_idx, PP_TRANSF_240_OPENTIF );{
 		return ;	 	    }			D  4 	    status = tif_write( tif_id, ( char * ) tif_p ); 	    if ( OKAY(status) ) { 		*was_written_p = TRUE; 	    }8 	    if ( NT OKAY ( status ) AND status NEQ RMS$_DUP ) {p 		erl_runerror( status, logfile_idx, PP_TRANSF_250_WRITETIF, wid_extract_dayno ( CAN_SELL_V8_WID_PTR(tra_p) ) );	 		return;_ 	    }   	    csel_no++;  	    break;_   	case HIWI_TYPE:  - 	    TIF_WID( tif_p ) = HIWI_V6_WID( tra_p );E  c 	    status = find_tif_file ( &tif_id, tra_p, tif_p, wid_extract_dayno( HIWI_V6_WID_PTR(tra_p) ) );P! 	    if ( status EQL RMS$_FNF ) {P	 		return;) 	    }% 	    else if ( NT OKAY ( status ) ) { = 		erl_runerror( status, logfile_idx, PP_TRANSF_260_OPENTIF );E
 		return ;	 	    }			E  4 	    status = tif_write( tif_id, ( char * ) tif_p ); 	    if ( OKAY(status) ) { 		*was_written_p = TRUE; 	    }8 	    if ( NT OKAY ( status ) AND status NEQ RMS$_DUP ) {k 		erl_runerror( status, logfile_idx, PP_TRANSF_270_WRITETIF, wid_extract_dayno( HIWI_V6_WID_PTR(tra_p) ) );O	 		return;T 	    } 	    hiwi_no++;M 	    break;    	case EOD_TYPE:L  * 	    switch ( HDR_TXN_VERSION( tra_p ) ) {8 		case 2:		eod_pg_id = EOD_V2_PAY_GAME ( tra_p );	break;< 		default:    	eod_pg_id = EOD_V1_PAY_GAME ( tra_p );	break; 	    }  0 	    if ( NTB_PAYGAME_FREQ_DRAW( eod_pg_id ) ) {  @ 		/* -------------------------------------------------------- */@ 		/* This is a Frequent Draw Game - Skip Closing & Re-Opening */@ 		/* -------------------------------------------------------- */ 		;T 	    } 	    else {b  F 		/* -------------------------------------------------------------- */F 		/* Close the tif file so backup/ignore=interlock gets all records */F 		/* -------------------------------------------------------------- */   		close_tif_files ();t  , 		status = ed_get_current ( &this_acc_day ); 		if ( NT OKAY(status) ) {Z 		    erl_fatalerror( status, logfile_idx, PP_TRANSF_170_FUNC_ERR, "ed_get_current(..)" ); 		}     . 		tif_make_path( tif_filename, this_acc_day );  : 		status = tif_open_write( tif_filename, &tif_id_vec[0] ); 		if ( NT OKAY ( status ) ) {-T 		    erl_runerror( status, logfile_idx, PP_TRANSF_120_OPNFILE, tif_filename, "D" );
 		    return;  		}*  $ 		tif_id_acct_per[0] = this_acc_day; 		tif_id_count   [0] = 1;f 		nbr_open_tif++;_   	    }   	    break;l   	case EOA_TYPE:    	    *EOA_Transaction_p = TRUE;a   	    break;t       } /* switch */   }i      F /* @@ ****************************************************************F **                                                                  **> **  FUNCTION NAME       : start_digital_sign_procedure		    **F **                                                                  **F **********************************************************************F **                                                                  **F **  DESCRIPTION         : This procedure starts a detached process  **F **                        which may perform Digital Signiture.      **F **                        The procedure invoked in the detached     **F **                        process must be provided by other parties.**F **                                                                  **$ **  ASSUMPTIONS         :					    **F **                4d  static boolean             chipcard_payout = FALSE; 47@rf  static boolean             claim_slip_support = FALSE; 78g  static boolean             online_pay_permitted = TRUE; 8.i  static boolean             paid_out_nwy_info; .: k  static boolean             ps_payout_greater_win = FALSE; :@l  static boolean             ps_allow_claimed_unconfirmed = FALSE;@<`n  static int                 ps_payout_rounding_method    = 0;< o  static int		   no_mul = 0;                            q  static int		   max_no_mul = 0;(@r  static boolean		   use_cancel_pay_limit;(-t  struct mul_str		   *mul;@u  static unsigned char       dg_to_dgcode[ MAX_MAX_DRAW_GAMES+1 ];@( ;w  static double		   hiwi_low_amount_limit;(5x  static boolean             tcs_can_statistics = TRUE;56`Hz  static boolean             tcs_file_opened    = FALSE;62 {  static dayno_id            tcs_current_dayno  = 0;2"U}  static file_id             tcs_id;"                                               4@~  static unsigned int        tcs_count_threshold  = 0;43b  static double              tcs_amo_threshold = 0.0;3)  static int                 cc_period = 0;)% p  static short               this_node;%7  static boolean             use_alt_security_no = FALSE;78`}  static boolean             can_flag_in_pay_trans = TRUE;89   static boolean             forced_repair         = FALSE;99  static boolean             ps_pay_not_on_file    = FALSE;9                                      j@  static boolean             it_individual_licence = FALSE;   /* Individual Instant Ticket Sell license.  */j5  static dayno_id            ows_purge_dayno       = 0;5    3   #define CLAIM_SLIP	  ( claim_slip_support == TRUE )3 +   8`  #define PAY_METHOD_0      ( online_pay_method == 0 )/**/81 9  #define	PAY_METHOD_1	  ( online_pay_method == 1 )11  #define	PAY_METHOD_2	  ( online_pay_method == 2 )11@F  #define	PAY_METHOD_3	  ( online_pay_method == 3 )1 ̘              