]> git.lyx.org Git - lyx.git/commitdiff
compilation fix
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 6 Apr 2004 13:48:13 +0000 (13:48 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 6 Apr 2004 13:48:13 +0000 (13:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8613 a592a061-630c-0410-9148-cb99ea01b6c8

INSTALL
src/ChangeLog
src/lengthcommon.C

diff --git a/INSTALL b/INSTALL
index 8ecbd562fc49683905a91322f17acaf077bfc586..6735d1daeb44ded358cd903543093bd130bf4ecf 100644 (file)
--- 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.
 
index e5c1ca6b62247fe73550bd61944385169c040662..a785cac25a4d237db516cb2785d00f7c0b91d8e9 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-05  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * lengthcommon.C: compilation fix: remove explicit array size from
+       unit_name[] and friends
+
 2004-04-05  Angus Leeming  <leeming@lyx.org>
 
        * LyXAction.C (init): set LFUN_DIALOG_UPDATE's atrib flag to NoBuffer.
index af25532d02b34ba43d96f208baf4d806d2d477b1..89ff7e1a555a7101a3564995924286f43cea56aa 100644 (file)
 
 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%"),