³ò
ÈÖýIc           @   s1
  d  Z  d d k Z d d k Z d d k Z d Z d „  Z d „  Z d „  Z e d j oÕ	e i	 ƒ  Z
 e
 i d ƒ od e i e _ d	 GHe Z e
 d i Z e
 d
 i Z e d ƒ Z e i i e e e d ƒ d ƒ Z n˜d d k Z e i e i ƒ Z e e ƒ d j o
 d Z n e d Z e i d e i ƒ Z e i d e i ƒ Z e i d e i ƒ Z e d j o) e i i e i d d d d d ƒ Z n e i i e ƒ p' e i e d e d ƒ e i  d ƒ n e i d e i ƒ Z! e! d j o e i i" e! ƒ p' e i e d e! d ƒ e i  d ƒ n e e i# e! ƒ ƒ d j o' e i e d e! d ƒ e i  d ƒ qon e e ƒ Z$ e$ i e ƒ p. e o d e GHq¹e i e d e d ƒ n e g Z% g  Z& d Z' xKe' e e% ƒ j  o7e% e' Z( e$ i e( ƒ oü e& i) e( e$ e( d f ƒ g  Z* e$ e( d  Z+ e+ d j o e* i, e+ i- d! ƒ ƒ n e$ e( d" Z+ e+ d j o e* i, e+ i- d! ƒ ƒ n e$ e( d# Z+ e+ d j o e* i, e+ i- d! ƒ ƒ n xL e* D]- Z. e% i/ e. ƒ d j o e% i) e. ƒ qÅqÅWn e& i) e( d$ f ƒ e' d 7Z' qÑWd% Z0 g  Z1 d Z' xi e' e e& ƒ j  oU e& e' Z2 e i i- e2 d ƒ d d& j o e1 i) e2 d ƒ e& e' =q1e' d 7Z' q1Wg  Z3 d Z' xi e' e e& ƒ j  oU e& e' Z2 e i i4 e2 d ƒ d d' j o e3 i) e2 d ƒ e& e' =q©e' d 7Z' q©Wg  Z5 d Z' x e' e e& ƒ j  ok e& e' Z2 e2 d d$ j oB e2 d d( j o& e2 d d) j o e5 i) e2 d ƒ n e& e' =q!e' d 7Z' q!Wg  Z6 x= e& D]5 Z2 e6 i/ e2 d ƒ d j o e6 i) e2 d ƒ q­q­We e1 ƒ d j o e6 i) e0 ƒ n d* Z7 e6 i/ e7 ƒ d j o e6 i8 e7 ƒ n e o¤d+ GHd, GHd- e e e% ƒ e e6 ƒ f GHd. GHd/ GHx2 e& D]* Z2 d0 GHd1 e2 d GHd1 e2 d GHd2 GHqwWd3 GHe e3 ƒ d j oQ d4 GHd5 e e e3 ƒ f GHd6 GHd7 GHx! e3 D] Z7 d0 GHd1 e7 GHd2 GHqèWd3 GHn e e5 ƒ d j oQ d4 GHd8 e e e5 ƒ f GHd6 GHd7 GHx! e5 D] Z7 d0 GHd1 e7 GHd2 GHqLWd3 GHn e e1 ƒ d j oT d4 GHd9 e e e1 ƒ e0 f GHd6 GHd7 GHx! e1 D] Z7 d0 GHd1 e7 GHd2 GHq³Wd3 GHn d: GHn;e! d j oBx e3 D] Z9 e6 i) e9 ƒ qöWg  Z: xo e6 D]g Z9 e i i; e9 ƒ Z< e i i e! e i i= e< ƒ ƒ Z> e i? e i@ d; d; d< e< e> ƒ ZA e: i) e< ƒ qWe i i e! d= ƒ Z< d> i e: ƒ d> Z: eB e< d? ƒ iC e: ƒ e i i e! d@ ƒ ZD d> i e5 ƒ d> Z5 eB eD d? ƒ iC e5 ƒ e i e dA dB dC e e% ƒ e e6 ƒ f ƒ nì e o‘ x e& D] Z2 dD e2 GHq?	Wx e3 D] Z7 dD d e7 f GHqY	Wx$ e5 D] Z7 e i e dE dF e7 ƒ qy	We i e dA dB dC e e% ƒ e e6 ƒ f ƒ nT x$ e5 D] Z7 e i e dE dF e7 ƒ qÐ	We i e dA dB dC e e% ƒ e e6 ƒ f ƒ e i  d ƒ n d S(G   s=  
#+
# NAME:
#	www_help_dep
# PURPOSE: 
#	Provides dependence tree information for
#	software in the SMEI tree
# CALLING SEQUENCE:
#	www_help_dep <module> -db=<db.txt> -dest=<dest> -show
# INPUTS:
#	module		name of program, function or procedure
#					(default: ipsdt)
#	db.txt		name of data base file containing the
#					dependency information.
#					(default: for.txt)
#					(this is created as part of the
#					www_help system).
#	<dest>		name of an empty, existing directory
#					if specified, this is where copies
#					of all files are written.
#					If omitted information is written
#					to screen only.
#	-show		displays a list of file names on the screen
#	-html		displays html file
# LIMITATIONS:
#	Works for Fortran and IDL code only
# PROCEDURE:
# MODIFICATION HISTORY:
#       SEP-2007, Paul Hick (UCSD/CASS)
#-
iÿÿÿÿNt   www_help_depc         C   sž   t  d d ƒ i ƒ  i ƒ  } x` | D]4 } | i d ƒ } |  i | d ƒ d j o Pq" q" W|  i d ƒ } d G| d Gd GHd S| d	 |  t | d ƒ } | S(
   Ns   www_help.lstt   rt   =i    t   /s   Do not know where s    ist    i   (   t   opent   readt   splitt   findt   len(   t   filet   topst   topt   name(    (    s   www_help_dep.pyt   read_toplist)   s     	c          C   s4   t  h  d d <d d <d d <d d <ƒ }  |  S(   NR   R
   t   callst   includet   external(   t   dict(   t   blank(    (    s   www_help_dep.pyt   www_help_blank_module9   s    			c   
      C   sF  t  |  d ƒ i ƒ  i d ƒ d d !} t ƒ  } d } t | ƒ } d } xÞ | | j  oÐ | | i d ƒ \ } } | i ƒ  } | d j o8 | d j o | | |	 <n | d 7} | }	 t ƒ  } nY | i | ƒ oH | d j o7 | | d	 j o | | | <q| | c d
 | 7<qn | d 7} qI W| d j o | | |	 <n | S(   NR   s   
i    iÿÿÿÿt   :t   modulei   s   (none)R   t   ,(   R   R   R   R   R	   t   stripR   t   has_key(
   t   db_filet   db_tablet   dbt   it   nt   ndbt   keyt   linet   module_dictR   (    (    s   www_help_dep.pyt   www_help_get_dbF   s.    %	
t   __main__t   htmls   Content-type: text/html
R   s   $DBi   t   ipsdts   -shows   -htmls   -db=R   t   HOMEt   public_htmlt   helpt   smeis   for.txtt   Es   file does not exists   -dest=s   directory does not existi    s   directory is not emptys   top module not found: s   top module not foundR
   R   R   R   R   s   <unresolved reference>s(   $SMEI/cpp/cfitsio3030/cfitsio3030.tar.gzs	   forfits.fs   .ht   BListFnct   BReadFncs   $SMEI/ucsd/gen/for/os/logmod.fs[   <html>
<head>
<title>www_help dependencies, version 2.6</title>
</head>

<body>

<center>

s   <table border=1>
<tr>s2     <td><b>%s</b> uses %d modules from %d files</td>s   </tr>
</table>
<br />

s   <table border=1>s   <tr>s     <td>%s</td>s   </tr>s
   </table>

s   <br />
<table border=1>
<tr>s0     <td><b>%s</b> depends on %d include files</td>s   </tr>
</table>

s   <br />
<table border=1>s0     <td><b>%s</b> has %d unresolved reference</td>s8     <td><b>%s</b> depends on %d Fits routines from %s</td>s   </center>

</body>
</html>
t   cps   -vpfs	   files.txts   
t   ws   anon.txtt   It   totals   %d modules in %d filess   %-30s %st   Ws   module not found,(E   t   __doc__t   syst   ost   cgit   csayR   R   R#   t   __name__t   FieldStoraget   formR   t   stdoutt   stderrt   TrueR%   t   valuet
   top_moduleR   t   db_topt   patht   joinR	   t   tinyt   argst   argvt   is_theret   showt   startt   environt   existst   sayt   exitt   destinationt   isdirt   listdirR   t   all_modulest	   all_pairsR   R   t   appendt   add_modulest   tmpt   extendR   t
   new_modulet   countt   fits_archivet   fitst   pairt   inclt   splitextt   anont	   all_filest   thist   removet   ft   neart
   expandvarst	   near_filet   basenamet   far_filet   spawnlpt   P_WAITt   stsR   t   writet	   anon_file(    (    (    s   www_help_dep.pys   <module>    sr  $			F'

)	
 
!
!
"  	 			 			 				  !!0   0 ,