This is hcstubs.c in view mode; [Download] [Up]
/*
* Support functions for FORTRAN interface to Hippo
* by Paul Kunz, SLAC, June 1991
* Copyright (C) 1991 The Board of Trustees of
* The Leland Stanford Junior University. All Rights Reserved.
*
* $Id: hcstubs.c,v 5.0 1993/08/17 21:54:24 rensing Exp $
*
* This set of functions is the second level interface between the
* FORTRAN user and the Hippo package which is written in C.
* All the functions the user sees are in FORTRAN and defined in
* hfstubs.f. At this level, one has C functions to support that
* FORTRAN. System dependencies on how to make C callable from
* FORTRAN will be found here. Each function has two versions,
* for example, with and with out a trailing '_' because some
* FORTRAN compilers adds the underscore and it can not be turned
* off.
*
* Warning: Just because these routines don't look they do anything,
* they are needed on some systems. Some systems (eg. VM) mangle the
* parameters sequence for C routines which are called by FORTRAN,
* making them unusable by other C routines.
*
* Warning: Names must be 6 characters or less since we can't rely on
* mangling them with the preprocessor.
*
* Report bugs to hippo_bug@ebnextk.slac.stanford.edu
*
*/
#include "hippo.h"
/*
* for VM, define that these routines are called from FORTRAN
*/
#ifdef VM
#pragma linkage (hfafl ,FORTRAN)
#pragma linkage (hfcnt ,FORTRAN)
#pragma linkage (hffnt ,FORTRAN)
#pragma linkage (hfnew ,FORTRAN)
#pragma linkage (hfslb ,FORTRAN)
#pragma linkage (hfstt ,FORTRAN)
#pragma linkage (hfwrt ,FORTRAN)
#pragma linkage (hfafl_,FORTRAN)
#pragma linkage (hfcnt_,FORTRAN)
#pragma linkage (hffnt_,FORTRAN)
#pragma linkage (hfnew_,FORTRAN)
#pragma linkage (hfslb_,FORTRAN)
#pragma linkage (hfstt_,FORTRAN)
#pragma linkage (hfwrt_,FORTRAN)
#endif
/*
* Interfaces to h_arrayFill() from hparrayFill()
*/
int hfafl( int *ntaddr, float *data )
{
return h_arrayFill( (ntuple) *ntaddr, data );
}
int hfafl_( int *ntaddr, float *data)
{
return h_arrayFill( (ntuple) *ntaddr, data );
}
/*
* Interfaces to h_clrNt() from hpclrNt()
*/
int hfcnt( int *ntaddr )
{
return h_clrNt( (ntuple) *ntaddr );
}
int hfcnt_( int *ntaddr )
{
return h_clrNt( (ntuple) *ntaddr );
}
/*
* Interfaces to h_freeNt() from hpfreeNt()
*/
int hffnt( int *ntaddr )
{
return h_freeNt( (ntuple) *ntaddr );
}
int hffnt_( int *ntaddr )
{
return h_freeNt( (ntuple) *ntaddr );
}
/*
* Interfaces to h_new() from hpnew()
*/
ntuple hfnew( int *ndim )
{
return h_new( *ndim );
}
ntuple hfnew_( int *ndim )
{
return h_new( *ndim );
}
/*
* Interfaces to h_setNtLabel() from hpsetNtLabel()
*/
int hfslb( int *ntaddr, int *dim, char *label )
{
return h_setNtLabel( (ntuple) *ntaddr, *dim, label);
}
int hfslb_( int *ntaddr, int *dim, char *label )
{
return h_setNtLabel( (ntuple) *ntaddr, *dim, label);
}
/*
* Interfaces to h_setNtTitle() from hpsetNtTitle()
*/
int hfstt( int *ntaddr, char *title )
{
return h_setNtTitle( (ntuple) *ntaddr, title );
}
int hfstt_( int *ntaddr, char *title )
{
return h_setNtTitle( (ntuple) *ntaddr, title );
}
/*
* Interfaces to h_write() from hpwrite()
*/
int hfwrt( char *filename, int *daddr, int *ntaddr )
{
return h_write(filename, (display *) daddr, (ntuple *) ntaddr );
}
int hfwrt_( char *filename, int *daddr, int *ntaddr )
{
return h_write(filename, (display *) daddr, (ntuple *) ntaddr );
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.