Displaying 9 results from an estimated 9 matches for "dd_name".
Did you mean:
d_name
2009 Feb 11
1
[PATCH 1/1] COM32 API: Add functions for directory use
...255
+#endif
+
+struct dirent {
+ long d_ino; /* Inode/File number */
+ off_t d_size; /* Size of file */
+ mode_t d_mode; /* Type of file */
+ char d_name[NAME_MAX + 1];
+};
+
+typedef struct {
+ short dd_stat; /* status return from last lookup */
+ uint16_t dd_fd;
+ size_t dd_sect;
+ char dd_name[NAME_MAX + 1]; /* directory */
+} DIR;
+
+__extern DIR *opendir(const char *);
+__extern struct dirent *readdir(DIR *);
+__extern int closedir(DIR *);
+__extern DIR *fdopendir(int);
+
+#endif /* Not _DIRENT_H */
diff --git a/com32/include/unistd.h b/com32/include/unistd.h
index d0b8309..c0b52d6 100...
2008 Dec 04
0
[PATCH 1/1] COM32: Add directory functions
...255
+#endif
+
+struct dirent {
+ long d_ino; /* Inode/File number */
+ off_t d_size; /* Size of file */
+ mode_t d_mode; /* Type of file */
+ char d_name[NAME_MAX + 1];
+};
+
+typedef struct {
+ short dd_stat; /* status return from last lookup */
+ uint16_t dd_fd;
+ size_t dd_sect;
+ char dd_name[NAME_MAX + 1]; /* directory */
+} DIR;
+
+__extern DIR *opendir(const char *);
+__extern struct dirent *readdir(DIR *);
+__extern int closedir(DIR *);
+__extern DIR *fdopendir(int);
+
+#endif /* Not _DIRENT_H */
diff --git a/com32/include/unistd.h b/com32/include/unistd.h
index d0b8309..c0b52d6 100...
2009 Mar 06
0
[PATCH 2/3] COM32 API: restructure DIR
...ail.com>
---
Counted incorrectly. Depends on previous patches.
diff --git a/com32/include/dirent.h b/com32/include/dirent.h
index 5161828..a544050 100644
--- a/com32/include/dirent.h
+++ b/com32/include/dirent.h
@@ -29,6 +29,7 @@ typedef struct {
uint16_t dd_fd;
size_t dd_sect;
char dd_name[NAME_MAX + 1]; /* directory */
+ struct dirent dd_de;
} DIR;
__extern DIR *opendir(const char *);
diff --git a/com32/lib/readdir.c b/com32/lib/readdir.c
index 353b61b..c6d991c 100644
--- a/com32/lib/readdir.c
+++ b/com32/lib/readdir.c
@@ -33,21 +33,16 @@ struct dirent *readdir(DIR *dir)
/* Do...
2009 Mar 06
0
[PATCH 1/2] COM32/opendir: remove unneeded zeroing
...ow I need to ignore it. Depends on the string of patches
I've submitted this week
diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c
index 5129273..fe2ee2e 100644
--- a/com32/lib/opendir.c
+++ b/com32/lib/opendir.c
@@ -44,8 +44,6 @@ DIR *opendir(const char *pathname)
strcpy(newdir->dd_name, pathname);
newdir->dd_fd = regs.esi.w[0];
newdir->dd_sect = regs.eax.l;
- newdir->dd_stat = 0;
- errno = 0;
} else {
/* ENOTDIR is another but a file must exist */
errno = ENOENT;
2009 Mar 06
4
rosh patch
...de = readdir(d);
}
closedir(d);
} else if (S_ISREG(fdstat.st_mode)) {
@@ -419,8 +417,7 @@
d = opendir(filestr);
if (d != NULL) {
printf("DIR:'%s' %8d %8d\n", d->dd_name, d->dd_fd, d->dd_sect);
- de = readdir(d);
- while (de != NULL) {
+ while ( de = readdir(d) ) {
filepos++;
#ifdef DO_DEBUG
// if (strlen(de->d_name) > 25)...
2009 Mar 07
3
rosh patch V2
Here is a second version of my patch from last night.
It uses the provided ctype function isspace and does the same readdir().
I remove the rosh_issp() function. I admit to being a bit liberal with my
use of braces and spaces.
We all of the habit of knowing we can invent a more perfect wheel.
Let me know if you have any questions.
Keith
-------------- next part --------------
A non-text
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
...me other file\n", ifilstr);
- printf(" :%s\n", ifilstr);
- }
- } else {
-#ifdef __COM32__
- if (filestr[strlen(filestr)-1] == SEP) {
- /* Directory */
- filepos = 0;
- d = opendir(filestr);
- if (d != NULL) {
-printf("DIR:'%s' %8d %8d\n", d->dd_name, d->dd_fd, d->dd_sect);
- de = readdir(d);
- while (de != NULL) {
- filepos++;
-#ifdef DO_DEBUG
-// if (strlen(de->d_name) > 25) de->d_name[25] = 0;
- switch (de->d_mode) {
- case 16 : ty = 'D'; break;
- case 32 : ty = 'F'; break;
- defaul...
2009 Feb 15
2
COM32 module: Read-Only shell
...me other file\n", ifilstr);
+ printf(" :%s\n", ifilstr);
+ }
+ } else {
+#ifdef __COM32__
+ if (filestr[strlen(filestr)-1] == SEP) {
+ /* Directory */
+ filepos = 0;
+ d = opendir(filestr);
+ if (d != NULL) {
+printf("DIR:'%s' %8d %8d\n", d->dd_name, d->dd_fd, d->dd_sect);
+ de = readdir(d);
+ while (de != NULL) {
+ filepos++;
+#ifdef DO_DEBUG
+// if (strlen(de->d_name) > 25) de->d_name[25] = 0;
+ switch (de->d_mode) {
+ case 16 : ty = 'D'; break;
+ case 32 : ty = 'F'; break;
+ defaul...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...- printf(" :%s\n", ifilstr);
- }
- } else {
-#ifdef __COM32__
- if (filestr[strlen(filestr) - 1] == SEP) {
- /* Directory */
- filepos = 0;
- d = opendir(filestr);
- if (d != NULL) {
- //printf("DIR:'%s' %08x %8d\n", d->dd_name, (int)d->dd_sect,
d->dd_offset);
- de = readdir(d);
- while (de != NULL) {
- filepos++;
-#ifdef DO_DEBUG
-// if (strlen(de->d_name) > 25) de->d_name[25] = 0;
- switch (de->d_type) {
- case 16:
- ty = 'D';
- break;
- case 32:
- ty = 'F';...