This works, thanks!
Eduardo
On 27 February 2013 16:33, Tim Jenness <[log in to unmask]> wrote:
> Use NULL instead of DAT__ROOT. When I installed a proper HDS C API the need
> for DAT__ROOT disappeared. It should have given you a warning with -Wall.
>
>
> On Wed, Feb 27, 2013 at 12:14 PM, Eduardo Unda-Sanzana <[log in to unmask]>
> wrote:
>>
>> My old software now compiles, but I'm getting strange errors while trying
>> to open a 2-D NDF. I'd like to check if the syntax I'm using is still valid
>> but I'm not able to find documentation for the NDF library. Is there any
>> publicly available?
>>
>> In particular the relevant lines of my code are:
>>
>> [Quote]
>> statusndf = SAI__OK;
>> ndfBegin();
>> ndfOpen(DAT__ROOT,name,"READ","OLD",&indf,&placendf,&statusndf);
>> ndfDim(indf,2,dimndf,&ndimndf,&statusndf);
>> if (ndimndf != 2) {
>> fprintf(stderr, "The file %s.sdf is not
>> 2-dimensional.\n",name);
>> exit(EXIT_FAILURE);
>> }
>> [Unquote]
>>
>> and the output is:
>>
>> [Quote]
>> !! HDS locator invalid for import: value==0xbfbb5030 (possible programming
>> ! error).
>> !! DAT_SHAPE: Error enquiring the shape of an HDS object.
>> !! NDF_OPEN: Error opening an NDF data structure.
>> The file test.sdf is not 2-dimensional.
>> [Unquote]
>>
>> Eduardo
>
>
--
Eduardo Unda-Sanzana
Research (in English): http://research.almagesto.org
Personal (in Spanish): http://eduardo.almagesto.org
"Solamente lo barato se compra con el dinero" (A. Cortez)
|