Commit facfbbbd authored by Stefan Monnier's avatar Stefan Monnier

* Makefile.in: Undef LIB_STANDARD before defining it to silence warning

in case it was defined already.
USE @GNUSTEP_MAKEFILES@ rather than envvars.
* nsterm.m (ns_term_init): Pass Qt and Qnil rather than YES/NO to
ns_default.
(applicationShouldTerminate, setValuesFromPanel): Use EQ to compare
Lisp_Objects.
* nsterm.h (Fx_display_grayscale_p, Fx_display_planes)
(ns_defined_color, ns_color_to_lisp): Declare.
* nsselect.m (ns_handle_selection_request, ns_handle_selection_clear)
(Fns_own_selection_internal): Make the big ugly hack more explicit, so
it's accepted even with USE_LISP_UNION_TYPE.
* nsmenu.m (ns_update_menubar): Use EQ to compare Lisp_Objects.
(update_frame_tool_bar): Remove apparently obsolete tests for
non-integerness of f->tool_bar_lines.
(windowShouldClose, addButton, clicked, runDialogAt): Make the big ugly
hack more explicit, so it's accepted even with USE_LISP_UNION_TYPE.
* nsfont.m (nsfont_driver): Use just 0 rather than an invalid cast.
(nsfont_open): Don't confuse NULL for Qnil.
* nsfns.m (ns_implicitly_set_icon_type): Use EQ to compare Lisp_Objects.
* menu.h (find_and_call_menu_selection):
* menu.c (find_and_call_menu_selection): Use just int for vector size.
(find_and_return_menu_selection): Always return something.
* frame.h: Include dispextern.h for Display_Info.
(display_x_get_resource): Declare.
* configure.in: Extract and substitute GNUSTEP_MAKEFILES.
parent d377ef4a
2008-07-17 Stefan Monnier <monnier@iro.umontreal.ca>
* configure.in: Extract and substitute GNUSTEP_MAKEFILES.
2008-07-16 Adrian Robert <Adrian.B.Robert@gmail.com>
* configure.in: Change GNUSTEP to NS_IMPL_GNUSTEP, COCOA to
......
......@@ -735,6 +735,7 @@ machfile
opsysfile
carbon_appdir
ns_appdir
GNUSTEP_MAKEFILES
LTLIBOBJS'
ac_subst_files=''
ac_precious_vars='build_alias
......@@ -9337,6 +9338,7 @@ if test "${with_ns}" != no; then
NS_IMPL_GNUSTEP=yes
GNUSTEP_SYSTEM_HEADERS="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_HEADERS)"
GNUSTEP_SYSTEM_LIBRARIES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_LIBRARIES)"
GNUSTEP_MAKEFILES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_MAKEFILES)"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
......@@ -16905,6 +16907,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# endif
#endif
#include <limits.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
......@@ -17053,12 +17056,15 @@ main ()
isn't worth using anyway. */
alarm (60);
for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
continue;
time_t_max--;
if ((time_t) -1 < 0)
for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
continue;
for (;;)
{
t = (time_t_max << 1) + 1;
if (t <= time_t_max)
break;
time_t_max = t;
}
time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
delta = time_t_max / 997; /* a suitable prime number */
for (i = 0; i < N_STRINGS; i++)
{
......@@ -17073,10 +17079,12 @@ main ()
&& mktime_test ((time_t) (60 * 60 * 24))))
return 1;
for (j = 1; 0 < j; j *= 2)
for (j = 1; ; j <<= 1)
if (! bigtime_test (j))
return 1;
if (! bigtime_test (j - 1))
else if (INT_MAX / 2 < j)
break;
if (! bigtime_test (INT_MAX))
return 1;
}
return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
......@@ -18985,11 +18993,13 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdio.h>
#include <sys/types.h> /* for off_t */
#include <stdio.h>
int
main ()
{
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
......@@ -19029,11 +19039,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
#include <stdio.h>
#include <sys/types.h> /* for off_t */
#include <stdio.h>
int
main ()
{
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
......@@ -24169,6 +24181,7 @@ fi
cat >>confdefs.h <<_ACEOF
......@@ -25193,10 +25206,11 @@ machfile!$machfile$ac_delim
opsysfile!$opsysfile$ac_delim
carbon_appdir!$carbon_appdir$ac_delim
ns_appdir!$ns_appdir$ac_delim
GNUSTEP_MAKEFILES!$GNUSTEP_MAKEFILES$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
......
......@@ -1234,6 +1234,7 @@ if test "${with_ns}" != no; then
NS_IMPL_GNUSTEP=yes
GNUSTEP_SYSTEM_HEADERS="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_HEADERS)"
GNUSTEP_SYSTEM_LIBRARIES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_LIBRARIES)"
GNUSTEP_MAKEFILES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_MAKEFILES)"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
......@@ -2471,6 +2472,7 @@ AC_SUBST(opsysfile)
AC_SUBST(GETLOADAVG_LIBS)
AC_SUBST(carbon_appdir)
AC_SUBST(ns_appdir)
AC_SUBST(GNUSTEP_MAKEFILES)
AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}",
[Define to the canonical Emacs configuration name.])
......
*-spd
*.core
*.d
*.pdb
.gdb_history
Makefile
......
2008-07-17 Stefan Monnier <monnier@iro.umontreal.ca>
Use SDATA. Follow coding convention of placing operators at
beginning of next line rather than end of previous line, and placing
spaces around infix operators.
* Makefile.in: Undef LIB_STANDARD before defining it to silence warning
in case it was defined already.
USE @GNUSTEP_MAKEFILES@ rather than envvars.
* nsterm.m (ns_term_init): Pass Qt and Qnil rather than YES/NO to
ns_default.
(applicationShouldTerminate, setValuesFromPanel): Use EQ to compare
Lisp_Objects.
* nsterm.h (Fx_display_grayscale_p, Fx_display_planes)
(ns_defined_color, ns_color_to_lisp): Declare.
* nsselect.m (ns_handle_selection_request, ns_handle_selection_clear)
(Fns_own_selection_internal): Make the big ugly hack more explicit, so
it's accepted even with USE_LISP_UNION_TYPE.
* nsmenu.m (ns_update_menubar): Use EQ to compare Lisp_Objects.
(update_frame_tool_bar): Remove apparently obsolete tests for
non-integerness of f->tool_bar_lines.
(windowShouldClose, addButton, clicked, runDialogAt): Make the big ugly
hack more explicit, so it's accepted even with USE_LISP_UNION_TYPE.
* nsfont.m (nsfont_driver): Use just 0 rather than an invalid cast.
(nsfont_open): Don't confuse NULL for Qnil.
* nsfns.m (ns_implicitly_set_icon_type): Use EQ to compare Lisp_Objects.
* menu.h (find_and_call_menu_selection):
* menu.c (find_and_call_menu_selection): Use just int for vector size.
(find_and_return_menu_selection): Always return something.
* frame.h: Include dispextern.h for Display_Info.
(display_x_get_resource): Declare.
2008-07-16 Adrian Robert <Adrian.B.Robert@gmail.com>
* syntax.c: Remove stdio.h include accidentally introduced in
......
......@@ -114,6 +114,7 @@ SHELL=/bin/sh
/* Under GNUstep, putting libc on the link line causes problems. */
#ifdef NS_IMPL_GNUSTEP
#undef LIB_STANDARD
#define LIB_STANDARD
#endif
......@@ -238,8 +239,8 @@ STARTFILES = START_FILES
/* Pull in stuff from GNUstep-make. */
FOUNDATION_LIB=gnu
GUI_LIB=gnu
include $(GNUSTEP_MAKEFILES)/Additional/base.make
include $(GNUSTEP_MAKEFILES)/Additional/gui.make
include @GNUSTEP_MAKEFILES@/Additional/base.make
include @GNUSTEP_MAKEFILES@/Additional/gui.make
shared=no
#endif
......@@ -899,8 +900,7 @@ SOME_MACHINE_LISP = ../lisp/mouse.elc \
../lisp/mouse.elc \
../lisp/term/x-win.elc \
../lisp/term/ns-win.elc \
../lisp/ns-carbon-compat.elc \
../lisp/emacs-lisp/easymenu.elc
../lisp/ns-carbon-compat.elc
/* Construct full set of libraries to be linked.
Note that SunOS needs -lm to come before -lc; otherwise, you get
......
......@@ -24,6 +24,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifndef EMACS_FRAME_H
#define EMACS_FRAME_H
#include "dispextern.h"
/* Miscellanea. */
......@@ -1114,6 +1116,13 @@ extern void x_set_alpha P_ ((struct frame *, Lisp_Object, Lisp_Object));
extern void validate_x_resource_name P_ ((void));
extern Lisp_Object display_x_get_resource (Display_Info *,
Lisp_Object attribute,
Lisp_Object class,
Lisp_Object component,
Lisp_Object subclass);
#endif /* HAVE_WINDOW_SYSTEM */
#endif /* not EMACS_FRAME_H */
......
......@@ -881,7 +881,7 @@ update_submenu_strings (first_wv)
void
find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data)
FRAME_PTR f;
EMACS_INT menu_bar_items_used;
int menu_bar_items_used;
Lisp_Object vector;
void *client_data;
{
......@@ -1023,6 +1023,7 @@ find_and_return_menu_selection (FRAME_PTR f, int keymaps, void *client_data)
i += MENU_ITEMS_ITEM_LENGTH;
}
}
return Qnil;
}
#endif
......
......@@ -29,7 +29,7 @@ extern void list_of_panes P_ ((Lisp_Object));
#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI)
extern void free_menubar_widget_value_tree P_ ((widget_value *));
extern void update_submenu_strings P_ ((widget_value *));
extern void find_and_call_menu_selection P_ ((FRAME_PTR, EMACS_INT,
extern void find_and_call_menu_selection P_ ((FRAME_PTR, int,
Lisp_Object, void *));
#endif
......
......@@ -268,7 +268,7 @@ Updated by Christian Limpach (chris@nice.ch)
dpyinfo = ns_display_list;
if (dpyinfo == 0)
error ("OpenStep on %s not responding.\n", XSTRING (name)->data);
error ("OpenStep on %s not responding.\n", SDATA (name));
return dpyinfo;
}
......@@ -401,8 +401,8 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
if (face)
{
col = NS_FACE_BACKGROUND (face);
face->background =
(EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain];
face->background
= (EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain];
[col release];
update_face_from_frame_parameter (f, Qbackground_color, arg);
......@@ -478,11 +478,11 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
if ([[view window] miniwindowTitle] &&
([[[view window] miniwindowTitle]
isEqualToString: [NSString stringWithUTF8String:
XSTRING (arg)->data]]))
SDATA (arg)]]))
return;
[[view window] setMiniwindowTitle:
[NSString stringWithUTF8String: XSTRING (arg)->data]];
[NSString stringWithUTF8String: SDATA (arg)]];
}
......@@ -527,11 +527,11 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
if ([[view window] miniwindowTitle] &&
([[[view window] miniwindowTitle]
isEqualToString: [NSString stringWithUTF8String:
XSTRING (name)->data]]))
SDATA (name)]]))
return;
[[view window] setMiniwindowTitle:
[NSString stringWithUTF8String: XSTRING (name)->data]];
[NSString stringWithUTF8String: SDATA (name)]];
}
......@@ -573,10 +573,10 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
/* Don't change the name if it's already NAME. */
if ([[[view window] title]
isEqualToString: [NSString stringWithUTF8String:
XSTRING (name)->data]])
SDATA (name)]])
return;
[[view window] setTitle: [NSString stringWithUTF8String:
XSTRING (name)->data]];
SDATA (name)]];
}
......@@ -660,7 +660,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
title = FRAME_ICONIFIED_P (f) ? [[[view window] miniwindowTitle] UTF8String]
: [[[view window] title] UTF8String];
if (title && (! strcmp (title, XSTRING (name)->data)))
if (title && (! strcmp (title, SDATA (name))))
{
[pool release];
UNBLOCK_INPUT;
......@@ -673,7 +673,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
/* work around a bug observed on 10.3 where
setTitleWithRepresentedFilename does not clear out previous state
if given filename does not exist */
NSString *str = [NSString stringWithUTF8String: XSTRING (name)->data];
NSString *str = [NSString stringWithUTF8String: SDATA (name)];
if (![[NSFileManager defaultManager] fileExistsAtPath: str])
{
[[view window] setTitleWithRepresentedFilename: @""];
......@@ -685,14 +685,14 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
}
#else
[[view window] setTitleWithRepresentedFilename:
[NSString stringWithUTF8String: XSTRING (name)->data]];
[NSString stringWithUTF8String: SDATA (name)]];
#endif
f->name = name;
}
else
{
[[view window] setMiniwindowTitle:
[NSString stringWithUTF8String: XSTRING (name)->data]];
[NSString stringWithUTF8String: SDATA (name)]];
}
[pool release];
UNBLOCK_INPUT;
......@@ -806,7 +806,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
BLOCK_INPUT;
pool = [[NSAutoreleasePool alloc] init];
if (f->output_data.ns->miniimage
&& [[NSString stringWithUTF8String: XSTRING (f->name)->data]
&& [[NSString stringWithUTF8String: SDATA (f->name)]
isEqualToString: [(NSImage *)f->output_data.ns->miniimage name]])
{
[pool release];
......@@ -828,10 +828,10 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
{
elt = XCAR (chain);
/* special case: 't' means go by file type */
if (SYMBOLP (elt) && elt == Qt && XSTRING (f->name)->data[0] == '/')
if (SYMBOLP (elt) && EQ (elt, Qt) && SDATA (f->name)[0] == '/')
{
NSString *str =
[NSString stringWithUTF8String: XSTRING (f->name)->data];
NSString *str
= [NSString stringWithUTF8String: SDATA (f->name)];
if ([[NSFileManager defaultManager] fileExistsAtPath: str])
image = [[[NSWorkspace sharedWorkspace] iconForFile: str] retain];
}
......@@ -844,7 +844,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
if (image == nil)
image = [[NSImage imageNamed:
[NSString stringWithUTF8String:
XSTRING (XCDR (elt))->data]] retain];
SDATA (XCDR (elt))]] retain];
}
}
......@@ -873,7 +873,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
if (!NILP (arg) && SYMBOLP (arg))
{
arg =build_string (XSTRING (XSYMBOL (arg)->xname)->data);
arg =build_string (SDATA (SYMBOL_NAME (arg)));
store_frame_param (f, Qicon_type, arg);
}
......@@ -889,7 +889,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
image = [EmacsImage allocInitFromFile: arg];
if (image == nil)
image =[NSImage imageNamed: [NSString stringWithUTF8String:
XSTRING (arg)->data]];
SDATA (arg)]];
if (image == nil)
{
......@@ -918,9 +918,9 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
{
char *str;
if (XTYPE (arg) == Lisp_String)
str =XSTRING (arg)->data;
str = SDATA (arg);
else if (XTYPE (arg) == Lisp_Symbol)
str =XSTRING (XSYMBOL (arg)->xname)->data;
str = SDATA (SYMBOL_NAME (arg));
else return -1;
if (!strcmp (str, "box")) return filled_box;
if (!strcmp (str, "hollow")) return hollow_box;
......@@ -1125,8 +1125,8 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
be set. */
if (EQ (name, Qunbound) || NILP (name) || (XTYPE (name) != Lisp_String))
{
f->name =
build_string ([[[NSProcessInfo processInfo] processName] UTF8String]);
f->name
= build_string ([[[NSProcessInfo processInfo] processName] UTF8String]);
f->explicit_name =0;
}
else
......@@ -1197,15 +1197,15 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
/* default scrollbars on right on Mac */
{
Lisp_Object spos =
Lisp_Object spos
#ifdef NS_IMPL_GNUSTEP
Qt;
= Qt;
#else
Qright;
= Qright;
#endif
x_default_parameter (f, parms, Qvertical_scroll_bars, spos,
"verticalScrollBars", "VerticalScrollBars",
RES_TYPE_SYMBOL);
x_default_parameter (f, parms, Qvertical_scroll_bars, spos,
"verticalScrollBars", "VerticalScrollBars",
RES_TYPE_SYMBOL);
}
x_default_parameter (f, parms, Qforeground_color, build_string ("Black"),
"foreground", "Foreground", RES_TYPE_STRING);
......@@ -1236,30 +1236,31 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
/*PENDING: other terms seem to get away w/o this complexity.. */
if (NILP (Fassq (Qwidth, parms)))
{
Lisp_Object value =
x_get_arg (dpyinfo, parms, Qwidth, "width", "Width", RES_TYPE_NUMBER);
Lisp_Object value
= x_get_arg (dpyinfo, parms, Qwidth, "width", "Width",
RES_TYPE_NUMBER);
if (! EQ (value, Qunbound))
parms = Fcons (Fcons (Qwidth, value), parms);
}
if (NILP (Fassq (Qheight, parms)))
{
Lisp_Object value =
x_get_arg (dpyinfo, parms, Qheight, "height", "Height",
RES_TYPE_NUMBER);
Lisp_Object value
= x_get_arg (dpyinfo, parms, Qheight, "height", "Height",
RES_TYPE_NUMBER);
if (! EQ (value, Qunbound))
parms = Fcons (Fcons (Qheight, value), parms);
}
if (NILP (Fassq (Qleft, parms)))
{
Lisp_Object value =
x_get_arg (dpyinfo, parms, Qleft, "left", "Left", RES_TYPE_NUMBER);
Lisp_Object value
= x_get_arg (dpyinfo, parms, Qleft, "left", "Left", RES_TYPE_NUMBER);
if (! EQ (value, Qunbound))
parms = Fcons (Fcons (Qleft, value), parms);
}
if (NILP (Fassq (Qtop, parms)))
{
Lisp_Object value =
x_get_arg (dpyinfo, parms, Qtop, "top", "Top", RES_TYPE_NUMBER);
Lisp_Object value
= x_get_arg (dpyinfo, parms, Qtop, "top", "Top", RES_TYPE_NUMBER);
if (! EQ (value, Qunbound))
parms = Fcons (Fcons (Qtop, value), parms);
}
......@@ -1277,8 +1278,8 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
f->output_data.ns->hand_cursor = [NSCursor pointingHandCursor];
f->output_data.ns->hourglass_cursor = [NSCursor disappearingItemCursor];
f->output_data.ns->horizontal_drag_cursor = [NSCursor resizeLeftRightCursor];
FRAME_NS_DISPLAY_INFO (f)->vertical_scroll_bar_cursor =
[NSCursor arrowCursor];
FRAME_NS_DISPLAY_INFO (f)->vertical_scroll_bar_cursor
= [NSCursor arrowCursor];
f->output_data.ns->current_pointer = f->output_data.ns->text_cursor;
[[EmacsView alloc] initFrameFromEmacs: f];
......@@ -1435,12 +1436,12 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
NSString *fname;
NSString *promptS = NILP (prompt) || !STRINGP (prompt) ? nil :
[NSString stringWithUTF8String: XSTRING (prompt)->data];
[NSString stringWithUTF8String: SDATA (prompt)];
NSString *dirS = NILP (dir) || !STRINGP (dir) ?
[NSString stringWithUTF8String: XSTRING (current_buffer->directory)->data] :
[NSString stringWithUTF8String: XSTRING (dir)->data];
[NSString stringWithUTF8String: SDATA (current_buffer->directory)] :
[NSString stringWithUTF8String: SDATA (dir)];
NSString *initS = NILP (init) || !STRINGP (init) ? nil :
[NSString stringWithUTF8String: XSTRING (init)->data];
[NSString stringWithUTF8String: SDATA (init)];
check_ns ();
......@@ -1502,12 +1503,12 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
/*fprintf (stderr, "ns-get-resource checking resource '%s'\n", SDATA (name)); */
value =[[[NSUserDefaults standardUserDefaults]
objectForKey: [NSString stringWithUTF8String: XSTRING (name)->data]]
objectForKey: [NSString stringWithUTF8String: SDATA (name)]]
UTF8String];
if (value)
return build_string (value);
/*fprintf (stderr, "Nothing found for NS resource '%s'.\n", XSTRING (name)->data); */
/*fprintf (stderr, "Nothing found for NS resource '%s'.\n", SDATA (name)); */
return Qnil;
}
......@@ -1521,22 +1522,22 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
{
check_ns ();
if (NILP (owner))
owner =
build_string ([[[NSProcessInfo processInfo] processName] UTF8String]);
owner
= build_string ([[[NSProcessInfo processInfo] processName] UTF8String]);
CHECK_STRING (owner);
CHECK_STRING (name);
if (NILP (value))
{
[[NSUserDefaults standardUserDefaults] removeObjectForKey:
[NSString stringWithUTF8String: XSTRING (name)->data]];
[NSString stringWithUTF8String: SDATA (name)]];
}
else
{
CHECK_STRING (value);
[[NSUserDefaults standardUserDefaults] setObject:
[NSString stringWithUTF8String: XSTRING (value)->data]
[NSString stringWithUTF8String: SDATA (value)]
forKey: [NSString stringWithUTF8String:
XSTRING (name)->data]];
SDATA (name)]];
}
return Qnil;
......@@ -1763,10 +1764,10 @@ DISPLAY should be either a frame or a display name (a string).\n\
{
if (!NILP (must_succeed))
fatal ("OpenStep on %s not responding.\n",
XSTRING (display)->data);
SDATA (display));
else
error ("OpenStep on %s not responding.\n",
XSTRING (display)->data);
SDATA (display));
}
/* Register our external input/output types, used for determining
......@@ -1858,17 +1859,17 @@ DISPLAY should be either a frame or a display name (a string).\n\
DEFUN ("x-list-fonts", Fns_list_fonts, Sns_list_fonts, 1, 4, 0,
"Return a list of the names of available fonts matching PATTERN.\n\
If optional arguments FACE and FRAME are specified, return only fonts\n\
the same size as FACE on FRAME.\n\
If optional argument MAX is specified, return at most MAX matches.\n\
\n\
PATTERN is a regular expression; FACE is a face name - a symbol.\n\
\n\
The return value is a list of strings, suitable as arguments to\n\
set-face-font.\n\
\n\
The font names are _NOT_ X names.")
doc: /* Return a list of the names of available fonts matching PATTERN.
If optional arguments FACE and FRAME are specified, return only fonts
the same size as FACE on FRAME.
If optional argument MAX is specified, return at most MAX matches.
PATTERN is a regular expression; FACE is a face name - a symbol.
The return value is a list of strings, suitable as arguments to
set-face-font.
The font names are _NOT_ X names. */)
(pattern, face, frame, max)
Lisp_Object pattern, face, frame, max;
{
......@@ -1906,7 +1907,7 @@ DISPLAY should be either a frame or a display name (a string).\n\
for (tem = flist; CONSP (tem); tem = XCDR (tem))
{
Lisp_Object fname = XCAR (tem);
olist = Fcons (build_string (ns_xlfd_to_fontname (XSTRING (fname)->data)),
olist = Fcons (build_string (ns_xlfd_to_fontname (SDATA (fname))),
olist);
}
......@@ -2039,7 +2040,7 @@ DISPLAY should be either a frame or a display name (a string).\n\
CHECK_STRING (service);
check_ns ();
utfStr = XSTRING (service)->data;
utfStr = SDATA (service);
svcName = [NSString stringWithUTF8String: utfStr];
pb =[NSPasteboard pasteboardWithUniqueName];
......@@ -2063,7 +2064,7 @@ DISPLAY should be either a frame or a display name (a string).\n\
NSString *utfStr;
CHECK_STRING (str);
utfStr = [[NSString stringWithUTF8String: XSTRING (str)->data]
utfStr = [[NSString stringWithUTF8String: SDATA (str)]
precomposedStringWithCanonicalMapping];
return build_string ([utfStr UTF8String]);
}
......@@ -2448,7 +2449,7 @@ DY added (default is -10).
GCPRO4 (string, parms, frame, timeout);
CHECK_STRING (string);
str = XSTRING (string)->data;
str = SDATA (string);
f = check_x_frame (frame);
if (NILP (timeout))
timeout = make_number (5);
......
......@@ -234,7 +234,7 @@ static int nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
struct font_driver nsfont_driver =
{
(Lisp_Object) NULL, /* Qns */
0, /* Qns */
1, /* case sensitive */
nsfont_get_cache,
nsfont_list,
......@@ -518,7 +518,7 @@ avoid creating multiple struct font objects (with metrics cache, etc.)
font_info = (struct nsfont_info *) XFONT_OBJECT (font_object);
font = (struct font *)font_info;
if (!font)
return NULL; /*PENDING: this copies w32, but causes a segfault */
return Qnil; /*PENDING: this copies w32, but causes a segfault */
if (NSFONT_TRACE)
{
......@@ -571,7 +571,7 @@ avoid creating multiple struct font objects (with metrics cache, etc.)
if (!nsfont)
{
fprintf (stderr, "*** Emacs.app: unable to load backup font\n");
return NULL;
return Qnil;
}
}