FreeCalypso > hg > ueda-linux
comparison pads2gpcb/silkselect.c @ 62:9d7e2937883d
pads2gpcb: select specific drawing levels for silk with -s
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Sun, 31 Jan 2016 05:30:33 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
61:ff1d565d233c | 62:9d7e2937883d |
---|---|
1 #include <stdio.h> | |
2 #include <stdlib.h> | |
3 | |
4 #define MAX_LEVEL_SELECT 8 | |
5 | |
6 static int select_array[MAX_LEVEL_SELECT]; | |
7 static int num_select; | |
8 | |
9 select_drawlevel_for_silk(level) | |
10 { | |
11 if (num_select >= MAX_LEVEL_SELECT) { | |
12 fprintf(stderr, "Error: MAX_LEVEL_SELECT exceeded\n"); | |
13 exit(1); | |
14 } | |
15 select_array[num_select++] = level; | |
16 return(0); | |
17 } | |
18 | |
19 is_drawlevel_selected(level) | |
20 { | |
21 int i; | |
22 | |
23 for (i = 0; i < num_select; i++) | |
24 if (select_array[i] == level) | |
25 return(1); | |
26 return(0); | |
27 } |