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