Beispiel #1
0
void QuickScan_Email(void)
{
    int     FoundMsg  = FALSE;
    int	    i;
    char    temp[81];

    iLineCount = 2;
    WhosDoingWhat(READ_POST, NULL);

    if (EmailBase.Total == 0) {
	Enter(1);
	/* There are no messages in this area. */
	pout(WHITE, BLACK, (char *) Language(205));
	Enter(2);
	sleep(3);
	return;
    }

    clear(); 
    /* #    From                  To                       Subject */
    poutCR(YELLOW, BLUE, (char *) Language(220));

    if (Msg_Open(sMailpath)) {
	for (i = EmailBase.Lowest; i <= EmailBase.Highest; i++) {
	    if (Msg_ReadHeader(i)) {
                                
		snprintf(temp, 81, "%-6u", Msg.Id);
		pout(WHITE, BLACK, temp);
		snprintf(temp, 81, "%s ", padleft(Msg.From, 20, ' '));
		pout(CYAN, BLACK, temp);

		snprintf(temp, 81, "%s ", padleft(Msg.To, 20, ' '));
		pout(GREEN, BLACK, temp);
		snprintf(temp, 81, "%s", padleft(Msg.Subject, 31, ' '));
		pout(MAGENTA, BLACK, temp);
		Enter(1);
		FoundMsg = TRUE;
		if (LC(1))
		    break;
	    }
	}
	Msg_Close();
    }

    if(!FoundMsg) {
	Enter(1);
	/* There are no messages in this area. */
	pout(LIGHTGREEN, BLACK, (char *) Language(205));
	Enter(2);
	sleep(3);
    }

    iLineCount = 2;
    Pause();
}
Beispiel #2
0
void Hl(int y, char *txt)
{
    Ls(y);
    strncat(hstr, colour_str(WHITE, BLUE), 80);
    strncat(hstr, padleft(txt, 58, ' '), 80);
    Rs();
    PUTSTR(chartran(hstr));
}
Beispiel #3
0
void Top_Menu(void)
{
    char    temp[81];

    locate(1,1);
    colour(WHITE, RED);
    snprintf(temp, 81, "%s", padleft((char *)"(A)bort (H)elp (S)ave - Any other key is continue edit", 79, ' '));
    PUTSTR(temp);
}
Beispiel #4
0
void Top_Help() 
{
    char    temp[81];

    locate(1,1);
    colour(YELLOW, BLUE);
    snprintf(temp, 81, "%s", padleft((char *)"Press ESC for menu, other keys is edit text", 79, ' '));
    PUTSTR(temp);
    Show_Ins();
}
Beispiel #5
0
std::string fmtvalue(std::true_type, const complex<T>& x)
{
    std::string restr = as_string(fmt<'g', number_width, number_precision>(x.real()));
    if (restr.size() > number_width)
        restr = as_string(fmt<'g', number_width, number_precision_short>(x.real()));

    std::string imstr = as_string(fmt<'g', -1, number_precision>(std::abs(x.imag())));
    if (imstr.size() > number_width)
        imstr = as_string(fmt<'g', -1, number_precision_short>(std::abs(x.imag())));

    return restr + (x.imag() < T(0) ? "-" : "+") + padleft(number_width, imstr + "j");
}
Beispiel #6
0
void Full_Help(void)
{
    strcpy(hstr, colour_str(LIGHTGREEN, BLUE));

    /* Top row */
    strncat(hstr, locate_str(1, 10), 80);
    strncat(hstr, (char *)"\xDA", 80);
    strncat(hstr, hLine_str(58), 80);
    strncat(hstr, (char *)"\xBF", 80);
    PUTSTR(chartran(hstr));

    Ws(2);
    PUTSTR(chartran(hstr));

    Ls(3);
    strncat(hstr, colour_str(YELLOW, BLUE), 80);
    strncat(hstr, padleft((char *)"                  Editor Help", 58, ' '), 80);
    Rs();
    PUTSTR(chartran(hstr));

    Ws(4);
    PUTSTR(chartran(hstr));

    Hl( 5, (char *)"Ctrl-S or LeftArrow     - Cursor left");
    Hl( 6, (char *)"Ctrl-D or RightArrow    - Cursor right");
    Hl( 7, (char *)"Ctrl-E or UpArrow       - Cursor up");
    Hl( 8, (char *)"Ctrl-X or DownArrow     - Cursor down");
    Hl( 9, (char *)"Ctrl-V or Insert        - Insert or Overwrite");
    Hl(10, (char *)"Ctrl-N                  - Insert line");
    Hl(11, (char *)"Ctrl-Y                  - Delete line");
    Ws(12);
    PUTSTR(chartran(hstr));
    Hl(13, (char *)"Ctrl-L                  - Refresh screen");
    Hl(14, (char *)"Ctrl-R                  - Read from file");
    Ws(15);
    PUTSTR(chartran(hstr));

    strcpy(hstr, locate_str(16,10));
    strncat(hstr, (char *)"\xC0", 80);
    strncat(hstr, hLine_str(58), 80);
    strncat(hstr, (char *)"\xD9", 80);
    PUTSTR(chartran(hstr));
}
Beispiel #7
0
/*
 * Product information screen
 */
void cr(void)
{
    char    *temp;

    temp       = calloc(81, sizeof(char));

    if (utf8)
	chartran_init((char *)"CP437", (char *)"UTF-8", 'B');

    strncpy(pstr, clear_str(), 255);
    strncat(pstr, colour_str(DARKGRAY, BLACK), 255);

    /* Print top row */
    strncat(pstr, (char *)"\xDA", 255);
    strncat(pstr, hLine_str(76), 255);
    strncat(pstr, (char *)"\xBF\r\n", 255);
    PUTSTR(chartran(pstr));

    wl();
    PUTSTR(chartran(pstr));

    ls();
    snprintf(temp, 80, "MBSE Bulletin Board System %s (%s-%s)", VERSION, OsName(), OsCPU());
    strncat(pstr, pout_str(YELLOW, BLACK, padleft(temp, 76, ' ')), 255);
    rs();
    PUTSTR(chartran(pstr));

    wl();
    PUTSTR(chartran(pstr));

    ls();
    snprintf(temp, 81, "%s", COPYRIGHT);
    strncat(pstr, pout_str(LIGHTCYAN, BLACK, padleft(temp, 76, ' ')), 255);
    rs();
    PUTSTR(chartran(pstr));

    wl();
    PUTSTR(chartran(pstr));

    ls();
    snprintf(temp, 81, "Compiled on %s at %s", __DATE__, __TIME__);
    strncat(pstr, pout_str(LIGHTRED, BLACK, padleft(temp, 76, ' ')), 255);
    rs();
    PUTSTR(chartran(pstr));

    wl();
    PUTSTR(chartran(pstr));

    ls();
    strncat(pstr, pout_str(LIGHTCYAN, BLACK, (char *)"MBSE has been written and designed by Michiel Broek. Many others have given "), 255);
    rs();
    PUTSTR(chartran(pstr));

    ls();
    strncat(pstr, pout_str(LIGHTCYAN, BLACK, (char *)"valuable time in the form of new ideas and suggestions on how to make MBSE  "), 255);
    rs();
    PUTSTR(chartran(pstr));

    ls();
    strncat(pstr, pout_str(LIGHTCYAN, BLACK, (char *)"BBS a better BBS                                                            "), 255);
    rs();
    PUTSTR(chartran(pstr));
    
    wl();
    PUTSTR(chartran(pstr));

    ls();
    strncat(pstr, pout_str(WHITE, BLACK, (char *)"Available from http://www.mbse.eu or 2:280/2802                             "), 255);
    rs();
    PUTSTR(chartran(pstr));

    wl();
    PUTSTR(chartran(pstr));

    ls();
    strncat(pstr, pout_str(LIGHTRED, BLACK, (char *)"JAM(mbp) - Copyright 1993 Joaquim Homrighausen, Andrew Milner,              "),
 255);
    rs();
    PUTSTR(chartran(pstr));

    ls();
    strncat(pstr, pout_str(LIGHTRED, BLACK, (char *)"                          Mats Birch, Mats Wallin.                          "), 255);
    rs();
    PUTSTR(chartran(pstr));

    ls();
    strncat(pstr, pout_str(LIGHTRED, BLACK, (char *)"                          ALL RIGHTS RESERVED.                              "), 255);
    rs();
    PUTSTR(chartran(pstr));

    wl();
    PUTSTR(chartran(pstr));

    ls();
    strncat(pstr, pout_str(LIGHTBLUE, BLACK,  (char *)"This is free software; released under the terms of the GNU General Public   "), 255);
    rs();
    PUTSTR(chartran(pstr));

    ls();
    strncat(pstr, pout_str(LIGHTBLUE, BLACK,  (char *)"License as published by the Free Software Foundation.                       "), 255);
    rs();
    PUTSTR(chartran(pstr));

    wl();
    PUTSTR(chartran(pstr));

    strcpy(pstr, (char *)"\xC0");
    strncat(pstr, hLine_str(76), 255);
    strncat(pstr, (char *)"\xD9\r\n", 255);
    PUTSTR(chartran(pstr));

    free(temp);
    chartran_close();
    Enter(1);
    Pause();
}