emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System calls without error checks in w32


From: Lennart Borgman
Subject: Re: System calls without error checks in w32
Date: Sun, 30 May 2010 05:26:32 +0200

On Sun, May 30, 2010 at 5:02 AM, Eli Zaretskii <address@hidden> wrote:
>
> In any case, the solution you suggest is not a good one, because it
> obfuscates the source code and makes it harder to read and understand.


Are you saying that checking the return values of system calls should
be avoided because it makes the code to difficult to read?

I can't imagine you mean that. What do you mean? Exactly what in my
suggestion makes the code to hard to read? How can the check be made
more readable? (I can't see how GLYPH_DEBUG style handling of it
applies here.)

Remember that what I suggest is basically

   if (bad_return_value) DebPrint (("error this_function.ApiFunction
=> %d", bad_return_value));

It can be visually more appealing with a macro, something like

   W32DEBPRINT (this_function, ApiFunction, bad_return_value, 0);

Is that what you mean?

This is of course what I meant, but my C fu is low, and so my C
language. So we might misunderstand each other.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]