1
0
mirror of git://projects.qi-hardware.com/ben-scans.git synced 2025-04-21 12:27:27 +03:00

Use the project name to disambiguate names in POV-Ray output.

- solidify/main.pov: change name from "Part" to "Part_batcvr"
- solidify/solid.h (povray), solidify/solid.c (sanitize, povray): use the
  project name as prefix for PGM files and a suffix for the object name
- solidify/solidify.c (main): pass the project's basename to povray()
This commit is contained in:
Werner Almesberger
2010-09-24 21:28:42 -03:00
parent f6ed3bf762
commit 01d8e411f3
4 changed files with 39 additions and 11 deletions

View File

@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <locale.h>
#include <gtk/gtk.h>
@@ -148,8 +149,15 @@ int main(int argc, char **argv)
save_project(prj);
if (!isatty(1))
povray(&prj->s);
if (!isatty(1)) {
const char *slash = strrchr(prj->name, '/');
char tmp[1000]; /* @@@ enough */
strcpy(tmp, slash ? slash+1 : prj->name);
if (strchr(tmp, '.'))
*strchr(tmp, '.') = 0;
povray(tmp, &prj->s);
}
return 0;
}