mescc: Mes C Library: Prepare for M2-Planet: strlen.

* lib/string/strlen.c: : Rewrite C-constructs not supported by M2-Planet.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-05-17 19:30:04 +02:00
parent 8194ecfc0f
commit 99e24cd99a
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*- /* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software * GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> * Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* *
* This file is part of GNU Mes. * This file is part of GNU Mes.
* *
@ -24,7 +24,9 @@ size_t
strlen (char const *s) strlen (char const *s)
{ {
int i = 0; int i = 0;
while (s[i])
i++; while (s[i] != 0)
i = i + 1;
return i; return i;
} }