亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? excallback.c

?? linux中bash shell的源代碼
?? C
字號:
/*From: Jeff Solomon <jsolomon@stanford.edu>Date: Fri,  9 Apr 1999 10:13:27 -0700 (PDT)To: chet@po.cwru.eduSubject: new readline exampleMessage-ID: <14094.12094.527305.199695@mrclean.Stanford.EDU>Chet,I've been using readline 4.0. Specifically, I've been using the perlversion Term::ReadLine::Gnu. It works great.Anyway, I've been playing around the alternate interface and I wantedto contribute a little C program, callback.c, to you that you coulduse as an example of the alternate interface in the /examplesdirectory of the readline distribution.My example shows how, using the alternate interface, you caninteractively change the prompt (which is very nice imo). Also, Ipoint out that you must roll your own terminal setting when using thealternate interface because readline depreps (using your parlance) theterminal while in the user callback. I try to demostrate what I meanwith an example. I've included the program below.To compile, I just put the program in the examples directory and madethe appropriate changes to the EXECUTABLES and OBJECTS line and addedan additional target 'callback'.I compiled on my Sun Solaris2.6 box using Sun's cc.Let me know what you think.Jeff*/#if defined (HAVE_CONFIG_H)#include <config.h>#endif#include <stdio.h>#include <sys/types.h>#ifdef HAVE_UNISTD_H#include <unistd.h>#endif#include <termios.h>	/* xxx - should make this more general */#ifdef READLINE_LIBRARY#  include "readline.h"#else#  include <readline/readline.h>#endif/* This little examples demonstrates the alternate interface to using readline. * In the alternate interface, the user maintains control over program flow and * only calls readline when STDIN is readable. Using the alternate interface, * you can do anything else while still using readline (like talking to a * network or another program) without blocking. * * Specifically, this program highlights two importants features of the * alternate interface. The first is the ability to interactively change the * prompt, which can't be done using the regular interface since rl_prompt is * read-only. *  * The second feature really highlights a subtle point when using the alternate * interface. That is, readline will not alter the terminal when inside your * callback handler. So let's so, your callback executes a user command that * takes a non-trivial amount of time to complete (seconds). While your * executing the command, the user continues to type keystrokes and expects them * to be re-echoed on the new prompt when it returns. Unfortunately, the default * terminal configuration doesn't do this. After the prompt returns, the user * must hit one additional keystroke and then will see all of his previous * keystrokes. To illustrate this, compile and run this program. Type "sleep" at * the prompt and then type "bar" before the prompt returns (you have 3 * seconds). Notice how "bar" is re-echoed on the prompt after the prompt * returns? This is what you expect to happen. Now comment out the 4 lines below * the line that says COMMENT LINE BELOW. Recompile and rerun the program and do * the same thing. When the prompt returns, you should not see "bar". Now type * "f", see how "barf" magically appears? This behavior is un-expected and not * desired. */void process_line(char *line);int  change_prompt(void);char *get_prompt(void);int prompt = 1;char prompt_buf[40], line_buf[256];tcflag_t old_lflag;cc_t     old_vtime;struct termios term;int main(){    fd_set fds;    /* Adjust the terminal slightly before the handler is installed. Disable     * canonical mode processing and set the input character time flag to be     * non-blocking.     */    if( tcgetattr(STDIN_FILENO, &term) < 0 ) {        perror("tcgetattr");        exit(1);    }    old_lflag = term.c_lflag;    old_vtime = term.c_cc[VTIME];    term.c_lflag &= ~ICANON;    term.c_cc[VTIME] = 1;    /* COMMENT LINE BELOW - see above */    if( tcsetattr(STDIN_FILENO, TCSANOW, &term) < 0 ) {        perror("tcsetattr");        exit(1);    }    rl_add_defun("change-prompt", change_prompt, CTRL('t'));    rl_callback_handler_install(get_prompt(), process_line);    while(1) {      FD_ZERO(&fds);      FD_SET(fileno(stdin), &fds);      if( select(FD_SETSIZE, &fds, NULL, NULL, NULL) < 0) {        perror("select");        exit(1);      }      if( FD_ISSET(fileno(stdin), &fds) ) {        rl_callback_read_char();      }    }}voidprocess_line(char *line){  if( line == NULL ) {    fprintf(stderr, "\n", line);    /* reset the old terminal setting before exiting */    term.c_lflag     = old_lflag;    term.c_cc[VTIME] = old_vtime;    if( tcsetattr(STDIN_FILENO, TCSANOW, &term) < 0 ) {        perror("tcsetattr");        exit(1);    }    exit(0);  }  if( strcmp(line, "sleep") == 0 ) {    sleep(3);  } else {    fprintf(stderr, "|%s|\n", line);  }  free (line);}intchange_prompt(void){  /* toggle the prompt variable */  prompt = !prompt;  /* save away the current contents of the line */  strcpy(line_buf, rl_line_buffer);  /* install a new handler which will change the prompt and erase the current line */  rl_callback_handler_install(get_prompt(), process_line);  /* insert the old text on the new line */  rl_insert_text(line_buf);  /* redraw the current line - this is an undocumented function. It invokes the   * redraw-current-line command.   */  rl_refresh_line(0, 0);}char *get_prompt(void){  /* The prompts can even be different lengths! */  sprintf(prompt_buf, "%s",     prompt ? "Hit ctrl-t to toggle prompt> " : "Pretty cool huh?> ");  return prompt_buf;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩欧美激情| 日韩视频免费观看高清完整版在线观看| 精品免费日韩av| 欧美精品一区二区蜜臀亚洲| av网站免费线看精品| 91丨porny丨最新| 极品美女销魂一区二区三区| 成人午夜精品在线| 丝袜亚洲另类丝袜在线| 午夜私人影院久久久久| 亚洲一区二区四区蜜桃| 国产精品国产三级国产普通话99| 欧美极品另类videosde| 精品国产一区久久| 蜜桃av一区二区三区| 国产欧美视频一区二区三区| 精品国产三级a在线观看| 不卡在线观看av| 风间由美一区二区av101| 国产福利一区二区三区在线视频| 欧美成人猛片aaaaaaa| 欧美一区二区视频观看视频| 亚洲欧美在线另类| 亚洲综合视频在线观看| 亚洲国产精品国自产拍av| 国产女人aaa级久久久级| 日韩一区二区三区四区| 粉嫩13p一区二区三区| www.亚洲精品| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 亚洲电影一级片| 日本不卡不码高清免费观看| 国产一区二区三区观看| 国产aⅴ综合色| 欧美美女网站色| 高清国产一区二区| 欧美肥妇毛茸茸| 亚洲色图一区二区三区| 九九九精品视频| 一本在线高清不卡dvd| 日韩欧美一区二区免费| 亚洲精品国产a| 国产乱子轮精品视频| 欧美日韩一区二区三区在线看| 91视频观看视频| 精品成人在线观看| 亚洲国产视频在线| 大胆欧美人体老妇| 日韩欧美电影在线| 亚洲成人一二三| 不卡一区二区三区四区| 欧美精品一区二区蜜臀亚洲| 午夜激情一区二区| 91免费看`日韩一区二区| 亚洲精品一区二区三区精华液| 亚洲一区二区偷拍精品| eeuss国产一区二区三区| va亚洲va日韩不卡在线观看| 精品国产乱码久久久久久浪潮| 一区av在线播放| 成人免费毛片嘿嘿连载视频| 亚洲精品在线一区二区| 日韩电影在线观看网站| 色哦色哦哦色天天综合| 国产精品久久久久桃色tv| 久久99精品国产麻豆不卡| 欧美剧在线免费观看网站| 亚洲激情图片一区| 99久久99久久久精品齐齐| 色婷婷亚洲婷婷| 中文字幕一区二区在线观看| 国产成人综合亚洲网站| 亚洲精品在线三区| 激情五月婷婷综合网| 日韩美女视频在线| 日本强好片久久久久久aaa| 欧美日韩一级大片网址| 洋洋成人永久网站入口| 色域天天综合网| 亚洲女人****多毛耸耸8| 成人国产精品免费网站| 国产精品美女久久福利网站| 国产精品69久久久久水密桃| 国产亚洲综合性久久久影院| 韩国一区二区三区| 亚洲精品一线二线三线| 国产最新精品免费| 久久久久久久性| 国产盗摄女厕一区二区三区| 国产亚洲一区二区三区四区| 国产精品亚洲成人| 日本一区二区综合亚洲| 国产91在线|亚洲| 中国色在线观看另类| 99精品国产91久久久久久| 亚洲同性gay激情无套| 色哟哟一区二区在线观看| 一区二区三区在线看| 欧美三级在线视频| 日本vs亚洲vs韩国一区三区二区 | 中文字幕欧美区| 国产成人99久久亚洲综合精品| 国产精品网站在线观看| 91一区二区在线| 亚洲综合精品自拍| 91精品国产综合久久小美女| 久久精品国产久精国产爱| 91在线视频播放地址| 亚洲影视在线播放| 欧美不卡一二三| 高清视频一区二区| 一区二区三区色| 成人免费毛片高清视频| 亚洲老司机在线| 欧美手机在线视频| 久久国产欧美日韩精品| 中文字幕乱码一区二区免费| 91尤物视频在线观看| 天天综合网天天综合色| 2020国产精品| 91视频一区二区三区| 欧美96一区二区免费视频| 久久精品无码一区二区三区| 一本一道久久a久久精品| 免费视频一区二区| 欧美国产丝袜视频| 欧美性色黄大片| 精品一区二区三区在线视频| 国产精品久久一卡二卡| 欧美日韩国产精选| 精品噜噜噜噜久久久久久久久试看 | 蜜桃一区二区三区在线| 久久精品亚洲精品国产欧美| 在线精品视频一区二区三四| 久久99精品一区二区三区| 中文字幕在线一区免费| 欧美久久一二三四区| 国产99久久精品| 日韩成人av影视| 国产精品乱人伦| 日韩一级二级三级精品视频| 成人夜色视频网站在线观看| 亚洲高清视频在线| 国产欧美一区二区精品婷婷| 欧美日韩一区二区三区四区五区| 国产成人在线影院| 偷拍一区二区三区| 国产精品久久福利| 日韩美女天天操| 欧美综合久久久| 国产91丝袜在线播放0| 日日夜夜精品视频免费| 中文字幕亚洲一区二区va在线| 日韩色视频在线观看| 色噜噜狠狠成人网p站| 国产美女在线观看一区| 午夜视频一区二区三区| 国产精品进线69影院| 精品久久久久香蕉网| 精品视频一区二区三区免费| 成人av在线一区二区| 蜜桃av一区二区| 亚洲成人av福利| 樱桃国产成人精品视频| 中文一区二区在线观看| 91在线观看污| 国产精品一区免费视频| 日本欧美久久久久免费播放网| 一区二区三区日韩精品视频| 国产农村妇女精品| 26uuu精品一区二区| 69p69国产精品| 欧美日韩一区 二区 三区 久久精品| 成a人片国产精品| 国产精品正在播放| 免费在线观看不卡| 五月天视频一区| 亚洲一区二区欧美| 亚洲欧美日韩中文字幕一区二区三区 | fc2成人免费人成在线观看播放| 欧美日韩国产综合一区二区 | 亚洲免费三区一区二区| 中文子幕无线码一区tr| 久久午夜老司机| 日韩精品一区二区在线观看| 国产乱对白刺激视频不卡| 麻豆精品在线播放| 免费看日韩精品| 欧美aaaaa成人免费观看视频| 日日摸夜夜添夜夜添精品视频 | 国内精品嫩模私拍在线| 日本欧美在线看| 蜜桃视频一区二区| 日韩不卡在线观看日韩不卡视频| 天堂久久久久va久久久久| 午夜在线成人av| 午夜视频一区在线观看| 日本不卡123| 久久精品国产成人一区二区三区 | 日韩欧美专区在线|