Author Topic: Project files without linefeed  (Read 4585 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9701
Project files without linefeed
« on: October 09, 2006, 03:32:44 pm »
Did anyone other than me experienced that the project files when saved with a recent version of C::B have no linefeeds anymore? I'm not sure when this happened, I guess it has to do with the change in the TinyXml version...?! Thomas?
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Project files without linefeed
« Reply #1 on: October 09, 2006, 03:42:08 pm »
Yes, and no :)

That was the case for a couple of releases, but is not (should not be) now.
The ::cbSaveXmlFile function in globals.cpp was not working well under 2.5.2 as streaming to a string enables "stream mode" which removes all newlines and indentation.

::cbSaveXmlFile is now an alias for TinyXML::Save which is a Unicode-safe wrapper around the TinyXML API to save a file (previously only used to save configuration).
Safe, formatted, with indentation, and with newlines... :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Project files without linefeed
« Reply #2 on: October 09, 2006, 04:15:41 pm »
Actually, I recall having hacked the old TinyXML sources to allow for stream formatting.
So if Thomas hadn't re-applied my hack, obviously the formatting would be lost ;).

Anyway, if this hack is not needed anymore that's even better :).
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5521
Re: Project files without linefeed
« Reply #3 on: October 09, 2006, 04:46:46 pm »
TiXmlPrinter is the key to success ;-)