comparison src/fontset.c @ 40656:cdfd4d09b79a

Update usage of CHECK_ macros (remove unused second argument).
author Pavel Jan?k <Pavel@Janik.cz>
date Fri, 02 Nov 2001 20:46:55 +0000
parents 392c2fe9edd7
children 1e7e05e5e6e5
comparison
equal deleted inserted replaced
40655:45453187feeb 40656:cdfd4d09b79a
814 Lisp_Object fontset; 814 Lisp_Object fontset;
815 int id; 815 int id;
816 816
817 (*check_window_system_func) (); 817 (*check_window_system_func) ();
818 818
819 CHECK_STRING (pattern, 0); 819 CHECK_STRING (pattern);
820 820
821 if (XSTRING (pattern)->size == 0) 821 if (XSTRING (pattern)->size == 0)
822 return Qnil; 822 return Qnil;
823 823
824 id = fs_query_fontset (pattern, !NILP (regexpp)); 824 id = fs_query_fontset (pattern, !NILP (regexpp));
886 Lisp_Object fontset, elements, ascii_font; 886 Lisp_Object fontset, elements, ascii_font;
887 Lisp_Object tem, tail, elt; 887 Lisp_Object tem, tail, elt;
888 888
889 (*check_window_system_func) (); 889 (*check_window_system_func) ();
890 890
891 CHECK_STRING (name, 0); 891 CHECK_STRING (name);
892 CHECK_LIST (fontlist, 1); 892 CHECK_LIST (fontlist);
893 893
894 name = Fdowncase (name); 894 name = Fdowncase (name);
895 tem = Fquery_fontset (name, Qnil); 895 tem = Fquery_fontset (name, Qnil);
896 if (!NILP (tem)) 896 if (!NILP (tem))
897 error ("Fontset `%s' matches the existing fontset `%s'", 897 error ("Fontset `%s' matches the existing fontset `%s'",
967 int id; 967 int id;
968 968
969 if (EQ (name, Qt)) 969 if (EQ (name, Qt))
970 return Vdefault_fontset; 970 return Vdefault_fontset;
971 971
972 CHECK_STRING (name, 0); 972 CHECK_STRING (name);
973 id = fs_query_fontset (name, 0); 973 id = fs_query_fontset (name, 0);
974 if (id < 0) 974 if (id < 0)
975 error ("Fontset `%s' does not exist", XSTRING (name)->data); 975 error ("Fontset `%s' does not exist", XSTRING (name)->data);
976 return FONTSET_FROM_ID (id); 976 return FONTSET_FROM_ID (id);
977 } 977 }
1000 1000
1001 if (CONSP (character)) 1001 if (CONSP (character))
1002 { 1002 {
1003 /* CH should be (FROM . TO) where FROM and TO are non-generic 1003 /* CH should be (FROM . TO) where FROM and TO are non-generic
1004 characters. */ 1004 characters. */
1005 CHECK_NUMBER_CAR (character, 1); 1005 CHECK_NUMBER_CAR (character);
1006 CHECK_NUMBER_CDR (character, 1); 1006 CHECK_NUMBER_CDR (character);
1007 from = XINT (XCAR (character)); 1007 from = XINT (XCAR (character));
1008 to = XINT (XCDR (character)); 1008 to = XINT (XCDR (character));
1009 if (!char_valid_p (from, 0) || !char_valid_p (to, 0)) 1009 if (!char_valid_p (from, 0) || !char_valid_p (to, 0))
1010 error ("Character range should be by non-generic characters."); 1010 error ("Character range should be by non-generic characters.");
1011 if (!NILP (name) 1011 if (!NILP (name)
1020 from = MAKE_CHAR (XINT (AREF (elt, 0)), 0, 0); 1020 from = MAKE_CHAR (XINT (AREF (elt, 0)), 0, 0);
1021 to = from; 1021 to = from;
1022 } 1022 }
1023 else 1023 else
1024 { 1024 {
1025 CHECK_NUMBER (character, 1); 1025 CHECK_NUMBER (character);
1026 from = XINT (character); 1026 from = XINT (character);
1027 to = from; 1027 to = from;
1028 } 1028 }
1029 if (!char_valid_p (from, 1)) 1029 if (!char_valid_p (from, 1))
1030 invalid_character (from); 1030 invalid_character (from);
1043 fontname = Fdowncase (fontname); 1043 fontname = Fdowncase (fontname);
1044 elt = Fcons (make_number (from), font_family_registry (fontname, 0)); 1044 elt = Fcons (make_number (from), font_family_registry (fontname, 0));
1045 } 1045 }
1046 else 1046 else
1047 { 1047 {
1048 CHECK_CONS (fontname, 2); 1048 CHECK_CONS (fontname);
1049 family = XCAR (fontname); 1049 family = XCAR (fontname);
1050 registry = XCDR (fontname); 1050 registry = XCDR (fontname);
1051 if (!NILP (family)) 1051 if (!NILP (family))
1052 { 1052 {
1053 CHECK_STRING (family, 2); 1053 CHECK_STRING (family);
1054 family = Fdowncase (family); 1054 family = Fdowncase (family);
1055 } 1055 }
1056 if (!NILP (registry)) 1056 if (!NILP (registry))
1057 { 1057 {
1058 CHECK_STRING (registry, 2); 1058 CHECK_STRING (registry);
1059 registry = Fdowncase (registry); 1059 registry = Fdowncase (registry);
1060 } 1060 }
1061 elt = Fcons (make_number (from), Fcons (family, registry)); 1061 elt = Fcons (make_number (from), Fcons (family, registry));
1062 } 1062 }
1063 1063
1064 /* The arg FRAME is kept for backward compatibility. We only check 1064 /* The arg FRAME is kept for backward compatibility. We only check
1065 the validity. */ 1065 the validity. */
1066 if (!NILP (frame)) 1066 if (!NILP (frame))
1067 CHECK_LIVE_FRAME (frame, 3); 1067 CHECK_LIVE_FRAME (frame);
1068 1068
1069 for (; from <= to; from++) 1069 for (; from <= to; from++)
1070 FONTSET_SET (fontset, from, elt); 1070 FONTSET_SET (fontset, from, elt);
1071 Foptimize_char_table (fontset); 1071 Foptimize_char_table (fontset);
1072 1072
1111 struct font_info *fontp; 1111 struct font_info *fontp;
1112 Lisp_Object info; 1112 Lisp_Object info;
1113 1113
1114 (*check_window_system_func) (); 1114 (*check_window_system_func) ();
1115 1115
1116 CHECK_STRING (name, 0); 1116 CHECK_STRING (name);
1117 name = Fdowncase (name); 1117 name = Fdowncase (name);
1118 if (NILP (frame)) 1118 if (NILP (frame))
1119 frame = selected_frame; 1119 frame = selected_frame;
1120 CHECK_LIVE_FRAME (frame, 1); 1120 CHECK_LIVE_FRAME (frame);
1121 f = XFRAME (frame); 1121 f = XFRAME (frame);
1122 1122
1123 if (!query_font_func) 1123 if (!query_font_func)
1124 error ("Font query function is not supported"); 1124 error ("Font query function is not supported");
1125 1125
1168 Lisp_Object window; 1168 Lisp_Object window;
1169 struct window *w; 1169 struct window *w;
1170 struct frame *f; 1170 struct frame *f;
1171 struct face *face; 1171 struct face *face;
1172 1172
1173 CHECK_NUMBER_COERCE_MARKER (position, 0); 1173 CHECK_NUMBER_COERCE_MARKER (position);
1174 pos = XINT (position); 1174 pos = XINT (position);
1175 if (pos < BEGV || pos >= ZV) 1175 if (pos < BEGV || pos >= ZV)
1176 args_out_of_range_3 (position, make_number (BEGV), make_number (ZV)); 1176 args_out_of_range_3 (position, make_number (BEGV), make_number (ZV));
1177 pos_byte = CHAR_TO_BYTE (pos); 1177 pos_byte = CHAR_TO_BYTE (pos);
1178 c = FETCH_CHAR (pos_byte); 1178 c = FETCH_CHAR (pos_byte);
1272 1272
1273 fontset = check_fontset_name (name); 1273 fontset = check_fontset_name (name);
1274 1274
1275 if (NILP (frame)) 1275 if (NILP (frame))
1276 frame = selected_frame; 1276 frame = selected_frame;
1277 CHECK_LIVE_FRAME (frame, 1); 1277 CHECK_LIVE_FRAME (frame);
1278 f = XFRAME (frame); 1278 f = XFRAME (frame);
1279 1279
1280 /* Recode realized fontsets whose base is FONTSET in the table 1280 /* Recode realized fontsets whose base is FONTSET in the table
1281 `realized'. */ 1281 `realized'. */
1282 realized = (Lisp_Object *) alloca (sizeof (Lisp_Object) 1282 realized = (Lisp_Object *) alloca (sizeof (Lisp_Object)
1358 int c; 1358 int c;
1359 Lisp_Object fontset, elt; 1359 Lisp_Object fontset, elt;
1360 1360
1361 fontset = check_fontset_name (name); 1361 fontset = check_fontset_name (name);
1362 1362
1363 CHECK_NUMBER (ch, 1); 1363 CHECK_NUMBER (ch);
1364 c = XINT (ch); 1364 c = XINT (ch);
1365 if (!char_valid_p (c, 1)) 1365 if (!char_valid_p (c, 1))
1366 invalid_character (c); 1366 invalid_character (c);
1367 1367
1368 elt = FONTSET_REF (fontset, c); 1368 elt = FONTSET_REF (fontset, c);