|
|
1.1 root 1:
2:
3: /*
4: cpys2sc( cp,scptr,maxlen ) copies a c style string to a spitbol
5: scblk.
6: */
7:
8: #include "spitblks.h"
9:
10: cpys2sc( cp,endchr,scptr,maxlen )
11:
12: char *cp;
13: char endchr;
14: struct scblk *scptr;
15: int maxlen;
16:
17: {
18: int cnt = 0, j;
19: char chr;
20:
21: while (( cnt < maxlen ) && ( ( chr = cp[cnt] ) != endchr )) {
22: scptr -> str[cnt++] = chr;
23: }
24:
25: scptr -> len = cnt;
26: }
27:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.