From: Holger Schemel Date: Fri, 23 Feb 2024 17:28:02 +0000 (+0100) Subject: replaced glib function calls to g_snprintf() X-Git-Tag: 4.4.0.0-test-1~303 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f2cc15ab6077384c6afd14e7cc5593e210d34c4e;p=rocksndiamonds.git replaced glib function calls to g_snprintf() --- diff --git a/src/game_bd/bd_c64import.c b/src/game_bd/bd_c64import.c index a88255d9..921c57f1 100644 --- a/src/game_bd/bd_c64import.c +++ b/src/game_bd/bd_c64import.c @@ -2355,9 +2355,9 @@ List *gd_caveset_import_from_buffer (const guint8 *buf, gsize length) /* no name, so we make up one */ if (newcave->intermission) - g_snprintf(newcave->name, sizeof(newcave->name), _("Intermission %d"), cavenum - 15); + snprintf(newcave->name, sizeof(newcave->name), _("Intermission %d"), cavenum - 15); else - g_snprintf(newcave->name, sizeof(newcave->name), _("Cave %c"), 'A' + cavenum); + snprintf(newcave->name, sizeof(newcave->name), _("Cave %c"), 'A' + cavenum); switch(format) { @@ -2407,9 +2407,9 @@ List *gd_caveset_import_from_buffer (const guint8 *buf, gsize length) newcave->selectable = cavenum % 5 == 0; /* original selection scheme */ if (newcave->intermission) - g_snprintf(newcave->name, sizeof(newcave->name), _("Intermission %d"), cavenum / 5 + 1); + snprintf(newcave->name, sizeof(newcave->name), _("Intermission %d"), cavenum / 5 + 1); else - g_snprintf(newcave->name, sizeof(newcave->name), _("Cave %c"), 'A'+(cavenum % 5 + cavenum / 5 * 4)); + snprintf(newcave->name, sizeof(newcave->name), _("Cave %c"), 'A'+(cavenum % 5 + cavenum / 5 * 4)); cavelength = cave_copy_from_dlb (newcave, buf + bufp, length - bufp); break; @@ -2509,14 +2509,14 @@ List *gd_caveset_import_from_buffer (const guint8 *buf, gsize length) { /* intermission */ if (numbering) - g_snprintf(cave->name, sizeof(cave->name), _("Intermission %02d"), num); + snprintf(cave->name, sizeof(cave->name), _("Intermission %02d"), num); else - g_snprintf(cave->name, sizeof(cave->name), _("Intermission %d"), intermissionnum); + snprintf(cave->name, sizeof(cave->name), _("Intermission %d"), intermissionnum); } else { if (numbering) - g_snprintf(cave->name, sizeof(cave->name), _("Cave %02d"), num); + snprintf(cave->name, sizeof(cave->name), _("Cave %02d"), num); else - g_snprintf(cave->name, sizeof(cave->name), _("Cave %c"), 'A' - 1 + cavenum); + snprintf(cave->name, sizeof(cave->name), _("Cave %c"), 'A' - 1 + cavenum); } num++; diff --git a/src/game_bd/bd_caveset.c b/src/game_bd/bd_caveset.c index 49b6e100..d04b54c7 100644 --- a/src/game_bd/bd_caveset.c +++ b/src/game_bd/bd_caveset.c @@ -318,11 +318,11 @@ static void brc_import(guint8 *data) imported[level * 20 + cavenum] = cave; if (cavenum < 16) - g_snprintf(cave->name, sizeof(GdString), "Cave %c/%d", 'A' + cavenum, - level + 1); + snprintf(cave->name, sizeof(GdString), "Cave %c/%d", 'A' + cavenum, + level + 1); else - g_snprintf(cave->name, sizeof(GdString), "Intermission %d/%d", - cavenum - 15, level + 1); + snprintf(cave->name, sizeof(GdString), "Intermission %d/%d", + cavenum - 15, level + 1); /* fixed intermission caves; are smaller. */ if (cavenum >= 16)