1
1

Unifying of g_strconcat() calls

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
Vit Rosin 2009-12-06 01:52:37 +00:00 коммит произвёл Slava Zanko
родитель ec5791b7af
Коммит b6875454b2
11 изменённых файлов: 20 добавлений и 23 удалений

Просмотреть файл

@ -366,7 +366,7 @@ edit_save_file (WEdit *edit, const char *filename)
if (this_save_mode == EDIT_DO_BACKUP) {
assert (option_backup_ext != NULL);
tmp = g_strconcat (real_filename, option_backup_ext,(char *) NULL);
tmp = g_strconcat (real_filename, option_backup_ext, (char *) NULL);
if (mc_rename (real_filename, tmp) == -1){
g_free(tmp);
goto error_save;
@ -835,7 +835,7 @@ int edit_save_confirm_cmd (WEdit * edit)
return 0;
if (edit_confirm_save) {
f = g_strconcat (_(" Confirm save file? : "), edit->filename, " ", NULL);
f = g_strconcat (_(" Confirm save file? : "), edit->filename, " ", (char *) NULL);
if (edit_query_dialog2 (_(" Save file "), f, _("&Save"), _("&Cancel"))){
g_free(f);
return 0;

Просмотреть файл

@ -310,7 +310,7 @@ get_file_type_local (const char *filename, char *buf, int buflen)
int read_bytes = 0;
char *tmp = name_quote (filename, 0);
char *command = g_strconcat (FILE_CMD, tmp, " 2>/dev/null", (char *) 0);
char *command = g_strconcat (FILE_CMD, tmp, " 2>/dev/null", (char *) NULL);
FILE *f = popen (command, "r");
g_free (tmp);

Просмотреть файл

@ -1969,7 +1969,7 @@ panel_operate (void *source_panel, FileOperation operation,
v = do_background (ctx,
g_strconcat (op_names[operation], ": ",
panel->cwd, NULL));
panel->cwd, (char *) NULL));
if (v == -1) {
message (D_ERROR, MSG_ERROR,
_(" Sorry, I could not put the job in background "));

Просмотреть файл

@ -1089,8 +1089,7 @@ static void remove_from_hotlist (struct hotlist *entry)
title = g_strconcat (_(" Remove: "),
str_trunc (entry->label, 30),
" ",
NULL);
" ", (char *) NULL);
if (safe_delete)
query_set_sel (1);
@ -1111,8 +1110,7 @@ static void remove_from_hotlist (struct hotlist *entry)
header = g_strconcat (_(" Remove: "),
str_trunc (entry->label, 30),
" ",
NULL);
" ", (char *) NULL);
result = query_dialog (header, _("\n Group not empty.\n Remove it?"),
D_ERROR, 2,
_("&Yes"), _("&No"));

Просмотреть файл

@ -1004,14 +1004,14 @@ static char
if (semi != NULL) {
slash = strchr (semi, PATH_SEP);
if (slash != NULL) {
result = g_strconcat (path, "/#enc:", encoding, NULL);
result = g_strconcat (path, "/#enc:", encoding, (char *) NULL);
} else {
*semi = 0;
result = g_strconcat (path, "/#enc:", encoding, NULL);
result = g_strconcat (path, "/#enc:", encoding, (char *) NULL);
*semi = '#';
}
} else {
result = g_strconcat (path, "/#enc:", encoding, NULL);
result = g_strconcat (path, "/#enc:", encoding, (char *) NULL);
}
return result;

Просмотреть файл

@ -702,7 +702,7 @@ execute_menu_command (WEdit *edit_widget, const char *commands)
} else {
/* execute the command indirectly to allow execution even
* on no-exec filesystems. */
char *cmd = g_strconcat("/bin/sh ", file_name, (char *)NULL);
char *cmd = g_strconcat("/bin/sh ", file_name, (char *) NULL);
shell_execute (cmd, EXECUTE_HIDE);
g_free(cmd);
}

Просмотреть файл

@ -342,7 +342,7 @@ button_get_text (const WButton *b)
{
if (b->text.hotkey != NULL)
return g_strconcat (b->text.start, "&", b->text.hotkey,
b->text.end, NULL);
b->text.end, (char *) NULL);
else
return g_strdup (b->text.start);
}

Просмотреть файл

@ -237,7 +237,7 @@ vfs_s_resolve_symlink (struct vfs_class *me, struct vfs_s_entry *entry,
if (*linkname != PATH_SEP) {
char *fullpath = vfs_s_fullpath (me, entry->dir);
if (fullpath) {
fullname = g_strconcat (fullpath, "/", linkname, NULL);
fullname = g_strconcat (fullpath, "/", linkname, (char *) NULL);
linkname = fullname;
g_free (fullpath);
}
@ -1017,7 +1017,8 @@ vfs_s_fill_names (struct vfs_class *me, fill_names_f func)
char *name;
while (a){
name = g_strconcat ( a->name, "#", me->prefix, "/", /* a->current_dir->name, */ NULL);
name = g_strconcat ( a->name, "#", me->prefix, "/",
/* a->current_dir->name, */ (char *) NULL);
(*func)(name);
g_free (name);
a = a->next;

Просмотреть файл

@ -492,8 +492,7 @@ fish_dir_load(struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path)
"else\n"
"echo '### 500'\n"
"fi\n"
,
NULL
, (char *) NULL
);
fish_command (me, super, NONE, shell_commands,

Просмотреть файл

@ -475,8 +475,8 @@ ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super,
} else { /* ask user */
char *p;
p = g_strconcat (_(" FTP: Password required for "), SUP.user, " ",
NULL);
p = g_strconcat (_(" FTP: Password required for "),
SUP.user, " ", (char *) NULL);
op = vfs_get_password (p);
g_free (p);
if (op == NULL)
@ -496,7 +496,7 @@ ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super,
name =
g_strconcat (SUP.user, "@",
SUP.host[0] == '!' ? SUP.host + 1 : SUP.host,
NULL);
(char *) NULL);
} else
name = g_strdup (SUP.user);
@ -890,7 +890,7 @@ ftpfs_get_current_directory (struct vfs_class *me, struct vfs_s_super *super)
/* If the remote server is an Amiga a leading slash
might be missing. MC needs it because it is used
as separator between hostname and path internally. */
return g_strconcat( "/", bufp, NULL);
return g_strconcat( "/", bufp, (char *) NULL);
}
} else {
ftpfs_errno = EIO;

Просмотреть файл

@ -368,8 +368,7 @@ smbfs_fill_names (struct vfs_class *me, fill_names_f func)
path = g_strconcat (URL_HEADER,
smbfs_connections[i].user, "@",
smbfs_connections[i].host,
"/", smbfs_connections[i].service,
NULL);
"/", smbfs_connections[i].service, (char *) NULL);
(*func)(path);
g_free (path);
}