[PATCH] FCI work for cabinet.dll [cabinet-fci-patch-03c.diff]

Mike McCormack mike at codeweavers.com
Sat Jul 2 20:07:48 CDT 2005


Hi Gerold

Gerold J. Wucherpfennig wrote:
> And now take this...

Gulp.

> +    p_fci_internal->perf->erfOper = FCIERR_NONE;
> +    p_fci_internal->perf->erfType = ERROR_INVALID_DATA;
> +    p_fci_internal->perf->fError = TRUE;
> +    SetLastError(ERROR_INVALID_DATA);

Your code seem to be doing this over and over again.  Is there any 
reason not to make a macro so you can do something like:

FCI_SET_ERROR(FCIERR_NONE, ERROR_INVALID_DATA );

maybe something like this:

#define FCI_SET_ERROR( oper, type )    \
  p_fci_internal->perf->erfOper = oper; \
  p_fci_internal->perf->erfType = type; \
  p_fci_internal->perf->fError = TRUE;  \
  SetLastError(type);

Also it would be nice to split this into two patches, one changing all 
the error codes as per above, and one with all the other minor changes 
you made.  A 75k patch will take a long time for Alexandre to digest...

Mike



More information about the wine-devel mailing list