diff src/win32/7zip/7z/CPP/7zip/Compress/RarCodecsRegister.cpp @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/7zip/7z/CPP/7zip/Compress/RarCodecsRegister.cpp	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,26 @@
     1.4 +// RarCodecsRegister.cpp
     1.5 +
     1.6 +#include "StdAfx.h"
     1.7 +
     1.8 +#include "../Common/RegisterCodec.h"
     1.9 +
    1.10 +#include "Rar1Decoder.h"
    1.11 +#include "Rar2Decoder.h"
    1.12 +#include "Rar3Decoder.h"
    1.13 +
    1.14 +#define CREATE_CODEC(x) static void *CreateCodec ## x() { return (void *)(ICompressCoder *)(new NCompress::NRar ## x::CDecoder); }
    1.15 +
    1.16 +CREATE_CODEC(1)
    1.17 +CREATE_CODEC(2)
    1.18 +CREATE_CODEC(3)
    1.19 +
    1.20 +#define RAR_CODEC(x, name) { CreateCodec ## x, 0, 0x040300 + x, L"Rar" name, 1, false }
    1.21 +
    1.22 +static CCodecInfo g_CodecsInfo[] =
    1.23 +{
    1.24 +  RAR_CODEC(1, L"1"),
    1.25 +  RAR_CODEC(2, L"2"),
    1.26 +  RAR_CODEC(3, L"3"),
    1.27 +};
    1.28 +
    1.29 +REGISTER_CODECS(Rar)