char global_conf[] = \
"##############################################################################\n"\
"# WARNING: THIS FILE IS NOT USED BY DEFAULT. ADJUST dosemu.users OR USE -F.\n"\
"#\n"\
"# This file is global.conf. By default a compiled-in copy is used. If you\n"\
"# make custom changes to the settings in this file, then you need to use \n"\
"# the -F switch or change dosemu.users; the custom file is then parsed\n"\
"# after the built-in copy.\n"\
"#\n"\
"# Linux dosemu  configuration  for parser versions >= 3 (dosemu-0.97.0.1)\n"\
"#\n"\
"# ./doc/README-tech.txt (chapter 2.) contains a description of the syntax\n"\
"# and the usage. However, you normally won\'t edit this file !!\n"\
"#\n"\
"# NOTES:\n"\
"#\n"\
"# 1. The file dosemu.conf (and optionally ~/.dosemurc) contains variable\n"\
"#    settings, that are included by global.conf for doing the\n"\
"#    most reasonable configuration.\n"\
"#    The file dosemu.conf (and optionally ~/.dosemurc) is what gets\n"\
"#    updated by the menu driven \'setup-dosemu\' tool.\n"\
"#\n"\
"# 2. We strongly recommend you to edit ONLY dosemu.conf.\n"\
"#    If you change global.conf, you are at your own and could break\n"\
"#    \'setup-dosemu\'.  You really need to know a lot of DOSEMU\n"\
"#    internals before you fiddle with editing global.conf.\n"\
"#    However, some very special cases can only be handled in global.conf.\n"\
"#    \n"\
"# 3. The file global.conf (this one) is either\n"\
"#      - the one compiled into dosemu.bin.\n"\
"#      - specified by the config_script option in dosemu.users (\"builtin\" \n"\
"#        by default)\n"\
"#      - or given via the -F option (from root login, else only on\n"\
"#        non-suid-root DOSEMU)\n"\
"#\n"\
"# 4. The only compiled-in path is /etc/dosemu.users (or if not found\n"\
"#    /etc/dosemu/dosemu.users), however, this can be overridden by\n"\
"#    --Fusers, if not running suid-root. All other paths are configurable\n"\
"#    and the dosemu binaries can reside everywhere in the system.\n"\
"#\n"\
"# This file (global.conf) may also serve as an example file for\n"\
"#      .dosrc            ( old style user configuration file )\n"\
"#      option -I         ( configuration via commandline, see man/dos.1 )\n"\
"#\n"\
"# Access rights for suid-root running DOSEMU sessions are defined in\n"\
"#\n"\
"#      /etc/dosemu.users or /etc/dosemu/dosemu.users\n"\
"#\n"\
"##############################################################################\n"\
"\n"\
"ifdef u_forceold\n"\
"  undef parser_version_3\n"\
"  define version_3_style_used\n"\
"endif\n"\
"\n"\
"ifndef parser_version_3\n"\
"  # normally won\'t come here, because older DOSEMUs don\'t use this file\n"\
"  # ... but if using -F option ...\n"\
"  include \"/etc/dosemu.conf\"\n"\
"else\n"\
"  # we are on version 3 parser\n"\
"\n"\
"  ## we set some vital variable\n"\
"\n"\
"  if (!strlen($DOSEMU_LIB_DIR))\n"\
"    # be sure, because older DOSEMU won\'t set this\n"\
"    $DOSEMU_LIB_DIR = \"/var/lib/dosemu\";\n"\
"    $DOSEMU_CONF_DIR = \"/etc\";\n"\
"    $DOSEMU_HDIMAGE_DIR = $DOSEMU_LIB_DIR;\n"\
"  else\n"\
"    if (!strlen($DOSEMU_HDIMAGE_DIR))\n"\
"      $DOSEMU_HDIMAGE_DIR = $DOSEMU_LIB_DIR;\n"\
"    endif\n"\
"    # make sure we have absolute paths\n"\
"    shell(\"test -d \", $DOSEMU_HDIMAGE_DIR)\n"\
"    if ($DOSEMU_SHELL_RETURN)\n"\
"      $DOSEMU_HDIMAGE_DIR = /var/lib/dosemu\n"\
"    else\n"\
"      $DOSEMU_HDIMAGE_DIR = shell(\"cd \", $DOSEMU_HDIMAGE_DIR, \"; pwd -P\");\n"\
"      $DOSEMU_HDIMAGE_DIR = strdel($DOSEMU_HDIMAGE_DIR, strlen($DOSEMU_HDIMAGE_DIR)-1, 1);\n"\
"    endif\n"\
"    shell(\"test -d \", $DOSEMU_LIB_DIR)\n"\
"    if ( $DOSEMU_SHELL_RETURN)\n"\
"      $DOSEMU_LIB_DIR = \"/var/lib/dosemu\";\n"\
"    else\n"\
"      $DOSEMU_LIB_DIR = shell(\"cd \", $DOSEMU_LIB_DIR, \"; pwd -P\");\n"\
"      $DOSEMU_LIB_DIR = strdel($DOSEMU_LIB_DIR, strlen($DOSEMU_LIB_DIR)-1, 1);\n"\
"    endif\n"\
"  endif\n"\
"\n"\
"  $CONFIG_VERSION = ( (1 << 24) | (1 << 16) | (4 << 8) | 0)\n"\
"  #                    ^           ^           ^         ^\n"\
"  if ( $DOSEMU_VERSION_CODE < $CONFIG_VERSION )\n"\
"    abort \"\n"\
"*** sorry, your \", $DOSEMU_LIB_DIR, \"/global.conf doesn\'t match this dosemu version\n"\
"\"\n"\
"  endif\n"\
"\n"\
"  $LIST_DELIM = \" ,	\"	#delimiters for lists <tab>, blank, comma\n"\
"\n"\
"  # for non-suid-root we can switch off restricted checking.\n"\
"  if (strlen($DOSEMU_LAX_CHECKING))\n"\
"    undef restricted\n"\
"    undef guest\n"\
"  endif\n"\
"\n"\
"  # we include the global settings from $DOSEMU_CONF_DIR/dosemu.conf\n"\
"  if (strlen($DOSEMU_CONF_DIR))\n"\
"    shell(\"test -f \", $DOSEMU_CONF_DIR, \"/dosemu.conf\")\n"\
"    if ( $DOSEMU_SHELL_RETURN)\n"\
"      $DOSEMU_CONF_DIR = \"\"\n"\
"    endif\n"\
"  endif\n"\
"\n"\
"  undef version_3_style_used    # unset it to have a valid check below\n"\
"  if (strlen($DOSEMU_CONF_DIR))\n"\
"    $xxx = \'include \"\', $DOSEMU_CONF_DIR, \'/dosemu.conf\"\';\n"\
"    $$xxx;\n"\
"    ifndef version_3_style_used\n"\
"      abort \"\n"\
"*** Your \", $DOSEMU_CONF_DIR, \"/dosemu.conf is obviously an old style or a too simple one.\n"\
"    Please read Quickstart and README.txt on how to upgrade.\n"\
"\"\n"\
"    endif\n"\
"  endif\n"\
"\n"\
"  ## we check if we have an ${HOME}/.dosemurc (given by $DOSEMU_RC),\n"\
"  ## if yes, we include it here \'under user scope\', which means it has\n"\
"  ## all c_* classes undefined and can only change environment variables in\n"\
"  ## its own isolated name space (prefixed with \'dosemu_\').\n"\
"  ## We later take over only such variables, that we allow.\n"\
"\n"\
"  $_dosemurc = $DOSEMU_RC         # we get that passed from \'parse_config()\'\n"\
"  shell(\"test -f \", $_dosemurc)\n"\
"  if ( (!$DOSEMU_SHELL_RETURN) ) \n"\
"    # we have a .dosemurc and can include\n"\
"    $_dosemurc = \' include \"\', $_dosemurc, \'\"\';\n"\
"    if (!strlen($DOSEMU_LAX_CHECKING))\n"\
"      enter_user_scope;\n"\
"    endif\n"\
"    $$_dosemurc;\n"\
"    if (!strlen($DOSEMU_LAX_CHECKING))\n"\
"      leave_user_scope;\n"\
"    endif\n"\
"    define skip_dosrc;\n"\
"\n"\
"    ## now we take over the allowed variables, only those which exist\n"\
"    ## with \'dosemu_\' prefixed will overwrite those without the prefix.\n"\
"\n"\
"    checkuservar $_debug, $_trace_ports,\n"\
"      $_features, $_mapping, $_hogthreshold, $_cli_timeout, $_pic_watchdog,\n"\
"      $_timemode,\n"\
"      $_mathco, $_cpu, $_cpu_emu, $_rdtsc, $_cpuspeed, $_xms, $_ems,\n"\
"      $_ems_frame, $_ems_uma_pages, $_ems_conv_pages,\n"\
"      $_ext_mem, $_dpmi, $_dpmi_base, $_ignore_djgpp_null_derefs, $_emusys,\n"\
"      $_emuini, $_dosmem, $_full_file_locks, $_lfn_support\n"\
"    checkuservar\n"\
"      $_term_char_set, $_term_color, $_term_updfreq, $_escchar, $_layout,\n"\
"      $_xterm_title, $_rawkeyboard, $_video, $_console, $_graphics,\n"\
"      $_external_char_set, $_internal_char_set\n"\
"    checkuservar\n"\
"      $_X_updfreq, $_X_title, $_X_title_show_appname, $_X_icon_name,\n"\
"      $_X_keycode, $_X_blinkrate,\n"\
"      $_X_font, $_X_mitshm, $_X_sharecmap, $_X_fixed_aspect, $_X_aspect_43,\n"\
"      $_X_lin_filt, $_X_bilin_filt, $_X_mode13fact, $_X_winsize, $_X_gamma,\n"\
"      $_X_fullscreen, $_X_vgaemu_memsize, $_X_lfb, $_X_pm_interface, $_X_mgrab_key,\n"\
"      $_X_vesamode, $_X_background_pause\n"\
"    checkuservar\n"\
"      $_hdimage,\n"\
"      $_com1, $_com2, $_com3, $_com4, $_mouse, $_mouse_dev, $_mouse_flags, $_mouse_baud,\n"\
"      $_printer, $_printer_timeout, $_printer_command, $_printer_commands,\n"\
"      $_lpt1, $_lpt2, $_lpt3,\n"\
"      $_ipxsupport, $_ipx_network, $_ethdev, $_tapdev, $_vdeswitch, $_slirpargs, $_novell_hack,\n"\
"      $_sound, $_sb_base, $_sb_irq, $_sb_dma, $_sb_hdma, $_sb_dsp, $_sb_mixer, $_mpu_base,\n"\
"      $_sound_driver,\n"\
"      $_oss_min_frags, $_oss_max_frags, $_oss_stalled_frags, $_oss_do_post, $_oss_min_extra_frags,\n"\
"      $_oss_dac_freq,\n"\
"      $_joy_device, $_joy_dos_min, $_joy_dos_max, $_joy_granularity, $_joy_latency,\n"\
"      $_vbootfloppy, $_cdrom, $_aspi\n"\
"    $xxx = $_vnet\n"\
"    checkuservar $_vnet\n"\
"    if ($_vnet ne $xxx && $_vnet ne \"tap\")\n"\
"      $_vnet = $xxx\n"\
"    endif\n"\
"    $xxx = $_pktdriver\n"\
"    checkuservar $_pktdriver\n"\
"    if ($_pktdriver ne $xxx && $_pktdriver && $_vnet ne \"tap\")\n"\
"      $_pktdriver = $xxx\n"\
"    endif\n"\
"    $xxx = $speaker\n"\
"    checkuservar $_speaker\n"\
"    if ($speaker ne $xxx && $speaker eq \"native\")\n"\
"      $speaker = $xxx\n"\
"    endif\n"\
"  endif\n"\
"  ## end of .dosemurc inclusion\n"\
"\n"\
"  if (strlen($_mapping)) $xxx = $_mapping else $xxx = \"auto\" endif\n"\
"  mappingdriver $xxx;\n"\
"\n"\
"  if (strlen($_debug))\n"\
"    debug $_debug ;\n"\
"  else\n"\
"    debug { off }\n"\
"  endif\n"\
"  if (strlen($_trace_ports)) trace ports { $$_trace_ports } endif\n"\
"\n"\
"  cpuspeed $_cpuspeed\n"\
"  rdtsc $_rdtsc\n"\
"\n"\
"  dosbanner on\n"\
"  timer 0\n"\
"  mathco $_mathco\n"\
"  $xxx = \"cpu \", $_cpu;\n"\
"  $$xxx\n"\
"  if (strlen($_cpu_emu))\n"\
"    $xxx = \"cpuemu \", $_cpu_emu;\n"\
"    $$xxx\n"\
"  else\n"\
"    cpuemu off\n"\
"  endif\n"\
"  $_pm_dos_api = $_ems;		# disabling EMS disables also the translator\n"\
"  if ($_ems || ($_dpmi && $_pm_dos_api))\n"\
"    ems {\n"\
"          ems_size $_ems\n"\
"          ems_frame $_ems_frame\n"\
"          ems_uma_pages $_ems_uma_pages\n"\
"          ems_conv_pages $_ems_conv_pages\n"\
"        }\n"\
"  else\n"\
"    ems off\n"\
"  endif\n"\
"  dpmi $_dpmi\n"\
"  dpmi_base $_dpmi_base\n"\
"  pm_dos_api $_pm_dos_api\n"\
"  ignore_djgpp_null_derefs $_ignore_djgpp_null_derefs\n"\
"  dosmem $_dosmem\n"\
"  if ($_ext_mem)\n"\
"    ext_mem $_ext_mem\n"\
"  else\n"\
"    ext_mem $_xms\n"\
"  endif\n"\
"\n"\
"  if ($_emusys ne \"\") emusys $_emusys endif\n"\
"  if ($_emuini ne \"\") emuini $_emuini endif\n"\
"\n"\
"  ## terminal stuff, we check a lot to insure proper operation\n"\
"\n"\
"  terminal { color $_term_color  updatefreq $_term_updfreq  escchar $_escchar }\n"\
"  xterm_title $_xterm_title\n"\
"  video { vga }\n"\
"  if ($_external_char_set ne \"\")\n"\
"    charset { external $$_external_char_set }\n"\
"  endif\n"\
"  if ($_internal_char_set ne \"\")\n"\
"    charset { internal $$_internal_char_set }\n"\
"  endif\n"\
"\n"\
"  ## X param settings\n"\
"\n"\
"    if ($_X_keycode == -1)\n"\
"      $xxx = \"keycode 2\"\n"\
"    else if ($_X_keycode)\n"\
"      $xxx = \"keycode 1\"\n"\
"    else\n"\
"      $xxx = \"keycode 0\"\n"\
"    endif endif\n"\
"    if ($_X_sharecmap) $xxx = $xxx, \" sharecmap\" endif\n"\
"    if ($_X_aspect_43) $xxx = $xxx, \" aspect_43\" endif\n"\
"    if ($_X_lin_filt) $xxx = $xxx, \" lin_filt\"  endif\n"\
"    if ($_X_bilin_filt) $xxx = $xxx, \" bilin_filt\" endif\n"\
"    $xxx = $xxx, \" mode13fact \", $_X_mode13fact\n"\
"    $xxx = $xxx, \" gamma \", (int($_X_gamma * 100))\n"\
"    $xxx = $xxx, \" font \'\", $_X_font, \"\'\"\n"\
"    if (strlen($_X_winsize))\n"\
"      $yyy = (strstr($_X_winsize,\",\"))\n"\
"      $yyy = \" winsize (\", strdel($_X_winsize,$yyy,999), \") , (\",\n"\
"              strsplit($_X_winsize,$yyy+1,999), \")\"\n"\
"      $xxx = $xxx, $yyy\n"\
"    endif\n"\
"\n"\
"    if (strlen($_X_vesamode))\n"\
"      foreach $yyy (\" 	\", $_X_vesamode)\n"\
"        $zzz = (strchr($yyy,\",\"))\n"\
"        $xxx = $xxx, \" vesamode (\", strdel($yyy,$zzz,999), \"),(\",\n"\
"                      strsplit($yyy,$zzz+1,999), \") \"\n"\
"      done\n"\
"    endif\n"\
"    $xxx = $xxx, \' mgrab_key \"\', $_X_mgrab_key, \'\"\'\n"\
"    X { \n"\
"      title $_X_title title_show_appname $_X_title_show_appname      \n"\
"      icon_name $_X_icon_name\n"\
"      updatelines 25 updatefreq $_X_updfreq blinkrate $_X_blinkrate\n"\
"      fixed_aspect $_X_fixed_aspect vgaemu_memsize $_X_vgaemu_memsize\n"\
"      lfb $_X_lfb  pm_interface $_X_pm_interface mitshm $_X_mitshm\n"\
"      background_pause $_X_background_pause fullscreen $_X_fullscreen $$xxx\n"\
"    }\n"\
"\n"\
"  # video settings\n"\
"  if ($DOSEMU_STDIN_IS_CONSOLE eq \"1\")\n"\
"    warn \"dosemu running on console\"\n"\
"    $xxx = $_video\n"\
"    if ($_console) $xxx = $xxx, \" console\"\n"\
"       if ($_console == auto) $xxx = $xxx, \" auto\" endif\n"\
"    endif\n"\
"    if ($_graphics) $xxx = $xxx, \" graphics\"\n"\
"       if ($_graphics == auto) $xxx = $xxx, \" auto\" endif\n"\
"    endif\n"\
"    $xxx = $xxx, \" vbios_seg \", $_vbios_seg, \" vbios_size \",\n"\
"	        $_vbios_size, \" memsize \", $_vmemsize\n"\
"    if (strlen($_chipset)) $yyy = $_chipset else $yyy = \"plainvga\" endif\n"\
"    $xxx = $xxx, \" chipset \", $yyy\n"\
"    if ($_vbios_post) $xxx = $xxx, \" vbios_post \" endif\n"\
"    if ($_dualmon) $xxx = $xxx, \" dualmon\" endif\n"\
"    if (strlen($_vbios_file)) $xxx = $xxx, \" vgaemubios_file \", $_vbios_file endif\n"\
"    video { $$xxx }\n"\
"  else\n"\
"    warn \"dosemu not running on console\"\n"\
"    $xxx = $_video\n"\
"    if (strlen($_vbios_file)) $xxx = $xxx, \" vgaemubios_file \", $_vbios_file endif\n"\
"    if ($_dualmon) $xxx = $xxx, \" dualmon \" endif\n"\
"    if (strlen($xxx)) video { $$xxx } endif\n"\
"  endif\n"\
"\n"\
"  ## sound settings\n"\
"  if ($_sound)\n"\
"    sound_emu { sb_base $_sb_base\n"\
"	        sb_irq $_sb_irq\n"\
"		sb_dma $_sb_dma\n"\
"		sb_hdma $_sb_hdma\n"\
"	        sb_mixer $_sb_mixer\n"\
"		sb_dsp $_sb_dsp\n"\
"		mpu_base $_mpu_base\n"\
"		sound_driver \"oss\"\n"\
"	      }\n"\
"    sound_emu $_sound\n"\
"    oss_options { oss_min_frags $_oss_min_frags\n"\
"		  oss_max_frags $_oss_max_frags\n"\
"		  oss_stalled_frags $_oss_stalled_frags\n"\
"		  oss_do_post $_oss_do_post\n"\
"		  oss_min_extra_frags $_oss_min_extra_frags\n"\
"		  oss_dac_freq $_oss_dac_freq\n"\
"		}\n"\
"  else\n"\
"    sound_emu off\n"\
"  endif\n"\
"\n"\
"  ## joystick settings\n"\
"  joystick_emu { joy_device $_joy_device joy_dos_min $_joy_dos_min\n"\
"	joy_dos_max $_joy_dos_max joy_granularity $_joy_granularity\n"\
"	joy_latency $_joy_latency }\n"\
"\n"\
"  ## hacks\n"\
"  cli_timeout $_cli_timeout\n"\
"  pic_watchdog $_pic_watchdog\n"\
"  timemode $_timemode\n"\
"\n"\
"  full_file_locks $_full_file_locks\n"\
"  lfn_support $_lfn_support\n"\
"\n"\
"  ## serial\n"\
"  $xxx = \"\'\", $_ttylocks, \"\'\"\n"\
"  ttylocks { directory $$xxx namestub LCK.. }\n"\
"  if (1) # no idea why but we need this...\n"\
"    foreach $xxx (\" \", \"1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\")\n"\
"      $yyy = \"com\", $xxx\n"\
"      $zzz = \"$_com\", $xxx\n"\
"      $zzz = $$zzz\n"\
"      if (strlen($zzz))\n"\
"        if ($_mouse_dev eq $yyy)\n"\
"          serial { mouse com $xxx device $$zzz }\n"\
"	  if ($_mouse_internal)\n"\
"	    mouse { internaldriver }\n"\
"	  endif\n"\
"          $_mouse = \"\"\n"\
"        else\n"\
"          if ($zzz eq \"virtual\")\n"\
"            serial { com $xxx virtual }\n"\
"          else\n"\
"            serial { com $xxx device $$zzz }\n"\
"          endif\n"\
"        endif\n"\
"      endif\n"\
"    done\n"\
"  endif\n"\
"\n"\
"  ## mouse settings\n"\
"  if ($_mouse_internal && (strstr($_mouse_dev,\"com\")<0))\n"\
"    $xxx = \"\"\n"\
"    if ($_mouse_baud)\n"\
"      $xxx = \"baudrate \", $_mouse_baud\n"\
"    endif\n"\
"    $xxx = $xxx, \" device \'\", $_mouse_dev, \"\'\"\n"\
"    mouse { $$_mouse $$_mouse_flags $$xxx internaldriver }\n"\
"  endif\n"\
"\n"\
"  hogthreshold $_hogthreshold\n"\
"\n"\
"  ## keyboard setting\n"\
"  if ($DOSEMU_STDIN_IS_CONSOLE ne \"1\") $_rawkeyboard = (off) endif\n"\
"  if ($_layout eq \"auto\")\n"\
"    keyboard { layout auto  rawkeyboard $_rawkeyboard }\n"\
"  else\n"\
"    if ( strstr($_layout, \"load\") <0 )\n"\
"      # we use the builtin keytables\n"\
"      if (strlen($_layout)) $yyy = $_layout else $yyy = \"us\" endif\n"\
"      keyboard { layout $$yyy  rawkeyboard $_rawkeyboard }\n"\
"    else\n"\
"      # we have to load a keytable\n"\
"      $yyy = \"\"\n"\
"      if (1) # no idea why (see com as well) but we need this...\n"\
"        foreach $zzz ($LIST_DELIM, $_layout)\n"\
"          if ($zzz ne \"load\")\n"\
"            $yyy = $zzz\n"\
"          endif\n"\
"        done\n"\
"      endif\n"\
"      if (!strlen($yyy))\n"\
"        abort \"no keytable name in $_layout\"\n"\
"      endif\n"\
"      shell(\"test -f \", $DOSEMU_LIB_DIR, \"/keymap/\", $yyy)\n"\
"      if ( $DOSEMU_SHELL_RETURN)\n"\
"        abort \"keytable \",$yyy, \"not found in \", $DOSEMU_LIB_DIR, \"/keymap/*\"\n"\
"	      endif\n"\
"      $_layout = \'include \"keymap/\', $yyy, \'\"\' ;\n"\
"      $$_layout\n"\
"      keyboard { rawkeyboard $_rawkeyboard }\n"\
"    endif\n"\
"  endif\n"\
"\n"\
"  $_disks = $_hdimage\n"\
"  dexe { allowdisk }\n"\
"  if (!strlen($_vbootfloppy))\n"\
"    bootC                      # default boot mode is \'from C:\'\n"\
"  else\n"\
"    bootA                      # default boot mode is \'from A:\'\n"\
"    $yyy = \"\"; $zzz = \"\";\n"\
"    if (strlen($_vbootfloppy))\n"\
"      foreach $xxx ($LIST_DELIM, $_vbootfloppy)\n"\
"        if (strlen($yyy))\n"\
"          $zzz = $xxx\n"\
"        else\n"\
"          $yyy = $xxx\n"\
"        endif\n"\
"      done\n"\
"    endif\n"\
"    if (strchr($yyy, \"/\") != 0)\n"\
"      $yyyy = $HOME, \"/.dosemu/\", $yyy\n"\
"      shell(\"test -f \'\", $yyyy, \"\'\")\n"\
"      if ($DOSEMU_SHELL_RETURN)\n"\
"        $yyyy = $DOSEMU_CONF_DIR, \"/\", $yyy\n"\
"      endif\n"\
"      shell(\"test -f \'\", $yyyy, \"\'\")\n"\
"      if ($DOSEMU_SHELL_RETURN)\n"\
"        $yyyy = $DOSEMU_HDIMAGE_DIR, \"/\", $yyy\n"\
"      endif\n"\
"      $yyy = $yyyy\n"\
"    endif\n"\
"    $_vbootfloppy = $yyy\n"\
"    shell(\"test -d \'\", $yyy, \"\'\")\n"\
"    if ($DOSEMU_SHELL_RETURN)\n"\
"      $size = shell(\"stat --printf=%s \'\", $yyy, \"\'\")\n"\
"      if ($size == 2949120)        # 2.88M 3 1/2 inches\n"\
"        bootdisk { heads 2  sectors 36  tracks 80  threeinch_2880 file $_vbootfloppy }\n"\
"      else if ($size == 1474560)   # 1.44M 3 1/2 inches\n"\
"        bootdisk { heads 2  sectors 18  tracks 80  threeinch file $_vbootfloppy }\n"\
"      else if ($size == 737280)    # 720K 3 1/2 inches\n"\
"        bootdisk { heads 2  sectors 9  tracks 80  threeinch_720 file $_vbootfloppy }\n"\
"      else if ($size == 1228800)   # 1.2M 5 1/4 inches\n"\
"        bootdisk { heads 2  sectors 15  tracks 80  fiveinch file $_vbootfloppy }\n"\
"      else if ($size == 368640)    # 360K 5 1/4 inches\n"\
"        bootdisk { heads 2  sectors 9  tracks 40  fiveinch_360 file $_vbootfloppy }\n"\
"      else if ($size == 184320)    # 180K 5 1/4 inches\n"\
"        bootdisk { heads 1  sectors 9  tracks 40  fiveinch_360 file $_vbootfloppy }\n"\
"      else if ($size == 163840)    # 160K 5 1/4 inches\n"\
"        bootdisk { heads 1  sectors 8  tracks 40  fiveinch_360 file $_vbootfloppy }\n"\
"      endif endif endif endif endif endif endif\n"\
"    else\n"\
"      bootdisk { threeinch directory $_vbootfloppy readonly }\n"\
"    endif\n"\
"    if (strlen($zzz))\n"\
"      $_disks = $_hdimage\n"\
"    endif\n"\
"  endif\n"\
"  if (strlen($_floppy_a))\n"\
"    $zzz = strsplit($_floppy_a, strstr($_floppy_a, \":\"), 999);\n"\
"    if (strlen($zzz))\n"\
"      $zzz = strsplit($zzz, 1, 999)\n"\
"      $_floppy_a = strdel($_floppy_a, strstr($_floppy_a, \":\"), 999);\n"\
"    else\n"\
"      $zzz = \"/dev/fd0\"\n"\
"    endif\n"\
"    $xxx = shell(\"test -r \", $zzz);\n"\
"    if ($DOSEMU_SHELL_RETURN)\n"\
"      warn \"**** Warning: floppy \", $zzz, \" not accessible, disabled\";\n"\
"    else\n"\
"      shell(\"test -d \'\", $zzz, \"\'\")\n"\
"      if ($DOSEMU_SHELL_RETURN)\n"\
"        floppy { device $$zzz $$_floppy_a }\n"\
"      else\n"\
"        floppy { directory $$zzz $$_floppy_a }\n"\
"      endif\n"\
"    endif\n"\
"  endif\n"\
"  if (strlen($_floppy_b))\n"\
"    $zzz = strsplit($_floppy_b, strstr($_floppy_b, \":\"), 999);\n"\
"    if (strlen($zzz))\n"\
"      $zzz = strsplit($zzz, 1, 999)\n"\
"      $_floppy_b = strdel($_floppy_b, strstr($_floppy_b, \":\"), 999);\n"\
"    else\n"\
"      $zzz = \"/dev/fd1\"\n"\
"    endif\n"\
"    $xxx = shell(\"test -r \", $zzz);\n"\
"    if ($DOSEMU_SHELL_RETURN)\n"\
"      warn \"**** Warning: floppy \", $zzz, \" not accessible, disabled\";\n"\
"    else\n"\
"      shell(\"test -d \'\", $zzz, \"\'\")\n"\
"      if ($DOSEMU_SHELL_RETURN)\n"\
"        floppy { device $$zzz $$_floppy_b }\n"\
"      else\n"\
"        floppy { directory $$zzz $$_floppy_a }\n"\
"      endif\n"\
"    endif\n"\
"  endif\n"\
"  fastfloppy 1\n"\
"\n"\
"  ipxsupport $_ipxsupport\n"\
"  ipx_network $_ipx_network\n"\
"  novell_hack $_novell_hack\n"\
"  if (strlen($_printer) || strlen($_printer_command))\n"\
"    # backward compatibility\n"\
"    if (!strlen($_printer))\n"\
"      $_printer_commands = $_printer_command\n"\
"    else\n"\
"      if (!strlen($_printer_command))\n"\
"        $_printer_command = \"lpr\"\n"\
"      endif\n"\
"      $_printer_commands = \"\"\n"\
"      foreach $xxx ($LIST_DELIM, $_printer)\n"\
"        $_printer_commands = $_printer_commands, $_printer_command, \" -P\", $xxx, \",\"\n"\
"      done\n"\
"    endif\n"\
"  endif\n"\
"  if (strlen($_printer_commands))\n"\
"    foreach $xxx (\",\", $_printer_commands)\n"\
"      $xxx = \"\'\", strdel($xxx, 0, strspn($xxx, $LIST_DELIM)), \"\'\"\n"\
"      printer { command $$xxx timeout $_printer_timeout }\n"\
"    done\n"\
"  endif\n"\
"  if (1) # no idea why but we need this...\n"\
"    foreach $xxx (\" \", \"1 2 3 4 5 6 7 8 9\")\n"\
"      $yyy = \"lpt\", $xxx\n"\
"      $zzz = \"$_lpt\", $xxx\n"\
"      $zzz = $$zzz\n"\
"      if (strlen($zzz))\n"\
"        $zzz = \"\'\", $zzz, \"\'\"\n"\
"        printer { lpt $xxx command $$zzz timeout $_printer_timeout }\n"\
"      endif\n"\
"    done\n"\
"  endif\n"\
"\n"\
"  if (strlen($_speaker))\n"\
"    $xxx = \"speaker \", $_speaker;\n"\
"    $$xxx\n"\
"  else\n"\
"    speaker off\n"\
"  endif\n"\
"  ifdef restricted\n"\
"    ## /etc/dosemu.users defined \'restricted\' for this login\n"\
"    define c_normal\n"\
"    undef c_all\n"\
"    if ($_vnet eq \"vde\" || !$_pktdriver)\n"\
"      vdeswitch $_vdeswitch\n"\
"      slirpargs $_slirpargs\n"\
"      vnet $_vnet\n"\
"      pktdriver $_pktdriver\n"\
"    endif\n"\
"    if ($_pci)\n"\
"      pci auto\n"\
"    endif\n"\
"  else\n"\
"    # here are the root requiring options\n"\
"    if (strlen($_irqpassing))\n"\
"      $yyy = \"irqpassing { \"\n"\
"      if (strlen($_irqpassing))\n"\
"        foreach $xxx (\" \", $_irqpassing)\n"\
"          $yyy = $yyy, \"use_sigio \", $xxx\n"\
"        done\n"\
"      endif\n"\
"      $yyy = $yyy, \" }\";\n"\
"      $$yyy\n"\
"    else\n"\
"      irqpassing off\n"\
"    endif\n"\
"    if (strlen($_hardware_ram))\n"\
"      hardware_ram { $$_hardware_ram }\n"\
"    endif\n"\
"    ethdev $_ethdev\n"\
"    tapdev $_tapdev\n"\
"    vdeswitch $_vdeswitch\n"\
"    slirpargs $_slirpargs\n"\
"    vnet $_vnet\n"\
"    pktdriver $_pktdriver\n"\
"    if (strlen($_ports)) ports { $$_ports } endif\n"\
"    pci $_pci\n"\
"  endif\n"\
"\n"\
"  ## setting up hdimages\n"\
"  if (strlen($_disks) && (!defined(c_dexerun)))\n"\
"    $yyy = strsplit($_disks, 0, strpbrk($_disks, $LIST_DELIM) + 1)\n"\
"    if (strlen($_disks))\n"\
"     foreach $xxxx ($LIST_DELIM, $_disks)\n"\
"      $xxx_pref = \"\"\n"\
"      if ((strchr($xxxx, \"*\") + 1) && (strlen($xxxx) == strchr($xxxx, \"*\") + 1))\n"\
"        $xxx_pref = strdel($xxxx, strlen($xxxx) - 1, 1);\n"\
"        if (strchr($xxx_pref, \"/\") == 0)\n"\
"          $xxxx = shell(\"cd \'\", $xxx_pref, \"\' 2>/dev/null && echo -n *\")\n"\
"        else\n"\
"          $xxxx = shell(\"cd \'\", $HOME, \"/.dosemu/\", $xxx_pref, \"\' 2>/dev/null && echo -n *\")\n"\
"          if ($DOSEMU_SHELL_RETURN || $xxxx eq \"*\")\n"\
"            $xxxx = shell(\"cd \'\", $DOSEMU_CONF_DIR, \"/\", $xxx_pref, \"\' 2>/dev/null && echo -n *\")\n"\
"          endif\n"\
"          if ($DOSEMU_SHELL_RETURN || $xxxx eq \"*\")\n"\
"            $xxxx = shell(\"cd \'\", $DOSEMU_HDIMAGE_DIR, \"/\", $xxx_pref, \"\' 2>/dev/null && echo -n *\")\n"\
"          endif\n"\
"        endif\n"\
"        if ($DOSEMU_SHELL_RETURN)\n"\
"          $xxxx = strcat($xxx_pref, \"*\")\n"\
"          $xxx_pref = \"\"\n"\
"        endif\n"\
"      endif\n"\
"     if (strlen($xxxx))\n"\
"     foreach $xxx ($LIST_DELIM, $xxxx)\n"\
"      $xxx = strcat($xxx_pref, $xxx)\n"\
"      if (!strncmp($xxx, \"/dev/\", 4))\n"\
"        $yyy = strdel($xxx, strstr($xxx, \":ro\"), 999);\n"\
"        $zzz = strsplit($xxx, strstr($xxx, \":ro\"), 999);\n"\
"        if (strtol(strdel($xxx,0,8)) > 0)\n"\
"          $yyy = \"disk { partition \", $yyy;\n"\
"        else\n"\
"          $yyy = \"disk { wholedisk \", $yyy;\n"\
"        endif\n"\
"        if (strlen($zzz))\n"\
"          $yyy = $yyy, \" readonly\"\n"\
"        endif\n"\
"        $yyy = $yyy, \" }\";\n"\
"        $$yyy;\n"\
"      else\n"\
"        $yyy = strdel($xxx, strstr($xxx, \":ro\"), 999);\n"\
"        $zzz = strsplit($xxx, strstr($xxx, \":ro\"), 999);\n"\
"        if (strchr($yyy, \"/\") != 0)\n"\
"          $yyyy = $HOME, \"/.dosemu/\", $yyy\n"\
"          shell(\"test -e \'\", $yyyy, \"\'\")\n"\
"          if ($DOSEMU_SHELL_RETURN)\n"\
"            $yyyy = $DOSEMU_CONF_DIR, \"/\", $yyy\n"\
"	  endif\n"\
"          shell(\"test -e \'\", $yyyy, \"\'\")\n"\
"          if ($DOSEMU_SHELL_RETURN)\n"\
"            $yyyy = $DOSEMU_HDIMAGE_DIR, \"/\", $yyy\n"\
"	  endif\n"\
"	  $yyy = $yyyy\n"\
"        endif\n"\
"        shell(\"test -d \'\", $yyy, \"\'\")\n"\
"        if (!$DOSEMU_SHELL_RETURN)\n"\
"          if (strlen($zzz))\n"\
"            disk { directory $yyy readonly };\n"\
"          else\n"\
"            disk { directory $yyy };\n"\
"          endif\n"\
"        else\n"\
"          disk { image $yyy }\n"\
"        endif\n"\
"      endif\n"\
"     done\n"\
"     endif\n"\
"    done\n"\
"   endif\n"\
"  endif\n"\
"\n"\
"  ## setting up CDROM devices\n"\
"  if (strlen($_cdrom))\n"\
"    foreach $xxx ($LIST_DELIM, $_cdrom)\n"\
"      cdrom { $xxx }\n"\
"    done\n"\
"  endif\n"\
"\n"\
"  ## setting up ASPI devices\n"\
"  ifndef restricted\n"\
"    if (strlen($_aspi))\n"\
"      foreach $xxx ($LIST_DELIM, $_aspi)\n"\
"        $zz = (1);\n"\
"        $yy2 = \"\"; $yy3 = (-1);\n"\
"        if(strlen($xxx))\n"\
"         foreach $yyy (\":\", $xxx)\n"\
"          $zzz = \"$yy\", $zz, \" = $yyy\";\n"\
"          $zz = ($zz + 1);\n"\
"          $$zzz\n"\
"         done;\n"\
"        endif;\n"\
"        aspi { $yy1 devicetype $yy2 target $yy3 };\n"\
"      done\n"\
"    endif\n"\
"  endif\n"\
"\n"\
"  ## setting up the features list\n"\
"  if ( (  ($DOSEMU_VERSION_CODE >= ((98 << 16) | (3 << 8) | 3))\n"\
"             && ($DOSEMU_VERSION_CODE < (99 << 16)) )\n"\
"       || ($DOSEMU_VERSION_CODE > ((99 << 16) | (5 << 8))) )\n"\
"    if (strlen($_features))\n"\
"      foreach $xxx ($LIST_DELIM, $_features)\n"\
"        $yyy = strdel($xxx, strstr($xxx, \":\"), 999);\n"\
"        $zzz = strsplit($xxx, strstr($xxx, \":\"), 999);\n"\
"        if (strlen($zzz))\n"\
"          $zzz = strsplit($zzz, 1, 999);\n"\
"        else\n"\
"          $zzz = (0);\n"\
"        endif\n"\
"        feature { $yyy = $zzz };\n"\
"      done\n"\
"    endif\n"\
"  endif\n"\
"\n"\
"endif\n"\
"#############################################################################\n"\
;
