diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /vendor/x11iraf/obm/ObmW/done.h | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'vendor/x11iraf/obm/ObmW/done.h')
-rw-r--r-- | vendor/x11iraf/obm/ObmW/done.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/x11iraf/obm/ObmW/done.h b/vendor/x11iraf/obm/ObmW/done.h new file mode 100644 index 00000000..d57c683a --- /dev/null +++ b/vendor/x11iraf/obm/ObmW/done.h @@ -0,0 +1,16 @@ +#define done(type, value) \ + do {\ + if (to->addr != NULL) {\ + if (to->size < sizeof(type)) {\ + to->size = sizeof(type);\ + return False;\ + }\ + *(type*)(to->addr) = (value);\ + } else {\ + static type static_val;\ + static_val = (value);\ + to->addr = (XtPointer)&static_val;\ + }\ + to->size = sizeof(type);\ + return True;\ + } while (0) |