I am not sure about the fact he understood that this is a project file :)
I have sent a reply about that, anyway, but doesn't have reply myself at the moment.
Didn't thought about the "note" space too.
But as I said, it is only a minor issue.
Or you can use some of your time to provide a patch for setting the license, I doubt it will take you much time :)
I am not sure about the fact I am skilled enough to understand the code of codeblocks.
And at last, and totally out of topic, I tried to use C::B with MS Visual Studio 2008 at work (I just can't use efficiently an IDE which can't highlight text similar to the selected one, or is so messy with project options. This is the point which made me remember how user friendly is C::B!). It work nice, but I have found that there is an encoding issue when debugging (debug with GDB).
The nightly used is 7452 if I remember correctly...
Which encoding issue? Can you be more specific?
Characters are not displayed as they should. I had some dummy characters on some places in reports. Here is an example:
main.cpp
Camera.cpp
f:\copie (2) de camera Š—…\camera\camera.h(14) : error C2143: erreur de syntaxeÿ: absence de '>' avant ';'
Process terminated with status 2 (0 minutes, 5 seconds)
1 errors, 0 warnings (0 minutes, 5 seconds)
f:\copie (2) de camera Š—…\camera\Camera.h(14) : error C2143: erreur de syntaxeÿ: absence de '>' avant ';'
Process terminated with status 2 (0 minutes, 5 seconds)
2 errors, 0 warnings (0 minutes, 5 seconds)
As I thought about that, I think I remember that this dumb 'ÿ' have the code 0xFF in ascii...
And the strange characters in file names where added just to verify if it was just a parsing error for 'ÿ', as I thought when writing my last sentence, or a true encoding problem. Usually I never put accentuated letters in things where programming is involved ^^
It should have been "F:\Copie (2) de camera èùà" instead.
I am not used to windows, so if you need other informations about used encoding or something else, please explain quickly how to gather them.
Ah, and I forgot to say that: compiler is VC9, XP pro SP3, and finally I am using C::B 7550 too here.
PS: sorry for the long time before reply, those times I don't have many time to go here, I can not even follow what is happening.
And the strange characters in file names where added just to verify if it was just a parsing error for 'ÿ', as I thought when writing my last sentence, or a true encoding problem. Usually I never put accentuated letters in things where programming is involved ^^
I never use those dumb characters in usual projects, if I should give a regex which can recognize characters I am using in my file names, it would be "[a-z0-9_\.]+"
Spaces, and dumb characters where added to give more indications about the problem.
The original message I had was something like that (but, with different warnings and errors, I just introduced a space to have an error here):
-------------- Build: Debug in Camera ---------------
main.cpp
Camera.cpp
Camera.cpp(86) : error C2039: 'retu'ÿ: n'est pas membre de 'PBCallInfo'
c:\program files\sybase\powerbuilder 12.0\sdk\pbni\include\pbni.h(278)ÿ: voir la d‚claration de 'PBCallInfo'
Camera.cpp(86) : error C2146: erreur de syntaxeÿ: absence de ';' avant l'identificateur 'rnValue'
Camera.cpp(86) : error C2065: 'rnValue'ÿ: identificateur non d‚clar‚
Camera.cpp(86) : error C2227: la partie gauche de '->SetInt' doit pointer vers un type class/struct/union/g‚n‚rique
le type est ''unknown-type''
Process terminated with status 2 (0 minutes, 5 seconds)
4 errors, 0 warnings (0 minutes, 5 seconds)
Process terminated with status 0 (0 minutes, 6 seconds)
4 errors, 0 warnings (0 minutes, 6 seconds)
As you can see, here, there is a 'ÿ' character, which should not be there.
Here is the result of what Visual Studio give me:
1>------ Début de la génération : Projet : camera, Configuration : Debug Win32 ------
1>Compilation en cours...
1>Camera.cpp
1>.\Camera.cpp(86) : error C2039: 'retu' : n'est pas membre de 'PBCallInfo'
1> c:\program files\sybase\powerbuilder 12.0\sdk\pbni\include\pbni.h(278) : voir la déclaration de 'PBCallInfo'
1>.\Camera.cpp(86) : error C2146: erreur de syntaxe : absence de ';' avant l'identificateur 'rnValue'
1>.\Camera.cpp(86) : error C2065: 'rnValue' : identificateur non déclaré
1>.\Camera.cpp(86) : error C2227: la partie gauche de '->SetInt' doit pointer vers un type class/struct/union/générique
1> le type est ''unknown-type''
1>Le journal de génération a été enregistré à l'emplacement "file://f:\camera\Camera\Debug\BuildLog.htm"
1>camera - 4 erreur(s), 0 avertissement(s)
========== Génération : 0 a réussi, 1 a échoué, 1 mis à jour, 0 a été ignoré ==========
I think it could show two problems, and maybe the second one is related to the first one:
_ first: there is a 'ÿ' character, which seem to separate location of the problem and it's description. (it is always before the ':' and after the thing which made the problem)
_ second: the encoding is not well detected, causing stupid characters to not be correctly shown. It may be related to the 'ÿ' character, because as far as I know, encoding detection rely on statistics about character found. A dumb character could false the detection.
And it is not at debug time, but compile time. It is not gdb which is used here, but "cl.exe"
Note: I used terms "seem", "may", "could" because I am sure of nothing. I only make suppositions for something I think is really small problem. Error and warning detection is not wrong, and if I just have to forget a 'ÿ' character (which is not used in french) it don't give me big troubles.
Another option would be to have Code::Blocks store any xml comments (<!-- text -->) during the opening of a workspace/project file; then on save, write all stored comments to the top of the respective files. (File format would be left backwards-compatible.)
Proof of concept (for *.cbp's):
Index: src/sdk/projectloader.cpp
===================================================================
--- src/sdk/projectloader.cpp (revision 7696)
+++ src/sdk/projectloader.cpp (working copy)
@@ -256,6 +256,21 @@
// wxString minor = version->Attribute("minor");
}
+ pMsg->DebugLog(_T("Scanning project for comments..."));
+ TiXmlNode* child = 0;
+ while(child = doc.IterateChildren(child))
+ {
+ if(child->Type() == TiXmlNode::TINYXML_COMMENT)
+ {
+ m_pProject->fileComments << wxString::FromAscii(child->Value()) << wxT("\n");
+ }
+ }
+ if(m_pProject->fileComments.Right(1) == wxT("\n"))
+ {
+ m_pProject->fileComments.Truncate(m_pProject->fileComments.Length() - 1);
+ }
+
pMsg->DebugLog(wxString(_T("Done loading project in ")) << wxString::Format(_T("%d"), (int) sw.Time()) << _T("ms"));
return true;
}
@@ -1077,6 +1092,10 @@
TiXmlDocument doc;
doc.SetCondenseWhiteSpace(false);
doc.InsertEndChild(TiXmlDeclaration("1.0", "UTF-8", "yes"));
+ if(!m_pProject->fileComments.IsEmpty())
+ {
+ doc.InsertEndChild(TiXmlComment(m_pProject->fileComments.ToAscii()));
+ }
TiXmlElement* rootnode = static_cast<TiXmlElement*>(doc.InsertEndChild(TiXmlElement(ROOT_TAG)));
if (!rootnode)
return false;
Index: src/include/cbproject.h
===================================================================
--- src/include/cbproject.h (revision 7696)
+++ src/include/cbproject.h (working copy)
@@ -683,6 +683,8 @@
*/
virtual FilesList& GetFilesList(){ return m_Files; }
+ wxString fileComments;
+
private:
void Open();
void ExpandVirtualBuildTargetGroup(const wxString& alias, wxArrayString& result) const;
This is probably not the best method, but it does work.