× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> Also new in this release is automatic installation of the X5250 resource
> file so your sessions should look reasonable without any manual
> configuration (of course you are always welcome to customize everything
> just the way you like).

The resources file still doesn't work, so I looked at it a little bit.
During compile, I see the following:

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/local/include
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
-DDATADIR=\"/usr/local/share\" -g -O2 -c resources.c

And, in the code I see this:

  char *classname = "X5250";
  char name[255];

  strcpy (name, DATADIR);
  strcat (name, "/");
  strcat (name, classname);

If I'm reading that right, it takes DATADIR (which should be
/usr/local/share, from the compile command above) and adds a slash
followed by the contents of "classname" which is "X5250."

If I'm correct, that gives me:
   /usr/local/share/X5250

However, during install, I see this:

 /usr/bin/install -c -m 644 X5250 /usr/local/share/x5250/X5250

Looks like you remembered to add "x5250" to the directory when installing
it, but not when constructing the pathname in resources.c

Also, what if DATADIR is long and then it tries to copy more than 255
chars into the 'name' variable?  You'll end up with a mess!  I solved both
problems on my system with the following change:

--- resources.c.orig    Tue Oct 26 01:21:43 2004
+++ resources.c Tue Oct 26 01:22:33 2004
@@ -172,14 +172,9 @@
   char filenamebuf[1024];
   char *filename = &filenamebuf[0];
   char *environment;
-  char *classname = "X5250";
-  char name[255];

-  strcpy (name, DATADIR);
-  strcat (name, "/");
-  strcat (name, classname);
   /* get application defaults file, if any */
-  applicationDB = XrmGetFileDatabase (name);
+  applicationDB = XrmGetFileDatabase (DATADIR "/x5250/X5250");
   XrmMergeDatabases (applicationDB, &rDB);

   /* MERGE server defaults, these are created by xrdb, loaded as a



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.