Skip to content

Commit

Permalink
lib/string/: Move string-related files to string/ subdir
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Colomar <alx@kernel.org>
  • Loading branch information
alejandro-colomar authored and hallyn committed Dec 3, 2023
1 parent d1ad64b commit dbb37b1
Show file tree
Hide file tree
Showing 42 changed files with 52 additions and 52 deletions.
24 changes: 12 additions & 12 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,19 @@ libshadow_la_SOURCES = \
shell.c \
sizeof.h \
spawn.c \
sprintf.c \
sprintf.h \
sssd.c \
sssd.h \
stpecpy.c \
stpecpy.h \
stpeprintf.c \
stpeprintf.h \
strncpy.h \
strtcpy.c \
strtcpy.h \
string/sprintf.c \
string/sprintf.h \
string/stpecpy.c \
string/stpecpy.h \
string/stpeprintf.c \
string/stpeprintf.h \
string/strncpy.h \
string/strtcpy.c \
string/strtcpy.h \
string/zustr2stp.c \
string/zustr2stp.h \
strtoday.c \
sub.c \
subordinateio.h \
Expand All @@ -162,9 +164,7 @@ libshadow_la_SOURCES = \
xgetgrnam.c \
xgetgrgid.c \
xgetspnam.c \
yesno.c \
zustr2stp.c \
zustr2stp.h
yesno.c

if WITH_TCB
libshadow_la_SOURCES += tcbfuncs.c tcbfuncs.h
Expand Down
2 changes: 1 addition & 1 deletion lib/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <stdio.h>
#include "getdef.h"
#include "prototypes.h"
#include "strtcpy.h"
#include "string/strtcpy.h"

#ident "$Id$"

Expand Down
2 changes: 1 addition & 1 deletion lib/copydir.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <attr/libattr.h>
#endif /* WITH_ATTR */
#include "shadowlog.h"
#include "sprintf.h"
#include "string/sprintf.h"


static /*@null@*/const char *src_orig;
Expand Down
2 changes: 1 addition & 1 deletion lib/date_to_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#ident "$Id$"

#include "strtcpy.h"
#include "string/strtcpy.h"
#include "prototypes.h"


Expand Down
2 changes: 1 addition & 1 deletion lib/env.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "prototypes.h"
#include "defines.h"
#include "shadowlog.h"
#include "sprintf.h"
#include "string/sprintf.h"


/*
Expand Down
2 changes: 1 addition & 1 deletion lib/failure.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "failure.h"
#include "memzero.h"
#include "prototypes.h"
#include "strtcpy.h"
#include "string/strtcpy.h"


#define YEAR (365L*DAY)
Expand Down
2 changes: 1 addition & 1 deletion lib/getdef.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "alloc.h"
#include "getdef.h"
#include "shadowlog_internal.h"
#include "sprintf.h"
#include "string/sprintf.h"


/*
Expand Down
2 changes: 1 addition & 1 deletion lib/idmapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "alloc.h"
#include "prototypes.h"
#include "stpeprintf.h"
#include "string/stpeprintf.h"
#include "idmapping.h"
#if HAVE_SYS_CAPABILITY_H
#include <sys/prctl.h>
Expand Down
4 changes: 2 additions & 2 deletions lib/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include <lastlog.h>
#include "memzero.h"
#include "prototypes.h"
#include "strncpy.h"
#include "strtcpy.h"
#include "string/strncpy.h"
#include "string/strtcpy.h"


/*
Expand Down
2 changes: 1 addition & 1 deletion lib/mail.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "alloc.h"
#include "getdef.h"
#include "sprintf.h"
#include "string/sprintf.h"

#ident "$Id$"

Expand Down
2 changes: 1 addition & 1 deletion lib/prefix_flag.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#endif /* ENABLE_SUBIDS */
#include "getdef.h"
#include "shadowlog.h"
#include "sprintf.h"
#include "string/sprintf.h"


static char *passwd_db_file = NULL;
Expand Down
2 changes: 1 addition & 1 deletion lib/setupenv.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <pwd.h>
#include "getdef.h"
#include "shadowlog.h"
#include "sprintf.h"
#include "string/sprintf.h"


#ifndef USE_PAM
Expand Down
2 changes: 1 addition & 1 deletion lib/sprintf.c → lib/string/sprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#ident "$Id$"

#include "sprintf.h"
#include "string/sprintf.h"

#include <stdarg.h>
#include <stddef.h>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/stpecpy.c → lib/string/stpecpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#ident "$Id$"

#include "stpecpy.h"
#include "string/stpecpy.h"


extern inline char *stpecpy(char *dst, char *end, const char *restrict src);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/stpeprintf.c → lib/string/stpeprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#ident "$Id$"

#include "stpeprintf.h"
#include "string/stpeprintf.h"

#include <stdarg.h>

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/strtcpy.c → lib/string/strtcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#ident "$Id$"

#include "strtcpy.h"
#include "string/strtcpy.h"


extern inline ssize_t strtcpy(char *restrict dst, const char *restrict src,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/zustr2stp.c → lib/string/zustr2stp.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#ident "$Id$"

#include "zustr2stp.h"
#include "string/zustr2stp.h"


extern inline char *zustr2stp(char *restrict dst, const char *restrict src,
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions lib/utmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#include "alloc.h"
#include "sizeof.h"
#include "strtcpy.h"
#include "strncpy.h"
#include "zustr2stp.h"
#include "string/strncpy.h"
#include "string/strtcpy.h"
#include "string/zustr2stp.h"

#ident "$Id$"

Expand Down
2 changes: 1 addition & 1 deletion src/chage.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "pwio.h"
#include "shadowio.h"
#include "shadowlog.h"
#include "strtcpy.h"
#include "string/strtcpy.h"
#ifdef WITH_TCB
#include "tcbfuncs.h"
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/chfn.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/*@-exitarg@*/
#include "exitcodes.h"
#include "shadowlog.h"
#include "strtcpy.h"
#include "string/strtcpy.h"

/*
* Global variables.
Expand Down
2 changes: 1 addition & 1 deletion src/chsh.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/*@-exitarg@*/
#include "exitcodes.h"
#include "shadowlog.h"
#include "strtcpy.h"
#include "string/strtcpy.h"

#ifndef SHELLS_FILE
#define SHELLS_FILE "/etc/shells"
Expand Down
2 changes: 1 addition & 1 deletion src/gpasswd.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/*@-exitarg@*/
#include "exitcodes.h"
#include "shadowlog.h"
#include "strtcpy.h"
#include "string/strtcpy.h"

/*
* Global variables
Expand Down
4 changes: 2 additions & 2 deletions src/groupmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
#include "sgroupio.h"
#endif
#include "shadowlog.h"
#include "stpecpy.h"
#include "stpeprintf.h"
#include "string/stpecpy.h"
#include "string/stpeprintf.h"
/*
* exit status values
*/
Expand Down
2 changes: 1 addition & 1 deletion src/login.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/*@-exitarg@*/
#include "exitcodes.h"
#include "shadowlog.h"
#include "strtcpy.h"
#include "string/strtcpy.h"

#ifdef USE_PAM
#include "pam_defs.h"
Expand Down
2 changes: 1 addition & 1 deletion src/logoutd.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "prototypes.h"
#include "shadowlog.h"
#include "sizeof.h"
#include "zustr2stp.h"
#include "string/zustr2stp.h"
/*
* Global variables
*/
Expand Down
2 changes: 1 addition & 1 deletion src/passwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "pwio.h"
#include "shadowio.h"
#include "shadowlog.h"
#include "strtcpy.h"
#include "string/strtcpy.h"

/*
* exit status values
Expand Down
2 changes: 1 addition & 1 deletion src/su.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
/*@-exitarg@*/
#include "exitcodes.h"
#include "shadowlog.h"
#include "strtcpy.h"
#include "string/strtcpy.h"

/*
* Global variables
Expand Down
2 changes: 1 addition & 1 deletion src/sulogin.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/*@-exitarg@*/
#include "exitcodes.h"
#include "shadowlog.h"
#include "strtcpy.h"
#include "string/strtcpy.h"

/*
* Global variables
Expand Down
2 changes: 1 addition & 1 deletion src/useradd.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#include "tcbfuncs.h"
#endif
#include "shadowlog.h"
#include "sprintf.h"
#include "string/sprintf.h"


#ifndef SKEL_DIR
Expand Down
2 changes: 1 addition & 1 deletion src/userdel.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include "subordinateio.h"
#endif /* ENABLE_SUBIDS */
#include "shadowlog.h"
#include "sprintf.h"
#include "string/sprintf.h"


/*
Expand Down
2 changes: 1 addition & 1 deletion src/usermod.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#include "tcbfuncs.h"
#endif
#include "shadowlog.h"
#include "sprintf.h"
#include "string/sprintf.h"


/*
Expand Down
2 changes: 1 addition & 1 deletion src/vipw.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include "tcbfuncs.h"
#endif /* WITH_TCB */
#include "shadowlog.h"
#include "sprintf.h"
#include "string/sprintf.h"


#define MSG_WARN_EDIT_OTHER_FILE _( \
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test_strncpy_LDADD = \
$(NULL)

test_strtcpy_SOURCES = \
../../lib/strtcpy.c \
../../lib/string/strtcpy.c \
test_strtcpy.c \
$(NULL)
test_strtcpy_CFLAGS = \
Expand All @@ -73,7 +73,7 @@ test_strtcpy_LDADD = \
$(NULL)

test_xasprintf_SOURCES = \
../../lib/sprintf.c \
../../lib/string/sprintf.c \
test_xasprintf.c \
$(NULL)
test_xasprintf_CFLAGS = \
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_strncpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <cmocka.h>

#include "sizeof.h"
#include "strncpy.h"
#include "string/strncpy.h"


static void test_STRNCPY_trunc(void **state);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_strtcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <cmocka.h>

#include "sizeof.h"
#include "strtcpy.h"
#include "string/strtcpy.h"


static void test_STRTCPY_trunc(void **state);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_xasprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <stdint.h> // Required by <cmocka.h>
#include <cmocka.h>

#include "sprintf.h"
#include "string/sprintf.h"


#define assert_unreachable() assert_true(0)
Expand Down

0 comments on commit dbb37b1

Please sign in to comment.