/* * Routines to access hardware * * Copyright (c) 2013 Realtek Semiconductor Corp. * * This module is a confidential and proprietary property of RealTek and * possession or use of this module requires written permission of RealTek. */ #include "basic_types.h" #include #include /* Compiler defns such as size_t, NULL etc. */ #include "strproc.h" #include "section_config.h" #include "diag.h" #include "ameba_soc.h" LIBC_ROM_TEXT_SECTION _LONG_CALL_ size_t _strnlen(const char *s, size_t count) { const char *sc; for (sc = s; count-- && *sc != '\0'; ++sc) ; return sc - s; }