License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
-
+#include "config.h"
#include <ctype.h>
#include "lc_opts_t.h"
int res = 0;
- switch(type) {
+ switch (type) {
case lc_opt_type_int:
case lc_opt_type_double:
case lc_opt_type_string:
char buf[10];
strncpy(buf, str, sizeof(buf));
- for(i = 0, n = strlen(buf); i < n; ++i)
+ for (i = 0, n = strlen(buf); i < n; ++i)
buf[i] = tolower(buf[i]);
- for(i = 0; i < LC_ARRSIZE(bool_vals); ++i) {
- if(strcmp(buf, bool_vals[i].str) == 0) {
+ for (i = 0; i < LC_ARRSIZE(bool_vals); ++i) {
+ if (strcmp(buf, bool_vals[i].str) == 0) {
res = 1;
*data = bool_vals[i].val;
break;
{
int res = 0;
- switch(type) {
+ switch (type) {
case lc_opt_type_int:
{
int i = *((int *) data);