Share my knowledge, feel my life. Eric Shan' Blog myBloggie 2.1.6 © 2005   
May 2008 June 2008 Jul 2008
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30      
Categories
About[5]
Blackberry[1]
dotNet and C Charp[1]
IPhone[10]
Life[4]
Unix&Linux[19]
WEB programming[16]
Windows API[5]
Windows Mobile[1]
Windows Multimedia[4]
Recent
CentOS mount CDrom and USB
CentOS GHOST(幽灵)漏洞修复方法
centos 改变语言并立即生效
centos vpn 接通后无法连接internet
让vlc播放中文字幕不出乱码
centos 取消屏保
php中ob_flush和flush的用法
CentOS检查,添加,删除自启动服务
CentOS中开机自动启动某个服务
Top命令中的翻页
Archives
February 2010[4]
September 2009[1]
August 2009[1]
January 2009[7]
October 2008[10]
June 2008[2]
December 2007[14]
November 2007[5]
May 2007[9]
April 2007[3]
March 2007[10]
User List
Eric Shan[66]
Search
Syndication
19 Jun 2008   08:04:12 am
Readdir
http://www-128.ibm.com/developerworks/aix/library/au-unix-readdir.html

The dirent.h functions, opendir(), readdir(), and closedir(), are just what you need. Using them is very similar to the open/read/close idiom you're probably used to using with files, with one exception: the readdir() function returns a pointer to a special structure (of type struct dirent) for each directory entry

dir = opendir( "some/path/name" )
entry = readdir( dir )
while entry is not NULL:
do_something_with( entry )
entry = readdir( dir )
closedir( dir )


int readdir_r(DIR *, struct dirent *, struct dirent **);

struct dirent {
ino_t d_ino; /* file number of entry */
__uint16_t d_reclen; /* length of this record */
__uint8_t d_type; /* file type, see below */
__uint8_t d_namlen; /* length of string in d_name */
char d_name[__DARWIN_MAXNAMLEN + 1]; /* name must be no longer than this */
};


file type is list below,

DT_UNKNOWN
The file type is unknown.
DT_REG
This is a regular file.
DT_DIR
This is a directory.
DT_FIFO
This is a named pipe, or FIFO.
DT_SOCK
This is a Unix domain socket.
DT_CHR
This is a character device.
DT_BLK
This is a block device.
Category : About | Posted By : Eric Shan | Comments[0] | Trackbacks [0]
03 Jun 2008   02:47:04 am
Winchain installation
用WinChain来装Iphone toolchain也是挺省力的事情,下载pretoolchain完后,解压,运行WinChain.1.1,觉得它就是把pretoolchain rename成Cygwin, 然后下载安装一下cgywin,装default的pack.

同样的过程在公司安装就是无法编译,最后发现\usr\local\arm-apple-darwin\include\stdint.h这个link不对了,用\usr\local\arm-apple-darwin\include\gcc\darwin\4.0替换掉.
Category : IPhone | Posted By : Eric Shan | Comments[0] | Trackbacks [0]
 
1
Template theme : aura
Powered by myBloggie Copyright © 2004 2006
-- myWebland --

Sponsed by TNTSoft Store