sssd.h \
string/ctype/isascii.c \
string/ctype/isascii.h \
- string/ctype/strchrisascii/strchriscntrl.c \
- string/ctype/strchrisascii/strchriscntrl.h \
- string/ctype/strisascii/strisdigit.c \
- string/ctype/strisascii/strisdigit.h \
- string/ctype/strisascii/strisprint.c \
- string/ctype/strisascii/strisprint.h \
- string/ctype/strtoascii/strtolower.c \
- string/ctype/strtoascii/strtolower.h \
+ string/ctype/strchrisascii.c \
+ string/ctype/strchrisascii.h \
+ string/ctype/strisascii.c \
+ string/ctype/strisascii.h \
+ string/ctype/strtoascii.c \
+ string/ctype/strtoascii.h \
string/memset/memzero.c \
string/memset/memzero.h \
string/sprintf/aprintf.c \
#include "defines.h"
#include "chkname.h"
-#include "string/ctype/strchrisascii/strchriscntrl.h"
-#include "string/ctype/strisascii/strisdigit.h"
+#include "string/ctype/strchrisascii.h"
+#include "string/ctype/strisascii.h"
#include "string/strcmp/streq.h"
#include "string/strcmp/strcaseeq.h"
#include "sysconf.h"
#include "io/fgets/fgets.h"
#include "prototypes.h"
-#include "string/ctype/strisascii/strisprint.h"
-#include "string/ctype/strchrisascii/strchriscntrl.h"
+#include "string/ctype/strisascii.h"
+#include "string/ctype/strchrisascii.h"
#include "string/strcmp/streq.h"
#include "string/strspn/stpspn.h"
#include "string/strspn/stprspn.h"
#include "prototypes.h"
#include "defines.h"
#include "getdef.h"
-#include "string/ctype/strtoascii/strtolower.h"
+#include "string/ctype/strtoascii.h"
#include "string/memset/memzero.h"
#include "string/sprintf/aprintf.h"
#include "string/strcmp/streq.h"
if the character
belongs to the category specified in the function name.
- strchrisascii/
- The functions defined under this directory
+ strchrisascii.h
+ The functions defined in this file
return true
if the string has any characters that
belong to the category specified in the function name.
- strisascii/
- The functions defined under this directory
+ strisascii.h
+ The functions defined in this file
return true
if all of the characters of the string
belong to the category specified in the function name
and the string is not an empty string.
- strtoascii/
- The functions defined under this directory
+ strtoascii.h
+ The functions defined in this file
translate all characters in a string.
memset/ - Memory zeroing
#include "config.h"
-#include "string/ctype/strchrisascii/strchriscntrl.h"
+#include "string/ctype/strchrisascii.h"
#include <stdbool.h>
// SPDX-License-Identifier: BSD-3-Clause
-#ifndef SHADOW_INCLUDE_LIB_STRING_CTYPE_STRCHRISASCII_STRCHRISCNTRL_H_
-#define SHADOW_INCLUDE_LIB_STRING_CTYPE_STRCHRISASCII_STRCHRISCNTRL_H_
+#ifndef SHADOW_INCLUDE_LIB_STRING_CTYPE_STRCHRISASCII_H_
+#define SHADOW_INCLUDE_LIB_STRING_CTYPE_STRCHRISASCII_H_
#include "config.h"
#include "config.h"
-#include "string/ctype/strisascii/strisprint.h"
+#include "string/ctype/strisascii.h"
#include <stdbool.h>
+extern inline bool strisdigit(const char *s);
extern inline bool strisprint(const char *s);
// SPDX-License-Identifier: BSD-3-Clause
-#ifndef SHADOW_INCLUDE_LIB_STRING_CTYPE_STRISASCII_STRISDIGIT_H_
-#define SHADOW_INCLUDE_LIB_STRING_CTYPE_STRISASCII_STRISDIGIT_H_
+#ifndef SHADOW_INCLUDE_LIB_STRING_CTYPE_STRISASCII_H_
+#define SHADOW_INCLUDE_LIB_STRING_CTYPE_STRISASCII_H_
#include "config.h"
inline bool strisdigit(const char *s);
+inline bool strisprint(const char *s);
// strisdigit - string is [:digit:]
}
+// strisprint - string is [:print:]
+inline bool
+strisprint(const char *s)
+{
+ if (streq(s, ""))
+ return false;
+
+ for (; !streq(s, ""); s++) {
+ if (!isprint_c(*s))
+ return false;
+ }
+
+ return true;
+}
+
+
#endif // include guard
+++ /dev/null
-// SPDX-FileCopyrightText: 2024, Alejandro Colomar <alx@kernel.org>
-// SPDX-License-Identifier: BSD-3-Clause
-
-
-#include "config.h"
-
-#include "string/ctype/strisascii/strisdigit.h"
-
-#include <stdbool.h>
-
-
-extern inline bool strisdigit(const char *s);
+++ /dev/null
-// SPDX-FileCopyrightText: 2024-2025, Alejandro Colomar <alx@kernel.org>
-// SPDX-License-Identifier: BSD-3-Clause
-
-
-#ifndef SHADOW_INCLUDE_LIB_STRING_CTYPE_STRISASCII_STRISPRINT_H_
-#define SHADOW_INCLUDE_LIB_STRING_CTYPE_STRISASCII_STRISPRINT_H_
-
-
-#include "config.h"
-
-#include <stdbool.h>
-
-#include "string/ctype/isascii.h"
-#include "string/strcmp/streq.h"
-
-
-inline bool strisprint(const char *s);
-
-
-// strisprint - string is [:print:]
-inline bool
-strisprint(const char *s)
-{
- if (streq(s, ""))
- return false;
-
- for (; !streq(s, ""); s++) {
- if (!isprint_c(*s))
- return false;
- }
-
- return true;
-}
-
-
-#endif // include guard
#include "config.h"
-#include "string/ctype/strtoascii/strtolower.h"
+#include "string/ctype/strtoascii.h"
extern inline char *strtolower(char *str);
// SPDX-License-Identifier: BSD-3-Clause
-#ifndef SHADOW_INCLUDE_LIB_STRING_CTYPE_STRTOASCII_STRTOLOWER_H_
-#define SHADOW_INCLUDE_LIB_STRING_CTYPE_STRTOASCII_STRTOLOWER_H_
+#ifndef SHADOW_INCLUDE_LIB_STRING_CTYPE_STRTOASCII_H_
+#define SHADOW_INCLUDE_LIB_STRING_CTYPE_STRTOASCII_H_
#include "config.h"
inline char *strtolower(char *str);
-// string convert-to lower-case
-// Like tolower(3), but convert all characters in the string.
-// Returns the input pointer.
+// strtolower - string convert-to lower-case
inline char *
strtolower(char *str)
{
#include "atoi/a2i.h"
#include "atoi/getnum.h"
#include "shadow/passwd/getpw.h"
-#include "string/ctype/strisascii/strisdigit.h"
+#include "string/ctype/strisascii.h"
#include "string/sprintf/stprintf.h"
#include "string/strcmp/streq.h"
#include "string/strtok/strsep2arr.h"