use stdlib atof() instead of gnu99 strtof() + more sense making example binds for...
authorDieter Plaetinck <dieter@plaetinck.be>
Sat, 6 Jun 2009 18:09:12 +0000 (20:09 +0200)
committerDieter Plaetinck <dieter@plaetinck.be>
Sat, 6 Jun 2009 18:09:12 +0000 (20:09 +0200)
examples/configs/sampleconfig
examples/configs/sampleconfig-dev
uzbl.c

index 9bb0025..e853836 100644 (file)
@@ -69,7 +69,8 @@ bind    r         = reload
 bind    R         = reload_ign_cache
 bind    +         = zoom_in
 bind    -         = zoom_out
-bind    0         = sh "echo set zoom_level = 1.0 > $4"
+bind    1         = sh "echo set zoom_level = 1.0 > $4"
+bind    2         = sh "echo set zoom_level = 2.0 > $4"
 bind    t         = toggle_status
 # Hilight matches. Notice the * after the slash - it makes the command incremental, i.e. gets called
 # on every character you type.  You can do `bind /_ = search %s' if you want it less interactive.
index c8eddd0..ad6de24 100644 (file)
@@ -104,7 +104,8 @@ bind    r         = reload
 bind    R         = reload_ign_cache
 bind    +         = zoom_in
 bind    -         = zoom_out
-bind    0         = sh "echo set zoom_level = 1.0 > $4"
+bind    1         = sh "echo set zoom_level = 1.0 > $4"
+bind    2         = sh "echo set zoom_level = 2.0 > $4"
 bind    t         = toggle_status
 # Hilight matches. Notice the * after the slash - it makes the command incremental, i.e. gets called
 # on every character you type.  You can do `bind /_ = search %s' if you want it less interactive.
diff --git a/uzbl.c b/uzbl.c
index 4c37f08..1564192 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -1558,7 +1558,7 @@ set_var_value(gchar *name, gchar *val) {
         } else if (c->type == TYPE_FLOAT) {
             float *fp = (float *)c->ptr;
             buf = expand_vars(val);
-            *fp = strtof(buf, &endp);
+            *fp = atof(buf);
             g_free(buf);
         }