|
From: Hans-Bernhard B. <br...@ph...> - 2005-01-26 14:09:00
|
Tatsuro MATSUOKA wrote: > If "void PostString(HWND hwnd, char *pc)" > > in pgnuplot.c is modified by > > "void PostString(HWND hwnd, unsigned char *pc)" > > , it looks like work well. While that may appear to work well, I doubt it's the right way of going at it. The data passed to this function are actually type char *, not unsigned char *, and casting a pointer from one type to another is always a dangerous thing to do, even more so if it's supposed to happen this silently, by argument conversion. The correct method would rather appear to be a cast of the character being sent to 'unsigned char', as it's passed to the Windows API function PostMessage. > The buffer size is rather small. (80) I think it should be larger > (eg.512). > > "#define BUFFER_SIZE 512" What do you think would be gained by that? Please note that the size of this buffer may very well be a critical parameter that determines how well pgnuplot works in a somewhat busy Windows environment. |