Author Topic: Can any dev look at the file ccmanager.h  (Read 6612 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Can any dev look at the file ccmanager.h
« on: September 12, 2014, 05:03:09 pm »
I see it has mixed EOL in the file, can you confirm this? If so, it should be fixed. Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Can any dev look at the file ccmanager.h
« Reply #1 on: September 12, 2014, 05:30:45 pm »
Confirmed around the prototype for void CallSmartIndentCCDone(cbEditor* ed);

Edit: Based on my other CPP files; it is correct right before and after CallSmartIndentCCDone prototype and the rest of the file is wrong.
I am on a Windows 7 system.

On SVN trunk 9916.

Edit2: Looks like file is missing svn:eol-style of native like most other headers have set.

Tim S.
« Last Edit: September 12, 2014, 05:40:42 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Can any dev look at the file ccmanager.h
« Reply #2 on: September 28, 2014, 08:48:09 pm »
I think the SVN commands on windows to fix this problem is:

Code
    unix2dos "src/include/ccmanager.h"
    svn propset svn:eol-style native src/include/ccmanager.h

Followed by a SVN Commit, of course.

Code
Index: src/include/ccmanager.h
===================================================================
--- src/include/ccmanager.h (revision 9927)
+++ src/include/ccmanager.h (working copy)

Property changes on: src/include/ccmanager.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property

Tim S.
 
« Last Edit: September 28, 2014, 09:55:30 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Can any dev look at the file ccmanager.h
« Reply #3 on: September 29, 2014, 02:52:11 am »
Hi, Tim, thanks.
I have just commit the change. An idea way of setting EOL property is that we can set the EOL for all the .h and .cpp files in a folder, so that we don't need to set those EOL property for each single files. Not sure SVN can do this.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Can any dev look at the file ccmanager.h
« Reply #4 on: September 29, 2014, 02:59:41 am »
Hi, Tim, thanks.
I have just commit the change. An idea way of setting EOL property is that we can set the EOL for all the .h and .cpp files in a folder, so that we don't need to set those EOL property for each single files. Not sure SVN can do this.  :)

While I know SVN much better than I know Git; I would only call my status as early intermediate skill level. You would likely need a expert to confirm that there is a way or is not a way to do it for a folder or file type.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Can any dev look at the file ccmanager.h
« Reply #5 on: September 29, 2014, 07:59:02 am »
I have just commit the change. An idea way of setting EOL property is that we can set the EOL for all the .h and .cpp files in a folder, so that we don't need to set those EOL property for each single files. Not sure SVN can do this.  :)
I think you wouldn't want to handle EOL blindly for files in a folder probably even recursively. It makes me wonder that GIT allows you to do so... ???
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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Can any dev look at the file ccmanager.h
« Reply #6 on: September 29, 2014, 09:03:38 am »
I have just commit the change. An idea way of setting EOL property is that we can set the EOL for all the .h and .cpp files in a folder, so that we don't need to set those EOL property for each single files. Not sure SVN can do this.  :)
I think you wouldn't want to handle EOL blindly for files in a folder probably even recursively. It makes me wonder that GIT allows you to do so... ???
I'm not an git export, but it looks like git can set EOL depend on file extension, see:
gitattributes(5)
Quote
End-of-line conversion

While git normally leaves file contents alone, it can be configured to normalize line endings to LF in the repository and, optionally, to convert them to CRLF when files are checked out.

Here is an example that will make git normalize .txt, .vcproj and .sh files, ensure that .vcproj files have CRLF and .sh files have LF in the working directory, and prevent .jpg files from being normalized regardless of their content.

*.txt           text
*.vcproj        eol=crlf
*.sh            eol=lf
*.jpg           -text

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re:
« Reply #7 on: September 29, 2014, 09:31:00 pm »
Oh well yes, that makes sense.I thought it would be on a plain folder...
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