aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdrian Robert2008-12-31 14:59:37 +0000
committerAdrian Robert2008-12-31 14:59:37 +0000
commitf5497e458ada626917620248ec1238dc44fa7fd1 (patch)
tree8ad5f5778908dc35e0c2965c47a6f085fc7142cc /src
parentd00da9d7233a6915c7a126c062c025f7573ee6ba (diff)
downloademacs-f5497e458ada626917620248ec1238dc44fa7fd1.tar.gz
emacs-f5497e458ada626917620248ec1238dc44fa7fd1.zip
(ns_appkit_version_str): Rename from ns_appkit_version. (ns_appkit_version_int): New function. (x-server-version): Use ns_appkit_version_int and follow 21+ convention of returning 3 integers
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/nsfns.m39
2 files changed, 40 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c06f20d5ad7..eba071fcd98 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12008-12-31 Adrian Robert <Adrian.B.Robert@gmail.com>
2
3 * nsfns.m (ns_appkit_version_str): Rename from ns_appkit_version.
4 (ns_appkit_version_int): New function.
5 (x-server-version): Use ns_appkit_version_int and follow 21+
6 convention of returning 3 integers.
7
12008-12-30 Kenichi Handa <handa@m17n.org> 82008-12-30 Kenichi Handa <handa@m17n.org>
2 9
3 * character.h (CHAR_VARIATION_SELECTOR_P): New macro. 10 * character.h (CHAR_VARIATION_SELECTOR_P): New macro.
diff --git a/src/nsfns.m b/src/nsfns.m
index 0f7b6318e63..acda234e466 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -952,7 +952,7 @@ ns_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
952#define Xstr(x) Str(x) 952#define Xstr(x) Str(x)
953 953
954static Lisp_Object 954static Lisp_Object
955ns_appkit_version () 955ns_appkit_version_str ()
956{ 956{
957 char tmp[80]; 957 char tmp[80];
958 958
@@ -967,6 +967,21 @@ ns_appkit_version ()
967} 967}
968 968
969 969
970/* This is for use by x-server-version and collapses all version info we
971 have into a single int. For a better picture of the implementation
972 running, use ns_appkit_version_str.*/
973static int
974ns_appkit_version_int ()
975{
976#ifdef NS_IMPL_GNUSTEP
977 return GNUSTEP_GUI_MAJOR_VERSION * 100 + GNUSTEP_GNU_MINOR_VERSION;
978#elif defined(NS_IMPL_COCOA)
979 return (int)NSAppKitVersionNumber;
980#endif
981 return 0;
982}
983
984
970static void 985static void
971x_icon (struct frame *f, Lisp_Object parms) 986x_icon (struct frame *f, Lisp_Object parms)
972/* -------------------------------------------------------------------------- 987/* --------------------------------------------------------------------------
@@ -1602,14 +1617,26 @@ If omitted or nil, the selected frame's display is used. */)
1602 1617
1603 1618
1604DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, 1619DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0,
1605 doc: /* Return the version number of Nextstep display server DISPLAY. 1620 doc: /* Return the version numbers of the server of DISPLAY.
1621The value is a list of three integers: the major and minor
1622version numbers of the X Protocol in use, and the distributor-specific
1623release number. See also the function `x-server-vendor'.
1624
1625The optional argument DISPLAY specifies which display to ask about.
1606DISPLAY should be either a frame or a display name (a string). 1626DISPLAY should be either a frame or a display name (a string).
1607If omitted or nil, the selected frame's display is used. 1627If omitted or nil, that stands for the selected frame's display. */)
1608See also the function `ns-server-vendor'. */)
1609 (display) 1628 (display)
1610 Lisp_Object display; 1629 Lisp_Object display;
1611{ 1630{
1612 return ns_appkit_version (); 1631 /*NOTE: it is unclear what would best correspond with "protocol";
1632 we return 10.3, meaning Panther, since this is roughly the
1633 level that GNUstep's APIs correspond to.
1634 The last number is where we distinguish between the Apple
1635 and GNUstep implementations ("distributor-specific release
1636 number") and give int'ized versions of major.minor. */
1637 return Fcons (make_number (10),
1638 Fcons (make_number (3),
1639 Fcons (make_number (ns_appkit_version_int()), Qnil)));
1613} 1640}
1614 1641
1615 1642
@@ -2658,7 +2685,7 @@ be used as the image of the icon representing the frame. */);
2658 2685
2659 DEFVAR_LISP ("ns-version-string", &Vns_version_string, 2686 DEFVAR_LISP ("ns-version-string", &Vns_version_string,
2660 doc: /* Toolkit version for NS Windowing. */); 2687 doc: /* Toolkit version for NS Windowing. */);
2661 Vns_version_string = ns_appkit_version (); 2688 Vns_version_string = ns_appkit_version_str ();
2662 2689
2663 defsubr (&Sns_read_file_name); 2690 defsubr (&Sns_read_file_name);
2664 defsubr (&Sns_get_resource); 2691 defsubr (&Sns_get_resource);