?? main.c.svn-base
字號:
#include <stdio.h>
#include <time.h>
#include <curses.h>
#include <signal.h>
#include <unistd.h>
#include "flasher.h"
#include <string.h>
#include <stdlib.h>
typedef void (*sighandler_t)(int);
void handler(void);
void Ctrl_C();
static int flashtime=0;
int main( int argc, char *argv[] )
{
char message[20];
if (argc == 3)
{
sscanf(argv[1],"%d",&flashtime);
strcpy(message,argv[2]);
initscr();
clear();
while(1)
{
while(!alarm(flashtime))
{
move(RULES_ROW+3, RULES_COL+8);
showrules(message);
signal(SIGALRM,(sighandler_t)handler);
refresh();
}
scanw("%d",&flashtime);
(void)signal(SIGINT,(void*)Ctrl_C);
}
endwin();
exit(0);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -