Re: [patch included] Re: [Jules Bean jmlb2@hermes.cam.ac.uk] Various (math-mode) HMI improvements
Marko Vendelin [EMAIL PROTECTED] writes: | On 15 Sep 2000, Lars Gullik Bjønnes wrote: | | | Any good library (C/C++) which is able to check whether a string matches | | given regexp. Return value TRUE/FALSE/invalid regexp is expected :) | | We already have that included under src/support so it is easy to use. | | The following patch adds support for regexp search in FormCitation (Gnome | frontend). Ok, I will apply this patch. One not however: do not use defines, ever! #define CONF_COLUMN "column" should be static string const CONF_COLUMN("column"); similar for the other defines | PS: BTW, what about my patches submitted earlier (tracking TOC changes and | adding TOC to Gnome Menubar) ? I have to dog them up to have a look. Lgb
Re: [patch included] Re: [Jules Bean jmlb2@hermes.cam.ac.uk]Various (math-mode) HMI improvements
On 15 Sep 2000, Lars Gullik Bjønnes wrote: One not however: do not use defines, ever! #define CONF_COLUMN "column" should be static string const CONF_COLUMN("column"); I will submit a patch with all these defines removed. But can you tell me why should we avoid the defines (I presume only with strings) ? Marko
Re: [patch included] Re: [Jules Bean jmlb2@hermes.cam.ac.uk] Various (math-mode) HMI improvements
Marko Vendelin [EMAIL PROTECTED] writes: | On 15 Sep 2000, Lars Gullik Bjønnes wrote: | | One not however: do not use defines, ever! | | #define CONF_COLUMN "column" | | should be | | static string const CONF_COLUMN("column"); | | I will submit a patch with all these defines removed. But can you tell me | why should we avoid the defines (I presume only with strings) ? with ints enums and other objects too and especially macros. Defines are bad because: - untyped - arg expansion problem with macros And in C++ we have the needed support for doing this _in_ the language no need to do it in the preprocessor: - const - static - inline Lgb
Re: [patch included] Re: [Jules Bean <jmlb2@hermes.cam.ac.uk>] Various (math-mode) HMI improvements
Marko Vendelin <[EMAIL PROTECTED]> writes: | On 15 Sep 2000, Lars Gullik Bjønnes wrote: | | > | Any good library (C/C++) which is able to check whether a string matches | > | given regexp. Return value TRUE/FALSE/invalid regexp is expected :) | > | > We already have that included under src/support so it is easy to use. | | The following patch adds support for regexp search in FormCitation (Gnome | frontend). Ok, I will apply this patch. One not however: do not use defines, ever! #define CONF_COLUMN "column" should be static string const CONF_COLUMN("column"); similar for the other defines | PS: BTW, what about my patches submitted earlier (tracking TOC changes and | adding TOC to Gnome Menubar) ? I have to dog them up to have a look. Lgb
Re: [patch included] Re: [Jules Bean <jmlb2@hermes.cam.ac.uk>]Various (math-mode) HMI improvements
On 15 Sep 2000, Lars Gullik Bjønnes wrote: > One not however: do not use defines, ever! > > #define CONF_COLUMN "column" > > should be > > static string const CONF_COLUMN("column"); I will submit a patch with all these defines removed. But can you tell me why should we avoid the defines (I presume only with strings) ? Marko
Re: [patch included] Re: [Jules Bean <jmlb2@hermes.cam.ac.uk>] Various (math-mode) HMI improvements
Marko Vendelin <[EMAIL PROTECTED]> writes: | On 15 Sep 2000, Lars Gullik Bjønnes wrote: | | > One not however: do not use defines, ever! | > | > #define CONF_COLUMN "column" | > | > should be | > | > static string const CONF_COLUMN("column"); | | I will submit a patch with all these defines removed. But can you tell me | why should we avoid the defines (I presume only with strings) ? with ints enums and other objects too and especially macros. Defines are bad because: - untyped - arg expansion problem with macros And in C++ we have the needed support for doing this _in_ the language no need to do it in the preprocessor: - const - static - inline Lgb