> Except that Borland C gives a warning because it PCURSORINFO is still
> present in the function type that defines cursor. That's what started
> all this...
Just define the function pointer prototype without the reference to
PCURSORINFO. Borland C has no idea what type the function pointer
prototype should be. All that matters is that the parameter have the
correct size. BUT there is a bigger problem:
> jaltman> Shouldn't the sizeof(buf) really be
> jaltman>
> jaltman> if (cursor)
> jaltman> {
> jaltman> /* cursor position */
> jaltman> cursor((PCURSORINFO) buf);
> jaltman> RAND_add(buf, sizeof(buf), 0);
> jaltman> }
> jaltman>
> jaltman> sizeof(CURSORINFO) if we want to be accurate?
>
> Sure, if we could be sure at all time that CURSORINFO is what we think
> it is.
Actually, you already know what it is supposed to be. The above code
is wrong, Before you can call cursor() which is really
GetCursorInfo() you need to do the following:
if (cursor) {
PCURSORINFO p = (PCURSORINFO) buf;
p.cbSize = sizeof(CURSORINFO);
if (cursor(p)) {
RAND_add(p+sizeof(p.cbSize),p.cbSize-sizeof(p.cbSize),0);
}
}
Otherwise, you are passing a random size into the GetCursorInfo()
structure and it does not know how many fields to fill in. My original
solution of including the definition of CURSORINFO in the rand_win.c
file is the correct way to go.
Jeffrey Altman * Sr.Software Designer
The Kermit Project * Columbia University
612 West 115th St * New York, NY * 10025 * USA
http://www.kermit-project.org/ * [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]