UTF-8 Content-Disposition: inline; filename="4c6bdfa5286155e06460af0e5ee4be593be72c1f..4fe914da69126b2bfbfc17879f68877e78373231.patch" Last-Modified: Mon, 05 May 2025 07:50:13 GMT Expires: Thu, 03 May 2035 07:50:13 GMT From 4fe914da69126b2bfbfc17879f68877e78373231 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 20 Aug 2020 01:32:52 +1000 Subject: *flt cleanup --- src/mame/mess.flt | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/mame/mess.flt') diff --git a/src/mame/mess.flt b/src/mame/mess.flt index 086302caa13..b741828f47d 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -330,7 +330,6 @@ gamepock.cpp gb.cpp gba.cpp generalplus_gpl_unknown.cpp -generalplus_gpl16250.cpp generalplus_gpl16250_mobigo.cpp generalplus_gpl16250_nand.cpp generalplus_gpl16250_rom.cpp @@ -507,7 +506,6 @@ lms46.cpp lola8a.cpp lviv.cpp lwriter.cpp -lx_jg7425.cpp lynx.cpp m20.cpp m24.cpp @@ -784,8 +782,6 @@ qvt70.cpp qx10.cpp r9751.cpp radio86.cpp -rad_eu3a05.cpp -rad_eu3a14.cpp rainbow.cpp rambo.cpp ravens.cpp @@ -1061,7 +1057,6 @@ vic10.cpp vic20.cpp victor9k.cpp vidbrain.cpp -vii.cpp vip.cpp vis.cpp vixen.cpp -- cgit v1.2.3-70-g09d2 MAME - Multiple Arcade Machine Emulator
summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp
blob: 7e6f460226a6d8fea9f3a3d9208956aeb8d8d505 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// HandlerOut.cpp

#include "StdAfx.h"

#ifndef _7ZIP_ST
#include "../../../Windows/System.h"
#endif

#include "../Common/ParseProperties.h"

#include "HandlerOut.h"

using namespace NWindows;

namespace NArchive {

static void SetMethodProp32(COneMethodInfo &m, PROPID propID, UInt32 value)
{
  if (m.FindProp(propID) < 0)
    m.AddProp32(propID, value);
}

void CMultiMethodProps::SetGlobalLevelAndThreads(COneMethodInfo &oneMethodInfo
    #ifndef _7ZIP_ST
    , UInt32 numThreads
    #endif
    )
{
  UInt32 level = _level;
  if (level != (UInt32)(UInt32)-1)
    SetMethodProp32(oneMethodInfo, NCoderPropID::kLevel, (UInt32)level);
  #ifndef _7ZIP_ST
  SetMethodProp32(oneMethodInfo, NCoderPropID::kNumThreads, numThreads);
  #endif
}

void CMultiMethodProps::Init()
{
  #ifndef _7ZIP_ST
  _numProcessors = _numThreads = NSystem::GetNumberOfProcessors();
  #endif
  
  _level = (UInt32)(UInt32)-1;
  _autoFilter = true;
  _crcSize = 4;
  _filterMethod.Clear();
  _methods.Clear();
}

HRESULT CMultiMethodProps::SetProperty(const wchar_t *nameSpec, const PROPVARIANT &value)
{
  UString name = nameSpec;
  name.MakeUpper();
  if (name.IsEmpty())
    return E_INVALIDARG;
  
  if (name[0] == 'X')
  {
    name.Delete(0);
    _level = 9;
    return ParsePropToUInt32(name, value, _level);
  }
  
  if (name == L"CRC")
  {
    name.Delete(0, 3);
    _crcSize = 4;
    return ParsePropToUInt32(name, value, _crcSize);
  }
  
  UInt32 number;
  int index = ParseStringToUInt32(name, number);
  UString realName = name.Mid(index);
  if (index == 0)
  {
    if (name.Left(2).CompareNoCase(L"MT") == 0)
    {
      #ifndef _7ZIP_ST
      RINOK(ParseMtProp(name.Mid(2), value, _numProcessors, _numThreads));
      #endif
      return S_OK;
    }
    if (name.CompareNoCase(L"F") == 0)
    {
      HRESULT res = PROPVARIANT_to_bool(value, _autoFilter);
      if (res == S_OK)
        return res;
      if (value.vt != VT_BSTR)
        return E_INVALIDARG;
      return _filterMethod.ParseMethodFromPROPVARIANT(L"", value);
    }
    number = 0;
  }
  if (number > 64)
    return E_FAIL;
  for (int j = _methods.Size(); j <= (int)number; j++)
    _methods.Add(COneMethodInfo());
  return _methods[number].ParseMethodFromPROPVARIANT(realName, value);
}

void CSingleMethodProps::Init()
{
  Clear();
  #ifndef _7ZIP_ST
  _numProcessors = _numThreads = NWindows::NSystem::GetNumberOfProcessors();
  AddNumThreadsProp(_numThreads);
  #endif
  _level = (UInt32)(UInt32)-1;
}

HRESULT CSingleMethodProps::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps)
{
  Init();
  for (int i = 0; i < numProps; i++)
  {
    UString name = names[i];
    name.MakeUpper();
    if (name.IsEmpty())
      return E_INVALIDARG;
    const PROPVARIANT &value = values[i];
    if (name[0] == L'X')
    {
      UInt32 a = 9;
      RINOK(ParsePropToUInt32(name.Mid(1), value, a));
      _level = a;
      AddLevelProp(a);
    }
    else if (name.Left(2).CompareNoCase(L"MT") == 0)
    {
      #ifndef _7ZIP_ST
      RINOK(ParseMtProp(name.Mid(2), value, _numProcessors, _numThreads));
      AddNumThreadsProp(_numThreads);
      #endif
    }
    else
      return ParseParamsFromPROPVARIANT(name, value);
  }
  return S_OK;
}

}