/* Wm_Topped() *========================================================================== * Handle main event_multi window topped messages */ void Wm_Topped( int *msg ) { if( msg[3] == w.id ) { wind_set( w.id, WF_TOP ); if( !IsCPXActive() ) time_handle(); } }
int main(int argc, char* argv[])// dir { DIR* pdir; char* ptm ; char perm[11] ; char path[256]; struct stat my_stat ; struct dirent* pent; pdir = opendir(argv[1]); if(pdir == NULL) { perror("opendir"); exit(1); } while( (pent = readdir(pdir) ) != NULL ) { // printf("inode: %d\n", pent ->d_ino); // printf("offset: %u\n", pent ->d_off); // printf("reclen: %d\n", pent ->d_reclen); // printf("type: %d\n", pent ->d_type); memset(path, 0, 256); sprintf(path, "%s/%s", argv[1], pent -> d_name); memset(&my_stat, 0, sizeof(my_stat)); if(stat(path, &my_stat) == -1 ) { perror("stat"); exit(1); } ptm = ctime(&my_stat.st_mtime); time_handle(ptm); mode2str(my_stat.st_mode, perm); printf("%10s %d %5s %5s %5d %15s %10s\n", perm, my_stat.st_nlink, getpwuid(my_stat.st_uid) ->pw_name, getgrgid(my_stat.st_gid) -> gr_name, my_stat.st_size, ptm + 4 , pent ->d_name ); } closedir(pdir); return 0 ; }
/* Wm_Redraw() *========================================================================== * Handle main event_multi window redraw messages. * * IN: int *msg: Event messages * OUT: void * * GLOBAL: WINFO w: window structure * int xconfig: The index of which config routine is active * -1 when none active */ void Wm_Redraw( int *msg ) { OBJECT *tree = ( OBJECT *)rs_trindex[ XCONTROL ]; GRECT *rect; int mainbase; if( msg[3] == w.id ) { rect = (GRECT *)&msg[4]; if( !IsCPXActive() ) { mainbase = ( ( !IsXconfigActive() ) ? ( ROOT ) : ( TIMEBASE ) ); time_handle(); do_redraw( tree, mainbase, rect ); w.phy = ObRect( XBASE ); objc_offset( tree, XBASE, &w.phy.g_x, &w.phy.g_y ); redraw_xconfig( rect, &w.phy ); } Redraw_XForm_Do( rect ); cpx_draw( rect ); } }