* edit.h (catstrs): Changed the return type to "const char *".

* editcmd.c (catstrs): Likewise.
	* edit.c (user_menu): Added const qualifiers.
	* editcmd.c: Likewise.
	* syntax.c: Likewise.
This commit is contained in:
Roland Illig 2005-02-07 06:02:59 +00:00
parent a8de548480
commit 64eed6e12b
5 changed files with 17 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2005-02-07 Roland Illig <roland.illig@gmx.de>
* edit.h (catstrs): Changed the return type to "const char *".
* editcmd.c (catstrs): Likewise.
* edit.c (user_menu): Added const qualifiers.
* editcmd.c: Likewise.
* syntax.c: Likewise.
2005-02-07 Roland Illig <roland.illig@gmx.de>
* edit.c: Improved message formatting.

View File

@ -2641,7 +2641,7 @@ user_menu (WEdit * edit)
int nomark;
struct stat status;
long start_mark, end_mark;
char *block_file = catstrs (home_dir, BLOCK_FILE, (char *) NULL);
const char *block_file = catstrs (home_dir, BLOCK_FILE, (char *) NULL);
int rc = 0;
nomark = eval_marks (edit, &start_mark, &end_mark);

View File

@ -186,7 +186,7 @@ int edit_save_block_cmd (WEdit * edit);
int edit_insert_file_cmd (WEdit * edit);
int edit_insert_file (WEdit * edit, const char *filename);
void edit_block_process_cmd (WEdit * edit, const char *shell_cmd, int block);
char *catstrs (const char *first, ...);
const char *catstrs (const char *first, ...);
void freestrs (void);
void edit_refresh_cmd (WEdit * edit);
void edit_date_cmd (WEdit * edit);

View File

@ -131,7 +131,7 @@ static char *stacked[16];
The result is later automatically free'd and must not be free'd
by the caller.
*/
char *catstrs (const char *first,...)
const char *catstrs (const char *first,...)
{
static int i = 0;
va_list ap;
@ -583,7 +583,7 @@ edit_raw_key_query (const char *heading, const char *query, int cancel)
/* creates a macro file if it doesn't exist */
static FILE *edit_open_macro_file (const char *r)
{
char *filename;
const char *filename;
int file;
filename = catstrs (home_dir, MACRO_FILE, (char *) NULL);
if ((file = open (filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1)
@ -761,7 +761,7 @@ int edit_load_macro_cmd (WEdit * edit, struct macro macro[], int *n, int k)
/* returns 1 on success */
int edit_save_confirm_cmd (WEdit * edit)
{
char *f;
const char *f;
if (edit_confirm_save) {
f = catstrs (_(" Confirm save file? : "), edit->filename, " ", (char *) NULL);
@ -2452,9 +2452,9 @@ edit_block_process_cmd (WEdit *edit, const char *shell_cmd, int block)
FILE *script_home = NULL;
FILE *script_src = NULL;
FILE *block_file = NULL;
char *o = NULL;
char *h = NULL;
char *b = NULL;
const char *o = NULL;
const char *h = NULL;
const char *b = NULL;
char *quoted_name = NULL;
o = catstrs (mc_home, shell_cmd, (char *) NULL); /* original source script */

View File

@ -1094,7 +1094,7 @@ void
edit_load_syntax (WEdit *edit, char **names, const char *type)
{
int r;
char *f;
const char *f;
edit_free_syntax_rules (edit);