RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-data
Last change
on this file since a72ed95 was
c1a9449,
checked in by Olly Betts <olly@…>, 9 years ago
|
- .gitignore,buildmacosx.sh,configure.ac,src/Makefile.am,
src/editwrap_osx.c: Add compiled C wrapper for svxedit on OS X as
OS X won't run the Tcl script for some reason.
|
-
Property mode set to
100755
|
File size:
1.3 KB
|
Line | |
---|
1 | /* editwrap_osx.c |
---|
2 | * Run wish on a script with "_wrap" suffix removed from the name |
---|
3 | * Copyright (C) 2015 Olly Betts |
---|
4 | * |
---|
5 | * This program is free software; you can redistribute it and/or modify |
---|
6 | * it under the terms of the GNU General Public License as published by |
---|
7 | * the Free Software Foundation; either version 2 of the License, or |
---|
8 | * (at your option) any later version. |
---|
9 | * |
---|
10 | * This program is distributed in the hope that it will be useful, |
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | * GNU General Public License for more details. |
---|
14 | * |
---|
15 | * You should have received a copy of the GNU General Public License |
---|
16 | * along with this program; if not, write to the Free Software |
---|
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
18 | */ |
---|
19 | |
---|
20 | #ifdef HAVE_CONFIG_H |
---|
21 | #include <config.h> |
---|
22 | #endif |
---|
23 | |
---|
24 | #include <string.h> |
---|
25 | #include <sysexits.h> |
---|
26 | #include <unistd.h> |
---|
27 | |
---|
28 | #include <stdio.h> |
---|
29 | |
---|
30 | int |
---|
31 | main(int argc, char ** argv) |
---|
32 | { |
---|
33 | char * script = strdup(argv[0]); |
---|
34 | size_t len = strlen(script); |
---|
35 | if (!script) return EX_OSERR; |
---|
36 | if (argc > 1 || len <= 5 || strcmp(script + (len - 5), "_wrap") != 0) |
---|
37 | return EX_USAGE; |
---|
38 | script[len - 5] = '\0'; |
---|
39 | execlp("/usr/bin/wish", "svxedit", script, (char*)0); |
---|
40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.