Changeset 1945
- Timestamp:
- May 2, 2005, 4:48:50 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/lib/misc/dirent.c
-
Property cvs2svn:cvs-rev
changed from
1.8
to1.9
r1944 r1945 162 162 LIBCLOG_ENTER("dirp=%p pdent=%p ppdent=%p\n", (void *)dirp, (void *)pdent, (void *)ppdent); 163 163 int cch; 164 struct _dircontents *pd; 164 165 /* done? */ 165 if (dirp->dd_cp == NULL) 166 pd = dirp->dd_cp; 167 if (pd == NULL) 166 168 { 167 169 //errno = ENOENT; … … 173 175 * Copy the data over to the entry. 174 176 */ 175 cch = strlen( dirp->dd_cp->_d_entry);176 memcpy(pdent->d_name, dirp->dd_cp->_d_entry, cch + 1);177 cch = strlen(pd->_d_entry); 178 memcpy(pdent->d_name, pd->_d_entry, cch + 1); 177 179 pdent->d_namlen = cch; 178 180 pdent->d_reclen = pdent->d_namlen; … … 180 182 if (_readdir_ino == 0) 181 183 _readdir_ino = 1; 182 pdent->d_type = (pd ent->d_attr & A_DIR) ? DT_DIR : DT_REG;183 pdent->d_size = dirp->dd_cp->_d_size;184 pdent->d_ attr = dirp->dd_cp->_d_attr;185 pdent->d_ time = dirp->dd_cp->_d_time;186 pdent->d_ date = dirp->dd_cp->_d_date;184 pdent->d_type = (pd->_d_attr & A_DIR) ? DT_DIR : DT_REG; 185 pdent->d_size = pd->_d_size; 186 pdent->d_time = pd->_d_time; 187 pdent->d_date = pd->_d_date; 188 pdent->d_attr = pd->_d_attr; 187 189 188 190 /* 189 191 * Advance the stream and return successfully. 190 192 */ 191 dirp->dd_cp = dirp->dd_cp->_d_next;193 dirp->dd_cp = pd->_d_next; 192 194 dirp->dd_loc++; 193 195 *ppdent = pdent; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.