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

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

?? excallback.c

?? android-w.song.android.widget
?? 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*//*Copyright (C) 1999 Jeff Solomon*/#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一区二区三区免费野_久草精品视频
久久精品欧美日韩| 91精品国产入口| 国产精品黄色在线观看| 粉嫩av一区二区三区粉嫩| 国产精品亲子伦对白| 成人国产亚洲欧美成人综合网| 国产精品国产三级国产aⅴ原创 | 91免费在线播放| 亚洲综合视频网| 欧美日韩在线一区二区| 日韩成人一级大片| 国产丝袜美腿一区二区三区| 精品一区二区三区免费| 国产嫩草影院久久久久| 色综合一区二区| 五月天婷婷综合| 精品成人免费观看| 91在线精品秘密一区二区| 亚洲不卡在线观看| 久久综合九色综合97婷婷| 成人av网站在线观看| 婷婷综合久久一区二区三区| 欧美va亚洲va在线观看蝴蝶网| 成av人片一区二区| 天堂久久久久va久久久久| www国产成人免费观看视频 深夜成人网| 国产一区二区三区日韩 | 日韩美女久久久| 7777女厕盗摄久久久| 国产很黄免费观看久久| 亚洲制服丝袜在线| 久久日一线二线三线suv| 91亚洲大成网污www| 日本欧美一区二区三区| 亚洲黄色性网站| 精品国产电影一区二区| 在线一区二区三区| 国产成人午夜高潮毛片| 三级成人在线视频| 日韩一区欧美小说| 精品电影一区二区| 欧美亚洲图片小说| 成人精品视频.| 免费人成黄页网站在线一区二区| 一区在线观看视频| www精品美女久久久tv| 欧美影院一区二区| 成人网在线播放| 久久精品国产精品青草| 亚洲一区二区三区自拍| 国产精品久久精品日日| 精品日产卡一卡二卡麻豆| 91久久精品一区二区二区| 国产成人av一区| 免费观看30秒视频久久| 亚洲一区视频在线观看视频| 国产精品卡一卡二卡三| www成人在线观看| 日韩视频免费观看高清完整版| 色呦呦日韩精品| av在线播放一区二区三区| 国产一区二区三区免费观看| 免费成人在线观看| 亚洲成a人在线观看| 亚洲精品自拍动漫在线| 亚洲国产精品成人综合色在线婷婷| 欧美成人激情免费网| 欧美精品v国产精品v日韩精品| 色婷婷激情综合| 91麻豆精品秘密| 91在线视频观看| 成人avav影音| 99精品视频一区二区三区| 成人高清视频在线| 国产二区国产一区在线观看| 国产美女精品一区二区三区| 国产精品一区在线| 国产精品996| 国产福利一区在线观看| 国产精品正在播放| 处破女av一区二区| 成人av免费在线播放| jlzzjlzz亚洲日本少妇| 国产**成人网毛片九色| 成人午夜精品在线| 成人激情免费电影网址| 成人午夜精品一区二区三区| 99国产一区二区三精品乱码| 一本到三区不卡视频| 欧美伊人久久久久久午夜久久久久| 日本高清无吗v一区| 欧美日韩一本到| 日韩一级二级三级| 久久久久亚洲综合| 国产精品对白交换视频| 亚洲另类春色国产| 日韩中文字幕区一区有砖一区 | 69精品人人人人| 欧美成人精品1314www| 国产亚洲一区二区三区四区 | 91蜜桃传媒精品久久久一区二区| 91免费看`日韩一区二区| 欧美日韩中文一区| 精品对白一区国产伦| 国产亚洲精品资源在线26u| 国产精品美女久久久久久久网站| 亚洲精品日韩一| 日韩高清不卡一区二区三区| 国产精品亚洲第一区在线暖暖韩国| eeuss鲁片一区二区三区在线看| 欧美丝袜自拍制服另类| 精品久久久久久久久久久久久久久久久 | 成人av电影在线| 欧美日韩不卡在线| 久久在线观看免费| 亚洲激情图片小说视频| 奇米精品一区二区三区在线观看| 国产成人8x视频一区二区| 欧美主播一区二区三区美女| 精品国产一区二区三区av性色 | 一区二区欧美在线观看| 日本一不卡视频| 不卡欧美aaaaa| 欧美精品精品一区| 欧美国产综合一区二区| 亚洲成人免费影院| 成人av在线电影| 91精品国产日韩91久久久久久| 国产精品理论片在线观看| 人人精品人人爱| 色天使色偷偷av一区二区| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 亚洲电影激情视频网站| 国产风韵犹存在线视精品| 91麻豆精品久久久久蜜臀| 亚洲欧洲一区二区在线播放| 黄色资源网久久资源365| 欧美日韩性生活| 自拍偷拍亚洲欧美日韩| 国产综合一区二区| 欧美二区在线观看| 亚洲精品国产a| 成人黄色电影在线| 精品成人私密视频| 美女一区二区久久| 欧美日本一区二区在线观看| 中文字幕中文字幕在线一区 | 成a人片国产精品| 欧美精品一区二区高清在线观看 | 精品少妇一区二区三区日产乱码| 午夜影视日本亚洲欧洲精品| 91网站最新网址| 国产精品卡一卡二| 粉嫩av一区二区三区在线播放| 日韩精品一区二区三区四区 | 激情亚洲综合在线| 欧美一区二区三区白人| 亚洲二区视频在线| 欧美性色欧美a在线播放| 1区2区3区精品视频| 国产99久久久久久免费看农村| 日韩精品在线网站| 精品一区二区三区日韩| 欧美大胆人体bbbb| 青青草国产成人99久久| 69p69国产精品| 美国欧美日韩国产在线播放| 欧美一区二区视频在线观看 | 国产一区二区三区国产| 精品播放一区二区| 韩国三级在线一区| 久久久久久久久久久99999| 国产一区二区三区国产| 久久久久国产免费免费| 国产不卡一区视频| 国产精品丝袜久久久久久app| 成人黄色在线网站| 亚洲精品国产品国语在线app| 欧美性一级生活| 日本不卡123| 久久蜜臀精品av| 成人免费视频一区| 一区二区三区国产精华| 在线观看视频一区二区欧美日韩| 日韩制服丝袜先锋影音| 精品毛片乱码1区2区3区| 国产精品影音先锋| 综合自拍亚洲综合图不卡区| 色av一区二区| 免费成人小视频| 久久午夜羞羞影院免费观看| 成人精品小蝌蚪| 亚洲福利视频一区二区| 欧美tickle裸体挠脚心vk| 成人高清视频在线观看| 亚洲午夜精品一区二区三区他趣| 91精品国产综合久久久久久久| 国产电影一区二区三区| 亚洲综合一区二区三区| 精品国内片67194|