[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sig2str and str2sig use in C++
From: |
Paul Eggert |
Subject: |
Re: sig2str and str2sig use in C++ |
Date: |
Mon, 03 Jun 2013 15:28:24 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
How about the following idea instead?
Have sig2str.h export an array like this:
extern char const allsigstr[];
This would consist of a concatenation of null-terminated strings,
one per name, terminated by an empty string.
allsigstr could be initialized at compile-time, with no runtime
actions needed. Since it's read-only and initialized it could be put into
the text segment.
The existing numname_table could remove its 'name' field,
and replace it with an integer offset into allsigstr. This
offset could also be calculated at compile-time, so
numname_table could live in the text segment too.
- sig2str and str2sig use in C++, Daniel J Sebald, 2013/06/01
- Re: sig2str and str2sig use in C++, Paul Eggert, 2013/06/02
- Re: sig2str and str2sig use in C++, Daniel J Sebald, 2013/06/03
- Re: sig2str and str2sig use in C++,
Paul Eggert <=
- Re: sig2str and str2sig use in C++, Daniel J Sebald, 2013/06/03
- Re: sig2str and str2sig use in C++, Thien-Thi Nguyen, 2013/06/04
- Re: sig2str and str2sig use in C++, Daniel J Sebald, 2013/06/04
- Re: sig2str and str2sig use in C++, Thien-Thi Nguyen, 2013/06/05
- Re: sig2str and str2sig use in C++, Daniel J Sebald, 2013/06/05
- Re: sig2str and str2sig use in C++, Paul Eggert, 2013/06/10
- Re: sig2str and str2sig use in C++, Daniel J Sebald, 2013/06/10
- Re: sig2str and str2sig use in C++, Daniel J Sebald, 2013/06/10
- Re: sig2str and str2sig use in C++, Paul Eggert, 2013/06/11
- Re: sig2str and str2sig use in C++, Bruce Korb, 2013/06/13