]> mj.ucw.cz Git - paperjam.git/blobdiff - parse.cc
Implemented expand, margins
[paperjam.git] / parse.cc
index cc0a58235e1c35e119c5190eb9a1ebdd689ef549..5158eeb72fa3031295f7b752d34d319d15b2da31 100644 (file)
--- a/parse.cc
+++ b/parse.cc
@@ -218,7 +218,14 @@ static double parse_dimen(const arg_def *adef)
 
   t = next_token();
   if (t != TOK_IDENT)
-    parse_error("Parameter %s must have a unit", adef->name);
+    {
+      if (is_zero(tmp))
+       {
+         return_token();
+         return 0;
+       }
+      parse_error("Parameter %s must have a unit", adef->name);
+    }
   for (uint i=0; units[i].name; i++)
     if (token == units[i].name)
       return tmp * units[i].multiplier;