home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / UIFlow 1.0.1 / UIFlow Source / VSet2.0 / Src / vgFf.f < prev    next >
Encoding:
Text File  |  1992-04-20  |  13.5 KB  |  570 lines  |  [TEXT/????]

  1.  
  2. c    **************************************************************************
  3. c    * 
  4. c    *              NCSA HDF Vset release 2.1
  5. c    *                    May 1991
  6. c    *
  7. c    * NCSA HDF Vset release 2.1 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
  15. c    * at the University of Illinois at Urbana-Champaign.
  16. c    * 
  17. c    * THE UNIVERSITY OF ILLINOIS GIVES NO WARRANTY, EXPRESSED OR IMPLIED, FOR 
  18. c    * THE SOFTWARE AND/OR DOCUMENTATION PROVIDED, INCLUDING, WITHOUT LIMITATION,
  19. c    * WARRANTY OF MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR
  20. c    * PURPOSE.
  21. c    * 
  22. c    **************************************************************************
  23. c    * Likkai Ng May 1991 NCSA
  24. c    *
  25. c    * vgFf.f
  26. c    * Part of the HDF VSet interface.
  27. c    *
  28. c    * Contains fortran routines callable from fortran programs.
  29. c    *
  30. c    **************************************************************************
  31.  
  32.  
  33. c    ============================================================
  34. c     VGROUP ROUTINES
  35. c    ============================================================
  36.  
  37. c    attachs to a vgroup     
  38. c    related: Vattach--vatchc--VFATCH
  39.  
  40.     integer    function VFATCH(f, vgid, accesstype)
  41.     integer        f, vgid
  42.     character*1    accesstype
  43.     integer        VATCHC
  44.  
  45.     VFATCH = VATCHC (f, vgid, accesstype)
  46.     end
  47.  
  48. c    ------------------------------------------------------------
  49. c    detaches from a vgroup
  50. c    related: Vdetach--vdtchc--VFDTCH
  51.  
  52.     subroutine    VFDTCH (vg)    
  53.     integer        vg
  54.  
  55.     call VDTCHC (vg)
  56.     end
  57.  
  58. c    ------------------------------------------------------------
  59. c    general inquiry on a vgroup
  60. c    related: Vgetname--vgnamc--VFGNAM
  61.  
  62.     subroutine VFGNAM (vg, vgname)             
  63.     integer            vg
  64.     character*(*)    vgname
  65.  
  66.     call VGNAMC (vg, vgname)
  67.     end
  68. c    ------------------------------------------------------------
  69. c    get the class name of a vgroup
  70. c    related: Vgetclass--vgclsc--VFGCLS
  71.  
  72.     subroutine VFGCLS (vg, vgclass)             
  73.  
  74.     integer            vg
  75.     character*(*)    vgclass
  76.  
  77.     call VGCLSC  (vg, vgclass)
  78.     end
  79. c    ------------------------------------------------------------
  80. c    general inquiry on a vgroup
  81. c    related: Vinquire--vinqc--VFINQ
  82.  
  83.     integer    function    VFINQ (vg, nentries, vgname) 
  84.     integer            vg, nentries
  85.     character*(*)    vgname
  86.     integer            VINQC
  87.  
  88.     VFINQ = VINQC (vg, nentries, vgname)
  89.     end
  90.  
  91. c    ------------------------------------------------------------
  92. c    gets the id of the next vgroup in the file
  93. c    related: Vgetid--vgidc--VFGID
  94.  
  95.     integer    function    VFGID (f, vgid)            
  96.     integer        f, vgid
  97.     integer        VGIDC
  98.  
  99.     VFGID = VGIDC (f, vgid)
  100.     end
  101.  
  102. c    ------------------------------------------------------------
  103. c    gets the id of the next entry in the vgroup
  104. c    related: Vgetnext--vgnxtc--VFGNXT
  105.  
  106.     integer    function    VFGNXT (vg, id)                
  107.     integer        vg, id
  108.     integer        VGNXTC
  109.  
  110.     VFGNXT = VGNXTC (vg, id)
  111.     end
  112.  
  113.  
  114. c    ------------------------------------------------------------
  115. c    sets the name of the vgroup
  116. c    related: Vsetname--vsnamc--VFSNAM
  117.  
  118.     subroutine VFSNAM (vg, vgname)
  119.     integer            vg
  120.     character*(*)    vgname
  121.  
  122.     call VSNAMC (vg, vgname)
  123.     end
  124. c    ------------------------------------------------------------
  125. c    sets the class name of the vgroup
  126. c    related: Vsetclass--vsclsc--VFSCLS
  127.  
  128.     subroutine VFSCLS (vg, vgclass)    
  129.     integer            vg
  130.     character*(*)    vgclass
  131.  
  132.     call VSCLSC  (vg, vgclass)
  133.     end
  134.  
  135. c    ------------------------------------------------------------
  136. c    inserts a vset entity (ie vgroup or vdata) into the given vgroup
  137. c    related: Vinsert--vinsrtc--VFINSRT
  138.  
  139.  
  140.     integer    function VFINSRT (vg, velt)    
  141.     integer        vg, velt
  142.     integer        VINSRTC
  143.  
  144.     VFINSRT = VINSRTC (vg, velt)
  145.     end
  146.  
  147. c    ------------------------------------------------------------
  148. c    tests if an id in a vgroup is a vgroup
  149. c    related: Visvg--visvgc--VFISVG
  150.  
  151.     integer    function    VFISVG (vg, id)                                     
  152.     integer        vg, id
  153.     integer        VISVGC
  154.  
  155.     VFISVG = VISVGC (vg, id)
  156.     end
  157.  
  158. c    ------------------------------------------------------------
  159. c    tests if an id in a vgroup is a vdata
  160. c    related: Visvs--visvsc--VFISVS
  161.  
  162.     integer    function    VFISVS (vg, id)
  163.     integer        vg, id
  164.     integer        VISVSC
  165.  
  166.     VFISVS = VISVSC (vg, id)
  167.     end
  168.  
  169.  
  170.  
  171. c    ============================================================
  172. c     VDATA ROUTINES
  173. c    ============================================================
  174.  
  175. c    attach to a vdata
  176. c    related: VSattach--vsatchc--VFATCH
  177.  
  178.     integer    function    VSFATCH (f, vsid, accesstype)
  179.     integer        f, vsid
  180.     character*1    accesstype
  181.     integer        VSATCHC
  182.  
  183.     VSFATCH = VSATCHC (f, vsid, accesstype)
  184.     end
  185.  
  186. c    ------------------------------------------------------------
  187. c    detach from a vdata
  188. c    related: VSdetach--vsdtchc--VFDTCH
  189.  
  190.     subroutine    VSFDTCH (vs)
  191.     integer        vs
  192.  
  193.     call VSDTCHC (vs)
  194.     end
  195.  
  196. c    ------------------------------------------------------------
  197. c    seeks to a given element position in a vadata
  198. c    related: VSseek--vsseekc--VSFSEEK
  199.  
  200.     integer    function    VSFSEEK (vs, eltpos )
  201.     integer        vs, eltpos
  202.     integer        VSSEEKC
  203.  
  204.     VSFSEEK = VSSEEKC (vs, eltpos)
  205.     end
  206.  
  207. c    ------------------------------------------------------------
  208. c    gets the name of a vdata
  209. c    related: VSgetname--vsgnamc--VSFGNAM
  210.  
  211.     subroutine  VSFGNAM (vs, vsname)    
  212.     integer            vs
  213.     character*(*)    vsname
  214.  
  215.     call VSGNAMC (vs, vsname)
  216.     end
  217.  
  218. c    ------------------------------------------------------------
  219. c    get the class name of a vdata
  220. c    related: VSgetclass--vsgclsc--VSFGCLS
  221.  
  222.     subroutine VSFGCLS (vs, vsclass)             
  223.     integer            vs
  224.     character*(*)    vsclass
  225.  
  226.     call VSGCLSC  (vs, vsclass)
  227.     end
  228.  
  229. c    ------------------------------------------------------------
  230. c    general inquiry on a vdata
  231. c    related: VSinquire--vsinqc--VSFINQ
  232.  
  233.     integer function VSFINQ (vs,nvs,ilace,fields,vsize,vsname) 
  234.     integer            vs, nvs, ilace, vsize
  235.     character*(*)    fields, vsname
  236.     integer            VSINQC
  237.  
  238.     VSFINQ = VSINQC (vs,nvs,ilace,fields,vsize,vsname) 
  239.     end
  240.  
  241. c    ------------------------------------------------------------
  242. c    tests if given fields exist in the vdata
  243. c    related: VSfexist--vsfexc--VSFEX
  244.  
  245.     integer    function VSFEX (vs, fields)        
  246.     integer            vs
  247.     character*(*)    fields
  248.     integer            VSFEXC
  249.  
  250.     VSFEX = VSFEXC (vs, fields)
  251.     end
  252.  
  253. c  ------------------------------------------------------------
  254. c    gets the id of the next vdata from the file
  255. c    related: VSgetid--vsgidc--VSFGID
  256.  
  257.     integer  function VSFGID (f, vsid) 
  258.     integer     f, vsid
  259.     integer     VSGIDC
  260.  
  261.     VSFGID = VSGIDC (f, vsid)
  262.     end
  263.  
  264. c    ------------------------------------------------------------
  265. c    sets the name of a vdata
  266. c    related: VSsetname--vssnamc--VSFSNAM
  267.  
  268.     subroutine VSFSNAM (vs, vsname)    
  269.     integer            vs
  270.     character*(*)    vsname
  271.  
  272.     call VSSNAMC (vs, vsname)
  273.     end
  274.  
  275. c    ------------------------------------------------------------
  276. c    set the class name of a vdata
  277. c    related: VSsetclass--vssclsc--VSFSCLS
  278.  
  279.     subroutine VSFSCLS (vs, vsclass)             
  280.     integer            vs
  281.     character*(*)    vsclass
  282.  
  283.     call VSSCLSC  (vs, vsclass)
  284.     end
  285.  
  286. c    ------------------------------------------------------------
  287. c    sets the fields in a vdata for reading or writing
  288. c    related: VSsetfields--vssfldc--VSFSFLD
  289.  
  290.     integer    function    VSFSFLD (vs, fields)        
  291.     integer            vs
  292.     character*(*)    fields
  293.     integer        VSSFLDC
  294.  
  295.     VSFSFLD = VSSFLDC (vs, fields)
  296.     end
  297.  
  298. c    ------------------------------------------------------------
  299. c    sets the file interlace of a vdata
  300. c    related: VSsetinterlace--vssintc--VSFSINT
  301.  
  302.     integer     function VSFSINT (vs, interface)
  303.     integer         vs, interlace                         
  304.     integer        VSSINTC
  305.  
  306.     VSFSINT = VSSINTC (vs, interlace)
  307.     end
  308.  
  309. c    ------------------------------------------------------------
  310. c    defines a new field to be used in the vdata
  311. c    related: VSfdefine--vsfdefc--VSFFDEF
  312.  
  313.     integer    function    VSFFDEF (vs, field, localtype, order)    
  314.  
  315.     integer            vs, localtype, order
  316.     character*(*)    field
  317.     integer            VSFDEFC
  318.  
  319.     VSFFDEF = VSFDEFC ( vs, field, localtype, order)
  320.  
  321.     end
  322.  
  323. c    ------------------------------------------------------------
  324. c    reads from a vdata
  325. c    related: VSread--vsreadc--VSFREAD
  326.  
  327.     integer    function    VSFREAD (vs, buf, nelts , interlace)
  328.  
  329.     integer            vs, nelts , interlace
  330.     character*(*)    buf
  331.     integer            VSREADC
  332.  
  333.     VSFREAD = VSREADC (vs, buf, nelts, interlace)
  334.     end
  335.  
  336. c    ------------------------------------------------------------
  337. c    writes to a vdata
  338. c    related: VSwrite--vswritc--VSFWRIT
  339.  
  340.     integer    function    VSFWRIT (vs, buf, nelts, interlace)
  341.  
  342.     integer            vs, nelts, interlace
  343.     integer            buf(*)    
  344.     integer            VSWRITC
  345.  
  346.     VSFWRIT = VSWRITC (vs, buf, nelts, interlace)
  347.     end
  348.  
  349. c    ===========================================
  350. c    MISCELLANEOUS USEFUL VDATA INQUIRY ROUTINES
  351. c    ===========================================
  352. c
  353. c    undocumented
  354.  
  355.  
  356. c    gets the interlace of a vdata
  357. c    related: VSgetinterlace--vsgintc--VSFGINT
  358.  
  359.     integer     function VSFGINT (vs)                    
  360.     integer         vs
  361.     integer        VSGINTC
  362.  
  363.     VSFGINT = VSGINTC (vs)
  364.     end
  365.  
  366. c    ------------------------------------------------------------
  367. c    gets the number of elements in a vdata
  368. c    related: VSelts--vseltsc--VSFELTS
  369.  
  370.     integer     function VSFELTS (vs)            
  371.     integer  vs    
  372.     integer    VSELTSC
  373.  
  374.     VSFELTS = VSELTSC (vs)
  375.     end
  376.  
  377. c    ------------------------------------------------------------
  378. c    gets the fields in the vdata
  379. c    related: VSgetfields--vsgfldc--VSFGFLD
  380.  
  381.     integer    function VSFGFLD (vs, fields)    
  382.     integer            vs
  383.     character*(*)     fields
  384.     integer            VSGFLDC
  385.  
  386.     VSFGFLD = VSGFLDC (vs, fields)
  387.     end
  388.  
  389. c    ------------------------------------------------------------
  390. c     determines the (machine) size of the given fields
  391. c    related: VSsizeof--vssizc--VSFSIZ
  392.  
  393.     integer    function VSFSIZ (vs, fields)        
  394.     integer            vs
  395.     character*(*)     fields
  396.     integer            VSSIZC
  397.  
  398.     VSFSIZ = VSSIZC (vs, fields)
  399.     end
  400.  
  401. c    ------------------------------------------------------------
  402. c    determines the no of entries in a vgroup
  403. c    related: Ventries--ventsc--VFENTS
  404.  
  405.     integer     function    VFENTS (f, vgid)        
  406.     integer    f, vgid
  407.     integer    VENTSC 
  408.  
  409.     VFENTS = VENTSC (f, vgid)
  410.     end
  411.  
  412. c    ------------------------------------------------------------
  413. c    DEBUGGING ROUTINES
  414. c    ------------------------------------------------------------
  415.  
  416. c    enable debug
  417. c    related: setjj--setjjc--SETFJJ
  418.  
  419.     integer     function SETFJJ()             
  420.     integer  setjjc 
  421.  
  422.     SETFJJ = setjjc() 
  423.     end
  424.  
  425. c    ------------------------------------------------------------
  426. c    disable debug
  427. c    related: setnojj--setnojjc--SETFNJJ
  428.  
  429.     integer     function SETFNJJ()             
  430.     integer  setnojjc 
  431.  
  432.     SETFNJJ = setnojjc() 
  433.     end
  434. c    ------------------------------------------------------------
  435. c    gets the refs of all lone vgroups in the file
  436. c    related: Vlone--vlonec--VFLONE
  437.  
  438.     integer function VFLONE (f, idarray, asize)
  439.     integer            f
  440.     integer            idarray(*)
  441.     integer            asize
  442.     integer            VLONEC
  443.  
  444.     VFLONE = VLONEC  (f, idarray, asize)
  445.     end
  446.  
  447. c    ------------------------------------------------------------
  448. c    gets the refs of all lone vdatas in the file
  449. c    related: VSlone--vslonec--VSFLONE
  450.  
  451.     integer function VSFLONE (f, idarray, asize)
  452.     integer            f
  453.     integer            idarray(*)
  454.     integer            asize
  455.     integer            VSLONEC
  456.  
  457.     VSFLONE = VSLONEC  (f, idarray, asize)
  458.     end
  459.  
  460. c    ------------------------------------------------------------
  461. c    store a simple dataset in a vdata
  462. c    related: VHstoredata--vhsdc--vhfsd
  463.  
  464.     integer function VHFSD (f, field, buf, n, dtype, vsname, vsclass)
  465.     integer            f
  466.     character*(*)  field
  467.     integer            buf(*)    
  468.     integer            n, dtype
  469.     character*(*)  vsname, vsclass
  470.     integer VHSDC     
  471.  
  472.     VHFSD = VHSDC (f, field, buf, n, dtype, vsname, vsclass)
  473.     end
  474.  
  475. c    ------------------------------------------------------------
  476. c    store an aggregate dataset in a vadata
  477. c    related: VHstoredatam--vhsdmc--vhfsdm
  478.  
  479.     integer function VHFSDM (f,field,buf,n,dtype,vsname,vsclass,order)
  480.     integer            f
  481.     character*(*)  field
  482.     integer            buf(*)    
  483.     integer            n, dtype, order
  484.     character*(*)  vsname, vsclass
  485.     integer VHSDMC         
  486.  
  487.     VHFSDM = VHSDMC (f, field, buf, n, dtype, vsname,vsclass, order)
  488.     end
  489.  
  490. c    ------------------------------------------------------------
  491. c    make a new vgroup given several tag/ref pairs
  492. c    related: VHmakegroup--vhmkgpc--vhfmkgp
  493.  
  494.     integer function VHFMKGP(f,tagarray,refarray,n,vgname,vgclass)
  495.     integer        f, n
  496.     integer        tagarray(*), refarray(*)
  497.     character*(*)  vgname, vgclass
  498.     integer         VHMKGPC     
  499.  
  500.     VHFMKGP = VHMKGPC (f, tagarray, refarray , n, vgname, vgclass)
  501.     end
  502.  
  503. c    ============================================================
  504. c    More vgroup routines
  505.  
  506. c    locate a field in a vdata that belongs to this VGROUP    
  507. c    related: Vflocate--vffloc--vflocc
  508.  
  509.     integer function VFFLOC  (vg, field)
  510.     integer            vg
  511.     character*(*)    field
  512.     integer             VFLOCC                                
  513.     VFFLOC = VFLOCC (vg, field)
  514.     end
  515.  
  516. c    ------------------------------------------------------------
  517. c    tests if a tag/ref pair is in a vgroup.
  518. c    related: Vinqtagref--vinqtrc--vfinqtr
  519.  
  520.     integer function VFINQTR  (vg, tag, ref)
  521.     integer        vg, tag, ref
  522.     integer        VINQTRC                                     
  523.     VFINQTR = VINQTRC (vg, tag, ref)
  524.     end
  525.  
  526. c    ------------------------------------------------------------
  527. c    gets the number of tag/refs stored in a vgroup
  528. c    related: Velts--veltsc--vfelts
  529.  
  530.     integer function VFNTR (vg)
  531.     integer        vg
  532.     integer VNTRC 
  533.     VFNTR = VNTRC (vg)
  534.     end
  535.  
  536. c    ------------------------------------------------------------
  537. c    returns all the tag/ref pairs in a vgroup
  538. c    related: Vgettagrefs--vgttrsc--vfgttrs
  539.  
  540.     integer function VFGTTRS (vg, tagarray, refarray, n)
  541.     integer        vg, n
  542.     integer        tagarray(*), refarray(*)
  543.     integer        VGTTRSC                                    
  544.  
  545.     VFGTTRS = VGTTRSC (vg, tagarray, refarray, n)
  546.     end
  547. c    ------------------------------------------------------------
  548. c    returns a specified tag/ref pair in a vgroup
  549. c    related: Vgettagref--vgttrc--vfgttr
  550.  
  551.     integer function VFGTTR (vg, which, tag, ref)
  552.     integer        vg, which
  553.     integer        tag, ref
  554.     integer        VGTTRC                                    
  555.  
  556.     VFGTTR = VGTTRC (vg, which, tag, ref)
  557.     end
  558.  
  559. c    ------------------------------------------------------------
  560. c    add a tag/ref pair to a vgroup
  561. c    related: Vaddtagref--vadtrc--VFADTR
  562.  
  563.     integer function VFADTR    ( vg, tag, ref)
  564.     integer        vg, tag, ref
  565.     integer VADTRC                
  566.  
  567.     VFADTR = VADTRC  ( vg, tag, ref)
  568.     end
  569. c    ============================================================
  570.