Ejemplo n.º 1
0
void EventShow()
{
    void ExamineEvent(), ShowTW();
int i;

    mPrintf("\nCurAbs=%ld\n ", CurAbsolute());
    mPrintf("ANYTIME NET is %d\n ", ClassActive[CL_ANYTIME_NET]);
    mPrintf("non-preempt nextabs is %ld, %ld seconds away\n ",
	Types[2].NextAbs, Types[2].NextAbs - CurAbsolute());
    mPrintf("Preemptive list (%ld):\n ", Types[0].NextAbs);
    RunList(&Types[0].List, ExamineEvent);
    modIn();
    mPrintf("Non-Preemptive list (%ld):\n ", Types[1].NextAbs);
    RunList(&Types[1].List, ExamineEvent);
    modIn();
    mPrintf("Quiet list (%ld):\n ", Types[2].NextAbs);
    RunList(&Types[2].List, ExamineEvent);
    modIn();
    mPrintf("Event ending list:\n ");
    RunList(&EventEnds, ShowTW);
    mPrintf("Anytime net is %s\n ", (ClassActive[CL_ANYTIME_NET]) ? "On" : "Off");
    if (ClassActive[CL_ANYTIME_NET]) {
	msgBuf.mbtext[0] = 0;
	for (i = 0; i < 32; i++)
	    if ((1l << i) & AnyTimeNets)
		sprintf(lbyte(msgBuf.mbtext), "%d, ", i + 1);
	if (strlen(msgBuf.mbtext))
	    msgBuf.mbtext[strLen(msgBuf.mbtext) - 2] = 0;

	mPrintf("Anytime nets: %s\n ", msgBuf.mbtext);
    }
}
Ejemplo n.º 2
0
/*
 * ActiveEvents()
 *
 * This puts together something vaguely resembling a useful list of currently
 * active events.
 */
void ActiveEvents(char *buf)
{
    int i;
void ShowRed();

    sprintf(lbyte(buf), "\n   Active Events:\n ");
    if (Dl_Limit_On())
	sprintf(lbyte(buf), "D-L time limit of %ld minutes.\n ", Dl_Limit);

    if (Door_Limit_On())
	sprintf(lbyte(buf), "Door time limit of %ld minutes.\n ", Door_Limit);

    if (GetFirst(&Redirected) != NULL)
	sprintf(lbyte(buf), "%d Redirect Files active.\n ",
						RunList(&Redirected, NoFree));

    if (GetFirst(&AutoDoors) != NULL)
	sprintf(lbyte(buf), "%d Auto Doors active.\n ",
						RunList(&AutoDoors, NoFree));

    if (NewUserAllowed())
	sprintf(lbyte(buf), "New Users Allowed event active.\n ");

    if (NewUserDisAllowed())
	sprintf(lbyte(buf), "New Users Disallowed event active.\n ");

    if (ClassActive[CL_ANYTIME_NET]) {
	sprintf(lbyte(buf), "Anytime net (deadtime=%d) active for net(s) ", DeadTime);
	for (i = 0; i < 32; i++)
	    if ((1l << i) & AnyTimeNets)
		sprintf(lbyte(buf), "%d, ", i + 1);
	buf[strLen(buf) - 2] = 0;
	strcat(buf, ".\n ");
    }
}
Ejemplo n.º 3
0
/*
 * UpdateSharedRooms()
 *
 * This function updates the disk version of the shared rooms with dirty records
 * in the RAM list.
 */
void UpdateSharedRooms()
{
    char flag;
    SYS_FILE shared;
    void UpdateSR(), FindDirty();

    flag = FALSE;
    RunListA(&SharedRooms, FindDirty, &flag);
    if (flag) {
	makeSysName(shared, "shared.sys", &cfg.netArea);
	if ((sharedfd = fopen(shared, R_W_ANY)) == NULL) {
	    if ((sharedfd = fopen(shared, WRITE_ANY)) == NULL) {
		printf("CAN'T UPDATE SHARED ROOM FILE!\n");
		return;
	    }
	}
	RunList(&SharedRooms, UpdateSR);
	fclose(sharedfd);
    }
}
Ejemplo n.º 4
0
void AddFaxResults()
{
	void ShowFaxResult();

	RunList(&ResList, ShowFaxResult);
}
Ejemplo n.º 5
0
/*
 * ShowOutsideEditors()
 *
 * This will show available external editors.
 */
void ShowOutsideEditors()
{
    void DisplayEditOpts();

    RunList(&ExtEditors, DisplayEditOpts);
}