' Additions to START.PF3 since Version 2.52
'     See below for changes since 2.30
' Remove the folllowing code block and replace it with code
' block shown below.


' ******************************************************
' OLD CODE BLOCK
' ******************************************************
   label top

   $str=getenv("ANGIIAPL")
   if len($str)=0
      message "A Home Directory has not been specified."&"Aborting to O/S"&"Press a key..."
      quit quit
   elseif right($str,1)<>$$dirsep
      $str=$str|$$dirsep
   end if
   $$homedir=$str

   $$advr=getenv("ANGIIDVR")
   if len($$advr)=0
      if #osmode <> 3
	 $$advr="\angoss\apsys"|getenv("ANGLANG")|"\shell\"
      else
	 $$advr=first_path(getenv("ANGOSS")|"apsys"|getenv("ANGLANG")|"/shell/")
      end if
   elseif right($$advr,1)<>$$dirsep
      $$advr=$$advr|$$dirsep
   end if

   if file($str|"angoss.cfg")
      read_config($str,#osmode)
   elseif file(path(5)|"angoss.cfg")
      read_config(path(5),#osmode)
   else
' CREATE ANGOSS.CFG
      if len($str)=0
	 screen clear box scrheight-3 1 scrheight scrwidth ##comfg ##combg no-border
	 screen print scrheight-3 1 ##comfg ##combg "angoss.cfg not found."&"Enter main directory of application."
	 $str=path(5)
	 screen input scrheight-2 1 ##comfg ##combg 50 $str path(5)
	 if $str=""
	    $str=path(5)
	 end if
      end if

      if right($str,1)=$$dirsep
	 $str=left($str,len($str)-1)
      end if
' Calculate System Name
      $sysname=""
      for #count=len($str) to 1 step -1
	 if mid($str,#count,1)=$$dirsep
	    $sysname=right($str,len($str)-#count)
	    exit for
	 end if
      end for

' ******************************************************
' NEW CODE BLOCK
' ******************************************************

public  $$oa_start    ' Info for starting from OA module
		      '   group 1=$$homedir, [group 2=$$advr]

   label top

' Calculate $$HOMEDIR and $$ADVR
	if len($$oa_start)>0
		$$homedir = group($$oa_start,1)
		$$advr = group($$oa_start,2)
	else
		$$homedir=getenv("ANGIIAPL")
		if len($$homedir)=0
			message "A Home Directory has not been specified."&"Aborting to O/S"&"Press a key..."
			quit quit
		end if
		$$advr=getenv("ANGIIDVR")
	end if
	if len($$advr)=0
		$str = getenv("ANGOSS")
		if len($str)>0
			$angoss_dir = first_path($str)
			if right($angoss_dir,1)<>$$dirsep
				$angoss_dir = $angoss_dir | $$dirsep
			end if
		else
			$angoss_dir = left(path(syspath),len(path(syspath))|len("oasys"|getenv("ANGLANG")|$$dirsep))
		end if
		$$advr = $angoss_dir|"apsys"|getenv("ANGLANG")|$$dirsep|"shell"
	end if
	if right($$homedir,1)<>$$dirsep
		$$homedir=$$homedir|$$dirsep
	end if
	if right($$advr,1)<>$$dirsep
		$$advr=$$advr|$$dirsep
	end if

   if file($$homedir|"angoss.cfg")
	read_config($$homedir,#osmode)
   elseif file(path(5)|"angoss.cfg")
	read_config(path(5),#osmode)
   else
' CREATE ANGOSS.CFG
' Calculate System Name
      $str = left($$homedir,len($$homedir)-1)
      $sysname=""
      for #count=len($str) to 1 step -1
	 if mid($str,#count,1)=$$dirsep
	    $sysname=right($str,len($str)-#count)
	    exit for
	 end if
      end for



' ******************************************************
' ******************************************************
' Additions to START.PF3 since Version 2.30
' Add these items to START.PF3, if you have customized it
' 	-Changes support voice & password modifications
' ******************************************************
' ******************************************************


public  ##mod_noch    'Menu is a special No Change Module (module = 5)

' VOICE AOF TRIO & RECORD & FIELD START/END SYMBOLS
'----------------------------------------------
public	$$vaof_strec	' Action Object Function START RECORD
public  $$vaof_act	' Action start code
public  $$vaof_obj	' Object start code
public  $$vaof_fct	' Function start code
public  $$vaof_enrec	' End of AOF record
public  $$v_act		' Action from voice module
public  $$v_obj		' Object from voice module
public  $$v_fct		' Function from voice module

external file_load		(4) 'Central load routine

public  ##ss_ld_fct   ' Spreadsheet loading function
public  ##wp_ld_fct   ' Wordprocessor loading function
public  ##db_ld_fct   ' Database loading function

' Change the following:
'    file load custom-view $$syspath|XL("dv_info")
' to:
'    file_load( XL("vw"), $$syspath|XL("dv_info"),0 ,1 )


    "@(#)start_ch.txt	3.3 - 94/02/19" '	SID
    $$vaof_strec = chr(255)
    $$vaof_act = chr(254)
    $$vaof_obj = chr(253)
    $$vaof_fct = chr(252)
    $$vaof_enrec = chr(251)


' Additions to START.PF3 since Version 2.5
' Make the following changes to START.PF3 if you have customized it
'	-Changes support voice and new DV_INFO variables.


' The following variables (lines may be removed)
public  ##voice_mode  'Voice mode (0=off, 1=on)
public  ##vooks       'Key stroke to turn on and off voice (whole word recog)


public  $$winf[30]    'view name (with ext) & path & key fld name
public  ##wins        'number of open windows

public  $$keys        ' Key Fields
public  $$kycl        ' Key Field Command List for find
		      ' equal to $$keys except " " substituted with " "
public  $$kytp        ' Key Types N=No Dupes, D=Dupes (Positional)

public  $$vaof_views	' Views start code
public  $$v_views	' Menu Names were AOF Trio exists

' Remove The Following lines:

    ##vooks = {Alt-V}

    window border

    ##wins=1


' Add the following public variables (Current view section)

public  $$keys[15]    ' Key Fields
public  $$key_types[15] ' Key Types (Upper/lower case)
public  $$key_alias[15] ' Alias for key fields
public  ##num_keys    ' Number of key fields
public  ##key_prompt  ' Prompt type 0 auto, 1 bar menu, 2 prompter
public  $$updel_expr  ' Expression to test UPDATE/DELETE
public  ##border      ' Border on View


' Add the following version checking lines immediately after the lines
'      execute $$advr|XL("login") in-memory
'   end if


 	error off
 	clearerror
 	if [dv_info.Version]<>"2.6"
 		message XS("Incorrect version number on dv_info.vw.")&XS("Press a key...")
 		quit quit
 	end if
 	if lerror>0
 		message XS("Old version of dv_info.vw.")&XS("Press a key...")
 		execute $$advr|"up25-26" in-memory
 	end if

' Add the following lines immediately after the lines:
'      execute XL("title_pg") in-memory
'   end if

   if voiceinfo(v_statemgr)
	voiceinfo(v_modswstate,0) ' TURN OFF STATE SWITCHING DURING
				  ' MODULE SWITCH TO PRESERVE MENU STATES
   end if

