From: Alejandro Colomar Date: Mon, 10 Feb 2025 14:06:34 +0000 (+0100) Subject: lib/, po/, src/: Rename stpeprintf() => seprintf() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8da922e7747f32b81176050ab12f2a0e9fffca07;p=thirdparty%2Fshadow.git lib/, po/, src/: Rename stpeprintf() => seprintf() The old name was too complex, and is inconsistent with all other sprintf(3)-based APIs having just one letter for differentiation. This allows breaking less lines. The original name was chosen for differentiation with the buggy Plan9 API seprint(2). However, 9front (the current fork where Plan9 is mainly developed) has acknowledged the bug. There's still no decision on fixing the bug or not, due to the age of their code base, and the projects depending on their library. It is under consideration inventing something like a seprint2(2) in 9front for replacement of seprint(2), but there's no decision yet either. Considering that 9front acknowledges their bug, and that they *may* release a fixed API with a similar name, we may as well claim that our seprintf() is also a fixed version of Plan9's seprint(2). It has a different name, after all (we terminate in 'f'). This commit was partially scripted with $ find * -type f \ | xargs grep -l stpeprintf \ | xargs sed -i 's/stpeprintf/seprintf/g'; Signed-off-by: Alejandro Colomar --- diff --git a/configure.ac b/configure.ac index f87c0a7b2..77ceb52f7 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,7 @@ AC_CHECK_FUNCS([arc4random_buf \ 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. diff --git a/lib/Makefile.am b/lib/Makefile.am index 1ee8f1aff..28ec53ef6 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -203,8 +203,8 @@ libshadow_la_SOURCES = \ 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 \ diff --git a/lib/idmapping.c b/lib/idmapping.c index 88a0c00e4..77631ec18 100644 --- a/lib/idmapping.c +++ b/lib/idmapping.c @@ -27,7 +27,7 @@ #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" @@ -184,13 +184,13 @@ void write_mapping(int proc_dir_fd, int ranges, const struct map_range *mappings 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); } diff --git a/lib/string/README b/lib/string/README index 78cd6c713..02b4bdc00 100644 --- a/lib/string/README +++ b/lib/string/README @@ -220,7 +220,7 @@ sprintf/ - Formatted string creation 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. diff --git a/lib/string/sprintf/seprintf.c b/lib/string/sprintf/seprintf.c new file mode 100644 index 000000000..3be154fe7 --- /dev/null +++ b/lib/string/sprintf/seprintf.c @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: 2022-2025, Alejandro Colomar +// SPDX-License-Identifier: BSD-3-Clause + + +#include "config.h" + +#include "string/sprintf/seprintf.h" + +#include + + +#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 diff --git a/lib/string/sprintf/seprintf.h b/lib/string/sprintf/seprintf.h new file mode 100644 index 000000000..e1a263780 --- /dev/null +++ b/lib/string/sprintf/seprintf.h @@ -0,0 +1,65 @@ +// SPDX-FileCopyrightText: 2022-2024, Alejandro Colomar +// 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 +#include + +#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 diff --git a/lib/string/sprintf/stpeprintf.c b/lib/string/sprintf/stpeprintf.c deleted file mode 100644 index d195931b8..000000000 --- a/lib/string/sprintf/stpeprintf.c +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-FileCopyrightText: 2022-2024, Alejandro Colomar -// SPDX-License-Identifier: BSD-3-Clause - - -#include "config.h" - -#include "string/sprintf/stpeprintf.h" - -#include - - -#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 diff --git a/lib/string/sprintf/stpeprintf.h b/lib/string/sprintf/stpeprintf.h deleted file mode 100644 index 4345722b5..000000000 --- a/lib/string/sprintf/stpeprintf.h +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-FileCopyrightText: 2022-2024, Alejandro Colomar -// 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 -#include - -#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 diff --git a/po/bs.po b/po/bs.po index 3f4181462..49d1fc2c7 100644 --- a/po/bs.po +++ b/po/bs.po @@ -205,7 +205,7 @@ msgid "%s: Could not set caps\n" 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 diff --git a/po/ca.po b/po/ca.po index 26457b447..a6efb1960 100644 --- a/po/ca.po +++ b/po/ca.po @@ -229,8 +229,8 @@ msgid "%s: Could not set caps\n" 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" diff --git a/po/cs.po b/po/cs.po index 615ce68e7..29ac71e99 100644 --- a/po/cs.po +++ b/po/cs.po @@ -228,7 +228,7 @@ msgstr "Nelze nastavit jméno uživatele %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 diff --git a/po/da.po b/po/da.po index 20666eddb..73ccfa8b0 100644 --- a/po/da.po +++ b/po/da.po @@ -244,7 +244,7 @@ msgstr "Kunne ikke angive navn for %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: Linje %d: chown %s fejlede: %s\n" #, fuzzy, c-format diff --git a/po/de.po b/po/de.po index 92d777fd6..bd8f04f4c 100644 --- a/po/de.po +++ b/po/de.po @@ -238,7 +238,7 @@ msgstr "Name für %s konnte nicht gesetzt werden\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: Zeile %d: chown %s (Eigentümer ändern) fehlgeschlagen: %s\n" #, fuzzy, c-format diff --git a/po/dz.po b/po/dz.po index 59771609f..1cb6713e6 100644 --- a/po/dz.po +++ b/po/dz.po @@ -215,7 +215,7 @@ msgstr "རིམ་སྒྲིག་བརྡ་དོན་གྱི་དོ #, 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 diff --git a/po/el.po b/po/el.po index 18fdc8a90..59c010eaa 100644 --- a/po/el.po +++ b/po/el.po @@ -238,7 +238,7 @@ msgstr "Αδυναμία ρύθμισης του ονόματος χρήστη % #, 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 diff --git a/po/es.po b/po/es.po index 54863bfad..e85b375db 100644 --- a/po/es.po +++ b/po/es.po @@ -264,7 +264,7 @@ msgstr "No se pudo reservar espacio para la información de configuración.\n" #, 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 diff --git a/po/eu.po b/po/eu.po index f78b0ea44..d6e2d4575 100644 --- a/po/eu.po +++ b/po/eu.po @@ -221,7 +221,7 @@ msgstr "Ezin izan da lekua esleitu, konfigurazioaren informaziorako.\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 lerroa: chown %s-ek huts egin du: %s\n" #, fuzzy, c-format diff --git a/po/fi.po b/po/fi.po index 94d4d1d7b..0774becb0 100644 --- a/po/fi.po +++ b/po/fi.po @@ -209,7 +209,7 @@ msgstr "Asetustiedoille ei voi varata tilaa.\n" #, 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 diff --git a/po/fr.po b/po/fr.po index 57c3531da..6132505fe 100644 --- a/po/fr.po +++ b/po/fr.po @@ -254,8 +254,8 @@ msgid "%s: Could not set caps\n" 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" diff --git a/po/gl.po b/po/gl.po index bbc7dfcc9..f702fbdc9 100644 --- a/po/gl.po +++ b/po/gl.po @@ -211,7 +211,7 @@ msgstr "Non se puido reservar espacio para a información de configuración.\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 diff --git a/po/he.po b/po/he.po index 1648c78d5..c667720fd 100644 --- a/po/he.po +++ b/po/he.po @@ -205,7 +205,7 @@ msgid "%s: Could not set caps\n" msgstr "לא יכול להקצות מקום בשביל מידע על הקונפיגורציה.\n" #, fuzzy, c-format -msgid "%s: stpeprintf failed!\n" +msgid "%s: seprintf failed!\n" msgstr "%s: שורה %d: לא יכול לעדכן רשומת סיסמה\n" #, fuzzy, c-format diff --git a/po/hu.po b/po/hu.po index e7bf22a7c..1d0691cb0 100644 --- a/po/hu.po +++ b/po/hu.po @@ -206,7 +206,7 @@ msgstr "Sikertelen helyfoglalás a beállítási infónak.\n" #, 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 diff --git a/po/id.po b/po/id.po index 4c070a075..3a71f0336 100644 --- a/po/id.po +++ b/po/id.po @@ -205,7 +205,7 @@ msgstr "Tidak dapat mengalokasikan ruang untuk informasi konfigurasi.\n" #, 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 diff --git a/po/it.po b/po/it.po index 4d3ec5cb9..37f6a0b27 100644 --- a/po/it.po +++ b/po/it.po @@ -232,7 +232,7 @@ msgstr "Impossibile allocare spazio per le informazioni di configurazione.\n" #, 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 diff --git a/po/ja.po b/po/ja.po index 426e3302c..2f32c0e80 100644 --- a/po/ja.po +++ b/po/ja.po @@ -231,7 +231,7 @@ msgstr "%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 diff --git a/po/ka.po b/po/ka.po index 945680968..a60101998 100644 --- a/po/ka.po +++ b/po/ka.po @@ -227,8 +227,8 @@ msgid "%s: Could not set caps\n" 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" diff --git a/po/kk.po b/po/kk.po index 60cb95cd3..988b96bde 100644 --- a/po/kk.po +++ b/po/kk.po @@ -229,7 +229,7 @@ msgstr "%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 diff --git a/po/km.po b/po/km.po index 513f28498..3e49c0177 100644 --- a/po/km.po +++ b/po/km.po @@ -219,7 +219,7 @@ msgstr "មិន​អាច​បម្រុង​ទុក​ទំហំ​ #, 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 diff --git a/po/ko.po b/po/ko.po index 980c30f38..89ea54d3e 100644 --- a/po/ko.po +++ b/po/ko.po @@ -212,7 +212,7 @@ msgid "%s: Could not set caps\n" msgstr "설정 정보를 위한 공간을 확보할 수 없습니다.\n" #, fuzzy, c-format -msgid "%s: stpeprintf failed!\n" +msgid "%s: seprintf failed!\n" msgstr "%s: %d번 줄: chown 실패했습니다\n" #, fuzzy, c-format diff --git a/po/nb.po b/po/nb.po index 1eb1e3be3..33e61d3ba 100644 --- a/po/nb.po +++ b/po/nb.po @@ -251,7 +251,7 @@ msgstr "Klarte ikke å endre navn på %s\n" #, 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 diff --git a/po/ne.po b/po/ne.po index 08f423fab..abcea0892 100644 --- a/po/ne.po +++ b/po/ne.po @@ -212,7 +212,7 @@ msgstr "कनफिगरेसन सूचनाको लागि खाल #, 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 diff --git a/po/nl.po b/po/nl.po index aa824d337..79ec110c7 100644 --- a/po/nl.po +++ b/po/nl.po @@ -232,8 +232,8 @@ msgid "%s: Could not set caps\n" 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" diff --git a/po/nn.po b/po/nn.po index 60b7b5371..e00c1bb02 100644 --- a/po/nn.po +++ b/po/nn.po @@ -205,7 +205,7 @@ msgstr "Klarte ikkje finna plass for oppsettsinformasjon.\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 diff --git a/po/pl.po b/po/pl.po index 259d2c10b..c1dfdea14 100644 --- a/po/pl.po +++ b/po/pl.po @@ -216,7 +216,7 @@ msgstr "Nie można przydzielić miejsca dla informacji o konfiguracji.\n" #, 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 diff --git a/po/pt.po b/po/pt.po index cdc219556..6620c9162 100644 --- a/po/pt.po +++ b/po/pt.po @@ -243,7 +243,7 @@ msgstr "Não foi possível definir nome para %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: linha %d: chown %s falhou: %s\n" #, fuzzy, c-format diff --git a/po/pt_BR.po b/po/pt_BR.po index e1e2c6a83..6094bb4ee 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -235,7 +235,7 @@ msgstr "Não foi possível alocar espaço para a informação de configuração. #, 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 diff --git a/po/ro.po b/po/ro.po index a3e1b53b5..062c84749 100644 --- a/po/ro.po +++ b/po/ro.po @@ -242,8 +242,8 @@ msgid "%s: Could not set caps\n" 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" diff --git a/po/ru.po b/po/ru.po index ba4787cc8..d70989ff0 100644 --- a/po/ru.po +++ b/po/ru.po @@ -244,7 +244,7 @@ msgstr "Невозможно задать имя для %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 diff --git a/po/shadow.pot b/po/shadow.pot index 539d387da..1c3f94f1c 100644 --- a/po/shadow.pot +++ b/po/shadow.pot @@ -205,7 +205,7 @@ msgid "%s: Could not set caps\n" msgstr "" #, c-format -msgid "%s: stpeprintf failed!\n" +msgid "%s: seprintf failed!\n" msgstr "" #, c-format diff --git a/po/sk.po b/po/sk.po index bd632aedf..1518c234e 100644 --- a/po/sk.po +++ b/po/sk.po @@ -218,7 +218,7 @@ msgstr "Na konfiguračné údaje sa nedá vyhradiť dostatok miesta.\n" #, 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 diff --git a/po/sq.po b/po/sq.po index 796c11755..eb4983f8d 100644 --- a/po/sq.po +++ b/po/sq.po @@ -206,7 +206,7 @@ msgid "%s: Could not set caps\n" 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 diff --git a/po/sv.po b/po/sv.po index e7d79859b..0a7d789d0 100644 --- a/po/sv.po +++ b/po/sv.po @@ -231,7 +231,7 @@ msgstr "Kunde inte allokera plats för konfigurationsinformationen.\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: rad %d: chown %s misslyckades: %s\n" #, fuzzy, c-format diff --git a/po/tl.po b/po/tl.po index a104c11bb..95a4aa1c4 100644 --- a/po/tl.po +++ b/po/tl.po @@ -219,7 +219,7 @@ msgstr "Hindi makapaglaan ng lugar para sa impormasyong pagsasaayos.\n" #, 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 diff --git a/po/tr.po b/po/tr.po index 91c2a541a..e03d47648 100644 --- a/po/tr.po +++ b/po/tr.po @@ -211,7 +211,7 @@ msgstr "Yapılandırma bilgileri için yer ayrılamadı.\n" #, 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 diff --git a/po/uk.po b/po/uk.po index 4fbb2eb82..1dc3cfe2f 100644 --- a/po/uk.po +++ b/po/uk.po @@ -235,7 +235,7 @@ msgstr "%s: не вдалося встановити можливості\n" #, fuzzy, c-format #| msgid "%s: snprintf failed!\n" -msgid "%s: stpeprintf failed!\n" +msgid "%s: seprintf failed!\n" msgstr "%s: помилка snprintf!\n" #, c-format diff --git a/po/vi.po b/po/vi.po index ac1663886..9191e4b0b 100644 --- a/po/vi.po +++ b/po/vi.po @@ -237,7 +237,7 @@ msgstr "Không thể đặt tên %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òng %d: lỗi chown (thay đổi quyền sở hữu) %s: %s\n" #, fuzzy, c-format diff --git a/po/zh_CN.po b/po/zh_CN.po index d1efe715a..7bcf8d0de 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -213,7 +213,7 @@ msgstr "%s:无法设置上限\n" #, fuzzy, c-format #| msgid "%s: snprintf failed!\n" -msgid "%s: stpeprintf failed!\n" +msgid "%s: seprintf failed!\n" msgstr "%s:snprintf 失败\n" #, c-format diff --git a/po/zh_TW.po b/po/zh_TW.po index be5782cfa..cdd64d856 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -224,7 +224,7 @@ msgstr "無法設定 %s 的名稱\n" #, 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 diff --git a/src/chfn.c b/src/chfn.c index 28117655f..71875253e 100644 --- a/src/chfn.c +++ b/src/chfn.c @@ -35,7 +35,7 @@ #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" @@ -653,12 +653,12 @@ int main (int argc, char **argv) /* 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); diff --git a/src/groupmod.c b/src/groupmod.c index b019c0103..e535a9e88 100644 --- a/src/groupmod.c +++ b/src/groupmod.c @@ -35,7 +35,7 @@ #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" @@ -597,11 +597,11 @@ static void prepare_failure_reports (void) 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 @@ -609,14 +609,11 @@ static void prepare_failure_reports (void) #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: "); @@ -636,10 +633,10 @@ static void prepare_failure_reports (void) } 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