Changeset 9317
- Timestamp:
- 08/12/11 11:00:18 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/externalpackages/m2html/m2html.m.patch
r2075 r9317 1 308a309,322 2 > 3 > %add root directories 4 > for i=1:length(mdir) 5 > path=strsplit(mdir{i},'/'); 6 > string=path{1}; 7 > mdir{end+1}=string; 8 > for j=2:length(path), 9 > string=[string '/' path{j}]; 10 > mdir{end+1}=string; 11 > end 12 > end 13 > 14 > mdir=unique(mdir); 15 > 16 558c572 17 < d = {d{~ismember(d,{'.' '..'})}}; 18 --- 19 > d = {d{~ismember(d,{'.' '..' 'CVS' '.svn'})}}; 20 690c704 21 < eval(['!' dot_exec ' -Tcmap -Tpng ' mdotfile ... 22 --- 23 > eval(['!' dot_exec ' -Tcmap -Tgif ' mdotfile ... 24 692c706 25 < ' -o ' fullfile(options.htmlDir,mdir{i},[dotbase '.png'])]) 26 --- 27 > ' -o ' fullfile(options.htmlDir,mdir{i},[dotbase '.gif'])]) 28 703c717 29 < tpl = set(tpl,'var','GRAPH_IMG', [dotbase '.png']); 30 --- 31 > tpl = set(tpl,'var','GRAPH_IMG', [dotbase '.gif']); 32 1035c1049 33 < d = {d{~ismember(d,{'.' '..'})}}; 34 --- 35 > d = {d{~ismember(d,{'.' '..' 'CVS' '.svn'})}}; 1 *** m2html.m 2011-08-12 10:57:45.000000000 -0700 2 --- install/m2html.m 2011-08-12 10:58:26.000000000 -0700 3 *************** 4 *** 306,311 **** 5 --- 306,325 ---- 6 end 7 8 mdir = unique(mdirs); 9 + 10 + %add root directories 11 + for i=1:length(mdir) 12 + path=strsplit(mdir{i},'/'); 13 + string=path{1}; 14 + mdir{end+1}=string; 15 + for j=2:length(path), 16 + string=[string '/' path{j}]; 17 + mdir{end+1}=string; 18 + end 19 + end 20 + 21 + mdir=unique(mdir); 22 + 23 if options.verbose, 24 fprintf('Found %d unique Matlab directories.\n',length(mdir)); 25 end 26 *************** 27 *** 423,429 **** 28 %- Set some template variables 29 tpl = set(tpl,'var','DATE',[datestr(now,8) ' ' datestr(now,1) ' ' ... 30 datestr(now,13)]); 31 ! tpl = set(tpl,'var','MASTERPATH', './'); 32 tpl = set(tpl,'var','DIRS', sprintf('%s ',mdir{:})); 33 34 %- Print list of unique directories 35 --- 437,443 ---- 36 %- Set some template variables 37 tpl = set(tpl,'var','DATE',[datestr(now,8) ' ' datestr(now,1) ' ' ... 38 datestr(now,13)]); 39 ! tpl = set(tpl,'var','MASTERPATH', ''); 40 tpl = set(tpl,'var','DIRS', sprintf('%s ',mdir{:})); 41 42 %- Print list of unique directories 43 *************** 44 *** 555,561 **** 45 tpl = set(tpl,'var','subfold',''); 46 d = dir(mdir{i}); 47 d = {d([d.isdir]).name}; 48 ! d = {d{~ismember(d,{'.' '..'})}}; 49 for j=1:length(d) 50 if ismember(fullfile(mdir{i},d{j}),mdir) 51 tpl = set(tpl,'var','SUBDIRECTORY',... 52 --- 569,575 ---- 53 tpl = set(tpl,'var','subfold',''); 54 d = dir(mdir{i}); 55 d = {d([d.isdir]).name}; 56 ! d = {d{~ismember(d,{'.' '..' 'CVS' '.svn'})}}; 57 for j=1:length(d) 58 if ismember(fullfile(mdir{i},d{j}),mdir) 59 tpl = set(tpl,'var','SUBDIRECTORY',... 60 *************** 61 *** 687,695 **** 62 % Path should look like: ...;C:\WINNT\System32;...;C:\GraphViz\bin 63 % (Note that this should have been done automatically during GraphViz installation) 64 65 ! eval(['!' dot_exec ' -Tcmap -Tpng ' mdotfile ... 66 ' -o ' fullfile(options.htmlDir,mdir{i},[dotbase '.map']) ... 67 ! ' -o ' fullfile(options.htmlDir,mdir{i},[dotbase '.png'])]) 68 % use '!' rather than 'system' for backward compability 69 catch 70 fprintf('failed.'); 71 --- 701,709 ---- 72 % Path should look like: ...;C:\WINNT\System32;...;C:\GraphViz\bin 73 % (Note that this should have been done automatically during GraphViz installation) 74 75 ! eval(['!' dot_exec ' -Tcmap -Tgif ' mdotfile ... 76 ' -o ' fullfile(options.htmlDir,mdir{i},[dotbase '.map']) ... 77 ! ' -o ' fullfile(options.htmlDir,mdir{i},[dotbase '.gif'])]) 78 % use '!' rather than 'system' for backward compability 79 catch 80 fprintf('failed.'); 81 *************** 82 *** 700,706 **** 83 tpl = set(tpl,'var','INDEX',[options.indexFile options.extension]); 84 tpl = set(tpl,'var','MASTERPATH', backtomaster(mdir{i})); 85 tpl = set(tpl,'var','MDIR', mdir{i}); 86 ! tpl = set(tpl,'var','GRAPH_IMG', [dotbase '.png']); 87 fmap = openfile(fullfile(options.htmlDir,mdir{i},[dotbase '.map']),'r'); 88 tpl = set(tpl,'var','GRAPH_MAP', fscanf(fmap,'%c')); 89 fclose(fmap); 90 --- 714,720 ---- 91 tpl = set(tpl,'var','INDEX',[options.indexFile options.extension]); 92 tpl = set(tpl,'var','MASTERPATH', backtomaster(mdir{i})); 93 tpl = set(tpl,'var','MDIR', mdir{i}); 94 ! tpl = set(tpl,'var','GRAPH_IMG', [dotbase '.gif']); 95 fmap = openfile(fullfile(options.htmlDir,mdir{i},[dotbase '.map']),'r'); 96 tpl = set(tpl,'var','GRAPH_MAP', fscanf(fmap,'%c')); 97 fclose(fmap); 98 *************** 99 *** 1032,1038 **** 100 if recursive 101 d = dir(mdirs{i}); 102 d = {d([d.isdir]).name}; 103 ! d = {d{~ismember(d,{'.' '..'})}}; 104 for j=1:length(d) 105 mfiles = getmfiles(cellstr(fullfile(mdirs{i},d{j})),... 106 mfiles,recursive); 107 --- 1046,1052 ---- 108 if recursive 109 d = dir(mdirs{i}); 110 d = {d([d.isdir]).name}; 111 ! d = {d{~ismember(d,{'.' '..' 'CVS' '.svn'})}}; 112 for j=1:length(d) 113 mfiles = getmfiles(cellstr(fullfile(mdirs{i},d{j})),... 114 mfiles,recursive);
Note:
See TracChangeset
for help on using the changeset viewer.