diff --git a/example-sdl/sdl.c b/example-sdl/sdl.c index cefc6dc..1fddf32 100644 --- a/example-sdl/sdl.c +++ b/example-sdl/sdl.c @@ -23,24 +23,24 @@ #include -#include // for SDL_Init, SDL_Quit -#include // for SDL_GetError -#include // for SDL_Event, SDL_PollEvent, etc -#include // for SDL_GL_SetAttribute, etc +#include /* for SDL_Init, SDL_Quit */ +#include /* for SDL_GetError */ +#include /* for SDL_Event, SDL_PollEvent, etc */ +#include /* for SDL_GL_SetAttribute, etc */ -#include // for glVertex3f, GLfloat, etc -#include // for gluLookAt, gluOrtho2D, etc -#include // for glutSolidTeapot +#include /* for glVertex3f, GLfloat, etc */ +#include /* for gluLookAt, gluOrtho2D, etc */ +#include /* for glutSolidTeapot */ #ifndef WIIUSE_WIN32 - #include // for timeval, gettimeofday - #include // for time - #include // for usleep + #include /* for timeval, gettimeofday */ + #include /* for time */ + #include /* for usleep */ #else #include #endif -#include // for printf +#include /* for printf */ #define PI 3.14159265358979323846 #define PI_DIV_180 0.017453292519943296 @@ -326,7 +326,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine int found, connected; int wm; - //printf("wiiuse version = %s\n", wiiuse_version()); + /* printf("wiiuse version = %s\n", wiiuse_version()); */ wiimotes = wiiuse_init(MAX_WIIMOTES); found = wiiuse_find(wiimotes, MAX_WIIMOTES, 5); diff --git a/example/example.c b/example/example.c index 16b2fec..bc905af 100644 --- a/example/example.c +++ b/example/example.c @@ -34,13 +34,13 @@ * This file is an example of how to use the wiiuse library. */ -#include // for printf +#include /* for printf */ #ifndef WIN32 - #include // for usleep + #include /* for usleep */ #endif -#include "wiiuse.h" // for wiimote_t, classic_ctrl_t, etc +#include "wiiuse.h" /* for wiimote_t, classic_ctrl_t, etc */ #define MAX_WIIMOTES 4 @@ -187,8 +187,8 @@ void handle_event(struct wiimote_t* wm) { float x = ((wb->tr + wb->br) / total) * 2 - 1; float y = ((wb->tl + wb->tr) / total) * 2 - 1; printf("Weight: %f kg @ (%f, %f)\n", total, x, y); - //printf("Interpolated weight: TL:%f TR:%f BL:%f BR:%f\n", wb->tl, wb->tr, wb->bl, wb->br); - //printf("Raw: TL:%d TR:%d BL:%d BR:%d\n", wb->rtl, wb->rtr, wb->rbl, wb->rbr); + /* printf("Interpolated weight: TL:%f TR:%f BL:%f BR:%f\n", wb->tl, wb->tr, wb->bl, wb->br); */ + /* printf("Raw: TL:%d TR:%d BL:%d BR:%d\n", wb->rtl, wb->rtr, wb->rbl, wb->rbr); */ } } @@ -353,7 +353,7 @@ int main(int argc, char** argv) { * if any expansions are plugged into the wiimote or * what LEDs are lit. */ - //wiiuse_status(wiimotes[0]); + /* wiiuse_status(wiimotes[0]); */ /* * This is the main loop @@ -406,8 +406,8 @@ int main(int argc, char** argv) { * threshold values. By default they are the same * as the wiimote. */ - //wiiuse_set_nunchuk_orient_threshold((struct nunchuk_t*)&wiimotes[i]->exp.nunchuk, 90.0f); - //wiiuse_set_nunchuk_accel_threshold((struct nunchuk_t*)&wiimotes[i]->exp.nunchuk, 100); + /* wiiuse_set_nunchuk_orient_threshold((struct nunchuk_t*)&wiimotes[i]->exp.nunchuk, 90.0f); */ + /* wiiuse_set_nunchuk_accel_threshold((struct nunchuk_t*)&wiimotes[i]->exp.nunchuk, 100); */ printf("Nunchuk inserted.\n"); break; diff --git a/src/classic.c b/src/classic.c index d54acd9..db576b3 100644 --- a/src/classic.c +++ b/src/classic.c @@ -32,11 +32,11 @@ */ #include "classic.h" -#include "dynamics.h" // for calc_joystick_state -#include "events.h" // for handshake_expansion +#include "dynamics.h" /* for calc_joystick_state */ +#include "events.h" /* for handshake_expansion */ -#include // for malloc -#include // for memset +#include /* for malloc */ +#include /* for memset */ static void classic_ctrl_pressed_buttons(struct classic_ctrl_t* cc, short now); diff --git a/src/classic.h b/src/classic.h index cc9fd64..7fe7b30 100644 --- a/src/classic.h +++ b/src/classic.h @@ -53,4 +53,4 @@ void classic_ctrl_event(struct classic_ctrl_t* cc, byte* msg); } #endif -#endif // CLASSIC_H_INCLUDED +#endif /* CLASSIC_H_INCLUDED */ diff --git a/src/definitions.h b/src/definitions.h index 54febfd..f97e81d 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -42,7 +42,7 @@ #define WIIMOTE_PI 3.14159265f -//#define WITH_WIIUSE_DEBUG +/* #define WITH_WIIUSE_DEBUG */ extern FILE* logtarget[]; @@ -89,4 +89,4 @@ extern FILE* logtarget[]; /** @} */ -#endif // DEFINITIONS_H_INCLUDED +#endif /* DEFINITIONS_H_INCLUDED */ diff --git a/src/dynamics.c b/src/dynamics.c index 5797316..e7ace99 100644 --- a/src/dynamics.c +++ b/src/dynamics.c @@ -37,8 +37,8 @@ #include "dynamics.h" -#include // for atan2f, atanf, sqrt -#include // for abs +#include /* for atan2f, atanf, sqrt */ +#include /* for abs */ /** diff --git a/src/dynamics.h b/src/dynamics.h index 1505401..9722b4d 100644 --- a/src/dynamics.h +++ b/src/dynamics.h @@ -57,4 +57,4 @@ void apply_smoothing(struct accel_t* ac, struct orient_t* orient, int type); } #endif -#endif // DYNAMICS_H_INCLUDED +#endif /* DYNAMICS_H_INCLUDED */ diff --git a/src/events.c b/src/events.c index 7f9d0da..8a895ad 100644 --- a/src/events.c +++ b/src/events.c @@ -37,24 +37,24 @@ #include "wiiuse_internal.h" #include "events.h" -#include "classic.h" // for classic_ctrl_disconnected, etc -#include "dynamics.h" // for calculate_gforce, etc -#include "guitar_hero_3.h" // for guitar_hero_3_disconnected, etc -#include "ir.h" // for calculate_basic_ir, etc -#include "nunchuk.h" // for nunchuk_disconnected, etc -#include "wiiboard.h" // for wii_board_disconnected, etc -#include "io.h" // for wiiuse_io_read on Windows, etc +#include "classic.h" /* for classic_ctrl_disconnected, etc */ +#include "dynamics.h" /* for calculate_gforce, etc */ +#include "guitar_hero_3.h" /* for guitar_hero_3_disconnected, etc */ +#include "ir.h" /* for calculate_basic_ir, etc */ +#include "nunchuk.h" /* for nunchuk_disconnected, etc */ +#include "wiiboard.h" /* for wii_board_disconnected, etc */ +#include "io.h" /* for wiiuse_io_read on Windows, etc */ #ifndef WIIUSE_WIN32 - #include // for timeval - #include // for select, fd_set - #include // for read + #include /* for timeval */ + #include /* for select, fd_set */ + #include /* for read */ #endif -#include // for errno -#include // for printf, perror -#include // for free, malloc -#include // for memcpy, memset +#include /* for errno */ +#include /* for printf, perror */ +#include /* for free, malloc */ +#include /* for memcpy, memset */ static void idle_cycle(struct wiimote_t* wm); static void clear_dirty_reads(struct wiimote_t* wm); diff --git a/src/events.h b/src/events.h index c3629e5..1e42731 100644 --- a/src/events.h +++ b/src/events.h @@ -56,4 +56,4 @@ void handshake_expansion(struct wiimote_t* wm, byte* data, uint16_t len); void disable_expansion(struct wiimote_t* wm); /** @} */ -#endif // EVENTS_H_INCLUDED +#endif /* EVENTS_H_INCLUDED */ diff --git a/src/guitar_hero_3.c b/src/guitar_hero_3.c index 1b2f13d..4b582db 100644 --- a/src/guitar_hero_3.c +++ b/src/guitar_hero_3.c @@ -33,11 +33,11 @@ #include "guitar_hero_3.h" -#include "dynamics.h" // for calc_joystick_state -#include "events.h" // for handshake_expansion +#include "dynamics.h" /* for calc_joystick_state */ +#include "events.h" /* for handshake_expansion */ -#include // for malloc -#include // for memset +#include /* for malloc */ +#include /* for memset */ static void guitar_hero_3_pressed_buttons(struct guitar_hero_3_t* gh3, short now); diff --git a/src/guitar_hero_3.h b/src/guitar_hero_3.h index e38e0b0..e9d3e95 100644 --- a/src/guitar_hero_3.h +++ b/src/guitar_hero_3.h @@ -63,4 +63,4 @@ void guitar_hero_3_event(struct guitar_hero_3_t* gh3, byte* msg); } #endif -#endif // GUITAR_HERO_3_H_INCLUDED +#endif /* GUITAR_HERO_3_H_INCLUDED */ diff --git a/src/io.c b/src/io.c index d150f7e..44d2c36 100644 --- a/src/io.c +++ b/src/io.c @@ -32,7 +32,7 @@ */ #include "io.h" -#include // for free, malloc +#include /* for free, malloc */ /** diff --git a/src/io.h b/src/io.h index 18e3187..246774f 100644 --- a/src/io.h +++ b/src/io.h @@ -60,4 +60,4 @@ int wiiuse_io_write(struct wiimote_t* wm, byte* buf, int len); } #endif -#endif // CONNECT_H_INCLUDED +#endif /* CONNECT_H_INCLUDED */ diff --git a/src/io_nix.c b/src/io_nix.c index 50f034e..fb14735 100644 --- a/src/io_nix.c +++ b/src/io_nix.c @@ -36,15 +36,15 @@ #ifdef WIIUSE_BLUEZ -#include // for ba2str, str2ba -#include // for inquiry_info -#include // for hci_get_route, hci_inquiry, etc -#include // for sockaddr_l2 +#include /* for ba2str, str2ba */ +#include /* for inquiry_info */ +#include /* for hci_get_route, hci_inquiry, etc */ +#include /* for sockaddr_l2 */ -#include // for perror -#include // for memset -#include // for connect, socket -#include // for close, write +#include /* for perror */ +#include /* for memset */ +#include /* for connect, socket */ +#include /* for close, write */ #include static int wiiuse_connect_single(struct wiimote_t* wm, char* address); @@ -76,7 +76,7 @@ int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout) { /* reset all wiimote bluetooth device addresses */ for (found_wiimotes = 0; found_wiimotes < max_wiimotes; ++found_wiimotes) { - //bacpy(&(wm[found_wiimotes]->bdaddr), BDADDR_ANY); + /* bacpy(&(wm[found_wiimotes]->bdaddr), BDADDR_ANY); */ memset(&(wm[found_wiimotes]->bdaddr), 0, sizeof(bdaddr_t)); } found_wiimotes = 0; diff --git a/src/io_win.c b/src/io_win.c index 2e7ea18..c56cc5e 100644 --- a/src/io_win.c +++ b/src/io_win.c @@ -63,7 +63,7 @@ int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout) { HIDD_ATTRIBUTES attr; int found = 0; - (void) timeout; // unused + (void) timeout; /* unused */ device_data.cbSize = sizeof(device_data); index = 0; diff --git a/src/ir.c b/src/ir.c index 980c27e..b8f409f 100644 --- a/src/ir.c +++ b/src/ir.c @@ -33,7 +33,7 @@ #include "ir.h" -#include // for atanf, cos, sin, sqrt +#include /* for atanf, cos, sin, sqrt */ static int get_ir_sens(struct wiimote_t* wm, const byte** block1, const byte** block2); static void interpret_ir_data(struct wiimote_t* wm); @@ -82,7 +82,7 @@ void wiiuse_set_ir(struct wiimote_t* wm, int status) { if(status) { WIIUSE_DEBUG("Tried to enable IR, will wait until handshake finishes."); WIIMOTE_ENABLE_STATE(wm, WIIMOTE_STATE_IR); - } // else ignoring request to turn off, since it's turned off by default + } /* else ignoring request to turn off, since it's turned off by default */ return; } @@ -429,7 +429,7 @@ static void interpret_ir_data(struct wiimote_t* wm) { wm->ir.ay = wm->ir.y; /* can't calculate yaw because we don't have the distance */ - //wm->orient.yaw = calc_yaw(&wm->ir); + /* wm->orient.yaw = calc_yaw(&wm->ir); */ ir_convert_to_vres(&wm->ir.x, &wm->ir.y, wm->ir.aspect, wm->ir.vres[0], wm->ir.vres[1]); break; diff --git a/src/ir.h b/src/ir.h index 47a71ae..03e982a 100644 --- a/src/ir.h +++ b/src/ir.h @@ -56,6 +56,6 @@ float calc_yaw(struct ir_t* ir); } #endif -#endif // IR_H_INCLUDED +#endif /* IR_H_INCLUDED */ diff --git a/src/nunchuk.c b/src/nunchuk.c index 4fbeedf..1e49ccb 100644 --- a/src/nunchuk.c +++ b/src/nunchuk.c @@ -33,11 +33,11 @@ #include "nunchuk.h" -#include "dynamics.h" // for calc_joystick_state, etc -#include "events.h" // for handshake_expansion +#include "dynamics.h" /* for calc_joystick_state, etc */ +#include "events.h" /* for handshake_expansion */ -#include // for malloc -#include // for memset +#include /* for malloc */ +#include /* for memset */ static void nunchuk_pressed_buttons(struct nunchuk_t* nc, byte now); diff --git a/src/nunchuk.h b/src/nunchuk.h index 794f6c6..4be7da8 100644 --- a/src/nunchuk.h +++ b/src/nunchuk.h @@ -54,4 +54,4 @@ void nunchuk_event(struct nunchuk_t* nc, byte* msg); } #endif -#endif // NUNCHUK_H_INCLUDED +#endif /* NUNCHUK_H_INCLUDED */ diff --git a/src/os.h b/src/os.h index d8e0d3b..2d18c48 100644 --- a/src/os.h +++ b/src/os.h @@ -49,4 +49,4 @@ #pragma warning(disable:4217) #endif -#endif // OS_H_INCLUDED +#endif /* OS_H_INCLUDED */ diff --git a/src/util.c b/src/util.c index 8198e4c..4f6480e 100644 --- a/src/util.c +++ b/src/util.c @@ -40,7 +40,7 @@ void wiiuse_millisleep(int durationMilliseconds) { #else /* not win32 - assuming posix */ -#include // for usleep +#include /* for usleep */ void wiiuse_millisleep(int durationMilliseconds) { usleep(durationMilliseconds * 1000); diff --git a/src/wiiboard.c b/src/wiiboard.c index ef5a538..275745b 100644 --- a/src/wiiboard.c +++ b/src/wiiboard.c @@ -34,8 +34,8 @@ #include "wiiboard.h" -#include // for printf -#include // for memset +#include /* for printf */ +#include /* for memset */ /** * @brief Handle the handshake data from the wiiboard. diff --git a/src/wiiuse.c b/src/wiiuse.c index 257ab0b..67e9a62 100644 --- a/src/wiiuse.c +++ b/src/wiiuse.c @@ -36,11 +36,11 @@ */ #include "wiiuse_internal.h" -#include "io.h" // for wiiuse_handshake, etc +#include "io.h" /* for wiiuse_handshake, etc */ -#include // for printf, FILE -#include // for malloc, free -#include // for memcpy, memset +#include /* for printf, FILE */ +#include /* for malloc, free */ +#include /* for memcpy, memset */ static int g_banner = 0; static const char g_wiiuse_version_string[] = WIIUSE_VERSION; diff --git a/src/wiiuse.h b/src/wiiuse.h index d092b44..2a7d500 100644 --- a/src/wiiuse.h +++ b/src/wiiuse.h @@ -104,7 +104,7 @@ #include #endif -#include // for FILE +#include /* for FILE */ /** @defgroup publicapi External API */ /** @{ */ diff --git a/src/wiiuse_internal.h b/src/wiiuse_internal.h index fabde7a..339f6e6 100644 --- a/src/wiiuse_internal.h +++ b/src/wiiuse_internal.h @@ -389,7 +389,7 @@ WIIUSE_DECLARE_BUFFERING_OPS(uint32_t) #undef WIIUSE_DECLARE_BUFFERING_OPS -#endif // not in doxygen +#endif /* not in doxygen */ #ifdef __cplusplus }