29:ac763b87ee25 | 30:9c7119ac0455 |
---|---|
33 | 33 |
34 | 34 |
35 static int getstr(char **); | 35 static int getstr(char **); |
36 static int getint(char **); | 36 static int getint(char **); |
37 static int getw1(char **); | 37 static int getw1(char **); |
38 #ifdef HAVE_WIRINGPI_H | |
38 static int getrcs(char **); | 39 static int getrcs(char **); |
40 #endif | |
39 //static int getbyt(char **); | 41 //static int getbyt(char **); |
40 //static int gethex(char **); | 42 //static int gethex(char **); |
41 | 43 |
42 #define XSTR(x) #x | 44 #define XSTR(x) #x |
43 #define STR(x) XSTR(x) | 45 #define STR(x) XSTR(x) |
62 | 64 |
63 | 65 |
64 void killconfig(void) | 66 void killconfig(void) |
65 { | 67 { |
66 w1_therm *tmp1, *old1; | 68 w1_therm *tmp1, *old1; |
69 #ifdef HAVE_WIRINGPI_H | |
67 rc_switch *tmp2, *old2; | 70 rc_switch *tmp2, *old2; |
71 #endif | |
68 | 72 |
69 if (Config.name) | 73 if (Config.name) |
70 free(Config.name); | 74 free(Config.name); |
71 Config.name = NULL; | 75 Config.name = NULL; |
72 | 76 |
269 return 0; | 273 return 0; |
270 } | 274 } |
271 | 275 |
272 | 276 |
273 | 277 |
278 #ifdef HAVE_WIRINGPI_H | |
274 static int getrcs(char **dest) | 279 static int getrcs(char **dest) |
275 { | 280 { |
276 char *p, *q = NULL, *r = NULL; | 281 char *p, *q = NULL, *r = NULL; |
277 rc_switch **tmpm; | 282 rc_switch **tmpm; |
278 | 283 |
306 (*tmpm)->address = xstrcpy(v); | 311 (*tmpm)->address = xstrcpy(v); |
307 (*tmpm)->alias = xstrcpy(p); | 312 (*tmpm)->alias = xstrcpy(p); |
308 | 313 |
309 return 0; | 314 return 0; |
310 } | 315 } |
311 | 316 #endif |
312 | 317 |
313 | 318 |
314 /* | 319 /* |
315 static int getbyt(char **dest) | 320 static int getbyt(char **dest) |
316 { | 321 { |