diff options
| -rw-r--r-- | mac/ChangeLog | 6 | ||||
| -rw-r--r-- | mac/src/macterm.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/mac/ChangeLog b/mac/ChangeLog index acdd5fe3a90..e7dae4c2e29 100644 --- a/mac/ChangeLog +++ b/mac/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2001-01-28 Andrew Choi <akochoi@i-cable.com> | 1 | 2001-01-28 Andrew Choi <akochoi@i-cable.com> |
| 2 | 2 | ||
| 3 | * src/macterm.c (mac_font_pattern_match): Allocate three more | ||
| 4 | bytes to regex for '^', '$', and '\0'. | ||
| 5 | |||
| 6 | * src/macterm.c (x_list_fonts): Protect pattern and newlist from | ||
| 7 | garbage collection. | ||
| 8 | |||
| 3 | * src/macfns.c (QCconversion): Replaces QCalgorithm. | 9 | * src/macfns.c (QCconversion): Replaces QCalgorithm. |
| 4 | 10 | ||
| 5 | * src/macfns.c (image_ascent, lookup_image): Adapt to change of | 11 | * src/macfns.c (image_ascent, lookup_image): Adapt to change of |
diff --git a/mac/src/macterm.c b/mac/src/macterm.c index ed9280e42eb..2b7ea0f0a61 100644 --- a/mac/src/macterm.c +++ b/mac/src/macterm.c | |||
| @@ -10197,7 +10197,7 @@ mac_font_pattern_match (fontname, pattern) | |||
| 10197 | char * fontname; | 10197 | char * fontname; |
| 10198 | char * pattern; | 10198 | char * pattern; |
| 10199 | { | 10199 | { |
| 10200 | char *regex = (char *) alloca (strlen (pattern) * 2); | 10200 | char *regex = (char *) alloca (strlen (pattern) * 2 + 3); |
| 10201 | char *font_name_copy = (char *) alloca (strlen (fontname) + 1); | 10201 | char *font_name_copy = (char *) alloca (strlen (fontname) + 1); |
| 10202 | char *ptr; | 10202 | char *ptr; |
| 10203 | 10203 | ||
| @@ -10424,12 +10424,15 @@ x_list_fonts (struct frame *f, | |||
| 10424 | Lisp_Object newlist = Qnil; | 10424 | Lisp_Object newlist = Qnil; |
| 10425 | int n_fonts = 0; | 10425 | int n_fonts = 0; |
| 10426 | int i; | 10426 | int i; |
| 10427 | struct gcpro gcpro1, gcpro2; | ||
| 10427 | 10428 | ||
| 10428 | if (font_name_table == NULL) /* Initialize when first used. */ | 10429 | if (font_name_table == NULL) /* Initialize when first used. */ |
| 10429 | init_font_name_table (); | 10430 | init_font_name_table (); |
| 10430 | 10431 | ||
| 10431 | ptnstr = XSTRING (pattern)->data; | 10432 | ptnstr = XSTRING (pattern)->data; |
| 10432 | 10433 | ||
| 10434 | GCPRO2 (pattern, newlist); | ||
| 10435 | |||
| 10433 | /* Scan and matching bitmap fonts. */ | 10436 | /* Scan and matching bitmap fonts. */ |
| 10434 | for (i = 0; i < font_name_count; i++) | 10437 | for (i = 0; i < font_name_count; i++) |
| 10435 | { | 10438 | { |
| @@ -10445,6 +10448,8 @@ x_list_fonts (struct frame *f, | |||
| 10445 | 10448 | ||
| 10446 | /* MAC_TODO: add code for matching outline fonts here */ | 10449 | /* MAC_TODO: add code for matching outline fonts here */ |
| 10447 | 10450 | ||
| 10451 | UNGCPRO; | ||
| 10452 | |||
| 10448 | return newlist; | 10453 | return newlist; |
| 10449 | } | 10454 | } |
| 10450 | 10455 | ||