bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

User types specified as prefixes


From: Thomas W. Barr
Subject: User types specified as prefixes
Date: Mon, 08 Oct 2012 15:53:52 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0

I've inherited a large code base that I've been using indent to help clean up. It has a massive number of typedef'd types, though they all have a common prefix. I've patched the most recent version of indent to support a new command-line argument (--types-are-prefixes) that specifies that all user supplied types (passed with -T) are prefixes. It works wonderfully for my application.

If the developers would be interesting in accepting such a feature for future releases of GNU indent, I see three possible options. I will, of course, prepare a code and documentation patch for review and merging:

1) Accept the feature as is. It's only about a three line patch (except for handling the additional option).

2) Use fnmatch to support globbing in token names.

3) Support regex's for token names, using GNU libc's regex implementation. I'm not sure if this feature is present in all versions and architectures of GNU libc, so this may not be desirable.

Please let me know if you're interested,
-Thomas W. Barr
Rice University




reply via email to

[Prev in Thread] Current Thread [Next in Thread]