Fri 01 Jul 2011 01:17:23 PM UTC, comment #4:
Thanks, it nearly compiles now. I found only two places where I had to move variables a bit around. And while in that file, the compiler warned me about a potential use of uninitialized variable, so I initialized with 0 while declaring.
See attached patch.
Afterwards it installed well on my sparc, using gcc-2.95.
Now looking at the code was way much pleasant!
Have to check whether the help actually works later. I use the latest releases of gnustep-core. Only gnustep-base is the not yet released 1.22.1 branch.
Sebastian
(file #23607)
|
Thu 30 Jun 2011 06:11:26 PM UTC, comment #3:
OK, I applied your patches, a much better indentation, and some changes in the rest of the classes. Also, I checked that all works as expected (With gnustep from SVN, I can't run the Help panel. But this could be a problem in gnustep, I will check later). So, you can test now. I hope that, in the case you face problems, these will be few.
|
Mon 27 Jun 2011 07:01:58 AM UTC, comment #2:
Hi,
yes, most of the stuff is shuffling around variables. One other problem I had seen was the initialization of structs.
This works with gcc-2.95:
struct p {1.0, 1.0};
But at some places, I had to move such things up, to make the declaration on top of the method/block. Then I ran into a problem:
struct p;
...
some more lines
...
p = {1.0, 1.0}
This was throwing an error. I tried a lot of different ways how to get it initialized in one line, but nothing worked. Then I initialized each of the struct members on its own:
p.a = 1.0;
p.b = 1.0;
This especially happened with this gsl_... struct.
Let me know when you got a chance to import my changes, and fix the indentation. I'm happy to check out svn, and retest/patch it further.
Last thing I noted while patching the files. On a lot of places it looks to me, much of the stuff is cut 'n pasted between all of the files, which, as you probably can guess, is a real burden, when you find a bug in one place, you have to fix it probably in several places. Since I was not completely able to understand the code, I don't know whether it would be possible to have such stuff in an extra file/class, and drive the stuff with parameters. This would probably be a larger task, but in the end, such stuff really pays out in terms of maintainability.
Just my two cents...
cheers,
Sebastian
|
Sun 26 Jun 2011 06:53:20 PM UTC, comment #1:
:D sorry for the problems caused by the coding style. When I started the project (2008), I was starting with GNUstep, so I used ProjectCenter to edit the files (PC don't have autoindentation) because I did not idea about the GNUmakefiles, Info.plist,.... So I configured all from PC. After know more about gnustep, I changed to emacs, for that reason some code blocks have indentation and others no. I know the coding style is ugly and that I need correct this. Also my english in that time was null (really was hard start with GNUstep) for that reason all are in spanish. But of course english is a better choice.
Well, as I can see the problems are caused by the variables that aren't defined at the begining of functions. So, give me time to add a correct indentation, and to move the definitions of these variables.
Thanks.
|
Sun 26 Jun 2011 05:47:09 PM UTC, original submission:
I tried to make fisicalab to build with gcc-2.95, but in the end, I gave up. The variables and comments are all in spanish or the like? They did not helped much to understand the code.
And the code itself is kind of, trying to be polite: weird to read: huge classes/loops..., strange indentation all over the place,... I really wonder how you maintain this code, luckily not my problem ;)
In the end I had to gave up, my eyes are bleeding, and my brain is damaged ;)
At least for the part I managed to patch and to compile, I'll attach the patches. I haven't tested actually, whether they break sth. If you don't like it at all, just dismiss and close this report.
Sebastian
|