Subj : src/smblib/smbdefs.h smblib.c smblib.h To : Git commit to sbbs/master From : Rob Swindell Date : Sat Sep 26 2020 01:38 pm https://gitlab.synchro.net/sbbs/sbbs/-/commit/a3e430e09c2f2ba36464173c Modified Files: src/smblib/smbdefs.h smblib.c smblib.h Log Message: Add smb_msg_type() and smb_msg_count() for index-based msg counting. In support of message bases with vote-messages and poll-closures: smb_msg_type() returns an enum smb_msg_type inferred from the combination of attribute flags specified (should match msghdr_t.type). smb_msg_count() calculates the number of message index records of the specified type(s) (a bit-field) by reading the message base index file. This value should only used for info/display purposes, so no locking is performed to return the result as fast as possible. This allows an accurate number of "posts" (posted *messages*) to be queried and displayed to a user when appropriate (e.g. instead of smb.status.total_msgs or just the size of the index file divided by the size of an index record). In that case, since vote messages and poll closures aren't displayed as messages to users, exclude those from the count to reduce confusion. For message bases that don't support voting, this scheme is not necessary. .