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

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

?? excallback.c

?? this the code source of bash. good for studying linux programming
?? 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高潮流白浆在线麻豆| 91精品福利在线一区二区三区| 亚洲特黄一级片| 国产精品123区| 91精品国产黑色紧身裤美女| 国产精品美日韩| 美女脱光内衣内裤视频久久影院| 色香蕉成人二区免费| 日本一区二区三级电影在线观看 | 7777精品伊人久久久大香线蕉完整版| 精品成a人在线观看| 中文字幕在线一区免费| 国产在线国偷精品免费看| 欧美色电影在线| 亚洲美女偷拍久久| jlzzjlzz欧美大全| 欧美激情综合网| 丁香激情综合五月| 国产日产精品一区| 国产一区亚洲一区| 日韩欧美国产综合| 日日欢夜夜爽一区| 欧美日韩国产首页在线观看| 亚洲精品久久久久久国产精华液| 91视频国产资源| 亚洲精品福利视频网站| 一本色道久久综合精品竹菊| 亚洲天天做日日做天天谢日日欢| 国产69精品久久99不卡| 久久久亚洲综合| 国产精品一区在线观看乱码| 久久综合色婷婷| 成人一区二区视频| 亚洲天堂a在线| 精品视频123区在线观看| 日韩福利电影在线观看| 日韩精品一区二区三区老鸭窝| 激情综合网最新| 久久久亚洲午夜电影| 国产呦萝稀缺另类资源| 久久精品欧美日韩精品| 国产精品一线二线三线精华| 国产精品国产三级国产aⅴ原创 | 亚洲精品在线一区二区| 国产91露脸合集magnet| 中文字幕在线观看不卡| 91网站最新地址| 亚洲高清免费观看高清完整版在线观看| 91国偷自产一区二区开放时间| 五月激情综合网| 26uuuu精品一区二区| 99re亚洲国产精品| 亚洲福利视频三区| 亚洲精品一区二区三区四区高清 | 亚洲精品一区二区三区精华液| 国内精品伊人久久久久影院对白| 国产精品三级在线观看| 欧美在线观看视频一区二区三区| 日韩va欧美va亚洲va久久| 中文字幕不卡的av| 在线精品国精品国产尤物884a| 久久国产欧美日韩精品| 欧美国产视频在线| 欧美少妇一区二区| 粉嫩蜜臀av国产精品网站| 一区二区三区视频在线观看| 91精品国产一区二区三区蜜臀 | 亚洲超碰97人人做人人爱| 精品三级在线看| 日本韩国精品在线| 国产露脸91国语对白| 一二三四社区欧美黄| 久久久久久久久久久久久夜| av在线不卡免费看| 日韩av中文字幕一区二区| 亚洲欧洲国产日韩| 欧美mv日韩mv国产网站app| 欧美体内she精高潮| 国产不卡视频一区| 午夜一区二区三区视频| 中文字幕中文乱码欧美一区二区| 精品国产乱码久久久久久1区2区| 色狠狠色狠狠综合| 成人性色生活片| 精品一区二区三区免费观看 | 亚洲欧美日韩中文播放| 精品国产乱码久久| 欧美二区三区91| 91麻豆成人久久精品二区三区| 国产在线播放一区二区三区| 日日夜夜免费精品| 一二三四社区欧美黄| 亚洲天堂久久久久久久| 久久精品亚洲国产奇米99| 欧美一级理论片| 欧美性猛片aaaaaaa做受| 国产精品乡下勾搭老头1| 青娱乐精品视频在线| 亚洲bdsm女犯bdsm网站| 亚洲最色的网站| 亚洲精品视频一区二区| 日韩伦理av电影| 亚洲日本va在线观看| 中文字幕一区二区三区四区不卡 | 国产婷婷一区二区| 精品国产99国产精品| 精品黑人一区二区三区久久 | 91麻豆精品国产91久久久久 | 国产91高潮流白浆在线麻豆| 狠狠v欧美v日韩v亚洲ⅴ| 久久97超碰国产精品超碰| 国产综合色产在线精品| 毛片av一区二区| 精品亚洲欧美一区| 国产精品原创巨作av| 国产99精品国产| 成人av在线资源| 色婷婷av一区二区三区软件| 欧美色倩网站大全免费| 欧美精品777| 精品欧美一区二区三区精品久久| 精品国产在天天线2019| 久久久久久久综合色一本| 日韩一二三区视频| 久久久久久黄色| 中文字幕第一区| 亚洲激情五月婷婷| 日本91福利区| 成人一区二区三区| 日本丶国产丶欧美色综合| 在线不卡中文字幕播放| 久久一夜天堂av一区二区三区| 国产欧美一区二区精品仙草咪| 亚洲色图视频网站| 日韩精品一二三区| 精品一区精品二区高清| 国产一区欧美二区| 91在线免费播放| 欧美一级国产精品| 国产欧美一区二区三区鸳鸯浴| 亚洲色图视频免费播放| 亚洲va欧美va人人爽| 国产在线不卡视频| 在线免费观看成人短视频| 日韩精品一区二区三区视频| 亚洲图片另类小说| 久久99最新地址| 成人一二三区视频| 91官网在线免费观看| 精品久久一二三区| 亚洲自拍都市欧美小说| 精品亚洲国内自在自线福利| 91视频你懂的| 精品少妇一区二区三区在线视频| 亚洲美女屁股眼交3| 久久草av在线| 欧美羞羞免费网站| 欧美国产日本韩| 全国精品久久少妇| 色老汉一区二区三区| 日韩欧美国产麻豆| 自拍av一区二区三区| 久久国产精品第一页| 精品视频色一区| 中文字幕综合网| 国产毛片精品一区| 制服丝袜一区二区三区| 亚洲精品欧美专区| 成人美女在线观看| 久久综合九色综合97婷婷女人 | 91官网在线免费观看| 久久婷婷一区二区三区| 日韩av高清在线观看| 91色|porny| 国产精品免费av| 国产99精品国产| www日韩大片| 激情伊人五月天久久综合| 欧美日韩大陆一区二区| 亚洲裸体在线观看| 不卡区在线中文字幕| 国产欧美一区二区三区沐欲| 亚洲v精品v日韩v欧美v专区| 不卡高清视频专区| 欧美激情一二三区| 成人免费高清在线观看| 国产亚洲一二三区| 国产精品18久久久久| 久久蜜桃一区二区| 国产精品亚洲综合一区在线观看| xf在线a精品一区二区视频网站| 精彩视频一区二区三区|