afterproc.ec
来自「在SCO UNIX制定界面程序 可根据文件配制菜单,而不必修改源程序,非常方便」· EC 代码 · 共 85 行
EC
85 行
#include <stdio.h>
#include <curses.h>
#include <varargs.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/timeb.h>
#include <fcntl.h>
#include <time.h>
#include <errno.h>
#include "all.h"
#include "tool.h"
#include "macro_def.h"
struct termio stdin_term;
struct termio stdout_term;
int AfterPorc()
{
WINDOW *my_win;
char screen[128];
char cmd_buf[256], cmd[128], param[128];
$char import_date[9];
char buffer[128], buf[64], filename[128];
FILE *fp;
int ret;
sprintf(screen, "/tmp/.AfterProc.%d", getpid());
scr_dump(screen);
disp_below("事后处理");
clear_wline(stdscr, LINES-1);
my_win = newwin(18, 80, 3, 0);
mvwprintw(my_win, 0, 0, "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
wrefresh(my_win);
db_close();
ioctl(0, TCGETA, &stdin_term);
ioctl(1, TCGETA, &stdout_term);
system("clear;stty sane");
signal(SIGINT, SIG_DFL);
signal(SIGINT, SIG_IGN);
memset ( buffer, 0, 128 );
strcpy( buffer, "check_match" );
if ( system( buffer ) < 0 ){
errcall( ERROR, "execute cmd [%s] fail !!!", buffer );
goto End;
}
memset ( buffer, 0, 128 );
strcpy( buffer, "pageat" );
if ( system( buffer ) < 0 ){
errcall( ERROR, "execute cmd [%s] fail !!!", buffer );
goto End;
}
memset ( buffer, 0, 128 );
strcpy( buffer, "transfer" );
if ( system( buffer ) < 0 ){
errcall( ERROR, "execute cmd [%s] fail !!!", buffer );
goto End;
}
End:
ioctl(0, TCSETAW, &stdin_term);
ioctl(1, TCSETAW, &stdout_term);
if (db_open() == -1) {
errcall(ERROR, "Error Open Database!\n");
exit(-1);
}
scr_restore(screen);
unlink(screen);
touchwin(curscr);
wrefresh(curscr);
return(0);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?