return XINT (size);
if (NILP (size))
return 0;
- font_assert (FLOATP (size));
+ eassert (FLOATP (size));
point_size = XFLOAT_DATA (size);
val = AREF (spec, FONT_DPI_INDEX);
if (INTEGERP (val))
}
if (! noerror)
return -1;
- if (len == 255)
- abort ();
+ eassert (len < 255);
elt = Fmake_vector (make_number (2), make_number (100));
ASET (elt, 1, val);
args[0] = table;
table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX);
CHECK_VECTOR (table);
i = XINT (val) & 0xFF;
- font_assert (((i >> 4) & 0xF) < ASIZE (table));
+ eassert (((i >> 4) & 0xF) < ASIZE (table));
elt = AREF (table, ((i >> 4) & 0xF));
CHECK_VECTOR (elt);
- font_assert ((i & 0xF) + 1 < ASIZE (elt));
+ eassert ((i & 0xF) + 1 < ASIZE (elt));
elt = (for_face ? AREF (elt, 1) : AREF (elt, (i & 0xF) + 1));
CHECK_SYMBOL (elt);
return elt;
{
double point_size = -1;
- font_assert (FONT_SPEC_P (font));
+ eassert (FONT_SPEC_P (font));
p = f[XLFD_POINT_INDEX];
if (*p == '[')
point_size = parse_matrix (p);
Lisp_Object val;
int i, j, len;
- font_assert (FONTP (font));
+ eassert (FONTP (font));
for (i = FONT_FOUNDRY_INDEX, j = XLFD_FOUNDRY_INDEX; i <= FONT_REGISTRY_INDEX;
i++, j++)
}
val = AREF (font, FONT_SIZE_INDEX);
- font_assert (NUMBERP (val) || NILP (val));
+ eassert (NUMBERP (val) || NILP (val));
if (INTEGERP (val))
{
EMACS_INT v = XINT (val);
}
else
{
- if (! FLOATP (val))
- abort ();
+ eassert (FLOATP (val));
pixel_size = -1;
point_size = (int) XFLOAT_DATA (val);
}
val = XCDR (cache);
while (CONSP (val) && ! EQ (XCAR (XCAR (val)), driver->type))
cache = val, val = XCDR (val);
- font_assert (! NILP (val));
+ eassert (! NILP (val));
tmp = XCDR (XCAR (val));
XSETCAR (tmp, make_number (XINT (XCAR (tmp)) - 1));
if (XINT (XCAR (tmp)) == 0)
Lisp_Object val = driver->get_cache (f);
Lisp_Object type = driver->type;
- font_assert (CONSP (val));
+ eassert (CONSP (val));
for (val = XCDR (val); ! EQ (XCAR (XCAR (val)), type); val = XCDR (val));
- font_assert (CONSP (val));
+ eassert (CONSP (val));
/* VAL = ((DRIVER-TYPE NUM-FRAMES FONT-CACHE-DATA ...) ...) */
val = XCDR (XCAR (val));
return val;
if (! NILP (AREF (val, FONT_TYPE_INDEX)))
{
- font_assert (font && driver == font->driver);
+ eassert (font && driver == font->driver);
driver->close (f, font);
num_fonts--;
}
int need_filtering = 0;
int i;
- font_assert (FONT_SPEC_P (spec));
+ eassert (FONT_SPEC_P (spec));
if (INTEGERP (AREF (spec, FONT_SIZE_INDEX)))
size = XINT (AREF (spec, FONT_SIZE_INDEX));
int min_width, height;
int scaled_pixel_size = pixel_size;
- font_assert (FONT_ENTITY_P (entity));
+ eassert (FONT_ENTITY_P (entity));
size = AREF (entity, FONT_SIZE_INDEX);
if (XINT (size) != 0)
scaled_pixel_size = pixel_size = XINT (size);
FONT_ADD_LOG ("close", font_object, Qnil);
font->driver->close (f, font);
#ifdef HAVE_WINDOW_SYSTEM
- font_assert (FRAME_X_DISPLAY_INFO (f)->n_fonts);
+ eassert (FRAME_X_DISPLAY_INFO (f)->n_fonts);
FRAME_X_DISPLAY_INFO (f)->n_fonts--;
#endif
num_fonts--;
return driver_list->driver->has_char (font, c);
}
- font_assert (FONT_OBJECT_P (font));
+ eassert (FONT_OBJECT_P (font));
fontp = XFONT_OBJECT (font);
if (fontp->driver->has_char)
{
{
struct font *font;
- font_assert (FONT_OBJECT_P (font_object));
+ eassert (FONT_OBJECT_P (font_object));
font = XFONT_OBJECT (font_object);
return font->driver->encode_char (font, c);
}
Lisp_Object
font_get_name (Lisp_Object font_object)
{
- font_assert (FONT_OBJECT_P (font_object));
+ eassert (FONT_OBJECT_P (font_object));
return AREF (font_object, FONT_NAME_INDEX);
}
{
struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID);
Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX];
- if (INTEGERP (height))
- pt = XINT (height);
- else
- abort (); /* We should never end up here. */
+ eassert (INTEGERP (height));
+ pt = XINT (height);
}
pt /= 10;
}
else
{
- font_assert (face);
+ eassert (face);
pos_byte = string_char_to_byte (string, pos);
}
while (! NILP (val)
&& ! EQ (XCAR (XCAR (val)), driver_list->driver->type))
val = XCDR (val);
- font_assert (! NILP (val));
+ eassert (! NILP (val));
tmp = XCDR (XCAR (val));
if (XINT (XCAR (tmp)) == 0)
{
s_pfn_Get_Outline_Text_MetricsW = (GetOutlineTextMetricsW_Proc)
GetProcAddress (hm_unicows, "GetOutlineTextMetricsW");
}
- if (s_pfn_Get_Outline_Text_MetricsW == NULL)
- abort (); /* cannot happen */
+ eassert (s_pfn_Get_Outline_Text_MetricsW != NULL);
return s_pfn_Get_Outline_Text_MetricsW (hdc, cbData, lpotmw);
}
s_pfn_Get_Text_MetricsW = (GetTextMetricsW_Proc)
GetProcAddress (hm_unicows, "GetTextMetricsW");
}
- if (s_pfn_Get_Text_MetricsW == NULL)
- abort (); /* cannot happen */
+ eassert (s_pfn_Get_Text_MetricsW != NULL);
return s_pfn_Get_Text_MetricsW (hdc, lptmw);
}
s_pfn_Get_Glyph_OutlineW = (GetGlyphOutlineW_Proc)
GetProcAddress (hm_unicows, "GetGlyphOutlineW");
}
- if (s_pfn_Get_Glyph_OutlineW == NULL)
- abort (); /* cannot happen */
+ eassert (s_pfn_Get_Glyph_OutlineW != NULL);
return s_pfn_Get_Glyph_OutlineW (hdc, uChar, uFormat, lpgm, cbBuffer,
lpvBuffer, lpmat2);
}