]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/tex2lyx.cpp
tex2lyx: support for subfloats
[lyx.git] / src / tex2lyx / tex2lyx.cpp
index 40890b9667aabaf45f42ef9071c04a45c504686f..8e3809cadcaf2eee13f48fc610a9b7106e15c0c2 100644 (file)
@@ -94,21 +94,9 @@ void lyx_exit(int)
 {}
 
 
-string const trim(string const & a, char const * p)
+string const trimSpaceAndEol(string const & a)
 {
-       // LASSERT(p, /**/);
-
-       if (a.empty() || !*p)
-               return a;
-
-       size_t r = a.find_last_not_of(p);
-       size_t l = a.find_first_not_of(p);
-
-       // Is this the minimal test? (lgb)
-       if (r == string::npos && l == string::npos)
-               return string();
-
-       return a.substr(l, r - l + 1);
+       return trim(a, " \t\n\r");
 }
 
 
@@ -161,6 +149,7 @@ CommandMap known_environments;
 CommandMap known_math_environments;
 FullCommandMap possible_textclass_commands;
 FullEnvironmentMap possible_textclass_environments;
+int const LYX_FORMAT = LYX_FORMAT_TEX2LYX;
 
 /// used modules
 LayoutModuleList used_modules;