Print helpful error message if --strip-prefix option is used.
authorSaikiran Madugula <hummerbliss@gmail.com>
Tue, 7 Sep 2010 19:48:01 +0000 (20:48 +0100)
committerColin Walters <walters@verbum.org>
Thu, 9 Sep 2010 13:21:27 +0000 (09:21 -0400)
giscanner/scannermain.py

index 0333dee456d093a3335460d9acf3016791b2bcb4..126ce9902405b1a772bdefdaaf4674c7a4501979 100644 (file)
@@ -89,6 +89,10 @@ def _get_option_parser():
     parser.add_option("", "--nsversion",
                       action="store", dest="namespace_version",
                       help="version of namespace for this unit")
+    parser.add_option("", "--strip-prefix",
+                     action="store", dest="strip_prefix",
+                     help="""Option --strip-prefix is deprecated, please see --identifier-prefix
+and --symbol-prefix.""")
     parser.add_option("", "--identifier-prefix",
                       action="append", dest="identifier_prefixes", default=[],
                       help="""Remove this prefix from C identifiers (structure typedefs, etc.).
@@ -241,6 +245,9 @@ def scanner_main(args):
         _error("Must specify --program or --library")
     libraries = options.libraries
 
+    if options.strip_prefix:
+       _error("Option --strip-prefix is deprecated, please see --identifier-prefix and --symbol-prefix.")
+
     filenames = []
     for arg in args:
         # We don't support real C++ parsing yet, but we should be able