home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / hdf / unix / hdf3_2r2 / src / dfr8ff.f < prev    next >
Encoding:
Text File  |  1992-10-29  |  12.0 KB  |  354 lines

  1. C***************************************************************************
  2. C
  3. C
  4. C                         NCSA HDF version 3.2r2
  5. C                            October 30, 1992
  6. C
  7. C NCSA HDF Version 3.2 source code and documentation are in the public
  8. C domain.  Specifically, we give to the public domain all rights for future
  9. C licensing of the source code, all resale rights, and all publishing rights.
  10. C
  11. C We ask, but do not require, that the following message be included in all
  12. C derived works:
  13. C
  14. C Portions developed at the National Center for Supercomputing Applications at
  15. C the University of Illinois at Urbana-Champaign, in collaboration with the
  16. C Information Technology Institute of Singapore.
  17. C
  18. C THE UNIVERSITY OF ILLINOIS GIVES NO WARRANTY, EXPRESSED OR IMPLIED, FOR THE
  19. C SOFTWARE AND/OR DOCUMENTATION PROVIDED, INCLUDING, WITHOUT LIMITATION,
  20. C WARRANTY OF MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE
  21. C
  22. C***************************************************************************
  23.  
  24. C
  25. C $Header: /hdf/hdf/v3.2r2/src/RCS/dfr8ff.f,v 1.1 1992/08/25 21:40:44 koziol beta koziol $
  26. C
  27. C $Log: dfr8ff.f,v $
  28. c Revision 1.1  1992/08/25  21:40:44  koziol
  29. c Initial revision
  30. c
  31. C
  32. C------------------------------------------------------------------------------
  33. C File:     dfr8Ff.f
  34. C Purpose:  Fortran stubs for Fortran RIS routines
  35. C Invokes:  dfr8F.c
  36. C Contents: 
  37. C   d8gdims: call d8igdim to get dimensions of next image
  38. C   d8gimg: call d8igimg to get next image
  39. C   d8pimg: call d8ipimg to put image to new file
  40. C   d8aimg: call d8iaimg to add image to existing file
  41. C   d8nims: call d8inims to get number of images in the file
  42. C   d8wref: call d8iwref to set ref for the next write of image
  43. C   d8rref: call d8irref to set ref for the next read of image
  44. C   dfr8getdims: call d8igdim to get dimensions of next image
  45. C   dfr8getimage: call d8igimg to get next image
  46. C   dfr8putimage: call d8ipimg to put image to new file
  47. C   dfr8addimage: call d8iaimg to add image to existing file
  48. C   dfr8nimages:  call d8inims to get the number of images in the file
  49. C   dfr8writeref: call d8iwref to set ref for the next write of image
  50. C   dfr8readref: call d8iref to set ref for the next read of image
  51. C -----------------------------------------------------------------------------
  52.  
  53. C------------------------------------------------------------------------------
  54. C Name:     d8gdims
  55. C Purpose:  call d8igdim to get dimensions of next image
  56. C Inputs:   name: name of HDF file
  57. C           xdim, ydim: integers to return dimensions of image
  58. C           ispal: integer to return whether a palette is associated
  59. C Returns:  0 on success, -1 on failure with DFerror set
  60. C Users:    HDF Fortran programmers
  61. C Invokes:  d8igdim
  62. C------------------------------------------------------------------------------
  63.  
  64.  
  65.       integer function d8gdims(name, xdim, ydim, ispal)
  66.       character*(*) name
  67.       integer xdim, ydim, ispal, d8igdim
  68.  
  69.       d8gdims = d8igdim(name, xdim, ydim, ispal, len(name))
  70.       return
  71.       end
  72.  
  73.  
  74. C------------------------------------------------------------------------------
  75. C Name:     d8gimg
  76. C Purpose:  call d8igimg to get next image
  77. C Inputs:   name: name of HDF file
  78. C           image: space to return image in
  79. C           xdim, ydim: dimensions of space to return image in
  80. C           pal: 768-byte space to return palette in
  81. C Returns:  0 on success, -1 on failure with DFerror set
  82. C Users:    HDF Fortran programmers
  83. C Invokes:  d8igimg
  84. C------------------------------------------------------------------------------
  85.  
  86.  
  87.       integer function d8gimg(name, image, xdim, ydim, pal)
  88.       character*(*) name
  89.       character image(*), pal(*)
  90.       integer xdim, ydim, d8igimg
  91.  
  92.       d8gimg = d8igimg(name,image,xdim,ydim,pal,len(name))
  93.       return
  94.       end
  95.  
  96.  
  97. C------------------------------------------------------------------------------
  98. C Name:     d8pimg
  99. C Purpose:  call d8ipimg to write image to new file
  100. C Inputs:   name: name of HDF file
  101. C           image: space containing image
  102. C           xdim, ydim: dimensions of image
  103. C           compress: compression scheme to be used
  104. C Returns:  0 on success, -1 on failure with DFerror set
  105. C Users:    HDF Fortran programmers
  106. C Invokes:  d8ipimg
  107. C------------------------------------------------------------------------------
  108.  
  109.  
  110.       integer function d8pimg(name, image, xdim, ydim, compress)
  111.       character*(*) name
  112.       character image(*)
  113.       integer xdim, ydim, compress, d8ipimg
  114.  
  115.       d8pimg=d8ipimg(name,image,xdim,ydim,compress,len(name))
  116.       return
  117.       end
  118.  
  119.  
  120. C------------------------------------------------------------------------------
  121. C Name:     d8aimg
  122. C Purpose:  call d8iaimg to add image to existing file
  123. C Inputs:   name: name of HDF file
  124. C           image: space containing image
  125. C           xdim, ydim: dimensions of image
  126. C           compress: compression scheme to be used
  127. C Returns:  0 on success, -1 on failure with DFerror set
  128. C Users:    HDF Fortran programmers
  129. C Invokes:  d8iaimg
  130. C------------------------------------------------------------------------------
  131.  
  132.  
  133.       integer function d8aimg(name, image, xdim, ydim, compress)
  134.       character*(*) name
  135.       character image(*)
  136.       integer xdim, ydim, compress, d8iaimg
  137.  
  138.       d8aimg=d8iaimg(name,image,xdim,ydim,compress,len(name))
  139.       return
  140.       end
  141.  
  142. C-----------------------------------------------------------------------------
  143. C  Name:    d8rref
  144. C  Purpose: Set ref of image to get next
  145. C  Inputs:  filename: file to which this applies
  146. C           ref: reference number of next get
  147. C  Returns: 0 on success, -1 on failure
  148. C  Users:   HDF programmers, other routines and utilities
  149. C  Invokes: d8irref
  150. C  Remarks: checks if image with this ref exists
  151. C-----------------------------------------------------------------------------
  152.  
  153.       integer function d8rref(name, ref)
  154.       character*(*) name
  155.       integer ref
  156.       integer d8irref
  157.  
  158.       d8rref = d8irref(name, ref, len(name))
  159.       return
  160.       end
  161.  
  162. CEND7MAX
  163.  
  164.  
  165. C-----------------------------------------------------------------------
  166. C  Name:    d8nims
  167. C  Purpose:  How many images are present in this file
  168. C  Inputs:  filename: file to which this applies
  169. C  Returns: number of images on success, -1 on failure
  170. C  Users:   HDF programmers, other routines and utilities
  171. C  Invokes: d8inims
  172. C  Remarks:
  173. C-----------------------------------------------------------------------
  174.  
  175.       integer function d8nims(filename)
  176.       character*(*) filename
  177.       integer d8inims
  178.  
  179.       d8nims = d8inims(filename, len(filename))
  180.       return
  181.       end
  182.  
  183.  
  184. C-----------------------------------------------------------------------
  185. C  Name:    d8wref
  186. C  Purpose: Set ref of image to put next
  187. C  Inputs:  name: file to which this applies
  188. C           ref: reference number of next put
  189. C  Returns: 0 on success, -1 on failure
  190. C  Users:   HDF programmers, other routines and utilities
  191. C  Invokes: d8iwref
  192. C  Remarks: checks if image with this ref exists
  193. C-----------------------------------------------------------------------
  194.  
  195.       integer function d8wref(name, ref)
  196.       character*(*) name
  197.       integer ref
  198.       integer  d8iwref
  199.  
  200.       d8wref = d8iwref(name, ref, len(name))
  201.       return
  202.       end
  203.  
  204.  
  205.  
  206. C------------------------------------------------------------------------------
  207. C Name:     dfr8getdims
  208. C Purpose:  call d8igdim to get dimensions of next image
  209. C Inputs:   name: name of HDF file
  210. C           xdim, ydim: integers to return dimensions of image
  211. C           ispal: integer to return whether a palette is associated
  212. C Returns:  0 on success, -1 on failure with DFerror set
  213. C Users:    HDF Fortran programmers
  214. C Invokes:  d8igdim
  215. C------------------------------------------------------------------------------
  216.  
  217.  
  218.       integer function dfr8getdims(name, xdim, ydim, ispal)
  219.       character*(*) name
  220.       integer xdim, ydim, ispal, d8igdim
  221.  
  222.       dfr8getdims = d8igdim(name, xdim, ydim, ispal, len(name))
  223.       return
  224.       end
  225.  
  226.  
  227. C------------------------------------------------------------------------------
  228. C Name:     dfr8getimage
  229. C Purpose:  call d8igimg to get next image
  230. C Inputs:   name: name of HDF file
  231. C           image: space to return image in
  232. C           xdim, ydim: dimensions of space to return image in
  233. C           pal: 768-byte space to return palette in
  234. C Returns:  0 on success, -1 on failure with DFerror set
  235. C Users:    HDF Fortran programmers
  236. C Invokes:  d8igimg
  237. C------------------------------------------------------------------------------
  238.  
  239.  
  240.       integer function dfr8getimage(name, image, xdim, ydim, pal)
  241.       character*(*) name
  242.       character image(*), pal(*)
  243.       integer xdim, ydim, d8igimg
  244.  
  245.       dfr8getimage = d8igimg(name,image,xdim,ydim,pal,len(name))
  246.       return
  247.       end
  248.  
  249.  
  250. C------------------------------------------------------------------------------
  251. C Name:     dfr8putimage
  252. C Purpose:  call d8ipimg to write image to new file
  253. C Inputs:   name: name of HDF file
  254. C           image: space containing image
  255. C           xdim, ydim: dimensions of image
  256. C           compress: compression scheme to be used
  257. C Returns:  0 on success, -1 on failure with DFerror set
  258. C Users:    HDF Fortran programmers
  259. C Invokes:  d8ipimg
  260. C------------------------------------------------------------------------------
  261.  
  262.  
  263.       integer function dfr8putimage(name, image, xdim, ydim, compress)
  264.       character*(*) name
  265.       character image(*)
  266.       integer xdim, ydim, compress, d8ipimg
  267.  
  268.       dfr8putimage=d8ipimg(name,image,xdim,ydim,compress,len(name))
  269.       return
  270.       end
  271.  
  272.  
  273. C------------------------------------------------------------------------------
  274. C Name:     dfr8addimage
  275. C Purpose:  call d8iaimg to add image to existing file
  276. C Inputs:   name: name of HDF file
  277. C           image: space containing image
  278. C           xdim, ydim: dimensions of image
  279. C           compress: compression scheme to be used
  280. C Returns:  0 on success, -1 on failure with DFerror set
  281. C Users:    HDF Fortran programmers
  282. C Invokes:  d8iaimg
  283. C------------------------------------------------------------------------------
  284.  
  285.  
  286.       integer function dfr8addimage(name, image, xdim, ydim, compress)
  287.       character*(*) name
  288.       character image(*)
  289.       integer xdim, ydim, compress, d8iaimg
  290.  
  291.       dfr8addimage=d8iaimg(name,image,xdim,ydim,compress,len(name))
  292.       return
  293.       end
  294.  
  295.  
  296. C-----------------------------------------------------------------------------
  297. C  Name:    dfr8readref
  298. C  Purpose: Set ref of image to get next
  299. C  Inputs:  filename: file to which this applies
  300. C           ref: reference number of next get
  301. C  Returns: 0 on success, -1 on failure
  302. C  Users:   HDF programmers, other routines and utilities
  303. C  Invokes: d8irref
  304. C  Remarks: checks if image with this ref exists
  305. C-----------------------------------------------------------------------------
  306.  
  307.       integer function dfr8readref(name, ref)
  308.       character*(*) name
  309.       integer ref
  310.       integer d8irref
  311.  
  312.       dfr8readref = d8irref(name, ref, len(name))
  313.       return
  314.       end
  315.  
  316. C-----------------------------------------------------------------------
  317. C  Name:    dfr8writeref
  318. C  Purpose: Set ref of image to put next
  319. C  Inputs:  filename: file to which this applies
  320. C           ref: reference number of next put
  321. C  Returns: 0 on success, -1 on failure
  322. C  Users:   HDF programmers, other routines and utilities
  323. C  Invokes: d8iwref
  324. C  Remarks: checks if image with this ref exists
  325. C-----------------------------------------------------------------------
  326.  
  327.       integer function dfr8writeref(filename, ref)
  328.       character*(*) filename
  329.       integer ref
  330.       integer d8iwref
  331.  
  332.       dfr8writeref = d8iwref(filename, ref, len(filename))
  333.       return
  334.       end
  335.  
  336.  
  337. C-----------------------------------------------------------------------
  338. C  Name:    dfr8nimages
  339. C  Purpose:  How many images are present in this file
  340. C  Inputs:  filename: file to which this applies
  341. C  Returns: number of images on success, -1 on failure
  342. C  Users:   HDF programmers, other routines and utilities
  343. C  Invokes: d8inims
  344. C  Remarks:
  345. C-----------------------------------------------------------------------
  346.  
  347.       integer function dfr8nimages(filename)
  348.       character*(*) filename
  349.       integer d8inims
  350.  
  351.       dfr8nimages = d8inims(filename, len(filename))
  352.       return
  353.       end
  354.