File: STcopyMax.html

package info (click to toggle)
libtsp 3r0-1
  • links: PTS
  • area: non-free
  • in suites: potato, woody
  • size: 5,096 kB
  • ctags: 1,798
  • sloc: ansic: 14,464; sh: 1,217; makefile: 182
file content (57 lines) | stat: -rw-r--r-- 1,554 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<HTML>
<HEAD>
<TITLE>TSP (libtsp/ST) - STcopyMax</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>STcopyMax</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
int STcopyMax (const char Si[], char So[], int Maxchar)
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Copy at most Maxchar characters to a string
</DL>
<H4>Description</H4>
This routine copies characters from the input string to the output string.
Characters are copied until a null is seen in the input string or the number
of characters copied is Maxchar.  Then a trailing null character is appended
to the output string.  If the input string is longer than Maxchar (not
including the null character), a string truncated warning message is printed.
<H4>Parameters</H4>
<P>
<PRE>
    Number of characters in the output string
</PRE>
<DL>
<DT>
 -&gt; const char Si[]
<DD>
Input character string
<DT>
&lt;-  char So[]
<DD>
Output character string.  This string is always null terminated, with
at most Maxchar characters not including the terminating null character.
If the input string is longer than Maxchar, only the first Maxchar
characters are copied and a warning message is printed.
<DT>
 -&gt; int Maxchar
<DD>
Maximum number of characters (not including the trailing null character)
to be placed in So.
</DL>
<H4>Author / revision</H4>
P. Kabal  Copyright (C) 1997
/ Revision 1.15  1997/10/11
<H4>See Also</H4>
<A HREF="STcatMax.html">STcatMax</A>,
<A HREF="STcopyNMax.html">STcopyNMax</A>
<P>
<HR>
Main Index <A HREF="../libtsp.html">libtsp</A>
</BODY>
</HTML>