aboutsummaryrefslogtreecommitdiffstats
path: root/src/wavegen.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-02 00:26:38 +0000
committerDavid Robillard <d@drobilla.net>2012-08-02 00:26:38 +0000
commit29fc0c801e72a115639eabbd7373b993a25f4e79 (patch)
tree0e0af293447f2bb71fa2d00e0185d9da0eadda05 /src/wavegen.c
parent3ddfa2d12e95d927f9ccdce1df93b93922bfa221 (diff)
downloadblop.lv2-29fc0c801e72a115639eabbd7373b993a25f4e79.tar.gz
blop.lv2-29fc0c801e72a115639eabbd7373b993a25f4e79.tar.bz2
blop.lv2-29fc0c801e72a115639eabbd7373b993a25f4e79.zip
Fix compilation in MinGW.
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blop.lv2@4588 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/wavegen.c')
-rw-r--r--src/wavegen.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/wavegen.c b/src/wavegen.c
index 53c5db1..c722e04 100644
--- a/src/wavegen.c
+++ b/src/wavegen.c
@@ -17,13 +17,10 @@
along with this software. If not, see <http://www.gnu.org/licenses/>.
*/
-#define _POSIX_C_SOURCE 200809L // strdup
-
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
-#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
#include "wdatutil.h"
#include "wavedata.h"
#include "common.h"
@@ -99,9 +96,9 @@ main(int argc,
long first_note = -1;
long note_step = -1;
long min_table_size = -1;
- char* filename = NULL;
+ const char* filename = NULL;
FILE* file;
- char* prefix = NULL;
+ const char* prefix = NULL;
float gibbs = 0.0f;
int quiet = 0;
int test = 0;
@@ -154,10 +151,10 @@ main(int argc,
min_table_size = (long)atoi(optarg);
break;
case 'o':
- filename = strdup(optarg);
+ filename = optarg;
break;
case 'p':
- prefix = strdup(optarg);
+ prefix = optarg;
break;
case 'g':
gibbs = atof(optarg);
@@ -307,14 +304,6 @@ main(int argc,
}
}
- if (filename) {
- free(filename);
- }
-
- if (prefix) {
- free(prefix);
- }
-
wavedata_cleanup(w);
return 0;