App-SeismicUnixGui

 view release on metacpan or  search on metacpan

lib/App/SeismicUnixGui/developer/Stripped/shell/sugetgthr.su.main.windowing_sorting_muting  view on Meta::CPAN

		
		/* Skip . and .. directory entries
		if(strcmp(fname,".") && strcmp(fname,"..")) {		
			ffname = ealloc1(strlen(d->d_name)+strlen(dir)+2,sizeof(char));
			
			/* Create full filename
			sprintf(ffname, "%s/%s",dir,fname);
			if(verbose==1) warn("%s",ffname);
			
			/* get some info from the file
			stat(ffname,&__st);
			if(__st.st_size > 0) {
			
				/* Open the file and read traces into stdout*/
 				if(vt) {
					fd = open(ffname,O_RDONLY|CWP_O_LARGEFILE);
				/*	nread=fread(&tr,(size_t) HDRBYTES,1,fp); 
					nread=read(fd,&tr,(size_t) HDRBYTES); 
					memset((void *) &tr.data[tr.ns], (int) '\0' ,MAX(ns-tr.ns,0)*FSIZE);
				/*	nread+=fread(&tr.data[0],(size_t) tr.ns*FSIZE,1,fp);
					nread+=read(fd,&tr.data[0],(size_t) tr.ns*FSIZE);

lib/App/SeismicUnixGui/misc/manage_files_by.pm  view on Meta::CPAN


}

sub is_file_empty {
	my ($ref_file) = shift @_;

	# default situation is to have a file that is empty
	my $answer = 1;

	# find status of file to see whether it is empty
	#$fsize[1] = (stat($$ref_file))[2];
	#print("\nfile is: $$ref_file\n");

	# -s is for size
	#verified by JL
	my $j = ( -s $$ref_file );

	#	print ("file: $$ref_file is $j in size\n\n");
	if ( -s $$ref_file > 0 ) {

		#		print  ("file is not empty\n\n") ;



( run in 0.834 second using v1.01-cache-2.11-cpan-49f99fa48dc )