diff --git a/INSTALL b/INSTALL index 8ecbd562fc..6735d1daeb 100644 --- a/INSTALL +++ b/INSTALL @@ -225,7 +225,7 @@ Moreover, the following generic configure flags may be useful: o --mandir=DIRECTORY gives the directory where the man pages will go. [defaults to ${prefix}/man] - o --enable-mainainer-mode enables some code that automatically + o --enable-maintainer-mode enables some code that automatically rebuilds the configure script, makefiles templates and other useful files when needed. This is off by default, to avoid surprises. diff --git a/src/ChangeLog b/src/ChangeLog index e5c1ca6b62..a785cac25a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-04-05 Jean-Marc Lasgouttes + + * lengthcommon.C: compilation fix: remove explicit array size from + unit_name[] and friends + 2004-04-05 Angus Leeming * LyXAction.C (init): set LFUN_DIALOG_UPDATE's atrib flag to NoBuffer. diff --git a/src/lengthcommon.C b/src/lengthcommon.C index af25532d02..89ff7e1a55 100644 --- a/src/lengthcommon.C +++ b/src/lengthcommon.C @@ -18,22 +18,21 @@ using std::string; - -int const num_units = LyXLength::UNIT_NONE; - // I am not sure if "mu" should be possible to select (Lgb) // unit_name is for compatibility. Can be deleted when all works well. // means, when we have full language support for the lengths // in all gui's (Herbert 2002-11-01) -char const * const unit_name[num_units + 1] = { +char const * const unit_name[] = { "sp", "pt", "bp", "dd", "mm", "pc", "cc", "cm", "in", "ex", "em", "mu", "text%", "col%", "page%", "line%", "theight%", "pheight%", "" }; +int const num_units = int(sizeof(unit_name) / sizeof(unit_name[0])); + // the latex units -char const * const unit_name_ltx[num_units + 1] = { +char const * const unit_name_ltx[] = { "sp", "pt", "bp", "dd", "mm", "pc", "cc", "cm", "in", "ex", "em", "mu", // in 1.4 the following names should be used. then no @@ -44,7 +43,7 @@ char const * const unit_name_ltx[num_units + 1] = { "theight%", "pheight%", "" }; // the LyX gui units -char const * const unit_name_gui[num_units + 1] = { +char const * const unit_name_gui[] = { N_("sp"), N_("pt"), N_("bp"), N_("dd"), N_("mm"), N_("pc"), N_("cc"), N_("cm"), N_("in"), N_("ex"), N_("em"), N_("mu"), N_("text%"), N_("col%"), N_("page%"), N_("line%"),