示例#1
0
void FacetLump::get_surfaces( DLIList<FacetSurface*>& result_list )
{
  DLIList<FacetShell*> shell_list;
  DLIList<FacetSurface*> tmp_list;
  get_shells(shell_list);
  shell_list.reset();
  for ( int i = 0; i < shell_list.size(); i++ )
  {
    tmp_list.clean_out();
    shell_list.next(i)->get_surfaces( tmp_list );
    result_list.merge_unique( tmp_list );
  }
}
示例#2
0
void FacetCoEdge::get_lumps( DLIList<FacetLump*>& result_list )
{
  DLIList<FacetShell*> shell_list;
  get_shells( shell_list );
  shell_list.reset();
  for ( int i = shell_list.size(); i--; )
  {
    FacetShell* shell = shell_list.get_and_step();
    shell->get_lumps( result_list );
    FacetLump* lump = dynamic_cast<FacetLump*>(shell->get_lump());
    if (lump)
      result_list.append_unique(lump);
  }
}
示例#3
0
int main(int argc, char **argv)
{
	get_shells();
	setflags(argc,argv);
	proc *ps[10000];
	proc_structs = ps;
	if (unique_uids)
	{
		int uidstr[10000];
		uuids = uidstr;
		int i = 10000;
		while(i--) uuids[i] = -1;
	}

	DIR *dp;
	struct dirent *ep;
	psinfo_t psinfo_buf;
	dp = opendir ("/proc");
	char buf[128];
	if (dp != NULL)
	{
		printf("%8s ","UID");
		if(unique_uids) printf("\n");
		else
		{
			if(pid) printf("%5s ","PID");
			if(descendants) printf("%4s ","N");
			printf("%16s %.24s\n","FNAME","STIME");
		}

		while ((ep = readdir(dp)))
		{
			if(ep->d_name[0] >= '0' && ep->d_name[0] <= '9')
			{
				sprintf(buf,"/proc/%s/psinfo",ep->d_name);
				save_procinfo(buf,&psinfo_buf);
				//print_procinfo(buf,&psinfo_buf);
			}
		}

		(void)closedir(dp);
	}
	else perror ("Couldn't open the directory");	
	compute_descendants();
	proc *p;int i = 0;
	while ((p = proc_structs[i++])) print_procinfo(p);

	return 0;
}