# little script to show CDShell's backslash problem # # This script will try to find the location of MEMDISK using dos- and unix-slashes # For each set of tests the first 2 (test 1 and 2) and last 2 (test 3 and 4) # should produce equal (consistent) result # # - all unix tests will work as expected (either 1 and 2, or, 3 and 4 are positive) # # - dos tests cannot be made consistent # (1 and 2 not consistent with each other) # (3 and 4 not consistent with each other) # (some tests need double, some quadruple, some ?) # - all dos-slash tests will not print correctly # # - Problem is that CDSHELL parses for special "\"-handling each time it # processes strings while it would be expected that this would not be done # for allready assigned string-vars (in memory strings). # # - Current behaviour makes using backslash in string-vars unusable, because # one needs to know upfront how many string-var substitutions are planned # throughout the code and anticipate by using quadruple (or even more) slashes. # print "\nunix slash (1 and 2 and 3 and 4 work correctly)" set var="" set path="/boot/modules" set dir="/isolinux" set file="/memdisk" if !file[$(dir)$(file)]; then print "\n1: not found"; else print "\n1: $(dir)$(file) (unix-slash)" set var="$(dir)$(file)" if !file[$(var)]; then print "\n2: not found"; else print "\n2: $(var) (unix-slash)" if !file[$(path)$(dir)$(file)]; then print "\n3: not found"; else print "\n3: $(path)$(dir)$(file) (unix-slash)" set var="$(path)$(var)" if !file[$(var)]; then print "\n4: not found"; else print "\n4: $(var) (unix-slash)" print "\ndos (double-)slash (1 and 3 work, 2 and 4 fail)" set var="" set path="\\boot\\modules" set dir="\\isolinux" set file="\\memdisk" if !file[$(dir)$(file)]; then print "\n1: not found"; else print "\n1: $(dir)$(file) (dos-double-slash)" set var="$(dir)$(file)" if !file[$(var)]; then print "\n2: not found"; else print "\n2: $(var) (dos-double-slash)" if !file[$(path)$(dir)$(file)]; then print "\n3: not found"; else print "\n3: $(path)$(dir)$(file) (dos-double-slash)" set var="$(path)$(var)" if !file[$(var)]; then print "\n4: not found"; else print "\n4: $(var) (dos-double-slash)" print "\ndos (quadruple-)slash (2 works, 1 and 3 and 4 fail)" set var="" set path="\\\\boot\\\\modules" set dir="\\\\isolinux" set file="\\\\memdisk" if !file[$(dir)$(file)]; then print "\n1: not found"; else print "\n1: $(dir)$(file) (dos-quadruple-slash)" set var="$(dir)$(file)" if !file[$(var)]; then print "\n2: not found"; else print "\n2: $(var) (dos-quadruple-slash)" if !file[$(path)$(dir)$(file)]; then print "\n3: not found"; else print "\n3: $(path)$(dir)$(file) (dos-quadruple-slash)" set var="$(path)$(var)" if !file[$(var)]; then print "\n4: not found"; else print "\n4: $(var) (dos-quadruple-slash)" print "\ndos (sixtuple-)slash (2 works, 1 and 3 and 4 fail)" set var="" set path="\\\\\\boot\\\\\\modules" set dir="\\\\\\isolinux" set file="\\\\\\memdisk" if !file[$(dir)$(file)]; then print "\n1: not found"; else print "\n1: $(dir)$(file) (dos-sixtuple-slash)" set var="$(dir)$(file)" if !file[$(var)]; then print "\n2: not found"; else print "\n2: $(var) (dos-sixtuple-slash)" if !file[$(path)$(dir)$(file)]; then print "\n3: not found"; else print "\n3: $(path)$(dir)$(file) (dos-sixtuple-slash)" set var="$(path)$(var)" if !file[$(var)]; then print "\n4: not found"; else print "\n4: $(var) (dos-sixtuple-slash)"