Cleanup save_formats() by removing unused function argument.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@238 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
[Changes 1.2c01]
|
[Changes 1.2c01]
|
||||||
|
|
||||||
|
* Cleanup save_formats(). (caf)
|
||||||
|
|
||||||
* Fix off-by-one error in add_socketread() and set_socketwrite() found
|
* Fix off-by-one error in add_socketread() and set_socketwrite() found
|
||||||
by Coverity. (caf)
|
by Coverity. (caf)
|
||||||
|
|
||||||
|
|||||||
@@ -798,13 +798,14 @@ void create_fsets(Window *win, int ansi)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int save_formats(FILE *outfile)
|
int save_formats(void)
|
||||||
{
|
{
|
||||||
char thefile[BIG_BUFFER_SIZE+1];
|
FILE *outfile;
|
||||||
char *p;
|
char thefile[BIG_BUFFER_SIZE+1];
|
||||||
int i;
|
char *p;
|
||||||
int count = 0;
|
int i;
|
||||||
FsetNumber *tmp;
|
int count = 0;
|
||||||
|
FsetNumber *tmp;
|
||||||
|
|
||||||
#if defined(__EMX__) || defined(WINNT)
|
#if defined(__EMX__) || defined(WINNT)
|
||||||
sprintf(thefile, "%s/%s.fmt", get_string_var(CTOOLZ_DIR_VAR), version);
|
sprintf(thefile, "%s/%s.fmt", get_string_var(CTOOLZ_DIR_VAR), version);
|
||||||
@@ -813,10 +814,10 @@ FsetNumber *tmp;
|
|||||||
#endif
|
#endif
|
||||||
p = expand_twiddle(thefile);
|
p = expand_twiddle(thefile);
|
||||||
outfile = fopen(p, "w");
|
outfile = fopen(p, "w");
|
||||||
|
new_free(&p);
|
||||||
if (!outfile)
|
if (!outfile)
|
||||||
{
|
{
|
||||||
bitchsay("Cannot open file %s for saving!", thefile);
|
bitchsay("Cannot open file %s for saving!", thefile);
|
||||||
new_free(&p);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < NUMBER_OF_FSET; i++)
|
for (i = 0; i < NUMBER_OF_FSET; i++)
|
||||||
@@ -835,7 +836,6 @@ FsetNumber *tmp;
|
|||||||
|
|
||||||
fclose(outfile);
|
fclose(outfile);
|
||||||
bitchsay("Saved %d formats to %s", count, thefile);
|
bitchsay("Saved %d formats to %s", count, thefile);
|
||||||
new_free(&p);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ extern AJoinList *ajoin_list;
|
|||||||
|
|
||||||
extern void save_idle (FILE *);
|
extern void save_idle (FILE *);
|
||||||
extern void save_banwords (FILE *);
|
extern void save_banwords (FILE *);
|
||||||
extern int save_formats (FILE *);
|
extern int save_formats (void);
|
||||||
extern void sync_nicklist (UserList *, int);
|
extern void sync_nicklist (UserList *, int);
|
||||||
extern void sync_shitlist (ShitList *, int);
|
extern void sync_shitlist (ShitList *, int);
|
||||||
|
|
||||||
@@ -1671,7 +1671,7 @@ BUILT_IN_COMMAND(savelists)
|
|||||||
/* this looks like a bug but it isn't. formats are saved in a
|
/* this looks like a bug but it isn't. formats are saved in a
|
||||||
* differant file altogether.
|
* differant file altogether.
|
||||||
*/
|
*/
|
||||||
save_formats(outfile);
|
save_formats();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ static void set_ov_mode (Window *, char *, int);
|
|||||||
static void set_away_time (Window *, char *, int);
|
static void set_away_time (Window *, char *, int);
|
||||||
static void reinit_screen (Window *, char *, int);
|
static void reinit_screen (Window *, char *, int);
|
||||||
void reinit_status (Window *, char *, int);
|
void reinit_status (Window *, char *, int);
|
||||||
int save_formats (FILE *);
|
|
||||||
static void set_clock_format (Window *, char *, int);
|
static void set_clock_format (Window *, char *, int);
|
||||||
void create_fsets (Window *, int);
|
void create_fsets (Window *, int);
|
||||||
void setup_ov_mode (int, int, int);
|
void setup_ov_mode (int, int, int);
|
||||||
|
|||||||
Reference in New Issue
Block a user