[Olsr-cvs] olsrd-current/src plugin_util.h, 1.2, 1.3 plugin_util.c, 1.4, 1.5

Bernd Petrovitsch (spam-protected)
Mon Sep 17 00:14:10 CEST 2007


Update of /cvsroot/olsrd/olsrd-current/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv609/src

Modified Files:
	plugin_util.h plugin_util.c 
Log Message:
* name set_boolean() similar to the other functions

Index: plugin_util.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/plugin_util.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** plugin_util.c	2 Sep 2007 21:04:42 -0000	1.4
--- plugin_util.c	16 Sep 2007 22:14:08 -0000	1.5
***************
*** 87,96 ****
  
  
! int set_boolean(const char *value, void *data, unsigned int addon __attribute__((unused)))
  {
      int *v = data;
!     if (strcasecmp (value, "yes") == 0) {
          *v = 1;
!     } else if (strcasecmp (value, "no") == 0) {
          *v = 0;
      } else {
--- 87,96 ----
  
  
! int set_plugin_boolean(const char *value, void *data, unsigned int addon __attribute__((unused)))
  {
      int *v = data;
!     if (strcasecmp (value, "yes") == 0 || strcasecmp (value, "true") == 0) {
          *v = 1;
!     } else if (strcasecmp (value, "no") == 0 || strcasecmp (value, "false") == 0) {
          *v = 0;
      } else {

Index: plugin_util.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/plugin_util.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** plugin_util.h	25 Aug 2007 19:48:42 -0000	1.2
--- plugin_util.h	16 Sep 2007 22:14:08 -0000	1.3
***************
*** 39,48 ****
  #define _OLSRD_PLUGIN_UTIL
  
  /* Common/utility functions for plugins */
! int set_plugin_port(const char *value, void *data, unsigned int);
! int set_plugin_ipaddress(const char *value, void *data, unsigned int);
! int set_boolean(const char *value, void *data, unsigned int);
! int set_plugin_int(const char *value, void *data, unsigned int);
! int set_plugin_string(const char *value, void *data, unsigned int);
  
  
--- 39,50 ----
  #define _OLSRD_PLUGIN_UTIL
  
+ #include "olsrd_plugin.h"
+ 
  /* Common/utility functions for plugins */
! set_plugin_parameter set_plugin_port;
! set_plugin_parameter set_plugin_ipaddress;
! set_plugin_parameter set_plugin_boolean;
! set_plugin_parameter set_plugin_int;
! set_plugin_parameter set_plugin_string;
  
  





More information about the Olsr-cvs mailing list