Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #892240 ยป 0018-Add-space-between-and-where-appropriate.patch

Marko Lindqvist, 2020-10-22 06:26 AM

View differences:

client/gui-sdl2/dialogs.c
is_unit_move_blocked = TRUE;
pUnit_Select_Dlg = fc_calloc(1, sizeof(struct ADVANCED_DLG));
fc_snprintf(cBuf , sizeof(cBuf),"%s (%d)", _("Unit selection") , n);
fc_snprintf(cBuf , sizeof(cBuf), "%s (%d)", _("Unit selection") , n);
pstr = create_utf8_from_char(cBuf , adj_font(12));
pstr->style |= TTF_STYLE_BOLD;
client/gui-sdl2/menu.c
struct road_type *prail;
/* No orders */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("No Orders"),
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("No Orders"),
/* TRANS: "Space" refers to the space bar on a keyboard. */
_("Space"));
pBuf = create_themeicon(current_theme->ODone_Icon, Main.gui,
......
pEndOrderWidgetList = pBuf;
/* Wait */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Wait"), "W");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Wait"), "W");
pBuf = create_themeicon(current_theme->OWait_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Explode Nuclear */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)",
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)",
action_id_name_translation(ACTION_NUKE), "Shift+N");
pBuf = create_themeicon(current_theme->ONuke_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
......
/* Act against the specified tile. */
/* TRANS: Button to bring up the action selection dialog. */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Do..."), "D");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Do..."), "D");
pBuf = create_themeicon(current_theme->OSpy_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Disband */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Disband Unit"), "Shift+D");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Disband Unit"), "Shift+D");
pBuf = create_themeicon(current_theme->ODisband_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Upgrade */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Upgrade Unit"), "Shift+U");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Upgrade Unit"), "Shift+U");
pBuf = create_themeicon(current_theme->Order_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Convert */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Convert Unit"), "Shift+O");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Convert Unit"), "Shift+O");
pBuf = create_themeicon(current_theme->Order_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Return to nearest city */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Return to Nearest City"), "Shift+G");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)",
_("Return to Nearest City"), "Shift+G");
pBuf = create_themeicon(current_theme->OReturn_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Goto City */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Go to City"), "T");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Go to City"), "T");
pBuf = create_themeicon(current_theme->OGotoCity_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Airlift */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Airlift to City"), "T");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Airlift to City"), "T");
pBuf = create_themeicon(current_theme->Order_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Goto location */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Go to Tile"), "G");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Go to Tile"), "G");
pBuf = create_themeicon(current_theme->OGoto_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Patrol */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Patrol"), "Q");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Patrol"), "Q");
pBuf = create_themeicon(current_theme->OPatrol_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Connect irrigation */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Connect With Irrigation"),
"Ctrl+I");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)",
_("Connect With Irrigation"), "Ctrl+I");
pBuf = create_themeicon(current_theme->OAutoConnect_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Auto-Explore */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Auto Explore"), "X");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Auto Explore"), "X");
pBuf = create_themeicon(current_theme->OAutoExp_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Auto-Settler */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Auto Settler"), "A");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Auto Settler"), "A");
pBuf = create_themeicon(current_theme->OAutoSett_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
......
/* --------- */
/* Wake Up Others */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Unsentry All On Tile"), "Shift+S");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)",
_("Unsentry All On Tile"), "Shift+S");
pBuf = create_themeicon(current_theme->OWakeUp_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Unload */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Unload All From Transporter"), "Shift+T");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)",
_("Unload All From Transporter"), "Shift+T");
pBuf = create_themeicon(current_theme->OUnload_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Load */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Load Unit"), "L");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Load Unit"), "L");
pBuf = create_themeicon(current_theme->OLoad_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Unload */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Unload Unit"), "U");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Unload Unit"), "U");
pBuf = create_themeicon(current_theme->OUnload_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Find Homecity */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)",
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)",
action_id_name_translation(ACTION_HOME_CITY), "H");
pBuf = create_themeicon(current_theme->OHomeCity_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
......
/* --------- */
/* Pillage */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Pillage"), "Shift+P");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Pillage"), "Shift+P");
pBuf = create_themeicon(current_theme->OPillage_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Sentry */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Sentry Unit"), "S");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Sentry Unit"), "S");
pBuf = create_themeicon(current_theme->OSentry_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Paradrop */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)",
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)",
action_id_name_translation(ACTION_PARADROP), "P");
pBuf = create_themeicon(current_theme->OParaDrop_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
......
/* --------- */
/* Fortify */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)", _("Fortify Unit"), "F");
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)", _("Fortify Unit"), "F");
pBuf = create_themeicon(current_theme->OFortify_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
| WF_WIDGET_HAS_INFO_LABEL);
......
/* --------- */
/* Help Build Wonder */
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)",
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)",
action_id_name_translation(ACTION_HELP_WONDER), "B");
pBuf = create_themeicon(current_theme->OWonder_Icon, Main.gui,
WF_HIDDEN | WF_RESTORE_BACKGROUND
......
if (unit_can_add_or_build_city(pUnit)) {
if (pCity) {
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)",
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)",
action_id_name_translation(ACTION_JOIN_CITY), "B");
} else {
fc_snprintf(cBuf, sizeof(cBuf),"%s (%s)",
fc_snprintf(cBuf, sizeof(cBuf), "%s (%s)",
action_id_name_translation(ACTION_FOUND_CITY), "B");
}
copy_chars_to_utf8_str(pOrder_Build_AddTo_City_Button->info_label,
......
if (can_unit_do_activity(pUnit, ACTIVITY_CULTIVATE)) {
/* Activity always results in terrain change */
time = turns_to_activity_done(pTile, ACTIVITY_CULTIVATE, NULL, pUnit);
fc_snprintf(cBuf, sizeof(cBuf),"%s %s (%s) %d %s",
fc_snprintf(cBuf, sizeof(cBuf), "%s %s (%s) %d %s",
_("Cultivate to"),
terrain_name_translation(pTerrain->cultivate_result),
"Shift+I", time, PL_("turn", "turns", time));
......
if (can_unit_do_activity(pUnit, ACTIVITY_PLANT)) {
/* Activity always results in terrain change */
time = turns_to_activity_done(pTile, ACTIVITY_PLANT, NULL, pUnit);
fc_snprintf(cBuf, sizeof(cBuf),"%s %s (%s) %d %s",
fc_snprintf(cBuf, sizeof(cBuf), "%s %s (%s) %d %s",
_("Plant to"),
terrain_name_translation(pTerrain->plant_result),
"Shift+M", time, PL_("turn", "turns", time));
......
if (can_unit_do_activity(pUnit, ACTIVITY_TRANSFORM)) {
/* Activity always results in terrain change */
time = turns_to_activity_done(pTile, ACTIVITY_TRANSFORM, NULL, pUnit);
fc_snprintf(cBuf, sizeof(cBuf),"%s %s (%s) %d %s",
fc_snprintf(cBuf, sizeof(cBuf), "%s %s (%s) %d %s",
_("Transform to"),
terrain_name_translation(pTerrain->transform_result),
"O", time, PL_("turn", "turns", time));
common/scriptcore/luascript.c
/* The following is similar to tolua_release(..) in src/lib/tolua_map.c */
/* Find the userdata representing 'object' */
lua_pushstring(fcl->state,"tolua_ubox");
lua_pushstring(fcl->state, "tolua_ubox");
/* stack: ubox */
lua_rawget(fcl->state, LUA_REGISTRYINDEX);
/* stack: ubox u */
server/console.c
rl_forced_update_display();
}
#else /* FREECIV_HAVE_LIBREADLINE */
con_dump(C_READY,"> ");
con_dump(C_READY, "> ");
con_flush();
#endif /* FREECIV_HAVE_LIBREADLINE */
......
Write to console and add line-break, and show prompt if required.
Same as con_write, but without the format string stuff.
The real reason for this is because __attribute__ complained
with con_write(C_COMMENT,"") of "warning: zero-length format string";
this allows con_puts(C_COMMENT,"");
with con_write(C_COMMENT, "") of "warning: zero-length format string";
this allows con_puts(C_COMMENT, "");
************************************************************************/
void con_puts(enum rfc_status rfc_status, const char *str)
{
server/ruleset.c
for (j = 0; j < nflags; j++) {
sval = slist[j];
if (strcmp(sval,"") == 0) {
if (strcmp(sval, "") == 0) {
continue;
}
ival = impr_flag_id_by_name(sval, fc_strcasecmp);
......
const char *cstr;
sz_strlcpy(pterrain->graphic_str,
secfile_lookup_str(file,"%s.graphic", tsection));
secfile_lookup_str(file, "%s.graphic", tsection));
sz_strlcpy(pterrain->graphic_alt,
secfile_lookup_str(file,"%s.graphic_alt", tsection));
secfile_lookup_str(file, "%s.graphic_alt", tsection));
pterrain->identifier
= secfile_lookup_str(file, "%s.identifier", tsection)[0];
......
} output_type_iterate_end;
sz_strlcpy(identifier,
secfile_lookup_str(file,"%s.identifier", rsection));
secfile_lookup_str(file, "%s.identifier", rsection));
presource->data.resource->id_old_save = identifier[0];
if (RESOURCE_NULL_IDENTIFIER == presource->data.resource->id_old_save) {
ruleset_error(LOG_ERROR, "\"%s\" [%s] identifier missing value.",
......
}
section = &base_sections[base_number(pbase) * MAX_SECTION_LABEL];
gui_str = secfile_lookup_str(file,"%s.gui_type", section);
gui_str = secfile_lookup_str(file, "%s.gui_type", section);
pbase->gui_type = base_gui_type_by_name(gui_str, fc_strcasecmp);
if (!base_gui_type_is_valid(pbase->gui_type)) {
ruleset_error(LOG_ERROR, "\"%s\" base \"%s\": unknown gui_type \"%s\".",
......
}
if (ival < min) {
ruleset_error(LOG_ERROR,"\"%s\" should be in the interval [%d, %d] "
ruleset_error(LOG_ERROR, "\"%s\" should be in the interval [%d, %d] "
"but is %d; using the minimal value.",
fullpath, min, max, ival);
ival = min;
}
if (ival > max) {
ruleset_error(LOG_ERROR,"\"%s\" should be in the interval [%d, %d] "
ruleset_error(LOG_ERROR, "\"%s\" should be in the interval [%d, %d] "
"but is %d; using the maximal value.",
fullpath, min, max, ival);
ival = max;
utility/ioz.c
lzma_ret ret;
/* xz files are binary files, so we should add "b" to mode! */
sz_strlcat(mode,"b");
sz_strlcat(mode, "b");
memset(&fp->u.xz.stream, 0, sizeof(lzma_stream));
ret = lzma_easy_encoder(&fp->u.xz.stream, compress_level, LZMA_CHECK_CRC32);
fp->u.xz.error = ret;
......
#ifdef FREECIV_HAVE_LIBBZ2
case FZ_BZIP2:
/* bz2 files are binary files, so we should add "b" to mode! */
sz_strlcat(mode,"b");
sz_strlcat(mode, "b");
fp->u.bz2.plain = fc_fopen(filename, mode);
if (fp->u.bz2.plain) {
/* Open for read handled earlier */
......
#ifdef FREECIV_HAVE_LIBZ
case FZ_ZLIB:
/* gz files are binary files, so we should add "b" to mode! */
sz_strlcat(mode,"b");
sz_strlcat(mode, "b");
if (mode[0] == 'w') {
cat_snprintf(mode, sizeof(mode), "%d", compress_level);
}
utility/netfile.c
handle = netfile_init_handle();
headers = curl_slist_append(headers,"User-Agent: Freeciv/" VERSION_STRING);
headers = curl_slist_append(headers, "User-Agent: Freeciv/" VERSION_STRING);
curl_easy_setopt(handle, CURLOPT_URL, URL);
if (mem_data != NULL) {
......
handle = netfile_init_handle();
headers = curl_slist_append(headers,"User-Agent: Freeciv/" VERSION_STRING);
headers = curl_slist_append(headers, "User-Agent: Freeciv/" VERSION_STRING);
curl_easy_setopt(handle, CURLOPT_URL, URL);
curl_easy_setopt(handle, CURLOPT_HTTPPOST, post->first);
    (1-1/1)