diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2010-12-16 00:11:21 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2010-12-16 00:11:21 +0000 |
commit | 66249f4ec219c140208e6c9415116a8c58476e28 (patch) | |
tree | b68d0c0dad71c40a140221aa57822a3cc23f9847 /generic/pg-pgip.el | |
parent | 813d75c12f0624895ad9df8701ed72be1fca616b (diff) |
Patch to add pgipfloat type.
Diffstat (limited to 'generic/pg-pgip.el')
-rw-r--r-- | generic/pg-pgip.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/pg-pgip.el b/generic/pg-pgip.el index 6c736fae..16a0a6bd 100644 --- a/generic/pg-pgip.el +++ b/generic/pg-pgip.el @@ -466,6 +466,7 @@ Also sets local proverid and srcid variables for buffer." (cond ((eq tyname 'pgipbool) 'boolean) ((eq tyname 'pgipint) 'integer) ;; TODO: implement range limits + ((eq tyname 'pgipfloat) 'float) ;; TODO: implement range limits ((eq tyname 'pgipstring) 'string) ((eq tyname 'pgipconst) (let ((name (pg-pgip-get-name node 'optional)) @@ -498,6 +499,7 @@ Also sets local proverid and srcid variables for buffer." (cond ((eq type 'boolean) "%b") ((eq type 'integer) "%i") + ((eq type 'float) "%f") (t "%s"))) @@ -515,8 +517,9 @@ Also sets local proverid and srcid variables for buffer." (t (progn (pg-pgip-warning "pg-pgip-interpret-value: received non-bool value %s" value) nil)))) - ((eq type 'integer) (string-to-number value)) - ((eq type 'string) value) + ((eq type 'integer) (string-to-number value)) + ((eq type 'float) (string-to-number value)) + ((eq type 'string) value) ((eq (car-safe type) 'const) value) ((eq (car-safe type) 'choice) (pg-pgip-interpret-choice (cdr type) value)) |