bar.c
来自「一个很好用的linux 下的流量监控软件」· C语言 代码 · 共 38 行
C
38 行
/* * bar.c - sets the highlight and rate indicator bar for the IP traffic * monitor and TCP/UDP statistics * * Copyright (c) Gerard Paul Java 2001 * * *//* * Set the highlight bar to point to the specified entry. * This routine also sets the cleared flag (indicates whether the * flow rate has been displayed). The flow rate computation timer * and accumulator are also reset. */#include <curses.h>#include <time.h>#include <string.h>#include <winops.h>#include "attrs.h"void set_barptr(char **barptr, char *entry, time_t * starttime, char *spanbr, size_t size, WINDOW * win, int *cleared, int x){ *barptr = entry; *starttime = time(NULL); bzero(spanbr, size); if (!(*cleared)) { wattrset(win, IPSTATATTR); mvwprintw(win, 0, x, "Computing"); tx_wcoloreol(win); *cleared = 1; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?