make_dustem_wrap_dependencies.pro
1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
PRO make_dustem_wrap_dependencies
;== make a list of routines used by Dustem
;.full_reset
dustem_fit_sed_readme
dustem_run_readme
help,/function,output=ff
help,/pro,output=pp
ff=ff(1:*)
pp=pp(2:*)
nff=n_elements(ff)
npp=n_elements(pp)
one_func={name:'',path:'',args:ptr_new()}
one_pro={name:'',path:'',args:ptr_new()}
func_list=replicate(one_func,nff)
pro_list=replicate(one_pro,npp)
FOR i=0L,nff-1 DO BEGIN
str=strcompress(ff(i))
vv=str_sep(str,' ')
func_list(i).name=vv(0)
func_list(i).args=ptr_new(vv(1:*))
wh=which_pro(strlowcase(func_list(i).name))
func_list(i).path=wh(0)
ENDFOR
FOR i=0L,npp-1 DO BEGIN
str=strcompress(pp(i))
vv=str_sep(str,' ')
pro_list(i).name=vv(0)
pro_list(i).args=ptr_new(vv(1:*))
wh=which_pro(strlowcase(pro_list(i).name))
pro_list(i).path=wh(0)
ENDFOR
one_st={name:'',path:''}
st=replicate(one_st,nff+npp)
st.name=[func_list.name,pro_list.name]
st.path=[func_list.path,pro_list.path]
;=== remove empty names
ind=where(st.name NE '')
st=st(ind)
;=== remove empty path (are entries without .pro)
ind=where(st.path NE '')
st=st(ind)
;=== order by path
order=sort(st.path)
st=st(order)
file=!dustem_wrap_soft_dir+'/src/idl/all_dustem_dependencies.xcat'
write_xcat,st,file
message,'Wrote '+file,/continue
END