#!/bin/csh -f # # MKPROTO -- Generate the VOS prototype definitions. unalias chdir ls egrep wc rm set vos_dir = "sys" #set math_dir = "math" set math_dir = "" set xtools_dir = "pkg/xtools" set ds_dir = "pkg/images/tv/display pkg/images/tv/wcslab" #set vosdirs = "$vos_dir $math_dir $ds_dir" set vosdirs = "$vos_dir $math_dir $xtools_dir $ds_dir" set curdir = `echo $cwd` set tproto = /tmp/_vosproto.$$ foreach d ($vosdirs) # Process each of the subdirectories. # foreach sd (`find $d -type d -print`) # Skip the IMFORT library and any documentation directories if ($sd:t != "doc" && "`echo $sd | egrep -e imfort`" == "" && \ "`echo $sd | egrep -e osb`" == "" && \ "`echo $sd | egrep -e memdbg`" == "" && \ "`echo $sd | egrep -e nspp`" == "") then chdir $sd # go to subdirectory set nf = `ls -1 | egrep -e "\.f" | wc -l` # nfiles to process set nx = `ls -1 | egrep -e "\.x" | wc -l` # nfiles to process echo "Processing: "$nx" "$nf" "$sd if ($nf > 0 || $nx > 0) then # Skip any files beginning with the letters 'zz', e.g. test # files like zzdebug.x foreach f ( [a-z][a-y]*.[xf] ) if ($f != 'intrp.f' && \ $f != 'xtpmmap.x' && \ $f != 'ytpmmap.x') then xc -c -/P $f >& /dev/null # make prototype else echo " Skipping " $f endif end egrep -h ^extern *.P >> $tproto # save prototypes /bin/rm -f *.[oP] >& /dev/null # clean up endif chdir $curdir # back to top else echo " Skipping " $sd endif end end # Sort the prototype file, exclude certain symbols which are duplicates # in the VOS but harmless because they occur in places that never conflict, # e.g. the stdgraph and imd kernels. cat $tproto | \ egrep -v arbpix_ | \ egrep -v imdgeg_ | \ egrep -v stxset_ | \ egrep -v stxpas_ | \ egrep -v dgt_ | \ egrep -v sgt_ | \ egrep -v asider_ | \ egrep -v asifit_ | \ egrep -v bndsol_ | \ egrep -v ffa_ | \ egrep -v ffs_ | \ egrep -v fft842_ | \ egrep -v avdrs_ | \ egrep -v asigrl_ | \ egrep -v smooth_ | \ egrep -v sigl2 | \ egrep -v sigm2 | \ egrep -v impcom_ | \ egrep -v intrp | \ egrep -v srch | \ egrep -v codim | \ egrep -v mrsole | \ egrep -v mreval | \ egrep -v \ icg | \ egrep -v iclisd | \ egrep -v gscr | \ egrep -v imdcom | \ egrep -v getrot | \ egrep -v gtplot | \ egrep -v xev | \ egrep -v ceps | \ egrep -v sgt | \ egrep -v sgt | \ egrep -v U_fp | \ sort >$iraf/unix/hlib/libc/vosproto.h # sigl2* and sigm2* removed because of multiple uses in apps # impcom removed because imio$dbc/impcom.x conflicts with plot$t_implot.x # use of 'impcom' as a common # intrp* removed because it's use is xtools$ was commented out # srch* removed because it's use is xtools$ was commented out # mrsole/mreval removed because of duplicate use (splot$deblend.x and # xtools$numrecipes) # icguag removed duplicate use in noao$imred/dtoi