thermferm/rdconfig.c

changeset 72
f7cb53c50ee1
parent 71
a09c5cdc4022
child 75
4b976601737d
--- a/thermferm/rdconfig.c	Mon Jun 23 22:16:29 2014 +0200
+++ b/thermferm/rdconfig.c	Mon Jun 23 22:41:09 2014 +0200
@@ -35,7 +35,6 @@
 static int getw1(char **);
 #ifdef HAVE_WIRINGPI_H
 static int getint(char **);
-static int getrcs(char **);
 #endif
 static int getuch(char **);
 static int getfloat(char **);
@@ -53,8 +52,6 @@
 #ifdef HAVE_WIRINGPI_H
     {(char *)"lcd_cols",		getint,		(char **)&Config.lcd_cols},
     {(char *)"lcd_rows",		getint,		(char **)&Config.lcd_rows},
-    {(char *)"tx433",			getint,		(char **)&Config.tx433},
-    {(char *)"rcswitch",		getrcs,		(char **)&Config.rcswitch},
 #endif
     {(char *)"cs_mode",			getuch,		(char **)&Config.cs_mode},
     {(char *)"cs_beerSet",		getfloat,	(char **)&Config.cs_beerSet},
@@ -74,9 +71,6 @@
 void killconfig(void)
 {
     w1_therm	*tmp1, *old1;
-#ifdef HAVE_WIRINGPI_H
-    rc_switch	*tmp2, *old2;
-#endif
 
     if (Config.name)
 	free(Config.name);
@@ -98,19 +92,6 @@
 #ifdef HAVE_WIRINGPI_H
     Config.lcd_cols = 16;
     Config.lcd_rows = 2;
-    Config.tx433 = -1;
-
-    for (tmp2 = Config.rcswitch; tmp2; tmp2 = old2) {
-	old2 = tmp2->next;
-	if (tmp2->address)
-	    free(tmp2->address);
-	tmp2->address = NULL;
-	if (tmp2->alias)
-	    free(tmp2->alias);
-	tmp2->alias = NULL;
-	free(tmp2);
-    }
-    Config.rcswitch = NULL;
 #endif
 
     defaultControlSettings();
@@ -388,48 +369,6 @@
 
 
 
-#ifdef HAVE_WIRINGPI_H
-static int getrcs(char **dest)
-{
-    char        *p, *q = NULL, *r = NULL;
-    rc_switch   **tmpm;
-
-    for (p = v; *p && !isspace(*p); p++);
-	if (*p)
-	    *p++ = '\0';
-    while (*p && isspace(*p))
-	p++;
-    if (*p == '\0') {
-	syslog(LOG_NOTICE, "rdconfig: %s(%d): less then two tokens", mypath, linecnt);
-	return 1;
-    }
-
-    for (q = p; *q && !isspace(*q); q++);
-    if (*q && isspace(*q)) {
-	if (*q)
-	    *q++ = '\0';
-	while (*q && isspace(*q))
-	    q++;
-
-	for (r = q; *r && !isspace(*r); r++);
-	if (*r)
-	    *r++ = '\0';
-	if (debug)
-	    syslog(LOG_NOTICE, "rdconfig: getrcs: %s(%d): %s %s", mypath, linecnt, v, p);
-    }
-
-    for (tmpm = (rc_switch**)dest; *tmpm; tmpm=&((*tmpm)->next));
-    (*tmpm) = (rc_switch *) xmalloc(sizeof(rc_switch));
-    (*tmpm)->next = NULL;
-    (*tmpm)->address = xstrcpy(v);
-    (*tmpm)->alias = xstrcpy(p);
-
-    return 0;
-}
-#endif
-
-
-
 static int getuch(char **dest)
 {
     if (debug)

mercurial