Author Topic: File names  (Read 4388 times)

Dasaan

  • Guest
File names
« on: 2006-07-16 00:45:32 »
I would like to suggest that all the sourcecode file names in Q-gears be made lowercase. This would help to reduce the number of case sensitive problems I'm seeing whilst trying to compile on my Linux box.

One such example is in trunk/src/filesystem/file.h which contains the follwing line :
  #include "../utilities/NoCopy.h"

The problem is that the file is nocopy.h which throws up problems on case sensitive filesystems.

HTH

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: File names
« Reply #1 on: 2006-07-16 00:57:13 »
I was just going to post that....

There is a skeleton for setting up autoconf. I did some research into it, but it was pretty big to implement....

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: File names
« Reply #2 on: 2006-07-16 02:30:21 »
What are we planing on doing with the makefile situation?
Currently I have the ISO code written but not completed and I'm trying to figure out how to use it with the existing code.
My biggest difficulty is there is no ./configure to run and see what I need to compile the current beasty.  I'm working on installing subclipse into Eclipse for handy subversion usage.  Eclipse doesn't seem autoconfig friendly (mutter), I'm trying to figure how to convert the current makefile into something Eclipse will work with, without a lot of whining and wimpering about things (387 errors does that I suppose).
I generally try to work with people however everyone has differing perspectives on what's important, so things can get kind of messy in terms of what where and how.

Cyb

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: File names
« Reply #3 on: 2006-07-16 02:40:45 »
I was going to do an autoconf, but there were a bunch of things that hindered progress. Firstly my dev box is my laptop, that has really flaky opengl. I segfault whenever anything really cool happens.

My main box has no connection to the interweb, so I can't develop there, though it has a nice Nvidia card.

We really do need to add auto...something, it's just I don't know M4 and I quite frankly shocked on how far I got with my script dumper.... Turns out I *CAN* code after all and looks like I'll just be merging my dumper into Akari's fieldscript code.

The current beasty needs OpenGL, and SDL. Akari's code is a little easier to folow now that lots of stuff has been "fleshed out", or maybe I'm just getting better with my coding...

I guess the next step is to get someone to get this thing cross-compileable without any headaches.

Which reminds me. I have to make a post about my future real quick.....

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Re: File names
« Reply #4 on: 2006-07-18 14:41:40 »
I would like to suggest that all the sourcecode file names in Q-gears be made lowercase. This would help to reduce the number of case sensitive problems I'm seeing whilst trying to compile on my Linux box.

One such example is in trunk/src/filesystem/file.h which contains the follwing line :
  #include "../utilities/NoCopy.h"

The problem is that the file is nocopy.h which throws up problems on case sensitive filesystems.

HTH

All files should be named according to this standart http://www.possibility.com/Cpp/CppCodingStandard.html. There are few reasons for this. First one is - we need to use some standart. =)
The second one is the ThisFileName are much better to understand than thisfilename. I redone all files this way as soon as I document them to doxygen. It's sad that SVN sometimes doesn't change lettercases of file even after I renamed them. If you meet this problem, please rename file to Uppercase first letter anstead of lowercasing them all.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: File names
« Reply #5 on: 2006-07-18 17:58:45 »
The problem is that placing an uppercase letter in a filename is bad form in Linux. This becomes even more problematic as capitalizing the first letter breaks shell auto-complete. Not only this, if the file name is all lowecase in the makefile or in a preproessor directive, it hangs up the whole compile process if the actual file name has an upper case letter. In case-insensitive systems this is ignored and everything goes along fine.

The whole problem was you were not being consistent in the filename capitalzation in the preprosessor directives. #include "nocopy.h" and #include "NoCopy.h" are two different files.

So we have a problem with filenames, and we need to figure out a resolution.

So as not to make the problem worse, we have two solutions.

1) We can keep the Upper/lowercase names, but the maintainers of the case-insensitive systems have to be very aware that you could easily bork something by not being consistent.

2) We can make everything all lowercase and everything will go fine everywhere.

Now, I personally think that both CamelHumping and pHungarianNotation are a pain to read and use.

I'm open for debate. In the end we should draw up coding standars to keep everything conmsistent. I'll be happy to do that.

Also, I'm learning Autoconf (*YAY*) However for this project to sucessfully use it, someone needs to rename config.cpp and config.h to something else. config.h (lowercase) is required by Autoconf for including system include files that were set with M4.

Any input?

### EDIT ###

Akari, if you want, you can revert my case changes, but please try and be consistent with the preprocessor and makefile.
« Last Edit: 2006-07-18 18:11:19 by halkun »

Dasaan

  • Guest
Re: File names
« Reply #6 on: 2006-07-18 20:10:43 »
The problem is that placing an uppercase letter in a filename is bad form in Linux.

Not just Linux, most unices use a case sensitive file system of some sort.

Otokoshi

  • *
  • Posts: 552
    • View Profile
Re: File names
« Reply #7 on: 2006-07-19 02:50:02 »
Quote from: halkun
Any input?

I also find Hungarian notation harder to come back and understand, it also gives a better chance for error.

I personally like CamelHumping notation, but that is just me.  I can understand that with a project such as this one, with many developers, one typo on some variable for function tucked away in your code could cause a major headache.  I see halkun's point for consistency, and leaving everything lowercase also seems to simplify the process as well.  I was just wondering if this project had established any naming conventions yet, and I think it's good to do so early.  Kudos
« Last Edit: 2006-07-19 04:26:41 by Otokoshi »