On Mar 17, 2010, at 10:09 AM, David Berry wrote:
>>
>
> Off the top of my head, I can't think why the NDG routines that use
> ONE_SHELL_ECHO (i.e. the ones that create new output NDFs) should ever
> end up in a position where the output NDF name contains wild cards.
> And if there are no wild cards in the output NDF name, then it won't
> make any difference whether globbing is performed or not.
>
Ok. I've added a PSX_WORDEXP routine that can mostly replace ONE_SHELL_ECHO and ONE_FIND_FILE. I've left the ONE_ versions unchanged since
- ONE_SHELL_ECHO does not expand globs
- ONE_FIND_FILE can look inside a directory
I've also modified NDG to use PSX_WORDEXP. Keep an eye out for oddness since I have probably not tested NDG in all its possible uses for metacharacter expansion.
Of note, I can't find a single routine that calls ONE_SHELL_ECHO now. There are four applications using ONE_FIND_FILE (KAPPA, CCDPACK, CONVERT and SST) and they do set the directory search parameter to true so I'm not sure if they can be changed. GRP and CTG are the two libraries using ONE_FIND_FILE (2 out of 3 set ISDIR to true). I imagine that many o the ISDIR=.TRUE. usages are from my cargo-cult patching all these libraries with private wildcard routines to use ONE_FIND_FILE.
Hope this helps.
--
Tim Jenness
Joint Astronomy Centre
|