Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Piatok, 29. marec 2024

Súbor: [Platon] / ep / src / m_proctable.c (stiahnutie)

Revízia 1.13, Fri Nov 28 17:35:11 2003 UTC (20 years, 4 months ago) by nepto


Zmeny od 1.12: +3 -3 [lines]

Changed URL from www.platon.sk to platon.sk.

/*
 * ep - extended pipelining
 *
 * m_proctable.c - ncurses process table menu item
 * ____________________________________________________________
 *
 * Developed by Ondrej Jombik <nepto@platon.sk>
 *          and Lubomir Host <rajo@platon.sk>
 * Copyright (c) 2000-2003 Platon SDG, http://platon.sk/
 * All rights reserved.
 *
 * See README file for more information about this software.
 * See COPYING file for license information.
 *
 * Download the latest version from
 * http://platon.sk/projects/ep/
 */

/* $Platon: ep/src/m_proctable.c,v 1.12 2003/05/03 09:58:19 nepto Exp $ */

#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif
#include <stdio.h>
#ifdef HAVE_MALLOC_H
#  include <malloc.h>
#endif
#ifdef STDC_HEADERS
#  include <ctype.h>
#endif

#if HAVE_MENU
#  include <curses.h>

#include <signal.h>

#include "proctable.h"

    int
menu_proctable_info(p_ptbl, y, x)
    PROCTABLE *p_ptbl;
    int       y;
    int       x;
{
    int c, j, k;
    struct mallinfo i;
    chtype hbox = '-', vbox = '|';
    int xsize = 32;
    int ysize = 12;
    char *str= (char *)malloc(1000*sizeof(char));
    //    WINDOW *win = newwin(ysize, xsize, (LINES-ysize)/2, (COLS-xsize)/2);
    WINDOW *win = newwin(ysize, xsize, y, x);

    wstandout(win);
    wrefresh(win);
    i=mallinfo();
    sprintf(str, "proctable goes here");
    mvwaddstr(win, 1, 0, str);
    for (k=0; k<3; k++)
        for (j=0; j<xsize; j++)
            wprintw(win, " ");
    wstandend(win);
    wattrset(win, A_BOLD);
    mvwaddstr(win, 9, (xsize - 6)/2, "[ OK ]");
    wmove(win, 9, (xsize - 6)/2 + 2);
    wstandout(win);
    wborder(win, vbox, vbox, hbox, hbox, '+', '+', '+', '+');
    wrefresh(win);
    c = getch();
    werase(win);
    touchwin(win);
    wrefresh(win);
    delwin(win);
    free(str);
    return 0;
}

#endif /* #if HAVE_MENU */


Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok