BBS水木清华站∶精华区
发信人: suzhe (I Love Linux), 信区: Linux
标 题: Re: bin->iso 在linux 下面用什么软件? (转载)
发信站: BBS 水木清华站 (Mon Jan 24 00:41:21 2000)
Bin2ISO, here is the source code:
/****************************************************
#include <stdio.h>
/* G L O B A L D E F I N E S */
#define byte unsigned char
#define SIZERAW 2352
#define SIZEISO 2048
FILE *INPUT, *OUTPUT;
/* /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ */
int main( argc, argv )
int argc;
char *argv[];
{
byte buf[SIZERAW+100];
/* Tell them what I am. */
fprintf (stderr, "raw2iso - Converts RAW format files to ISO format - V1.0\n");
/* Input -- process -- Output */
if ( argc != 3 ) return 1;
INPUT = fopen( argv[1], "rb" );
OUTPUT = fopen( argv[2], "wb" );
memset( &buf[0], '\0', sizeof( buf ) );
while( fread( &buf[0], SIZERAW, 1, INPUT ) ) {
fwrite( &buf[0]+16, SIZEISO, 1, OUTPUT );
memset( &buf[0], '\0', sizeof( buf ) );
};
return 0;
}
【 在 angel (khan) 的大作中提到: 】
∶ faint
∶ 好歹说说叫个什么名字呀
∶ 要不不是等于没说?
--
※ 来源:·BBS 水木清华站 smth.org·[FROM: 166.111.26.80]
BBS水木清华站∶精华区