source: buchla-68k/libsm/strlen.c@ 6262b5c

Last change on this file since 6262b5c was 6262b5c, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Added include files for global functions and variables.

  • Property mode set to 100644
File size: 445 bytes
RevLine 
[f40a309]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
[6262b5c]10#include "all.h"
[f40a309]11
[7258c6a]12int16_t strlen(int8_t *s)
[f40a309]13{
[7848656]14 register int16_t n = 0;
[f40a309]15
[7848656]16 while (*s++ != '\0')
17 ++n;
[f40a309]18
[7848656]19 return (n);
[f40a309]20}
Note: See TracBrowser for help on using the repository browser.