home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
bin2obj.zip
/
EXAMPLE.ZIP
/
EXAMPLE.C
next >
Wrap
C/C++ Source or Header
|
1996-03-12
|
730b
|
26 lines
#include <stdio.h>
/* These externs use the same name as that given to bin2obj */
/* for the object files. */
extern char SomeText[];
extern char Letters[];
int main( void )
{
puts( "Test of BIN2OBJ." );
/* This first example shows a straight binary object. */
/* We have to already know the size of the data. */
puts( "\nUpper case to lower case:" );
fwrite( Letters, 1, 2*(26+2), stdout );
/* This example shows one way to use the -n option in bin2obj, */
/* which puts the 4-byte count of bytes at the beginning of the data. */
puts( "\n**********" );
fwrite( SomeText+4, 1, *(int*)SomeText, stdout );
puts( "**********" );
puts( "\nEnd of test" );
return 0;
}