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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ckutio.c

?? C 語言核心協(xié)議的 C 語言源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
char *ckxv = "Unix tty I/O, 4C(038), 19 Mar 86";/*  C K U T I O  *//* C-Kermit interrupt, terminal control & i/o functions for Unix systems *//* Author: Frank da Cruz (SY.FDC@CU20B), Columbia University Center for Computing Activities, January 1985. Copyright (C) 1985, Trustees of Columbia University in the City of New York. Permission is granted to any individual or institution to use, copy, or redistribute this software so long as it is not sold for profit, provided this copyright notice is retained. *//* Includes for all Unixes (conditional includes come later) */#include <sys/types.h>			/* Types */#include <sys/dir.h>			/* Directory */#include <ctype.h>			/* Character types */#ifdef NULL#undef NULL#endif NULL#include <stdio.h>			/* Unix Standard i/o */#include <signal.h>			/* Interrupts */#include <setjmp.h>			/* Longjumps */#include "ckcdeb.h"			/* Typedefs, formats for debug() *//* Maximum length for the name of a tty device */#ifndef DEVNAMLEN#define DEVNAMLEN 25#endif/* 4.1 BSD support added by Charles E. Brooks, EDN-VAX *//* Fortune 16:32 For:Pro 1.7 support mostly like 4.1, added by J-P Dumas */#ifdef BSD4#define ANYBSD#ifdef MAXNAMLEN#define BSD42char *ckxsys = " 4.2 BSD";#else#ifdef FT17#define BSD41char *ckxsys = " For:Pro Fortune 1.7";#else#define BSD41#ifndef C70char *ckxsys = " 4.1 BSD";#endif#endif#endif#endif/* 2.9bsd support contributed by Bradley Smith, UCLA */#ifdef BSD29#define ANYBSDchar *ckxsys = " 2.9 BSD";#endif/* Version 7 UNIX support contributed by Gregg Wonderly, Oklahoma State University:  gregg@okstate.csnet*/#ifdef	V7char *ckxsys = " Version 7 UNIX (tm)";#endif/* BBN C70 support from Frank Wancho, WANCHO@SIMTEL20 */#ifdef C70char *ckxsys = " BBN C/70";#endif/* Amdahl UTS 2.4 (v7 derivative) for IBM 370 series compatible mainframes *//* Contributed by Garard Gaye, Jean-Pierre Dumas, DUMAS@SUMEX-AIM. */#ifdef UTS24char *ckxsys = " Amdahl UTS 2.4";#endif/* Pro/Venix Version 1.x support from Columbia U. */#ifdef PROVX1char *ckxsys = " Pro-3xx Venix v1";#endif/* Tower support contributed by John Bray, Auburn, Alabama */#ifdef TOWER1char *ckxsys = " NCR Tower 1632, OS 1.02";#endif/* Sys III/V, Xenix, PC/IX support by Herm Fischer, Encino, CA */#ifdef UXIII#ifdef XENIXchar *ckxsys = " Xenix/286";#else#ifdef PCIXchar *ckxsys = " PC/IX";#else#ifdef ISIIIchar *ckxsys = " Interactive Systems Corp System III";#elsechar *ckxsys = " AT&T System III/System V";#endif#endif#endif#endif/* Features... *//* Do own buffering, using unbuffered read() calls... */#ifdef UXIII#define MYREAD#endif#ifdef BSD42#define MYREAD#include <errno.h>#endif/* Note - KERLD is the Berkeley Unix Berknet line driver, modified to pass through all 8  bits, and to allow an arbitrary break character to be set. Don't define this symbol unless you have made this modification to your 4.2BSD kernel!*/#ifdef BSD4/* #define KERLD */  /* <-- note, commented out */#endif/* Variables available to outside world:   dftty  -- Pointer to default tty name string, like "/dev/tty".   dfloc  -- 0 if dftty is console, 1 if external line.   dfprty -- Default parity   dfflow -- Default flow control   ckxech -- Flag for who echoes console typein:     1 - The program (system echo is turned off)     0 - The system (or front end, or terminal).   functions that want to do their own echoing should check this flag   before doing so.   flfnam -- Name of lock file, including its path, e.g.,		"/usr/spool/uucp/LCK..cul0" or "/etc/locks/tty77"   hasLock -- Flag set if this kermit established a uucp lock.   inbufc -- number of tty line rawmode unread characters 		(system III/V unixes)   backgrd -- Flag indicating program executing in background ( & on 		end of shell command). Used to ignore INT and QUIT signals. Functions for assigned communication line (either external or console tty):   sysinit()               -- System dependent program initialization   ttopen(ttname,local,mdmtyp) -- Open the named tty for exclusive access.   ttclos()                -- Close & reset the tty, releasing any access lock.   ttpkt(speed,flow)       -- Put the tty in packet mode and set the speed.   ttvt(speed,flow)        -- Put the tty in virtual terminal mode.				or in DIALING or CONNECTED modem control state.   ttinl(dest,max,timo)    -- Timed read line from the tty.   ttinc(timo)             -- Timed read character from tty.   myread()		   -- System 3 raw mode bulk buffer read, gives			   --   subsequent chars one at a time and simulates			   --   FIONREAD!   myunrd(c)		   -- Places c back in buffer to be read (one only)   ttchk()                 -- See how many characters in tty input buffer.   ttxin(n,buf)            -- Read n characters from tty (untimed).   ttol(string,length)     -- Write a string to the tty.   ttoc(c)                 -- Write a character to the tty.   ttflui()                -- Flush tty input buffer.   ttlock(ttname)	   -- Lock against uucp collisions (Sys III)   ttunlck()		   -- Unlock "       "     "   look4lk(ttname)	   -- Check if a lock file exists*//*Functions for console terminal:   congm()   -- Get console terminal modes.   concb(esc) -- Put the console in single-character wakeup mode with no echo.   conbin(esc) -- Put the console in binary (raw) mode.   conres()  -- Restore the console to mode obtained by congm().   conoc(c)  -- Unbuffered output, one character to console.   conol(s)  -- Unbuffered output, null-terminated string to the console.   conola(s) -- Unbuffered output, array of strings to the console.   conxo(n,s) -- Unbuffered output, n characters to the console.   conchk()  -- Check if characters available at console (bsd 4.2).		Check if escape char (^\) typed at console (System III/V).   coninc(timo)  -- Timed get a character from the console.   conint()  -- Enable terminal interrupts on the console if not background.   connoi()  -- Disable terminal interrupts on the console if not background.Time functions   msleep(m) -- Millisecond sleep   ztime(&s) -- Return pointer to date/time string   rtimer() --  Reset timer   gtimer()  -- Get elapsed time since last call to rtimer()*//* Conditional Includes */#ifdef FT17#include <sys/file.h>	  		/* File information */#endif#ifndef PROVX1#include <sys/file.h>	  		/* File information */#endif/* System III, System V */#ifdef UXIII#include <termio.h>#include <sys/ioctl.h>#include <fcntl.h>			/* directory reading for locking */#include <errno.h>			/* error numbers for system returns */#endif/* Not Sys III/V */#ifndef UXIII#include <sgtty.h>			/* Set/Get tty modes */#ifndef PROVX1#ifndef V7#ifndef BSD41#include <sys/time.h>			/* Clock info (for break generation) */#endif#endif#endif#endif#ifdef BSD41#include <sys/timeb.h>			/* BSD 4.1 ... ceb */#endif#ifdef BSD29#include <sys/timeb.h>			/* BSD 2.9 (Vic Abell, Purdue) */#endif#ifdef TOWER1#include <sys/timeb.h>			/* Clock info for NCR Tower */#endif/* Declarations */long time();				/* All Unixes should have this... */extern int errno;			/* System call error return *//* Special stuff for V7 input buffer peeking */#ifdef	V7int kmem[2] = { -1, -1};char *initrawq(), *qaddr[2]={0,0};#define CON 0#define TTY 1#endif/* dftty is the device name of the default device for file transfer *//* dfloc is 0 if dftty is the user's console terminal, 1 if an external line */#ifdef PROVX1    char *dftty = "/dev/com1.dout"; /* Only example so far of a system */    int dfloc = 1;		    /* that goes in local mode by default */#else    char *dftty = CTTNAM;		/* Remote by default, use normal */    int dfloc = 0;			/* controlling terminal name. */#endif    int dfprty = 0;			/* Parity (0 = none) */    int dfflow = 1;			/* Xon/Xoff flow control */    int backgrd = 0;			/* Assume in foreground (no '&' ) */int ckxech = 0; /* 0 if system normally echoes console characters, else 1 *//* Declarations of variables global within this module */static long tcount;			/* Elapsed time counter */static char *brnuls = "\0\0\0\0\0\0\0"; /* A string of nulls */static jmp_buf sjbuf, jjbuf;		/* Longjump buffer */static int lkf = 0,			/* Line lock flag */    conif = 0,				/* Console interrupts on/off flag */    cgmf = 0,				/* Flag that console modes saved */    xlocal = 0,				/* Flag for tty local or remote */    ttyfd = -1;				/* TTY file descriptor */static char escchr;			/* Escape or attn character *//* Special line discipline, 4.2bsd only, and only with kernel mods... */#ifdef KERLD    static int kerld = 1;		/* Special Kermit line discipline... */    struct tchars oldc, newc;		/* Special characters */    int ld = NETLDISC;			/* Really a hack to "Berknet" l.d. */    int oldld;				/* Old discipline */#else    static int kerld = 0;		/* Not selected, no special l.d. */#endif#ifdef BSD42    static struct timeval tv;		/* For getting time, from sys/time.h */    static struct timezone tz;#endif#ifdef BSD29    static long clock;			/* For getting time from sys/time.h */    static struct timeb ftp;		/* And from sys/timeb.h */#endif#ifdef BSD41    static long clock;			/* For getting time from sys/time.h */    static struct timeb ftp;		/* And from sys/timeb.h */#endif#ifdef TOWER1static long clock;			/* For getting time from sys/time.h */static struct timeb ftp;		/* And from sys/timeb.h */#endif#ifdef V7static long clock;#endif#ifdef UXIII  static struct termio 			/* sgtty info... */    ttold, ttraw, tttvt,		/* for communication line */    ccold, ccraw, cccbrk;		/* and for console */#else  static struct sgttyb 			/* sgtty info... */    ttold, ttraw, tttvt, ttbuf,		/* for communication line */    ccold, ccraw, cccbrk;		/* and for console */#endifstatic char flfnam[80];			/* uucp lock file path name */static int hasLock = 0;			/* =1 if this kermit locked uucp */static int inbufc = 0;			/* stuff for efficient SIII raw line */static int ungotn = -1;			/* pushback to unread character */static int conesc = 0;			/* set to 1 if esc char (^\) typed */static int ttlock();			/* definition of ttlock subprocedure */static int ttunlck();			/* and unlock subprocedure */static char ttnmsv[DEVNAMLEN];		/* copy of open path for tthang *//*  S Y S I N I T  --  System-dependent program initialization.  */sysinit() {/* for now, nothing... */}/*  T T O P E N  --  Open a tty for exclusive access.  *//*  Returns 0 on success, -1 on failure.  *//*  If called with lcl < 0, sets value of lcl as follows:  0: the terminal named by ttname is the job's controlling terminal.  1: the terminal named by ttname is not the job's controlling terminal.  But watch out: if a line is already open, or if requested line can't  be opened, then lcl remains (and is returned as) -1.*/ttopen(ttname,lcl,modem) char *ttname; int *lcl, modem; {#ifdef UXIII    char *ctermid();			/* Wish they all had this! */#endif    char *x; extern char* ttyname();    char cname[DEVNAMLEN+4];    if (ttyfd > -1) return(0);		/* If already open, ignore this call */    xlocal = *lcl;			/* Make this available to other fns */#ifdef UXIII    /* if modem connection, don't wait for carrier */    ttyfd = open(ttname,O_RDWR | (modem ? O_NDELAY : 0) );#else    ttyfd = open(ttname,2);		/* Try to open for read/write */#endif    if (ttyfd < 0) {			/* If couldn't open, fail. */	perror(ttname);	return(-1);    }    strncpy(ttnmsv,ttname,DEVNAMLEN);	/* Open, keep copy of name locally. *//* Caller wants us to figure out if line is controlling tty */    debug(F111,"ttopen ok",ttname,*lcl);    if (*lcl == -1) {	if (strcmp(ttname,CTTNAM) == 0) {   /* "/dev/tty" always remote */	    debug(F110," Same as CTTNAM",ttname,0);	    xlocal = 0;	} else if (isatty(0)) {		/* Else, if stdin not redirected */	    x = ttyname(0);		/* then compare its device name */	    strncpy(cname,x,DEVNAMLEN);	/* (copy from internal static buf) */	    debug(F110," ttyname(0)",x,0);	    x = ttyname(ttyfd); 	/* ...with real name of ttname. */	    xlocal = (strncmp(x,cname,DEVNAMLEN) == 0) ? 0 : 1;	    debug(F111," ttyname",x,xlocal);	} else {			/* Else, if stdin redirected... */#ifdef UXIII/* Sys III/V provides nice ctermid() function to get name of controlling tty */    	    ctermid(cname);		/* Get name of controlling terminal */	    debug(F110," ctermid",cname,0);	    x = ttyname(ttyfd); 	/* Compare with name of comm line. */	    xlocal = (strncmp(x,cname,DEVNAMLEN) == 0) ? 0 : 1;	    debug(F111," ttyname",x,xlocal);#else/* Just assume local, so "set speed" and similar commands will work *//* If not really local, how could it work anyway?... */	    xlocal = 1;	    debug(F101," redirected stdin","",xlocal);#endif        }    }    /* Now check if line is locked -- if so fail, else lock for ourselves */    lkf = 0;				/* Check lock */    if (xlocal > 0) {	if (ttlock(ttname) < 0) {	    fprintf(stderr,"Exclusive access to %s denied\n",ttname);	    close(ttyfd); ttyfd = -1;	    debug(F110," Access denied by lock",ttname,0);	    return(-1);			/* Not if already locked */    	} else lkf = 1;    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人在线免费| 精品久久久网站| 亚洲免费在线看| 99久久99久久精品免费观看| 国产精品看片你懂得| 国产jizzjizz一区二区| 中文字幕第一区第二区| 99re热视频精品| 一区av在线播放| 精品视频全国免费看| 日韩av高清在线观看| 日韩欧美一区在线| 国产精品99久久久久久似苏梦涵 | 亚洲男女一区二区三区| 日本精品一区二区三区高清| 亚洲成人精品在线观看| 欧美电视剧在线观看完整版| 国产精品正在播放| 成人欧美一区二区三区白人| 91久久一区二区| 久久精品国产精品亚洲精品| 久久免费视频色| 一本色道久久综合亚洲91| 五月天精品一区二区三区| 精品对白一区国产伦| 99r国产精品| 人人精品人人爱| 国产精品嫩草99a| 欧美日韩一区二区在线观看| 激情六月婷婷久久| 亚洲精品国产成人久久av盗摄 | 肉丝袜脚交视频一区二区| 精品国产成人系列| 色婷婷久久久久swag精品| 日韩精品国产欧美| 国产精品成人免费在线| 日韩一级片网站| 91日韩在线专区| 国内精品不卡在线| 亚洲一级二级在线| 中文字幕国产精品一区二区| 91精品国产91久久综合桃花 | 美女视频黄频大全不卡视频在线播放 | 99精品欧美一区| 精品综合免费视频观看| 亚洲精品视频免费观看| 久久久久久久久久久久久女国产乱 | 亚洲欧美视频在线观看| 久久人人爽人人爽| 欧美人体做爰大胆视频| 99精品偷自拍| 国产精品77777| 理论片日本一区| 一区二区三区波多野结衣在线观看| 久久综合九色综合97_久久久| 欧美日韩情趣电影| 日本黄色一区二区| 在线免费不卡电影| 波多野结衣在线aⅴ中文字幕不卡| 日本成人在线不卡视频| 一区二区三区在线视频播放| 亚洲高清视频在线| 亚洲国产高清aⅴ视频| 99久久精品国产观看| 激情图区综合网| 日韩制服丝袜av| 亚洲柠檬福利资源导航| 国产丝袜欧美中文另类| 欧美大胆人体bbbb| 91精品国产综合久久久久久久 | 欧美精品欧美精品系列| 色综合色狠狠天天综合色| 岛国精品在线播放| 国产成人精品免费| 国产美女av一区二区三区| 久久精品国产澳门| 久久99久国产精品黄毛片色诱| 亚洲高清免费观看高清完整版在线观看| 自拍偷拍亚洲激情| 亚洲欧洲精品成人久久奇米网| 久久精品亚洲精品国产欧美| 久久色在线观看| 国产日本欧洲亚洲| 国产精品免费久久久久| 中文字幕av资源一区| 国产精品丝袜91| 国产精品第四页| 亚洲欧美日韩电影| 亚洲综合色成人| 日韩电影网1区2区| 麻豆精品一区二区综合av| 亚洲欧美一区二区三区国产精品| 国产一区二区三区蝌蚪| 91亚洲精品久久久蜜桃网站 | 久久久777精品电影网影网 | 欧美一区二区日韩一区二区| 欧美理论在线播放| 久久午夜老司机| 久久综合九色欧美综合狠狠| 久久精品一区蜜桃臀影院| 中文av字幕一区| 亚洲女同ⅹxx女同tv| 偷窥国产亚洲免费视频| 久久国产精品99精品国产| 丁香亚洲综合激情啪啪综合| 97久久久精品综合88久久| 欧美日高清视频| 欧美精品一区二区三| 中文字幕中文在线不卡住| 亚洲成av人片在线观看| 狠狠色丁香婷综合久久| 91丨porny丨首页| 91精品国产综合久久精品麻豆| 久久久久久99久久久精品网站| 最近中文字幕一区二区三区| 亚洲国产成人精品视频| 国产一区二区成人久久免费影院| a4yy欧美一区二区三区| 69p69国产精品| 国产精品日日摸夜夜摸av| 亚洲成av人综合在线观看| 国产成人在线视频网址| 欧美最新大片在线看| 精品卡一卡二卡三卡四在线| 亚洲欧美偷拍卡通变态| 久久成人麻豆午夜电影| 一本久道久久综合中文字幕| 精品久久一区二区| 一区二区三区精品视频| 国产麻豆精品95视频| 欧美三级一区二区| 日本一区二区三区四区| 日韩av一区二| 欧美性大战xxxxx久久久| 国产区在线观看成人精品 | 一区二区三区四区av| 国产精品综合一区二区| 欧美性色aⅴ视频一区日韩精品| 久久一区二区三区国产精品| 亚洲国产精品久久久久婷婷884 | 不卡视频一二三| 精品久久久久久久久久久久久久久久久 | 欧美中文字幕一区二区三区亚洲| 国产日韩精品一区二区浪潮av| 日韩国产在线观看一区| 色哟哟一区二区在线观看| 国产欧美一区二区精品性| 麻豆精品一区二区av白丝在线| 欧美色网站导航| 玉米视频成人免费看| 成年人网站91| 日本一区二区视频在线观看| 激情文学综合插| 精品人在线二区三区| 亚洲www啪成人一区二区麻豆| 色综合久久久久综合| 国产精品免费aⅴ片在线观看| 在线精品视频一区二区三四| 国产精品美女一区二区| 国产老肥熟一区二区三区| 欧美岛国在线观看| 日韩av一级片| 日韩一区二区三区在线观看| 肉肉av福利一精品导航| 欧美日韩国产片| 天堂va蜜桃一区二区三区| 欧美日韩综合在线免费观看| 亚洲精品日韩专区silk| 一本大道久久a久久综合| 国产精品久久久久9999吃药| 国产精品66部| 国产亚洲欧美激情| 丁香桃色午夜亚洲一区二区三区| 精品久久国产97色综合| 精品无人码麻豆乱码1区2区| 日韩欧美中文字幕公布| 美女免费视频一区二区| 精品国产123| 国产高清精品在线| 中文一区二区完整视频在线观看| 不卡大黄网站免费看| 亚洲精品日韩专区silk| 欧美色视频在线| 日本成人中文字幕在线视频| 日韩午夜av电影| 狠狠v欧美v日韩v亚洲ⅴ| 国产性天天综合网| 99久久综合国产精品| 亚洲免费观看高清在线观看| 色婷婷狠狠综合| 午夜日韩在线观看| 日韩一区二区三区精品视频| 国内精品写真在线观看| 国产精品久久二区二区| 91福利视频久久久久| 免费成人在线观看视频| 国产亚洲成aⅴ人片在线观看 | 国产成人在线影院| 一区二区三区欧美日| 欧美一级日韩免费不卡|