aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/main.cpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-02-06 12:30:27 +0100
committerjaseg <git@jaseg.de>2021-02-06 12:30:27 +0100
commit18d857668edc5d1900cfb62081d45de8b4d8c897 (patch)
treef3b53748dea6a33bdd32e214cd9e77a39b8d53d8 /svg-flatten/src/main.cpp
parent1e9d0c62f99025e0985b272fe6f7749f265f0cc4 (diff)
downloadgerbolyze-18d857668edc5d1900cfb62081d45de8b4d8c897.tar.gz
gerbolyze-18d857668edc5d1900cfb62081d45de8b4d8c897.tar.bz2
gerbolyze-18d857668edc5d1900cfb62081d45de8b4d8c897.zip
Small fixes, find svg-flatten in user pip install
Diffstat (limited to 'svg-flatten/src/main.cpp')
-rw-r--r--svg-flatten/src/main.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/svg-flatten/src/main.cpp b/svg-flatten/src/main.cpp
index 2b996f3..d96785b 100644
--- a/svg-flatten/src/main.cpp
+++ b/svg-flatten/src/main.cpp
@@ -352,16 +352,22 @@ int main(int argc, char **argv) {
int usvg_rc=-1;
for (int i=0; i<3; i++) {
const char *usvg_envvar;
- if (i == 0) {
+ switch (i) {
+ case 0:
if ((usvg_envvar = getenv("USVG")) == NULL) {
continue;
} else {
command_line[0] = "usvg";
}
- } else if (i == 1) {
+ break;
+
+ case 1:
command_line[0] = "usvg";
- } else {
+ break;
+
+ case 2:
command_line[0] = loc_in_home.c_str();
+ break;
}
struct subprocess_s subprocess;