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

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

?? stdiolib.c

?? vxworks的完整的源代碼
?? C
字號:
/* stdioLib.c - standard I/O library *//* Copyright 1984-1995 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------02j,10feb97,tam  reclaimed resources from the standard file pointers (SPR #7915)02i,11feb95,jdi  doc tweak.02h,05mar93,jdi  documentation cleanup for 5.1.02g,13nov92,dnw  added __std{in,out,err} (SPR #1770)		 made stdInitStd() be LOCAL.		 changed stdioFp() create FILE if it doesn't already exist.02f,20sep92,smb  documentation additions02e,29jul92,smb  added stdioFp().		 Modified the documentation for the new stdio library.02d,29jul92,jcf  taken from stdioLib.c 02c,26may92,rrr  the tree shuffle02b,02apr92,jmm  added free() of memory if bad options passed to fdopen()		 SPR # 139602a,27mar92,jmm  changed fopen() to free memory if the open() fails, SPR #111501z,25nov91,rrr  cleanup of some ansi warnings.01y,12nov91,rrr  removed VARARG_OK, no longer needed with ansi c.01x,07oct91,rrr  junk for r3000 braindamage.01w,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -fixed #else and #endif		  -changed VOID to void		  -changed copyright notice01v,18may91,gae  fixed varargs for 960 with conditional VARARG_OK,		 namely: fscanf, fprintf, and scanf.01u,04apr91,jdi  documentation cleanup; doc review by dnw.01t,10aug90,dnw  added forward declaration of stdioExitStd ().01s,08aug90,dnw  changed incorrect forward declaration for stdioCreateHook().01r,10jun90,dnw  changed to call fioFormatV and fioScanV directly with		   appropriate handling of varargs (removed doscan and doprnt)		 moved all routine implementations of stdio macros to end of		   module so that macros would be used in rest of code		 spr 640: fprintf returns number of chars printed instead of OK		 spr 754: vararg routines no longer limited to 16 args		 fixed coercions to allow void to be defined as void one day.01q,26jun90,jcf  lint.01p,12mar90,jcf  changed std{in,out,err} to macros to fps in tcbx.01o,16feb90,dab  fixed bug in doscan() that wouldn't match characters between		 the input stream and the format specification.01n,03aug89,dab  removed call to creat() in fopen().01m,08apr89,dnw  changed stdioInit() to call taskVarInit().01l,23mar89,dab  changed numerical constants to appropriate defines.		 fixed fseek() to return only OK or ERROR.01k,15nov88,dnw  documentation touchup.01j,23sep88,gae  documentation touchup.01i,13sep88,gae  removed ifdef'd sprintf which got into documentation.01h,06sep88,gae  adjusted some argument declarations to please f2cgen.01g,20aug88,gae  documentation.01f,07jul88,jcf  changed malloc to match new declaration.01e,29jun88,gae  documentation.  Added error messages in stioInit().01d,22jun88,dnw  name tweaks.01c,30may88,dnw  changed to v4 names.01b,28may88,dnw  removed routines that had been excluded with "#if FALSE".		 made stdioFlushBuf LOCAL.		 cleaned up stdio{Init,Exit}Task; improved error msgs.01a,28mar88,gae  created.*//*DESCRIPTIONThis library provides a complete UNIX compatible standard I/O bufferingscheme.  It is beyond the scope of this manual entry to describe all aspectsof the buffering -- see the.I "VxWorks Programmer's Guide:  I/O System"and the Kernighan & Ritchie C manual.  This manual entry primarily highlightsthe differences between the UNIX and VxWorks standard I/O.FILE POINTERSThe routine fopen() creates a file pointer.  Use of the file pointer followsconventional UNIX usage.  In a shared address space, however, and perhaps morecritically, with the VxWorks system symbol table, tasks may not use eachothers' file pointers, at least not without some interlocking mechanism.  If itis necessary to use the same name for a file pointer but have incarnations foreach task, then use task variables; see the manual entry for taskVarLib.FIOLIBSeveral routines normally considered part of standard I/O -- printf(),sscanf(), and sprintf() -- are not implemented in stdio; they areinstead implemented in fioLib.  They do not use the standard I/O bufferingscheme.  They are self-contained, formatted, but unbuffered I/Ofunctions.  This allows a limited amount of formatted I/O to be achievedwithout the overhead of the stdio library.TASK TERMINATIONWhen a task exits, unlike in UNIX, it is the responsibility of the task tofclose() its file pointers, except `stdin', `stdout', and `stderr'.  If atask is to be terminated asynchronously, use kill() and arrange for asignal handler to clean up.INCLUDE FILESstdio.h, taskLib.hAll the macros defined in stdio.h are also implemented as real functions sothat they are available from the VxWorks shell.SEE ALSOfioLib, ioLib, taskVarLib, sigLib, Kernighan & Ritchie C manual,.pG "I/O System"*/#include "vxWorks.h"#include "stdio.h"#include "sys/types.h"#include "ctype.h"#include "ioLib.h"#include "stdlib.h"#include "taskLib.h"#include "taskHookLib.h"#include "stdarg.h"#include "logLib.h"#include "fcntl.h"#include "unistd.h"#include "errnoLib.h"#include "string.h"#include "fioLib.h"#include "classLib.h"#include "private/objLibP.h"#include "private/stdioP.h"#include "private/funcBindP.h"/* locals */LOCAL OBJ_CLASS fpClass;			/* file object class */LOCAL BOOL	stdioInitialized = FALSE;LOCAL BOOL      stdioFpCleanupHookDone = FALSE;/* global variables */CLASS_ID fpClassId = &fpClass;			/* file class id *//********************************************************************************* stdioInit - initialize standard I/O support** This routine installs standard I/O support.  It must be called before* using `stdio' buffering.  If INCLUDE_STDIO is defined in configAll.h, it* is called automatically by the root task usrRoot() in usrConfig.c.** RETURNS:* OK, or ERROR if the standard I/O facilities cannot be installed.*/STATUS stdioInit (void)    {    if ((!stdioInitialized) &&	(classInit (fpClassId, sizeof (FILE), OFFSET (FILE, objCore),		    (FUNCPTR) NULL, (FUNCPTR) NULL, (FUNCPTR) NULL) == OK))	{	_func_fclose	 = fclose;	/* attach fclose vfunc to taskLib */	stdioInitialized = TRUE;	/* we've finished the initialization */	}    return (OK);    }/********************************************************************************* stdioFpCreate - allocate a new FILE structure** RETURNS:* The pointer to newly created file, or NULL if out of memory.** NOMANUAL*/FILE *stdioFpCreate (void)    {    FAST FILE *fp = NULL;    if ((stdioInit () == OK) &&        ((fp = (FILE *)objAlloc (fpClassId)) != NULL))	{	fp->_p		= NULL;			/* no current pointer */	fp->_r		= 0;	fp->_w		= 0;			/* nothing to read or write */	fp->_flags	= 1;			/* caller sets real flags */	fp->_file	= -1;			/* no file */	fp->_bf._base	= NULL;			/* no buffer */	fp->_bf._size	= 0;	fp->_lbfsize	= 0;			/* not line buffered */	fp->_ub._base	= NULL;			/* no ungetc buffer */	fp->_ub._size	= 0;	fp->_lb._base	= NULL;			/* no line buffer */	fp->_lb._size	= 0;	fp->_blksize	= 0;	fp->_offset	= 0;	fp->taskId	= (int) taskIdCurrent;	/* task id might be useful */	objCoreInit (&fp->objCore, fpClassId);	/* validate file object */	}    return (fp);    }/********************************************************************************* stdioFpDestroy - destroy and reclaim resources of specified file pointer** RETURNS:* OK, or ERROR if file pointer could not be destroyed.** NOMANUAL*/STATUS stdioFpDestroy    (    FILE *fp    )    {    /* fclose() deallocates any buffers associated with the file pointer */    objCoreTerminate (&fp->objCore);		/* invalidate file pointer */    return (objFree (fpClassId, (char *) fp));	/* deallocate file pointer */    }/********************************************************************************* stdioStdfpCleanup - reclaim resources from the standard file pointers. ** RETURNS: N/A** NOMANUAL*/LOCAL void stdioStdfpCleanup     (    WIND_TCB *pTcb      /* address of task's TCB */    )    {    int ix;    /* close standard file pointers (stdin, stdout, stderr) if present */    for (ix = 0; ix < 3; ++ix)        if (pTcb->taskStdFp[ix] != NULL)            fclose (pTcb->taskStdFp[ix]);    }/********************************************************************************* stdioInitStd - initialize use of a standard file*/LOCAL STATUS stdioInitStd    (    int stdFd		/* standard file descriptor to initialize (0,1,2) */    )    {    FILE *fp;    if ((fp = stdioFpCreate ()) == NULL)	return (ERROR);    switch (stdFd)	{	case STD_IN:  fp->_flags = __SRD;    break;	/* read only */	case STD_OUT: fp->_flags = __SWR;    break;	/* write only */	case STD_ERR: fp->_flags = __SWRNBF; break;	/* write only unbuf'd */	}    fp->_file = stdFd;				/* standard fd */    taskIdCurrent->taskStdFp[stdFd] = fp;	/* init private file pointer */    /*      * need to deallocated stdout, stdin and stderr FILE structures and      * ressources when a task exits or is deleted. Ressources are reclaimed     * via the taskDeleteHook facility.     */    if (!stdioFpCleanupHookDone &&        ((fp == stdout) || (fp == stdin) || (fp == stderr)))        {        /* initialize  task hook facility if necessary */        if (_func_taskDeleteHookAdd == NULL)            taskHookInit ();                taskDeleteHookAdd ((FUNCPTR) stdioStdfpCleanup);        stdioFpCleanupHookDone = TRUE;        }    return (OK);    }/******************************************************************************** stdioFp - return the standard input/output/error FILE of the current task* * This routine returns the specified standard FILE structure address of the* current task.  It is provided primarily to give access to standard input,* standard output, and standard error from the shell, where the usual* `stdin', `stdout', `stderr' macros cannot be used.** INCLUDE FILES: stdio.h ** RETURNS: The standard FILE structure address of the specified file* descriptor, for the current task.*/FILE * stdioFp     (    int stdFd		/* fd of standard FILE to return (0,1,2) */    )    {    if (taskIdCurrent->taskStdFp [stdFd] == NULL)	stdioInitStd (stdFd);    return (taskIdCurrent->taskStdFp [stdFd]);    }/********************************************************************************* __stdin - get pointer to current task's stdin** This function returns a pointer to the current task's stdin.  If the* current task does not have a stdin then one is created.** NOMANUAL*/FILE ** __stdin (void)    {    if (taskIdCurrent->taskStdFp [STD_IN] == NULL)	stdioInitStd (STD_IN);    return (&taskIdCurrent->taskStdFp [STD_IN]);    }/********************************************************************************* __stdout - get pointer to current task's stdout** This function returns a pointer to the current task's stdout.  If the* current task does not have a stdout then one is created.** NOMANUAL*/FILE ** __stdout (void)    {    if (taskIdCurrent->taskStdFp [STD_OUT] == NULL)	stdioInitStd (STD_OUT);    return (&taskIdCurrent->taskStdFp [STD_OUT]);    }/********************************************************************************* __stderr - get pointer to current task's stderr** This function returns a pointer to the current task's stderr.  If the* current task does not have a stderr then one is created.** NOMANUAL*/FILE ** __stderr (void)    {    if (taskIdCurrent->taskStdFp [STD_ERR] == NULL)	stdioInitStd (STD_ERR);    return (&taskIdCurrent->taskStdFp [STD_ERR]);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕日韩av资源站| 亚洲欧洲日韩一区二区三区| 国产亚洲污的网站| 亚洲一区二区精品久久av| 国模套图日韩精品一区二区| 色先锋久久av资源部| 精品久久国产字幕高潮| 一区二区三区国产精华| 国产成人精品一区二区三区网站观看 | 精品久久一二三区| 亚洲人成精品久久久久久| 久久99国内精品| 欧美无人高清视频在线观看| 国产精品电影一区二区| 国产在线精品视频| 日韩一区二区三区观看| 亚瑟在线精品视频| 91久久一区二区| 国产精品久久久久三级| 国产黑丝在线一区二区三区| 日韩欧美一区中文| 日韩电影在线观看一区| 欧美日韩精品福利| 亚洲一区二区三区精品在线| 色又黄又爽网站www久久| 中文av一区二区| 粉嫩久久99精品久久久久久夜| 日韩欧美久久一区| 久久精品国产999大香线蕉| 欧美肥妇毛茸茸| 亚洲高清在线精品| 在线精品视频一区二区三四| 亚洲人成在线观看一区二区| 99在线视频精品| 亚洲精品视频免费观看| 色综合激情五月| 亚洲午夜激情网站| 56国语精品自产拍在线观看| 亚洲成人中文在线| 884aa四虎影成人精品一区| 日韩电影免费一区| 欧美精品一区二区在线观看| 韩国一区二区三区| 国产精品欧美综合在线| 9i看片成人免费高清| 亚洲欧美日韩国产成人精品影院| 99在线精品视频| 亚洲一区二区三区四区在线| 在线播放国产精品二区一二区四区 | 国产免费久久精品| 在线观看视频一区二区| 国产自产v一区二区三区c| 一级中文字幕一区二区| 一本一道久久a久久精品综合蜜臀| 国产精品成人在线观看| 99久久久无码国产精品| 一区二区三区在线免费视频| 日韩欧美视频一区| 国产成人精品三级麻豆| 亚洲一区二区三区中文字幕 | 免费一级片91| xnxx国产精品| 91香蕉视频污| 婷婷六月综合网| 久久久亚洲综合| 欧洲另类一二三四区| 免费欧美高清视频| 亚洲欧洲三级电影| 日韩网站在线看片你懂的| 成人av一区二区三区| 亚洲成人免费在线| 国产精品私房写真福利视频| 欧美丝袜自拍制服另类| 国产精品99久久久久久有的能看| 亚洲另类在线视频| 久久亚洲二区三区| 欧美日韩在线三级| 不卡一区二区三区四区| 欧美aaaaaa午夜精品| 亚洲欧洲综合另类| 欧美大胆人体bbbb| 色婷婷激情久久| 国产乱妇无码大片在线观看| 久久99久久久欧美国产| 亚洲欧美一区二区在线观看| 欧美一区二区三区性视频| 99久久久精品| 国产aⅴ精品一区二区三区色成熟| 亚洲一卡二卡三卡四卡五卡| 国产精品视频观看| 久久综合色鬼综合色| 欧美军同video69gay| 在线欧美日韩国产| 成人小视频在线观看| 久久草av在线| 人人爽香蕉精品| 亚洲国产欧美在线| 综合久久久久久久| 国产清纯白嫩初高生在线观看91 | 色综合久久久久综合99| 国产一区欧美一区| 轻轻草成人在线| 污片在线观看一区二区| 一区二区三区 在线观看视频| 欧美国产一区视频在线观看| 精品欧美黑人一区二区三区| 欧美一区二区成人| 欧美一区二区在线看| 欧美日韩精品福利| 欧美日韩在线观看一区二区| 一本到不卡免费一区二区| av在线不卡免费看| 成人午夜精品一区二区三区| 国产91精品在线观看| 国产一区二区美女| 国产一区二区在线电影| 精品无人码麻豆乱码1区2区 | 欧美人狂配大交3d怪物一区| 在线免费不卡电影| 欧美怡红院视频| 欧美剧在线免费观看网站 | 亚欧色一区w666天堂| 五月天久久比比资源色| 日本欧美大码aⅴ在线播放| 毛片一区二区三区| 九九视频精品免费| 国产成人亚洲综合a∨婷婷| 国产凹凸在线观看一区二区| 成人h动漫精品一区二区| 99精品在线观看视频| 欧美三级在线播放| 日韩视频免费观看高清完整版| 欧美精品一区二区三区高清aⅴ| 久久欧美中文字幕| 国产精品国产自产拍高清av| 亚洲美女免费在线| 亚洲电影中文字幕在线观看| 男男成人高潮片免费网站| 精品无人码麻豆乱码1区2区| 波多野结衣中文字幕一区二区三区 | 日韩1区2区日韩1区2区| 久久精品国产99| 风间由美一区二区av101| 一本高清dvd不卡在线观看| 91精品国产一区二区人妖| 久久一区二区三区四区| 亚洲欧美日本在线| 麻豆中文一区二区| 成人性生交大片免费看视频在线 | 国产精品理论片在线观看| 亚洲自拍都市欧美小说| 青青青爽久久午夜综合久久午夜| 国产精品123区| 欧美在线观看视频一区二区 | 日韩一级片在线观看| 久久久久久9999| 亚洲最大成人综合| 激情五月婷婷综合| 欧美丝袜丝nylons| 久久九九久精品国产免费直播| 亚洲精品国产一区二区精华液| 日韩av电影免费观看高清完整版在线观看| 国产精品综合av一区二区国产馆| 日本乱人伦aⅴ精品| 久久―日本道色综合久久| 亚洲综合视频网| 成人99免费视频| 久久日韩粉嫩一区二区三区 | 91黄视频在线观看| 久久久精品综合| 午夜精品一区二区三区免费视频 | 久久久久国产精品人| 亚洲成av人片在www色猫咪| 成人自拍视频在线| 日韩欧美aaaaaa| 亚洲国产成人porn| 亚洲在线观看免费视频| 国产欧美日韩在线| 91久久免费观看| 三级成人在线视频| 亚洲欧美日韩精品久久久久| 色就色 综合激情| 91女人视频在线观看| 欧美大黄免费观看| 日本在线不卡视频| 在线亚洲+欧美+日本专区| 欧美国产精品一区| 国产成人自拍在线| 精品国产99国产精品| 天天操天天综合网| 欧美日韩成人综合| 亚洲地区一二三色| 欧美日韩国产一级片| 亚洲一区二区在线免费看| 色8久久人人97超碰香蕉987| 最新热久久免费视频| 99精品视频在线观看| 欧美激情综合五月色丁香| 成人在线视频首页| 国产精品久久久久9999吃药|