CVLLIB C Interface Manual Release 4 (Manual Edit Ref 4-0) 31-Mar-86 C G Wilson 71 Galatea St, Charleville 4470 Australia CVLLIB is a (personal) general-purpose library for the RT11 Macro, Fortran or C programmer. Routines cover facilities such as reading and writing decimal (up to triple precision) and octal (up to double precision) and hexadecimal (up to double precision) integers, money format (double or triple precision), dates and times, filenames and radix50 formats. Multiple-precision arithmetic routines are included, none of which requires an EIS or FIS. This manual provides the details of the interfaces and programmes designed to allow use of CVLLIB from C programmes, using the Conroy C compiler submitted to DECUS by Bob Denny. The C section of this library is largely experimental, as many of the facilities provided in it are provided in native C anyway. It has been a useful set of routines for the author to have around whilst struggling to learn C - a process which continues with enthusiasm and occasional disasters. The main use of this library has been for debugging C subroutines, where these are not intended for use with the C operating system. For this, they have been most valuable! This manual does not contain such details as information on nomenclature, the CALEND COMMON block, or some of the other parts which were duplicated in both the General Manual and the Fortran Manual. The user can refer to the General Manual for such details. Please inform me if this should cause problems. CVLLIB C Interface Manual Page 2 A Tribute to the Later Structured Languages ------------------------------------------- ... [defaecate] said the King, and ten thousand Egyptian [bottoms] strained to obey... {edited from an ancient schoolboy litany} CVLLIB C Interface Manual Page 3 Table of Contents ----------------- a) Update History 1. GENERAL DETAILS Argument Patterns Writing to a String Reading (generally) Flag Values Hexadecimal Conventions 2. SPECIAL BLOCK FORMATS DATE block CALEND Common Block TIME block FILENAME block Terminal I/O 3. DATE 4. TIME 5. FILENAME & RADIX50 6. Triple Precision Money 7. Triple Precision Integer I/O 8. Triple Precision Arithmetic 9. Double Precision Money 10. Double Precision Integer I/O 11. Double Precision Arithmetic 12. Single Precision Integer I/O 13. Length Conversion 14. String Comparison 15. Various Additional Routines 16. Ancillary Subroutines Appendix I - Index Update History 20-Aug-83: First edition of separate C Manual. 31-Mar-86: Tidying up of manual for Release 4 of CVLLIB, with putting all CVLLIB code into PSECT CVLLIB, allowing ordering of PSECTs. (This allows use of CVLLIB in programme portions of device hendlers, for example.) CVLLIB C Interface Manual Page 4 CHAPTER 1 General Details 1.1 Argument Patterns: Throughout this manual, the following names for arguments have these meanings: a single precision integer value. a double precision integer value, ith the high-order bits in the first word (lower address). This is the opposite way round from the SYSLIB INTEGER*4 support functions, but the same way round as the RT11 timer functions. <3.int> a triple precision integer value with the highest order bits in the first word through to the lowest order bits in the last word. These will require definition either as structures or as arrays (eg int val3 [200][3];). Any number suffixed to any of the above (eg long-2) is used to differentiate between different arguments of the same type in describing their purpose for that particular subroutine or function. (usually &strpnt) - the address of a pointer to the string into which or from which data will be written or read. It is not sufficient to provide a pointer, as the pointer value itself is altered to point to the next free byte (on writing) or the next byte to be read. On writing to a string the next available byte will have been cleared (to 0) on return from any of the writing routines. Routines which read from the terminal (into an internal buffer TLINB) return a pointer to the delimiting character (and thus any subsequent input on the same line) in . CVLLIB C Interface Manual Page 1-2 General Details 1.2 Writing to a string: When information (eg numbers) is written to a string (using a argument from C routines), the characters are written into that string sequentially with no check as to the available length of that string. C routines clear the terminating byte, and advance to point to that byte. 1.3 Reading generally: Routines which read ignore leading spaces and tabs, except for routines which read Radix50 values. 1.4 Flag values: Many routines require minor information to be provided in the form of a word. Some routines provide the ability to include or exclude spaces either preceding or embedded within output fields. Including these spaces allow columns of information to be accurately lines up no matter what the content of the information; excluding the spaces makes for tidier formatting on a one-off basis (for example dates, times, and filenames). The sign bit of the argument is used to control spaces; other bits will be routine dependent. If the sign bit be clear, no leading or embedded spaces will be included. If it is set (ie the value is negative) they will be included as relevant. 1.5 Hexadecimal Conventions Various systems use various conventions to define a hexadecimal number. Some use merely the digit string, some use a prefix character (for example a "0" or a colon), and some use a suffix (for example an "X" or an "H"). In a vain attempt to provide all things for all men, CVLLIB provides the option for a prefix &/or suffix character for hexadecimal numbers. The default is a "0" (digit zero) prefix character, and no suffix character. To alter either, define it in the external section as follows: int hexpre=0; int hexsuf='H'; will lead to no hex prefix character (HEXPRE=0), and an "H" hex suffix. On hexadecimal output the hex prefix character (if defined) will prefix any hex number written, and the hex suffix character (if defined) will CVLLIB C Interface Manual Page 1-3 General Details follow any number. All hex output is unsigned. On reading a hex number using the specific hex reading routines (CRH2T, CRH2, CRHT, or CRH) any prefix or suffix characters will be ignored. On reading a number using the generic number reading routines (CRN2T, CRN2, CRNT, or CRN) any prefix or suffix character will be taken to mean that the particular digit string constitutes a hexadecimal number, and the relevant hex reading routine will be used. CHAPTER 2 Special Block Formats 2.1 DATE block: DATE routines require a 5-word block (referred to as a "dateblock") in the following formats: 1st word DAY eg 31 for 31-Mar-81 2nd word MONTH eg 3 for 31-Mar-81 3rd word YEAR eg 81, or 1981 4th word DYEAR day of year: 90 for the same date 5th word RTDAT date in RT11 format - ie sign bit 0 next 5 bits - month next 5 bits - day last 5 bits - year-1972 eg 7751 (octal) for the date 31-Mar-81. Various routines place relevant values in these locations, use values from them, or convert values between locations within the block. A date block is defined in the library, with the global DATBLK, with the locations defined globally as DAY, MONTH, YEAR, DYEAR, and RTDAT. This is probably not terribly useful for C programmers, as definition as a structure would be much clearer! 2.2 CALEND Common Block [see the general and fortran manuals]. 2.3 TIME block TIME routines require a 7 word block (referred to as a "timeblock") in the following format: CVLLIB C Interface Manual Page 2-2 Special Block Formats 1st word HOURS hours (in 24 hour format) 2nd word MINS minutes 3rd word SECS seconds 4th word TICKS clock ticks 5th word RTIM1 two words containing RT11 6th word RTIM2 double-precision time, high order word first, in clock ticks since the previous midnight. 7th word TCLOCK number of clock ticks per second (set by the user, or by the CRSTIM routine; used for time conversions. Various routines place relevant values in these locations, use values fom them, or convert values between locations within the block. For convenience, a 7 word block is provided in CVLLIB. The first location is the global TIMBLK, and the locations are sequentially named globally HOURS, MINS, ... , TCLOCK. This is again probably not terribly useful for C programmers, who would be better defining the whole thing as a structure. 2.4 FILENAME block: Routines concerning filenames require a 4 or 5 word block (referred to as a "fileblock") in the following format: 1st word DEVICE device name 2nd word FILE1 first 3 chars of filename 3rd word FILE2 last, ibid 4th word EXT extension (file type) [first four words are in RADIX50 format] 5th word SIZE file size (integer) - optional on routines which write filenames - an integral number of 256-word blocks. No equivalent block is provided in this library - the user is expected to provide his own! No file I/O routines are provided in this library. The original C library is most restrictive for I/O other than simple sequential, and I find this a nuisance. For compatibility reasons I have not attempted to write any additional routines, but no doubt will be pushed into it sooner or later. All ideas will be gratefully appreciated! CVLLIB C Interface Manual Page 2-3 Special Block Formats 2.5 Terminal I/O: The C operating system is not used for terminal I/O with the CVLLIB routines. Thus they can be used to debug C subroutines which are not intended for use with the C operating system. Routines which appear to do direct terminal I/O (eg CRMT - read money value from terminal) actually operate by using a temporary buffer (TLINB for input, and TLOUB for output), and the equivalent string interpreting or writing routine. In this library a routine TLINB is defined as a 90 (decimal) character block, and TLOUB a 140 (decimal) character block - sufficient for a full 132-column printer line. Should these be excessive or insufficient for your purpose, either use your own buffer and don't use the direct terminal I/O routines, or define TLINB and/or TLOUB in your own programme - for example: char tlinb[40]; char tloub[400]; Note that routines which read from the terminal and routines which write to the terminal use different buffers (change from Release 3 to Release 3 of CVLLIB). Routines which read from the terminal normally do so using the .TTYIN programmed request. This means that they will NOT take input from command files. Should this be desired, either use your own .GTLIN request (from C programmes, the CGTLIN routine), or when linking use the /INCLUDE switch to force loading the global "R$G". With this, all teletype input requests (including TLIN, with release 3) will use .GTLIN _________ requests and track command files. CHAPTER 3 Date Routines On output, Date format is the unambiguous dd-Mmm-yy. If the day value be less than 10 a space may precede the date. A flag may be passed to date writing routines to suppress this space. On input, there are three acceptable formats for the date. The form specifying the month in alphabetic characters (eg 3-Feb-82) will always be recognized, and either the British numeric month pattern (3/2/82, dd/mm/yy) or the American (2/3/82, mm/dd/yy) may be recognized additionally if desired. A flag passed to the date reading routine should be zero if only the alphabetic form of the month is to be recognized (recommended for programmes handed around internationally), positive if the British form is allowed, and negative if the American form is desired. The fields may be delimited by any character with an ascii value less than the character "0" - eg space, tab, comma, or slash. spaces are permitted on either side of the delimiting character. The month field may be numeric (see above), or may be alpha. If alpha, only the first three letters are checked for validity, the remainder being ignored (thus 14-Dec-76 ie exactly the same as 14.decadent.76). Letters may be either upper or lower case. The delimiter for the month may be any of the ones mentioned for the day. The year follows, as an integer. Many of the date routines can cope with the year either as the full four-digit value (eg 1981) or the truncated form (81), but the latter is assumed to always modulo 1900 (ie 98 is 1998, not 1898). At least one digit must be specified for the year (note difference from general numeric read routines which will return zero on the first non-numeric character even if that were the first character encountered). If the value to Date writing routines be zero, any leading space will be suppressed. If negative, there may be a leading space. CVLLIB C Interface Manual Page 3-2 Date Routines 3.1 Date Routines: For details of , see chapter 1. CTODAT Write today's day & date to the terminal i = ctodat(&dateblock); writes today's day and date (in the form "Sunday 4-Jan-81") to the terminal. If no date was set up on the system, nothing is written in, and the function returns -1. Otherwise 0 is returned. The is set up with today's date information. CTODAY Write today's day & date to a string i = ctoday(&strpnt,&dateblock); writes today's day and date (in the form "Sunday 4-Jan-81") to the string pointed to in , which is advenced to point to the next free byte (which is zeroed). If no date was set up on the system, nothing is written and the function returns -1. Normally 0 is returned. The is set up with today's date information. CWDAYT Write name of day to terminal cwdayt(int); writes the name of the day corresponding to to the user's terminal. Numbers from 1 to 7 produce "Sunday" through "Saturday" respectively; anything else produces "Illegal". CWDAY Write name of day to a string cwday(&strpnt,int); writes the name of the day corresponding to to the string pointed to by . Numbers from 1 to 7 produce "Sunday" through "Saturday" respectively; anything else produces "Illegal". is advanced to point to the next free byte, which is cleared. CVLLIB C Interface Manual Page 3-3 Date Routines CWSDTT Write system date to the terminal i = cwsdtt(&dateblock,flag); sends the system date to the terminal in the form "3-Jan-81". receives the date information relevant to the present day. is used to determine whether to include a leading space should the day number be less than 10. If be negative, there will be a leading space if the day be <10. The function returns -1 if no date has been set on the system, and 0 otherwise. CWSDAT Write system date to a string i = cwsdat(&strpnt,&dateblock,flag); puts the system date into the string pointed to in in the form "3-Jan-81", leaving pointing to the next free byte, which has been cleared. receives the date information relevant to the present day. is used to determine whether to include a leading space should the day number be less than 10. If be negative, there will be a leading space if the day be <10. The function returns -1 if no system date has been set, 0 otherwise. CWDATT Write date to terminal cwdatt(&dateblock,flag); Types the date from the dateblock to the terminal. is used to determine whether or not to print a leading space should the day value be less than 10. If be negative, there will be a leading space if day be less than 10. CVLLIB C Interface Manual Page 3-4 Date Routines CWDAT Write date to a string cwdat(&strpnt,&dateblock,flag); Types the date from to the string. is left pointing to the next available byte, which is zeroed. is used to determine whether or not to print a leading space should the day value be less than 10. If be negative, a leading space will be printed if day be less than 10. CRSDAT Save system date into dateblock i = crsdat(&dateblock); places the system date information in the RTDAT offset in and returns -1 if system date not set up (0 otherwise). If a system date set up, conversion is performed on the date from RT11 format to words in the appropriate offsets within . CRDATT Read date from terminal i = crdatt(&strpnt,&dateblock,flag); Reads the date from the terminal, storing it in the locations in . The number of the day in the year is set in the DYEAR offset, and the RT-11 version of the date in the RTDAT offset. receives a pointer to the delimiting character. The value returned is -1 if an illegal date was typed, or the number (1-7, Sunday through Saturday) of the day of the week corresponding to that date. is an indication of the expected date format. If be zero, the month must be alphabetic, and be between the day and the year. If positive, the British convention of day/month/year (numeric month) is permitted, and if be negative, the American convention of month/day/year may be used. CVLLIB C Interface Manual Page 3-5 Date Routines CRDAT Read date from a string i = crdatt(&strpnt,&dateblock,flag); Reads the date from the string, storing it in the locations in . The day of the year is also set in the DYEAR offset, and the RT-11 version of the date in the RTDAT offset. The value -1 is returned if an illegal date was typed, or the number (1-7, Sunday through Saturday) of the day of the week corresponding to that date. is left pointing to the delimiter. is an indication of the expected date format. If be zero, the month must be alphabetic, and be between the day and the year. If positive, the British convention of day/month/year (numeric month) is permitted, and if be negative, the American convention of month/day/year may be used. CDTDIF Calculate difference between dates i = cdtdif (&dateblock-1,&dateblock-2,&long); Returns in 2.precis integer the number of days between the date in to the date in . The value will be negative if the date in is earlier. Should either of the dates be non-existent, or before 1600, this function will return the value -1 (in "i"). Normally it will return 0. CDTCAL Calculate date from YEAR & DYEAR i = cdtcal (&dateblock); Takes the information in the offsets YEAR and DYEAR (year and day of year) and constructs a date from them, setting up the DAY, MONTH, YEAR, and DYEAR offsets within the same . Note that 1-Jan is counted as day 1. Thus day 0 is 31-Dec of the previous year, and -1 30-Dec et cetera. The function returns 0 normally, and -1 should calculations take CVLLIB C Interface Manual Page 3-6 Date Routines the date back before the year 1600. CAGE Age calculation i = cage (&dateblock-1,&dateblock-2,&iyears,&months); Takes date of birth from and the date on which the age is to be calculated in and calculates age in years (returned in ) and months (returned in ). The value returned from this function (i) is 0 if all was well and -1 if the date of birth is after the date for calculation (ie not born yet). CIDAY Return day of week given date i = ciday(&dateblock); returns -1 if the date were invalid, or 1-7 for Sunday through Saturday respectively. CCRDW Convert RT11 Date to Words ccrdw(&dateblock); Converts the RT11 format date (in the offset RTDAT) into separate words of day, month, and year, storing these in the relevant offsets in . There is no error detection for illegal dates. CCWDR Convert date in integer words into RT11 format ccwdr(&dateblock); Converts the values from the DAY, MONTH & YEAR offsets in into the RT11 format for the date, storing this in the RTDAT offset. {The RT11 date format is (1b;5b;5b;5b).} The year may be in full (eg 1981) or part (eg 81). If before 1972 the year field will be left zero. There is no error detection on illegal dates. CHAPTER 4 Time Routines The RT-11 format for time is a two-word integer using the same format as the other two-word routines in this library - having the highest order bits in the first (lowest address) word, and the low order bits in the second word. (This is the opposite to the INTEGER*4 support offered in SYSLIB, but fits with the native C long format). The format is described in an earlier chapter of this manual. Routines which write time values require a argument. If the low-order byte of be zero, the hours and minutes only are typed (hh:mm). If non-zero, the seconds are also typed (hh:mm:ss). There are no routines for typing fractions of a second in this library. If the sign bit of is not set, no leading space will precede the HOURS value, even if that value is less than 10. If the sign bit is set, a space will precede the HOURS value if its value is less than 10. Minute and second fields always have 2 digits, even if the first be a zero. Routines which read time expect a series of decimal numbers, taken in sequence as hours, minutes, seconds, and clock ticks. Unused fields will be taken to be zero. Any non-alphanumeric character may be used as the delimiter. AM or PM may be suffixed to the last field, but the hours returned will always be in 24-hour format. (The "M" in AM or PM is optional. Upper or lower case may be used.) An addition in Release 3 permits time to be specified using a single number (as "1230" for 12:30). If the number first found be greater than or equal to 100 this format is assumed. Seconds and ticks will be taken as zero, and only the first number (even if more be typed) will be read. 4.1 Time Routines: For details of , see chapter 1. CWSTMT Write system time to the terminal CVLLIB C Interface Manual Page 4-2 Time Routines cwstmt (&timeblock,flag) sends the system time to the terminal in the form "hh:mm". The time information is put into . is used to determine whether to type just hh:mm or hh:mm:ss. If the low-order byte be 0, just hh:mm will be sent; otherwise hh:mm:ss will be provided. If the sign bit be clear, a leading space will be placed before the hours digit if that be less than 10. If the sign bit be set there will be a leading space if hours < 10. CWSTIM Write system time to a string cwstim (&strpnt,&timeblock,flag); puts the system time into the string in the form "hh:mm". is left pointing to the next free byte, which has been cleared. The time information is put into . is used to determine whether to type just hh:mm or hh:mm:ss. If the low-order byte be 0, just hh:mm will be sent; otherwise hh:mm:ss will be provided. If the sign bit be set, a leading space will be placed before the hours digit if that be less than 10. If the sign bit be clear there will be no leading space. CWTIMT Write time to terminal cwtimt(&timeblock,flag); writes the time from the to the terminal. is used to determine how much time to type. If its low-order byte contain zero, the time is typed as HH:MM, and if non-zero, HH:MM:SS. The sign bit is used to determine whether a leading space should precede the hours digits if HOURS be less than 10. If the sign bit be set, this leading space will be included. CWTIM Write time to string cwtim(&strpnt,&timeblock,flag) writes the time from the to the string. is left pointing to the next free byte, which has been cleared. CVLLIB C Interface Manual Page 4-3 Time Routines is used to determine how much time to type. If its low-order byte contain zero, the time is typed as HH:MM, and if non-zero, HH:MM:SS. The sign bit is used as a flag to determine whether to include a leading space should the HOURS value be less than 10. If the sign bit be set, the leading space will be included. CRSTIM Read system time into crstim(&timeblock); Reads the system time into the offsets RTIM1 & RTIM2 in . Also sets the TCLOCK offset to either 50 or 60 depending upon the setting of B.CLK in CONFIG(SYSPTR). Performs a conversion of the system time into the relevant HOURS, MINS, SECS and TICKS values in . CRTIMT Read time from the terminal i = crtimt(&strpnt,&timeblock); Reads the time in hours, mins, secs, and ticks from the terminal into the . The value returned is zero if all went well, and -1 if an error was found in the specification. is set to point to the delimiting character. Note - the TCLOCK offset in contains the number of ticks/second. Should the user type a value out of range an error will be reported. For further details (including interpretation of AM and PM) see RTIM.MAC CRTIM Read time from a string i = crtim(&strpnt,&timeblock); Reads the time in hours, mins, secs, and ticks from the string into . The value returned is 0 if all went well, and -1 if an error was found in the specification. is left pointing to the delimiting character. Note - the TCLOCK offset contains the number of ticks/second. Should the user type a value out of range an error will be reported. CVLLIB C Interface Manual Page 4-4 Time Routines For further details (including interpretation of AM and PM) see RTIM.MAC CCRTW Convert RT11 time to words ccrtw(&timeblock); Converts the two-word RT11 time stored in offsets RTIM1 (hi-ord) and RTIM2 (lo-ord), using the ticks-per-second supplied in the TCLOCK offset, into ticks, seconds, minutes, and hours, storing these back in . CCWTR Convert time in integers to RT11 format ccwtr(&timeblock); Converts the integers in the offsets HOURS, MINS, SECS & TICKS into the two-word integer time format of ticks after midnight of RT11. The contents of the offset TCLOCK is used for ticks per second, and the result is stored in offsets RTIM1 (hi-ord) and RTIM2 (lo-ord). CHAPTER 5 Filename & Radix50 Formats: Routines which handle filenames require a "fileblock" of 4 or 5 words as described in the chapter on Special Block Formats earlier in this manual. This block contains or receives details of a file: the device, filename, and extension (file type) in Radix50 format, and (optionally for writing) the file size as an integral number of blocks, each block being 512 characters long. No routines have been written yet for CVCLIB to permit actual file opening and closing from C programmes. The original C ones are good, but limited for all practical purposes to sequential I/O. When routines for CVCLIB are written, I will try to make them fit in with the originals. Routines which write filenames require a to determine output format. If the sign bit of be set, spaces in the device, filename, and extension subfields will be left in the final result. It not set, trailing spaces will be suppressed from each subfield. Thus =neg produces "DK: FRED .C " vs =pos "DK:FRED.C". If the low order byte in be non-zero, the file size will be output. If zero, no size will be appended to the filename. In Radix50 output, the unassigned Radix50 code is encoded as "*", and on input the "*" sign is converted into that unassigned code. In filename format output, the "." character will be converted to the wildcard "%" character, as per CSI filename conventions. CVLLIB C Interface Manual Page 5-2 Filename & Radix50 Formats: 5.1 Filenames & Radix50 Routines: For details of , see chapter 1. CWFT Write a filename to the terminal cwft(&block,flags); writes a filename to the user's terminal from the array , in the form: BLOCK(1) .radix50 /device/ BLOCK(2,3) .radix50 /filename/ BLOCK(4) .radix50 /extension/ BLOCK(5) .word filesize is used to determine whether or not to print the size, and whether or not to suppress trailing blanks in the various subfields. Low order byte = 0 - No size printed <> 0 - size printed Sign bit clear - no spaces in subfields set - spaces in subfields CWF Write a filename to a string cwf(&strpnt,&block,flags); writes a filename in ascii to the string from the array , which has the form: BLOCK(1) .radix50 /device/ BLOCK(2,3) .radix50 /filename/ BLOCK(4) .radix50 /extension/ BLOCK(5) .word filesize is used to determine whether or not to print the size, and whether or not to suppress trailing blanks in the various subfields. Low order byte = 0 - No size printed <> 0 - size printed Sign bit clear - no spaces in subfields set - spaces in subfields is returned pointing to the next (cleared) byte in the string. CVLLIB C Interface Manual Page 5-3 Filename & Radix50 Formats: CRFDT Read a filename from the terminal, with defaults i=crft(&strpnt,&block); reads a filename from the user's terminal, returning -1 if there was an error in the filename specified, and 0 if all was well. The filename is read into the array such that BLOCK(1) .radix50 /device/ BLOCK(2,3) .radix50 /filename/ BLOCK(4) .radix50 /extension/ BLOCK(5) .word filesize receives a pointer to the delimiting character. If the device or extension fields are not specified, their contents will not be altered on return from CRFT. Thus these fields may have default values specified. CRFD Read a filename from a string, with defaults i=crfd(&strpnt,&block); reads a filename from the string returning -1 if there was an error in the filename specified, and 0 if all was well. The filename is read into the array such that BLOCK(1) .radix50 /device/ BLOCK(2,3) .radix50 /filename/ BLOCK(4) .radix50 /extension/ BLOCK(5) .word filesize is returned pointing to the delimiter. The device and extension words will remain unchanged if the corresponding field in the filename be unspecified. This provides a mechanism for allowing default values. CRFT Read a filename from the terminal i=crft(&strpnt,&block); reads a filename from the user's terminal, returning -1 if there was an error in the filename specified, and 0 if all was well. The filename is read into the array such that BLOCK(1) .radix50 /device/ CVLLIB C Interface Manual Page 5-4 Filename & Radix50 Formats: BLOCK(2,3) .radix50 /filename/ BLOCK(4) .radix50 /extension/ BLOCK(5) .word filesize receives a pointer to the delimiter. No defaults are allowed. Unspecified fields will be returned null. CRF Read a filename from a string i=crf(&strpnt,&block); reads a filename from the array , returning -1 if there was an error in the filename specified, and 0 if all was well. The filename is read into the array such that BLOCK(1) .radix50 /device/ BLOCK(2,3) .radix50 /filename/ BLOCK(4) .radix50 /extension/ BLOCK(5) .word filesize is increased by the number of bytes read from , up to but not including that which delimited the filename. No defaults are allowed. Unspecified fields will be returned null. CW50FT Write Radix50 (filename set) value to terminal cw50ft(value); types 3 radix50 characters from to the terminal, using the filename convention of "." becoming "%". CW50F Write Radix50 (filename set) value to string cw50f(&strpnt,value); Writes 3 radix50 characters from into the string, using the filename convention of "." becoming "%". CVLLIB C Interface Manual Page 5-5 Filename & Radix50 Formats: CW50T Write Radix50 value to terminal cw50t(value); types 3 radix50 characters from to the terminal. CW50 Write Radix50 value to string cw50(&strpnt,value); Writes 3 radix50 characters from into the string. CR50ST Read radix50 value from terminal (symbol set) cr50st(&strpnt,&int); returns 3 radix50 characters in , leaving pointing to the delimiter. Returns -1 if the character following (or the delimiter) is not a valid radix50 character. Otherwise returns zero. The symbol radix50 character set, excluding , is allowed. The unassigned radix50 value, 35, is used for the "*" character. CR50S Read radix50 value from string (symbol set) i=cr50s(&strpnt,&int); returns 3 radix50 characters in , leaving pointing to the delimiter. Returns -1 if the character following (or the delimiter) is not a valid radix50 character. Otherwise returns zero. The symbol radix50 character set, excluding , is allowed. The unassigned radix50 value, 35, is used for the "*" character. CR50FT Read radix50 value from terminal (filename set) cr50ft(&strpnt,&int); returns 3 radix50 characters in , leaving pointing CVLLIB C Interface Manual Page 5-6 Filename & Radix50 Formats: to the delimiter. Returns -1 if the character following (or the delimiter) is not a valid radix50 character. Otherwise returns zero. The filename radix50 character set, excluding and ".", is allowed. The unassigned radix50 value, 35, is used for the "*" character. CR50F Read radix50 value from string (filename set) i=cr50f(&strpnt,&int); returns 3 radix50 characters in , leaving pointing to the delimiter. Returns -1 if the character following (or the delimiter) is not a valid radix50 character. Otherwise returns zero. The filename radix50 character set, excluding and ".", is allowed. The unassigned radix50 value, 35, is used for the "*" character. CR50T Read radix50 value from terminal cr50t(&strpnt,&int); returns 3 radix50 characters in , leaving pointing to the delimiter. Returns -1 if the character following (or the delimiter) is not a valid radix50 character. Otherwise returns zero. The full radix50 character set, including and ".", is allowed. The unassigned radix50 value, 35, is used for the "*" character. CR50 Read radix50 value from string i=cr50(&strpnt,&int); returns 3 radix50 characters in the word , leaving strpnt pointing to the delimiter. Returns -1 if the character following (or the delimiter) is not a valid radix50 character. Otherwise returns zero. The full radix50 character set, including and ".", is CVLLIB C Interface Manual Page 5-7 Filename & Radix50 Formats: allowed. The unassigned radix50 value, 35, is used for the "*" character. CCA50 Convert ascii to radix50 i=cca50(char); Returns the radix50 value of the character in CHAR, or -1 if the character was illegal in radix50. The unused radix50 character (value 35) is returned for the character "*". CC50A Convert radix50 to ascii i=cc50a(char); Returns the ascii value of radix50 value in CHAR, or -1 if the character was illegal in radix50. The unused radix50 character (value 35) returns the character "*". CHAPTER 6 Triple Precision Money Routines The triple precision format comprises three consecutive words. The highest order bits are in the first word (word with the lowest address), then the intermediate order bits, then the lowest order bits in the third word. The numers are taken as a 48-bit twos-complement signed integer, expressing the number of cents in the value concerned. This leads to an upper limit of approximately $14 x 10**11 (1.4 {British} billion). On output, values may be preceded by a dollar sign (routines with a "D" in the name). If the value be negative, the minus sign will precede the dollar. On input, values may be preceded by a dollar sign and/or a minus sign, which may be before or after the dollar sign. Overflow on input is indicated by a returned value of -1 from the function concerned. (Normally 0 is returned). A single digit after the decimal point is taken to be a decimal of a dollar (eg "$12.34" returns the value 1234, and "$12.5" returns 1250). 6.1 Triple Precision Money Routines For details of , see chapter 1. CWM3PT Write triple-precision money to terminal, spec pos cwm3pt(&value,nplaces); or cwm3dx(&value,nplaces); prints the value of the triple-precision integer in (3 words) to the terminal in money format as though the value were cents. Eg 1234567890 becomes $12345678.90 provides the minimum size of the field to be occupied by the result, right-justified within that field, space filled. CVLLIB C Interface Manual Page 6-2 Triple Precision Money Routines CWM3DX - Provides a leading dollar sign (would have been LWM3DPT but only 6 characters available!) CWM3PT - No leading dollar. CWM3T Write triple-precision money to terminal. cwm3t(&value); or cwm3dt(&value); prints the value of the triple-precision integer in (3 words) to the terminal in money format as though the value were cents. Eg 1234567890 becomes $12345678.90 CWM3DT - Provides a leading dollar sign CWM3T - No leading dollar. CWM3P Write triple-precision money to string, spec pos cwm3p(&strpnt,&value,nplaces) or cwm3dp(&strpnt,&value,nplaces) prints the value of the triple-precision integer in (3 words) to the string pointed to in R1 in money format as though the value were cents. Eg 1234567890 becomes $12345678.90 provides the minimum size of the field to be occupied by the result, right-justified within that field, space filled. CWM3DP - Provides a leading dollar sign CWM3P - No leading dollar. CWM3 Write triple-precision money to string. cwm3 (&strpnt,&value); or cwm3d(&strpnt,&value); prints the value of the triple-precision integer in (3 words) to the string pointed to in R1 in money format as though the value were cents. Eg 1234567890 becomes $12345678.90 CWM3D - Provides a leading dollar sign CWM3 - No leading dollar. CVLLIB C Interface Manual Page 6-3 Triple Precision Money Routines CRM3T Read triple-precis money from terminal i = crm3t(&strpnt,&value); reads a value in dollars & cents (eg $123.45) from the terminal, returning a triple-precision integer value in cents in , and a pointer to the delimiter in . A value of 0 is returned unless overflow occurred on reading the number, in which case -1 is returned. In this case the scan of the input data will have continued to the end of the digit string. CRM3 Read triple-precis money from a string i = crm3(&strpnt,&value); reads a value in dollars & cents (eg $123.45) from the string, returning a triple-precision integer value in cents in . is left pointing to the delimiter. A value of 0 is returned unless overflow occurred on reading the number, in which case -1 is returned. In this case the scan of the input data will have continued to the end of the digit string. CHAPTER 7 Triple Precision Integer I/O Triple precision integers are stored in three consecutive words wih the highest order bits occupying the first word (with the lowest address). They are treated as 48-bit twos-complement signed numbers. Routines are provided to read, write, and arithmetically manipulate (see next chapter) these numbers. Decimal radix only is provided for triple precision numbers in this library (octal and hexadecimal are provided in single and double precisions only). The maximum value for a triple precision number is slightly over 14 x 10**13 or 140 {British} billion. 7.1 Triple Precision I/O Routines: For details of , see chapter 1. CWD3PT Write triple-precis # to terminal, specify # places cwd3pt(&value,nplaces) writes 3 words from as a triple-precision signed integer to the user's terminal. specifies the minimum size of the field for the result to occupy, right-justified within that field, filled to the left with spaces. CWD3T Write triple-precis # to terminal. cwd3t(&value); writes 3 words from as a triple-precision signed integer to the user's terminal. CVLLIB C Interface Manual Page 7-2 Triple Precision Integer I/O CWD3P Write triple-precis # to string, specify # places cwd3p(&strpnt,&value,nplaces) writes 3 words from as a triple-precision signed integer to the string. is returned pointing to the delimiter. specifies the minimum size of the field for the result to occupy, right-justified within that field, filled to the left with spaces. CWD3 Write triple-precis # to string. cwd3(&strpnt,&value); writes 3 words from as a triple-precision signed integer to the string. is returned pointing to the delimiter. CRD3T Read triple-precision integer from terminal i = crd3t(&strpnt,&value); reads a triple-precision signed integer from the user's terminal into the three locations starting at . is returned pointing to the delimiter. A value of 0 is returned unless overflow occurred on reading the number, in which case -1 is returned. In this case the scan of the input data will have continued to the end of the digit string. CRD3 Read triple-precision integer from string i = crd3(&strpnt,&value); reads a triple-precision signed integer from the string into the three locations starting at . is returned pointing to the delimiter. A value of 0 is returned unless overflow occurred on reading the number, in which case -1 is returned. In this case the scan of the input data will have continued to the end of the digit string. CHAPTER 8 Triple Precision Arithmetic 8.1 Triple Precision Arithmetic Routines: CMUL31 * multiply i = cmul31(&3.int-1,&int,&3.int-2); multiplies <3.int-1> by storing the result in <3.int-2>. The value returned is 0 if there were no overflow, -1 if overflow occurred. CMUL33 * multiply i = cmul33(&3.int-1,&3.int-2,&6.int); multiplies the two triple-precision signed integers to produce a 6-word long result. A value of 0 is returned if the result could have fitted into a triple precision word. Should more then 48 bits be required to express the result, -1 is returned. CDIV31 / divide i = cdiv31(&3.int-1,int-1,&3.int-3,&int-2); divides <3.int-1> by , storing the quotient in <3.int-2> and the remainder in . Divide-by-zero is indicated by a -1 value returned. Otherwise 0 is returned. CVLLIB C Interface Manual Page 8-2 Triple Precision Arithmetic CDIV33 / divide i = cdiv33(&3.int-1,&3.int-2,&3.int-3,&3.int-4); divides <3.int-1> by <3.int-2>, storing the quotient in <3.int-3> and the remainder in <3.int-4>. Divide-by-zero is shown by a value of -1 returned. Otherwise 0 is returned. CCMP3 Compare two triple-precision numbers i = ccmp3(&3.int-1,&3.int-2); provides a means of signed comparison between two triple precision values. The value returned is 0 if <3.int-1><3.int-2>, 1 if and -1 if . CADD3 Triple-precision addition i = cadd3(&3.int-1,&3.int-2,&3.int-3); adds <3.int-1> and <3.int-2>, storing the result in <3.int-3>. A value of 0 is returned unless overflow occurs, in which case a negative value is returned. CSUB3 Triple-precision subtraction i = csub3(&3.int-1,&3.int-2,&3.int-3); subtracts <3.int-1> from <3.int-2>, storing the result in <3.int-3>. A value of 0 is returned unless overflow occurs, in which case a negative value is returned. CNEG3 Negate a triple-precision integer cneg3(&3.int); negates the value contained in the 3 words of <3.int>. CVLLIB C Interface Manual Page 8-3 Triple Precision Arithmetic CMOV3 Move a triple-precision integer cmov3(&3.int-1,&3.int-2) Moves the three words comprising <3.int-1> into the three words starting at <3.int-2>. CHAPTER 9 Double Precision Money Format Money values are internally stored as an integral number of cents. They are output as $ddd.cc (eg 3680 becomes $36.80), optionally with the floating dollar sign (routines with "D" in the name). On output negative numbers will have the minus sign before the leading dollar. On input, numbers may be preceded by a dollar sign and/or a minus sign for negative numbers. This may come before or after the dollar sign. Spaces may precede the dollar sign, or come between the dollar sign and the number itself. On input, a number with no decimal point will be taken as dollars only. Thus $4 produces 400. A number with only one digit after the decimal point will be taken in the arithmetic sense of that decimal fraction of a dollar - ie $3.5 becomes 350. Scanning of the input line stops either at an invalid character or after two digits have been read after the decimal point. 9.1 Double Precision Money Routines: For details of , see chapter 1. CWMPT Write d/precis money to terminal, specif # places cwmpt(long,nplaces); or cwmdpt(long,nplaces); writes to the terminal as a money value in cents, eg 4502 becomes "$45.02", to a minimum of characters, right-justified, filled with spaces. CWMDPT - Provides a leading dollar sign CWMPT - No leading dollar CVLLIB C Interface Manual Page 9-2 Double Precision Money Format CWMT Write d/precis money to terminal cwmt(long); or cwmdt(long); writes to the terminal as a money value in cents. CWMDT - Provides a leading dollar sign CWMT - No leading dollar CWMP Write d/precis money to string, specif # places cwmp(&strpnt,value,nplaces); or cwmdp(&strpnt,value,nplaces); where is to be written to the string as a signed money value in cents, eg 12345 becomes $123.45, to a minimum of characters, right-justified, filled with spaces. is returned pointing to the terminating null. CWMDP - Provides a leading dollar sign CWMP - No leading dollar CWM Write d/precis money to string. cwm(&strpnt,value); or cwmd(&strpnt,value); where is to be written to the string as a monetary value in cents, eg 13579 becomes $135.79. is left pointing to the terminating null. CWMD - Provides a leading dollar sign CWM - No leading dollar CRMT Read d/precis money value from terminal i = crmt(&strpnt,&long); returns a double-length integer value in and a pointer to the delimiting character in . A leading dollar sign is permitted, and a sign may precede or follow such a dollar. The value returned is in cents. (Note: $3.5 will return 350). CVLLIB C Interface Manual Page 9-3 Double Precision Money Format A value of 0 is returned unless overflow occurred on reading the number, in which case -1 is returned. In this case the scan of the input data will have continued to the end of the digit string. CRM Read d/precis money value from a string i = crm(&strpnt,&value); returns a double-length integer value in . is returned pointing to the delimiting characer. A leading dollar sign is permitted, and a sign may precede or follow such a dollar. The value returned is in cents. (Note: $3.5 will return 350). A value of 0 is returned unless overflow occurred on reading the number, in which case -1 is returned. In this case the scan of the input data will have continued to the end of the digit string. CHAPTER 10 Double Precision Integer I/O Double precision integers are stored with their high order word first (ie lowest address) and their low order word in the second word (higher address). This is the same as the RT11 time format, and the native C format, but the reverse of the format offered in SYSLIB INTEGER*4 support functions. On input, decimal, octal or hexadecimal numbers may be read as signed (31 bits plus sign) two's complement values, or as unsigned (32 bit) values. On output decimal numbers are always signed, octal output may be signed or unsigned, and hexadecimal output is always unsigned. 10.1 Writing Double Precision Integers: For details of , see chapter 1. CWD2PT Write d/precis decimal # to terminal, specif # places cwd2pt(long,nplaces); writes to the terminal as a signed decimal number, to a minimum of characters, right-justified, filled with spaces. CWD2T Write d/precis decimal # to terminal cwd2t(long); writes to the terminal as a double-precision signed decimal number. CVLLIB C Interface Manual Page 10-2 Double Precision Integer I/O CWD2P Write d/precis decimal # to string, specif # places cwd2p(&strpnt,long,nplaces); where is to be written to the string as a double-precision signed decimal number, to a minimum of characters, right-justified, filled with spaces. is returned pointing to the terminating null. CWD2 Write d/precis decimal # to string cwd2(&strpnt,long); where is to be written to the string as a double-precision signed decimal number. is returned pointing to the terminating null. CW82SX Write d/precis octal # to terminal, specif # places cw82sx(long,nplaces); writes to the terminal as a double precision signed octal number, to a minimum of characters, right-justified, filled with spaces. CW82PT Write d/precis octal # to terminal, specif # places cw82pt(long,nplaces); writes to the terminal as an unsigned double precision octal number, to a minimum of characters, right-justified, filled with spaces. CW82ST Write d/precis octal # to terminal cw82st(long); writes to the terminal as a signed double precision octal number. CVLLIB C Interface Manual Page 10-3 Double Precision Integer I/O CW82T Write d/precis octal # to terminal cw82t(long); writes to the terminal as an unsigned double precision octal number. CW82SP Write d/precis octal # to string, specif # places cw82sp(&strpnt,long,nplaces); where is to be written to the string as a double precision signed octal number, to a minimum of characters, right-justified, filled with spaces. is returned pointing to the terminating null. CW82P Write d/precis octal # to string, specif # places cw82p(&strpnt,long,nplaces); where is to be written to the string as an unsigned double precision octal number, to a minimum of characters, right-justified, filled with spaces. is returned pointing to the terminating null. CW82S Write d/precis octal # to string cw82s(&strpnt,long); where is to be written to the string as a double precision signed octal number. is returned pointing to the terminating null. CW82 Write d/precis octal # to string cw82(&strpnt,long); where is to be written to the string as an unsigned double precision octal number. CVLLIB C Interface Manual Page 10-4 Double Precision Integer I/O is returned pointing to the terminating null. CWH2PT Write d/precis hex # to terminal, specif # places cwh2pt(long,nplaces); or cwhl2x(long,nplaces); writes to the terminal as an unsigned double precision hex number, to a minimum of characters, right-justified, filled with spaces. Two entry points are provided: CWH2PT which uses upper case letters A-F, and CWHL2X which uses lower case. CWH2T Write d/precis hexadecimal number to terminal cwh2t(long); writes to the terminal as an unsigned double precision hex number. Two entry points are provided: CWH2T which uses capital letters A-F, and CWHL2T which uses lower case. CWH2P Write d/precis hex # to string, specif # places cwh2p(&strpnt,long,nplaces); where is to be written to the string as an unsigned double precision octal number, to a minimum of characters, right-justified, filled with spaces. is returned pointing to the terminating null. Two entry points are provided: CWH2P which uses upper case A-F, and CWHL2P which uses lower case. CWH2 Write d/precis hexadecimal number to string cwh2(&strpnt,long); where is to be written to the string as an unsigned double precision octal number. CVLLIB C Interface Manual Page 10-5 Double Precision Integer I/O is returned pointing to the terminating null. Two entry points are provided: CWH2 uses upper case letters A-F, and CWHL2 uses lower case. CVLLIB C Interface Manual Page 10-6 Double Precision Integer I/O 10.2 Reading Double Precision Integers: The value returned from the functions below indicated whether or not overflow has occurred. The number itself it put into the address provided in the argument sequence. The value returned from the functions will be zero on a normal return, and -1 if overflow occurred. CRN2T Read Double Integer from terminal i = crn2t(&strpnt,&long); returns a double precision integer from the user's terminal into , returning a pointer to the delimiting character in . The number is taken to be hexadecimal should it contain A-F (or a-f), or if it should be prefixed by a hex prefix character (see chapter 1) or followed by a hex suffix character (ibid). Otherwise it will be taken to be decimal if it contain 8 or 9, or be followed by a decimal point (the decimal point will be read and the character following it will be the delimiting character). Otherwise it will be taken as octal. CRN2 Read Double Integer from string i = crn2(&strpnt,&long); as per CRN2T, reading from the string pointed to by . CRD2ST Read signed decimal d/precis # from terminal i = crd2st(&strpnt,&long); returns a double-length integer value in and a pointer to the delimiting character in . CRD2T Read unsigned decimal d/precis # from terminal i = crd2t(&strpnt,&long); returns a double-length integer value in and a pointer to the delimiting character in . CVLLIB C Interface Manual Page 10-7 Double Precision Integer I/O CRD2S Read signed decimal d/precis # from a string i = crd2s(&strpnt,&long); returns a double-length integer value in . is returned pointing to the delimiting character. CRD2 Read unsigned decimal d/precis # from a string i = crd2(&strpnt,&long); returns a double-length integer value in . is returned pointing to the delimiting character. CR82ST Read signed octal d/precis # from terminal i = cr82st(&strpnt,&long); returns a double-length integer value in and a pointer to the delimiting character in . CR82T Read unsigned octal d/precis # from terminal i = cr82t(&strpnt,&long); returns a double-length integer value in and a pointer to the delimiting character in . CR82S Read signed octal d/precis # from a string i = cr82s(&strpnt,&long); returns a double-length integer value in . is returned pointing to the delimiter. CR82 Read unsigned octal d/precis # from a string i = cr82(&strpnt,&long); returns a double-length integer value in . is returned pointing to the delimiter. CVLLIB C Interface Manual Page 10-8 Double Precision Integer I/O CRH2T Read hexadecimal d/precis # from terminal i = crh2t(&strpnt,&long); returns a double-length integer value in and a pointer to the delimiting character in . CRH2 Read hexadecimal d/precis # from a string i = crh2(&strpnt,&long); returns a double-length integer value in . is returned pointing to the delimiter. CHAPTER 11 Double Precision Arithmetic Whilst C has double precision integer facilities built in, these have been included in the library for 2 reasons: (1) consistency across the three languages catered for by CVLLIB, and (2) these give a useable indication of overflow to the programmer. CMUL22 Double * double signed multiplication i = cmul22(long-1,long-2,&long-3); multiplies by , placing the result in . Overflow is indicated by a returned value of -1 rather than 0. CMUL21 Double * single signed multiplication i = cmul21(long-1,int,&long-2); multiplies by , placing the result in . Overflow is indicated by a returned value of -1 rather than 0. CDIV21 Double / single signed division i = cdiv21(long-1,int-1,&long-2,&int-2); double,single,&doublequotient,&remainder); divides by , placing the quotient in and the remainder in . Divide-by-zero is indicated by a returned value of -1, rather than 0. CHAPTER 12 Single Precision Integer I/O: 12.1 Single Precision Integer Writing Routines: For details of , see chapter 1. CWDSPT write signed decimal no. to terminal cwdspt(number,nplaces) where is the number to be typed, and the minimum number of places to be occupied, the field being left-filled with spaces. Should more places be required, the field is expanded with no error message. CWDPT write unsigned decimal no. to terminal cwdpt(number,nplaces) where is the number to be typed, and the minimum number of places to be occupied, the field being left-filled with spaces. Should more places be required, the field is expanded with no error message. CWDST Write signed decimal number to terminal cwdst(number) Where is the number to be typed with no leading or trailing spaces. CVLLIB C Interface Manual Page 12-2 Single Precision Integer I/O: CWDT Write unsigned decimal number to terminal cwdt(number) Where is the number to be typed with no leading or trailing spaces. CWDSP write signed decimal number into a string cwdsp(&strpnt,number,nplace); Where is the number to be converted into a string, points to the starting position into which data is to be written, and is returned pointing to the terminating null, and is the minimum number of places (left padded with spaces if necessary) to be filled. CWDP write unsigned decimal number into a string cwdp(&strpnt,number,nplace); Where is the number to be converted into a string, points to the starting position into which data is to be written, and is returned pointing to the terminating null, and is the minimum number of places (left padded with spaces if necessary) to be filled. CWDS write signed decimal number into a string cwds(&strpnt,number); Where is the number to be converted into a string, and points to the starting position into which data is to be written, and is returned pointing to the terminating null. CWD write unsigned decimal number into a string cwd(&strpnt,number); Where is the number to be converted into a string, and points to the starting position into which data is to be written, and is returned pointing to the terminating null. CVLLIB C Interface Manual Page 12-3 Single Precision Integer I/O: CW8SPT write signed octal no. to terminal cw8spt(number,nplaces); where is the number to be typed, and the minimum number of places to be occupied, the field being left-filled with spaces. Should more places be required, the field is expanded with no error message. CW8PT write unsigned octal no. to terminal cw8pt(number,nplaces); where is the number to be typed, and the minimum number of places to be occupied, the field being left-filled with spaces. Should more places be required, the field is expanded with no error message. CW8ST write signed octal number to terminal cw8st(number); where is the number to be typed with no leading or trailing spaces CW8T write unsigned octal number to terminal cw8t(number); where is the number to be typed with no leading or trailing spaces CW8SP write signed octal number into a string cw8sp(&strpnt,number,nplace); Where is the number to be converted into a string, points to the starting position into which data is to be written, and is returned pointing to the terminating null, and is the minimum number of places (left padded with spaces if necessary) to be filled. CVLLIB C Interface Manual Page 12-4 Single Precision Integer I/O: CW8P write unsigned octal number into a string cw8p(&strpnt,number,nplace); Where is the number to be converted into a string, points to the starting position into which data is to be written, and is returned pointing to the terminating null, and is the minimum number of places (left padded with spaces if necessary) to be filled. CW8S write signed octal number into a string cw8s(&strpnt,number); Where is the number to be converted into a string, and is a pointer to the starting position into which data is to be written, and is returned pointing to the terminating null. CW8 write signed octal number into a string cw8(&strpnt,number); Where is the number to be converted into a string, points to the starting position into which data is to be written, and is returned pointing to the terminating null. CWHPT write hexadecimal number to terminal cwhpt(number,nplaces); where is the number to be typed, and the minimum number of places to be occupied, the field being left-filled with spaces. Should more places be required, the field is expanded with no error message. Two entry points are provided: CWHPT uses upper case letters A-F, and CWHLPT uses lower case. CVLLIB C Interface Manual Page 12-5 Single Precision Integer I/O: CWHT write hexadecimal number to terminal cwht(number); where is the number to be typed with no leading or trailing spaces. Two entry points are provided: CWHT uses upper case letters A-F, and CWHLT uses lower case. CWHP write hexadecimal number into a string cwhp(&strpnt,number,nplace); Where is the number to be converted into a string, points to the starting position into which data is to be written, and is returned pointing to the terminating null, and is the minimum number of places (left padded with spaces if necessary) to be filled. Two entry points are provided: CWHP uses capital letters A-F, and CWHLP uses lower case. CWH write hexadecimal number into a string cwh(&strpnt,number); Where is the number to be converted into a string, points to the starting position into which data is to be written, and is returned pointing to the terminating null. Two entry points are provided: CWH uses upper case letters A-F, and CWHL uses lower case. CVLLIB C Interface Manual Page 12-6 Single Precision Integer I/O: 12.2 Single Precision Integer Reading Routines: For details of , see chapter 1. Functions return a value of zero normally, and -1 if overflow occurred. The number read is placed into the location whose address is provided in the argument string. Should overflow occur, the scan of the number continues to the end of the digit string. CRNT Read a number (octal, decimal or hex) from the terminal i = crnt(&strpnt,&value); Provides a signed number in . receives a pointer to the delimiter. The number is taken to be hexadecimal should it contain A-F (or a-f), or if it should be prefixed by a hex prefix character or followed by a hex suffix character (see chapter 1). Otherwise it will be taken to be decimal if it contain 8 or 9, or be followed by a decimal point. The decimal point ill be read, and the character following it will be the delimiting character. Otherwise the number will be taken as octal. CRN Read a number (octal, decimal or hex) from a string i = crn(&strpnt,&value); Provides a signed number in . The number is read from the string of ascii characters pointed to by strpnt, which is left pointing to the delimiter. This function is analogous to CRNT. CRDST read signed decimal number from terminal i = crdst(&strpnt,&number); Where is the number returned, and points to the delimiting character. CRDT read unsigned decimal number from terminal i = crdt(&strpnt,&number); Where is the number returned, and receives a pointer to the delimiting character. CVLLIB C Interface Manual Page 12-7 Single Precision Integer I/O: CRDS read signed decimal number from string i = crds(&strpnt,&number); Where receives the number read, and points to the string to be decoded (and is returned pointing to the delimiter). CRD read unsigned decimal number from string i = crd(&strpnt,&number); Where receives the number read, and points to the string to be decoded (and is returned pointing to the delimiter). CR8ST read signed octal number from terminal i = cr8st(&strpnt,&number); Where is the number returned, and receives a pointer to the delimiting character. CR8T read unsigned octal number from terminal i = cr8t(&strpnt,&number); Where is the number returned, and receives a pointer to the delimiting character. CR8S read signed octal number from string i = cr8s(&strpnt,&number); Where receives the number read, points to the string to be decoded and returns containing a pointer to the delimiting character. CVLLIB C Interface Manual Page 12-8 Single Precision Integer I/O: CR8 read unsigned octal number from string i = cr8(&strpnt,&number); Where receives the number read, points to the string to be decoded and is returned pointing to the delimiting character. CRHT read unsigned octal number from terminal i = crht(&strpnt,&number); Where is the number returned, and receives a pointer to the delimiting character. CRH read hexadecimal number from string i = crh(&strpnt,&number); Where receives the number read, points to the string to be decoded and is returned pointing to the delimiting character. CHAPTER 13 Length Conversion Routines CC12 Convert single to double precision long=CC12(single); converts the single-precision integer into a double-precision integer in (high order word first). CC13 Convert single-precision to triple-precision CC13(single,&triple) converts the single-precision integer into a triple-precision integer stored in , high-order word first. CC23 Convert double to triple precision CC23(double,&triple) converts a double-precision integer in (high order word first) into a triple-precision integer in (ibid). CC32 Convert triple-precision to double-precision i = CC32(&triple,&double) converts the triple-precision integer in (highest order word first) to a double precision integer in (ibid). Should it be impossible to fit the value contained in into a double-precision word, the function returns the value -1. Normally 0 will be returned. CVLLIB C Interface Manual Page 13-2 Length Conversion Routines CC31 Convert triple-precision to single i = CC31(&triple,&single) converts a triple-precision integer in (highest-order word first) into a single-precision integer in . Should it not be possible to confine the value in into a single-precision word, this function returns the value -1. Otherwise 0 is returned. CC21 Convert double to single precision i = CC21(long,&int); converts the double-precision integer in (high-order word first) to a single-precision integer in . Normally the value returned by the function will be zero. Should it be impossible to fit the value in the double-precision word into a single-precision word the returned value will be -1. CHAPTER 14 String Comparison Routines CSCG String Compare (General) i = cscg(&string1,&string2,&integer); compares the strings and returning the value -1 if the first string < the second string 0 if the first string = the second string and 1 if the first string > the second string. receives the last character compared in , trimmed to 7 bits. If the strings exactly match, this will be zero. Upper and lower case alphabetic characters are taken to be the same, and the parity bit is ignored. To match, the strings must be the same length. CSCX String Compare (Exact) i = cscx(&string1,&string2,&integer); compares the strings and , returning the value -1 if the first string < the second string 0 if the first string = the second string and 1 if the first string > the second string. receives the last character compared in , trimmed to 7 bits. If the strings exactly match, this will be zero. Upper and lower case alphabetic characters are taken to be different, but the parity bit is ignored. To match, the strings must be the same length. CVLLIB C Interface Manual Page 14-2 String Comparison Routines CSCGV String Compare (General, Differing Lengths) i = cscgv(&string1,&string2,&integer); compares the strings and , returning the value -1 if the first string < the second string 0 if the first string = the second string and 1 if the first string > the second string. receives the last character compared in , trimmed to 7 bits. If the strings exactly match, this will be zero. Upper and lower case alphabetic characters are taken to be the same, and the parity bit is ignored. The first string may be shorter than the second string, and as long as all the characters up to the end of the first string match, equality will be returned. CSCXV String Compare (Exact, Differing Lengths) i = cscxv(&string1,&string2,&integer); compares the strings and returning the value -1 if the first string < the second string 0 if the first string = the second string and 1 if the first string > the second string. receives the last character compared in , trimmed to 7 bits. If the strings exactly match, this will be zero. Upper and lower case alphabetic characters are taken to be different, but the parity bit is ignored. The first string may be shorter than the second string, and as long as all the characters up to the end of the first string match, equality will be returned. CHAPTER 15 Additional Routines: For details of , see chapter 1. CWAT Write an ASCII character to the terminal cwat(character); sends the relevant character to the user's terminal. If the character be a control character, it is sent in the form "", with the name and the octal value of the character concerned. The more common characters (tab [rather than "ht"], lf,ff,cr, esc, and rubout [rather than "del"] do not get their octal values printed. Characters with the parity bit set are sent in the form "<200+>". CWA Write an ASCII character cwa(&strpnt,character); sends the relevant character to the string. If the character be a control character, it is sent in the form "", with the name and the octal value of the character concerned. The more common characters (tab [rather than "ht"], lf,ff,cr, esc, and rubout [rather than "del"] do not get their octal values printed. Characters with the parity bit set are sent in the form "<200+>". is left pointing to the terminating null. CYES Read Yes or other answer from terminal i = cyes(); Waits for a line from the user, and returns the value 0 if the first character of the user's line were "Y" or "y". Otherwise returns the value -1. CVLLIB C Interface Manual Page 15-2 Additional Routines: CYESNO Read Yes or No answer from terminal i = cyesno(); Waits for a line from the user, and returns the value 0 if the first character of the user's line were "Y" or "y". Returns -1 if the first character were "N" or "n". For any other response it prompts the user to try again. CTLIN Get a line from the terminal i = ctlin(&string,&strpnt); Commences at STRING, providing a null-terminated (not ) line, and setting to be a pointer to the terminating null or control C. Returns a value 0 if the line was not terminated by C, and -1 if it was. The C character is available in the line for the user. CGTLIN - Read a terminal line from a C programme cgtlin(&line,&prompt); As per CTLIN, but uses a .GTLIN request to allow tracking of command files. is a prompt to the user, and may be zero if not required. For example: cgtlin(&line,"Command:\200"); cgtlin(&line,0); CCHR Type characters to terminal cchr(number,char1[,char-2, ... ,char-n]); types each as a single character to the terminal. An indefinite number of arguments is permitted. CCHR1 Type a character cchr1(chr); types the single character only. CVLLIB C Interface Manual Page 15-3 Additional Routines: CPRINT Printing String cprint("This is a prompt\200"); types a string to the user's terminal. TCRLF Print a tcrlf(); Types a carriage-return and a line-feed to the user's terminal. This routine may be called from Macro, Fortran, or C. TUC Upper case from terminal tuc(); Clears bit in Job Status Word which allows lower case from the user's terminal, thereby forcing upper case input. This routine may be called from Macro, Fortran, or C. TLC Lower case from terminal tlc(); Sets bit in Job Status Word which allows lower case from the user's terminal, thereby allowing lower case input. This routine may be called from Macro, Fortran or C. TSPM Special Mode for terminal tspm(); Sets bit in Job Status Word which allows for special mode input from the user's terminal - ie single character input without echo. This routine may be called from Macro, Fortran or C. CVLLIB C Interface Manual Page 15-4 Additional Routines: TNSPM Revert from special mode tnspm(); Clears bit in Job Status Word (converse of TSPM) resetting the user's terminal back to echoing and reading line by line. This routine may be called from Macro, Fortran, or C. TNIOW No I/O Wait for Terminal tniow(); Sets bit in Job Status Word allowing immediate return for .TTINR (read a single character from the terminal) routines when using the Foreground Background RT-11 monitor. This allows the user to test for availability of terminal input. This routine may be called from Macro, Fortran, or C. TIOW I/O Wait from Terminal tiow(); This is the converse of TNIOW, allowing RT11 to place the job in a wait state until terminal input is available. This routine may be called from Macro, Fortran, or C. CIRAN Return a random number i = ciran(n); and crnset(N); CIRAN returns a random integer from 0 to , and CRNSET(n) is used to initialize the random seed to (though this will not be value returned) CLTRIM Skip over leading spaces & tabs cltrim(&strpnt); updates to point past any spaces or tabs. CVLLIB C Interface Manual Page 15-5 Additional Routines: CRTRIM Delete trailing spaces & tabs crtrim(&strpnt); decrements the string pointer such that the character before the one pointed to is neither a space nor a tab. CSCOP Copy a string. cscop(&strpnt1,&strpnt2); Copies the string pointed to in into the string pointed to in . Parity bits are cleared, and the first string may be null or <200> terminated. is left pointing to the next available (and also cleared to 0) byte. CSWSET Provides access to JSW bits from C cswset(bits) to set appropriate bits, and & cswclr(bits) to clear bits. CDIG3 Provide 3 digit Radix50 from Number i = cdig3(nvalue,&irvalue); returns with i=0 if all was well, -1 if the value provided in were above 999. Takes the value in and converts it into the radix50 representation of that number, in three digits, with leading zeroes, and returns it in . CHAPTER 16 Ancillary Routines: CSVR Register save & restore CSVR saves registers R2-R4, then calls where it was called from as a subroutine and upon return from there restores the registers. CSVR is included with the general section of CVLLIB, as it is required by the C routines in the REAL portion of the library also. The C library CSV$ is unsuitable for use with CVLLIB as it requires a JMP CRET$ return rather than an RTS PC. A global CARG is defined within CSVR, defining the offset required for the routine to use arguments from the stack. CW$2T - Common pathway for CWx2T or CWx2PT The register saving routine CSVR should have been called before calling this routine. The calling sequence is CALL CWx2T (or CWx2PT) .WORD
Return is made not to this call but to the original calling sequence. CW$2 - Common pathway for CWx2 and CWx2P The register saving routine CSVR should have been called before calling this routine. The calling sequence is CALL CW$2 (or CW$2P) .WORD
CVLLIB C Interface Manual Page 16-2 Ancillary Routines: Return is made not to this call but to the original calling sequence. CW$P - Common pathway for CWxP The register saving routine CSVR should have been called before this routine. The calling sequence is CALL LW$P .WORD
Return is made not to this call but to the original calling sequence. CR$2 - Common pathway for CRx2 & CRx2T The register saving routine CSVR should have been called before calling this routine. CR$2 and CR$2T have been placed in CVGLIB as they are called by the C floating point routines. The calling sequence is CALL CR$2 (or CR$2T) .WORD
Return is made not to this call but to the original calling sequence. CR$ - Common pathway for CRx The register saving routine CSVR should have been called before this routine. The calling sequence is CALL CR$ .WORD
Return is made not to this call but to the original calling sequence. CVLLIB C Interface Manual Page 16-3 Ancillary Routines: CW$ADJ Common pathways for string output The register saving routine CSVR should have been called before the call to this routine. CW$ADJ has been placed in CVGLIB as it is used by the C floating point routines. CW$ADJ should be entered with a pointer to the routine to be used on the stack, and registers other than R1 (string pointer) already set up. It sets up the string pointer, calls the routine, clears the next byte, then adjusts strpnt. APPENDIX I Index References in this index: int single precision integer long double precision integer 3.int triple precision integer 3.int . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 <3.int> . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Add 3.int's - CADD3 . . . . . . . . . . . . . . . . . . . . 8-2 Age calculation - CAGE . . . . . . . . . . . . . . . . . . . 3-6 American Date Format . . . . . . . . . . . . . . . . . . . . 3-1 Ancillary Routines . . . . . . . . . . . . . . . . . . . . . 16-1 Argument offset - CARG . . . . . . . . . . . . . . . . . . . 16-1 Argument Patterns . . . . . . . . . . . . . . . . . . . . . 1-1 Arithmetic Routines - Double Precision . . . . . . . . . . . 11-1 Arithmetic Routines - Triple Precision . . . . . . . . . . . 8-1 Ascii - write 1 char to terminal - CWAT . . . . . . . . . . 15-1 Ascii - write 1 character to string - CWA . . . . . . . . . 15-1 British Date Format . . . . . . . . . . . . . . . . . . . . 3-1 Buffering & I/O from Terminal . . . . . . . . . . . . . . . 2-3 Buffers for Terminal . . . . . . . . . . . . . . . . . . . . 1-1 CADD3 - Add 3.int's . . . . . . . . . . . . . . . . . . . . 8-2 CAGE - Calculate age . . . . . . . . . . . . . . . . . . . . 3-6 CALEND Common Block . . . . . . . . . . . . . . . . . . . . 2-1 CARG - Argument offset . . . . . . . . . . . . . . . . . . . 16-1 CC12 - Convert int to long . . . . . . . . . . . . . . . . . 13-1 CC13 - Convert int to 3.int . . . . . . . . . . . . . . . . 13-1 CVLLIB C Interface Manual Page I-2 CC21 - Convert long to int . . . . . . . . . . . . . . . . . 13-2 CC23 - Convert long to 3.int . . . . . . . . . . . . . . . . 13-1 CC31 - Convert 3.int to int . . . . . . . . . . . . . . . . 13-2 CC32 - Convert 3.int to long . . . . . . . . . . . . . . . . 13-1 CC50A - Convert radix50 to ascii . . . . . . . . . . . . . . 5-7 CCA50 - Convert ascii to radix50 . . . . . . . . . . . . . . 5-7 CCHR - Type characters to terminal . . . . . . . . . . . . . 15-2 CCHR1 - Type 1 character to terminal . . . . . . . . . . . . 15-2 CCMP3 - Compare 3.int's . . . . . . . . . . . . . . . . . . 8-2 CCRDW - Convert RT11 date to words . . . . . . . . . . . . . 3-6 CCRTW - Convert RT11 time to integers . . . . . . . . . . . 4-4 CCWDR - Convert integer date to RT11 format . . . . . . . . 3-6 CCWTR - Convert integer time to RT11 format . . . . . . . . 4-4 CDIG3 - Provide 3 digit radix50 from number . . . . . . . . 15-5 CDIV21 - Divide long by int . . . . . . . . . . . . . . . . 11-1 CDIV31 - Divide 3.int by int . . . . . . . . . . . . . . . . 8-1 CDIV33 - Divide 3.int by 3.int . . . . . . . . . . . . . . . 8-2 CDTCAL - Calculate date from Year and Day of Year . . . . . 3-5 CDTDIF - Calculate difference between dates . . . . . . . . 3-5 CGTLIN - Read line from terminal . . . . . . . . . . . . . . 15-2 Character to terminal - CCHR1 . . . . . . . . . . . . . . . 15-2 Characters to terminal - CCHR . . . . . . . . . . . . . . . 15-2 CIDAY - Return day of week given date . . . . . . . . . . . 3-6 CIRAN - Get random number . . . . . . . . . . . . . . . . . 15-4 CLTRIM - Trim leading spaces or tabs . . . . . . . . . . . . 15-4 CMOV3 - Move a 3.int . . . . . . . . . . . . . . . . . . . . 8-3 CMUL21 - multiply long by int . . . . . . . . . . . . . . . 11-1 CMUL22 - multiply longs . . . . . . . . . . . . . . . . . . 11-1 CMUL31 - multiply 3.int by int . . . . . . . . . . . . . . . 8-1 CMUL33 - multiply 3.int by 3.int . . . . . . . . . . . . . . 8-1 CNEG3 - Negate a 3.int . . . . . . . . . . . . . . . . . . . 8-2 Command File Tracking . . . . . . . . . . . . . . . . . . . 2-3 Common pathway for CRx - CR$ . . . . . . . . . . . . . . . . 16-2 Common pathway for CRx2, CRx2T - CR$2 . . . . . . . . . . . 16-2 Common pathway for CWx2, CWx2P - CW$2 . . . . . . . . . . . 16-1 Common pathway for CWx2T, CWx2PT - CW$2T . . . . . . . . . . 16-1 Common pathway for CWxP - CW$P . . . . . . . . . . . . . . . 16-2 Common pathway for string output - CW$ADJ . . . . . . . . . 16-3 Compare 3.int's - CCMP3 . . . . . . . . . . . . . . . . . . 8-2 Comparison of Strings . . . . . . . . . . . . . . . . . . . 14-1 Conventions for Hex numbers . . . . . . . . . . . . . . . . 1-2 Conversion between integers of various lengths . . . . . . . 13-1 Convert 3.int to int . . . . . . . . . . . . . . . . . . . . 13-2 Convert 3.int to long - CC32 . . . . . . . . . . . . . . . . 13-1 Convert ascii to radix50 - CCA50 . . . . . . . . . . . . . . 5-7 Convert date (integers) to RT11 format - CCWDR . . . . . . . 3-6 Convert int to 3.int - CC13 . . . . . . . . . . . . . . . . 13-1 Convert int to long - CC12 . . . . . . . . . . . . . . . . . 13-1 Convert long to 3.int - CC23 . . . . . . . . . . . . . . . . 13-1 Convert long to int - CC21 . . . . . . . . . . . . . . . . . 13-2 Convert radix50 to ascii - CC50A . . . . . . . . . . . . . . 5-7 Convert RT11 date to words . . . . . . . . . . . . . . . . . 3-6 Convert RT11 time to integers - CCRTW . . . . . . . . . . . 4-4 Convert time (integers) to RT11 format - CCWTR . . . . . . . 4-4 CVLLIB C Interface Manual Page I-3 Copy strings - CSCOP . . . . . . . . . . . . . . . . . . . . 15-5 CPRINT - Type string to terminal . . . . . . . . . . . . . . 15-3 CR$ - Common pathway for CRx . . . . . . . . . . . . . . . . 16-2 CR$2 - Common pathway for CRx2, CRx2T . . . . . . . . . . . 16-2 CR50 - Read radix50 from string . . . . . . . . . . . . . . 5-6 CR50F - Read radix50 filename set from string . . . . . . . 5-6 CR50FT - Read radix50 filename set from terminal . . . . . . 5-5 CR50S - Read radix50 symbol set from string . . . . . . . . 5-5 CR50ST - Read radix50 symbol set from terminal . . . . . . . 5-5 CR50T - Read radix50 from terminal . . . . . . . . . . . . . 5-6 CR8 - Read octal unsigned from string . . . . . . . . . . . 12-8 CR82 - Read long octal from string . . . . . . . . . . . . . 10-7 CR82S - Read long octal from string . . . . . . . . . . . . 10-7 CR82ST - Read long octal from terminal . . . . . . . . . . . 10-7 CR82T - Read long octal from terminal . . . . . . . . . . . 10-7 CR8S - Read octal signed from string . . . . . . . . . . . . 12-7 CR8ST - Read octal signed from terminal . . . . . . . . . . 12-7 CR8T - Read octal unsigned from terminal . . . . . . . . . . 12-7 CRD - Read decimal unsigned from string . . . . . . . . . . 12-7 CRD2 - Read long decimal from string . . . . . . . . . . . . 10-7 CRD2S - Read long decimal from string . . . . . . . . . . . 10-7 CRD2ST - Read long decimal from terminal . . . . . . . . . . 10-6 CRD2T - Read long decimal from terminal . . . . . . . . . . 10-6 CRD3 - Read 3.int from string . . . . . . . . . . . . . . . 7-2 CRD3T - Read 3.int from terminal . . . . . . . . . . . . . . 7-2 CRDAT - Read date from string . . . . . . . . . . . . . . . 3-5 CRDATT - Read date from terminal . . . . . . . . . . . . . . 3-4 CRDS - Read decimal signed from string . . . . . . . . . . . 12-7 CRDST - Read decimal signed from terminal . . . . . . . . . 12-6 CRDT - Read decimal unsigned from terminal . . . . . . . . . 12-6 CRF - Read filename from string . . . . . . . . . . . . . . 5-4 CRFD - Read filename with defaults from string . . . . . . . 5-3 CRFDT - Read filename with defaults from terminal . . . . . 5-3 CRFT - Read filename from terminal . . . . . . . . . . . . . 5-3 CRH - Read hex from string . . . . . . . . . . . . . . . . . 12-8 CRH2 - Read long hex from string . . . . . . . . . . . . . . 10-8 CRH2T - Read long hex from terminal . . . . . . . . . . . . 10-8 CRHT - Read octal unsigned from terminal . . . . . . . . . . 12-8 CRM - Read money from string . . . . . . . . . . . . . . . . 9-3 CRM3 - Read 3.precis money from string . . . . . . . . . . . 6-3 CRM3T - Read 3.precis money from terminal . . . . . . . . . 6-3 CRMT - Read money from terminal . . . . . . . . . . . . . . 9-2 CRN - Read oct, dec or hex from string . . . . . . . . . . . 12-6 CRN2 - Read long from string . . . . . . . . . . . . . . . . 10-6 CRN2T - Read long from terminal . . . . . . . . . . . . . . 10-6 CRNSET - Set random number seed . . . . . . . . . . . . . . 15-4 CRNT - Read oct, dec or hex from terminal . . . . . . . . . 12-6 CRSDAT - Read system date into dateblock . . . . . . . . . . 3-4 CRSTIM - Read system time into timeblock . . . . . . . . . . 4-3 CRTIM - Read time from string . . . . . . . . . . . . . . . 4-3 CRTIMT - Read time from terminal . . . . . . . . . . . . . . 4-3 CRTRIM - Trim trailing spaces or tabs . . . . . . . . . . . 15-5 CSCG - String compare, general . . . . . . . . . . . . . . . 14-1 CSCGV - string compare, general, diff lengths . . . . . . . 14-2 CVLLIB C Interface Manual Page I-4 CSCOP - Copy strings . . . . . . . . . . . . . . . . . . . . 15-5 CSCX - String compare, exact . . . . . . . . . . . . . . . . 14-1 CSCXV - String compare, exact, diff lengths . . . . . . . . 14-2 CSUB3 - Subtract 3.int's . . . . . . . . . . . . . . . . . . 8-2 CSVR - Register Save & Restore . . . . . . . . . . . . . . . 16-1 CSWCLR - Clear JSW bits . . . . . . . . . . . . . . . . . . 15-5 CSWSET - Set JSW bits . . . . . . . . . . . . . . . . . . . 15-5 CTLIN - Read line from terminal . . . . . . . . . . . . . . 15-2 CTODAT - Write today's day & date to TTY . . . . . . . . . . 3-2 CTODAY - Write today's day & date to string . . . . . . . . 3-2 CW$2 - Common pathway for CWx2, CWx2P . . . . . . . . . . . 16-1 CW$2T - Common pathway for CWx2T, CWx2PT . . . . . . . . . . 16-1 CW$ADJ - Common pathway for string output . . . . . . . . . 16-3 CW$P - Common pathway for CWxP . . . . . . . . . . . . . . . 16-2 CW50 - Write radix50 to string . . . . . . . . . . . . . . . 5-5 CW50F - Write radix50 (filename set) to string . . . . . . . 5-4 CW50FT - Write radix50 (filename set) to terminal . . . . . 5-4 CW50T - Write radix50 to terminal . . . . . . . . . . . . . 5-5 CW8 - Write octal signed to string . . . . . . . . . . . . . 12-4 CW82 - Write long octal to string . . . . . . . . . . . . . 10-3 CW82P - Write long octal to string, spec field . . . . . . . 10-3 CW82PT - Write long octal to terminal, spec field . . . . . 10-2 CW82S - Write long octal to string . . . . . . . . . . . . . 10-3 CW82SP - Write long octal to string, spec field . . . . . . 10-3 CW82ST - Write long octal to terminal . . . . . . . . . . . 10-2 CW82SX - Write long octal to terminal, spec field . . . . . 10-2 CW82T - Write long octal to terminal . . . . . . . . . . . . 10-3 CW8P - Write octal unsigned to string, spec field . . . . . 12-4 CW8PT - Write octal unsigned to terminal, spec field . . . . 12-3 CW8S - Write octal signed to string . . . . . . . . . . . . 12-4 CW8SP - Write octal signed to string, spec field . . . . . . 12-3 CW8SPT - Write octal signed to terminal, spec field . . . . 12-3 CW8ST - Write octal signed to terminal . . . . . . . . . . . 12-3 CW8T - Write octal unsigned to terminal . . . . . . . . . . 12-3 CWA - Write an ascii character to string . . . . . . . . . . 15-1 CWAT - Write an Ascii character to the terminal . . . . . . 15-1 CWD - Write decimal unsigned to string . . . . . . . . . . . 12-2 CWD2 - Write long decimal to string . . . . . . . . . . . . 10-2 CWD2P - Write long decimal to string, spec field . . . . . . 10-2 CWD2PT - Write long decimal to terminal, spec field . . . . 10-1 CWD2T - Write long decimal to terminal . . . . . . . . . . . 10-1 CWD3 - Write 3.int to string . . . . . . . . . . . . . . . . 7-2 CWD3P - Write 3.int to string, spec field . . . . . . . . . 7-2 CWD3PT - Write 3.int to terminal, spec field . . . . . . . . 7-1 CWD3T - Write 3.int to terminal . . . . . . . . . . . . . . 7-1 CWDAT - Write date to string . . . . . . . . . . . . . . . . 3-4 CWDATT - Write date to terminal . . . . . . . . . . . . . . 3-3 CWDAY - Write name of day to string . . . . . . . . . . . . 3-2 CWDAYT - Write name of day to terminal . . . . . . . . . . . 3-2 CWDP - Write decimal unsigned to string . . . . . . . . . . 12-2 CWDPT - Write decimal unsigned to terminal, spec field . . . 12-1 CWDS - Write decimal signed to string . . . . . . . . . . . 12-2 CWDSP - Write decimal signed to string . . . . . . . . . . . 12-2 CWDSPT - Write decimal signed to terminal, spec field . . . 12-1 CVLLIB C Interface Manual Page I-5 CWDST - Write decimal signed to terminal . . . . . . . . . . 12-1 CWDT - Write decimal unsigned to terminal . . . . . . . . . 12-2 CWF - Write filename to terminal . . . . . . . . . . . . . . 5-2 CWFT - write filename to terminal . . . . . . . . . . . . . 5-2 CWH - Write hex to string . . . . . . . . . . . . . . . . . 12-5 CWH2 - Write long hex to string . . . . . . . . . . . . . . 10-4 CWH2P - Write long hex to string, spec field . . . . . . . . 10-4 CWH2PT - Write long hex to terminal, spec field . . . . . . 10-4 CWH2T - Write long hex to terminal . . . . . . . . . . . . . 10-4 CWHL - Write hex to string . . . . . . . . . . . . . . . . . 12-5 CWHL2 - Write long hex to string . . . . . . . . . . . . . . 10-4 CWHL2P - Write long hex to string, spec field . . . . . . . 10-4 CWHL2T - Write long hex to terminal . . . . . . . . . . . . 10-4 CWHL2X - Write long hex to terminal, spec field . . . . . . 10-4 CWHLP - Write hex to string, spec field . . . . . . . . . . 12-5 CWHLPT - Write hex to terminal . . . . . . . . . . . . . . . 12-4 CWHLT - Write hex to terminal . . . . . . . . . . . . . . . 12-5 CWHP - Write hex to string, spec field . . . . . . . . . . . 12-5 CWHPT - Write hex to terminal . . . . . . . . . . . . . . . 12-4 CWHT - Write hex to terminal . . . . . . . . . . . . . . . . 12-5 CWM - Write money to string . . . . . . . . . . . . . . . . 9-2 CWM3 - Write 3.precis money to string . . . . . . . . . . . 6-2 CWM3D - Write 3.precis money to string . . . . . . . . . . . 6-2 CWM3DP - Write 3.precis money to string . . . . . . . . . . 6-2 CWM3DT - Write 3.precis money to terminal . . . . . . . . . 6-2 CWM3DX - Write 3.precis money to terminal . . . . . . . . . 6-1 CWM3P - Write 3.precis money to string . . . . . . . . . . . 6-2 CWM3PT - Write 3.precis money to terminal . . . . . . . . . 6-1 CWM3T - Write 3.precis money to terminal . . . . . . . . . . 6-2 CWMD - Write money to string . . . . . . . . . . . . . . . . 9-2 CWMDP - Write money to string, spec field . . . . . . . . . 9-2 CWMDPT - Write money to terminal, spec field . . . . . . . . 9-1 CWMDT - Write money to terminal . . . . . . . . . . . . . . 9-2 CWMP - Write money to string, spec field . . . . . . . . . . 9-2 CWMPT - Write money to terminal, spec field . . . . . . . . 9-1 CWMT - Write money to terminal . . . . . . . . . . . . . . . 9-2 CWSDAT - Write system date to string . . . . . . . . . . . . 3-3 CWSDTT - Write system date to terminal . . . . . . . . . . . 3-3 CWSTIM - Write system time to string . . . . . . . . . . . . 4-2 CWSTMT - Write system time to terminal . . . . . . . . . . . 4-2 CWTIM - Write time to string . . . . . . . . . . . . . . . . 4-2 CWTIMT - Write time to terminal . . . . . . . . . . . . . . 4-2 CYES - Read Yes or other answer from terminal . . . . . . . 15-1 CYESNO - Read Yes or No answer from terminal . . . . . . . . 15-2 Date - age calculation - CAGE . . . . . . . . . . . . . . . 3-6 Date - Calculate from Year and Day of Year - CDTCAL . . . . 3-5 Date - convert integer date to RT11 format - CCWDR . . . . . 3-6 Date - convert RT11 date to words - CCRDW . . . . . . . . . 3-6 Date - day of week from date - CIDAY . . . . . . . . . . . . 3-6 Date - difference between two dates - CDTDIF . . . . . . . . 3-5 Date - read from string - CRDAT . . . . . . . . . . . . . . 3-5 Date - read from terminal - CRDATT . . . . . . . . . . . . . 3-4 Date - Read system date into dateblock - CRSDAT . . . . . . 3-4 CVLLIB C Interface Manual Page I-6 Date - write system date to string - CWSDAT . . . . . . . . 3-3 Date - write system date to terminal - CWSDTT . . . . . . . 3-3 Date - write to string - CWDAT . . . . . . . . . . . . . . . 3-4 Date - write to terminal - CWDATT . . . . . . . . . . . . . 3-3 Date Blocks . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Date Formats . . . . . . . . . . . . . . . . . . . . . . . . 3-1 Date Routines . . . . . . . . . . . . . . . . . . . . . . . 3-2 Day & date - Write to string - CTODAT . . . . . . . . . . . 3-2 Day & date - Write to TTY - CTODAT . . . . . . . . . . . . . 3-2 Day - write to string - CWDAY . . . . . . . . . . . . . . . 3-2 Day - write to terminal - CWDAYT . . . . . . . . . . . . . . 3-2 Day of week from date - CIDAY . . . . . . . . . . . . . . . 3-6 Difference between dates - CDTDIF . . . . . . . . . . . . . 3-5 Divide 3.int by 3.int . . . . . . . . . . . . . . . . . . . 8-2 Divide 3.int by int . . . . . . . . . . . . . . . . . . . . 8-1 Divide long by int . . . . . . . . . . . . . . . . . . . . . 11-1 Double Precision Arithmetic . . . . . . . . . . . . . . . . 11-1 Double precision division - CDIV21 . . . . . . . . . . . . . 11-1 Double Precision Integers . . . . . . . . . . . . . . . . . 10-1 Double Precision Integers - Reading . . . . . . . . . . . . 10-6 Double Precision Integers - Writing . . . . . . . . . . . . 10-1 Double Precision Money Format . . . . . . . . . . . . . . . 9-1 Double Precision Money Routines . . . . . . . . . . . . . . 9-1 Double precision multiply - CMUL21 . . . . . . . . . . . . . 11-1 Double precision multiply - CMUL22 . . . . . . . . . . . . . 11-1 File I/O (unimplemented) . . . . . . . . . . . . . . . . . . 2-2 Filename & Radix50 Formats . . . . . . . . . . . . . . . . . 5-1 Filename - read from string - CRF . . . . . . . . . . . . . 5-4 Filename - read from terminal - CRFT . . . . . . . . . . . . 5-3 Filename - read with defaults from string - CRFD . . . . . . 5-3 Filename - read with defaults from terminal - CRFDT . . . . 5-3 Filename - write to terminal - CWF . . . . . . . . . . . . . 5-2 Filename - write to terminal - CWFT . . . . . . . . . . . . 5-2 Filename Blocks . . . . . . . . . . . . . . . . . . . . . . 2-2 Filename Routines . . . . . . . . . . . . . . . . . . . . . 5-2 Flag Values . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Formats for Dates . . . . . . . . . . . . . . . . . . . . . 3-1 General Details . . . . . . . . . . . . . . . . . . . . . . 1-1 GTLIN usage . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Hex prefix HEXPRE . . . . . . . . . . . . . . . . . . . . . 1-2 Hex suffix HEXSUF . . . . . . . . . . . . . . . . . . . . . 1-2 Hexadecimal Conventions . . . . . . . . . . . . . . . . . . 1-2 I/O from Terminal . . . . . . . . . . . . . . . . . . . . . 2-3 I/O Wait on TTY - TNIOW & TIOW . . . . . . . . . . . . . . . 15-4 int . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Integer - Double Precision Arithmetic . . . . . . . . . . . 11-1 Integer - read 3.int from string - CRD3 . . . . . . . . . . 7-2 Integer - read 3.int from terminal - CRD3T . . . . . . . . . 7-2 Integer - read decimal signed from string - CRDS . . . . . . 12-7 Integer - read decimal signed from terminal - CRDST . . . . 12-6 CVLLIB C Interface Manual Page I-7 Integer - read decimal unsigned from string - CRD . . . . . 12-7 Integer - read decimal unsigned from terminal - CRDT . . . . 12-6 Integer - read hex from string - CRH . . . . . . . . . . . . 12-8 Integer - read long decimal from string - CRD2 . . . . . . . 10-7 Integer - read long decimal from string - CRD2S . . . . . . 10-7 Integer - read long decimal from terminal - CRD2ST . . . . . 10-6 Integer - read long decimal from terminal - CRD2T . . . . . 10-6 Integer - read long from string - CRN2 . . . . . . . . . . . 10-6 Integer - read long from terminal - CRN2T . . . . . . . . . 10-6 Integer - read long hex from string - CRH2 . . . . . . . . . 10-8 Integer - read long hex from terminal - CRH2T . . . . . . . 10-8 Integer - read long octal from string - CR82 . . . . . . . . 10-7 Integer - read long octal from string - CR82S . . . . . . . 10-7 Integer - Read long octal from terminal - CR82ST . . . . . . 10-7 Integer - read long octal from terminal - CR82T . . . . . . 10-7 Integer - read oct, dec or hex from string - CRN . . . . . . 12-6 Integer - read oct, dec or hex from terminal - CRNT . . . . 12-6 Integer - read octal signed from string - CR8S . . . . . . . 12-7 Integer - read octal signed from terminal - CR8ST . . . . . 12-7 Integer - read octal unsigned from string - CR8 . . . . . . 12-8 Integer - read octal unsigned from terminal - CR8T . . . . . 12-7 Integer - read octal unsigned from terminal - CRHT . . . . . 12-8 Integer - Single Precision I/O . . . . . . . . . . . . . . . 12-1 Integer - write 3.int to string - CWD3 . . . . . . . . . . . 7-2 Integer - write 3.int to string, spec field - CWD3P . . . . 7-2 Integer - write 3.int to terminal - CWD3T . . . . . . . . . 7-1 Integer - write 3.int to terminal, spec field - CWD3PT . . . 7-1 Integer - write decimal signed to string - CWDS . . . . . . 12-2 Integer - write decimal signed to string - CWDSP . . . . . . 12-2 Integer - write decimal signed to terminal - CWDST . . . . . 12-1 Integer - write decimal signed to terminal, spec field - CWDSPT 12-1 Integer - write decimal unsigned to string - CWD . . . . . . 12-2 Integer - write decimal unsigned to string - CWDP . . . . . 12-2 Integer - write decimal unsigned to terminal - CWDT . . . . 12-2 Integer - write decimal unsigned to terminal, spec field - CWDPT 12-1 Integer - write hex to string - CWH & CWHL . . . . . . . . . 12-5 Integer - write hex to string, spec field - CWHP & CWHLP . . 12-5 Integer - write hex to terminal - CWHPT & CWHLPT . . . . . . 12-4 Integer - write hex to terminal - CWHT & CWHLT . . . . . . . 12-5 Integer - write long decimal to string - CWD2 . . . . . . . 10-2 Integer - write long decimal to string, spec field - CWD2P . 10-2 Integer - write long decimal to terminal - CWD2T . . . . . . 10-1 Integer - write long decimal to terminal, spec field - CWD2PT 10-1 Integer - write long hex to string - CWH2 & CWHL2 . . . . . 10-4 Integer - write long hex to string, spec field - CWH2P & CWHL2P 10-4 Integer - write long hex to terminal - CWH2T & CWHL2T . . . 10-4 Integer - write long hex to terminal, spec field - CWH2PT & CWHL2X 10-4 Integer - write long octal to string - CW82 . . . . . . . . 10-3 Integer - write long octal to string - CW82S . . . . . . . . 10-3 Integer - write long octal to string, spec field - CW82P . . 10-3 Integer - write long octal to string, spec field - CW82SP . 10-3 Integer - write long octal to terminal - CW82ST . . . . . . 10-2 Integer - write long octal to terminal - CW82T . . . . . . . 10-3 Integer - write long octal to terminal, spec field - CW82PT . 10-2 CVLLIB C Interface Manual Page I-8 Integer - write long octal to terminal, spec field - CW82SX . 10-2 Integer - write octal signed to string - CW8 . . . . . . . . 12-4 Integer - write octal signed to string - CW8S . . . . . . . 12-4 Integer - write octal signed to string, spec field - CW8SP . 12-3 Integer - write octal signed to terminal - CW8ST . . . . . . 12-3 Integer - write octal signed to terminal, spec field - CW8SPT 12-3 Integer - write octal unsigned to string, spec field - CW8P . 12-4 Integer - write octal unsigned to terminal - CW8T . . . . . 12-3 Integer - write octal unsigned to terminal, spec field - CW8PT 12-3 Integer Arithmetic - Triple Precision . . . . . . . . . . . 8-1 Integer Routines - Triple Precision . . . . . . . . . . . . 7-1 Integers - Double Precision . . . . . . . . . . . . . . . . 10-1 Integers - Reading Double Precision . . . . . . . . . . . . 10-6 Integers - Triple Precision . . . . . . . . . . . . . . . . 7-1 Integers - Writing Double Precision . . . . . . . . . . . . 10-1 JSW bit set & clear - CSWSET & CSWCLR . . . . . . . . . . . 15-5 Length Conversion Routines . . . . . . . . . . . . . . . . . 13-1 Linking with /INCLUDE . . . . . . . . . . . . . . . . . . . 2-3 long . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Lower case from TTY - TLC . . . . . . . . . . . . . . . . . 15-3 Money - read 3.precis from string - CRM3 . . . . . . . . . . 6-3 Money - read 3.precis from terminal . . . . . . . . . . . . 6-3 Money - read from string - CRM . . . . . . . . . . . . . . . 9-3 Money - read from terminal - CRMT . . . . . . . . . . . . . 9-2 Money - write 3.precis to string - CWM3 & CWM3D . . . . . . 6-2 Money - write 3.precis to string - CWM3P & CWM3DP . . . . . 6-2 Money - write 3.precis to terminal - CWM3PT & CWM3DX . . . . 6-1 Money - write 3.precis to terminal - CWM3T & CWM3DT . . . . 6-2 Money - write to string - CWM & CWMD . . . . . . . . . . . . 9-2 Money - write to string, spec field - CWMP & CWMDP . . . . . 9-2 Money - write to terminal - CMWT & CWMDT . . . . . . . . . . 9-2 Money - write to terminal, spec field - CWMPT & CWMDPT . . . 9-1 Money Format - Double Precision . . . . . . . . . . . . . . 9-1 Money Format - Triple Precision . . . . . . . . . . . . . . 6-1 Money Routines - Double Precision . . . . . . . . . . . . . 9-1 Money Routines - Triple Precision . . . . . . . . . . . . . 6-1 Move a 3.int - CMOV3 . . . . . . . . . . . . . . . . . . . . 8-3 Multiply 3.int by 3.int - CMUL33 . . . . . . . . . . . . . . 8-1 Multiply 3.int by int - CMUL31 . . . . . . . . . . . . . . . 8-1 Multiply long by int - CMUL21 . . . . . . . . . . . . . . . 11-1 Multiply longs - CMUL22 . . . . . . . . . . . . . . . . . . 11-1 Negate a 3.int - CNEG3 . . . . . . . . . . . . . . . . . . . 8-2 Radix50 & Filename Formats . . . . . . . . . . . . . . . . . 5-1 Radix50 - convert from ascii - CCA50 . . . . . . . . . . . . 5-7 Radix50 - convert to ascii - CC50A . . . . . . . . . . . . . 5-7 Radix50 - provide from number - CDIG3 . . . . . . . . . . . 15-5 Radix50 - read filename set from string - CR50F . . . . . . 5-6 Radix50 - read filename set from terminal - CR50FT . . . . . 5-5 Radix50 - read from string - CR50 . . . . . . . . . . . . . 5-6 CVLLIB C Interface Manual Page I-9 Radix50 - read from terminal - CR50T . . . . . . . . . . . . 5-6 Radix50 - read symbol set from terminal - CR50ST . . . . . . 5-5 Radix50 - write filename set to string - CW50F . . . . . . . 5-4 Radix50 - write filename set to terminal - CW50FT . . . . . 5-4 Radix50 - write to string - CW50 . . . . . . . . . . . . . . 5-5 Radix50 - write to terminal - CW50T . . . . . . . . . . . . 5-5 Radix50 Routines . . . . . . . . . . . . . . . . . . . . . . 5-4 Radx50 - read symbol set from string - CR50S . . . . . . . . 5-5 Random number - CIRAN . . . . . . . . . . . . . . . . . . . 15-4 Random number seed - CRNSET . . . . . . . . . . . . . . . . 15-4 Read 3.int from string - CRD3 . . . . . . . . . . . . . . . 7-2 Read 3.int from terminal - CRD3T . . . . . . . . . . . . . . 7-2 Read 3.precis money from string - CRM3 . . . . . . . . . . . 6-3 Read 3.precis money from terminal . . . . . . . . . . . . . 6-3 Read date from string - CRDAT . . . . . . . . . . . . . . . 3-5 Read date from terminal - CRDATT . . . . . . . . . . . . . . 3-4 Read decimal signed from string - CRDS . . . . . . . . . . . 12-7 Read decimal signed from terminal - CRDST . . . . . . . . . 12-6 Read decimal unsigned from string - CRD . . . . . . . . . . 12-7 Read decimal unsigned from terminal - CRDT . . . . . . . . . 12-6 Read filename from string - CRF . . . . . . . . . . . . . . 5-4 Read filename from terminal - CRFT . . . . . . . . . . . . . 5-3 Read filename with defaults from string - CRFD . . . . . . . 5-3 Read filename with defaults from terminal - CRFDT . . . . . 5-3 Read hex from string - CRH . . . . . . . . . . . . . . . . . 12-8 Read line from terminal - CGTLIN . . . . . . . . . . . . . . 15-2 Read line from terminal - CTLIN . . . . . . . . . . . . . . 15-2 Read long decimal from string - CRD2 . . . . . . . . . . . . 10-7 Read long decimal from string - CRD2S . . . . . . . . . . . 10-7 Read long decimal from terminal - CRD2ST . . . . . . . . . . 10-6 Read long decimal from terminal - CRD2T . . . . . . . . . . 10-6 Read long from string - CRN2 . . . . . . . . . . . . . . . . 10-6 Read long from terminal - CRN2T . . . . . . . . . . . . . . 10-6 Read long hex from string - CRH2 . . . . . . . . . . . . . . 10-8 Read long hex from terminal - CRH2T . . . . . . . . . . . . 10-8 Read long octal from string - CR82 . . . . . . . . . . . . . 10-7 Read long octal from string - CR82S . . . . . . . . . . . . 10-7 Read long octal from terminal - CR82ST . . . . . . . . . . . 10-7 Read long octal from terminal - CR82T . . . . . . . . . . . 10-7 Read money from string - CRM . . . . . . . . . . . . . . . . 9-3 Read money from terminal - CRMT . . . . . . . . . . . . . . 9-2 Read oct, dec or hex from string - CRN . . . . . . . . . . . 12-6 Read oct, dec or hex from terminal - CRNT . . . . . . . . . 12-6 Read octal signed from string - CR8S . . . . . . . . . . . . 12-7 Read octal signed from terminal - CR8ST . . . . . . . . . . 12-7 Read octal unsigned from string - CR8 . . . . . . . . . . . 12-8 Read octal unsigned from terminal - CR8T . . . . . . . . . . 12-7 Read octal unsigned from terminal - CRHT . . . . . . . . . . 12-8 Read radix50 filename set from string - CR50F . . . . . . . 5-6 Read radix50 filename set from terminal - CR50FT . . . . . . 5-5 Read radix50 from string - CR50 . . . . . . . . . . . . . . 5-6 Read radix50 from terminal - CR50T . . . . . . . . . . . . . 5-6 Read radix50 symbol set from string - CR50S . . . . . . . . 5-5 Read radix50 symbol set from terminal - CR50ST . . . . . . . 5-5 CVLLIB C Interface Manual Page I-10 Read system date into dateblock - CRSDAT . . . . . . . . . . 3-4 Read system time into timeblock - CRSTIM . . . . . . . . . . 4-3 Read time from string - CRTIM . . . . . . . . . . . . . . . 4-3 Read time from terminal - CRTIMT . . . . . . . . . . . . . . 4-3 Read Yes or No answer from terminal - CYESNO . . . . . . . . 15-2 Read Yes or other answer from terminal - CYES . . . . . . . 15-1 Reading Double Precision Integers . . . . . . . . . . . . . 10-6 Reading Hex Numbers . . . . . . . . . . . . . . . . . . . . 1-3 Reading Information . . . . . . . . . . . . . . . . . . . . 1-2 Register Save & Restore - CSVR . . . . . . . . . . . . . . . 16-1 Set & Clear JSW bits - CSWSET & CSWCLR . . . . . . . . . . . 15-5 Single Precision Integer I/O . . . . . . . . . . . . . . . . 12-1 Special Mode for TTY - TSPM . . . . . . . . . . . . . . . . 15-3 String Comparison Routines . . . . . . . . . . . . . . . . . 14-1 String to terminal - CPRINT . . . . . . . . . . . . . . . . 15-3 String Writing . . . . . . . . . . . . . . . . . . . . . . . 1-2 strpnt . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Subtract 3.int's - CSUB3 . . . . . . . . . . . . . . . . . . 8-2 Table of Contents . . . . . . . . . . . . . . . . . . . . . 3 TCRLF - Type . . . . . . . . . . . . . . . . . . . 15-3 Terminal Buffers - Tlinb & Tloub . . . . . . . . . . . . . . 1-1 Terminal I/O & Buffering . . . . . . . . . . . . . . . . . . 2-3 Terminal lower case - TLC . . . . . . . . . . . . . . . . . 15-3 Terminal Special Mode - TSPM . . . . . . . . . . . . . . . . 15-3 Terminal upper case - TUC . . . . . . . . . . . . . . . . . 15-3 Time - Convert integer time to RT11 format - CCWTR . . . . . 4-4 Time - convert RT11 time to integers - CCRTW . . . . . . . . 4-4 Time - read from string - CRTIM . . . . . . . . . . . . . . 4-3 Time - read from terminal - CRTIMT . . . . . . . . . . . . . 4-3 Time - read system time into timeblock - CRSTIM . . . . . . 4-3 Time - write system time to string - CWSTIM . . . . . . . . 4-2 Time - write system time to terminal - CWSTMT . . . . . . . 4-2 Time - write to string - CWTIM . . . . . . . . . . . . . . . 4-2 Time - write to terminal - CWTIMT . . . . . . . . . . . . . 4-2 Time Blocks . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Time Formats . . . . . . . . . . . . . . . . . . . . . . . . 4-1 Time Routines . . . . . . . . . . . . . . . . . . . . . . . 4-1 TIOW - TTY I/O wait . . . . . . . . . . . . . . . . . . . . 15-4 TLC - TTY lower case . . . . . . . . . . . . . . . . . . . . 15-3 Tlinb - Terminal Buffer . . . . . . . . . . . . . . . . . . 1-1 Tloub - Terminal Buffer . . . . . . . . . . . . . . . . . . 1-1 TNIOW - TTY No I/O Wait . . . . . . . . . . . . . . . . . . 15-4 TNSPM - Reset TTY Special Mode . . . . . . . . . . . . . . . 15-4 Tracking Command Files . . . . . . . . . . . . . . . . . . . 2-3 Trim leading spaces or tabs - CLTRIM . . . . . . . . . . . . 15-4 Trim trailing spaces or tabs - CRTRIM . . . . . . . . . . . 15-5 Triple addition - CADD3 . . . . . . . . . . . . . . . . . . 8-2 Triple comparison - CCMP3 . . . . . . . . . . . . . . . . . 8-2 Triple negation - CNEG3 . . . . . . . . . . . . . . . . . . 8-2 Triple Precision Arithmetic . . . . . . . . . . . . . . . . 8-1 Triple precision division - CDIV31 . . . . . . . . . . . . . 8-1 Triple precision division - CDIV33 . . . . . . . . . . . . . 8-2 CVLLIB C Interface Manual Page I-11 Triple Precision I/O Routines . . . . . . . . . . . . . . . 7-1 Triple Precision Integers . . . . . . . . . . . . . . . . . 7-1 Triple Precision Money Format . . . . . . . . . . . . . . . 6-1 Triple Precision Money Routines . . . . . . . . . . . . . . 6-1 Triple precision multiply - CMUL31 . . . . . . . . . . . . . 8-1 Triple precision multiply - CMUL33 . . . . . . . . . . . . . 8-1 Triple subtraction - CSUB3 . . . . . . . . . . . . . . . . . 8-2 TSPM - TTY Special Mode . . . . . . . . . . . . . . . . . . 15-3 TTY No I/O Wait - TNIOW . . . . . . . . . . . . . . . . . . 15-4 TUC - TTY upper case . . . . . . . . . . . . . . . . . . . . 15-3 Type - TCRLF . . . . . . . . . . . . . . . . . . . 15-3 Update History . . . . . . . . . . . . . . . . . . . . . . . 3 Upper case from TTY - TUC . . . . . . . . . . . . . . . . . 15-3 Write 3.int to string - CWD3 . . . . . . . . . . . . . . . . 7-2 Write 3.int to string, spec field - CWD3P . . . . . . . . . 7-2 Write 3.int to terminal - CWD3T . . . . . . . . . . . . . . 7-1 Write 3.int to terminal, spec field - CWD3PT . . . . . . . . 7-1 Write 3.precis money to string - CWM3 & CWM3D . . . . . . . 6-2 Write 3.precis money to string - CWM3P & CWM3DP . . . . . . 6-2 Write 3.precis money to terminal - CWM3PT & CWM3DX . . . . . 6-1 Write 3.precis money to terminal - CWM3T & CWM3DT . . . . . 6-2 Write an ascii character to string - CWA . . . . . . . . . . 15-1 Write an Ascii character to the terminal - CWAT . . . . . . 15-1 Write character to terminal - CCHR1 . . . . . . . . . . . . 15-2 Write characters to terminal - CCHR . . . . . . . . . . . . 15-2 Write date to string - CWDAT . . . . . . . . . . . . . . . . 3-4 Write date to terminal - CWDATT . . . . . . . . . . . . . . 3-3 Write day & date to string - CTODAY . . . . . . . . . . . . 3-2 Write day & date to TTY - CTODAT . . . . . . . . . . . . . . 3-2 Write decimal signed to string - CWDS . . . . . . . . . . . 12-2 Write decimal signed to string - CWDSP . . . . . . . . . . . 12-2 Write decimal signed to terminal - CWDST . . . . . . . . . . 12-1 Write decimal signed to terminal, spec field - CWDSPT . . . 12-1 Write decimal unsigned to string - CWD . . . . . . . . . . . 12-2 Write decimal unsigned to string - CWDP . . . . . . . . . . 12-2 Write decimal unsigned to terminal - CWDT . . . . . . . . . 12-2 Write decimal unsigned to terminal, spec field - CWDPT . . . 12-1 Write filename to terminal - CWF . . . . . . . . . . . . . . 5-2 Write filename to terminal - CWFT . . . . . . . . . . . . . 5-2 Write hex to string - CWH & CWHL . . . . . . . . . . . . . . 12-5 Write hex to string, spec field - CWHP & CWHLP . . . . . . . 12-5 Write hex to terminal - CWHPT & CWHLPT . . . . . . . . . . . 12-4 Write hex to terminal - CWHT & CWHLT . . . . . . . . . . . . 12-5 Write long decimal to string - CWD2 . . . . . . . . . . . . 10-2 Write long decimal to string, spec field - CWD2P . . . . . . 10-2 Write long decimal to terminal - CWD2T . . . . . . . . . . . 10-1 Write long decimal to terminal, spec field - CWD2PT . . . . 10-1 Write long hex to string - CWH2 & CWHL2 . . . . . . . . . . 10-4 Write long hex to string, spec field - CWH2P & . . . . . . 10-4 Write long hex to terminal - CWH2T & CWHL2T . . . . . . . . 10-4 Write long hex to terminal, spec field - CWH2PT & CWHL2X . . 10-4 Write long octal to string - CW82 . . . . . . . . . . . . . 10-3 CVLLIB C Interface Manual Page I-12 Write long octal to string - CW82S . . . . . . . . . . . . . 10-3 Write long octal to string, spec field - CW82P . . . . . . . 10-3 Write long octal to string, spec field - CW82SP . . . . . . 10-3 Write long octal to terminal - CW82ST . . . . . . . . . . . 10-2 Write long octal to terminal - CW82T . . . . . . . . . . . . 10-3 Write long octal to terminal, spec field - CW82PT . . . . . 10-2 Write long octal to terminal, spec field - CW82SX . . . . . 10-2 Write money to string - CWM & CWMD . . . . . . . . . . . . . 9-2 Write money to string, spec field - CWMP & CWMDP . . . . . . 9-2 Write money to terminal - CWMT & CWMDT . . . . . . . . . . . 9-2 Write money to terminal, spec field - CWMPT & CWMDPT . . . . 9-1 Write name of day to string - CWDAY . . . . . . . . . . . . 3-2 Write name of day to terminal - CWDAYT . . . . . . . . . . . 3-2 Write octal signed to string - CW8 . . . . . . . . . . . . . 12-4 Write octal signed to string - CW8S . . . . . . . . . . . . 12-4 Write octal signed to string, spec field - CW8SP . . . . . . 12-3 Write octal signed to terminal - CW8ST . . . . . . . . . . . 12-3 Write octal signed to terminal, spec field - CW8SPT . . . . 12-3 Write octal unsigned to string, spec field - CW8P . . . . . 12-4 Write octal unsigned to terminal - CW8T . . . . . . . . . . 12-3 Write octal unsigned to terminal, spec field - CW8PT . . . . 12-3 Write radix50 (filename set) to string - CW50F . . . . . . . 5-4 Write radix50 (filename set) to terminal - CW50FT . . . . . 5-4 Write radix50 to string - CW50 . . . . . . . . . . . . . . . 5-5 Write radix50 to terminal - CW50T . . . . . . . . . . . . . 5-5 Write string to terminal - CPRINT . . . . . . . . . . . . . 15-3 Write system date to string - CWSDAT . . . . . . . . . . . . 3-3 Write system date to terminal - CWSDTT . . . . . . . . . . . 3-3 Write system time to string - CWSTIM . . . . . . . . . . . . 4-2 Write system time to terminal - CWSTMT . . . . . . . . . . . 4-2 Write time to string - CWTIM . . . . . . . . . . . . . . . . 4-2 Write time to terminal - CWTIMT . . . . . . . . . . . . . . 4-2 Writing Double Precision Integers . . . . . . . . . . . . . 10-1 Writing Hex Numbers . . . . . . . . . . . . . . . . . . . . 1-2 Writing to a String . . . . . . . . . . . . . . . . . . . . 1-2 Yes or No answer from terminal - CYESNO . . . . . . . . . . 15-2 Yes or other answer from terminal - CYES . . . . . . . . . . 15-1