Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int process_image(void *img, int width, int height , int n )
- {
- int x, y;
- for (y = 0; y < height; y++) {
- for (x = 0; x < width; x++) {
- if (n == 0) foo(img, x, y);
- else if (n == 1) bar(img, x, y);
- else baz(img, x, y);
- }
- }
- return 0 ;
- }
- #define process_image_foo( i , w , h ) process_image( i , w , h , 0 )
- #define process_image_bar( i , w , h ) process_image( i , w , h , 1 )
- #define process_image_baz( i , w , h ) process_image( i , w , h , 2 )
Advertisement
Add Comment
Please, Sign In to add comment