
    Hi Mark - you are reading on UNIX aren't you? I managed to fiddle things
    so it worked on UNIX as the character length is passed at the end of the
    argument list as a "dummy argument" and so can be ignored ... the string
    bit is passed in the usual place C like (without the '\0' though). However
    on PC's the length it is passed "by value" after the string argument
    (unless you change the calling convention to something other than
    "stdcall"), and in "stdcall" the name of a function is "mangled" depending
    on how many arguments it has ... if "nxputattr" is prototyped to take a
    character, and in your code you pass an integer, your program will not
    link. Headaches. I think it may be possible to produce separate "unix",
    "vms" and "pc" version of napif.f that would allow you to keep the
    interface as it is, but we are in the realm of compiler and system quirks

Indeed---I haven't looked at Freddie's Fortran interface, but from
past experience with linking Fortran and C I remember that argument
passing conventions, especially re. strings, are compiler- and
system-dependent. In general, I always thought that one has to write C
interface code that mimics what fortran expects, like this (not real
conventions--I made those up):

#if    defined(VISUALFORTRAN_NT) || defined(VAXFORTRAN_VMS)
	int _blah(float * arg1, char * string, float * arg2, int string_length)
#elsif defined(G77_LINUX)
	int blah(float * arg1, char * string, int *string_length, float * arg2)
#...

    I'm not convinced strings written by C always have a '\0' on them! As HDF

Well, strings in C always have a NULL at the end, but indeed the NULL
is typically not written out in I/O. However, on reading back, I/O
runtime is supposed to place a NULL at the end, as the following
manual excerpt for gets() explains:

     gets reads characters from the standard input stream, stdin, into the
     array pointed to by s, until a new-line character is read or an end-of-
     file condition is encountered.  The new-line character is discarded and
     the string is terminated with a null character.

( Of course gets() suffers from the buffer overflow and everybody uses
  fgets(), right? I only included it here because fgets is a little more 
  complicated due to length checking.
)

