Changeset 223 for trunk/SRC/Utilities


Ignore:
Timestamp:
03/14/07 18:13:39 (17 years ago)
Author:
pinsard
Message:

improvements of some *.pro

Location:
trunk/SRC/Utilities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Utilities/protype.pro

    r163 r223  
    66; test is a ".pro" file corresponds to an IDL procedure, function or batch file. 
    77; 
    8 ; @categories  
     8; @categories 
    99; Utilities 
    1010; 
    11 ; @param FILE {in}  
    12 ; A scalar of string type, the name of the ".pro" file to be tested 
     11; @param FILE {in}{required}{type=string} 
     12; the name of the ".pro" file to be tested. 
    1313; if necessary, the input name is completed with '.pro' 
    1414; and its path found in !path 
    1515; 
    16 ; @returns  
     16; @returns 
     17; -1 if not found 
    1718; A scalar of string type: 'proc', 'func' or 'batch' 
    1819; 
     
    5455    ELSE:RETURN, 'batch' 
    5556  ENDCASE 
    56   
     57 
    5758  RETURN, -1 
    5859END 
  • trunk/SRC/Utilities/xfile.pro

    r163 r223  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; display in a widget an ASCII file. 
    8 ; It is the same thing that xdisplayfile but here, we use it  
    9 ; to display the content of a procedure or of a function,  
     8; It is the same thing that xdisplayfile but here, we use it 
     9; to display the content of a procedure or of a function, 
    1010; even if it is not in the current directory (thanks to the path). 
    1111; 
    12 ; @categories  
     12; @categories 
    1313; Utilities 
    1414; 
    15 ; @param FILENAME {in}{required}  
    16 ; It is the name of the procedure or of the function  
     15; @param FILENAME {in}{required} 
     16; It is the name of the procedure or of the function 
    1717; we want to display (with or without .pro at the end). 
    1818; 
    19 ; @keyword _EXTRA  
     19; @keyword _EXTRA 
    2020; used to pass your keywords 
    2121; 
    22 ; @examples xfile,'plt' 
     22; @examples 
     23; IDL> xfile,'plt' 
    2324; 
    24 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    25 ;                       7/1/99 
    26 ;                       6/7/1999: compatibility mac and windows 
     25; @history 
     26; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     27; 7/1/99 
     28; 6/7/1999: compatibility mac and windows 
    2729; 
    28 ; @version $Id$ 
     30; @version 
     31; $Id$ 
    2932; 
    3033;- 
     
    3841pfile = strlowcase(filename) 
    3942; 
    40 ; we have to find the full name.  
     43; we have to find the full name. 
    4144; 
    42    if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro"  
     45   if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro" 
    4346   thisOS = strupcase(strmid(!version.os_family, 0, 3)) 
    4447   CASE thisOS of 
     
    5659   i = 0 
    5760   repeat begin 
    58       res = findfile(pfile[i])  
     61      res = findfile(pfile[i]) 
    5962      i = i+1 
    60    endrep until res[0] NE '' OR i EQ n_elements(pfile)  
     63   endrep until res[0] NE '' OR i EQ n_elements(pfile) 
    6164   if res[0] NE  '' then BEGIN 
    6265; we open the file in a widget 
    6366   xdisplayfile, pfile[i-1], _extra = ex 
    64    ENDIF ELSE ras = report('le fichier demande n''existe pas...') 
     67   ENDIF ELSE ras = report('file does not exist ...') 
    6568; 
    6669; 
  • trunk/SRC/Utilities/xhelp.pro

    r163 r223  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44; Display an IDL procedure header using widgets and the widget manager. 
    55; 
     
    77; Widget 
    88; 
    9 ; @param FILENAME {in}{required}  
    10 ; A scalar string that contains the filename of the file to display.   
    11 ; If FILENAME does not include a complete path specification, xhelp will  
     9; @param FILENAME {in}{required} 
     10; A scalar string that contains the filename of the file to display. 
     11; If FILENAME does not include a complete path specification, xhelp will 
    1212; search for the file in the current working directory and then each of the 
    1313; directories listed in !PATH environment variable.  The 
    1414; ".pro" file suffix will be appended if it is not supplied. 
    1515; 
    16 ; @keyword _EXTRA  
     16; @keyword _EXTRA 
    1717; used to pass your keywords 
    1818; 
    19 ; @restrictions  
     19; @restrictions 
    2020; Triggers the XMANAGER if it is not already in use. 
    2121; 
    22 ; @examples  
    23 ; Open a file and create a widget to display its contents. 
     22; @examples 
     23; IDL> xhelp,'plt' 
    2424; 
    25 ; @history Written By Steve Richards, December 1990 
     25; @history 
     26; Written By Steve Richards, December 1990 
    2627;       Graceful error recovery, DMS, Feb, 1992. 
    2728;       Modified to extract .pro documentation headers, PJR/ESRG mar94 
     
    3334;  6/7/1999: compatibility mac and windows 
    3435; 
    35 ; @version $Id$ 
     36; @version 
     37; $Id$ 
    3638; 
    3739;- 
     
    4749      return 
    4850   endif 
    49 ; We have to find the full name  
     51; We have to find the full name 
    5052   pfile=FILENAME 
    51    if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro"  
     53   if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro" 
    5254   thisOS = strupcase(strmid(!version.os_family, 0, 3)) 
    5355   CASE thisOS of 
     
    6769   n = 0 
    6870   repeat begin 
    69       res = findfile(pfile[n])  
     71      res = findfile(pfile[n]) 
    7072      n = n+1 
    71    endrep until res[0] NE '' OR n EQ n_elements(pfile)  
     73   endrep until res[0] NE '' OR n EQ n_elements(pfile) 
    7274   if res[0] NE '' then BEGIN 
    7375      openr, unit,pfile[n-1], /get_lun ; opening of the file 
    74 ; we select the heading piece      
     76; we select the heading piece 
    7577      a = strarr(1000)          ;Maximum # of lines 
    7678      xsize=0 
     
    9092      endwhile 
    9193      if i EQ 0 then $ 
    92          ras = report('le programme a etait mal ecrit, il n''y a pas d''en-tete... utiliser xfile.pro.') ELSE BEGIN  
     94         ras = report('le programme a etait mal ecrit, il n''y a pas d''en-tete... utiliser xfile.pro.') ELSE BEGIN 
    9395         a = a[0:i-1] 
    9496; we wrote the a's content in a widget 
    9597         xdisplayfile,'toto',text = a,title=pfile[n-1], _extra = ex 
    96       ENDELSE  
     98      ENDELSE 
    9799      FREE_LUN, unit         ;free the file unit. 
    98100   ENDIF ELSE ras = report('le fichier demande n''existe pas...') 
Note: See TracChangeset for help on using the changeset viewer.