void CtdlPutUser(struct ctdluser *usbuf);
void CtdlPutUserLock(struct ctdluser *usbuf);
int CtdlGetUserByNumber(struct ctdluser *usbuf, long number);
-void CtdlGetRelationship(struct visit *vbuf,
+void CtdlGetRelationship(visit *vbuf,
struct ctdluser *rel_user,
struct ctdlroom *rel_room);
-void CtdlSetRelationship(struct visit *newvisit,
+void CtdlSetRelationship(visit *newvisit,
struct ctdluser *rel_user,
struct ctdlroom *rel_room);
void CtdlMailboxName(char *buf, size_t n, const struct ctdluser *who, const char *prefix);
void ical_CtdlCreateRoom(void)
{
struct ctdlroom qr;
- struct visit vbuf;
+ visit vbuf;
/* Create the calendar room if it doesn't already exist */
CtdlCreateRoom(USERCALENDARROOM, 4, "", 0, 1, 0, VIEW_CALENDAR);
*/
int PurgeVisits(void) {
struct cdbdata *cdbvisit;
- struct visit vbuf;
+ visit vbuf;
struct VPurgeList *VisitPurgeList = NULL;
struct VPurgeList *vptr;
int purged = 0;
/* Now traverse through the visits, purging irrelevant records... */
cdb_rewind(CDB_VISIT);
while(cdbvisit = cdb_next_item(CDB_VISIT), cdbvisit != NULL) {
- memset(&vbuf, 0, sizeof(struct visit));
+ memset(&vbuf, 0, sizeof(visit));
memcpy(&vbuf, cdbvisit->ptr,
- ( (cdbvisit->len > sizeof(struct visit)) ?
- sizeof(struct visit) : cdbvisit->len) );
+ ( (cdbvisit->len > sizeof(visit)) ?
+ sizeof(visit) : cdbvisit->len) );
cdb_free(cdbvisit);
RoomIsValid = 0;
int setting_user_value = 0;
char set_value[32];
int set_view = VIEW_BBS;
- struct visit vbuf;
+ visit vbuf;
if (num_parms != 6) {
cprintf("%s BAD usage error\r\n", Params[0].Key);
*/
void imap_set_seen_flags(int first_msg)
{
- struct visit vbuf;
+ visit vbuf;
int i;
int num_sets;
int s;
* Traverse the visits file...
*/
void migr_export_visits(void) {
- struct visit vbuf;
+ visit vbuf;
struct cdbdata *cdbv;
cdb_rewind(CDB_VISIT);
while (cdbv = cdb_next_item(CDB_VISIT), cdbv != NULL) {
- memset(&vbuf, 0, sizeof(struct visit));
+ memset(&vbuf, 0, sizeof(visit));
memcpy(&vbuf, cdbv->ptr,
- ((cdbv->len > sizeof(struct visit)) ?
- sizeof(struct visit) : cdbv->len));
+ ((cdbv->len > sizeof(visit)) ?
+ sizeof(visit) : cdbv->len));
cdb_free(cdbv);
client_write("<visit>\n", 8);
char FRname[ROOMNAMELEN];
struct floor flbuf;
int floornum = 0;
-struct visit vbuf;
+visit vbuf;
struct MetaData smi;
long import_msgnum = 0;
char *decoded_msg = NULL;
else if (!strcasecmp(el, "room")) memset(&qrbuf, 0, sizeof (struct ctdlroom));
else if (!strcasecmp(el, "room_messages")) memset(FRname, 0, sizeof FRname);
else if (!strcasecmp(el, "floor")) memset(&flbuf, 0, sizeof (struct floor));
- else if (!strcasecmp(el, "visit")) memset(&vbuf, 0, sizeof (struct visit));
+ else if (!strcasecmp(el, "visit")) memset(&vbuf, 0, sizeof (visit));
else if (!strcasecmp(el, "message")) {
memset(&smi, 0, sizeof (struct MetaData));
* of messages in the inbox, or -1 for error)
*/
int pop3_grab_mailbox(void) {
- struct visit vbuf;
+ visit vbuf;
int i;
if (CtdlGetRoom(&CC->room, MAILROOM) != 0) return(-1);
*/
void pop3_update(void) {
int i;
- struct visit vbuf;
+ visit vbuf;
long *deletemsgs = NULL;
int num_deletemsgs = 0;
void vcard_CtdlCreateRoom(void)
{
struct ctdlroom qr;
- struct visit vbuf;
+ visit vbuf;
/* Create the calendar room if it doesn't already exist */
CtdlCreateRoom(USERCONTACTSROOM, 4, "", 0, 1, 0, VIEW_ADDRESSBOOK);
* Retrieve the "seen" message list for the current room.
*/
void CtdlGetSeen(char *buf, int which_set) {
- struct visit vbuf;
+ visit vbuf;
/* Learn about the user and room in question */
CtdlGetRelationship(&vbuf, &CC->user, &CC->room);
int was_seen = 0;
long lo = (-1L);
long hi = (-1L);
- struct visit vbuf;
+ visit vbuf;
long *msglist;
int num_msgs = 0;
StrBuf *vset;
{
int a, i, j;
- struct visit vbuf;
+ visit vbuf;
struct cdbdata *cdbfr;
long *msglist = NULL;
int num_msgs = 0;
int *result, int *view)
{
int retval = 0;
- struct visit vbuf;
+ visit vbuf;
/* for internal programs, always do everything */
if (((CC->internal_pgm)) && (roombuf->QRflags & QR_INUSE)) {
int rmailflag;
int raideflag;
int newmailcount = 0;
- struct visit vbuf;
+ visit vbuf;
char truncated_roomname[ROOMNAMELEN];
struct cdbdata *cdbfr;
long *msglist = NULL;
struct ctdlroom qrbuf;
struct floor flbuf;
- struct visit vbuf;
+ visit vbuf;
CtdlLogPrintf(CTDL_DEBUG, "CtdlCreateRoom(name=%s, type=%d, view=%d)\n",
new_room_name, new_room_type, new_room_view);
/* Defines the relationship of a user to a particular room */
-struct visit {
+typedef struct __visit {
long v_roomnum;
long v_roomgen;
long v_usernum;
char v_seen[SIZ];
char v_answered[SIZ];
int v_view;
-};
+} visit;
#define V_FORGET 1 /* User has zapped this room */
#define V_LOCKOUT 2 /* User is locked out of this room */
/*
* Back end for CtdlSetRelationship()
*/
-void put_visit(struct visit *newvisit)
+void put_visit(visit *newvisit)
{
char IndexBuf[32];
int IndexLen = 0;
/* Store the record */
cdb_store(CDB_VISIT, IndexBuf, IndexLen,
- newvisit, sizeof(struct visit)
+ newvisit, sizeof(visit)
);
}
/*
* Define a relationship between a user and a room
*/
-void CtdlSetRelationship(struct visit *newvisit,
+void CtdlSetRelationship(visit *newvisit,
struct ctdluser *rel_user,
struct ctdlroom *rel_room)
{
/*
* Locate a relationship between a user and a room
*/
-void CtdlGetRelationship(struct visit *vbuf,
+void CtdlGetRelationship(visit *vbuf,
struct ctdluser *rel_user,
struct ctdlroom *rel_room)
{
rel_user->usernum);
/* Clear out the buffer */
- memset(vbuf, 0, sizeof(struct visit));
+ memset(vbuf, 0, sizeof(visit));
cdbvisit = cdb_fetch(CDB_VISIT, IndexBuf, IndexLen);
if (cdbvisit != NULL) {
memcpy(vbuf, cdbvisit->ptr,
- ((cdbvisit->len > sizeof(struct visit)) ?
- sizeof(struct visit) : cdbvisit->len));
+ ((cdbvisit->len > sizeof(visit)) ?
+ sizeof(visit) : cdbvisit->len));
cdb_free(cdbvisit);
}
else {
void cmd_slrp(char *new_ptr)
{
long newlr;
- struct visit vbuf;
- struct visit original_vbuf;
+ visit vbuf;
+ visit original_vbuf;
if (CtdlAccessCheck(ac_logged_in)) {
return;
CtdlGetUserLock(&CC->user, CC->curr_user);
CtdlGetRelationship(&vbuf, &CC->user, &CC->room);
- memcpy(&original_vbuf, &vbuf, sizeof(struct visit));
+ memcpy(&original_vbuf, &vbuf, sizeof(visit));
vbuf.v_lastseen = newlr;
snprintf(vbuf.v_seen, sizeof vbuf.v_seen, "*:%ld", newlr);
*/
int CtdlInvtKick(char *iuser, int op) {
struct ctdluser USscratch;
- struct visit vbuf;
+ visit vbuf;
char bbb[SIZ];
if (CtdlGetUser(&USscratch, iuser) != 0) {
* Returns 0 on success
*/
int CtdlForgetThisRoom(void) {
- struct visit vbuf;
+ visit vbuf;
/* On some systems, Aides are not allowed to forget rooms */
if (is_aide() && (config.c_aide_zap == 0)
int a;
char mailboxname[ROOMNAMELEN];
struct ctdlroom mailbox;
- struct visit vbuf;
+ visit vbuf;
struct cdbdata *cdbfr;
long *msglist = NULL;
int num_msgs = 0;
*/
void cmd_view(char *cmdbuf) {
int requested_view;
- struct visit vbuf;
+ visit vbuf;
if (CtdlAccessCheck(ac_logged_in)) {
return;
void ListThisUser(struct ctdluser *usbuf, void *data);
int NewMailCount(void);
int InitialMailCheck(void);
-void put_visit(struct visit *newvisit);
+void put_visit(visit *newvisit);
/* MailboxName is deprecated us CtdlMailboxName instead */
void MailboxName(char *buf, size_t n, const struct ctdluser *who,
const char *prefix) __attribute__ ((deprecated));