Hi,
Just a few comments, things that have been mentioned to me so I should probably pass along :)
Here: - FIXME("stub\n"); - SetLastError( ERROR_INVALID_PARAMETER ); - return FALSE; + TRACE("\n"); + + unsigned int i,j,nStrLen;
Normally you'd put a TRACE with the parameters passed after the variable declarations, I think otherwise it might violate strict C. Also putting the parameters into the trace statement makes debugging easier as you don't have to decode a relay trace to see what was given.
Again, I'm not a C expert but I think it's invalid strict C to declare variables half way through a block, they all have to be at the top of the function together.
+ } + + // 1 to 17 is the constants for LGRPID_xxx + for(i=1;i<=17;i++) { + sprintfW(val,valm,i); + length = sizeof(installed);
Wine doesn't like C++ style comments (//) because some C compilers don't accept them, I think you have to use /* */
Not sure how rigidly this rule is followed though.
Again, I'm not a C expert but I think it's invalid strict C to declare variables half way through a block, they all have to be at the top of the function together.
It's valid C99 though... And as GCC 3.2.x is a C99 compiler, one will see more and more such code being submitted as patches (I did it also once by mistake when I was developping on my laptop which has more recent tools than my main development machine).
I wonder if it's possible to force GCC 3.2 to act as a C97 compiler.. It could be used in Wine's configure script to prevent breakage on us poor GCC 2.95.X compilers :-)
Wine doesn't like C++ style comments (//) because some C compilers don't accept them, I think you have to use /* */
I think // is valid C99 too.
Lionel
I wonder if it's possible to force GCC 3.2 to act as a C97 compiler.. It could be used in Wine's configure script to prevent breakage on us poor GCC 2.95.X compilers :-)
-std=gnu89
A+
Thanks for the comments. I will change that.
Max
On Sat, 2003-04-05 at 12:15, Mike Hearn wrote:
Hi,
Just a few comments, things that have been mentioned to me so I should probably pass along :)
Here:
- FIXME("stub\n");
- SetLastError( ERROR_INVALID_PARAMETER );
- return FALSE;
- TRACE("\n");
- unsigned int i,j,nStrLen;
Normally you'd put a TRACE with the parameters passed after the variable declarations, I think otherwise it might violate strict C. Also putting the parameters into the trace statement makes debugging easier as you don't have to decode a relay trace to see what was given.
Again, I'm not a C expert but I think it's invalid strict C to declare variables half way through a block, they all have to be at the top of the function together.
- }
- // 1 to 17 is the constants for LGRPID_xxx
- for(i=1;i<=17;i++) {
- sprintfW(val,valm,i);
- length = sizeof(installed);
Wine doesn't like C++ style comments (//) because some C compilers don't accept them, I think you have to use /* */
Not sure how rigidly this rule is followed though.