]> code.delx.au - gnu-emacs/blobdiff - src/sunfns.c
* window.c (Fwindow_live_p): Use WINDOW_LIVE_P.
[gnu-emacs] / src / sunfns.c
index aa65ba10aee3b136300d202a51f65a9a5da7710a..065e2490828fa1d54f006578c308f7ba04a062a6 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions for Sun Windows menus and selection buffer.
-   Copyright (C) 1987 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1999 Free Software Foundation, Inc.
 
 This file is probably totally obsolete.  In any case, the FSF is
 unwilling to support it.  We agreed to include it in our distribution
@@ -25,7 +25,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 /* Author: Jeff Peck, Sun Microsystems, Inc. <peck@sun.com>
 Original ideas by David Kastan and Eric Negaard, SRI International
@@ -119,7 +120,7 @@ or -1 if can not open it.")
 
   if ((! already_initialized) || (!NILP(force))) {
     cp = getenv("WINDOW_GFX");
-    if (cp != 0) win_fd = open(cp, 2);
+    if (cp != 0) win_fd = emacs_open (cp, O_RDWR, 0);
     if (win_fd > 0)
       {
        Sun_Font = pf_default();
@@ -163,7 +164,7 @@ Redisplay does not happen if input is available before it starts.")
   Timeout.tv_usec = (XINT(n) - (Timeout.tv_sec * 1000)) * 1000;
 
   if (detect_input_pending()) return(Qnil);
-  redisplay_preserve_echo_area ();
+  redisplay_preserve_echo_area (16);
   /*
    *   Check for queued keyboard input/mouse hits again
    *   (A bit screen update can take some time!)
@@ -196,7 +197,7 @@ DEFUN ("update-display", Fupdate_display, Supdate_display, 0, 0, 0,
        "Perform redisplay.")
      ()
 {
-  redisplay_preserve_echo_area ();
+  redisplay_preserve_echo_area (17);
   return(Qt);
 }
 
@@ -452,14 +453,14 @@ as a menu label.")
 
   CHECK_GFX (Qnil);
 
-  xpos = CtoSX (XWINDOW(window)->left + XINT(X_Position));
+  xpos = CtoSX (WINDOW_LEFT_MARGIN (XWINDOW (window)) + XINT(X_Position));
   ypos = CtoSY (XWINDOW(window)->top  + XINT(Y_Position));
 #ifdef  Menu_Base_Kludge
   {static Lisp_Object symbol[2];
    symbol[0] = Fintern (sm_kludge_string, Qnil);
    Pair = Ffuncall (1, symbol);
-   xpos += XINT (XCONS (Pair)->cdr);
-   ypos += XINT (XCONS (Pair)->car);
+   xpos += XINT (XCDR (Pair));
+   ypos += XINT (XCAR (Pair));
  }
 #endif
 
@@ -497,7 +498,7 @@ syms_of_sunfns()
 #ifdef  Menu_Base_Kludge
   /* i'm just too lazy to re-write this into C code */
   /* so we will call this elisp function from C */
-  sm_kludge_string = make_pure_string ("sm::menu-kludge", 15);
+  sm_kludge_string = make_pure_string ("sm::menu-kludge", 15, 15, 0);
 #endif /* Menu_Base_Kludge */
 
   defsubr(&Ssun_window_init);