/* This should be the first include, as it may set up #defines affecting
interpretation of even the system includes. */
-#include "config.h"
+#include <config.h>
#include <setjmp.h>
#include "lisp.h"
#include "frame.h"
#include "character.h"
#include "font.h"
+#include "termchar.h"
/* TODO: Drop once we can assume gnustep-gui 0.17.1. */
#ifdef NS_IMPL_GNUSTEP
/* Converts NSFont descriptor to FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, etc.. */
static Lisp_Object
-ns_descriptor_to_entity (NSFontDescriptor *desc, Lisp_Object extra, char *style)
+ns_descriptor_to_entity (NSFontDescriptor *desc,
+ Lisp_Object extra,
+ const char *style)
{
Lisp_Object font_entity = font_make_entity ();
/* NSString *psName = [desc postscriptName]; */
/* Default font entity. */
static Lisp_Object
-ns_fallback_entity ()
+ns_fallback_entity (void)
{
return ns_descriptor_to_entity ([[NSFont userFixedPitchFontOfSize: 0]
fontDescriptor], Qnil, NULL);
xmalloc (0x100 * sizeof (struct font_metrics *));
if (!font_info->glyphs || !font_info->metrics)
return Qnil;
- bzero (font_info->glyphs, 0x100 * sizeof (unsigned short *));
- bzero (font_info->metrics, 0x100 * sizeof (struct font_metrics *));
+ memset (font_info->glyphs, 0, 0x100 * sizeof (unsigned short *));
+ memset (font_info->metrics, 0, 0x100 * sizeof (struct font_metrics *));
BLOCK_INPUT;
[font_info->nsfont retain];
/* set up ns_font (defined in nsgui.h) */
- font_info->name = (char *)xmalloc (strlen (fontName) + 1);
- bcopy (fontName, font_info->name, strlen (fontName) + 1);
+ font_info->name = (char *)xmalloc (strlen (fontName)+1);
+ strcpy (font_info->name, fontName);
font_info->bold = [fontMgr traitsOfFont: nsfont] & NSBoldFontMask;
font_info->ital =
synthItal || ([fontMgr traitsOfFont: nsfont] & NSItalicFontMask);
int totalWidth = 0;
int i;
- bzero (metrics, sizeof (struct font_metrics));
+ memset (metrics, 0, sizeof (struct font_metrics));
for (i =0; i<nglyphs; i++)
{
face = s->face;
break;
case NS_DUMPGLYPH_MOUSEFACE:
- face = FACE_FROM_ID (s->f,
- FRAME_NS_DISPLAY_INFO (s->f)->mouse_face_face_id);
+ face = FACE_FROM_ID (s->f, MOUSE_HL_INFO (s->f)->mouse_face_face_id);
if (!face)
face = FACE_FROM_ID (s->f, MOUSE_FACE_ID);
break;
DPSstroke (context);
DPSgrestore (context);
- return to-from;
}
#else /* NS_IMPL_COCOA */
}
CGContextRestoreGState (gcontext);
- return;
}
#endif /* NS_IMPL_COCOA */
-
+ return to-from;
}
sfont = [font_info->nsfont screenFont];
font_info->metrics[block] = xmalloc (0x100 * sizeof (struct font_metrics));
- bzero (font_info->metrics[block], 0x100 * sizeof (struct font_metrics));
+ memset (font_info->metrics[block], 0, 0x100 * sizeof (struct font_metrics));
if (!(font_info->metrics[block]))
abort ();
void
-syms_of_nsfont ()
+syms_of_nsfont (void)
{
nsfont_driver.type = Qns;
register_font_driver (&nsfont_driver, NULL);