updwtmpx innetgr \
getspnam_r \
rpmatch \
- memset_explicit explicit_bzero stpecpy stpeprintf])
+ memset_explicit explicit_bzero stpecpy seprintf])
AC_SYS_LARGEFILE
dnl Checks for typedefs, structures, and compiler characteristics.
string/memset/memzero.h \
string/sprintf/aprintf.c \
string/sprintf/aprintf.h \
- string/sprintf/stpeprintf.c \
- string/sprintf/stpeprintf.h \
+ string/sprintf/seprintf.c \
+ string/sprintf/seprintf.h \
string/sprintf/stprintf.c \
string/sprintf/stprintf.h \
string/strchr/strchrcnt.c \
#include "prototypes.h"
#include "shadowlog.h"
#include "sizeof.h"
-#include "string/sprintf/stpeprintf.h"
+#include "string/sprintf/seprintf.h"
#include "string/strcmp/streq.h"
#include "string/strerrno.h"
mapping = mappings;
for (idx = 0; idx < ranges; idx++, mapping++) {
/* Append this range to the string that will be written */
- pos = stpeprintf(pos, end, "%lu %lu %lu\n",
+ pos = seprintf(pos, end, "%lu %lu %lu\n",
mapping->upper,
mapping->lower,
mapping->count);
}
if (pos == end || pos == NULL) {
- fprintf(log_get_logfd(), _("%s: stpeprintf failed!\n"), log_get_progname());
+ fprintf(log_get_logfd(), _("%s: seprintf failed!\n"), log_get_progname());
exit(EXIT_FAILURE);
}
stprintf_a()
Like stprintf(), but takes an array.
- seprintf() // Current name: stpeprintf())
+ seprintf()
Similar to stprintf(), but takes a pointer to the end instead of
a size. This makes it safer for chaining several calls.
--- /dev/null
+// SPDX-FileCopyrightText: 2022-2025, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
+
+
+#include "config.h"
+
+#include "string/sprintf/seprintf.h"
+
+#include <stdarg.h>
+
+
+#if !defined(HAVE_SEPRINTF)
+extern inline char *seprintf(char *dst, char *end, const char *restrict fmt,
+ ...);
+extern inline char *vseprintf(char *dst, char *end, const char *restrict fmt,
+ va_list ap);
+#endif
--- /dev/null
+// SPDX-FileCopyrightText: 2022-2024, Alejandro Colomar <alx@kernel.org>
+// SPDX-License-Identifier: BSD-3-Clause
+
+
+#ifndef SHADOW_INCLUDE_LIB_STRING_SPRINTF_SEPRINTF_H_
+#define SHADOW_INCLUDE_LIB_STRING_SPRINTF_SEPRINTF_H_
+
+
+#include "config.h"
+
+#include <stdarg.h>
+#include <stddef.h>
+
+#include "attr.h"
+#include "string/sprintf/stprintf.h"
+
+
+#if !defined(HAVE_SEPRINTF)
+// seprintf - string end-pointer print formatted
+format_attr(printf, 3, 4)
+inline char *seprintf(char *dst, char *end, const char *restrict fmt, ...);
+// vseprintf - va_list string end-pointer print formatted
+format_attr(printf, 3, 0)
+inline char *vseprintf(char *dst, char *end, const char *restrict fmt,
+ va_list ap);
+#endif
+
+
+#if !defined(HAVE_SEPRINTF)
+inline char *
+seprintf(char *dst, char *end, const char *restrict fmt, ...)
+{
+ char *p;
+ va_list ap;
+
+ va_start(ap, fmt);
+ p = vseprintf(dst, end, fmt, ap);
+ va_end(ap);
+
+ return p;
+}
+#endif
+
+
+#if !defined(HAVE_SEPRINTF)
+inline char *
+vseprintf(char *dst, char *end, const char *restrict fmt, va_list ap)
+{
+ int len;
+ ptrdiff_t size;
+
+ if (dst == NULL)
+ return NULL;
+
+ size = end - dst;
+ len = vstprintf(dst, size, fmt, ap);
+ if (len == -1)
+ return NULL;
+
+ return dst + len;
+}
+#endif
+
+
+#endif // include guard
+++ /dev/null
-// SPDX-FileCopyrightText: 2022-2024, Alejandro Colomar <alx@kernel.org>
-// SPDX-License-Identifier: BSD-3-Clause
-
-
-#include "config.h"
-
-#include "string/sprintf/stpeprintf.h"
-
-#include <stdarg.h>
-
-
-#if !defined(HAVE_STPEPRINTF)
-extern inline char *stpeprintf(char *dst, char *end, const char *restrict fmt,
- ...);
-extern inline char *vstpeprintf(char *dst, char *end, const char *restrict fmt,
- va_list ap);
-#endif
+++ /dev/null
-// SPDX-FileCopyrightText: 2022-2024, Alejandro Colomar <alx@kernel.org>
-// SPDX-License-Identifier: BSD-3-Clause
-
-
-#ifndef SHADOW_INCLUDE_LIB_STRING_SPRINTF_STPEPRINTF_H_
-#define SHADOW_INCLUDE_LIB_STRING_SPRINTF_STPEPRINTF_H_
-
-
-#include "config.h"
-
-#include <stdarg.h>
-#include <stddef.h>
-
-#include "attr.h"
-#include "string/sprintf/stprintf.h"
-
-
-#if !defined(HAVE_STPEPRINTF)
-// stpeprintf - string offset-pointer end-pointer print formatted
-format_attr(printf, 3, 4)
-inline char *stpeprintf(char *dst, char *end, const char *restrict fmt, ...);
-// vstpeprintf - va_list string offset-pointer end-pointer print formatted
-format_attr(printf, 3, 0)
-inline char *vstpeprintf(char *dst, char *end, const char *restrict fmt,
- va_list ap);
-#endif
-
-
-#if !defined(HAVE_STPEPRINTF)
-inline char *
-stpeprintf(char *dst, char *end, const char *restrict fmt, ...)
-{
- char *p;
- va_list ap;
-
- va_start(ap, fmt);
- p = vstpeprintf(dst, end, fmt, ap);
- va_end(ap);
-
- return p;
-}
-#endif
-
-
-#if !defined(HAVE_STPEPRINTF)
-inline char *
-vstpeprintf(char *dst, char *end, const char *restrict fmt, va_list ap)
-{
- int len;
- ptrdiff_t size;
-
- if (dst == NULL)
- return NULL;
-
- size = end - dst;
- len = vstprintf(dst, size, fmt, ap);
- if (len == -1)
- return NULL;
-
- return dst + len;
-}
-#endif
-
-
-#endif // include guard
msgstr "%s: nepoznat član %s\n"
#, fuzzy, c-format
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "nepoznata grupa: %s\n"
#, fuzzy, c-format
msgstr "%s: No s'han pogut establir les «capabilities»\n"
#, c-format
-msgid "%s: stpeprintf failed!\n"
-msgstr "%s: ha fallat stpeprintf!\n"
+msgid "%s: seprintf failed!\n"
+msgstr "%s: ha fallat seprintf!\n"
#, c-format
msgid "%s: open of %s failed: %s\n"
#, fuzzy, c-format
#| msgid "%s: snprintf failed!\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: snprintf selhalo!\n"
#, c-format
#, fuzzy, c-format
#| msgid "%s: line %d: chown %s failed: %s\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: Linje %d: chown %s fejlede: %s\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: line %d: chown %s failed: %s\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: Zeile %d: chown %s (Eigentümer ändern) fehlgeschlagen: %s\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: ཡིག་སྣོད་ཁ་ཕྱེ་མི་ཚུགས།\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: αδυναμία ανοίγματος του αρχείου\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: no se puede abrir el fichero\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: line %d: chown %s failed: %s\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: %d lerroa: chown %s-ek huts egin du: %s\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: tiedosta ei voi avata\n"
#, fuzzy, c-format
msgstr "%s : Impossible de définir les plafonds\n"
#, c-format
-msgid "%s: stpeprintf failed!\n"
-msgstr "%s : échec de stpeprintf !\n"
+msgid "%s: seprintf failed!\n"
+msgstr "%s : échec de seprintf !\n"
#, c-format
msgid "%s: open of %s failed: %s\n"
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: non se pode abrir o ficheiro\n"
#, fuzzy, c-format
msgstr "לא יכול להקצות מקום בשביל מידע על הקונפיגורציה.\n"
#, fuzzy, c-format
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: שורה %d: לא יכול לעדכן רשומת סיסמה\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: nem tudom megnyitni a fájlt\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: tidak dapat membuka berkas\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: impossibile aprire il file\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: line %d: chown %s failed: %s\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: %d 行: chown %s が失敗しました: %s\n"
#, fuzzy, c-format
msgstr "%s: caps-ების დაყენების შედომა\n"
#, c-format
-msgid "%s: stpeprintf failed!\n"
-msgstr "%s: stpeprintf ჩავარდა!\n"
+msgid "%s: seprintf failed!\n"
+msgstr "%s: seprintf ჩავარდა!\n"
#, c-format
msgid "%s: open of %s failed: %s\n"
#, fuzzy, c-format
#| msgid "%s: line %d: chown %s failed: %s\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: жол %d: chown %s сәтсіз: %s\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s ៖ មិនអាចបើកឯកសារបានទេ\n"
#, fuzzy, c-format
msgstr "설정 정보를 위한 공간을 확보할 수 없습니다.\n"
#, fuzzy, c-format
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: %d번 줄: chown 실패했습니다\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: klarte ikke å åpne fil\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: फाइल खोल्न सकिएन\n"
#, fuzzy, c-format
msgstr "%s: Kon hoofdletters niet instellen\n"
#, c-format
-msgid "%s: stpeprintf failed!\n"
-msgstr "%s: stpeprintf is mislukt!\n"
+msgid "%s: seprintf failed!\n"
+msgstr "%s: seprintf is mislukt!\n"
#, c-format
msgid "%s: open of %s failed: %s\n"
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: klarer ikkje opna fil\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: nie można otworzyć pliku\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: line %d: chown %s failed: %s\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: linha %d: chown %s falhou: %s\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s : não foi possível abrir arquivo\n"
#, fuzzy, c-format
msgstr "%s: Nu s-au putut defini capacitățile\n"
#, c-format
-msgid "%s: stpeprintf failed!\n"
-msgstr "%s: stpeprintf a eșuat!\n"
+msgid "%s: seprintf failed!\n"
+msgstr "%s: seprintf a eșuat!\n"
#, c-format
msgid "%s: open of %s failed: %s\n"
#, fuzzy, c-format
#| msgid "%s: line %d: chown %s failed: %s\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: строка %d: вызов chown %s завершился неудачно: %s\n"
#, fuzzy, c-format
msgstr ""
#, c-format
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr ""
#, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: nedá sa otvoriť súbor\n"
#, fuzzy, c-format
msgstr "Kujdes: grup i panjohur %s\n"
#, fuzzy, c-format
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "Kujdes: grup i panjohur %s\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: line %d: chown %s failed: %s\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: rad %d: chown %s misslyckades: %s\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: hindi mabuksan ang talaksan\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: dosya açılamıyor\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: snprintf failed!\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: помилка snprintf!\n"
#, c-format
#, fuzzy, c-format
#| msgid "%s: line %d: chown %s failed: %s\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s: dòng %d: lỗi chown (thay đổi quyền sở hữu) %s: %s\n"
#, fuzzy, c-format
#, fuzzy, c-format
#| msgid "%s: snprintf failed!\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s:snprintf 失败\n"
#, c-format
#, fuzzy, c-format
#| msgid "%s: can't open file\n"
-msgid "%s: stpeprintf failed!\n"
+msgid "%s: seprintf failed!\n"
msgstr "%s:無法打開檔案\n"
#, fuzzy, c-format
#include "shadowlog.h"
#include "sizeof.h"
#include "sssd.h"
-#include "string/sprintf/stpeprintf.h"
+#include "string/sprintf/seprintf.h"
#include "string/strcmp/streq.h"
#include "string/strcpy/strtcpy.h"
#include "string/strdup/strdup.h"
/* Build the new GECOS field by plastering all the pieces together. */
p = new_gecos;
e = new_gecos + countof(new_gecos);
- p = stpeprintf(p, e, "%s", fullnm);
- p = stpeprintf(p, e, ",%s", roomno);
- p = stpeprintf(p, e, ",%s", workph);
- p = stpeprintf(p, e, ",%s", homeph);
+ p = seprintf(p, e, "%s", fullnm);
+ p = seprintf(p, e, ",%s", roomno);
+ p = seprintf(p, e, ",%s", workph);
+ p = seprintf(p, e, ",%s", homeph);
if (!streq(slop, ""))
- p = stpeprintf(p, e, ",%s", slop);
+ p = seprintf(p, e, ",%s", slop);
if (p == e || p == NULL) {
fprintf (stderr, _("%s: fields too long\n"), Prog);
#include "shadow/gshadow/sgrp.h"
#include "shadowlog.h"
#include "sssd.h"
-#include "string/sprintf/stpeprintf.h"
+#include "string/sprintf/seprintf.h"
#include "string/strcmp/streq.h"
#include "string/strcpy/stpecpy.h"
#include "string/strdup/strdup.h"
info_passwd.audit_msg = pw;
pw_end = pw + 512;
- gr = stpeprintf(gr, gr_end, "changing %s; ", gr_dbname ());
+ gr = seprintf(gr, gr_end, "changing %s; ", gr_dbname());
#ifdef SHADOWGRP
- sgr = stpeprintf(sgr, sgr_end, "changing %s; ", sgr_dbname ());
+ sgr = seprintf(sgr, sgr_end, "changing %s; ", sgr_dbname());
#endif
- pw = stpeprintf(pw, pw_end, "changing %s; ", pw_dbname ());
+ pw = seprintf(pw, pw_end, "changing %s; ", pw_dbname());
info_group.action = gr;
#ifdef SHADOWGRP
#endif
info_passwd.action = pw;
- gr = stpeprintf(gr, gr_end,
- "group %s/%ju", group_name, (uintmax_t) group_id);
+ gr = seprintf(gr, gr_end, "group %s/%ju", group_name, (uintmax_t) group_id);
#ifdef SHADOWGRP
- sgr = stpeprintf(sgr, sgr_end,
- "group %s", group_name);
+ sgr = seprintf(sgr, sgr_end, "group %s", group_name);
#endif
- pw = stpeprintf(pw, pw_end,
- "group %s/%ju", group_name, (uintmax_t) group_id);
+ pw = seprintf(pw, pw_end, "group %s/%ju", group_name, (uintmax_t) group_id);
if (nflg) {
gr = stpecpy(gr, gr_end, ", new name: ");
}
if (gflg) {
gr = stpecpy(gr, gr_end, ", new gid: ");
- stpeprintf(gr, gr_end, "%ju", (uintmax_t) group_newid);
+ seprintf(gr, gr_end, "%ju", (uintmax_t) group_newid);
pw = stpecpy(pw, pw_end, ", new gid: ");
- stpeprintf(pw, pw_end, "%ju", (uintmax_t) group_newid);
+ seprintf(pw, pw_end, "%ju", (uintmax_t) group_newid);
}
// FIXME: add a system cleanup