From: K.Kosako Date: Tue, 27 Aug 2019 06:16:54 +0000 (+0900) Subject: add MEM_STATUS_IS_ALL_ON() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=adbe41f923b74a73aee103c94bd74b3098b85c0e;p=onig add MEM_STATUS_IS_ALL_ON() --- diff --git a/src/regint.h b/src/regint.h index d775e49..a8e1fa1 100644 --- a/src/regint.h +++ b/src/regint.h @@ -290,6 +290,8 @@ typedef unsigned int MemStatusType; #define MEM_STATUS_AT0(stats,n) \ ((n) > 0 && (n) < (int )MEM_STATUS_BITS_NUM ? ((stats) & ((MemStatusType )1 << n)) : ((stats) & 1)) +#define MEM_STATUS_IS_ALL_ON(stats) (((stats) & 1) != 0) + #define MEM_STATUS_ON(stats,n) do {\ if ((n) < (int )MEM_STATUS_BITS_NUM) {\ if ((n) != 0)\