summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/srcclean.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-402/+0
|
* Don't convert spaces to tabs if they are in a string literal that is split ↵ smf-2014-07-231-1/+1
| | | | over multiple lines using line continuation (nw)
* Allow line continuation in string literals. (nw) smf-2014-07-231-1/+1
|
* Cleanups and version bumpmame0153 Miodrag Milanovic2014-04-071-47/+47
|
* Added a dry-run option (-d) to srcclean. Know what you are doing :-) ↵ Couriersud2013-12-261-17/+27
| | | | [Couriersud]
* Updated srcclean source following smf comments. No WN. Couriersud2013-12-261-8/+29
|
* Added a "-u" (for unix) flag to srcclean to produce unix-style endings. ↵ Couriersud2013-12-261-4/+25
| | | | [Couriersud]
* I think I deserve equal blame after the amount of work I did on this (nw) smf-2013-11-131-1/+1
|
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* one more fix for inc in srcclean (nw) Miodrag Milanovic2013-07-101-1/+1
|
* leaves line continuation characters in comments alone (nw) smf-2013-01-111-1/+1
|
* remove extraneous line continuation characters followed by a blank line and ↵ smf-2013-01-111-5/+26
| | | | blank lines that follow an opening brace in c files. [smf]
* add file name to unterminated string error message [smf] smf-2013-01-111-1/+1
|
* srcclean now processes XML & C comments the same, so they can be indented ↵ smf-2013-01-111-59/+82
| | | | but within the comment itself spaces are used [smf]
* if the start of a multi-line comment is indented then following comment ↵ smf-2012-10-091-15/+53
| | | | lines will be indented with tabs up to that point. [smf]
* fixed an incorrect optimisation (nw) smf-2012-10-081-2/+1
|
* realigns to the tab size if a space is followed by a tab, this mimics the ↵ smf-2012-10-081-2/+11
| | | | previous behaviour (nw)
* Spaces are converted to tabs at beginning of lines and tabs are converted to ↵ smf-2012-10-081-18/+44
| | | | spaces everywhere else. Comments in .lst files are cleaned. Extra blank lines are trimmed from ends of source files [smf]
* scrclean: Let's make buffers little bigger, fixes cleanup of big softlists ↵ Miodrag Milanovic2011-12-051-1/+1
| | | | (no whatsnew)
* srcclean.c: srcclean should remove invalid chars only for source files which ↵ Fabio Priuli2011-05-051-3/+4
| | | | are not xml (softlists have UTF-8 characters) [Fabio Priuli]
* Cleanups and version bump. Aaron Giles2010-05-051-1/+1
|
* Have srcclean add missing newlines to end of .c files [Atari Ace] Scott Stone2010-04-231-1/+9
|
* several cleanups based on cppcheck and VS2008 Code Analysis [Oliver Stöneberg] Fabio Priuli2010-03-171-3/+3
| | | | | | | | | | | | | split.c: made the "split" return the actual result instead of just 0. [Oliver Stöneberg] clifront.c: made the identation of the CPU device in -listdevices the same like the others [Oliver Stöneberg] i386.c: gave some fatalerror() calls in the i386 proper messages [Oliver Stöneberg] ssem.c: fixed compilation of SSEM core with SSEM_DISASM_ON_UNIMPL [Oliver Stöneberg] srcclean.c: small wording change in the srcclean summary [Oliver Stöneberg] sdl/window.c: fixed a potential memory leak in sdlwindow_video_window_create() [Oliver Stöneberg]
* Updated srcclean to remove "invisible spaces" immediately preceding Aaron Giles2009-12-281-0/+8
| | | | tabs. [Atari Ace]
* From: Atari Ace <atari_ace@verizon.net> Aaron Giles2009-12-231-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Date: Tue, Dec 22, 2009 at 4:44 PM Subject: [patch] Fix srcclean/src2html bugs, misbalanced tokens and visible whitespace errors To: submit@mamedev.org Cc: atariace@hotmail.com Hi mamedev, While experimenting with srcclean and src2html as indentation validators, I stumbled across a couple of bugs. The first is that srcclean doesn't properly handle /*...*//. It sees the last / char at the end as the second / of an inline comment, where it might be a division token or the start of either type of comment. The second bug is that src2html improperly handles strings with embedded quotes preceded by escaped backslashes, e.g. "ab\\\"cd". It believes the string terminated in the middle, and the last quote starts a new string. This issue is unlikely in actual code, but should be handled correctly. The first patch fixes these, and a some cases where there are dangling/missing tokens which my validation tools are noticing. These occur in some unused macros, dead code sections, and in some macros that are deliberately misbalanced (v9938.c, psx.c). In the deliberate cases, I balanced the braces by making exactly one open and one close macro and using those throughout. The second patch is then a set of visible whitespace "problems". Cases where the closing brace isn't at the same indent level as the open brace, and some cases where the indent level isn't a multiple of four. In the case of ssv.c I folded the assignments into init_ssv() to simplify the code and restore the brace balance, otherwise I kept to simply adding or removing whitespace. ~aa
* Fixed srcclean handling of embedded comments within strings [Atari Ace] Phil Bennett2009-12-071-8/+11
| | | | | | | | | | | | | | | | | | | | (Update of r7501) ---------- Forwarded message ---------- From: Atari Ace <atari_ace@verizon.net> Date: Sun, Dec 6, 2009 at 5:51 PM Subject: [patch] srcclean bugfix To: submit@mamedev.org Cc: atariace@hotmail.com Hi mamedev, My srcclean changes to track C-style quotes didn't handle all the special cases correctly (for instance, '\"' and "\\\""). This fixes it, and adds some /* ... */ to m68k_in.c so that src2html.exe does a better job on it. ~aa
* Fixed srcclean handling of embedded comments within strings [Atari Ace] Phil Bennett2009-12-031-11/+32
| | | | | | | | | | | | | | | | | | | | ---------- Forwarded message ---------- From: Atari Ace <atari_ace@verizon.net> Date: Wed, Dec 2, 2009 at 2:14 AM Subject: [patch] Fix srcclean to handle strings To: submit@mamedev.org Cc: atariace@hotmail.com Hi mamedev, I noticed an odd case in src2html.c where tabs were converted to spaces unnecessarily. Turns out srcclean does not track quoted strings, so an embedded comment in a string will be treated the same as a comment. Attached is a patch to fix this. ~aa P.S. The *.lay files could use a run through srcclean.
* Change tools I wrote to be straight BSD. Aaron Giles2009-10-311-4/+32
|
* Only applied the first patch. The second one I'll save for the next Aaron Giles2009-10-031-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | full release so we don't have a giant spacing diff. -- > -----Original Message----- > From: Atari Ace [mailto:atari_ace@verizon.net] > Sent: Thursday, October 01, 2009 8:13 AM > To: submit@mamedev.org > Cc: atariace@hotmail.com > Subject: [patch] srcclean perf, stye improvements > > Hi mamedev, > > srcclean.exe has a minor performance bug with it tab removing > algorithm, in that the cost of removing n tabs is O(n^2). The first > patch fixes this by always tracking the current column. The second > patch then implements a new clean idiom, that spaces before tabs that > are "invisible" should be removed. This change finds ~14k invisible > spaces in MAME, so I suspect there may be some hesitation to adopt it. > > ~aa
* Copyright cleanup: Aaron Giles2008-01-061-1/+1
| | | | | | - removed years from copyright notices - removed redundant (c) from copyright notices - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+182