home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / hdf / unix / hdf3_2r2 / src / dfpff.f < prev    next >
Encoding:
Text File  |  1992-10-29  |  10.0 KB  |  302 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/dfpff.f,v 1.1 1992/08/25 21:40:44 koziol beta koziol $
  26. C
  27. C $Log: dfpff.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:     dfpFf.f
  34. C Purpose:  Fortran stubs for Palette Fortran routines
  35. C Invokes:  dfpF.c dfkit.c
  36. C Contents: 
  37. C   dpgpal:         Call dpigpal to get palette
  38. C   dpapal:         Call dpippal to add palette to file
  39. C   dpppal:         Call dpippal to write/overwrite palette in file
  40. C   dpnpal:         Call dpinpal to get number of palettes in file
  41. C   dpwref:         Call dpiwref to set ref of pal to write next
  42. C   dprref:         Call dpirref to set ref of pal to read next
  43. C   DFPgetpal:      Call dpigpal to get palette
  44. C   DFPaddpal:      Call dpippal to add palette to file
  45. C   DFPputpal:      Call dpippal to write/overwrite palette in file
  46. C   DFPnpals:       Call dpinpal to get number of palettes in file
  47. C   DFPwriteref:    Call dpiwref to set ref of pal to write next
  48. C   DFPreadref:     Call dpirref to set ref of pal to read next
  49. C Remarks: none
  50. C----------------------------------------------------------------------------*/
  51.  
  52.  
  53. C------------------------------------------------------------------------------
  54. C Name: dpgpal
  55. C Purpose:  call dpigpal, get palette
  56. C Inputs:   filename: filename to get pal from
  57. C           pal: space to put palette
  58. C Returns: 0 on success, -1 on failure with DFerror set
  59. C Users:    Fortran stub routine
  60. C Invokes: dpigpal
  61. C----------------------------------------------------------------------------*/
  62.  
  63.       integer function dpgpal(filename, pal)
  64.  
  65.       character*(*) filename
  66.       character*(*) pal
  67.       integer dpigpal
  68.  
  69.       dpgpal = dpigpal(filename, pal, len(filename))
  70.       return
  71.       end
  72.  
  73.  
  74. C------------------------------------------------------------------------------
  75. C Name: dpapal
  76. C Purpose:  call dpippal, add palette
  77. C Inputs:   filename: filename to put pal into
  78. C           pal: palette
  79. C Returns: 0 on success, -1 on failure with DFerror set
  80. C Users:    Fortran stub routine
  81. C Invokes: dpippal
  82. C----------------------------------------------------------------------------*/
  83.  
  84.       integer function dpapal(filename, pal)
  85.  
  86.       character*(*) filename
  87.       character*(*) pal
  88.       integer dpippal
  89.  
  90.       dpapal = dpippal(filename, pal, 0, 'a', len(filename))
  91.       return
  92.       end
  93.       
  94.       
  95. C------------------------------------------------------------------------------
  96. C     Name: dpppal
  97. C     Purpose:  call dpippal, write palette
  98. C     Inputs:   filename: filename to put pal to
  99. C             pal: palette
  100. C             ow, filemode: see DFPputpal
  101. C     Returns: 0 on success, -1 on failure with DFerror set
  102. C     Users:    Fortran stub routine
  103. C     Invokes: dpippal
  104. C----------------------------------------------------------------------------*/
  105.       
  106.       integer function dpppal(filename, pal, ow, filemode)
  107.       
  108.       character*(*) filename
  109.       character*(*) pal
  110.       integer dpippal, ow
  111.       character*(*) filemode
  112.       
  113.       dpppal = dpippal(filename, pal, ow, filemode, len(filename))
  114.       return
  115.       end
  116.       
  117.       
  118. C------------------------------------------------------------------------------
  119. C     Name: dpnpals
  120. C     Purpose:  How many palettes are present in this file?
  121. C     Inputs:   filename: name of HDF file
  122. C     Returns: number of palettes on success, -1 on failure with DFerror set
  123. C     Users:    HDF programmers, other routines and utilities
  124. C     Invokes: dpinpal
  125. C----------------------------------------------------------------------------*/
  126.       
  127.       integer function dpnpals(filename)
  128.       
  129.       character*(*) filename
  130.       integer dpinpal
  131.       
  132.       dpnpals = dpinpal(filename, len(filename))
  133.       return
  134.       end
  135.       
  136.       
  137. C------------------------------------------------------------------------------
  138. C     Name: dpwref
  139. C     Purpose:  Ref to write next
  140. C     Inputs:   filename: name of HDF file
  141. C     ref: ref to write next
  142. C     Returns: number of palettes on success, -1 on failure with DFerror set
  143. C     Users:    HDF programmers, other routines and utilities
  144. C     Invokes: dpiwref
  145. C----------------------------------------------------------------------------*/
  146.       
  147.       integer function dpwref(filename, ref)
  148.       
  149.       character*(*) filename
  150.       integer ref, dpiwref
  151.       
  152.       dpwref = dpiwref(filename, ref, len(filename))
  153.       return
  154.       end
  155.       
  156.       
  157. C------------------------------------------------------------------------------
  158. C     Name: dprref
  159. C     Purpose:  Ref to read next
  160. C     Inputs:   filename: name of HDF file
  161. C     ref: ref to read next
  162. C     Returns: number of palettes on success, -1 on failure with DFerror set
  163. C     Users:    HDF programmers, other routines and utilities
  164. C     Invokes: dpirref
  165. C----------------------------------------------------------------------------*/
  166.       
  167.       integer function dprref(filename, ref)
  168.       
  169.       character*(*) filename
  170.       integer ref, dpirref
  171.       
  172.       dprref = dpirref(filename, ref, len(filename))
  173.       return
  174.       end
  175.       
  176.       
  177. CEND7MAX
  178.       
  179.       
  180. C------------------------------------------------------------------------------
  181. C     Name: DFPgetpal
  182. C     Purpose:  call dpigpal, get palette
  183. C     Inputs:   filename: filename to get pal from
  184. C     pal: space to put palette
  185. C     Returns: 0 on success, -1 on failure with DFerror set
  186. C     Users:    Fortran stub routine
  187. C     Invokes: dpigpal
  188. C----------------------------------------------------------------------------*/
  189.       
  190.       integer function DFPgetpal(filename, pal)
  191.       
  192.       character*(*) filename
  193.       character*(*) pal
  194.       integer dpigpal
  195.       
  196.       DFPgetpal = dpigpal(filename, pal, len(filename))
  197.       return
  198.       end
  199.       
  200.       
  201. C------------------------------------------------------------------------------
  202. C     Name: DFPaddpal
  203. C     Purpose:  call dpippal, add palette
  204. C     Inputs:   filename: filename to put pal into
  205. C     pal: palette
  206. C     Returns: 0 on success, -1 on failure with DFerror set
  207. C     Users:    Fortran stub routine
  208. C     Invokes: dpippal
  209. C----------------------------------------------------------------------------*/
  210.       
  211.       integer function DFPaddpal(filename, pal)
  212.       
  213.       character*(*) filename
  214.       character*(*) pal
  215.       integer dpippal
  216.       
  217.       DFPaddpal = dpippal(filename, pal, 0, 'a', len(filename))
  218.       return
  219.       end
  220.       
  221.       
  222. C------------------------------------------------------------------------------
  223. C     Name: DFPputpal
  224. C     Purpose:  call dpippal, write palette
  225. C     Inputs:   filename: filename to put pal to
  226. C     pal: palette
  227. C     ow, filemode: see DFPputpal
  228. C     Returns: 0 on success, -1 on failure with DFerror set
  229. C     Users:    Fortran stub routine
  230. C     Invokes: dpippal
  231. C----------------------------------------------------------------------------*/
  232.       
  233.       integer function DFPputpal(filename, pal, ow, filemode)
  234.       
  235.       character*(*) filename
  236.       character*(*) pal
  237.       integer dpippal, ow
  238.       character*(*) filemode
  239.       
  240.       DFPputpal = dpippal(filename, pal, ow, filemode, len(filename))
  241.       return
  242.       end
  243.       
  244.       
  245. C------------------------------------------------------------------------------
  246. C     Name: dpnpals
  247. C     Purpose:  How many palettes are present in this file?
  248. C     Inputs:   filename: name of HDF file
  249. C     Returns: number of palettes on success, -1 on failure with DFerror set
  250. C     Users:    HDF programmers, other routines and utilities
  251. C     Invokes: dpinpal
  252. C----------------------------------------------------------------------------*/
  253.       
  254.       integer function DFPnpals(filename)
  255.       
  256.       character*(*) filename
  257.       integer dpinpal
  258.       
  259.       DFPnpals = dpinpal(filename, len(filename))
  260.       return
  261.       end
  262.  
  263.       
  264. C------------------------------------------------------------------------------
  265. C     Name: DFPwriteref
  266. C     Purpose:  Ref to write next
  267. C     Inputs:   filename: name of HDF file
  268. C     ref: ref to write next
  269. C     Returns: number of palettes on success, -1 on failure with DFerror set
  270. C     Users:    HDF programmers, other routines and utilities
  271. C     Invokes: dpiwref
  272. C----------------------------------------------------------------------------*/
  273.       
  274.       integer function DFPwriteref(filename, ref)
  275.       
  276.       character*(*) filename
  277.       integer ref, dpiwref
  278.       
  279.       DFPwriteref = dpiwref(filename, ref, len(filename))
  280.       return
  281.       end
  282.       
  283.       
  284. C------------------------------------------------------------------------------
  285. C     Name: DFPreadref
  286. C     Purpose:  Ref to read next
  287. C     Inputs:   filename: name of HDF file
  288. C     ref: ref to read next
  289. C     Returns: number of palettes on success, -1 on failure with DFerror set
  290. C     Users:    HDF programmers, other routines and utilities
  291. C     Invokes: dpirref
  292. C----------------------------------------------------------------------------*/
  293.       
  294.       integer function DFPreadref(filename, ref)
  295.       
  296.       character*(*) filename
  297.       integer ref, dpirref
  298.       
  299.       DFPreadref = dpirref(filename, ref, len(filename))
  300.       return
  301.       end
  302.