- removed skipping . and .. when tabulating matches.
- Added the (char *) sizeof when allocating memory for the filename
array (Rocco).
+ do_writeout()
+ - Now takes an argument so the string typed in can be retained
+ when calling the browser.
do_browser()
- Don't decrement longest by the length of path. Fixes crashes
on entering various dirs (Rocco).
mallocstrcpy()
- Takes char pointers now instead of void (makes debugging a
helluva lot easier)
+ - Duh, don't do anything if src == dest!
- es.po:
- Updates for file browser (Jordi).
if (fd == -1) {
if (!tmp && ISSET(TEMP_OPT)) {
UNSET(TEMP_OPT);
- return do_writeout(1);
+ return do_writeout(filename, 1);
}
statusbar(_("Could not open file for writing: %s"),
strerror(errno));
if ((fd = mkstemp(buf)) == -1) {
if (ISSET(TEMP_OPT)) {
UNSET(TEMP_OPT);
- return do_writeout(1);
+ return do_writeout(filename, 1);
}
statusbar(_("Could not open file for writing: %s"),
strerror(errno));
return 1;
}
-int do_writeout(int exiting)
+int do_writeout(char *path, int exiting)
{
int i = 0;
#ifdef NANO_EXTRA
static int did_cred = 0;
#endif
+fprintf(stderr, "answer = %s, path = %s\n", answer, path);
- answer = mallocstrcpy(answer, filename);
+ answer = mallocstrcpy(answer, path);
if ((exiting) && (ISSET(TEMP_OPT))) {
if (filename[0]) {
if (tmp != NULL)
answer = mallocstrcpy(answer, tmp);
- else
- return do_writeout(exiting);
+ else {
+fprintf(stderr, "Answer = %s\n", answer);
+
+ return do_writeout(answer, exiting);
+ }
}
#endif
int do_writeout_void(void)
{
- return do_writeout(0);
+ return do_writeout(filename, 0);
}
#ifndef DISABLE_TABCOMP
int no_help(void);
int renumber_all(void);
int open_file(char *filename, int insert, int quiet);
-int do_writeout(int exiting);
+int do_writeout(char *path, int exiting);
int do_gotoline(long defline);
int do_replace_loop(char *prevanswer, filestruct *begin, int *beginx,
int wholewords, int *i);