| Previous | 199869 Revisions | Next |
| r36274 Thursday 5th March, 2015 at 23:08:01 UTC by Mike Naberezny |
|---|
| Send error messages to stderr instead of stdout. (nw) |
| [src/build] | file2str.py makelist.py |
| [src/emu/cpu/h8] | h8make.py |
| [src/regtests/chdman] | chdtest.py |
| r244785 | r244786 | |
|---|---|---|
| 26 | 26 | try: |
| 27 | 27 | myfile = open(srcfile, 'rb') |
| 28 | 28 | except IOError: |
| 29 | | |
| 29 | sys.stderr.write("Unable to open source file '%s'\n" % srcfile) | |
| 30 | 30 | sys.exit(-1) |
| 31 | 31 | |
| 32 | 32 | byteCount = os.path.getsize(srcfile) |
| r244785 | r244786 | |
| 56 | 56 | dst.write('\n};\n') |
| 57 | 57 | dst.close() |
| 58 | 58 | except IOError: |
| 59 | | |
| 59 | sys.stderr.write("Unable to open output file '%s'\n" % dstfile) | |
| 60 | 60 | sys.exit(-1) |
| r244785 | r244786 | |
|---|---|---|
| 10 | 10 | try: |
| 11 | 11 | fp = open(srcfile, 'rb') |
| 12 | 12 | except IOError: |
| 13 | | |
| 13 | sys.stderr.write("Unable to open source file '%s'\n" % srcfile) | |
| 14 | 14 | return 1 |
| 15 | 15 | in_comment = 0 |
| 16 | 16 | linenum = 0 |
| r244785 | r244786 | |
|---|---|---|
| 15 | 15 | return 2 |
| 16 | 16 | if name == "s26": |
| 17 | 17 | return 3 |
| 18 | | |
| 18 | sys.stderr.write("Unknown chip type name %s\n" % name) | |
| 19 | 19 | sys.exit(1) |
| 20 | 20 | |
| 21 | 21 | def type_to_device(dtype): |
| r244785 | r244786 | |
| 96 | 96 | if val in self.d: |
| 97 | 97 | h = self.d[val] |
| 98 | 98 | if h.premask != premask: |
| 99 | | |
| 99 | sys.stderr.write("Premask conflict\n") | |
| 100 | 100 | sys.exit(1) |
| 101 | 101 | return h |
| 102 | 102 | h = Hash(premask) |
| r244785 | r244786 | |
| 105 | 105 | |
| 106 | 106 | def set(self, val, opc): |
| 107 | 107 | if val in self.d: |
| 108 | | |
| 108 | sys.stderr.write("Collision on %s\n" % opc.description()) | |
| 109 | 109 | sys.exit(1) |
| 110 | 110 | self.d[val] = opc |
| 111 | 111 | |
| r244785 | r244786 | |
| 331 | 331 | if v in h.d: |
| 332 | 332 | d = h.d[v] |
| 333 | 333 | if not d.is_dispatch(): |
| 334 | | |
| 334 | sys.stderr.write("Collision on %s\n" % opc.description()) | |
| 335 | 335 | sys.exit(1) |
| 336 | 336 | if opc.enabled: |
| 337 | 337 | d.enabled = True |
| r244785 | r244786 | |
|---|---|---|
| 121 | 121 | chdmanBin = os.path.normpath(os.path.join(currentDirectory, "..", "..", "..", "chdman")) |
| 122 | 122 | |
| 123 | 123 | if not os.path.exists(chdmanBin): |
| 124 | | |
| 124 | sys.stderr.write(chdmanBin + " does not exist\n") | |
| 125 | 125 | sys.exit(1) |
| 126 | 126 | |
| 127 | 127 | if not os.path.exists(inputPath): |
| 128 | | |
| 128 | sys.stderr.write(inputPath + " does not exist\n") | |
| 129 | 129 | sys.exit(1) |
| 130 | 130 | |
| 131 | 131 | if not os.path.exists(outputPath): |
| 132 | | |
| 132 | sys.stderr.write(outputPath + " does not exist\n") | |
| 133 | 133 | sys.exit(1) |
| 134 | 134 | |
| 135 | 135 | if os.path.exists(tempPath): |
| https://github.com/mamedev/mame/commit/b73285d6b3eb03ddaa0969d83f20e685890bc042 |
| Previous | 199869 Revisions | Next |