Christoph Frick wrote:
> Add dinput support for BSD's usbhid joysticks
>
> + if (have_joy_devs == 0) {
> + joy_devs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
> sizeof(struct JoyDev));
> + } else {
> + HeapReAlloc(GetProcessHeap(), 0, joy_devs, (1 + have_joy_devs) *
On Sat, Apr 26, 2008 at 08:57:28AM -0600, Vitaliy Margolen wrote:
> Please use 4 spaces indentation, no tabs.
what happened to original author decides? ;)
i will run the uncopied parts through indent once i find the -unreadable
flag for it...
> > + snprintf(buf, MAX_PATH, FMT_UHIDDEVS,
> No (in case buffer at least 1 byte long).
Oh, right you are! Thanks, I did confuse that the strncpy.
--Juan
Juan Lang wrote:
>> snprintf always writes terminating '\0' character at the end of the string.
>
> Only if the buffer contains enough space for the terminating null.
>
No (in case buffer at least 1 byte long). From man page:
The functions snprintf() and vsnprintf() write at most size bytes (in
> snprintf always writes terminating '\0' character at the end of the string.
Only if the buffer contains enough space for the terminating null.
> You don't need to explicitly do that yourself.
That's probably true in this case.
--Juan
Christoph Frick wrote:
> From 7618ceb6941c0dffac9c48c1fa1aeb7e821673a2 Mon Sep 17 00:00:00 2001
> From: Christoph Frick <[EMAIL PROTECTED]>
> Date: Sat, 26 Apr 2008 02:50:01 +0200
> Subject: [PATCH] Initial support for BSD's usbhid joysticks
>
> Please consider this a tracer bullet. I had only tim