|
|
1.1 ! root 1: # include <sccs.h> ! 2: ! 3: SCCSID(@(#)IIlength.c 8.1 12/31/84) ! 4: ! 5: ! 6: ! 7: /* ! 8: ** determines the length of a string. ! 9: ** if a null byte cannot be found after 255 chars ! 10: ** the the length is assumed to be 255. ! 11: */ ! 12: ! 13: IIlength(s) ! 14: char *s; ! 15: { ! 16: register char *ss; ! 17: register int len, cnt; ! 18: ! 19: ss = s; ! 20: cnt = 255; ! 21: len = 0; ! 22: ! 23: while (cnt--) ! 24: if (*ss++) ! 25: len++; ! 26: else ! 27: break; ! 28: return (len); ! 29: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.