emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/macterm.c


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] Changes to emacs/src/macterm.c
Date: Wed, 06 Jul 2005 04:43:10 -0400

Index: emacs/src/macterm.c
diff -c emacs/src/macterm.c:1.120 emacs/src/macterm.c:1.121
*** emacs/src/macterm.c:1.120   Mon Jul  4 16:06:33 2005
--- emacs/src/macterm.c Wed Jul  6 08:43:10 2005
***************
*** 1334,1339 ****
--- 1334,1345 ----
       int x, y0, y1;
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
+   struct face *face;
+ 
+   face = FACE_FROM_ID (f, VERTICAL_BORDER_FACE_ID);
+   if (face)
+     XSetForeground (FRAME_MAC_DISPLAY (f), f->output_data.mac->normal_gc,
+                   face->foreground);
  
    XDrawLine (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f),
             f->output_data.mac->normal_gc, x, y0, x, y1);
***************
*** 1721,1730 ****
--- 1727,1738 ----
        /* It's a program.  */
        struct ccl_program *ccl = font_info->font_encoder;
  
+       check_ccl_update (ccl);
        if (CHARSET_DIMENSION (charset) == 1)
        {
          ccl->reg[0] = charset;
          ccl->reg[1] = char2b->byte2;
+         ccl->reg[2] = -1;
        }
        else
        {
***************
*** 6249,6258 ****
       Style style;
       char *charset;
  {
!   char foundry[32], family[32], cs[32];
    char xf[256], *result, *p;
  
!   if (sscanf (name, "%31[^-]-%31[^-]-%31s", foundry, family, cs) == 3)
      charset = cs;
    else
      {
--- 6257,6267 ----
       Style style;
       char *charset;
  {
!   Str31 foundry, cs;
!   Str255 family;
    char xf[256], *result, *p;
  
!   if (sscanf (name, "%31[^-]-%255[^-]-%31s", foundry, family, cs) == 3)
      charset = cs;
    else
      {
***************
*** 6260,6272 ****
        strcpy(family, name);
      }
  
!   sprintf(xf, "-%s-%s-%s-%c-normal--%d-%d-%d-%d-m-%d-%s",
!           foundry, family, style & bold ? "bold" : "medium",
!         style & italic ? 'i' : 'r', size, size * 10,
!         size ? 75 : 0, size ? 75 : 0, size * 10, charset);
  
!   result = (char *) xmalloc (strlen (xf) + 1);
!   strcpy (result, xf);
    for (p = result; *p; p++)
      *p = tolower(*p);
    return result;
--- 6269,6280 ----
        strcpy(family, name);
      }
  
!   sprintf (xf, "%s-%c-normal--%d-%d-%d-%d-m-%d-%s",
!          style & bold ? "bold" : "medium", style & italic ? 'i' : 'r',
!          size, size * 10, size ? 75 : 0, size ? 75 : 0, size * 10, charset);
  
!   result = xmalloc (strlen (foundry) + strlen (family) + strlen (xf) + 3 + 1);
!   sprintf (result, "-%s-%s-%s", foundry, family, xf);
    for (p = result; *p; p++)
      *p = tolower(*p);
    return result;
***************
*** 6286,6300 ****
       Style *style;
       char *cs;
  {
!   char foundry[32], family[32], weight[20], slant[2], *p;
    Lisp_Object charset_info, coding_system = Qnil;
    struct coding_system coding;
  
    strcpy (mf, "");
  
!   if (sscanf (xf, 
"-%31[^-]-%31[^-]-%19[^-]-%1[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%31s",
                foundry, family, weight, slant, cs) != 5 &&
!       sscanf (xf, 
"-%31[^-]-%31[^-]-%19[^-]-%1[^-]-%*[^-]--%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%31s",
                foundry, family, weight, slant, cs) != 5)
      return;
  
--- 6294,6310 ----
       Style *style;
       char *cs;
  {
!   Str31 foundry;
!   Str255 family;
!   char weight[20], slant[2], *p;
    Lisp_Object charset_info, coding_system = Qnil;
    struct coding_system coding;
  
    strcpy (mf, "");
  
!   if (sscanf (xf, 
"-%31[^-]-%255[^-]-%19[^-]-%1[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%31s",
                foundry, family, weight, slant, cs) != 5 &&
!       sscanf (xf, 
"-%31[^-]-%255[^-]-%19[^-]-%1[^-]-%*[^-]--%*[^-]-%*[^-]-%*[^-]-%*[^-]-%*c-%*[^-]-%31s",
                foundry, family, weight, slant, cs) != 5)
      return;
  
***************
*** 6327,6333 ****
        coding.dst_multibyte = 1;
        coding.mode |= CODING_MODE_LAST_BLOCK;
        encode_coding (&coding, mf_decoded, mf,
!                    strlen (mf_decoded), sizeof (Str32) - 1);
        mf[coding.produced] = '\0';
      }
  }
--- 6337,6343 ----
        coding.dst_multibyte = 1;
        coding.mode |= CODING_MODE_LAST_BLOCK;
        encode_coding (&coding, mf_decoded, mf,
!                    strlen (mf_decoded), sizeof (Str255) - 1);
        mf[coding.produced] = '\0';
      }
  }
***************
*** 6459,6465 ****
    Handle font_handle, font_handle_2;
    short id, scriptcode;
    ResType type;
!   Str32 name;
    struct FontAssoc *fat;
    struct AsscEntry *assc_entry;
    Lisp_Object text_encoding_info_alist, text_encoding_info;
--- 6469,6475 ----
    Handle font_handle, font_handle_2;
    short id, scriptcode;
    ResType type;
!   Str255 name;
    struct FontAssoc *fat;
    struct AsscEntry *assc_entry;
    Lisp_Object text_encoding_info_alist, text_encoding_info;
***************
*** 6598,6605 ****
    int i, n_fonts = 0;
    Lisp_Object font_list = Qnil, pattern_regex, fontname;
    char *regex = (char *) alloca (strlen (pattern) * 2 + 3);
!   char scaled[256];
!   char *ptr;
    int scl_val[XLFD_SCL_LAST], *field, *val;
    char *longest_start, *cur_start, *nonspecial;
    int longest_len, exact;
--- 6608,6614 ----
    int i, n_fonts = 0;
    Lisp_Object font_list = Qnil, pattern_regex, fontname;
    char *regex = (char *) alloca (strlen (pattern) * 2 + 3);
!   char *scaled, *ptr;
    int scl_val[XLFD_SCL_LAST], *field, *val;
    char *longest_start, *cur_start, *nonspecial;
    int longest_len, exact;
***************
*** 6723,6728 ****
--- 6732,6738 ----
        {
          int former_len = ptr - font_name_table[i];
  
+         scaled = xmalloc (strlen (font_name_table[i]) + 20 + 1);
          memcpy (scaled, font_name_table[i], former_len);
          sprintf (scaled + former_len,
                   "-%d-%d-75-75-m-%d-%s",
***************
*** 6732,6737 ****
--- 6742,6748 ----
                   ptr + sizeof ("-0-0-0-0-m-0-") - 1);
          fontname = mac_c_string_match (pattern_regex, scaled,
                                         nonspecial, exact);
+         xfree (scaled);
          if (!NILP (fontname))
            {
              font_list = Fcons (fontname, font_list);
***************
*** 6852,6858 ****
     the values computed.  Value is non-zero if smallest_font_height or
     smallest_char_width become smaller than they were before.  */
  
! int
  x_compute_min_glyph_bounds (f)
       struct frame *f;
  {
--- 6863,6869 ----
     the values computed.  Value is non-zero if smallest_font_height or
     smallest_char_width become smaller than they were before.  */
  
! static int
  x_compute_min_glyph_bounds (f)
       struct frame *f;
  {
***************
*** 6937,6943 ****
    GrafPtr port;
    SInt16 old_fontnum, old_fontsize;
    Style old_fontface;
!   Str32 mfontname, mfontname_decoded, charset;
    SInt16 fontnum;
    Style fontface;
  #if TARGET_API_MAC_CARBON
--- 6948,6955 ----
    GrafPtr port;
    SInt16 old_fontnum, old_fontsize;
    Style old_fontface;
!   Str255 mfontname, mfontname_decoded;
!   Str31 charset;
    SInt16 fontnum;
    Style fontface;
  #if TARGET_API_MAC_CARBON
***************
*** 7329,7335 ****
         before, or if the font loaded has a smalle>r height than any
         other font loaded before.  If this happens, it will make a
         glyph matrix reallocation necessary.  */
!     fonts_changed_p = x_compute_min_glyph_bounds (f);
      UNBLOCK_INPUT;
      return fontp;
    }
--- 7341,7347 ----
         before, or if the font loaded has a smalle>r height than any
         other font loaded before.  If this happens, it will make a
         glyph matrix reallocation necessary.  */
!     fonts_changed_p |= x_compute_min_glyph_bounds (f);
      UNBLOCK_INPUT;
      return fontp;
    }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]