Problem:
========

In HDF4.0r1 and previous versions of HDF several Fortran 
routines declared a formal parameter as character*(*) or 
integer while the actual parameter was a character or 
a numeric type. This caused problems on some systems, 
such as VMS and T3D. 

In HDF4.0r2 each of these routines is either replaced 
by 2 routines, one for character type parameters and 
another for numeric type parameters; or, a new routine 
is added for char type parameters and the old routine is 
used for numeric type parameters only. Those routines
that were replaced by two routines should be phased out
in the future. However, in order to not break currently 
working applications they are still supported in 
HDF4.0r2. New applications should use the new routines. 

Routines and parameters affected:
================================
1. Write vdata

Old:
    vsfwrit(vsid, databuf, n_rec, interlace)
        character*(*) databuf

HDF4.0r2:
    
    Write to a vdata from a character buffer:
      integer function vsfwrtc(vsid, cbuf, n_rec, interlace) 
            integer vsid, n_rec, interlace
            character*(*) cbuf
    Write to a vdata from an integer buffer (for numeric values):
      integer function vsfwrt(vsid, buf, n_rec, interlace)  
           integer  vsid, n_rec, interlace
           <valid numeric type> buf

2. Read vdata
 
Old:
    vsfread(vsid, buf, n_recs, interlace)
         character*(*) buf
HDF4.0r2:
    Read records into a character buffer:
      integer function vsfrdc(vsid, cbuf, n_recs, interlace)
          integer vsid, n_recs, interlace
          character*(*) cbuf
    Read records into an integer buffer (for numeric values):
      vsfrd(vsid, buf, n_recs, interlace)
          integer vsid, n_recs, interlace
          <valid numeric type> buf

3. High level function for creating a single field single
   component vdata
 
Old:
    vhfsd(f, field, buf, n, dtype, vsname, vsclass)
         integer buf
HDF4.0r2:
    Store a simple character dataset in a vdata:
      integer function vhfscd(f,field,cbuf,n,dtype,vsname,vsclass)
         integer    f, n, dtype
         character*(*) cbuf, field, vsname, vsclass
    Store a simple numeric dataset in a vdata
      integer function vhfsd(f, field, buf, n, dtype, vsname, vsclass)
         integer f, n, dtype
         character*(*)  field, vsname, vsclass
         <valid numeric type> buf

4. High level function for creating a single field multi-
   component vdata
Old:
    vhfsdm (f,field,buf,n,dtype,vsname,vsclass,order)
         integer buf
HDF4.0r2:
    Store an aggregate char dataset in a vadata:      
       integer function vhfscdm(f,field,cbuf,n,dtype,vsname,
                 vsclass,order)
         integer f,  n, dtype, order
         character*(*) cbuf, field, vsname, vsclass
    Store a simple numeric dataset in a vdata
      integer function vhfsdm(f,field,buf,n,dtype,vsname,vsclass,order)
         integer f, n, dtype, order
         character*(*)  field, vsname, vsclass
         <valid numeric type> buf

5. Write GR image
Old:
    mgwrimg(riid, start,stride,count,data)
      <valid numeric type> data
HDF4.0r2:
    Write character type image data
     integer function mgwcimg(riid, start, stride, count, cdata)
         integer riid, start, stride, count
         character*(*)  cdata
    Write numeric type image data
      integer function mgwrimg(riid, start,stride,count,data)
      integer riid, start, stride, count
      <valid numeric type> data

6. Read GR image
Old:
    mgrdimg(riid,start,stride,count,data)
      integer data
HDF4.0r2:
    Read character type image data
      integer function mgrcimg(riid,start,stride,count,cdata)
          integer riid, start, stride, count
          character*(*) cdata
    Read numeric type image data
      integer function mgrdimg(riid,start,stride,count,data)
          integer riid, start, stride, count
          <valid numeric type> data

7. Write LUT
Old:
    mgwrlut(lutid,ncomp,data_type,interlace,nentries,data)
      <valid numeric type> data
HDF4.0r2:
    Write character type palette:
      integer function mgwclut(lutid,ncomp,data_type,interlace,
                               nentries,cdata)
          integer lutid,ncomp,data_type,interlace,nentries
          character*(*) cdata
    Write numeric type palette:
      integer function mgwrlut(lutid,ncomp,data_type,interlace,
                               nentries,data)
          integer lutid,ncomp,data_type,interlace,nentries
          <valid numeric type> data

8. Read LUT
Old:
    mgrdlut(lutid, data)
      <valid numeric type> data
HDF4.0r2:
    Read char type palette:
      integer function mgrclut(lutid,cdata)
        integer lutid
        character*(*) cdata
    Read numeric type palette:
      integer function mgrdlut(lutid, data) 
        integer lutid
        <valid numeric type> data

9. Set GR attribute
Old:
    mgsattr(riid, name, nt, count, data)
      character*(*) data
HDF4.0r2:
    Add char type attribute to a raster image
      integer function mgscatt(riid, name, nt, count, cdata)
        character*(*) cdata, name
        integer riid, nt, count
    Add a numeric attribute to a raster image
      integer function mgsnatt(riid, name, nt, count, data)
        integer riid, nt, count
        character*(*) name
        <valid numeric type> data

10. Get GR attribute
Old:
    mggattr(riid, index, data)
      <valid numeric type> data
HDF4.0r2:
    Get a char type attribute:
      integer function mggcatt(riid, index, cdata)
        integer riid, index
        character*(*) cdata
    Get a numeric type attribute:
      integer function mggnatt(riid, index, data)
        integer riid, index
        <valid numeric type> data

11. Write SDS data
Old:
    sfwdata(sdsid,start,stride,end,values)
      <valid numeric type> values
HDF4.0r2
    Write char type SDS data
      integer function sfwcdata(sdsid,start,stride,end,cvalues)
        integer sdsid,start,stride,end
        character*(*) cvalues
    Write numeric type SDS data
      integer function sfwdata(sdsid,start,stride,end,values)
        integer sdsid,start,stride,end
        <valid numeric type> values

12. Read SDS data
Old:
    sfrdata(sdsid,start,stride,end,values)
      <valid numeric type> values
HDF4.0r2
    Read char type SDS data
      integer function sfrcdata(sdsid,start,stride,end,cvalues)
        integer sdsid, start, stride, end
        character*(*) cvalues
    Read numeric type SDS data
      integer function sfrdata(sdsid,start,stride,end,values)
        integer sdsid, start, stride, end
        <valid numeric type> values

13. Add an attribute to an object in SD interface
Old:
    sfsattr(id, name, nt, count, data)
      character*(*) data
HDF4.0r2
    Add a char type attribute to an object
      integer function sfscatt(id, name, nt, count, cdata)
        integer id, nt, count 
        character*(*) name, cdata
    Add a numeric type attribute to an object
      integer function sfsnatt(id, name,nt, count,data)
        integer id, nt, count
        <valid numeric type> data
        character*(*) name

14. Get contents of an attribute
Old:
    sfrattr(id, index, buf)
      <valid numeric type> buf
HDF4.0r2:
    Get a char type attribute
      integer function sfrcatt(id, index, cbuf)
        integer id, index
        character*(*) cbuf
    Get a numeric type attribute
      integer function sfrnatt(id, index, buf)
        integer id, index
        <valid numeric type> buf   

15. Set fill value
Old:
    sfsfill(id, val)
      <valid numeric type> val
HDF4.0r2
    Set a char type fill value
      integer function sfscfill(id, cval)
        integer id
        character cval
    Set a numeric type fill value
      integer function sfsfill(id, val)
        integer id
        <valid numeric type> val

16. Get fill value
Old:
    sfgfill(id, val)
      <valid numeric type> val
HDF4.0r2
    Get char type fill value
      integer function sfgcfill(id, cval)
        integer id
        character cval
    Get numeric type fill value
      integer function sfgfill(id, val)
        integer id
        <valid numeric type> val


