Skip to content

Commit

Permalink
OpenWatcom Perforce Development.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//depot/openwatcom/": change = 17272 - 37426]
OW Contributors authored and jmalak committed Aug 12, 2012
1 parent 6b9cb44 commit 1b9e0ce
Showing 26,993 changed files with 3,144,832 additions and 466,082 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions bat/doeb.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sed -f %OWROOT%\bat\xb.sed <%1 >%2
12 changes: 12 additions & 0 deletions bat/eb.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@echo on
if [%1] == [] goto bldlog
if not exist %1 goto done
call doeb %1 yy.
vi yy
goto done
:bldlog
if not exist build.log goto done
call doeb build.log xx.
vi xx
goto done
:done
33 changes: 33 additions & 0 deletions bat/filesize.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>

main( int argc, char *argv[] )
{
struct find_t fileinfo;
unsigned rc;
unsigned sectors;
unsigned total_sectors;

if( argc < 2 ) {
printf( "Usage: filesize path\n" );
exit( 1 );
}
total_sectors = 0;
rc = _dos_findfirst( argv[1], _A_NORMAL, &fileinfo );
while( rc == 0 ) {
sectors = (fileinfo.size + 511) / 512u;
printf( "%-14s %10lu %4u\n", fileinfo.name, fileinfo.size, sectors );
total_sectors += sectors;
rc = _dos_findnext( &fileinfo );
}
printf( "Total number of sectors: %u\n", total_sectors );
printf( "Total amount of space : %lu\n", total_sectors * 512ul );
if( total_sectors < 2847 ) {
printf( "%u sectors available on 1.44MB diskette\n",
2847 - total_sectors );
} else if( total_sectors > 2847 ) {
printf( "%u too many sectors to fit onto 1.44MB diskette\n",
total_sectors - 2847 );
}
}
Loading

0 comments on commit 1b9e0ce

Please sign in to comment.