diff pads2gpcb/decals.c @ 49:b3b7013d9228

pads2gpcb.c/decals.c: allow underscores in written decal file names
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sat, 30 Jan 2016 17:38:47 +0000
parents c977d637f038
children 727d4e56d5c8
line wrap: on
line diff
--- a/pads2gpcb/decals.c	Sat Jan 30 17:31:20 2016 +0000
+++ b/pads2gpcb/decals.c	Sat Jan 30 17:38:47 2016 +0000
@@ -270,7 +270,7 @@
 	dp = filename + 7;
 	for (cp = current_decal->name; *cp; ) {
 		c = *cp++;
-		if (isalnum(c) || c == '-' || c == '.')
+		if (isalnum(c) || c == '-' || c == '.' || c == '_')
 			*dp++ = c;
 		else {
 			sprintf(dp, "%%%02X", c);
@@ -285,6 +285,7 @@
 	}
 	write_gpcb_element(outf, current_decal->body, 0, "", "", "", 0);
 	fclose(outf);
+	printf("Written to %s\n", filename);
 	free(filename);
 }