Mercurial > emacs
comparison src/fontset.c @ 34975:0d69e2d2724e
(fontset_ref): Remove unused variable `i'.
(fontset_set): Remove unused variables `j' and `tmp'.
(make_fontset): Remove unused variables `i', `j', `elt' and
`base_elt'.
(make_fontset_for_ascii_face): Remove unused variable `name'.
(fs_load_font): Remove unused variable `font_idx'.
(fs_query_fontset): Remove unused function-local variable
`fontset'.
(list_fontsets): Remove unused variable `tail'.
(Fnew_fontset): Remove unused variables `family' and `registry'.
(accumulate_font_info): Remove unused variable `tmp'.
(Ffontset_font): Remove unused variable `id'.
(syms_of_fontset): Remove unused variable `i'.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 02 Jan 2001 14:11:36 +0000 |
parents | ca33eb68d9da |
children | 3551e8549d4e |
comparison
equal
deleted
inserted
replaced
34974:5bf4bcc0f936 | 34975:0d69e2d2724e |
---|---|
208 Lisp_Object fontset; | 208 Lisp_Object fontset; |
209 int c; | 209 int c; |
210 { | 210 { |
211 int charset, c1, c2; | 211 int charset, c1, c2; |
212 Lisp_Object elt, defalt; | 212 Lisp_Object elt, defalt; |
213 int i; | |
214 | 213 |
215 if (SINGLE_BYTE_CHAR_P (c)) | 214 if (SINGLE_BYTE_CHAR_P (c)) |
216 return FONTSET_ASCII (fontset); | 215 return FONTSET_ASCII (fontset); |
217 | 216 |
218 SPLIT_CHAR (c, charset, c1, c2); | 217 SPLIT_CHAR (c, charset, c1, c2); |
279 Lisp_Object fontset; | 278 Lisp_Object fontset; |
280 int c; | 279 int c; |
281 Lisp_Object newelt; | 280 Lisp_Object newelt; |
282 { | 281 { |
283 int charset, code[3]; | 282 int charset, code[3]; |
284 Lisp_Object *elt, tmp; | 283 Lisp_Object *elt; |
285 int i, j; | 284 int i; |
286 | 285 |
287 if (SINGLE_BYTE_CHAR_P (c)) | 286 if (SINGLE_BYTE_CHAR_P (c)) |
288 { | 287 { |
289 FONTSET_ASCII (fontset) = newelt; | 288 FONTSET_ASCII (fontset) = newelt; |
290 return; | 289 return; |
312 | 311 |
313 static Lisp_Object | 312 static Lisp_Object |
314 make_fontset (frame, name, base) | 313 make_fontset (frame, name, base) |
315 Lisp_Object frame, name, base; | 314 Lisp_Object frame, name, base; |
316 { | 315 { |
317 Lisp_Object fontset, elt, base_elt; | 316 Lisp_Object fontset; |
318 int size = ASIZE (Vfontset_table); | 317 int size = ASIZE (Vfontset_table); |
319 int id = next_fontset_id; | 318 int id = next_fontset_id; |
320 int i, j; | |
321 | 319 |
322 /* Find a free slot in Vfontset_table. Usually, next_fontset_id is | 320 /* Find a free slot in Vfontset_table. Usually, next_fontset_id is |
323 the next available fontset ID. So it is expected that this loop | 321 the next available fontset ID. So it is expected that this loop |
324 terminates quickly. In addition, as the last element of | 322 terminates quickly. In addition, as the last element of |
325 Vfotnset_table is always nil, we don't have to check the range of | 323 Vfotnset_table is always nil, we don't have to check the range of |
491 int | 489 int |
492 make_fontset_for_ascii_face (f, base_fontset_id) | 490 make_fontset_for_ascii_face (f, base_fontset_id) |
493 FRAME_PTR f; | 491 FRAME_PTR f; |
494 int base_fontset_id; | 492 int base_fontset_id; |
495 { | 493 { |
496 Lisp_Object base_fontset, fontset, name, frame; | 494 Lisp_Object base_fontset, fontset, frame; |
497 | 495 |
498 XSETFRAME (frame, f); | 496 XSETFRAME (frame, f); |
499 if (base_fontset_id >= 0) | 497 if (base_fontset_id >= 0) |
500 { | 498 { |
501 base_fontset = FONTSET_FROM_ID (base_fontset_id); | 499 base_fontset = FONTSET_FROM_ID (base_fontset_id); |
578 int id; | 576 int id; |
579 struct face *face; | 577 struct face *face; |
580 { | 578 { |
581 Lisp_Object fontset; | 579 Lisp_Object fontset; |
582 Lisp_Object list, elt; | 580 Lisp_Object list, elt; |
583 int font_idx; | |
584 int size = 0; | 581 int size = 0; |
585 struct font_info *fontp; | 582 struct font_info *fontp; |
586 int charset = CHAR_CHARSET (c); | 583 int charset = CHAR_CHARSET (c); |
587 | 584 |
588 if (face) | 585 if (face) |
747 int | 744 int |
748 fs_query_fontset (name, regexpp) | 745 fs_query_fontset (name, regexpp) |
749 Lisp_Object name; | 746 Lisp_Object name; |
750 int regexpp; | 747 int regexpp; |
751 { | 748 { |
752 Lisp_Object fontset, tem; | 749 Lisp_Object tem; |
753 int i; | 750 int i; |
754 | 751 |
755 name = Fdowncase (name); | 752 name = Fdowncase (name); |
756 if (!regexpp) | 753 if (!regexpp) |
757 { | 754 { |
824 list_fontsets (f, pattern, size) | 821 list_fontsets (f, pattern, size) |
825 FRAME_PTR f; | 822 FRAME_PTR f; |
826 Lisp_Object pattern; | 823 Lisp_Object pattern; |
827 int size; | 824 int size; |
828 { | 825 { |
829 Lisp_Object frame, regexp, val, tail; | 826 Lisp_Object frame, regexp, val; |
830 int id; | 827 int id; |
831 | 828 |
832 XSETFRAME (frame, f); | 829 XSETFRAME (frame, f); |
833 | 830 |
834 regexp = fontset_pattern_regexp (pattern); | 831 regexp = fontset_pattern_regexp (pattern); |
887 /* Check the validity of FONTLIST while creating a template for | 884 /* Check the validity of FONTLIST while creating a template for |
888 fontset elements. */ | 885 fontset elements. */ |
889 elements = ascii_font = Qnil; | 886 elements = ascii_font = Qnil; |
890 for (tail = fontlist; CONSP (tail); tail = XCDR (tail)) | 887 for (tail = fontlist; CONSP (tail); tail = XCDR (tail)) |
891 { | 888 { |
892 Lisp_Object family, registry; | |
893 int c, charset; | 889 int c, charset; |
894 | 890 |
895 tem = XCAR (tail); | 891 tem = XCAR (tail); |
896 if (!CONSP (tem) | 892 if (!CONSP (tem) |
897 || (charset = get_charset_id (XCAR (tem))) < 0 | 893 || (charset = get_charset_id (XCAR (tem))) < 0 |
1183 | 1179 |
1184 static void | 1180 static void |
1185 accumulate_font_info (arg, character, elt) | 1181 accumulate_font_info (arg, character, elt) |
1186 Lisp_Object arg, character, elt; | 1182 Lisp_Object arg, character, elt; |
1187 { | 1183 { |
1188 Lisp_Object last, last_char, last_elt, tmp; | 1184 Lisp_Object last, last_char, last_elt; |
1189 | 1185 |
1190 if (!CONSP (elt) && !SINGLE_BYTE_CHAR_P (XINT (character))) | 1186 if (!CONSP (elt) && !SINGLE_BYTE_CHAR_P (XINT (character))) |
1191 elt = FONTSET_REF (Vdefault_fontset, XINT (character)); | 1187 elt = FONTSET_REF (Vdefault_fontset, XINT (character)); |
1192 if (!CONSP (elt)) | 1188 if (!CONSP (elt)) |
1193 return; | 1189 return; |
1334 "Return a font name pattern for character CH in fontset NAME.\n\ | 1330 "Return a font name pattern for character CH in fontset NAME.\n\ |
1335 If NAME is t, find a font name pattern in the default fontset.") | 1331 If NAME is t, find a font name pattern in the default fontset.") |
1336 (name, ch) | 1332 (name, ch) |
1337 Lisp_Object name, ch; | 1333 Lisp_Object name, ch; |
1338 { | 1334 { |
1339 int c, id; | 1335 int c; |
1340 Lisp_Object fontset, elt; | 1336 Lisp_Object fontset, elt; |
1341 | 1337 |
1342 fontset = check_fontset_name (name); | 1338 fontset = check_fontset_name (name); |
1343 | 1339 |
1344 CHECK_NUMBER (ch, 1); | 1340 CHECK_NUMBER (ch, 1); |
1374 } | 1370 } |
1375 | 1371 |
1376 void | 1372 void |
1377 syms_of_fontset () | 1373 syms_of_fontset () |
1378 { | 1374 { |
1379 int i; | |
1380 | |
1381 if (!load_font_func) | 1375 if (!load_font_func) |
1382 /* Window system initializer should have set proper functions. */ | 1376 /* Window system initializer should have set proper functions. */ |
1383 abort (); | 1377 abort (); |
1384 | 1378 |
1385 Qfontset = intern ("fontset"); | 1379 Qfontset = intern ("fontset"); |