From b8502fa7c4ffd6f220f6d02ae514758ba136553d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 31 Dec 2010 17:38:29 +0000 Subject: [PATCH] Accept file names with dashes in PNG-to-C converter. Tango icon files often have dashes in their names so accept them in png2c conversion script and simply replace them with underscores to form a C identifier for the array containing the image data. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- misc/scripts/png2c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/scripts/png2c.py b/misc/scripts/png2c.py index f028201771..29d7252bad 100755 --- a/misc/scripts/png2c.py +++ b/misc/scripts/png2c.py @@ -23,7 +23,7 @@ if len(sys.argv) < 2: r = re.compile("^([a-zA-Z._][a-zA-Z._0-9]*)[.][pP][nN][gG]$") for path in sys.argv[1:]: - filename = os.path.basename(path) + filename = os.path.basename(path).replace('-','_') m = r.match(filename) # Allow only filenames that make sense # as C variable names -- 2.50.0