CVS code -
-
+- General
+ - Type misalignments and mem leaks in renumber_all, do_justify
+ and do_spell (Rocco & Steven Kneizys).
+
GNU nano 1.1.7 - 03/05/2002
- General
- malloc->calloc, etc cleanups (DLR).
int renumber_all(void)
{
filestruct *temp;
- long i = 1;
+ int i = 1;
for (temp = fileage; temp != NULL; temp = temp->next) {
temp->lineno = i++;
}
/* restore the search/replace strings */
- last_search = mallocstrcpy(last_search, save_search);
- last_replace = mallocstrcpy(last_replace, save_replace);
+ free(last_search); last_search=save_search;
+ free(last_replace); last_replace=save_replace;
+ free(prevanswer);
/* restore where we were */
current = begin;
if (write_file(temp, 1, 0, 0) == -1) {
statusbar(_("Spell checking failed: unable to write temp file!"));
+ free(temp);
return 0;
}
else
statusbar(_("Spell checking failed"));
+ free(temp);
return spell_res;
#endif
return 1;
#else
int slen = 0; /* length of combined lines on one line. */
- int initial_y, kbinput = 0, totbak;
+ int initial_y, kbinput = 0;
+ long totbak;
filestruct *initial = NULL, *tmpjust = NULL, *cutbak, *tmptop, *tmpbot;
filestruct *samecheck = current;
int qdepth = 0;