Skip to content

Commit

Permalink
Windows: refactor const int into a macro
Browse files Browse the repository at this point in the history
Conts aren't constant on Windows - MSVC doesn't support C99.
  • Loading branch information
dtip committed Jan 10, 2019
1 parent fa88310 commit 8cb56e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/contour.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
#include "magics_api.h"
#include <stdio.h>

#define NUM_FORMATS 3

int main()
{
mag_open();
const int num_formats = 3;
const char *formats[num_formats];
const char *formats[NUM_FORMATS];
formats[0] = "ps";
formats[1] = "png";
formats[2] = "pdf";
mag_set1c("output_formats",formats,num_formats);
mag_set1c("output_formats",formats,NUM_FORMATS);
mag_setc("output_name","contour"); // which is different each time

/* load the data */
Expand Down

0 comments on commit 8cb56e6

Please sign in to comment.