Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 089a7977278f50a2b752528ac8bbe012 > files > 5

dosemu-1.4.0.8-9.mga5.x86_64.rpm

##############################################################################
# WARNING: THIS FILE IS NOT USED BY DEFAULT. ADJUST dosemu.users OR USE -F.
#
# This file is global.conf. By default a compiled-in copy is used. If you
# make custom changes to the settings in this file, then you need to use 
# the -F switch or change dosemu.users; the custom file is then parsed
# after the built-in copy.
#
# Linux dosemu  configuration  for parser versions >= 3 (dosemu-0.97.0.1)
#
# ./doc/README-tech.txt (chapter 2.) contains a description of the syntax
# and the usage. However, you normally won't edit this file !!
#
# NOTES:
#
# 1. The file dosemu.conf (and optionally ~/.dosemurc) contains variable
#    settings, that are included by global.conf for doing the
#    most reasonable configuration.
#    The file dosemu.conf (and optionally ~/.dosemurc) is what gets
#    updated by the menu driven 'setup-dosemu' tool.
#
# 2. We strongly recommend you to edit ONLY dosemu.conf.
#    If you change global.conf, you are at your own and could break
#    'setup-dosemu'.  You really need to know a lot of DOSEMU
#    internals before you fiddle with editing global.conf.
#    However, some very special cases can only be handled in global.conf.
#    
# 3. The file global.conf (this one) is either
#      - the one compiled into dosemu.bin.
#      - specified by the config_script option in dosemu.users ("builtin" 
#        by default)
#      - or given via the -F option (from root login, else only on
#        non-suid-root DOSEMU)
#
# 4. The only compiled-in path is /etc/dosemu.users (or if not found
#    /etc/dosemu/dosemu.users), however, this can be overridden by
#    --Fusers, if not running suid-root. All other paths are configurable
#    and the dosemu binaries can reside everywhere in the system.
#
# This file (global.conf) may also serve as an example file for
#      .dosrc            ( old style user configuration file )
#      option -I         ( configuration via commandline, see man/dos.1 )
#
# Access rights for suid-root running DOSEMU sessions are defined in
#
#      /etc/dosemu.users or /etc/dosemu/dosemu.users
#
##############################################################################

ifdef u_forceold
  undef parser_version_3
  define version_3_style_used
endif

ifndef parser_version_3
  # normally won't come here, because older DOSEMUs don't use this file
  # ... but if using -F option ...
  include "/etc/dosemu.conf"
else
  # we are on version 3 parser

  ## we set some vital variable

  if (!strlen($DOSEMU_LIB_DIR))
    # be sure, because older DOSEMU won't set this
    $DOSEMU_LIB_DIR = "/var/lib/dosemu";
    $DOSEMU_CONF_DIR = "/etc";
    $DOSEMU_HDIMAGE_DIR = $DOSEMU_LIB_DIR;
  else
    if (!strlen($DOSEMU_HDIMAGE_DIR))
      $DOSEMU_HDIMAGE_DIR = $DOSEMU_LIB_DIR;
    endif
    # make sure we have absolute paths
    shell("test -d ", $DOSEMU_HDIMAGE_DIR)
    if ($DOSEMU_SHELL_RETURN)
      $DOSEMU_HDIMAGE_DIR = /var/lib/dosemu
    else
      $DOSEMU_HDIMAGE_DIR = shell("cd ", $DOSEMU_HDIMAGE_DIR, "; pwd -P");
      $DOSEMU_HDIMAGE_DIR = strdel($DOSEMU_HDIMAGE_DIR, strlen($DOSEMU_HDIMAGE_DIR)-1, 1);
    endif
    shell("test -d ", $DOSEMU_LIB_DIR)
    if ( $DOSEMU_SHELL_RETURN)
      $DOSEMU_LIB_DIR = "/var/lib/dosemu";
    else
      $DOSEMU_LIB_DIR = shell("cd ", $DOSEMU_LIB_DIR, "; pwd -P");
      $DOSEMU_LIB_DIR = strdel($DOSEMU_LIB_DIR, strlen($DOSEMU_LIB_DIR)-1, 1);
    endif
  endif

  $CONFIG_VERSION = ( (1 << 24) | (1 << 16) | (4 << 8) | 0)
  #                    ^           ^           ^         ^
  if ( $DOSEMU_VERSION_CODE < $CONFIG_VERSION )
    abort "
*** sorry, your ", $DOSEMU_LIB_DIR, "/global.conf doesn't match this dosemu version
"
  endif

  $LIST_DELIM = " ,	"	#delimiters for lists <tab>, blank, comma

  # for non-suid-root we can switch off restricted checking.
  if (strlen($DOSEMU_LAX_CHECKING))
    undef restricted
    undef guest
  endif

  # we include the global settings from $DOSEMU_CONF_DIR/dosemu.conf
  if (strlen($DOSEMU_CONF_DIR))
    shell("test -f ", $DOSEMU_CONF_DIR, "/dosemu.conf")
    if ( $DOSEMU_SHELL_RETURN)
      $DOSEMU_CONF_DIR = ""
    endif
  endif

  undef version_3_style_used    # unset it to have a valid check below
  if (strlen($DOSEMU_CONF_DIR))
    $xxx = 'include "', $DOSEMU_CONF_DIR, '/dosemu.conf"';
    $$xxx;
    ifndef version_3_style_used
      abort "
*** Your ", $DOSEMU_CONF_DIR, "/dosemu.conf is obviously an old style or a too simple one.
    Please read Quickstart and README.txt on how to upgrade.
"
    endif
  endif

  ## we check if we have an ${HOME}/.dosemurc (given by $DOSEMU_RC),
  ## if yes, we include it here 'under user scope', which means it has
  ## all c_* classes undefined and can only change environment variables in
  ## its own isolated name space (prefixed with 'dosemu_').
  ## We later take over only such variables, that we allow.

  $_dosemurc = $DOSEMU_RC         # we get that passed from 'parse_config()'
  shell("test -f ", $_dosemurc)
  if ( (!$DOSEMU_SHELL_RETURN) ) 
    # we have a .dosemurc and can include
    $_dosemurc = ' include "', $_dosemurc, '"';
    if (!strlen($DOSEMU_LAX_CHECKING))
      enter_user_scope;
    endif
    $$_dosemurc;
    if (!strlen($DOSEMU_LAX_CHECKING))
      leave_user_scope;
    endif
    define skip_dosrc;

    ## now we take over the allowed variables, only those which exist
    ## with 'dosemu_' prefixed will overwrite those without the prefix.

    checkuservar $_debug, $_trace_ports,
      $_features, $_mapping, $_hogthreshold, $_cli_timeout, $_pic_watchdog,
      $_timemode,
      $_mathco, $_cpu, $_cpu_emu, $_rdtsc, $_cpuspeed, $_xms, $_ems,
      $_ems_frame, $_ems_uma_pages, $_ems_conv_pages,
      $_ext_mem, $_dpmi, $_dpmi_base, $_ignore_djgpp_null_derefs, $_emusys,
      $_emuini, $_dosmem, $_full_file_locks, $_lfn_support
    checkuservar
      $_term_char_set, $_term_color, $_term_updfreq, $_escchar, $_layout,
      $_xterm_title, $_rawkeyboard, $_video, $_console, $_graphics,
      $_external_char_set, $_internal_char_set
    checkuservar
      $_X_updfreq, $_X_title, $_X_title_show_appname, $_X_icon_name,
      $_X_keycode, $_X_blinkrate,
      $_X_font, $_X_mitshm, $_X_sharecmap, $_X_fixed_aspect, $_X_aspect_43,
      $_X_lin_filt, $_X_bilin_filt, $_X_mode13fact, $_X_winsize, $_X_gamma,
      $_X_fullscreen, $_X_vgaemu_memsize, $_X_lfb, $_X_pm_interface, $_X_mgrab_key,
      $_X_vesamode, $_X_background_pause
    checkuservar
      $_hdimage,
      $_com1, $_com2, $_com3, $_com4, $_mouse, $_mouse_dev, $_mouse_flags, $_mouse_baud,
      $_printer, $_printer_timeout, $_printer_command, $_printer_commands,
      $_lpt1, $_lpt2, $_lpt3,
      $_ipxsupport, $_ipx_network, $_netdev, $_novell_hack,
      $_sound, $_sb_base, $_sb_irq, $_sb_dma, $_sb_hdma, $_sb_dsp, $_sb_mixer, $_mpu_base,
      $_sound_driver,
      $_oss_min_frags, $_oss_max_frags, $_oss_stalled_frags, $_oss_do_post, $_oss_min_extra_frags,
      $_oss_dac_freq,
      $_joy_device, $_joy_dos_min, $_joy_dos_max, $_joy_granularity, $_joy_latency,
      $_vbootfloppy, $_cdrom, $_aspi
    $xxx = $_vnet
    checkuservar $_vnet
    if ($_vnet ne $xxx && $_vnet ne "tap")
      $_vnet = $xxx
    endif
    $xxx = $_pktdriver
    checkuservar $_pktdriver
    if ($_pktdriver ne $xxx && $_pktdriver && $_vnet ne "tap")
      $_pktdriver = $xxx
    endif
    $xxx = $speaker
    checkuservar $_speaker
    if ($speaker ne $xxx && $speaker eq "native")
      $speaker = $xxx
    endif
  endif
  ## end of .dosemurc inclusion

  if (strlen($_mapping)) $xxx = $_mapping else $xxx = "auto" endif
  mappingdriver $xxx;

  if (strlen($_debug))
    debug $_debug ;
  else
    debug { off }
  endif
  if (strlen($_trace_ports)) trace ports { $$_trace_ports } endif

  cpuspeed $_cpuspeed
  rdtsc $_rdtsc

  dosbanner on
  timer 0
  mathco $_mathco
  $xxx = "cpu ", $_cpu;
  $$xxx
  if (strlen($_cpu_emu))
    $xxx = "cpuemu ", $_cpu_emu;
    $$xxx
  else
    cpuemu off
  endif
  $_pm_dos_api = $_ems;		# disabling EMS disables also the translator
  if ($_ems || ($_dpmi && $_pm_dos_api))
    ems {
          ems_size $_ems
          ems_frame $_ems_frame
          ems_uma_pages $_ems_uma_pages
          ems_conv_pages $_ems_conv_pages
        }
  else
    ems off
  endif
  dpmi $_dpmi
  dpmi_base $_dpmi_base
  pm_dos_api $_pm_dos_api
  ignore_djgpp_null_derefs $_ignore_djgpp_null_derefs
  dosmem $_dosmem
  if ($_ext_mem)
    ext_mem $_ext_mem
  else
    ext_mem $_xms
  endif

  if ($_emusys ne "") emusys $_emusys endif
  if ($_emuini ne "") emuini $_emuini endif

  ## terminal stuff, we check a lot to insure proper operation

  terminal { color $_term_color  updatefreq $_term_updfreq  escchar $_escchar }
  xterm_title $_xterm_title
  video { vga }
  if ($_external_char_set ne "")
    charset { external $$_external_char_set }
  endif
  if ($_internal_char_set ne "")
    charset { internal $$_internal_char_set }
  endif

  ## X param settings

    if ($_X_keycode == -1)
      $xxx = "keycode 2"
    else if ($_X_keycode)
      $xxx = "keycode 1"
    else
      $xxx = "keycode 0"
    endif endif
    if ($_X_sharecmap) $xxx = $xxx, " sharecmap" endif
    if ($_X_aspect_43) $xxx = $xxx, " aspect_43" endif
    if ($_X_lin_filt) $xxx = $xxx, " lin_filt"  endif
    if ($_X_bilin_filt) $xxx = $xxx, " bilin_filt" endif
    $xxx = $xxx, " mode13fact ", $_X_mode13fact
    $xxx = $xxx, " gamma ", (int($_X_gamma * 100))
    $xxx = $xxx, " font '", $_X_font, "'"
    if (strlen($_X_winsize))
      $yyy = (strstr($_X_winsize,","))
      $yyy = " winsize (", strdel($_X_winsize,$yyy,999), ") , (",
              strsplit($_X_winsize,$yyy+1,999), ")"
      $xxx = $xxx, $yyy
    endif

    if (strlen($_X_vesamode))
      foreach $yyy (" 	", $_X_vesamode)
        $zzz = (strchr($yyy,","))
        $xxx = $xxx, " vesamode (", strdel($yyy,$zzz,999), "),(",
                      strsplit($yyy,$zzz+1,999), ") "
      done
    endif
    $xxx = $xxx, ' mgrab_key "', $_X_mgrab_key, '"'
    X { 
      title $_X_title title_show_appname $_X_title_show_appname      
      icon_name $_X_icon_name
      updatelines 25 updatefreq $_X_updfreq blinkrate $_X_blinkrate
      fixed_aspect $_X_fixed_aspect vgaemu_memsize $_X_vgaemu_memsize
      lfb $_X_lfb  pm_interface $_X_pm_interface mitshm $_X_mitshm
      background_pause $_X_background_pause fullscreen $_X_fullscreen $$xxx
    }

  # video settings
  if ($DOSEMU_STDIN_IS_CONSOLE eq "1")
    warn "dosemu running on console"
    $xxx = $_video
    if ($_console) $xxx = $xxx, " console"
       if ($_console == auto) $xxx = $xxx, " auto" endif
    endif
    if ($_graphics) $xxx = $xxx, " graphics"
       if ($_graphics == auto) $xxx = $xxx, " auto" endif
    endif
    $xxx = $xxx, " vbios_seg ", $_vbios_seg, " vbios_size ",
	        $_vbios_size, " memsize ", $_vmemsize
    if (strlen($_chipset)) $yyy = $_chipset else $yyy = "plainvga" endif
    $xxx = $xxx, " chipset ", $yyy
    if ($_vbios_post) $xxx = $xxx, " vbios_post " endif
    if ($_dualmon) $xxx = $xxx, " dualmon" endif
    if (strlen($_vbios_file)) $xxx = $xxx, " vgaemubios_file ", $_vbios_file endif
    video { $$xxx }
  else
    warn "dosemu not running on console"
    $xxx = $_video
    if (strlen($_vbios_file)) $xxx = $xxx, " vgaemubios_file ", $_vbios_file endif
    if ($_dualmon) $xxx = $xxx, " dualmon " endif
    if (strlen($xxx)) video { $$xxx } endif
  endif

  ## sound settings
  if ($_sound)
    sound_emu { sb_base $_sb_base
	        sb_irq $_sb_irq
		sb_dma $_sb_dma
		sb_hdma $_sb_hdma
	        sb_mixer $_sb_mixer
		sb_dsp $_sb_dsp
		mpu_base $_mpu_base
		sound_driver "oss"
	      }
    sound_emu $_sound
    oss_options { oss_min_frags $_oss_min_frags
		  oss_max_frags $_oss_max_frags
		  oss_stalled_frags $_oss_stalled_frags
		  oss_do_post $_oss_do_post
		  oss_min_extra_frags $_oss_min_extra_frags
		  oss_dac_freq $_oss_dac_freq
		}
  else
    sound_emu off
  endif

  ## joystick settings
  joystick_emu { joy_device $_joy_device joy_dos_min $_joy_dos_min
	joy_dos_max $_joy_dos_max joy_granularity $_joy_granularity
	joy_latency $_joy_latency }

  ## hacks
  cli_timeout $_cli_timeout
  pic_watchdog $_pic_watchdog
  timemode $_timemode

  full_file_locks $_full_file_locks
  lfn_support $_lfn_support

  ## serial
  $xxx = "'", $_ttylocks, "'"
  ttylocks { directory $$xxx namestub LCK.. }
  if (1) # no idea why but we need this...
    foreach $xxx (" ", "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16")
      $yyy = "com", $xxx
      $zzz = "$_com", $xxx
      $zzz = $$zzz
      if (strlen($zzz))
        if ($_mouse_dev eq $yyy)
          serial { mouse com $xxx device $$zzz }
	  if ($_mouse_internal)
	    mouse { internaldriver }
	  endif
          $_mouse = ""
        else
          if ($zzz eq "virtual")
            serial { com $xxx virtual }
          else
            serial { com $xxx device $$zzz }
          endif
        endif
      endif
    done
  endif

  ## mouse settings
  if ($_mouse_internal && (strstr($_mouse_dev,"com")<0))
    $xxx = ""
    if ($_mouse_baud)
      $xxx = "baudrate ", $_mouse_baud
    endif
    $xxx = $xxx, " device '", $_mouse_dev, "'"
    mouse { $$_mouse $$_mouse_flags $$xxx internaldriver }
  endif

  hogthreshold $_hogthreshold

  ## keyboard setting
  if ($DOSEMU_STDIN_IS_CONSOLE ne "1") $_rawkeyboard = (off) endif
  if ($_layout eq "auto")
    keyboard { layout auto  rawkeyboard $_rawkeyboard }
  else
    if ( strstr($_layout, "load") <0 )
      # we use the builtin keytables
      if (strlen($_layout)) $yyy = $_layout else $yyy = "us" endif
      keyboard { layout $$yyy  rawkeyboard $_rawkeyboard }
    else
      # we have to load a keytable
      $yyy = ""
      if (1) # no idea why (see com as well) but we need this...
        foreach $zzz ($LIST_DELIM, $_layout)
          if ($zzz ne "load")
            $yyy = $zzz
          endif
        done
      endif
      if (!strlen($yyy))
        abort "no keytable name in $_layout"
      endif
      shell("test -f ", $DOSEMU_LIB_DIR, "/keymap/", $yyy)
      if ( $DOSEMU_SHELL_RETURN)
        abort "keytable ",$yyy, "not found in ", $DOSEMU_LIB_DIR, "/keymap/*"
	      endif
      $_layout = 'include "keymap/', $yyy, '"' ;
      $$_layout
      keyboard { rawkeyboard $_rawkeyboard }
    endif
  endif

  $_disks = $_hdimage
  dexe { allowdisk }
  if (!strlen($_vbootfloppy))
    bootC                      # default boot mode is 'from C:'
  else
    bootA                      # default boot mode is 'from A:'
    $yyy = ""; $zzz = "";
    if (strlen($_vbootfloppy))
      foreach $xxx ($LIST_DELIM, $_vbootfloppy)
        if (strlen($yyy))
          $zzz = $xxx
        else
          $yyy = $xxx
        endif
      done
    endif
    if (strchr($yyy, "/") != 0)
      $yyyy = $HOME, "/.dosemu/", $yyy
      shell("test -f '", $yyyy, "'")
      if ($DOSEMU_SHELL_RETURN)
        $yyyy = $DOSEMU_CONF_DIR, "/", $yyy
      endif
      shell("test -f '", $yyyy, "'")
      if ($DOSEMU_SHELL_RETURN)
        $yyyy = $DOSEMU_HDIMAGE_DIR, "/", $yyy
      endif
      $yyy = $yyyy
    endif
    $_vbootfloppy = $yyy
    shell("test -d '", $yyy, "'")
    if ($DOSEMU_SHELL_RETURN)
      bootdisk { heads 2  sectors 18  tracks 80  threeinch file $_vbootfloppy }
    else
      bootdisk { threeinch directory $_vbootfloppy readonly }
    endif
    if (strlen($zzz))
      $_disks = $_hdimage
    endif
  endif
  if (strlen($_floppy_a))
    $zzz = strsplit($_floppy_a, strstr($_floppy_a, ":"), 999);
    if (strlen($zzz))
      $zzz = strsplit($zzz, 1, 999)
      $_floppy_a = strdel($_floppy_a, strstr($_floppy_a, ":"), 999);
    else
      $zzz = "/dev/fd0"
    endif
    $xxx = shell("test -r ", $zzz);
    if ($DOSEMU_SHELL_RETURN)
      warn "**** Warning: floppy ", $zzz, " not accessible, disabled";
    else
      shell("test -d '", $zzz, "'")
      if ($DOSEMU_SHELL_RETURN)
        floppy { device $$zzz $$_floppy_a }
      else
        floppy { directory $$zzz $$_floppy_a }
      endif
    endif
  endif
  if (strlen($_floppy_b))
    $zzz = strsplit($_floppy_b, strstr($_floppy_b, ":"), 999);
    if (strlen($zzz))
      $zzz = strsplit($zzz, 1, 999)
      $_floppy_b = strdel($_floppy_b, strstr($_floppy_b, ":"), 999);
    else
      $zzz = "/dev/fd1"
    endif
    $xxx = shell("test -r ", $zzz);
    if ($DOSEMU_SHELL_RETURN)
      warn "**** Warning: floppy ", $zzz, " not accessible, disabled";
    else
      shell("test -d '", $zzz, "'")
      if ($DOSEMU_SHELL_RETURN)
        floppy { device $$zzz $$_floppy_b }
      else
        floppy { directory $$zzz $$_floppy_a }
      endif
    endif
  endif
  fastfloppy 1

  ipxsupport $_ipxsupport
  ipx_network $_ipx_network
  novell_hack $_novell_hack
  if (strlen($_printer) || strlen($_printer_command))
    # backward compatibility
    if (!strlen($_printer))
      $_printer_commands = $_printer_command
    else
      if (!strlen($_printer_command))
        $_printer_command = "lpr"
      endif
      $_printer_commands = ""
      foreach $xxx ($LIST_DELIM, $_printer)
        $_printer_commands = $_printer_commands, $_printer_command, " -P", $xxx, ","
      done
    endif
  endif
  if (strlen($_printer_commands))
    foreach $xxx (",", $_printer_commands)
      $xxx = "'", strdel($xxx, 0, strspn($xxx, $LIST_DELIM)), "'"
      printer { command $$xxx timeout $_printer_timeout }
    done
  endif
  if (1) # no idea why but we need this...
    foreach $xxx (" ", "1 2 3")
      $yyy = "lpt", $xxx
      $zzz = "$_lpt", $xxx
      $zzz = $$zzz
      if (strlen($zzz))
        $zzz = "'", $zzz, "'"
        printer { lpt $xxx command $$zzz timeout $_printer_timeout }
      endif
    done
  endif

  if (strlen($_speaker))
    $xxx = "speaker ", $_speaker;
    $$xxx
  else
    speaker off
  endif
  ifdef restricted
    ## /etc/dosemu.users defined 'restricted' for this login
    define c_normal
    undef c_all
    if ($_vnet eq "tap" || !$_pktdriver)
      netdev $_netdev
      vnet $_vnet
      pktdriver $_pktdriver
    endif
    if ($_pci)
      pci auto
    endif
  else
    # here are the root requiring options
    if (strlen($_irqpassing))
      $yyy = "irqpassing { "
      if (strlen($_irqpassing))
        foreach $xxx (" ", $_irqpassing)
          $yyy = $yyy, "use_sigio ", $xxx
        done
      endif
      $yyy = $yyy, " }";
      $$yyy
    else
      irqpassing off
    endif
    if (strlen($_hardware_ram))
      hardware_ram { $$_hardware_ram }
    endif
    netdev $_netdev
    vnet $_vnet
    pktdriver $_pktdriver
    if (strlen($_ports)) ports { $$_ports } endif
    pci $_pci
  endif

  ## setting up hdimages
  if (strlen($_disks) && (!defined(c_dexerun)))
    $yyy = strsplit($_disks, 0, strpbrk($_disks, $LIST_DELIM) + 1)
    if (strlen($_disks))
     foreach $xxxx ($LIST_DELIM, $_disks)
      $xxx_pref = ""
      if ((strchr($xxxx, "*") + 1) && (strlen($xxxx) == strchr($xxxx, "*") + 1))
        $xxx_pref = strdel($xxxx, strlen($xxxx) - 1, 1);
        if (strchr($xxx_pref, "/") == 0)
          $xxxx = shell("cd '", $xxx_pref, "' 2>/dev/null && echo -n *")
        else
          $xxxx = shell("cd '", $HOME, "/.dosemu/", $xxx_pref, "' 2>/dev/null && echo -n *")
          if ($DOSEMU_SHELL_RETURN || $xxxx eq "*")
            $xxxx = shell("cd '", $DOSEMU_CONF_DIR, "/", $xxx_pref, "' 2>/dev/null && echo -n *")
          endif
          if ($DOSEMU_SHELL_RETURN || $xxxx eq "*")
            $xxxx = shell("cd '", $DOSEMU_HDIMAGE_DIR, "/", $xxx_pref, "' 2>/dev/null && echo -n *")
          endif
        endif
        if ($DOSEMU_SHELL_RETURN)
          $xxxx = strcat($xxx_pref, "*")
          $xxx_pref = ""
        endif
      endif
     if (strlen($xxxx))
     foreach $xxx ($LIST_DELIM, $xxxx)
      $xxx = strcat($xxx_pref, $xxx)
      if (!strncmp($xxx, "/dev/", 4))
        $yyy = strdel($xxx, strstr($xxx, ":ro"), 999);
        $zzz = strsplit($xxx, strstr($xxx, ":ro"), 999);
        if (strtol(strdel($xxx,0,8)) > 0)
          $yyy = "disk { partition ", $yyy;
        else
          $yyy = "disk { wholedisk ", $yyy;
        endif
        if (strlen($zzz))
          $yyy = $yyy, " readonly"
        endif
        $yyy = $yyy, " }";
        $$yyy;
      else
        $yyy = strdel($xxx, strstr($xxx, ":ro"), 999);
        $zzz = strsplit($xxx, strstr($xxx, ":ro"), 999);
        if (strchr($yyy, "/") != 0)
          $yyyy = $HOME, "/.dosemu/", $yyy
          shell("test -e '", $yyyy, "'")
          if ($DOSEMU_SHELL_RETURN)
            $yyyy = $DOSEMU_CONF_DIR, "/", $yyy
	  endif
          shell("test -e '", $yyyy, "'")
          if ($DOSEMU_SHELL_RETURN)
            $yyyy = $DOSEMU_HDIMAGE_DIR, "/", $yyy
	  endif
	  $yyy = $yyyy
        endif
        shell("test -d '", $yyy, "'")
        if (!$DOSEMU_SHELL_RETURN)
          if (strlen($zzz))
            disk { directory $yyy readonly };
          else
            disk { directory $yyy };
          endif
        else
          disk { image $yyy }
        endif
      endif
     done
     endif
    done
   endif
  endif

  ## setting up CDROM devices
  if (strlen($_cdrom))
    foreach $xxx ($LIST_DELIM, $_cdrom)
      cdrom { $xxx }
    done
  endif

  ## setting up ASPI devices
  ifndef restricted
    if (strlen($_aspi))
      foreach $xxx ($LIST_DELIM, $_aspi)
        $zz = (1);
        $yy2 = ""; $yy3 = (-1);
        if(strlen($xxx))
         foreach $yyy (":", $xxx)
          $zzz = "$yy", $zz, " = $yyy";
          $zz = ($zz + 1);
          $$zzz
         done;
        endif;
        aspi { $yy1 devicetype $yy2 target $yy3 };
      done
    endif
  endif

  ## setting up the features list
  if ( (  ($DOSEMU_VERSION_CODE >= ((98 << 16) | (3 << 8) | 3))
             && ($DOSEMU_VERSION_CODE < (99 << 16)) )
       || ($DOSEMU_VERSION_CODE > ((99 << 16) | (5 << 8))) )
    if (strlen($_features))
      foreach $xxx ($LIST_DELIM, $_features)
        $yyy = strdel($xxx, strstr($xxx, ":"), 999);
        $zzz = strsplit($xxx, strstr($xxx, ":"), 999);
        if (strlen($zzz))
          $zzz = strsplit($zzz, 1, 999);
        else
          $zzz = (0);
        endif
        feature { $yyy = $zzz };
      done
    endif
  endif

endif
#############################################################################