comparison src/charset.c @ 107630:074a7ce7d59b

Merge from mainline.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 05 Feb 2010 09:28:04 -0500
parents ef8266a66d37
children 6d6a455af77b
comparison
equal deleted inserted replaced
107629:ab03eb9d2050 107630:074a7ce7d59b
524 if (fd < 0 524 if (fd < 0
525 || ! (fp = fdopen (fd, "r"))) 525 || ! (fp = fdopen (fd, "r")))
526 error ("Failure in loading charset map: %S", SDATA (mapfile)); 526 error ("Failure in loading charset map: %S", SDATA (mapfile));
527 527
528 head = entries = ((struct charset_map_entries *) 528 head = entries = ((struct charset_map_entries *)
529 alloca (sizeof (struct charset_map_entries))); 529 xmalloc (sizeof (struct charset_map_entries)));
530 n_entries = 0; 530 n_entries = 0;
531 eof = 0; 531 eof = 0;
532 while (1) 532 while (1)
533 { 533 {
534 unsigned from, to; 534 unsigned from, to;
561 } 561 }
562 fclose (fp); 562 fclose (fp);
563 close (fd); 563 close (fd);
564 564
565 load_charset_map (charset, head, n_entries, control_flag); 565 load_charset_map (charset, head, n_entries, control_flag);
566 xfree (head);
566 } 567 }
567 568
568 static void 569 static void
569 load_charset_map_from_vector (charset, vec, control_flag) 570 load_charset_map_from_vector (charset, vec, control_flag)
570 struct charset *charset; 571 struct charset *charset;