Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Here is a patch to handle 'rm', 'cp', and 'exec' usage by system();
> again very small.
This part seems unnecessarily obscurantist:
> ! #ifndef WIN32
> ! #define EXEC "exec "
> ! #else
> ! #define EXEC ""
> ! #endif
> ! sprintf(sys, "%s%s '%s'", EXEC, editorName, fname);
I like the other style (just #ifdef to choose one of two sprintf
commands) better. It seems easier to understand, as well as less
fragile --- the way you have it here makes it *real* easy to break
the computation of the buffer size for the command string.
regards, tom lane