home *** CD-ROM | disk | FTP | other *** search
- .de hd
- .bp 1
- .in 0
- .he '$1 (2)'$2'$1 (2)'
- .fo ''-#-''
- .fi
- .in 7
- .ti -7
- NAME
- .br
- $1 -
- .en
- .de sy
- .sp 1
- .ti -7
- SYNOPSIS
- .br
- .nf
- .en
- .de fs
- .fi
- .sp
- .ti -7
- DESCRIPTION
- .br
- .en
- .de im
- .sp
- .ti -7
- IMPLEMENTATION
- .br
- .en
- .de sa
- .sp
- .ti -7
- SEE ALSO
- .br
- .en
- .de am
- .sp
- .ti -7
- ARGUMENTS MODIFIED
- .br
- .en
- .de ca
- .sp
- .ti -7
- CALLS
- .br
- .en
- .de bu
- .sp
- .ti -7
- BUGS
- .br
- .en
- .hd CTOC 03/23/80
- copy string-to-string, observing length limits
- .sy
- integer function ctoc (from, to, len)
- integer len
- character from (ARB), to (len)
- .fs
- 'Ctoc' copies an EOS-terminated unpacked string from one array to
- another, observing a maximum-length constraint on the destination array.
- The function return is the number of characters copied (i.e., the
- length of the string in the parameter 'to').
- .sp
- Note that the other string copy routine, 'scopy', is not protected;
- if the length of the source string exceeds the space available in the
- destination string, some portion of memory will be garbled.
- .im
- A simple loop copies characters from 'from' to 'to' until
- an EOS is encountered or all the space available in the destination
- array is used up.
- .am
- to
- .sa
- scopy (2), other conversion routines ('cto?*' and '?*toc') (2)