home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sgi / 16197 < prev    next >
Encoding:
Text File  |  1992-11-10  |  6.0 KB  |  220 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!munnari.oz.au!uniwa!cujo!lynchh
  3. From: lynchh@cs.curtin.edu.au (Huw Lynch)
  4. Subject: XView 3.0 Irix 4.0.5 & No-Locale Patch
  5. Message-ID: <lynchh.721406668@marsh>
  6. Summary: Patch to fix Irix 4.0.5 and XView 3.0 bug
  7. Keywords: XView 3.0 Irix 4.0.5 patch OsHasLocale
  8. Sender: news@cujo.curtin.edu.au (News Manager)
  9. Organization: Curtin University of Technology
  10. Date: Tue, 10 Nov 1992 14:44:28 GMT
  11. Lines: 207
  12.  
  13. SUBJECT : XView 3.0 patch file that :
  14.  
  15.       1. stops XView 3.0 hanging Irix 4.0.5 servers for _all_ client
  16.              architectures.
  17.  
  18.       2. For architectures that do not have OsHasLocale defined as YES
  19.              in XView.cf it reads the resource files XView and <xv_app_name>
  20.          from the system app-defaults file.
  21.  
  22. This is not a patch specifically for Irix machines, all architectures should
  23. use it (especially those that are networked to Irix machines and those
  24. that do not have OsHasLocale defined).
  25.  
  26. Action 1 is activated _only_ when the server identifies itself as a
  27.     "Silicon Graphics" version 4 server. When the buggy server is
  28.     detected the -Wfsdb option is forced (which fixes the problem).
  29.  
  30. Action 2 is automatically activated and configured when OsHasLocale is 
  31.       defined as NO in config/XView.cf. Naturally the <xv_app_name>
  32.     resources are given priority over those in XView and both have
  33.     lower priority than the command line and defaults loaded on the
  34.     server.
  35.     
  36. Files affected :
  37.  
  38.     xview3/lib/libxview/server/server.c
  39.     xview3/config/XView.tmpl
  40.  
  41. To apply this patch do the following...
  42.  
  43. cd <top of the XView 3.0 distribution>
  44. patch -p -s < <this file>
  45.  
  46.  
  47. This patch must be applied after the 2 official patches (Patch-01 & Patch-02).
  48.  
  49. By,
  50.  
  51. Huw Lynch
  52. ----------------------------------------------------------------------------
  53. lynchh@pride.cs.curtin.edu.au
  54. huw@gaius.curtin.edu.au
  55.  
  56.  
  57. *** ./config/XView.tmpl.old    Mon Nov  9 17:17:21 1992
  58. --- ./config/XView.tmpl    Fri Nov  6 15:40:19 1992
  59. ***************
  60. *** 99,106 ****
  61. --- 99,109 ----
  62.                 MKDIRHIER = BourneShell BinDir/mkdirhier
  63.   #endif
  64.   
  65. + /* HUW */
  66.   #if OsHasLocale
  67.            LOCALE_DEFINES = -DOS_HAS_LOCALE
  68. + #else
  69. +          LOCALE_DEFINES = -DNO_LOCALE_APP_DIR=\"$(XAPPLOADDIR)\"
  70.   #endif
  71.   
  72.   #if OsHasMmap
  73.  
  74.  
  75.  
  76. *** ./lib/libxview/server/server.c.old    Thu Oct 29 12:25:35 1992
  77. --- ./lib/libxview/server/server.c    Mon Nov  9 13:29:31 1992
  78. ***************
  79. *** 36,41 ****
  80. --- 36,43 ----
  81.   #include <X11/Xatom.h>
  82.   #include <X11/Xresource.h>
  83.   
  84. + #include <xview/fullscreen.h>    /* HUW: For Irix 4.0.5 patch */
  85.   #define    LIB_LOCALE    "/lib/locale/"
  86.   
  87.   #ifdef _XV_DEBUG
  88. ***************
  89. *** 307,312 ****
  90. --- 309,337 ----
  91.       xv_default_display = (Display *)server->xdisplay;
  92.       first_server = TRUE;
  93.       }
  94. +     /* HUW 
  95. +        SGI Irix 4.0.5 patch.
  96. +     
  97. +        This patch will avoid hanging Irix 4.0.5 servers and will not affect
  98. +        any other kind of server.
  99. +        Other special cases for other architectures could be chained on the
  100. +        end of this if statement.
  101. +     */
  102. +      if (strcmp(ServerVendor(server->xdisplay),"Silicon Graphics") == 0) {
  103. +         if (VendorRelease(server->xdisplay) == 4) {
  104. +        /* We have to set no grab mode to avoid hangs */
  105. +        fullscreendebug = 1;
  106. +       }
  107. +      }
  108.       /*
  109.        * Now that a server connection has been established, initialize the
  110.        * defaults database. Note - This assumes that server_init will be called
  111. ***************
  112. *** 356,362 ****
  113.        * Merge cmdline options into database
  114.        * Note:
  115.        * For the first server object created, this is actually
  116. !      * done twice. Once in xv_parse_cmdline() (in xv_init) and
  117.        * once here.
  118.        *
  119.        * xv_merge_cmdline() has to be called in xv_parse_cmdline()
  120. --- 381,387 ----
  121.        * Merge cmdline options into database
  122.        * Note:
  123.        * For the first server object created, this is actually
  124. !      * done twice. Once in xv_parse_cmdline() (in xv_
  125.        * once here.
  126.        *
  127.        * xv_merge_cmdline() has to be called in xv_parse_cmdline()
  128. ***************
  129. *** 388,393 ****
  130. --- 413,419 ----
  131.       server->localedir = NULL;
  132.   
  133.   #ifdef OS_HAS_LOCALE
  134.       if (_xv_use_locale) {
  135.       int    lc_ctype_read = FALSE;
  136.   
  137. ***************
  138. *** 628,634 ****
  139.       server->numeric = "C";
  140.       server->timeformat = "C";
  141.       }
  142. ! #endif OS_HAS_LOCALE
  143.       /*
  144.        * End of Sundae buyback code replacement for 
  145.        *    defaults_load_db(filename);
  146. --- 654,715 ----
  147.       server->numeric = "C";
  148.       server->timeformat = "C";
  149.       }
  150. ! /* #endif OS_HAS_LOCALE */
  151. ! #else
  152. ! #ifdef NO_LOCALE_APP_DIR
  153. !     /* HUW */
  154. !     /* Our OS doesn't have a locale but we still want to load in the
  155. !            Xview system defaults and the application defaults. This is patch 
  156. !        loads in the files XView and the file in xv_app_name from the
  157. !        system app-defaults directory if they exist.
  158. !        Defaults in xv_app_name override those of specified in the XView
  159. !        file.
  160. !            Both are overridden by any loaded above (i.e. the command line and
  161. !        defaults loaded on the server using xrdb).  
  162. !          */
  163. !      /* Only application specific stuff if there is an app name given */
  164. !          if (xv_app_name) {
  165. !         /* Construct the file name */
  166. !             strcpy(filename, NO_LOCALE_APP_DIR);
  167. !             strcat(filename,"/");
  168. !             strcat(filename, xv_app_name);
  169. !         /* Load the application defaults if there are some */
  170. !             if (new_db = XrmGetFileDatabase(filename)) {
  171. !                XrmMergeDatabases(server->db,&new_db);
  172. !                server->db = new_db;
  173. !                defaults_rdb = server->db;
  174. !             }
  175. !          }
  176. !  
  177. !          /* Load the XView defaults */
  178. !          strcpy(filename,NO_LOCALE_APP_DIR);
  179. !      strcat(filename,"/XView");
  180. !      if (new_db = XrmGetFileDatabase(filename)) {
  181. !         XrmMergeDatabases(server->db,&new_db);
  182. !         server->db = new_db;
  183. !         defaults_rdb = server->db;
  184. !      }
  185. ! #endif /* NO_LOCALE_APP_DIR */
  186. ! #endif /* not def OS_HAS_LOCALE */
  187.       /*
  188.        * End of Sundae buyback code replacement for 
  189.        *    defaults_load_db(filename);
  190.