01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
diff -ru lv451/src/command.c lv451.mod/src/command.c
--- lv451/src/command.c Mon Jan 5 16:42:31 2004
+++ lv451.mod/src/command.c Thu Feb 3 15:46:40 2005
@@ -1012,6 +1012,7 @@
}
f = files->file;
+ FallbackToInit( f );
f->find.displayed = FALSE;
CommandRestorePattern();
diff -ru lv451/src/conf.c lv451.mod/src/conf.c
--- lv451/src/conf.c Mon Jan 5 16:23:29 2004
+++ lv451.mod/src/conf.c Thu Feb 3 15:47:12 2005
@@ -72,6 +72,8 @@
private byte *lvHelpFile[ 2 ];
+private conf_t *global_conf; /* used in FallbackToInit */
+
private void ConfInitArgs( conf_t *conf )
{
#ifdef HAVE_SETLOCALE
@@ -403,6 +405,8 @@
while( *++argv )
ConfArg( conf, argv, "argument" );
+
+ global_conf = conf;
}
public void ConfInit( byte **argv )
@@ -444,4 +448,13 @@
} else {
return *( conf->file );
}
+}
+
+public void FallbackToInit( file_t *f )
+{
+ f->inputCodingSystem = global_conf->inputCodingSystem;
+ f->outputCodingSystem = global_conf->outputCodingSystem;
+ f->keyboardCodingSystem = global_conf->keyboardCodingSystem;
+ f->pathnameCodingSystem = global_conf->pathnameCodingSystem;
+ f->defaultCodingSystem = global_conf->defaultCodingSystem;
}
diff -ru lv451/src/conf.h lv451.mod/src/conf.h
--- lv451/src/conf.h Thu Nov 13 12:30:49 2003
+++ lv451.mod/src/conf.h Thu Feb 3 15:47:44 2005
@@ -28,5 +28,6 @@
public void ConfInit( byte **argv );
public void Conf( conf_t *conf, byte **argv );
public byte *ConfFilename( conf_t *conf );
+public void FallbackToInit( file_t *f );
#endif /* __CONF_H__ */