1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-26 16:45:12 -04:00

Bug 381: Halve sizeof(struct table_entry).

Before:

   text	   data	    bss	    dec	    hex	filename
  54920	  28528	   3311	  86759	  152e7	src/intl/charsets.o
 516064	  85568	  82112	 683744	  a6ee0	src/elinks

After:

   text	   data	    bss	    dec	    hex	filename
  38958	  28528	   3311	  70797	  1148d	src/intl/charsets.o
 500112	  85568	  82112	 667792	  a3090	src/elinks

So the text section shrank by 15962 bytes.

Measured on i686-pc-linux-gnu with: --disable-xbel --disable-nls
--disable-cookies --disable-formhist --disable-globhist
--disable-mailcap --disable-mimetypes --disable-smb --disable-mouse
--disable-sysmouse --disable-leds --disable-marks --disable-css
--enable-small --enable-utf-8 --without-gpm --without-bzlib
--without-idn --without-spidermonkey --without-lua --without-gnutls
--without-openssl CFLAGS="-Os -ggdb -Wall"
This commit is contained in:
Kalle Olavi Niemitalo 2006-09-24 12:47:00 +03:00 committed by Kalle Olavi Niemitalo
parent 62d6db44aa
commit e1fee49fb7

View File

@ -30,7 +30,14 @@
struct table_entry {
unsigned char c;
unicode_val_T u;
/* This should in principle be unicode_val_T, but because all
* the values currently in codepage.inc fit in 16 bits, we can
* as well use uint16_t and halve sizeof(struct table_entry)
* from 8 bytes to 4. Should other characters ever be needed,
* unicode_val_T u : 24 might be a possibility, although it
* seems a little unportable as bitfields are in principle
* restricted to int, which may be 16-bit. */
uint16_t u;
};
struct codepage_desc {