Skip to content
Browse files

Update HACKING a bit and clean up some indentation in glview

Signed-off-by: Hector Martin <hector@marcansoft.com>
  • Loading branch information...
1 parent 68d949d commit f6de20d83ac2b22bc1d7af14efdb738161f727a2 @marcan marcan committed Nov 20, 2010
Showing with 7 additions and 4 deletions.
  1. +4 −1 HACKING
  2. +3 −3 c/examples/glview.c
View
5 HACKING
@@ -2,7 +2,7 @@
--Eric Warmenhoven
We're not terribly particular about coding style at this early stage. However,
-you should follow the following basic guidelines:
+you should try to follow the following basic guidelines:
=== INDENTATION ===
@@ -62,6 +62,9 @@ void foo(int a_thing, int something_else)
...
}
+No-args functions should be (void), and function arguments should be separated
+with a space after the comma, like this:
+
void baz(void)
{
foo(bluh, blah);
View
6 c/examples/glview.c
@@ -265,16 +265,16 @@ int main(int argc, char **argv)
if (argc > 1)
user_device_number = atoi(argv[1]);
-
if (nr_devices < 1)
return 1;
if (freenect_open_device(f_ctx, &f_dev, user_device_number) < 0) {
printf("Could not open device\n");
return 1;
}
- freenect_set_tilt_degs(f_dev,0);
- freenect_set_led(f_dev,LED_RED);
+
+ freenect_set_tilt_degs(f_dev, 0);
+ freenect_set_led(f_dev, LED_RED);
freenect_set_depth_callback(f_dev, depth_cb);
freenect_set_rgb_callback(f_dev, rgb_cb);
freenect_set_rgb_format(f_dev, FREENECT_FORMAT_RGB);

0 comments on commit f6de20d

Please sign in to comment.
Something went wrong with that request. Please try again.