summaryrefslogtreecommitdiffstats
path: root/scilab/modules/helptools
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-03-08 09:28:07 +0100
committerAllan CORNET <allan.cornet@scilab.org>2010-03-08 09:28:07 +0100
commit8b7ac05e63459066060daee277f1a41d5b8905d3 (patch)
tree4279ccbffa71e2a0697c866471a0f02e12148c58 /scilab/modules/helptools
parent4c6a4300d0c9a42b71fb8572e6a656ee3bcb3bdf (diff)
downloadscilab-8b7ac05e63459066060daee277f1a41d5b8905d3.zip
scilab-8b7ac05e63459066060daee277f1a41d5b8905d3.tar.gz
MSDOS replaced by getos() == 'Windows'
Diffstat (limited to 'scilab/modules/helptools')
-rw-r--r--scilab/modules/helptools/help/en_US/xmltochm.xml6
-rw-r--r--scilab/modules/helptools/macros/add_help_chapter.sci2
-rw-r--r--scilab/modules/helptools/macros/check_help.sci2
-rw-r--r--scilab/modules/helptools/macros/clean_help.sci6
-rw-r--r--scilab/modules/helptools/macros/find_links.sci4
-rw-r--r--scilab/modules/helptools/macros/xmlfiletohtml.sci.in4
-rw-r--r--scilab/modules/helptools/macros/xmlfiletohtml.sci.vc4
-rw-r--r--scilab/modules/helptools/macros/xmltochm.sci4
-rw-r--r--scilab/modules/helptools/macros/xmltoformat.sci10
-rw-r--r--scilab/modules/helptools/tests/unit_tests/xmltochm.dia.ref4
-rw-r--r--scilab/modules/helptools/tests/unit_tests/xmltochm.tst4
-rw-r--r--scilab/modules/helptools/tests/unit_tests/xmltochm.win.dia.ref4
12 files changed, 27 insertions, 27 deletions
diff --git a/scilab/modules/helptools/help/en_US/xmltochm.xml b/scilab/modules/helptools/help/en_US/xmltochm.xml
index 801e8a6..c615a7f 100644
--- a/scilab/modules/helptools/help/en_US/xmltochm.xml
+++ b/scilab/modules/helptools/help/en_US/xmltochm.xml
@@ -91,7 +91,7 @@ my_module_path = pathconvert(SCI+'/modules/helptools/examples/example_1',%f,%f)
91my_french_help_dir = my_module_path+'/help/fr_FR'; 91my_french_help_dir = my_module_path+'/help/fr_FR';
92my_french_help_title = 'Example 1 [fr_FR]'; 92my_french_help_title = 'Example 1 [fr_FR]';
93res = xmltochm(my_french_help_dir,my_french_help_title,'fr_FR'); 93res = xmltochm(my_french_help_dir,my_french_help_title,'fr_FR');
94if MSDOS then 94if getos() == 'Windows' then
95 dos('start ' + res); 95 dos('start ' + res);
96end 96end
97 97
@@ -100,7 +100,7 @@ end
100my_english_help_dir = my_module_path+'/help/en_US'; 100my_english_help_dir = my_module_path+'/help/en_US';
101my_english_help_title = 'Example 1 [en_US]'; 101my_english_help_title = 'Example 1 [en_US]';
102res = xmltochm(my_english_help_dir,my_english_help_title,'en_US'); 102res = xmltochm(my_english_help_dir,my_english_help_title,'en_US');
103if MSDOS then 103if getos() == 'Windows' then
104 dos('start ' + res); 104 dos('start ' + res);
105end 105end
106 106
@@ -109,7 +109,7 @@ end
109my_chinese_help_dir = my_module_path+'/help/zh_TW'; 109my_chinese_help_dir = my_module_path+'/help/zh_TW';
110my_chinese_help_title = 'Example 1 [zh_TW]'; 110my_chinese_help_title = 'Example 1 [zh_TW]';
111res = xmltochm(my_chinese_help_dir,my_chinese_help_title,'zh_TW'); 111res = xmltochm(my_chinese_help_dir,my_chinese_help_title,'zh_TW');
112if MSDOS then 112if getos() == 'Windows' then
113 dos('start ' + res); 113 dos('start ' + res);
114end 114end
115 ]]></programlisting> 115 ]]></programlisting>
diff --git a/scilab/modules/helptools/macros/add_help_chapter.sci b/scilab/modules/helptools/macros/add_help_chapter.sci
index 8d1a54c..2f6ece9 100644
--- a/scilab/modules/helptools/macros/add_help_chapter.sci
+++ b/scilab/modules/helptools/macros/add_help_chapter.sci
@@ -97,7 +97,7 @@ function ok = add_help_chapter(helptitle,path,modulemode)
97 97
98 chdir(path(i)); 98 chdir(path(i));
99 99
100 if MSDOS then 100 if getos() == 'Windows' then
101 path(i) = getlongpathname(pwd()); 101 path(i) = getlongpathname(pwd());
102 else 102 else
103 path(i) = pwd(); 103 path(i) = pwd();
diff --git a/scilab/modules/helptools/macros/check_help.sci b/scilab/modules/helptools/macros/check_help.sci
index 868d4d5..944b63e 100644
--- a/scilab/modules/helptools/macros/check_help.sci
+++ b/scilab/modules/helptools/macros/check_help.sci
@@ -64,7 +64,7 @@ function check_help(dirs)
64 64
65 for k=1:size(dirs,'*'); 65 for k=1:size(dirs,'*');
66 chdir(dirs(k)); 66 chdir(dirs(k));
67 if MSDOS then 67 if getos() == 'Windows' then
68 dirs(k) = getlongpathname(pwd()); 68 dirs(k) = getlongpathname(pwd());
69 else 69 else
70 dirs(k) = pwd(); 70 dirs(k) = pwd();
diff --git a/scilab/modules/helptools/macros/clean_help.sci b/scilab/modules/helptools/macros/clean_help.sci
index 40ba7db..e5d19c7 100644
--- a/scilab/modules/helptools/macros/clean_help.sci
+++ b/scilab/modules/helptools/macros/clean_help.sci
@@ -73,7 +73,7 @@ function clean_help(dirs)
73 end 73 end
74 74
75 chdir(dirs(k)); 75 chdir(dirs(k));
76 if MSDOS then 76 if getos() == 'Windows' then
77 dirs(k) = getlongpathname(pwd()); 77 dirs(k) = getlongpathname(pwd());
78 else 78 else
79 dirs(k) = pwd(); 79 dirs(k) = pwd();
@@ -87,7 +87,7 @@ function clean_help(dirs)
87 error(msprintf(gettext("%s: Directory %s does not exist or read access denied."),"xmltoformat",dirs_m(k))); 87 error(msprintf(gettext("%s: Directory %s does not exist or read access denied."),"xmltoformat",dirs_m(k)));
88 end 88 end
89 chdir(dirs_m(k)); 89 chdir(dirs_m(k));
90 if MSDOS then 90 if getos() == 'Windows' then
91 dirs_m(k) = getlongpathname(pwd()); 91 dirs_m(k) = getlongpathname(pwd());
92 else 92 else
93 dirs_m(k) = pwd(); 93 dirs_m(k) = pwd();
@@ -100,7 +100,7 @@ function clean_help(dirs)
100 error(msprintf(gettext("%s: Directory %s does not exist or read access denied."),"xmltoformat",dirs_c(k))); 100 error(msprintf(gettext("%s: Directory %s does not exist or read access denied."),"xmltoformat",dirs_c(k)));
101 end 101 end
102 chdir(dirs_c(k)); 102 chdir(dirs_c(k));
103 if MSDOS then 103 if getos() == 'Windows' then
104 dirs_c(k) = getlongpathname(pwd()); 104 dirs_c(k) = getlongpathname(pwd());
105 else 105 else
106 dirs_c(k) = pwd(); 106 dirs_c(k) = pwd();
diff --git a/scilab/modules/helptools/macros/find_links.sci b/scilab/modules/helptools/macros/find_links.sci
index 49da177..b39f0e4 100644
--- a/scilab/modules/helptools/macros/find_links.sci
+++ b/scilab/modules/helptools/macros/find_links.sci
@@ -35,7 +35,7 @@ function flag = find_links(filein,fileout)
35 35
36 dtd_line = grep(convstr(txt,'u'),"<!DOCTYPE MAN SYSTEM"); 36 dtd_line = grep(convstr(txt,'u'),"<!DOCTYPE MAN SYSTEM");
37 37
38 if MSDOS then 38 if getos() == 'Windows' then
39 txt(dtd_line) = "<!DOCTYPE MAN SYSTEM ""file://"+SCI+"\modules\helptools\help.dtd"">"; 39 txt(dtd_line) = "<!DOCTYPE MAN SYSTEM ""file://"+SCI+"\modules\helptools\help.dtd"">";
40 else 40 else
41 txt(dtd_line) = "<!DOCTYPE MAN SYSTEM """+SCI+"/modules/helptools/help.dtd"">"; 41 txt(dtd_line) = "<!DOCTYPE MAN SYSTEM """+SCI+"/modules/helptools/help.dtd"">";
@@ -108,7 +108,7 @@ function t=getlink(name,absolute_path,path)
108 108
109 name=stripblanks(name) 109 name=stripblanks(name)
110 110
111 if MSDOS then 111 if getos() == 'Windows' then
112 sep='\'; 112 sep='\';
113 else 113 else
114 sep='/'; 114 sep='/';
diff --git a/scilab/modules/helptools/macros/xmlfiletohtml.sci.in b/scilab/modules/helptools/macros/xmlfiletohtml.sci.in
index a3eaed5..a103b45 100644
--- a/scilab/modules/helptools/macros/xmlfiletohtml.sci.in
+++ b/scilab/modules/helptools/macros/xmlfiletohtml.sci.in
@@ -26,7 +26,7 @@ function ok = xmlfiletohtml(path,xsl,directory_language,default_language)
26 // path : XML file 26 // path : XML file
27 // xsl : abolute path of the xsl path 27 // xsl : abolute path of the xsl path
28 28
29 if MSDOS then 29 if getos() == 'Windows' then
30 generate_cmd='sabcmd'; 30 generate_cmd='sabcmd';
31 else 31 else
32 generate_cmd='@MANGENERATOR@'; 32 generate_cmd='@MANGENERATOR@';
@@ -73,7 +73,7 @@ function ok = xmlfiletohtml(path,xsl,directory_language,default_language)
73 73
74 // form the html generator command line instruction 74 // form the html generator command line instruction
75 75
76 if MSDOS then 76 if getos() == 'Windows' then
77 // sabcmd does not like c:/.. path replace it by file://c:/.. 77 // sabcmd does not like c:/.. path replace it by file://c:/..
78 xsl='file://'+getshortpathname(xsl); 78 xsl='file://'+getshortpathname(xsl);
79 generate_cmd='""'+WSCI+'\modules\helptools\bin\sablotron\sabcmd'+'""' 79 generate_cmd='""'+WSCI+'\modules\helptools\bin\sablotron\sabcmd'+'""'
diff --git a/scilab/modules/helptools/macros/xmlfiletohtml.sci.vc b/scilab/modules/helptools/macros/xmlfiletohtml.sci.vc
index 9a77d84..df4e92e 100644
--- a/scilab/modules/helptools/macros/xmlfiletohtml.sci.vc
+++ b/scilab/modules/helptools/macros/xmlfiletohtml.sci.vc
@@ -26,7 +26,7 @@ function ok = xmlfiletohtml(path,xsl,directory_language,default_language)
26 // path : XML file 26 // path : XML file
27 // xsl : abolute path of the xsl path 27 // xsl : abolute path of the xsl path
28 28
29 if MSDOS then 29 if getos() == 'Windows' then
30 generate_cmd='sabcmd'; 30 generate_cmd='sabcmd';
31 else 31 else
32 generate_cmd='xsltproc'; 32 generate_cmd='xsltproc';
@@ -73,7 +73,7 @@ function ok = xmlfiletohtml(path,xsl,directory_language,default_language)
73 73
74 // form the html generator command line instruction 74 // form the html generator command line instruction
75 75
76 if MSDOS then 76 if getos() == 'Windows' then
77 // sabcmd does not like c:/.. path replace it by file://c:/.. 77 // sabcmd does not like c:/.. path replace it by file://c:/..
78 xsl='file://'+getshortpathname(xsl); 78 xsl='file://'+getshortpathname(xsl);
79 generate_cmd='""'+WSCI+'\modules\helptools\bin\sablotron\sabcmd'+'""' 79 generate_cmd='""'+WSCI+'\modules\helptools\bin\sablotron\sabcmd'+'""'
diff --git a/scilab/modules/helptools/macros/xmltochm.sci b/scilab/modules/helptools/macros/xmltochm.sci
index 786fb22..a438c68 100644
--- a/scilab/modules/helptools/macros/xmltochm.sci
+++ b/scilab/modules/helptools/macros/xmltochm.sci
@@ -12,7 +12,7 @@ function generated_files = xmltochm(dirs,titles,directory_language,default_langu
12 12
13 all_scilab_help = %F; 13 all_scilab_help = %F;
14 14
15 if ~MSDOS then 15 if getos() <> 'Windows' then
16 warning(msprintf(gettext("%s: This function is only supported on Windows platforms.\n"),"xmltochm")); 16 warning(msprintf(gettext("%s: This function is only supported on Windows platforms.\n"),"xmltochm"));
17 return; 17 return;
18 end 18 end
@@ -46,7 +46,7 @@ function generated_files = xmltochm(dirs,titles,directory_language,default_langu
46 all_scilab_help = %T; 46 all_scilab_help = %T;
47 end 47 end
48 48
49 if MSDOS then 49 if getos() == 'Windows' then
50 if (generated_files <> []) then 50 if (generated_files <> []) then
51 if (getHHCpath() <> '') then 51 if (getHHCpath() <> '') then
52 for i = 1:size(generated_files,'*') 52 for i = 1:size(generated_files,'*')
diff --git a/scilab/modules/helptools/macros/xmltoformat.sci b/scilab/modules/helptools/macros/xmltoformat.sci
index 1a4218d..5f3e3ec 100644
--- a/scilab/modules/helptools/macros/xmltoformat.sci
+++ b/scilab/modules/helptools/macros/xmltoformat.sci
@@ -235,7 +235,7 @@ function generated_files = xmltoformat(output_format,dirs,titles,directory_langu
235 end 235 end
236 236
237 chdir(dirs(k)); 237 chdir(dirs(k));
238 if MSDOS then 238 if getos() == 'Windows' then
239 dirs(k) = getlongpathname(pwd()); 239 dirs(k) = getlongpathname(pwd());
240 else 240 else
241 dirs(k) = pwd(); 241 dirs(k) = pwd();
@@ -251,7 +251,7 @@ function generated_files = xmltoformat(output_format,dirs,titles,directory_langu
251 error(msprintf(gettext("%s: Directory %s does not exist or read access denied."),"xmltoformat",dirs_m(k))); 251 error(msprintf(gettext("%s: Directory %s does not exist or read access denied."),"xmltoformat",dirs_m(k)));
252 end 252 end
253 chdir(dirs_m(k)); 253 chdir(dirs_m(k));
254 if MSDOS then 254 if getos() == 'Windows' then
255 dirs_m(k) = getlongpathname(pwd()); 255 dirs_m(k) = getlongpathname(pwd());
256 else 256 else
257 dirs_m(k) = pwd(); 257 dirs_m(k) = pwd();
@@ -264,7 +264,7 @@ function generated_files = xmltoformat(output_format,dirs,titles,directory_langu
264 error(msprintf(gettext("%s: Directory %s does not exist or read access denied."),"xmltoformat",dirs_c(k))); 264 error(msprintf(gettext("%s: Directory %s does not exist or read access denied."),"xmltoformat",dirs_c(k)));
265 end 265 end
266 chdir(dirs_c(k)); 266 chdir(dirs_c(k));
267 if MSDOS then 267 if getos() == 'Windows' then
268 dirs_c(k) = getlongpathname(pwd()); 268 dirs_c(k) = getlongpathname(pwd());
269 else 269 else
270 dirs_c(k) = pwd(); 270 dirs_c(k) = pwd();
@@ -965,7 +965,7 @@ function tree = x2f_dir_to_tree(directory,level)
965 965
966 // Get the default title 966 // Get the default title
967 967
968 if MSDOS then 968 if getos() == 'Windows' then
969 tmpdirectory = strsubst(directory,"/\\$/","","r"); 969 tmpdirectory = strsubst(directory,"/\\$/","","r");
970 else 970 else
971 tmpdirectory = strsubst(directory,"/\/$/","","r"); 971 tmpdirectory = strsubst(directory,"/\/$/","","r");
@@ -1382,7 +1382,7 @@ function master_document = x2f_tree_to_master( tree )
1382 tree_xmllist = x2f_cat_xmllist( tree , [] ) 1382 tree_xmllist = x2f_cat_xmllist( tree , [] )
1383 1383
1384 // Process the path if under windows 1384 // Process the path if under windows
1385 if MSDOS then 1385 if getos() == 'Windows' then
1386 tree_xmllist(:,2) = "file:///"+ getshortpathname(tree_xmllist(:,2)); 1386 tree_xmllist(:,2) = "file:///"+ getshortpathname(tree_xmllist(:,2));
1387 end 1387 end
1388 1388
diff --git a/scilab/modules/helptools/tests/unit_tests/xmltochm.dia.ref b/scilab/modules/helptools/tests/unit_tests/xmltochm.dia.ref
index 557e66d..2ae4e99 100644
--- a/scilab/modules/helptools/tests/unit_tests/xmltochm.dia.ref
+++ b/scilab/modules/helptools/tests/unit_tests/xmltochm.dia.ref
@@ -8,7 +8,7 @@
8// <-- NO CHECK ERROR OUTPUT --> 8// <-- NO CHECK ERROR OUTPUT -->
9// <-- NEED JVM --> 9// <-- NEED JVM -->
10// xmltochm 10// xmltochm
11if MSDOS then 11if getos() == 'Windows' then
12// TEST 1 (french help and english help are complete) 12// TEST 1 (french help and english help are complete)
13// ============================================================================= 13// =============================================================================
14my_module_path = pathconvert(SCI+"/modules/helptools/examples/example_1",%f,%f); 14my_module_path = pathconvert(SCI+"/modules/helptools/examples/example_1",%f,%f);
@@ -74,4 +74,4 @@ chm_info = fileinfo(my_module_path+"/chm/scilab_en_US_help.chm");
74if chm_info == [] then bugmes();quit;end // file existence 74if chm_info == [] then bugmes();quit;end // file existence
75if chm_info(1) < 5000 then bugmes();quit;end // file size 75if chm_info(1) < 5000 then bugmes();quit;end // file size
76clean_help(my_english_help_dir); 76clean_help(my_english_help_dir);
77end // if MSDOS 77end // if getos() == 'Windows'
diff --git a/scilab/modules/helptools/tests/unit_tests/xmltochm.tst b/scilab/modules/helptools/tests/unit_tests/xmltochm.tst
index e455041..6f4622b 100644
--- a/scilab/modules/helptools/tests/unit_tests/xmltochm.tst
+++ b/scilab/modules/helptools/tests/unit_tests/xmltochm.tst
@@ -11,7 +11,7 @@
11 11
12// xmltochm 12// xmltochm
13 13
14if MSDOS then 14if getos() == 'Windows' then
15 15
16// TEST 1 (french help and english help are complete) 16// TEST 1 (french help and english help are complete)
17// ============================================================================= 17// =============================================================================
@@ -112,4 +112,4 @@ if chm_info(1) < 5000 then pause, end // file size
112 112
113clean_help(my_english_help_dir); 113clean_help(my_english_help_dir);
114 114
115end // if MSDOS \ No newline at end of file 115end // if getos() == 'Windows' \ No newline at end of file
diff --git a/scilab/modules/helptools/tests/unit_tests/xmltochm.win.dia.ref b/scilab/modules/helptools/tests/unit_tests/xmltochm.win.dia.ref
index dff5de5..0a1f1de 100644
--- a/scilab/modules/helptools/tests/unit_tests/xmltochm.win.dia.ref
+++ b/scilab/modules/helptools/tests/unit_tests/xmltochm.win.dia.ref
@@ -8,7 +8,7 @@
8// <-- NO CHECK ERROR OUTPUT --> 8// <-- NO CHECK ERROR OUTPUT -->
9// <-- NEED JVM --> 9// <-- NEED JVM -->
10// xmltochm 10// xmltochm
11if MSDOS then 11if getos() == 'Windows' then
12// TEST 1 (french help and english help are complete) 12// TEST 1 (french help and english help are complete)
13// ============================================================================= 13// =============================================================================
14my_module_path = pathconvert(SCI+"/modules/helptools/examples/example_1",%f,%f); 14my_module_path = pathconvert(SCI+"/modules/helptools/examples/example_1",%f,%f);
@@ -158,4 +158,4 @@ clean_help(my_english_help_dir);
158 158
159... 159...
160 160
161end // if MSDOS 161end // if getos() == 'Windows'