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

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

?? stdiolib.c

?? vxwork源代碼
?? 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一区二区三区免费野_久草精品视频
精品sm捆绑视频| 国产福利电影一区二区三区| 99精品久久只有精品| 欧美激情一区在线| 从欧美一区二区三区| 亚洲欧洲日韩在线| 日本精品一区二区三区高清 | 欧美色精品在线视频| 亚洲国产成人porn| 精品国产网站在线观看| 风间由美性色一区二区三区| 亚洲日本韩国一区| 制服丝袜亚洲精品中文字幕| 精品在线播放午夜| 中文字幕免费不卡| 欧美日韩国产小视频| 极品少妇xxxx精品少妇| 国产精品伦一区| 欧美日韩一区二区三区四区| 国产在线麻豆精品观看| **欧美大码日韩| 欧美日韩成人综合天天影院| 国内不卡的二区三区中文字幕| 国产精品毛片大码女人| 欧美一区二区网站| 不卡的看片网站| 亚洲国产日韩av| 国产人成一区二区三区影院| 蜜臀av性久久久久蜜臀aⅴ| 9191精品国产综合久久久久久| 久久国产尿小便嘘嘘尿| 中文字幕中文字幕在线一区| 日韩午夜在线播放| 91麻豆产精品久久久久久 | 国产美女精品人人做人人爽 | 亚洲mv大片欧洲mv大片精品| 欧美国产97人人爽人人喊| 欧美日韩精品专区| 成人aa视频在线观看| 蜜臀久久久久久久| 亚洲美女视频一区| 欧美精品一区二区三区在线播放 | 国内精品久久久久影院薰衣草| 亚洲精品乱码久久久久久黑人 | 中文字幕精品一区二区三区精品 | 色域天天综合网| 久久精工是国产品牌吗| 亚洲一区在线观看免费观看电影高清| 久久久久久久电影| 91精品国产综合久久小美女| 91麻豆国产精品久久| 粉嫩av一区二区三区在线播放| 日韩影院免费视频| 亚洲欧美二区三区| 国产精品入口麻豆九色| 久久先锋资源网| 欧美精品色综合| 欧美中文字幕亚洲一区二区va在线 | 亚洲欧美日韩国产成人精品影院| 精品乱人伦小说| 欧美美女直播网站| 在线观看区一区二| 色天天综合色天天久久| 99在线精品视频| 粉嫩绯色av一区二区在线观看| 国产一区二区网址| 国产美女精品人人做人人爽| 免费观看一级欧美片| 五月激情六月综合| 亚洲成年人影院| 性做久久久久久免费观看欧美| 一区二区三区日韩| 一区二区三区四区蜜桃 | 91精品国产综合久久久久| 色综合久久88色综合天天免费| 91在线观看地址| 色网综合在线观看| 在线一区二区三区| 欧美视频在线观看一区二区| 欧美性大战久久久| 欧美精品色综合| 日韩丝袜情趣美女图片| 精品国产一区二区三区av性色| 精品国产不卡一区二区三区| 精品国产一区二区精华| 国产嫩草影院久久久久| 中文字幕精品三区| 亚洲欧美电影院| 天堂资源在线中文精品| 日本在线不卡视频| 激情小说亚洲一区| 国产精品一区一区三区| 不卡一区在线观看| 色菇凉天天综合网| 欧美一区二区视频在线观看2022| 精品国产一区二区三区四区四| 国产日产欧美一区二区三区 | 亚洲国产精品影院| 日韩**一区毛片| 国产精品白丝jk白祙喷水网站 | 99久久婷婷国产综合精品电影 | 国产在线视频一区二区| 成人深夜福利app| 欧美亚男人的天堂| 欧美精品一区在线观看| 国产精品嫩草99a| 亚洲不卡在线观看| 国产成人午夜电影网| 色视频一区二区| 欧美电视剧免费全集观看| 国产精品久久久久aaaa樱花 | 欧美国产日韩精品免费观看| 亚洲品质自拍视频网站| 美国三级日本三级久久99| 成人免费看的视频| 91精品国产91热久久久做人人| 美女久久久精品| 欧美性感一类影片在线播放| 欧美一区二区美女| 国产精品欧美久久久久无广告| 亚洲免费在线视频| 国产一区视频导航| 在线观看欧美精品| 久久精品欧美日韩| 日韩精品福利网| av电影在线观看一区| 日韩精品中文字幕一区二区三区 | 成人深夜视频在线观看| 欧美男男青年gay1069videost| 亚洲国产岛国毛片在线| 日韩av午夜在线观看| 91啪亚洲精品| 久久伊99综合婷婷久久伊| 亚洲自拍另类综合| 国产激情一区二区三区四区 | 久久婷婷久久一区二区三区| 亚洲一区免费观看| 国产69精品久久777的优势| 91精品在线一区二区| 美女精品自拍一二三四| 91视频一区二区| 久久综合九色综合欧美98| 午夜日韩在线电影| 不卡av在线免费观看| 亚洲精品在线网站| 美腿丝袜亚洲综合| 欧美日韩一区久久| 亚洲精品视频在线观看网站| 粉嫩av一区二区三区粉嫩| 久久先锋影音av鲁色资源网| 免费看欧美美女黄的网站| 91精彩视频在线| 中文字幕一区二区三区色视频 | 成人免费一区二区三区在线观看| 国产美女主播视频一区| 日韩色在线观看| 婷婷开心久久网| 欧美乱熟臀69xxxxxx| 亚洲一二三四区不卡| 欧美在线免费观看视频| 一区二区三区免费网站| 91麻豆精东视频| 亚洲激情五月婷婷| 91片黄在线观看| 亚洲精品免费在线| 欧美三区在线观看| 性感美女极品91精品| 欧美日韩午夜在线视频| 亚洲bt欧美bt精品777| 7777精品伊人久久久大香线蕉经典版下载 | 国产精品88av| 国产日产欧美一区二区视频| 成人综合婷婷国产精品久久 | 精品久久久久香蕉网| 国产一区二区视频在线| 国产精品丝袜91| a4yy欧美一区二区三区| 一区二区三区欧美| 91精品国产欧美日韩| 久久97超碰国产精品超碰| 国产色一区二区| 99久久久免费精品国产一区二区| 亚洲欧美日韩国产成人精品影院| 欧美视频一二三区| 免费xxxx性欧美18vr| 久久精品视频一区| 91农村精品一区二区在线| 亚洲成av人片在线观看无码| 欧美变态口味重另类| 成人免费毛片片v| 一区二区在线看| 日韩一区二区精品在线观看| 国产凹凸在线观看一区二区| 自拍偷拍国产精品| 欧美精品在线一区二区三区| 国产一区二区不卡在线| 亚洲精品亚洲人成人网| 日韩三级中文字幕| www.66久久| 日韩成人dvd|