;+ ; NAME: ; www_help_info ; PURPOSE: ; IDL main program to retrieve list of procedures/function ; referenced by a given IDL procedure/function ; CATEGORY: ; www_help ; CALLING SEQUENCE: ; idl www_help_info ; INPUTS: ; OUTPUTS: ; CALLS: ; www_help_info_sub ; SEE ALSO: ; www_help_get_info ; RESTRICTIONS: ; No IDL functions or procedures should be called prior to the call ; to routine_info in in www_help_info_sub. ; PROCEDURE: ; > Program does several things: ; a. reads 'path' and 'name' from $www_help/www_help.info ; b. uses 'path' to set the IDL !path variable ; c. uses the IDl procedures resolve_routine and routine_name to get the ; list of routines and functions ; d. writes the number of modules found and a comma separated list of ; module names back into $www_help/www_help.info ; e. If something went wrong a line is written to $www_help/www_help.error ; with a best guess at what went wrong. ; > See href=www_help_get_info= for more information ; > All IDL messages are dumped to /dev/null ; > Currently the main program is executed from a bash script www_help_bash ; after IDL_STARTUP is cleared. If there is a way to force IDL to ignore ; IDL_STARTUP at starup then then the bash script can be bypassed. ; MODIFICATION HISTORY: ; FEB-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- ;!quiet = 1 info = getenv('temp_file') ; Filepath is not used here, because I don't want it on the list of compiled functions sep = (['/','\',']',':'])[(where(strlowcase(!version.os_family) EQ ['unix','windows','vms','macos']))[0]] temp = getenv('www_help') IF strmid(temp,strlen(temp)-1,1) NE sep THEN temp = temp+sep skip = (file_search(temp+'www_help.skip'))[0] here = '' name = '' path = '' file_name = '' search_path = '' openr, /get_lun, iu, info, /delete readf, iu, here ; Location of www_help package readf, iu, name ; Procedure name readf, iu, path ; Fully-qualified file name readf, iu, file_name ; Just the file name readf, iu, search_path ; IDL search path free_lun, iu ; Since IDL was started without a startup file !path at this point only contains ; the IDL distribution. To be able to find 'name' we need to put the appropriate tree ; into the !path. IF strlowcase(!version.os_family) EQ 'windows' THEN sep = 59B ; semi-colon IF strlowcase(!version.os_family) EQ 'unix' THEN sep = 58B ; colon IF strlowcase(!version.os_family) EQ 'vms' THEN sep = 32B ; space sep = string(sep) !path = expand_path('+'+here)+sep+search_path+sep+!path www_help_info_sub, name, path, file_name, n, list, flag=flag, skip=skip openw, /get_lun, iu, info, width=(strlen(list) > 20) printf, iu, n IF n NE 0 THEN printf, iu, list free_lun, iu IF n_elements(flag) NE 0 THEN IF flag EQ 'ok' THEN exit IF n_elements(flag) EQ 0 THEN flag = 'no idea what happened' openw, /get_lun, iu, temp+'www_help.error', /append printf, iu, name+' ('+path+')'+': flag : '+flag free_lun, iu exit