]> code.delx.au - gnu-emacs/blobdiff - src/nsterm.m
no message
[gnu-emacs] / src / nsterm.m
index 604b9e88779cac8d83e4f96f72dc78c922dc17f8..2eebbf8664350cfa5aa492e3a4bdad889ec98413 100644 (file)
@@ -34,6 +34,7 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
 #include <time.h>
 #include <signal.h>
 #include <unistd.h>
+#include <setjmp.h>
 
 #include "lisp.h"
 #include "blockinput.h"
@@ -1345,7 +1346,8 @@ ns_get_color (const char *name, NSColor **col)
     }
   else if (!strncmp(name, "rgb:", 4))  /* A newer X11 format -- rgb:r/g/b */
     {
-      strcpy(hex, name + 4);
+      strncpy (hex, name + 4, 19);
+      hex[19] = '\0';
       scaling = (strlen(hex) - 2) / 3;
     }
   else if (name[0] == '#')        /* An old X11 format; convert to newer */
@@ -4667,9 +4669,9 @@ extern void update_window_cursor (struct window *w, int on);
 }
 
 
-- (NSInteger)conversationIdentifier
+- (long)conversationIdentifier
 {
-  return (NSInteger)self;
+  return (long)self;
 }
 
 
@@ -5926,7 +5928,7 @@ extern void update_window_cursor (struct window *w, int on);
       last_hit_part = scroll_bar_move_ratio; break;
     default:  /* NSScrollerNoPart? */
       fprintf (stderr, "EmacsScoller-mouseDown: unexpected part %ld\n",
-               (long)part);
+               (long) part);
       return;
     }