Mercurial > hg > xemacs-beta
comparison src/chartab.c @ 4959:bd169a24a554
merge
| author | Ben Wing <ben@xemacs.org> |
|---|---|
| date | Thu, 28 Jan 2010 04:27:30 -0600 |
| parents | 19a72041c5ed |
| children | e813cf16c015 |
comparison
equal
deleted
inserted
replaced
| 4893:99f2102552d7 | 4959:bd169a24a554 |
|---|---|
| 224 } | 224 } |
| 225 | 225 |
| 226 static void | 226 static void |
| 227 decode_char_table_range (Lisp_Object range, struct chartab_range *outrange) | 227 decode_char_table_range (Lisp_Object range, struct chartab_range *outrange) |
| 228 { | 228 { |
| 229 xzero (*outrange); | |
| 229 if (EQ (range, Qt)) | 230 if (EQ (range, Qt)) |
| 230 outrange->type = CHARTAB_RANGE_ALL; | 231 outrange->type = CHARTAB_RANGE_ALL; |
| 231 else if (CHAR_OR_CHAR_INTP (range)) | 232 else if (CHAR_OR_CHAR_INTP (range)) |
| 232 { | 233 { |
| 233 outrange->type = CHARTAB_RANGE_CHAR; | 234 outrange->type = CHARTAB_RANGE_CHAR; |
| 311 { | 312 { |
| 312 struct ptemap *a = (struct ptemap *) arg; | 313 struct ptemap *a = (struct ptemap *) arg; |
| 313 struct gcpro gcpro1; | 314 struct gcpro gcpro1; |
| 314 Lisp_Object lisprange; | 315 Lisp_Object lisprange; |
| 315 if (!a->first) | 316 if (!a->first) |
| 316 write_c_string (a->printcharfun, " "); | 317 write_ascstring (a->printcharfun, " "); |
| 317 a->first = 0; | 318 a->first = 0; |
| 318 lisprange = encode_char_table_range (range); | 319 lisprange = encode_char_table_range (range); |
| 319 GCPRO1 (lisprange); | 320 GCPRO1 (lisprange); |
| 320 write_fmt_string_lisp (a->printcharfun, "%s %S", 2, lisprange, val); | 321 write_fmt_string_lisp (a->printcharfun, "%s %S", 2, lisprange, val); |
| 321 UNGCPRO; | 322 UNGCPRO; |
| 335 arg.first = 1; | 336 arg.first = 1; |
| 336 | 337 |
| 337 write_fmt_string_lisp (printcharfun, "#s(char-table type %s data (", | 338 write_fmt_string_lisp (printcharfun, "#s(char-table type %s data (", |
| 338 1, char_table_type_to_symbol (ct->type)); | 339 1, char_table_type_to_symbol (ct->type)); |
| 339 map_char_table (obj, &range, print_table_entry, &arg); | 340 map_char_table (obj, &range, print_table_entry, &arg); |
| 340 write_c_string (printcharfun, "))"); | 341 write_ascstring (printcharfun, "))"); |
| 341 | 342 |
| 342 /* #### need to print and read the default; but that will allow the | 343 /* #### need to print and read the default; but that will allow the |
| 343 default to be modified, which we don't (yet) support -- but FSF does */ | 344 default to be modified, which we don't (yet) support -- but FSF does */ |
| 344 } | 345 } |
| 345 | 346 |
