/************************************************************* * File: lib/strlen.c * Purpose: Part of C runtime library * Author: Phil Bunce (pjb@carmel.com) * Revision History: * 970304 Start of revision history */ #include "string.h" /** int strlen(p) returns the length of p */ int strlen(p) char *p; { int n; if (!p) return(0); for (n=0;*p;p++) n++; return(n); }