result_t hit = scan.empty_match();
std::size_t n = m_min;
- for (std::size_t i = 0; ; ++i)
+ for (std::size_t i = 0;; ++i)
{
typename ScannerT::iterator_t save = scan.first;
result_t next = this->subject().parse(scan);
{
std::string narrow_short_form;
std::wstring short_form;
- for ( DWORD buf_sz( static_cast<DWORD>( ph.size()+1 )); ; )
+ for ( DWORD buf_sz( static_cast<DWORD>( ph.size()+1 ));; )
{
boost::scoped_array<wchar_t> buf( new wchar_t[buf_sz] );
DWORD sz( ::GetShortPathNameW( ph.c_str(), buf.get(), buf_sz ) );
BOOST_FILESYSTEM_DECL fs::system_error_type
get_current_path_api( std::string & ph )
{
- for ( long path_max = 32; ; path_max *=2 ) // loop 'til buffer large enough
+ for ( long path_max = 32;; path_max *=2 ) // loop 'til buffer large enough
{
boost::scoped_array<char>
buf( new char[static_cast<std::size_t>(path_max)] );
endmacro (LYX_AUTOMOC)
-macro(lyx_merge_files _filename _list)
- message("----- Generating merged file ${_filename}\n")
- set(_tmp)
- set(_content)
- foreach(_current ${${_list}})
- file(READ ${_current} _tmp)
- set(_content ${_content} "\n\n\n\n//----------------------------------------\n/*\n file: ${_current} \n*/\n\n")
- set(_content ${_content} ${_tmp})
- endforeach(_current)
- file(WRITE ${_filename} "${_content}")
-endmacro(lyx_merge_files _list _filename)
+# For all C++ sources a big source file which includes all the files
+# is created.
+# This is not done for the C sources, they are just gathered in a separate list
+# because they are usually not written by KDE and as such not intended to be
+# compiled all-in-one.
+macro (KDE4_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile )
+ set(${_filesExcludedFromFinalFile})
+ file(WRITE ${_filenameCPP} "//autogenerated file\n")
+ foreach (_current_FILE ${ARGN})
+ get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
+ # don't include any generated files in the final-file
+ # because then cmake will not know the dependencies
+ get_source_file_property(_isGenerated ${_abs_FILE} GENERATED)
+ if (_isGenerated)
+ list(APPEND ${_filesExcludedFromFinalFile} ${_abs_FILE})
+ else (_isGenerated)
+ # don't include c-files in the final-file, because they usually come
+ # from a 3rd party and as such are not intended to be compiled all-in-one
+ string(REGEX MATCH ".+\\.c$" _isCFile ${_abs_FILE})
+ if (_isCFile)
+ list(APPEND ${_filesExcludedFromFinalFile} ${_abs_FILE})
+ else (_isCFile)
+ file(APPEND ${_filenameCPP} "#include \"${_abs_FILE}\"\n")
+ endif (_isCFile)
+ endif (_isGenerated)
+ endforeach (_current_FILE)
+
+endmacro (KDE4_CREATE_FINAL_FILES)
+macro(lyx_merge_files _filename _list)
+ KDE4_CREATE_FINAL_FILES(${_filename} _nix_nothing ${${_list}})
+endmacro(lyx_merge_files _list _filename)
\ No newline at end of file
${TOP_SRC_DIR}/src/frontends/controllers
${CMAKE_CURRENT_BINARY_DIR})
+#set(MERGE_FILES 0)
if(MERGE_FILES AND MSVC)
lyx_merge_files(${CMAKE_CURRENT_BINARY_DIR}/frontends_qt4_allinone.C frontends_qt4_sources)
set(depends_moc_uic ${frontends_qt4_headers} ${ui_files})
"-include ${TOP_SRC_DIR}/src/tex2lyx/lyxfont.h -include ${TOP_SRC_DIR}/src/tex2lyx/Spacing.h")
endif(MSVC)
-
-if(NOT MERGE_FILES)
+#TODO
+#if(NOT MERGE_FILES)
add_executable(tex2lyx ${tex2lyx_sources} ${LINKED_FILES} ${tex2lyx_headers})
-else(NOT MERGE_FILES)
- set(tex2lyx_sources_all ${tex2lyx_sources} ${LINKED_FILES})
- lyx_merge_files(${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C tex2lyx_sources_all)
- add_executable(tex2lyx ${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C)
-endif(NOT MERGE_FILES)
+#else(NOT MERGE_FILES)
+# set(tex2lyx_sources_all ${tex2lyx_sources} ${LINKED_FILES})
+# lyx_merge_files(${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C tex2lyx_sources_all)
+# add_executable(tex2lyx ${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C)
+#endif(NOT MERGE_FILES)
target_link_libraries(tex2lyx
it.top().pos() = 0;
DocIterator et = c;
et.top().pos() = et.top().asInsetMath()->cell(et.top().idx()).size();
- for (size_t i = 0; ; ++i) {
+ for (size_t i = 0;; ++i) {
int xo;
int yo;
InsetBase const * inset = &it.inset();
if (str.empty())
return vec;
String keys = rtrim(str);
- for(; ;) {
+ for(;;) {
typename String::size_type const idx = keys.find(delim);
if (idx == String::npos) {
vec.push_back(ltrim(keys));