1: IIlength(s) 2: char *s; 3: 4: /* 5: ** determines the length of a string. 6: ** if a null byte cannot be found after 255 chars 7: ** the the length is assumed to be 255. 8: */ 9: 10: { 11: register char *ss; 12: register int len, cnt; 13: 14: ss = s; 15: cnt = 255; 16: len = 0; 17: 18: while (cnt--) 19: if (*ss++) 20: len++; 21: else 22: break; 23: return (len); 24: }