home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / HippoDraw / hippo / hippof.f < prev    next >
Encoding:
Text File  |  1992-04-28  |  2.7 KB  |  118 lines

  1. C
  2. C    FORTRAN Binding for Hippo
  3. C
  4. C    By Paul Kunz, SLAC, November 1991
  5. C
  6. C    Copyright (C)  1991  The Board of Trustees of
  7. C    The Leland Stanford Junior University.  All Rights Reserved.
  8. C
  9. C       $Id: hippof.f,v 1.6 1992/04/04 19:12:47 pfkeb Rel $
  10. C     
  11. C    This set of functions is the first level interface between
  12. C    FORTRAN user and the Hippo package which is written in C.
  13. C    All the functions the user sees are defined here and there
  14. C    is no need for the user to know the underlying C routines
  15. C    (defined in fhippo.c) used to support them.   Also system
  16. C    dependencies on how C is called from FORTRAN should be
  17. C    found in versions of this file.
  18. C
  19. C    Report bugs to hippo_bug@ebnextk.slac.stanford.edu
  20. C
  21. C
  22.       Integer Function iparrayFill( nt, x )
  23. C     -------------------------------------
  24.       Integer nt
  25.       Real    x(*)
  26. C
  27.       Integer hfarrayfill
  28. C      
  29.       iparrayFill = hfarrayfill( nt, x )
  30.       return
  31.       end
  32. C
  33. C        
  34.       Integer Function ipclrNt( nt )
  35. C     -------------------------------
  36.       Integer nt
  37. C
  38.       Integer hfclrnt
  39. C      
  40.       ipclrNt = hfclrnt( nt )
  41.       return
  42.       end
  43. C
  44. C        
  45.       Integer Function ipfreeNt( nt )
  46. C     -------------------------------
  47.       Integer nt
  48. C
  49.       Integer hffreent
  50. C      
  51.       ipfreeNt = hffreent( nt )
  52.       return
  53.       end
  54. C
  55. C                      
  56.       Integer Function ipnew( ndim )
  57. C     ------------------------------
  58.       Integer ndim
  59. C
  60.       Integer hfnew
  61. C      
  62.       ipnew = hfnew( ndim )
  63.       return
  64.       end
  65. C
  66. C            
  67.       Integer Function ipsetNtLabel( nt, ndim, label )
  68. C     ------------------------------------------------
  69.       Integer       nt
  70.       Integer       ndim
  71.       Character*(*) label
  72. C
  73.       Integer hfsetntlabel
  74.       Integer ndimc, lenc
  75. C
  76. C    Note: in C, ndim counting is one less then FORTRAN
  77. C
  78.       if ( ndim .le. 0 ) then
  79.          Print *, 'ipsetNtLabel error: column index must be > 0'
  80.      ipsetNtLabel = -1
  81.      return
  82.       endif
  83.       ndimc = ndim -1
  84.       lenc = len(label)  
  85.       ipsetNtLabel = hfsetntlabel( nt, ndimc, label, lenc )
  86.       return
  87.       end
  88. C
  89. C
  90.       Integer Function ipsetNtTitle( nt, title )
  91. C     ------------------------------------------
  92.       Integer       nt
  93.       Character*(*) title
  94. C
  95.       Integer hfsetnttitle
  96.       Integer lenc
  97. C
  98.       lenc = len(title)  
  99.       ipsetNtTitle = hfsetnttitle( nt, title, lenc )
  100.       return
  101.       end
  102. C
  103. C
  104.       Integer Function ipwrite( file, dlist, ntlist )
  105. C     -----------------------------------------------
  106.       Character*(*) file
  107.       Integer       dlist(*)
  108.       Integer       ntlist(*)
  109. C
  110.       Integer hfwrite
  111.       Integer lenc
  112. C
  113.       lenc = len(file)
  114. C
  115.       ipwrite = hfwrite( file, dlist, ntlist, lenc )
  116.       return
  117.       end
  118.