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.
+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
opsysfile
carbon_appdir
ns_appdir
+GNUSTEP_MAKEFILES
LTLIBOBJS'
ac_subst_files=''
ac_precious_vars='build_alias
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}"
# endif
#endif
+#include <limits.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
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++)
{
&& 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 ());
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;
}
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;
}
+
cat >>confdefs.h <<_ACEOF
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
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}"
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
/* Under GNUstep, putting libc on the link line causes problems. */
#ifdef NS_IMPL_GNUSTEP
+#undef LIB_STANDARD
#define LIB_STANDARD
#endif
/* 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
../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
#ifndef EMACS_FRAME_H
#define EMACS_FRAME_H
+#include "dispextern.h"
+
\f
/* Miscellanea. */
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 */
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;
{
i += MENU_ITEMS_ITEM_LENGTH;
}
}
+ return Qnil;
}
#endif
#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
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;
}
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);
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)]];
}
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)]];
}
/* 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)]];
}
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;
/* 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: @""];
}
#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;
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];
{
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];
}
if (image == nil)
image = [[NSImage imageNamed:
[NSString stringWithUTF8String:
- XSTRING (XCDR (elt))->data]] retain];
+ SDATA (XCDR (elt))]] retain];
}
}
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);
}
image = [EmacsImage allocInitFromFile: arg];
if (image == nil)
image =[NSImage imageNamed: [NSString stringWithUTF8String:
- XSTRING (arg)->data]];
+ SDATA (arg)]];
if (image == nil)
{
{
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;
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
/* 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);
/*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);
}
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];
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 ();
/*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;
}
{
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;
{
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
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;
{
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);
}
CHECK_STRING (service);
check_ns ();
- utfStr = XSTRING (service)->data;
+ utfStr = SDATA (service);
svcName = [NSString stringWithUTF8String: utfStr];
pb =[NSPasteboard pasteboardWithUniqueName];
NSString *utfStr;
CHECK_STRING (str);
- utfStr = [[NSString stringWithUTF8String: XSTRING (str)->data]
+ utfStr = [[NSString stringWithUTF8String: SDATA (str)]
precomposedStringWithCanonicalMapping];
return build_string ([utfStr UTF8String]);
}
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);
struct font_driver nsfont_driver =
{
- (Lisp_Object) NULL, /* Qns */
+ 0, /* Qns */
1, /* case sensitive */
nsfont_get_cache,
nsfont_list,
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)
{
if (!nsfont)
{
fprintf (stderr, "*** Emacs.app: unable to load backup font\n");
- return NULL;
+ return Qnil;
}
}
font_info->metrics = (struct font_metrics *)
xmalloc (0x100 * sizeof (struct font_metrics *));
if (!font_info->glyphs || !font_info->metrics)
- return NULL;
+ return Qnil;
bzero (font_info->glyphs, 0x100 * sizeof (unsigned short *));
bzero (font_info->metrics, 0x100 * sizeof (struct font_metrics *));
{
for (i = 0; i<n; i++)
{
- string = XVECTOR (items)->contents[4*i+1];
+ string = AREF (items, 4*i+1);
- if (!string)
+ if (EQ (string, make_number (0))) // FIXME: Why??? --Stef
continue;
if (NILP (string))
if (previous_strings[i][0])
- (EmacsMenu *)addSubmenuWithTitle: (char *)title forFrame: (struct frame *)f
{
NSString *titleStr = [NSString stringWithUTF8String: title];
- id <NSMenuItem> item =
- [self addItemWithTitle: titleStr
- action: nil /*@selector (menuDown:) */
- keyEquivalent: @""];
+ id <NSMenuItem> item
+ = [self addItemWithTitle: titleStr
+ action: nil /*@selector (menuDown:) */
+ keyEquivalent: @""];
EmacsMenu *submenu = [[EmacsMenu alloc] initWithTitle: titleStr frame: f];
[self setSubmenu: submenu forItem: item];
[submenu release];
[NSMenu popUpContextMenu: self withEvent: event forView: view];
retVal = context_menu_value;
context_menu_value = 0;
- return retVal > 0 ?
- find_and_return_menu_selection (f, keymaps, (void *)retVal) : Qnil;
+ return retVal > 0
+ ? find_and_return_menu_selection (f, keymaps, (void *)retVal)
+ : Qnil;
}
@end /* EmacsMenu */
/* If this item has a null value,
make the call_data null so that it won't display a box
when the mouse is on it. */
- wv->call_data =
- !NILP (def) ? (void *) &XVECTOR (menu_items)->contents[i] : 0;
+ wv->call_data
+ = !NILP (def) ? (void *) &XVECTOR (menu_items)->contents[i] : 0;
wv->enabled = !NILP (enable);
if (NILP (type))
int i;
EmacsToolbar *toolbar = [FRAME_NS_VIEW (f) toolbar];
- if (NILP (f->tool_bar_lines) || !INTEGERP (f->tool_bar_lines))
- return;
-
[toolbar clearActive];
/* update EmacsToolbar as in GtkUtils, build items list */
helpText: (char *)help enabled: (BOOL)enabled
{
/* 1) come up w/identifier */
- NSString *identifier =
- [NSString stringWithFormat: @"%u", [img hash]];
+ NSString *identifier
+ = [NSString stringWithFormat: @"%u", [img hash]];
/* 2) create / reuse item */
NSToolbarItem *item = [identifierToItem objectForKey: identifier];
NSSize spacing = {SPACER, SPACER};
NSRect area;
char this_cmd_name[80];
- id cell, tem;
+ id cell;
static NSImageView *imgView;
static FlippedView *contentView;
- (BOOL)windowShouldClose: (id)sender
{
- [NSApp stopModalWithCode: Qnil];
+ [NSApp stopModalWithCode: XHASH (Qnil)]; // FIXME: BIG UGLY HACK!!
return NO;
}
[cell setTarget: self];
[cell setAction: @selector (clicked: )];
[cell setTitle: [NSString stringWithUTF8String: str]];
- [cell setTag: (int)val];
+ [cell setTag: XHASH (val)]; // FIXME: BIG UGLY HACK!!
[cell setBordered: YES];
[cell setEnabled: YES];
- clicked: sender
{
NSArray *sellist = nil;
- Lisp_Object seltag;
+ EMACS_INT seltag;
sellist = [sender selectedCells];
if ([sellist count]<1)
return self;
- seltag = (Lisp_Object)[[sellist objectAtIndex: 0] tag];
- if (! EQ (seltag, Qundefined))
+ seltag = [[sellist objectAtIndex: 0] tag];
+ if (seltag == XHASH (Qundefined)) // FIXME: BIG UGLY HACK!!
[NSApp stopModalWithCode: seltag];
return self;
}
}
[NSApp endModalSession: session];
- return (Lisp_Object)ret;
+ { // FIXME: BIG UGLY HACK!!!
+ Lisp_Object tmp;
+ *(EMACS_INT*)(&tmp) = ret;
+ return tmp;
+ }
}
@end
if (VECTORP (obj))
{
int i;
- int size = XVECTOR (obj)->size;
+ int size = ASIZE (obj);
Lisp_Object copy;
if (size == 1)
- return clean_local_selection_data (XVECTOR (obj)->contents [0]);
- copy = Fmake_vector (size, Qnil);
+ return clean_local_selection_data (AREF (obj, 0));
+ copy = Fmake_vector (make_number (size), Qnil);
for (i = 0; i < size; i++)
- XVECTOR (copy)->contents [i]
- = clean_local_selection_data (XVECTOR (obj)->contents [i]);
+ AREF (copy, i) = clean_local_selection_data (AREF (obj, i));
return copy;
}
CHECK_SYMBOL (target_type);
handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist));
if (!NILP (handler_fn))
- value =call3 (handler_fn, selection_name, target_type,
+ value = call3 (handler_fn, selection_name, target_type,
XCAR (XCDR (local_value)));
else
- value =Qnil;
+ value = Qnil;
unbind_to (count, Qnil);
- check =value;
+ check = value;
if (CONSP (value) && SYMBOLP (XCAR (value)))
{
type = XCAR (value);
&& NILP (XCDR (XCDR (check))))))
return value;
+ // FIXME: Why `quit' rather than `error'?
Fsignal (Qquit, Fcons (build_string (
"invalid data returned by selection-conversion function"),
Fcons (handler_fn, Fcons (value, Qnil))));
+ // FIXME: Beware, `quit' can return!!
+ return Qnil;
}
static void
ns_handle_selection_request (struct input_event *event)
{
- id pb =(id)event->x;
- NSString *type =(NSString *)event->y;
+ // FIXME: BIG UGLY HACK!!!
+ id pb = (id)*(EMACS_INT*)&(event->x);
+ NSString *type = (NSString *)*(EMACS_INT*)&(event->y);
Lisp_Object selection_name, selection_data, target_symbol, data;
Lisp_Object successful_p, rest;
- selection_name =ns_string_to_symbol ([(NSPasteboard *)pb name]);
- target_symbol =ns_string_to_symbol (type);
+ selection_name = ns_string_to_symbol ([(NSPasteboard *)pb name]);
+ target_symbol = ns_string_to_symbol (type);
selection_data = assq_no_quit (selection_name, Vselection_alist);
- successful_p =Qnil;
+ successful_p = Qnil;
if (!NILP (selection_data))
{
{
if (STRINGP (data))
ns_string_to_pasteboard_internal (pb, data, type);
- successful_p =Qt;
+ successful_p = Qt;
}
}
if (!EQ (Vns_sent_selection_hooks, Qunbound))
{
- for (rest =Vns_sent_selection_hooks;CONSP (rest); rest =Fcdr (rest))
+ for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest))
call3 (Fcar (rest), selection_name, target_symbol, successful_p);
}
}
static void
ns_handle_selection_clear (struct input_event *event)
{
- id pb = (id)event->x;
+ id pb = (id)*(EMACS_INT*)&(event->x);
Lisp_Object selection_name, selection_data, rest;
- selection_name =ns_string_to_symbol ([(NSPasteboard *)pb name]);
- selection_data =assq_no_quit (selection_name, Vselection_alist);
+ selection_name = ns_string_to_symbol ([(NSPasteboard *)pb name]);
+ selection_data = assq_no_quit (selection_name, Vselection_alist);
if (NILP (selection_data)) return;
if (EQ (selection_data, Fcar (Vselection_alist)))
if (!EQ (Vns_lost_selection_hooks, Qunbound))
{
- for (rest =Vns_lost_selection_hooks;CONSP (rest); rest =Fcdr (rest))
+ for (rest = Vns_lost_selection_hooks;CONSP (rest); rest = Fcdr (rest))
call1 (Fcar (rest), selection_name);
}
}
error ("selection-value may not be nil.");
pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection_name)];
ns_declare_pasteboard (pb);
- old_value =assq_no_quit (selection_name, Vselection_alist);
+ old_value = assq_no_quit (selection_name, Vselection_alist);
new_value = Fcons (selection_name, Fcons (selection_value, Qnil));
if (NILP (old_value))
- Vselection_alist =Fcons (new_value, Vselection_alist);
+ Vselection_alist = Fcons (new_value, Vselection_alist);
else
Fsetcdr (old_value, Fcdr (new_value));
/* XXX An evil hack, but a necessary one I fear XXX */
ev.kind = SELECTION_REQUEST_EVENT;
ev.modifiers = 0;
ev.code = 0;
- ev.x = (int)pb;
- ev.y = (int)NSStringPboardType;
+ *(EMACS_INT*)(&(ev.x)) = (EMACS_INT)pb; // FIXME: BIG UGLY HACK!!
+ *(EMACS_INT*)(&(ev.y)) = (EMACS_INT)NSStringPboardType;
ns_handle_selection_request (&ev);
}
return selection_value;
#define NS_DUMPGLYPH_MOUSEFACE 3
+EXFUN (Fx_display_grayscale_p, 1);
+EXFUN (Fx_display_planes, 1);
+
/* In nsfont, called from fontset.c */
extern void nsfont_make_fontset_for_font (Lisp_Object name,
Lisp_Object font_object);
extern Lisp_Object Qnone;
/* XColor defined in dispextern.h (we use color_def->pixel = NSColor id), but
- this causes an #include snafu, so we can't declare it.
- extern int ns_defined_color (struct frame *f, char *name, XColor *color_def,
- int alloc); */
+ this causes an #include snafu, so we can't declare it. */
+extern int
+ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc,
+ char makeIndex);
#ifdef __OBJC__
+extern Lisp_Object ns_color_to_lisp (NSColor *col);
extern int ns_lisp_to_color (Lisp_Object color, NSColor **col);
extern NSColor *ns_lookup_indexed_color (unsigned long idx, struct frame *f);
extern unsigned long ns_index_color (NSColor *color, struct frame *f);
if (isDir)
{
if ([resourcePaths length] > 0)
- resourcePaths =
- [resourcePaths stringByAppendingString: pathSeparator];
- resourcePaths =
- [resourcePaths stringByAppendingString: resourcePath];
+ resourcePaths
+ = [resourcePaths stringByAppendingString: pathSeparator];
+ resourcePaths
+ = [resourcePaths stringByAppendingString: resourcePath];
}
}
if ([resourcePaths length] > 0)
if (isDir)
{
if ([resourcePaths length] > 0)
- resourcePaths =
- [resourcePaths stringByAppendingString: pathSeparator];
- resourcePaths =
- [resourcePaths stringByAppendingString: resourcePath];
+ resourcePaths
+ = [resourcePaths stringByAppendingString: pathSeparator];
+ resourcePaths
+ = [resourcePaths stringByAppendingString: resourcePath];
}
}
if ([resourcePaths length] > 0)
NSTRACE (ns_frame_rehighlight);
if (dpyinfo->ns_focus_frame)
{
- dpyinfo->ns_highlight_frame =
- (FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->ns_focus_frame))
+ dpyinfo->ns_highlight_frame
+ = (FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->ns_focus_frame))
? XFRAME (FRAME_FOCUS_FRAME (dpyinfo->ns_focus_frame))
: dpyinfo->ns_focus_frame);
if (!FRAME_LIVE_P (dpyinfo->ns_highlight_frame))
/* PENDING: GNUstep has not yet implemented the first method below, added
in Panther, however the second is incorrect under Cocoa. */
#ifdef NS_IMPL_GNUSTEP
- FRAME_NS_TOOLBAR_HEIGHT (f) =
- NSHeight ([NSWindow frameRectForContentRect: NSMakeRect (0, 0, 0, 0)
- styleMask: [window styleMask]])
- - FRAME_NS_TITLEBAR_HEIGHT (f);
+ FRAME_NS_TOOLBAR_HEIGHT (f)
+ = NSHeight ([NSWindow frameRectForContentRect: NSMakeRect (0, 0, 0, 0)
+ styleMask: [window styleMask]])
+ - FRAME_NS_TITLEBAR_HEIGHT (f);
#else
FRAME_NS_TOOLBAR_HEIGHT (f) = 32;
/* actually get wrong result here if toolbar not yet displayed
{
color_table->size = NS_COLOR_CAPACITY;
color_table->avail = 1; /* skip idx=0 as marker */
- color_table->colors =
- (NSColor **)xmalloc (color_table->size * sizeof (NSColor *));
+ color_table->colors
+ = (NSColor **)xmalloc (color_table->size * sizeof (NSColor *));
color_table->empty_indices = [[NSMutableSet alloc] init];
}
if (color_table->avail == color_table->size)
{
color_table->size += NS_COLOR_CAPACITY;
- color_table->colors =
- (NSColor **)xrealloc (color_table->colors,
- color_table->size * sizeof (NSColor *));
+ color_table->colors
+ = (NSColor **)xrealloc (color_table->colors,
+ color_table->size * sizeof (NSColor *));
}
idx = color_table->avail++;
index = [NSNumber numberWithUnsignedInt: idx];
color_def->blue = b * 256;
if (!makeIndex)
- color_def->pixel =
- ARGB_TO_ULONG((int)(a*256),
- color_def->red, color_def->green, color_def->blue);
+ color_def->pixel
+ = ARGB_TO_ULONG((int)(a*256),
+ color_def->red, color_def->green, color_def->blue);
return 1;
}
{
/* clip out the resize handle */
NSWindow *window = [FRAME_NS_VIEW (f) window];
- NSRect ir =
- [view convertRect: ns_resize_handle_rect (window) fromView: nil];
+ NSRect ir
+ = [view convertRect: ns_resize_handle_rect (window) fromView: nil];
ir = NSIntersectionRect (r, ir);
if (NSIsEmptyRect (ir))
font->driver->text_extents (font, codes, 2, &metrics);
s->left_overhang = -metrics.lbearing;
- s->right_overhang =
- metrics.rbearing > metrics.width ? metrics.rbearing - metrics.width : 0;
+ s->right_overhang
+ = metrics.rbearing > metrics.width
+ ? metrics.rbearing - metrics.width : 0;
}
else
{
/* NS-specific: move internal border inside fringe */
int x = p->bx < 0 ? p->x : p->bx;
int wd = p->bx < 0 ? p->wd : p->nx;
- BOOL fringeOnVeryLeft =
- x - WINDOW_LEFT_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w)
+ BOOL fringeOnVeryLeft
+ = x - WINDOW_LEFT_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w)
- FRAME_INTERNAL_BORDER_WIDTH (f) < 10;
- BOOL fringeOnVeryRight =
- FRAME_PIXEL_WIDTH (f) - x - wd - FRAME_INTERNAL_BORDER_WIDTH (f)
+ BOOL fringeOnVeryRight
+ = FRAME_PIXEL_WIDTH (f) - x - wd - FRAME_INTERNAL_BORDER_WIDTH (f)
- WINDOW_RIGHT_SCROLL_BAR_COLS (w) * WINDOW_FRAME_COLUMN_WIDTH (w) < 10;
int xAdjust = FRAME_INTERNAL_BORDER_WIDTH (f) *
(fringeOnVeryLeft ? -1 : (fringeOnVeryRight ? 1 : 0));
/* grow bimgs if needed */
if (nBimgs < max_used_fringe_bitmap)
{
- EmacsImage **newBimgs =
- xmalloc (max_used_fringe_bitmap * sizeof (EmacsImage *));
+ EmacsImage **newBimgs
+ = xmalloc (max_used_fringe_bitmap * sizeof (EmacsImage *));
bzero (newBimgs, max_used_fringe_bitmap * sizeof (EmacsImage *));
if (nBimgs)
/* PENDING: 23: use emacs stored f->cursor_type instead of ns-specific */
oldCursorType = FRAME_CURSOR (f);
cursorType = FRAME_CURSOR (f) = FRAME_NEW_CURSOR (f);
- f->output_data.ns->current_cursor_color =
- f->output_data.ns->desired_cursor_color;
+ f->output_data.ns->current_cursor_color
+ = f->output_data.ns->desired_cursor_color;
/* PENDING: only needed in rare cases with last-resort font in HELLO..
should we do this more efficiently? */
cursor_blink_entry = 0;
if (dpyinfo->ns_highlight_frame)
{
- Lisp_Object tem =
- get_frame_param (dpyinfo->ns_highlight_frame, Qcursor_type);
- dpyinfo->ns_highlight_frame->output_data.ns->desired_cursor =
- ns_lisp_to_cursor_type (tem);
+ Lisp_Object tem
+ = get_frame_param (dpyinfo->ns_highlight_frame, Qcursor_type);
+ dpyinfo->ns_highlight_frame->output_data.ns->desired_cursor
+ = ns_lisp_to_cursor_type (tem);
}
}
NSColorSpaceFromDepth (depth)];
dpyinfo->n_planes = NSBitsPerPixelFromDepth (depth);
dpyinfo->image_cache = make_image_cache ();
- dpyinfo->color_table =
- (struct ns_color_table *)xmalloc (sizeof (struct ns_color_table));
+ dpyinfo->color_table
+ = (struct ns_color_table *)xmalloc (sizeof (struct ns_color_table));
dpyinfo->color_table->colors = NULL;
dpyinfo->root_window = 42; /* a placeholder.. */
ns_default ("ExpandSpace", &ns_expand_space,
make_float (0.5), make_float (0.0), YES, NO);
ns_default ("GSFontAntiAlias", &ns_antialias_text,
- YES, NO, NO, NO);
+ Qt, Qnil, NO, NO);
tmp = Qnil;
ns_default ("AppleAntiAliasingThreshold", &tmp,
make_float (10.0), make_float (6.0), YES, NO);
ns_antialias_threshold = NILP (tmp) ? 10.0 : XFLOATINT (tmp);
ns_default ("UseQuickdrawSmoothing", &ns_use_qd_smoothing,
- YES, NO, NO, NO);
+ Qt, Qnil, NO, NO);
ns_default ("UseSystemHighlightColor", &ns_use_system_highlight_color,
- YES, NO, NO, NO);
+ Qt, Qnil, NO, NO);
if (ns_use_system_highlight_color == YES)
{
ns_selection_color = [[NSUserDefaults standardUserDefaults]
{
/* first try data_dir, then invocation-dir
and finally source-directory/etc */
- tem1 = tem =
- Fexpand_file_name (build_string ("Emacs.clr"), Vdata_directory);
+ tem1 = tem
+ = Fexpand_file_name (build_string ("Emacs.clr"), Vdata_directory);
if (NILP (Ffile_exists_p (tem)))
{
tem = Fexpand_file_name (build_string ("Emacs.clr"),
Vinvocation_directory);
if (NILP (Ffile_exists_p (tem)))
{
- Lisp_Object newdir =
- Fexpand_file_name (build_string ("etc/"),
- Vsource_directory);
+ Lisp_Object newdir
+ = Fexpand_file_name (build_string ("etc/"),
+ Vsource_directory);
tem = Fexpand_file_name (build_string ("Emacs.clr"),
newdir);
}
Fcons (build_string ("Cancel"), Qnil),
Fcons (build_string ("Save and Exit"), Qt));
Lisp_Object res = ns_popup_dialog (Qt, contents, Qnil);
-fprintf (stderr, "res = %d\n", res ==Qt);
- if (res == Qt)
+fprintf (stderr, "res = %d\n", EQ (res, Qt)); // FIXME
+ if (EQ (res, Qt))
{
Feval (Fcons (intern ("save-buffers-kill-emacs"), Qnil));
return NSTerminateNow;
if (code == 0x2DC)
code = '~'; /* 0x7E */
emacs_event->modifiers = 0;
- emacs_event->kind =
- code > 0xFF ? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT;
+ emacs_event->kind
+ = code > 0xFF ? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT;
emacs_event->code = code;
EV_TRAILER ((id)nil);
}
NSTRACE (mouseMoved);
last_mouse_movement_time = EV_TIMESTAMP (e);
- last_mouse_motion_position =
- [self convertPoint: [e locationInWindow] fromView: nil];
+ last_mouse_motion_position
+ = [self convertPoint: [e locationInWindow] fromView: nil];
/* update any mouse face */
if (dpyinfo->mouse_face_hidden)
{
NSPoint p = [self convertPoint: [theEvent locationInWindow] fromView: nil];
NSRect r;
- struct ns_display_info *dpyinfo =
- emacsframe ? FRAME_NS_DISPLAY_INFO (emacsframe) : NULL;
+ struct ns_display_info *dpyinfo
+ = emacsframe ? FRAME_NS_DISPLAY_INFO (emacsframe) : NULL;
NSTRACE (mouseExited);
if (inKnob)
return self;
- scroll_repeat_entry =
- [[NSTimer scheduledTimerWithTimeInterval:
- SCROLL_BAR_CONTINUOUS_DELAY
+ scroll_repeat_entry
+ = [[NSTimer scheduledTimerWithTimeInterval:
+ SCROLL_BAR_CONTINUOUS_DELAY
target: self
selector: @selector (repeatScroll:)
userInfo: 0
repeats: YES]
- retain];
+ retain];
}
[self sendScrollEventAtLoc: 0 fromEvent: e];
pos = 0; /* ignored */
/* set a timer to repeat, as we can't let superclass do this modally */
- scroll_repeat_entry =
- [[NSTimer scheduledTimerWithTimeInterval: 0.5
- target: self
- selector: @selector (repeatScroll:)
- userInfo: 0
- repeats: YES]
- retain];
+ scroll_repeat_entry
+ = [[NSTimer scheduledTimerWithTimeInterval: 0.5
+ target: self
+ selector: @selector (repeatScroll:)
+ userInfo: 0
+ repeats: YES]
+ retain];
}
else
{
- (void) setPanelFromValues
{
- int cursorType =
- ns_lisp_to_cursor_type (get_frame_param (frame, Qcursor_type));
+ int cursorType
+ = ns_lisp_to_cursor_type (get_frame_param (frame, Qcursor_type));
prevExpandSpace = XFLOATINT (ns_expand_space);
prevBlinkRate = NILP (ns_cursor_blink_rate)
? 0 : XFLOATINT (ns_cursor_blink_rate);
ns_cursor_blink_rate = make_float (blinkRate);
ns_cursor_blink_mode = Qt;
}
- if (ns_cursor_blink_mode != old_cursor_blink_mode)
+ if (!EQ (ns_cursor_blink_mode, old_cursor_blink_mode))
Feval (Fcons (intern ("blink-cursor-mode"), Qnil));
if (blinkRate != 0.0 && prevBlinkRate != 0.0)
cursor_blink_entry = 0;
if (dpyinfo->ns_highlight_frame)
{
- Lisp_Object tem =
- get_frame_param (dpyinfo->ns_highlight_frame, Qcursor_type);
- dpyinfo->ns_highlight_frame->output_data.ns->desired_cursor =
- ns_lisp_to_cursor_type (tem);
+ Lisp_Object tem
+ = get_frame_param (dpyinfo->ns_highlight_frame, Qcursor_type);
+ dpyinfo->ns_highlight_frame->output_data.ns->desired_cursor
+ = ns_lisp_to_cursor_type (tem);
}
}
prevBlinkRate = blinkRate;
}
- FRAME_NEW_CURSOR (frame) =
- (cursorTag == 1 ? filled_box :
- (cursorTag == 2 ? bar :
- (cursorTag == 3 ? underscore : hollow_box)));
+ FRAME_NEW_CURSOR (frame)
+ = (cursorTag == 1 ? filled_box
+ : cursorTag == 2 ? bar
+ : cursorTag == 3 ? underscore : hollow_box);
store_frame_param (frame, Qcursor_type,
ns_cursor_type_to_lisp (FRAME_NEW_CURSOR (frame)));
ns_alternate_modifier = ns_mod_to_lisp (altTag);
synthItalFont = NULL;
while (membInfo = [senum nextObject])
{
- xlfdName =
- ns_fontname_to_xlfd ([[membInfo objectAtIndex: 0] UTF8String]);
+ xlfdName
+ = ns_fontname_to_xlfd ([[membInfo objectAtIndex: 0]
+ UTF8String]);
list = Fcons (build_string (xlfdName), list);
if (!synthItalFont)
{
- NSString *synthName =
- [[membInfo objectAtIndex: 0]
- stringByAppendingString: @"-synthItal"];
+ NSString *synthName
+ = [[membInfo objectAtIndex: 0]
+ stringByAppendingString: @"-synthItal"];
synthItalFont = [synthName UTF8String];
}
else if ([[membInfo objectAtIndex: 3] intValue]