void def_arg(t_prog *lp, t_info *s) { int x; int temp; int t; int i; t = 0; x = 64; clear_arg(lp); if ((i = my_exept(lp)) == 1) temp = s->vm[lp->pc + 1]; else temp = lp->mem; if (s->vm[lp->pc + 1] < 0) temp = temp + 256; while (x >= 1) { if (temp / x % 4 == 3) t = t + put_ind(s, lp, t, i); else if (temp / x % 4 == 2) t = t + put_dir(s, lp, t, i); else if (temp / x % 4 == 1) t = t + put_reg(s, lp, t, i); x = x / 4; } my_affect(lp, temp, t + 1 + i); }
void handle_dir(const std::string& task) { DIR* dir; struct dirent* pent; dir=opendir(task.c_str()); while((pent=readdir(dir))!=NULL) { if(strcmp(".",pent->d_name)==0||strcmp("..",pent->d_name)==0) { continue; } std::stringstream ss; ss<<task<<"/"<<pent->d_name; put_dir(ss.str().c_str()); } mod_unfinished(); }