荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: FreeBSD (FreeBSD), 信区: Linux
标  题: Re: bin->iso 在linux 下面用什么软件?(fwd)
发信站: BBS 荔园晨风站 (Wed Feb 16 22:44:06 2000), 站内信件

【 以下文字转载自 FreeBSD 的信箱 】
【 原文由 liugang.bbs@smth.org 所发表 】
发信人: suzhe (I Love Linux), 信区: Linux
标  题: Re: bin->iso 在linux 下面用什么软件?(fwd)
发信站: 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 荔园晨风站 bbs.szu.edu.cn·[FROM: 210.39.3.66]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店