Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 KB | None | 0 0
  1. int print_with_params(params_t params, char *d)
  2. {
  3.     int point = 0;
  4.  
  5.     if (d[0] != '.' || params.a == 1 || params.d == 1 || params.A == 1) {
  6.         if (my_strcmp(d, ".") == 0)
  7.             point = 1;
  8.         if (params.l == 1) {
  9.             if (params.A && (my_strcmp(d, ".") == 0 || my_strcmp(d, "..") == 0))
  10.                 return (1);
  11.             else
  12.                 ls_l(d);
  13.         }
  14.         if (point == 1)
  15.             d = ".";
  16.         if (params.A && (my_strcmp(d, ".") == 0 || my_strcmp(d, "..") == 0))
  17.             return (1);
  18.         else
  19.             print_ls(d);
  20.     }
  21.     return (0);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement