Last change
on this file since d21fc6f was b28a12e, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Zero redundant declarations.
|
-
Property mode
set to
100644
|
File size:
445 bytes
|
Line | |
---|
1 | /*
|
---|
2 | =============================================================================
|
---|
3 | strlen.c -- string length function ala' Unix(tm)
|
---|
4 | Version 1 -- 1987-02-11 -- D.N. Lynx Crowe
|
---|
5 |
|
---|
6 | Returns the number of non-NULL bytes in string argument.
|
---|
7 | =============================================================================
|
---|
8 | */
|
---|
9 |
|
---|
10 | #include "ram.h"
|
---|
11 |
|
---|
12 | int16_t strlen(int8_t *s)
|
---|
13 | {
|
---|
14 | register int16_t n = 0;
|
---|
15 |
|
---|
16 | while (*s++ != '\0')
|
---|
17 | ++n;
|
---|
18 |
|
---|
19 | return (n);
|
---|
20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.