summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Choi <akochoi@shaw.ca>2001-01-28 11:23:07 +0000
committerAndrew Choi <akochoi@shaw.ca>2001-01-28 11:23:07 +0000
commit83a96b4d5479a91a4b53d6a6eb348497bba93179 (patch)
tree7526b98d17d7af14439557d1ed8781a43dd9ae28
parent847285704da07e3bf5526b6bd373ba1fe193ec35 (diff)
downloademacs-83a96b4d5479a91a4b53d6a6eb348497bba93179.tar.gz
* alloc.c (allocate_string) [macintosh]: Call check_string_bytes
only if current_sblock has been initialized. * frame.c (Fdelete_frame) [macintosh]: Allow deletion of initial terminal frame even if it is the only visible frame. * src/macfns.c (QCconversion): Replaces QCalgorithm. * src/macfns.c (image_ascent, lookup_image): Adapt to change of image margins. * src/macterm.c (x_produce_image_glyph, x_draw_image_foreground) (x_draw_image_relief, x_draw_image_foreground_1) (x_draw_image_glyph_string): Adapt to change of image margins. * src/macterm.c (mac_to_x_fontname): Change charset name of Simplify Chinese fonts from gb2312 to gb2312.1980 and Korean fonts from ksc5601 to ksc5601.1989.
-rw-r--r--mac/ChangeLog15
-rw-r--r--mac/src/macfns.c34
-rw-r--r--mac/src/macterm.c39
-rw-r--r--src/ChangeLog8
-rw-r--r--src/alloc.c6
-rw-r--r--src/frame.c8
6 files changed, 66 insertions, 44 deletions
diff --git a/mac/ChangeLog b/mac/ChangeLog
index d6f1ce67f89..acdd5fe3a90 100644
--- a/mac/ChangeLog
+++ b/mac/ChangeLog
@@ -1,3 +1,18 @@
+2001-01-28 Andrew Choi <akochoi@i-cable.com>
+
+ * src/macfns.c (QCconversion): Replaces QCalgorithm.
+
+ * src/macfns.c (image_ascent, lookup_image): Adapt to change of
+ image margins.
+
+ * src/macterm.c (x_produce_image_glyph, x_draw_image_foreground)
+ (x_draw_image_relief, x_draw_image_foreground_1)
+ (x_draw_image_glyph_string): Adapt to change of image margins.
+
+ * src/macterm.c (mac_to_x_fontname): Change charset name of
+ Simplify Chinese fonts from gb2312 to gb2312.1980 and Korean fonts
+ from ksc5601 to ksc5601.1989.
+
2000-12-12 Andrew Choi <akochoi@i-cable.com>
* cw5-mcp.xml: add md5.c to project.
diff --git a/mac/src/macfns.c b/mac/src/macfns.c
index 490da7979fe..7bf97d88cc2 100644
--- a/mac/src/macfns.c
+++ b/mac/src/macfns.c
@@ -4365,7 +4365,7 @@ Lisp_Object Qxbm;
extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile;
extern Lisp_Object QCdata;
Lisp_Object QCtype, QCascent, QCmargin, QCrelief;
-Lisp_Object QCalgorithm, QCcolor_symbols, QCheuristic_mask;
+Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask;
Lisp_Object QCindex;
/* Other symbols. */
@@ -4756,7 +4756,7 @@ image_ascent (img, face)
struct image *img;
struct face *face;
{
- int height = img->height + img->margin;
+ int height = img->height + img->vmargin;
int ascent;
if (img->ascent == CENTERED_IMAGE_ASCENT)
@@ -5044,8 +5044,7 @@ lookup_image (f, spec)
{
/* Handle image type independent image attributes
`:ascent PERCENT', `:margin MARGIN', `:relief RELIEF'. */
- Lisp_Object ascent, margin, relief, algorithm, heuristic_mask;
- Lisp_Object file;
+ Lisp_Object ascent, margin, relief;
ascent = image_spec_value (spec, QCascent, NULL);
if (INTEGERP (ascent))
@@ -5055,24 +5054,23 @@ lookup_image (f, spec)
margin = image_spec_value (spec, QCmargin, NULL);
if (INTEGERP (margin) && XINT (margin) >= 0)
- img->margin = XFASTINT (margin);
+ img->vmargin = img->hmargin = XFASTINT (margin);
+ else if (CONSP (margin) && INTEGERP (XCAR (margin))
+ && INTEGERP (XCDR (margin)))
+ {
+ if (XINT (XCAR (margin)) > 0)
+ img->hmargin = XFASTINT (XCAR (margin));
+ if (XINT (XCDR (margin)) > 0)
+ img->vmargin = XFASTINT (XCDR (margin));
+ }
relief = image_spec_value (spec, QCrelief, NULL);
if (INTEGERP (relief))
{
img->relief = XINT (relief);
- img->margin += abs (img->relief);
+ img->hmargin += abs (img->relief);
+ img->vmargin += abs (img->relief);
}
-
- /* Should we apply a Laplace edge-detection algorithm? */
- algorithm = image_spec_value (spec, QCalgorithm, NULL);
- if (img->pixmap && EQ (algorithm, Qlaplace))
- x_laplace (f, img);
-
- /* Should we built a mask heuristically? */
- heuristic_mask = image_spec_value (spec, QCheuristic_mask, NULL);
- if (img->pixmap && !img->mask && !NILP (heuristic_mask))
- x_build_heuristic_mask (f, img, heuristic_mask);
}
}
@@ -9785,8 +9783,8 @@ meaning don't clear the cache.");
staticpro (&Qxbm);
QCtype = intern (":type");
staticpro (&QCtype);
- QCalgorithm = intern (":algorithm");
- staticpro (&QCalgorithm);
+ QCconversion = intern (":conversion");
+ staticpro (&QCconversion);
QCheuristic_mask = intern (":heuristic-mask");
staticpro (&QCheuristic_mask);
QCcolor_symbols = intern (":color-symbols");
diff --git a/mac/src/macterm.c b/mac/src/macterm.c
index 0676e47864e..ed9280e42eb 100644
--- a/mac/src/macterm.c
+++ b/mac/src/macterm.c
@@ -2051,8 +2051,8 @@ x_produce_image_glyph (it)
prepare_image_for_display (it->f, img);
it->ascent = it->phys_ascent = image_ascent (img, face);
- it->descent = it->phys_descent = img->height + 2 * img->margin - it->ascent;
- it->pixel_width = img->width + 2 * img->margin;
+ it->descent = it->phys_descent = img->height + 2 * img->vmargin - it->ascent;
+ it->pixel_width = img->width + 2 * img->hmargin;
it->nglyphs = 1;
@@ -4190,11 +4190,8 @@ x_draw_image_foreground (s)
/* If there is a margin around the image, adjust x- and y-position
by that margin. */
- if (s->img->margin)
- {
- x += s->img->margin;
- y += s->img->margin;
- }
+ x += s->img->hmargin;
+ y += s->img->vmargin;
if (s->img->pixmap)
{
@@ -4271,11 +4268,8 @@ x_draw_image_relief (s)
/* If there is a margin around the image, adjust x- and y-position
by that margin. */
- if (s->img->margin)
- {
- x += s->img->margin;
- y += s->img->margin;
- }
+ x += s->img->hmargin;
+ y += s->img->vmargin;
if (s->hl == DRAW_IMAGE_SUNKEN
|| s->hl == DRAW_IMAGE_RAISED)
@@ -4320,11 +4314,8 @@ x_draw_image_foreground_1 (s, pixmap)
/* If there is a margin around the image, adjust x- and y-position
by that margin. */
- if (s->img->margin)
- {
- x += s->img->margin;
- y += s->img->margin;
- }
+ x += s->img->hmargin;
+ y += s->img->vmargin;
if (s->img->pixmap)
{
@@ -4403,7 +4394,7 @@ x_draw_glyph_string_bg_rect (s, x, y, w, h)
| s->face->box
|
| +-------------------------
- | | s->img->margin
+ | | s->img->vmargin
| |
| | +-------------------
| | | the image
@@ -4416,7 +4407,6 @@ x_draw_image_glyph_string (s)
{
int x, y;
int box_line_width = s->face->box_line_width;
- int margin = s->img->margin;
int height;
Pixmap pixmap = 0;
@@ -4427,7 +4417,8 @@ x_draw_image_glyph_string (s)
flickering. */
s->stippled_p = s->face->stipple != 0;
if (height > s->img->height
- || margin
+ || s->img->vmargin
+ || s->img->hmargin
#if 0 /* MAC_TODO: image mask */
|| s->img->mask
#endif
@@ -10278,13 +10269,13 @@ mac_to_x_fontname (char *name, int size, Style style, short scriptcode)
strcpy(cs, "big5-0");
break;
case smSimpChinese:
- strcpy(cs, "gb2312-0");
+ strcpy(cs, "gb2312.1980-0");
break;
case smJapanese:
strcpy(cs, "jisx0208.1983-sjis");
break;
case smKorean:
- strcpy(cs, "ksc5601-0");
+ strcpy(cs, "ksc5601.1989-0");
break;
default:
strcpy(cs, "mac-roman");
@@ -10324,9 +10315,9 @@ x_font_name_to_mac_font_name (char *xf, char *mf)
foundry, family, weight, slant, cs) != 5)
return;
- if (strcmp (cs, "big5-0") == 0 || strcmp (cs, "gb2312-0") == 0
+ if (strcmp (cs, "big5-0") == 0 || strcmp (cs, "gb2312.1980-0") == 0
|| strcmp (cs, "jisx0208.1983-sjis") == 0
- || strcmp (cs, "ksc5601-0") == 0 || strcmp (cs, "mac-roman") == 0)
+ || strcmp (cs, "ksc5601.1989-0") == 0 || strcmp (cs, "mac-roman") == 0)
strcpy(mf, family);
else
sprintf(mf, "%s-%s-%s", foundry, family, cs);
diff --git a/src/ChangeLog b/src/ChangeLog
index ed697ce51ee..e5987f7fcc3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
+2001-01-28 Andrew Choi <akochoi@i-cable.com>
+
+ * alloc.c (allocate_string) [macintosh]: Call check_string_bytes
+ only if current_sblock has been initialized.
+
+ * frame.c (Fdelete_frame) [macintosh]: Allow deletion of initial
+ terminal frame even if it is the only visible frame.
+
2001-01-28 Kenichi Handa <handa@etl.go.jp>
* fontset.c (font_family_registry): Even if FONTNAME conform to
diff --git a/src/alloc.c b/src/alloc.c
index b516695c0dd..4134d26fbd9 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1322,7 +1322,11 @@ allocate_string ()
consing_since_gc += sizeof *s;
#ifdef GC_CHECK_STRING_BYTES
- if (!noninteractive)
+ if (!noninteractive
+#ifdef macintosh
+ && current_sblock
+#endif
+ )
{
if (++check_string_bytes_count == 200)
{
diff --git a/src/frame.c b/src/frame.c
index 6850c92dc27..204eec30830 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1074,7 +1074,13 @@ frame. The hook is called with one argument FRAME.")
if (! FRAME_LIVE_P (f))
return Qnil;
- if (NILP (force) && !other_visible_frames (f))
+ if (NILP (force) && !other_visible_frames (f)
+#ifdef macintosh
+ /* Terminal frame deleted before any other visible frames are
+ created. */
+ && strcmp (XSTRING (f->name)->data, "F1") != 0
+#endif
+ )
error ("Attempt to delete the sole visible or iconified frame");
#if 0