Learning by doing: Reading books and trying to understand the (code) examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
321 B

  1. struct filestruct;
  2. typedef void (*level_fn)(struct filestruct path);
  3. typedef struct filestruct
  4. {
  5. char *name, *fullname;
  6. level_fn directory_action, file_action;
  7. int depth, error;
  8. void *data;
  9. } filestruct;
  10. #define process_dir(...) process_dir_r((filestruct){__VA_ARGS__})
  11. int process_dir_r(filestruct level);