Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static inline int process_image(void *img, int width, int height, void (*f)(void *, int, int))
- {
- int x, y;
- for (y = 0; y < height; y++)
- for (x = 0; x < width; x++)
- f(img, x, y);
- }
- int process_image_foo(void *img, int width, int height)
- {
- return process_image(img, width, height, foo);
- }
- int process_image_bar(void *img, int width, int height)
- {
- return process_image(img, width, height, bar);
- }
- int process_image_baz(void *img, int width, int height)
- {
- return process_image(img, width, height, baz);
- }
Advertisement
Add Comment
Please, Sign In to add comment