freebsd-ports/x11-wm/fvwm95-i18n/files/patch-ag
SADA Kenji 5f37710d84 Branched x11-wm/fvwm95 -> fvwm95-i18n.
This has only Japanese resources for now.
Submitted by:	Yoshishige Arai <ryo2@on.rim.or.jp>
1998-11-22 14:54:11 +00:00

36 lines
1,020 B
Text

diff -urN ../fvwm95-2.0.43a-Autoconf.orig/fvwm/read.c ./fvwm/read.c
--- ../fvwm95-2.0.43a-Autoconf.orig/fvwm/read.c Sun Nov 22 04:58:47 1998
+++ ./fvwm/read.c Sun Nov 22 04:59:56 1998
@@ -133,6 +133,22 @@
if((filename != NULL)&&(filename!= ofilename))
free(filename);
/* find the home directory to look in */
+#ifdef I18N
+ if (Lang != NULL && strlen(Lang) > 0) {
+ Home = FVWMDIR;
+ HomeLen = strlen(Home);
+ home_file = safemalloc(HomeLen + strlen(ofilename)
+ + strlen(Lang) + 3);
+ strcpy(home_file,Home);
+ strcat(home_file,"/");
+ strcat(home_file, Lang);
+ strcat(home_file, "/");
+ strcat(home_file,ofilename);
+ filename = home_file;
+ fd = fopen(filename,"r");
+ }
+ if (fd == NULL) {
+#endif
Home = FVWMDIR;
HomeLen = strlen(Home);
home_file = safemalloc(HomeLen + strlen(ofilename)+3);
@@ -141,6 +157,9 @@
strcat(home_file,ofilename);
filename = home_file;
fd = fopen(filename,"r");
+#ifdef I18N
+ }
+#endif
}
}