void ParametryGrafu(string sNET, string sDEM, string sDMC) { ifstream NET(sNET.c_str(), ios::in); NET >> LiczbaW; NET >> LiczbaK; NET.close(); ifstream DEM(sDEM.c_str(), ios::in); DEM >> LiczbaUni; DEM.close(); ifstream DMC(sDMC.c_str(), ios::in); DMC >> LiczbaMulti; DMC.close(); }
void scandirfunc(char *file) { char *extptr; uint32_t hex; if(strlen(file) != 12) return; extptr=&file[strlen(file)-4]; if(stricmp(extptr,".PNT")==0 && !scandir_boss) { char buf[200]; struct Node4D n4d; hex=hextodec(file); n4d.Zone = cfg_Zone; n4d.Net = NET(hex); n4d.Node = NODE(hex); n4d.Point = 0; scandir_dir = file; scandir_boss = &n4d; MakeFullPath(cfg_Dir,file,buf,200); osScanDir(buf,scandirfunc); scandir_dir = NULL; scandir_boss = NULL; } if(!stricmp(extptr,".REQ")) addentry(scandir_dir,file,TYPE_REQUEST,scandir_boss,TRUE); if(!stricmp(extptr,".CLO")) addentry(scandir_dir,file,TYPE_CRASH,scandir_boss,TRUE); if(!stricmp(extptr,".DLO")) addentry(scandir_dir,file,TYPE_DIRECT,scandir_boss,TRUE); if(!stricmp(extptr,".FLO")) addentry(scandir_dir,file,TYPE_NORMAL,scandir_boss,TRUE); if(!stricmp(extptr,".HLO")) addentry(scandir_dir,file,TYPE_HOLD,scandir_boss,TRUE); if(!stricmp(extptr,".CUT")) addentry(scandir_dir,file,TYPE_CRASH,scandir_boss,FALSE); if(!stricmp(extptr,".DUT")) addentry(scandir_dir,file,TYPE_DIRECT,scandir_boss,FALSE); if(!stricmp(extptr,".OUT")) addentry(scandir_dir,file,TYPE_NORMAL,scandir_boss,FALSE); if(!stricmp(extptr,".HUT")) addentry(scandir_dir,file,TYPE_HOLD,scandir_boss,FALSE); }
void addentry(char *dir,char *file,uint32_t type,struct Node4D *boss,bool flow) { struct osFileEntry *fe; struct fileentry *entry; struct Node4D n4d; char buf[200]; char buf2[200]; uint32_t hex; hex=hextodec(file); if(boss) { Copy4D(&n4d,boss); n4d.Point = hex; } else { n4d.Zone = cfg_Zone; n4d.Net = NET(hex); n4d.Node = NODE(hex); n4d.Point = 0; } if(Compare4DPat(&cfg_Pattern,&n4d)!=0) return; if(dir) MakeFullPath(dir,file,buf,200); else mystrncpy(buf,file,200); MakeFullPath(cfg_Dir,buf,buf2,200); if(!(fe=osGetFileEntry(buf2))) { return; } if(!(entry=osAlloc(sizeof(struct fileentry)))) { osFree(fe); return; } Copy4D(&entry->Node,&n4d); if(dir) { MakeFullPath(dir,file,entry->file,100); MakeFullPath(cfg_Dir,dir,entry->dir,100); } else { mystrncpy(entry->file,file,100); mystrncpy(entry->dir,cfg_Dir,100); } mystrncpy(entry->file,buf,100); entry->size=fe->Size; entry->date=fe->Date; entry->type=type; entry->flow=flow; jbAddNode(&list,(struct jbNode *)entry); osFree(fe); }
win = ewmhwin->xid; changeprop_long(&scr.root, Net("SUPPORTING_WM_CHECK"), "WINDOW", &win, 1); changeprop_long(ewmhwin, Net("SUPPORTING_WM_CHECK"), "WINDOW", &win, 1); changeprop_string(ewmhwin, Net("WM_NAME"), myname); changeprop_long(&scr.root, Net("DESKTOP_VIEWPORT"), "CARDINAL", (long[2]){0, 0}, 2); pushhandler(&scr.root, &root_handlers, nil); tick(0L, nil); long supported[] = { /* Misc */ NET("SUPPORTED"), /* Root Properties/Messages */ NET("ACTIVE_WINDOW"), NET("CLOSE_WINDOW"), NET("CURRENT_DESKTOP"), /* Client Properties */ NET("FRAME_EXTENTS"), NET("WM_DESKTOP"), NET("WM_FULLSCREEN_MONITORS"), NET("WM_NAME"), NET("WM_PID"), NET("WM_STRUT"), NET("WM_STRUT_PARTIAL"), /* Set this so clients don't update Net("USER_TIME") */ NET("USER_TIME_WINDOW"), /* States */