X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/5568c760e5a2062815fc4b71735bc33383db88da..refs/heads/mdw/progfmt:/src/builtin.lisp diff --git a/src/builtin.lisp b/src/builtin.lisp index 08ad5f0..6310741 100644 --- a/src/builtin.lisp +++ b/src/builtin.lisp @@ -278,6 +278,16 @@ static const SodClass *const ~A__cpl[] = { list)) (definst suppliedp-struct (stream) (flags var) + "Declare a `suppliedp' structure VAR containing a bit for each named FLAG. + + The output looks like this: + + struct { + unsigned FLAG: 1; + /* ... */ + } VAR; + + Note that this will not be valid C unless there is at least one flag." (format stream "~@" flags var)) @@ -434,7 +444,8 @@ static const SodClass *const ~A__cpl[] = { (dolist (initarg (reverse (remove-duplicates initargs :key #'sod-initarg-name - :test #'string=))) + :test #'string= + :from-end t))) (let ((arg-name (sod-initarg-name initarg))) (setf initinst (make-if-inst (format nil "suppliedp.~A" arg-name)