static void sig_window_changed(WINDOW_REC *active, WINDOW_REC *old) { window_read(active); window_read(old); textbuffer_view_set_bookmark_bottom(WINDOW_GUI(active)->view, "useless_end"); LINE_REC *linerec = textbuffer_view_get_bookmark(WINDOW_GUI(active)->view, "trackbar"); LINE_REC *last_line = textbuffer_view_get_bookmark(WINDOW_GUI(active)->view, "useless_end"); if(linerec == last_line && linerec) textbuffer_view_remove_line(WINDOW_GUI(active)->view, linerec); }
int bitSRead(BitStream *bs,char * file) { FILE * fp; int nw,i; memset(bs,0,sizeof(*bs)); dlistInit(&bs->windows); fp=fopen(file,"rt"); assert(fp); bs->nu=byte_read(fp); assert(0==bs->nu); bs->pe=byte_read(fp); assert(bs->pe==0xb7); for(i=0;i<4;i++) { bs->cregs[i]=byte_read(fp); } // bs->idunno=byte_read(fp); assert(get_cr(28)==0);//reserved==0 nw=0; nw=(byte_read(fp)&0x0ff)<<8; nw|=(byte_read(fp)&0x0ff); for(i=0;i<nw;i++) { BitSWindow * w; w=window_read(fp); dlistInsertLast(&bs->windows,&w->e); } bs->po=byte_read(fp); assert(bs->po==0xe7); fclose(fp); return 0; }