From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- pkg/utilities/nttools/stxtools/od/odput.x | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 pkg/utilities/nttools/stxtools/od/odput.x (limited to 'pkg/utilities/nttools/stxtools/od/odput.x') diff --git a/pkg/utilities/nttools/stxtools/od/odput.x b/pkg/utilities/nttools/stxtools/od/odput.x new file mode 100644 index 00000000..d02f59a5 --- /dev/null +++ b/pkg/utilities/nttools/stxtools/od/odput.x @@ -0,0 +1,50 @@ +include "od.h" + +#--------------------------------------------------------------------------- +.help od_put Feb93 source +.ih +NAME +od_put -- Put the data in the file. +.ih +USAGE +.nf +call od_putd (od, data) +.fi +.ih +ARGUMENTS +.ls od (input: pointer) +The OD I/O descriptor. +.le +.ls data (input: double[ARB]) +The data to put in the OD file. +.le +.endhelp +#--------------------------------------------------------------------------- +procedure od_put (od, data) + +pointer od # I: The OD I/O descriptor. +double data[ARB] # I: The data. + +# Functions +pointer impl1d() + +errchk impl1d, tbcptd + +begin + # Check if a file is actually opened. If not, do nothing. + if (od != NULL) { + + # Get data depending on file type. + switch (OD_TYPE(od)) { + case OD_TABLE: + call tbcptd (OD_FD(od), OD_CD(od,OD_GRP(od)), data, + 1, OD_LEN(od)) + + case OD_IMAGE: + call amovd (data, Memd[impl1d (OD_FD(od))], OD_LEN(od)) + } + } +end +#--------------------------------------------------------------------------- +# End of od_put +#--------------------------------------------------------------------------- -- cgit