On Sat, 2 Nov 2002 10:56:02 -0500, "Dimitrie O. Paun" dpaun@rogers.com wrote :
On November 2, 2002 10:41 am, Jaco Greeff wrote:
+#define POPEN_WCMD_EXEC "C:\Windows\System32\cmd.exe /c"
Do we need this hardcoded path here?!? What about the COMSPEC idea that Francois suggested?
I'm still trying to get that one to go. As soon as I've got it, I'll submit the small change.
<snip>
- else \
CloseHandle(hHandle);
What's up with all the macro abuse? :) We don't like cpp that much! ;) Please, try to do things without macros, it can't be that bad.
And everybody is a critic ;) I really hate duplicating code in any function. I'd rather use a macro which make the function
1. more readable, 2. shorter :)
I would potentially rather more it to it's own header file than doing the cut-n-paste thing inside a function... Would it be 50% ok with macro abuse in a seperate header file?
Greetings Jaco
On November 2, 2002 11:07 am, Jaco Greeff wrote:
And everybody is a critic ;)
And especially me, lately :(
I would potentially rather more it to it's own header file than doing the cut-n-paste thing inside a function... Would it be 50% ok with macro abuse in a seperate header file?
Not from my POV. There are some valid uses for macros, but from what I see in your patch, they certainly don't seem like these are. The code duplication is minimal, but it makes it clear what's going on. Maybe you understand, but it's completely non-standard what you do, and it would take someone significantly more to understand what's going on than if the code would be explicit. And this gets compounded to the well-known problems with the macros.
We really don't like cpp around here. It was a shock to me when I started way back when, but I soon saw the light, and I never went back to my evil macro ways :) (not that I much used them before, but I was rather impartial toward them).