]> git.lyx.org Git - lyx.git/blobdiff - src/tex-accent.C
Dekels tabular/textinset patches
[lyx.git] / src / tex-accent.C
index 12ecb90a6562e265c50df04cb90c02b91dfb5e02..81abac3f94a4865997941cd939bd2b59fda70f2e 100644 (file)
@@ -1,5 +1,19 @@
+/* This file is part of
+ * ====================================================== 
+ * 
+ *           LyX, The Document Processor
+ *        
+ *           Copyright 1995 Matthias Ettrich
+ *           Copyright 1995-2000 The LyX Team.
+ *
+ * ====================================================== */
+
 #include <config.h>
 
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
 #include <cstdlib>
 #include "tex-accent.h"
 #include "commandtags.h"
@@ -38,7 +52,7 @@
 
 //static
 tex_accent_struct lyx_accent_table[18] = {
-       { (tex_accent)0, "", "", "",(kb_action)0},
+       { static_cast<tex_accent>(0), "", "", "", static_cast<kb_action>(0)},
        {TEX_ACUTE,      "\\'",  " AEIOUYaeiouySZszRLCNrlcn", "acute",   LFUN_ACUTE},
        {TEX_GRAVE,      "\\`",  " aeiouAEIOU",           "grave",    LFUN_GRAVE},
        {TEX_MACRON,     "\\=",  " EeAIOUaiou",           "macron",    LFUN_MACRON},
@@ -56,19 +70,19 @@ tex_accent_struct lyx_accent_table[18] = {
        {TEX_UMLAUT,     "\\\"", " AEIOUaeiouy",          "umlaut",    LFUN_UMLAUT},
        {TEX_DOT,        "\\.",  " ZzICGicgEe",           "dot",    LFUN_DOT},
        {TEX_OGONEK,     "\\k",  " AaEe",                 "ogonek",    LFUN_OGONEK},
-       { (tex_accent)0, "", "", "",(kb_action)0}};
+       { static_cast<tex_accent>(0), "", "", "", static_cast<kb_action>(0)}};
         
 
 tex_accent_struct get_accent(kb_action action)
 {
-       int i= 0;
-       while (i<= TEX_MAX_ACCENT){
+       int i = 0;
+       while (i <= TEX_MAX_ACCENT){
                if (lyx_accent_table[i].action == action)
                        return lyx_accent_table[i];
-               i++;
+               ++i;
        }
-       struct tex_accent_struct temp = { (tex_accent)0, 0, 0,
-                                         0,(kb_action)0};
+       struct tex_accent_struct temp = { static_cast<tex_accent>(0), 0, 0,
+                                         0, static_cast<kb_action>(0)};
        return temp;
 }
 
@@ -76,13 +90,13 @@ string DoAccent(string const & s, tex_accent accent)
 {
        string res;
        
-       res+= lyx_accent_table[accent].cmd;
-       res+= '{';
+       res += lyx_accent_table[accent].cmd;
+       res += '{';
        if (s == "i" || s == "j") {
-               res+= '\\';
+               res += '\\';
        }
-       res+= s;
-       res+= '}';
+       res += s;
+       res += '}';
        return res;
 }