mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
Support for filtering exceptions (nw)
This commit is contained in:
parent
65bf1725d2
commit
6cc3a6cc90
@ -9,6 +9,8 @@ import sys
|
||||
|
||||
drivlist = []
|
||||
sourcelist = []
|
||||
filter_addlist = []
|
||||
filter_removelist = []
|
||||
|
||||
def parse_file(srcfile):
|
||||
try:
|
||||
@ -102,6 +104,12 @@ def parse_filter_file(srcfile):
|
||||
sys.stderr.write("Importing drivers from '%s'\n" % sourcename[1:])
|
||||
parse_filter_file(sourcename[1:])
|
||||
continue
|
||||
if sourcename[0]=='+':
|
||||
filter_addlist.append(sourcename[1:])
|
||||
continue
|
||||
if sourcename[0]=='-':
|
||||
filter_removelist.append(sourcename[1:])
|
||||
continue
|
||||
if not all(((c >='a' and c<='z') or (c>='0' and c<='9') or c=='_' or c=='.' or c=='-') for c in sourcename):
|
||||
sys.stderr.write("%s:%d - Invalid character in driver \"%s\"\n" % (srcfile, linenum, sourcename))
|
||||
return 1
|
||||
@ -128,6 +136,11 @@ if len(drivlist)==0 :
|
||||
sys.stderr.write("No drivers found\n")
|
||||
sys.exit(1)
|
||||
|
||||
for x in filter_addlist:
|
||||
drivlist.append(x)
|
||||
|
||||
drivlist = [x for x in drivlist if (x not in filter_removelist)]
|
||||
|
||||
sys.stderr.write("%d driver(s) found\n" % len(drivlist))
|
||||
|
||||
# add a reference to the ___empty driver
|
||||
|
@ -123,7 +123,6 @@ concept.cpp
|
||||
cortex.cpp
|
||||
cosmicos.cpp
|
||||
cp1.cpp
|
||||
cps1.cpp
|
||||
craft.cpp
|
||||
crvision.cpp
|
||||
ct486.cpp
|
||||
@ -672,3 +671,9 @@ zorba.cpp
|
||||
zrt80.cpp
|
||||
zsbc3.cpp
|
||||
zx.cpp
|
||||
//exceptions + to add - to remove form imported list
|
||||
-orbatak
|
||||
+wofch
|
||||
+sfzch
|
||||
+sfach
|
||||
+sfzbch
|
||||
|
Loading…
Reference in New Issue
Block a user