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

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

?? dirent.c

?? linux下電話本所依賴的一些圖形庫
?? C
字號:
/* * dirent.c * This file has no copyright assigned and is placed in the Public Domain. * This file is a part of the mingw-runtime package. * No warranty is given; refer to the file DISCLAIMER within the package. * * Derived from DIRLIB.C by Matt J. Weinstein  * This note appears in the DIRLIB.H * DIRLIB.H by M. J. Weinstein   Released to public domain 1-Jan-89 * * Updated by Jeremy Bettis <jeremy@hksys.com> * Significantly revised and rewinddir, seekdir and telldir added by Colin * Peters <colin@fu.is.saga-u.ac.jp> *	 */#include <stdlib.h>#include <errno.h>#include <string.h>#include <io.h>#include <direct.h>#include <dirent.h>#define WIN32_LEAN_AND_MEAN#include <windows.h> /* for GetFileAttributes */#include <tchar.h>#ifdef _UNICODE#define _tdirent	_wdirent#define _TDIR 		_WDIR#define _topendir	_wopendir#define _tclosedir	_wclosedir#define _treaddir	_wreaddir#define _trewinddir	_wrewinddir#define _ttelldir	_wtelldir#define _tseekdir	_wseekdir#else#define _tdirent	dirent#define _TDIR 		DIR#define _topendir	opendir#define _tclosedir	closedir#define _treaddir	readdir#define _trewinddir	rewinddir#define _ttelldir	telldir#define _tseekdir	seekdir#endif#define SUFFIX	_T("*")#define	SLASH	_T("\\")/* * opendir * * Returns a pointer to a DIR structure appropriately filled in to begin * searching a directory. */_TDIR * _topendir (const _TCHAR *szPath){  _TDIR *nd;  unsigned int rc;  _TCHAR szFullPath[MAX_PATH];	  errno = 0;  if (!szPath)    {      errno = EFAULT;      return (_TDIR *) 0;    }  if (szPath[0] == _T('\0'))    {      errno = ENOTDIR;      return (_TDIR *) 0;    }  /* Attempt to determine if the given path really is a directory. */  rc = GetFileAttributes (szPath);  if (rc == (unsigned int)-1)    {      /* call GetLastError for more error info */      errno = ENOENT;      return (_TDIR *) 0;    }  if (!(rc & FILE_ATTRIBUTE_DIRECTORY))    {      /* Error, entry exists but not a directory. */      errno = ENOTDIR;      return (_TDIR *) 0;    }  /* Make an absolute pathname.  */  _tfullpath (szFullPath, szPath, MAX_PATH);  /* Allocate enough space to store DIR structure and the complete   * directory path given. */  nd = (_TDIR *) malloc (sizeof (_TDIR) + (_tcslen(szFullPath) + _tcslen (SLASH) +			 _tcslen(SUFFIX) + 1) * sizeof(_TCHAR));  if (!nd)    {      /* Error, out of memory. */      errno = ENOMEM;      return (_TDIR *) 0;    }  /* Create the search expression. */  _tcscpy (nd->dd_name, szFullPath);  /* Add on a slash if the path does not end with one. */  if (nd->dd_name[0] != _T('\0') &&      nd->dd_name[_tcslen (nd->dd_name) - 1] != _T('/') &&      nd->dd_name[_tcslen (nd->dd_name) - 1] != _T('\\'))    {      _tcscat (nd->dd_name, SLASH);    }  /* Add on the search pattern */  _tcscat (nd->dd_name, SUFFIX);  /* Initialize handle to -1 so that a premature closedir doesn't try   * to call _findclose on it. */  nd->dd_handle = -1;  /* Initialize the status. */  nd->dd_stat = 0;  /* Initialize the dirent structure. ino and reclen are invalid under   * Win32, and name simply points at the appropriate part of the   * findfirst_t structure. */  nd->dd_dir.d_ino = 0;  nd->dd_dir.d_reclen = 0;  nd->dd_dir.d_namlen = 0;  memset (nd->dd_dir.d_name, 0, FILENAME_MAX);  return nd;}/* * readdir * * Return a pointer to a dirent structure filled with the information on the * next entry in the directory. */struct _tdirent *_treaddir (_TDIR * dirp){  errno = 0;  /* Check for valid DIR struct. */  if (!dirp)    {      errno = EFAULT;      return (struct _tdirent *) 0;    }  if (dirp->dd_stat < 0)    {      /* We have already returned all files in the directory       * (or the structure has an invalid dd_stat). */      return (struct _tdirent *) 0;    }  else if (dirp->dd_stat == 0)    {      /* We haven't started the search yet. */      /* Start the search */      dirp->dd_handle = _tfindfirst (dirp->dd_name, &(dirp->dd_dta));  	  if (dirp->dd_handle == -1)	{	  /* Whoops! Seems there are no files in that	   * directory. */	  dirp->dd_stat = -1;	}      else	{	  dirp->dd_stat = 1;	}    }  else    {      /* Get the next search entry. */      if (_tfindnext (dirp->dd_handle, &(dirp->dd_dta)))	{	  /* We are off the end or otherwise error.		     _findnext sets errno to ENOENT if no more file	     Undo this. */ 	  DWORD winerr = GetLastError();	  if (winerr == ERROR_NO_MORE_FILES)	    errno = 0;		  _findclose (dirp->dd_handle);	  dirp->dd_handle = -1;	  dirp->dd_stat = -1;	}      else	{	  /* Update the status to indicate the correct	   * number. */	  dirp->dd_stat++;	}    }  if (dirp->dd_stat > 0)    {      /* Successfully got an entry. Everything about the file is       * already appropriately filled in except the length of the       * file name. */      dirp->dd_dir.d_namlen = _tcslen (dirp->dd_dta.name);      _tcscpy (dirp->dd_dir.d_name, dirp->dd_dta.name);      return &dirp->dd_dir;    }  return (struct _tdirent *) 0;}/* * closedir * * Frees up resources allocated by opendir. */int_tclosedir (_TDIR * dirp){  int rc;  errno = 0;  rc = 0;  if (!dirp)    {      errno = EFAULT;      return -1;    }  if (dirp->dd_handle != -1)    {      rc = _findclose (dirp->dd_handle);    }  /* Delete the dir structure. */  free (dirp);  return rc;}/* * rewinddir * * Return to the beginning of the directory "stream". We simply call findclose * and then reset things like an opendir. */void_trewinddir (_TDIR * dirp){  errno = 0;  if (!dirp)    {      errno = EFAULT;      return;    }  if (dirp->dd_handle != -1)    {      _findclose (dirp->dd_handle);    }  dirp->dd_handle = -1;  dirp->dd_stat = 0;}/* * telldir * * Returns the "position" in the "directory stream" which can be used with * seekdir to go back to an old entry. We simply return the value in stat. */long_ttelldir (_TDIR * dirp){  errno = 0;  if (!dirp)    {      errno = EFAULT;      return -1;    }  return dirp->dd_stat;}/* * seekdir * * Seek to an entry previously returned by telldir. We rewind the directory * and call readdir repeatedly until either dd_stat is the position number * or -1 (off the end). This is not perfect, in that the directory may * have changed while we weren't looking. But that is probably the case with * any such system. */void_tseekdir (_TDIR * dirp, long lPos){  errno = 0;  if (!dirp)    {      errno = EFAULT;      return;    }  if (lPos < -1)    {      /* Seeking to an invalid position. */      errno = EINVAL;      return;    }  else if (lPos == -1)    {      /* Seek past end. */      if (dirp->dd_handle != -1)	{	  _findclose (dirp->dd_handle);	}      dirp->dd_handle = -1;      dirp->dd_stat = -1;    }  else    {      /* Rewind and read forward to the appropriate index. */      _trewinddir (dirp);      while ((dirp->dd_stat < lPos) && _treaddir (dirp))	;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
有码一区二区三区| 最新国产の精品合集bt伙计| 99久久er热在这里只有精品66| 日本va欧美va欧美va精品| 亚洲大型综合色站| 亚洲va中文字幕| 欧美aaaaa成人免费观看视频| 婷婷一区二区三区| 久久激五月天综合精品| 蜜桃av一区二区| 精品系列免费在线观看| 国产一区二区在线视频| 丁香啪啪综合成人亚洲小说| 99久久精品情趣| 欧美日韩色一区| 日韩免费高清视频| 国产精品乱人伦中文| 亚洲综合久久久| 狂野欧美性猛交blacked| 国产福利一区二区三区视频在线 | 欧美激情艳妇裸体舞| 国产精品天美传媒| 亚洲国产精品嫩草影院| 久久精品国产免费看久久精品| 国产一级精品在线| 91久久精品国产91性色tv| 欧美一区二区三区免费大片| 国产日韩成人精品| 午夜精品一区二区三区三上悠亚| 精品一区二区三区欧美| 99久久久精品| 精品国内二区三区| 亚洲人亚洲人成电影网站色| 午夜精品影院在线观看| jlzzjlzz欧美大全| 欧美一区二区三区白人| 亚洲免费观看高清在线观看| 久久99精品国产麻豆婷婷| 在线一区二区视频| 国产亚洲1区2区3区| 香蕉成人啪国产精品视频综合网| 狠狠色丁香久久婷婷综合丁香| 99久久国产综合精品麻豆| 欧美大度的电影原声| 亚洲男帅同性gay1069| 国产福利一区在线| 日韩欧美色综合网站| 亚洲小说欧美激情另类| 不卡的电影网站| 精品国免费一区二区三区| 亚洲高清视频中文字幕| 91视频你懂的| 国产精品色在线观看| 久久国产综合精品| 91精品国产综合久久福利| 亚洲精品乱码久久久久久| 99在线精品观看| 欧美激情自拍偷拍| 极品少妇xxxx精品少妇偷拍| 7777精品伊人久久久大香线蕉的| 亚洲黄色性网站| 91女人视频在线观看| 国产精品你懂的在线欣赏| 国产在线精品一区二区夜色| 日韩一区二区三区免费观看| 亚洲国产cao| 欧美久久免费观看| 午夜激情一区二区三区| 欧美日韩在线综合| 性做久久久久久免费观看| 欧美性xxxxx极品少妇| 亚洲一区国产视频| 欧美三级电影在线看| 亚洲国产成人av网| 欧美高清性hdvideosex| 日韩成人一区二区三区在线观看| 欧美性大战久久| 五月婷婷激情综合| 欧美一区二区日韩一区二区| 日本特黄久久久高潮| 欧美成人一区二区三区片免费 | 亚洲伊人伊色伊影伊综合网| 欧美综合色免费| 香蕉成人伊视频在线观看| 91精品国产入口在线| 美日韩一区二区| 久久久青草青青国产亚洲免观| 国产凹凸在线观看一区二区| 亚洲欧洲精品一区二区三区| 色婷婷激情综合| 丝袜美腿成人在线| 久久久久国产精品人| 91网站黄www| 日韩成人精品在线| 久久天天做天天爱综合色| 99久精品国产| 日韩和欧美一区二区三区| 精品盗摄一区二区三区| av电影在线不卡| 天使萌一区二区三区免费观看| 久久亚洲一区二区三区明星换脸| 成人av免费在线| 图片区小说区区亚洲影院| 国产视频一区二区在线观看| 成人激情小说网站| 婷婷国产v国产偷v亚洲高清| 国产三级一区二区| 欧美日韩高清一区| www.亚洲在线| 日韩黄色片在线观看| 中文字幕在线免费不卡| 日韩欧美专区在线| 91老司机福利 在线| 蜜桃视频在线观看一区| 亚洲色图视频网| 精品国产乱码久久久久久浪潮| 国产一区二区三区香蕉| 亚洲电影一区二区| 国产精品欧美经典| 欧美mv日韩mv国产网站| 在线免费观看视频一区| 国产98色在线|日韩| 日韩高清国产一区在线| 中文字幕在线不卡| 久久久www免费人成精品| 欧美精选一区二区| 色综合天天综合色综合av | 亚洲精品水蜜桃| 国产性色一区二区| 日韩欧美国产精品一区| 欧美视频精品在线| 91亚洲精品久久久蜜桃网站| 国产精品66部| 国产精品66部| 国产一区二区三区视频在线播放| 亚洲一区二区视频在线观看| 国产精品久久久久久妇女6080| 久久久噜噜噜久久中文字幕色伊伊 | 亚洲亚洲人成综合网络| 亚洲欧洲精品成人久久奇米网| 久久综合色之久久综合| 欧美成人一区二区三区在线观看 | 国产成人福利片| 国产成人精品免费视频网站| 黄色成人免费在线| 国精产品一区一区三区mba视频 | 欧美日韩你懂得| 欧美在线|欧美| 欧美做爰猛烈大尺度电影无法无天| www.成人在线| 91麻豆高清视频| 在线观看亚洲成人| 欧美日韩极品在线观看一区| 91福利在线免费观看| 色狠狠综合天天综合综合| 色婷婷精品久久二区二区蜜臂av | 亚洲综合激情另类小说区| 亚洲视频综合在线| 伊人色综合久久天天人手人婷| 亚洲精品国产无套在线观| 亚洲一区二区成人在线观看| 亚洲1区2区3区4区| 精品一区二区三区视频在线观看 | 制服丝袜国产精品| 精品国产乱码久久久久久牛牛 | 国产一区二区三区四区在线观看| 国产一区二区在线视频| av午夜一区麻豆| 色丁香久综合在线久综合在线观看| 欧美性受xxxx黑人xyx性爽| 欧美一级精品大片| 久久网这里都是精品| ...av二区三区久久精品| 亚洲高清中文字幕| 国模娜娜一区二区三区| 色婷婷一区二区三区四区| 欧美一区二区三区人| 中文字幕免费不卡| 日韩有码一区二区三区| 国模套图日韩精品一区二区| 91一区二区三区在线观看| 欧美日韩激情在线| 中文字幕不卡在线| 日韩激情一区二区| 成人精品在线视频观看| 欧美日韩成人综合天天影院 | 亚洲国产aⅴ天堂久久| 国产一区二区三区在线观看免费 | 欧美精品日韩综合在线| 国产婷婷一区二区| 亚洲一区二区三区国产| 国产精品1024| 欧美人体做爰大胆视频| 国产精品久久看| 麻豆免费精品视频| 欧美色精品天天在线观看视频| 久久奇米777| 麻豆国产精品官网| 色激情天天射综合网| 国产精品美女久久久久av爽李琼|