Previous: x/ zvcmdout Up: Miscellaneous Routines Next: x/ zvpixsize
call xvhost(host, intfmt, realfmt, status) status = zvhost(host, intfmt, realfmt);
Returns the integer and real data representations of a host given the host type name. The returned values may be used with the translation routines or the INTFMT and REALFMT system label items. This routine can also return the host type name, for use with the HOST system label.
This routine is rarely needed, as the normal case is to read any type of file (where you get INTFMT and REALFMT from the file), and to write in native format (where you don't need to specify the formats). However, this routine is useful in the rare case that a program needs to write in a non-native format. The user can select the machine type for output, and this routine will return the data representations needed for that machine type.
Arguments:
HOST is the type name of the host you want information about. It is not the name of a particular machine, rather, it is the name of a type of machine. HOST corresponds to the HOST system label. The HOST system label is intended for documentation only, however, the same values are valid in this parameter. Normally, the HOST parameter will come from user input. The valid values will change as VICAR is ported to more machines, so the program should allow any value as user input, then check the status from x/ zvhost to see if the machine name is valid. The currently valid values are listed in Table . In addition, the following values are accepted:
The value ``HOSTNAME'' is special. If this value is given for HOST, then the return values change. The parameter INTFMT returns the host type name for the machine currently running. The parameter REALFMT is undefined on output. The value returned in INTFMT could then be used in another call to x/ zvhost (which wouldn't gain much since ``NATIVE'' or ``LOCAL'' do the same thing), or it could be used in a HOST label. This should be needed only from Fortran. A C program should use the ``NATIVE_HOST_LABEL'' macro defined in xvmaininc.h instead. Similarly, ``NATIVE'' and ``LOCAL'' will be mainly useful in a Fortran program, as a C program should use the NATIVE_INTFMT and NATIVE_REALFMT macros.
The integral host representation for the machine in question is returned in INTFMT. It corresponds to the INTFMT label item in a file, and the related parameters to the translation routines. The returned value will be one of the supported integer data types, which are listed in Table .
If the special host name ``HOSTNAME'' is given, then INTFMT instead returns the host type name (HOST label) of the native machine.
The floating-point host representation for the machine in question is returned in REALFMT. It corresponds to the REALFMT label item in a file, and the related parameters to the translation routines. The returned value will be one of the supported floating-point data types, which are listed in Table .
If the special host name ``HOSTNAME'' is given, then the value returned in REALFMT is undefined and should not be used.
The returned status value. It is an argument in Fortran and the function return value in C. Any value other than SUCCESS indicates that the value given for HOST was invalid.