[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs ChangeLog cvsnt.dep cvsnt.dsp cvsnt.mak wi...
From: |
Jim Hyslop |
Subject: |
[Cvs-cvs] ccvs ChangeLog cvsnt.dep cvsnt.dsp cvsnt.mak wi... |
Date: |
Mon, 10 Jul 2006 20:23:49 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Jim Hyslop <jhyslop> 06/07/10 20:23:48
Modified files:
. : ChangeLog cvsnt.dep cvsnt.dsp cvsnt.mak
windows-NT : ChangeLog Makefile.am Makefile.in config.h
config.h.in config.h.in.in stamp-chi
Added files:
windows-NT : dirent.c dirent.h
Removed files:
windows-NT : ndir.c ndir.h
Log message:
* cvsnt.dsp: remove windows-NT/ndir.(c,h), added
Commit Derek Price's patch to eliminate obsolete ndir.h, with
some
trivial fine-tuning:
* windows-NT/ndir.c, ndir.h: Move to...
* windows-NT/dirent.c, dirent.h: ...here, and modify to meet
POSIX
dirent.h API
* windows-NT/Makefile.am (EXTRA_DIST): Rename ndir.(c,h) to
dirent.(c,h)
* windows-NT/config.h.in.in [HAVE_SYS_DIR_H, HAVE_SYS_NDIR_H]:
Remove
obsolete macros.
[HAVE_DIRENT_H]: Define
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/ChangeLog?cvsroot=cvs&r1=1.1331&r2=1.1332
http://cvs.savannah.gnu.org/viewcvs/ccvs/cvsnt.dep?cvsroot=cvs&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/ccvs/cvsnt.dsp?cvsroot=cvs&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/ccvs/cvsnt.mak?cvsroot=cvs&r1=1.85&r2=1.86
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/ChangeLog?cvsroot=cvs&r1=1.375&r2=1.376
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/Makefile.am?cvsroot=cvs&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/Makefile.in?cvsroot=cvs&r1=1.129&r2=1.130
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/config.h?cvsroot=cvs&r1=1.203&r2=1.204
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/config.h.in?cvsroot=cvs&r1=1.131&r2=1.132
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/config.h.in.in?cvsroot=cvs&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/stamp-chi?cvsroot=cvs&r1=1.114&r2=1.115
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/dirent.c?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/dirent.h?cvsroot=cvs&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/ndir.c?cvsroot=cvs&r1=1.8&r2=0
http://cvs.savannah.gnu.org/viewcvs/ccvs/windows-NT/ndir.h?cvsroot=cvs&r1=1.7&r2=0
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/ChangeLog,v
retrieving revision 1.1331
retrieving revision 1.1332
diff -u -b -r1.1331 -r1.1332
--- ChangeLog 7 Jul 2006 03:32:33 -0000 1.1331
+++ ChangeLog 10 Jul 2006 20:23:48 -0000 1.1332
@@ -1,3 +1,9 @@
+2006-07-10 Jim Hyslop <address@hidden>
+
+ * cvsnt.dsp: remove windows-NT/ndir.(c,h), added
+ windows-NT/dirent.(c,h), per Derek Price's patch
+ * cvsnt.dep, cvsnt.mak: regenerated
+
2006-07-06 Jim Hyslop <address@hidden>
* config.h.in: restored HAVE_NDIR_H (it's required for Windows builds).
Index: cvsnt.dep
===================================================================
RCS file: /cvsroot/cvs/ccvs/cvsnt.dep,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- cvsnt.dep 22 Jun 2006 17:32:34 -0000 1.43
+++ cvsnt.dep 10 Jul 2006 20:23:48 -0000 1.44
@@ -45,7 +45,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -97,7 +97,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -147,7 +147,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -197,7 +197,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -246,7 +246,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -307,7 +307,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -359,7 +359,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -409,7 +409,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -475,7 +475,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -533,7 +533,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -582,7 +582,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -631,7 +631,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -684,7 +684,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -714,7 +714,7 @@
".\src\verify.h"\
".\src\vers_ts.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\pwd.h"\
".\windows-NT\stdbool.h"\
".\windows-NT\stdint.h"\
@@ -722,6 +722,14 @@
".\windows-NT\woe32.h"\
+".\windows-NT\dirent.c" : \
+ ".\lib\timespec.h"\
+ ".\lib\xalloc.h"\
+ ".\windows-NT\config.h"\
+ ".\windows-NT\dirent.h"\
+ ".\windows-NT\woe32.h"\
+
+
.\src\edit.c : \
".\lib\dirname.h"\
".\lib\exit.h"\
@@ -768,7 +776,7 @@
".\src\watch.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -818,7 +826,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -867,7 +875,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -915,7 +923,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -963,7 +971,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1014,7 +1022,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1063,8 +1071,8 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\JmgStat.h"\
- ".\windows-NT\ndir.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1115,7 +1123,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1180,7 +1188,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1232,7 +1240,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1284,7 +1292,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1339,7 +1347,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1394,7 +1402,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1443,7 +1451,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1497,7 +1505,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1547,7 +1555,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1599,7 +1607,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1650,7 +1658,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1705,7 +1713,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1753,7 +1761,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1805,7 +1813,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1855,7 +1863,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1905,7 +1913,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -1916,11 +1924,6 @@
".\windows-NT\woe32.h"\
-".\windows-NT\ndir.c" : \
- ".\lib\xalloc.h"\
- ".\windows-NT\ndir.h"\
-
-
.\src\no_diff.c : \
".\lib\fnmatch.h"\
".\lib\getopt.h"\
@@ -1939,7 +1942,7 @@
".\src\vers_ts.h"\
".\src\wrapper.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\pwd.h"\
".\windows-NT\stdbool.h"\
".\windows-NT\stdint.h"\
@@ -1987,7 +1990,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2038,7 +2041,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2094,7 +2097,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2149,7 +2152,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2199,7 +2202,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2253,7 +2256,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2305,7 +2308,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2356,7 +2359,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2406,7 +2409,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2456,7 +2459,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2506,7 +2509,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2554,7 +2557,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2602,7 +2605,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2666,7 +2669,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2756,7 +2759,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2804,7 +2807,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2852,7 +2855,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2905,7 +2908,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -2971,7 +2974,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -3024,7 +3027,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -3091,7 +3094,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -3129,7 +3132,7 @@
".\src\verify.h"\
".\src\vers_ts.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\pwd.h"\
".\windows-NT\stdbool.h"\
".\windows-NT\stdint.h"\
@@ -3175,7 +3178,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -3223,7 +3226,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -3282,7 +3285,7 @@
".\src\watch.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -3341,7 +3344,7 @@
".\src\wrapper.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
@@ -3390,7 +3393,7 @@
".\src\vers_ts.h"\
".\windows-nt\arpa\inet.h"\
".\windows-NT\config.h"\
- ".\windows-NT\ndir.h"\
+ ".\windows-NT\dirent.h"\
".\windows-NT\netdb.h"\
".\windows-nt\netinet\in.h"\
".\windows-NT\pwd.h"\
Index: cvsnt.dsp
===================================================================
RCS file: /cvsroot/cvs/ccvs/cvsnt.dsp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- cvsnt.dsp 22 Jun 2006 17:32:34 -0000 1.38
+++ cvsnt.dsp 10 Jul 2006 20:23:48 -0000 1.39
@@ -148,6 +148,10 @@
# End Source File
# Begin Source File
+SOURCE=".\windows-NT\dirent.c"
+# End Source File
+# Begin Source File
+
SOURCE=.\src\edit.c
# End Source File
# Begin Source File
@@ -248,10 +252,6 @@
# End Source File
# Begin Source File
-SOURCE=".\windows-NT\ndir.c"
-# End Source File
-# Begin Source File
-
SOURCE=.\src\no_diff.c
# End Source File
# Begin Source File
@@ -444,6 +444,10 @@
# End Source File
# Begin Source File
+SOURCE=".\windows-NT\dirent.h"
+# End Source File
+# Begin Source File
+
SOURCE=.\lib\dirname.h
# End Source File
# Begin Source File
@@ -568,10 +572,6 @@
# End Source File
# Begin Source File
-SOURCE=".\windows-NT\ndir.h"
-# End Source File
-# Begin Source File
-
SOURCE=.\lib\pagealign_alloc.h
# End Source File
# Begin Source File
Index: cvsnt.mak
===================================================================
RCS file: /cvsroot/cvs/ccvs/cvsnt.mak,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -b -r1.85 -r1.86
--- cvsnt.mak 22 Jun 2006 17:32:34 -0000 1.85
+++ cvsnt.mak 10 Jul 2006 20:23:48 -0000 1.86
@@ -66,6 +66,7 @@
address@hidden "$(INTDIR)\cvsrc.obj"
address@hidden "$(INTDIR)\diff.obj"
address@hidden "$(INTDIR)\difflib.obj"
+ address@hidden "$(INTDIR)\dirent.obj"
address@hidden "$(INTDIR)\edit.obj"
address@hidden "$(INTDIR)\entries.obj"
address@hidden "$(INTDIR)\error.obj"
@@ -91,7 +92,6 @@
address@hidden "$(INTDIR)\mkmodules.obj"
address@hidden "$(INTDIR)\modules.obj"
address@hidden "$(INTDIR)\myndbm.obj"
- address@hidden "$(INTDIR)\ndir.obj"
address@hidden "$(INTDIR)\no_diff.obj"
address@hidden "$(INTDIR)\parseinfo.obj"
address@hidden "$(INTDIR)\patch.obj"
@@ -190,6 +190,7 @@
"$(INTDIR)\cvsrc.obj" \
"$(INTDIR)\diff.obj" \
"$(INTDIR)\difflib.obj" \
+ "$(INTDIR)\dirent.obj" \
"$(INTDIR)\edit.obj" \
"$(INTDIR)\entries.obj" \
"$(INTDIR)\error.obj" \
@@ -215,7 +216,6 @@
"$(INTDIR)\mkmodules.obj" \
"$(INTDIR)\modules.obj" \
"$(INTDIR)\myndbm.obj" \
- "$(INTDIR)\ndir.obj" \
"$(INTDIR)\no_diff.obj" \
"$(INTDIR)\parseinfo.obj" \
"$(INTDIR)\patch.obj" \
@@ -299,6 +299,7 @@
address@hidden "$(INTDIR)\cvsrc.obj"
address@hidden "$(INTDIR)\diff.obj"
address@hidden "$(INTDIR)\difflib.obj"
+ address@hidden "$(INTDIR)\dirent.obj"
address@hidden "$(INTDIR)\edit.obj"
address@hidden "$(INTDIR)\entries.obj"
address@hidden "$(INTDIR)\error.obj"
@@ -324,7 +325,6 @@
address@hidden "$(INTDIR)\mkmodules.obj"
address@hidden "$(INTDIR)\modules.obj"
address@hidden "$(INTDIR)\myndbm.obj"
- address@hidden "$(INTDIR)\ndir.obj"
address@hidden "$(INTDIR)\no_diff.obj"
address@hidden "$(INTDIR)\parseinfo.obj"
address@hidden "$(INTDIR)\patch.obj"
@@ -426,6 +426,7 @@
"$(INTDIR)\cvsrc.obj" \
"$(INTDIR)\diff.obj" \
"$(INTDIR)\difflib.obj" \
+ "$(INTDIR)\dirent.obj" \
"$(INTDIR)\edit.obj" \
"$(INTDIR)\entries.obj" \
"$(INTDIR)\error.obj" \
@@ -451,7 +452,6 @@
"$(INTDIR)\mkmodules.obj" \
"$(INTDIR)\modules.obj" \
"$(INTDIR)\myndbm.obj" \
- "$(INTDIR)\ndir.obj" \
"$(INTDIR)\no_diff.obj" \
"$(INTDIR)\parseinfo.obj" \
"$(INTDIR)\patch.obj" \
@@ -600,6 +600,12 @@
$(CPP) $(CPP_PROJ) $(SOURCE)
+SOURCE=".\windows-NT\dirent.c"
+
+"$(INTDIR)\dirent.obj" : $(SOURCE) "$(INTDIR)"
+ $(CPP) $(CPP_PROJ) $(SOURCE)
+
+
SOURCE=.\src\edit.c
"$(INTDIR)\edit.obj" : $(SOURCE) "$(INTDIR)"
@@ -750,12 +756,6 @@
$(CPP) $(CPP_PROJ) $(SOURCE)
-SOURCE=".\windows-NT\ndir.c"
-
-"$(INTDIR)\ndir.obj" : $(SOURCE) "$(INTDIR)"
- $(CPP) $(CPP_PROJ) $(SOURCE)
-
-
SOURCE=.\src\no_diff.c
"$(INTDIR)\no_diff.obj" : $(SOURCE) "$(INTDIR)"
Index: windows-NT/ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/windows-NT/ChangeLog,v
retrieving revision 1.375
retrieving revision 1.376
diff -u -b -r1.375 -r1.376
--- windows-NT/ChangeLog 7 Jul 2006 12:27:02 -0000 1.375
+++ windows-NT/ChangeLog 10 Jul 2006 20:23:48 -0000 1.376
@@ -1,3 +1,14 @@
+2006-07-10 Jim Hyslop <address@hidden>
+
+ Commit Derek Price's patch to eliminate obsolete ndir.h, with some
+ trivial fine-tuning:
+ * ndir.c, ndir.h: Move to...
+ * dirent.c, dirent.h: ...here, and modify to meet POSIX dirent.h API
+ * Makefile.am (EXTRA_DIST): Rename ndir.(c,h) to dirent.(c,h).
+ * config.h.in.in [HAVE_SYS_DIR_H, HAVE_SYS_NDIR_H]: Remove
+ obsolete macros.
+ [HAVE_DIRENT_H]: Define
+
2006-07-07 Derek Price <address@hidden>
* config.h.in.in [HAVE_NDIR_H]: Remove this definition.
Index: windows-NT/Makefile.am
===================================================================
RCS file: /cvsroot/cvs/ccvs/windows-NT/Makefile.am,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- windows-NT/Makefile.am 7 Jul 2006 01:11:17 -0000 1.35
+++ windows-NT/Makefile.am 10 Jul 2006 20:23:48 -0000 1.36
@@ -31,14 +31,13 @@
stamp-chi \
mkconfig.pl \
fix-msvc-mak.pl \
- ndir.h \
+ dirent.c dirent.h \
pwd.h \
rcmd.h \
stdbool.h \
stdint.h \
filesubr.c \
mkdir.c \
- ndir.c \
netdb.h \
pwd.c \
rcmd.c \
Index: windows-NT/Makefile.in
===================================================================
RCS file: /cvsroot/cvs/ccvs/windows-NT/Makefile.in,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -b -r1.129 -r1.130
--- windows-NT/Makefile.in 7 Jul 2006 01:11:17 -0000 1.129
+++ windows-NT/Makefile.in 10 Jul 2006 20:23:48 -0000 1.130
@@ -331,14 +331,13 @@
stamp-chi \
mkconfig.pl \
fix-msvc-mak.pl \
- ndir.h \
+ dirent.c dirent.h \
pwd.h \
rcmd.h \
stdbool.h \
stdint.h \
filesubr.c \
mkdir.c \
- ndir.c \
netdb.h \
pwd.c \
rcmd.c \
Index: windows-NT/config.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/windows-NT/config.h,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -b -r1.203 -r1.204
--- windows-NT/config.h 7 Jul 2006 12:27:02 -0000 1.203
+++ windows-NT/config.h 10 Jul 2006 20:23:48 -0000 1.204
@@ -400,7 +400,7 @@
#undef HAVE_DIRECT_H
/* Define to 1 if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
+#define HAVE_DIRENT_H 1
/* Define to 1 if you have the `dup2' function. */
#define HAVE_DUP2 1
Index: windows-NT/config.h.in
===================================================================
RCS file: /cvsroot/cvs/ccvs/windows-NT/config.h.in,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -b -r1.131 -r1.132
--- windows-NT/config.h.in 7 Jul 2006 12:27:02 -0000 1.131
+++ windows-NT/config.h.in 10 Jul 2006 20:23:48 -0000 1.132
@@ -393,7 +393,7 @@
#undef HAVE_DIRECT_H
/* Define to 1 if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
+#define HAVE_DIRENT_H 1
/* Define to 1 if you have the `dup2' function. */
#define HAVE_DUP2 1
Index: windows-NT/config.h.in.in
===================================================================
RCS file: /cvsroot/cvs/ccvs/windows-NT/config.h.in.in,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- windows-NT/config.h.in.in 7 Jul 2006 12:27:02 -0000 1.54
+++ windows-NT/config.h.in.in 10 Jul 2006 20:23:48 -0000 1.55
@@ -385,7 +385,7 @@
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
-#undef HAVE_DIRENT_H
+#define HAVE_DIRENT_H 1
/* Define to 1 if you have the `dup2' function. */
#define HAVE_DUP2 1
@@ -834,20 +834,12 @@
/* Define to 1 if you have the <sys/cdefs.h> header file. */
#undef HAVE_SYS_CDEFS_H
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-#undef HAVE_SYS_DIR_H
-
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define to 1 if you have the <sys/inttypes.h> header file. */
#undef HAVE_SYS_INTTYPES_H
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-#undef HAVE_SYS_NDIR_H
-
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
Index: windows-NT/stamp-chi
===================================================================
RCS file: /cvsroot/cvs/ccvs/windows-NT/stamp-chi,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -b -r1.114 -r1.115
--- windows-NT/stamp-chi 7 Jul 2006 02:47:10 -0000 1.114
+++ windows-NT/stamp-chi 10 Jul 2006 20:23:48 -0000 1.115
@@ -393,7 +393,7 @@
#undef HAVE_DIRECT_H
/* Define to 1 if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
+#define HAVE_DIRENT_H 1
/* Define to 1 if you have the `dup2' function. */
#define HAVE_DUP2 1
Index: windows-NT/dirent.c
===================================================================
RCS file: windows-NT/dirent.c
diff -N windows-NT/dirent.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ windows-NT/dirent.c 10 Jul 2006 20:23:48 -0000 1.1
@@ -0,0 +1,230 @@
+/* dirent.c - portable directory routines
+ Copyright (C) 1990 by Thorsten Ohl, address@hidden
+ Copyright (C) 2006 The Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details. */
+
+/* Everything non trivial in this code is from: @(#)msd_dir.c 1.4
+ 87/11/06. A public domain implementation of BSD directory routines
+ for MS-DOS. Written by Michael Rendell ({uunet,address@hidden),
+ August 1897 */
+
+/* Minor adaptations made in 2006 by Derek R. Price <address@hidden> to
+ * appear to be <dirent.c> as opposed to its former incarnation as <ndir.c>.
+ */
+
+
+/* Validate API. */
+#include <sys/types.h>
+#include <dirent.h>
+
+#include <io.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include <dos.h>
+#include "xalloc.h"
+
+static void free_dircontents (struct _dircontents *);
+
+/* find ALL files! */
+#define ATTRIBUTES (_A_RDONLY | _A_HIDDEN | _A_SYSTEM | _A_SUBDIR)
+
+
+
+DIR *
+opendir (const char *name)
+{
+ struct _finddata_t find_buf;
+ DIR *dirp;
+ struct _dircontents *dp;
+ char name_buf[_MAX_PATH + 1];
+ char *slash = "";
+ long hFile;
+
+ if (!name)
+ name = "";
+ else if (*name)
+ {
+ const char *s;
+ int l = strlen (name);
+
+ s = name + l - 1;
+ if ( !(l == 2 && *s == ':') && *s != '\\' && *s != '/')
+ slash = "/"; /* save to insert slash between path and "*.*" */
+ }
+
+ strcat (strcat (strcpy (name_buf, name), slash), "*.*");
+
+ dirp = xmalloc (sizeof (DIR));
+ if (!dirp) return NULL;
+
+ dirp->dd_loc = 0;
+ dirp->dd_contents = dirp->dd_cp = NULL;
+
+ if ((hFile = _findfirst (name_buf, &find_buf)) < 0)
+ {
+ free (dirp);
+ return NULL;
+ }
+
+ do
+ {
+ dp = xmalloc (sizeof (struct _dircontents));
+ if (!dp)
+ {
+ free_dircontents (dirp->dd_contents);
+ return NULL;
+ }
+
+ dp->_d_entry = xmalloc (strlen (find_buf.name) + 1);
+ if (!dp->_d_entry)
+ {
+ free (dp);
+ free_dircontents (dirp->dd_contents);
+ return NULL;
+ }
+
+ if (dirp->dd_contents)
+ dirp->dd_cp = dirp->dd_cp->_d_next = dp;
+ else
+ dirp->dd_contents = dirp->dd_cp = dp;
+
+ strcpy (dp->_d_entry, find_buf.name);
+
+ dp->_d_next = NULL;
+
+ } while (!_findnext (hFile, &find_buf));
+
+ dirp->dd_cp = dirp->dd_contents;
+
+ _findclose(hFile);
+
+ return dirp;
+}
+
+
+int
+closedir (DIR *dirp)
+{
+ free_dircontents (dirp->dd_contents);
+ free (dirp);
+ return 0;
+}
+
+
+
+int
+readdir_r (DIR *dirp, struct dirent * restrict dp,
+ struct dirent ** restrict result)
+{
+ if (!dirp->dd_cp)
+ *result = NULL;
+ else
+ {
+ strcpy (dp->d_name, dirp->dd_cp->_d_entry);
+ dp->d_ino = 0;
+ dirp->dd_cp = dirp->dd_cp->_d_next;
+ dirp->dd_loc++;
+ *result = dp;
+ }
+
+ return 0;
+}
+
+
+
+struct dirent *
+readdir (DIR *dirp)
+{
+ static struct dirent dp;
+ static struct dirent *retval;
+ int err = readdir_r (dirp, &dp, &retval);
+ if (err)
+ {
+ errno = err;
+ retval = NULL;
+ }
+ return retval;
+}
+
+
+void
+seekdir (DIR *dirp, long off)
+{
+ long i = off;
+ struct _dircontents *dp;
+
+ if (off < 0)
+ return;
+ for (dp = dirp->dd_contents; --i >= 0 && dp; dp = dp->_d_next)
+ ;
+ dirp->dd_loc = off - (i + 1);
+ dirp->dd_cp = dp;
+}
+
+
+long
+telldir (DIR *dirp)
+{
+ return dirp->dd_loc;
+}
+
+
+/* Garbage collection */
+
+static void
+free_dircontents (struct _dircontents *dp)
+{
+ struct _dircontents *odp;
+
+ while (dp)
+ {
+ if (dp->_d_entry)
+ free (dp->_d_entry);
+ dp = (odp = dp)->_d_next;
+ free (odp);
+ }
+}
+
+
+#ifdef TEST
+
+void main (int argc, char *argv[]);
+
+void
+main (int argc, char *argv[])
+{
+ static DIR *directory;
+ struct dirent *entry = NULL;
+
+ char *name = "";
+
+ if (argc > 1)
+ name = argv[1];
+
+ directory = opendir (name);
+
+ if (!directory)
+ {
+ fprintf (stderr, "can't open directory `%s'.\n", name);
+ exit (2);
+ }
+
+ while (entry = readdir (directory))
+ printf ("> %s\n", entry->d_name);
+
+ printf ("done.\n");
+}
+
+#endif /* TEST */
Index: windows-NT/dirent.h
===================================================================
RCS file: windows-NT/dirent.h
diff -N windows-NT/dirent.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ windows-NT/dirent.h 10 Jul 2006 20:23:48 -0000 1.1
@@ -0,0 +1,65 @@
+/* dirent.h - portable directory routines
+ Copyright (C) 1990 by Thorsten Ohl, address@hidden
+ Copyright (C) 2006 The Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details. */
+
+/* Everything non trivial in this code is taken from: @(#)msd_dir.c 1.4
+ 87/11/06. A public domain implementation of BSD directory routines
+ for MS-DOS. Written by Michael Rendell ({uunet,address@hidden),
+ August 1897 */
+
+/* Minor adaptations made in 2006 by Derek R. Price <address@hidden> to
+ * appear to be <dirent.h> as opposed to its former incarnation as <ndir.h>.
+ */
+
+#ifndef WINDOWSNT_DIRENT_H_INCLUDED
+#define WINDOWSNT_DIRENT_H_INCLUDED
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define rewinddir(dirp) seekdir (dirp, 0L)
+
+/* 255 is said to be big enough for Windows NT. The more elegant
+ solution would be declaring d_name as one byte long and allocating
+ it to the actual size needed. */
+#define MAXNAMLEN 255
+
+struct dirent
+{
+ ino_t d_ino; /* a bit of a farce */
+ char d_name[MAXNAMLEN + 1]; /* garentee null termination */
+};
+
+struct _dircontents
+{
+ char *_d_entry;
+ struct _dircontents *_d_next;
+};
+
+typedef struct _dirdesc
+{
+ int dd_id; /* uniquely identify each open directory */
+ long dd_loc; /* where we are in directory entry is this */
+ struct _dircontents *dd_contents; /* pointer to contents of dir */
+ struct _dircontents *dd_cp; /* pointer to current position */
+} DIR;
+
+int closedir (DIR *);
+DIR *opendir (const char *);
+struct dirent *readdir (DIR *);
+int readdir_r (DIR *, struct dirent *restrict, struct dirent **restrict);
+void seekdir (DIR *, long);
+long telldir (DIR *);
+
+#endif /* WINDOWSNT_DIRENT_H_INCLUDED */
\ No newline at end of file
Index: windows-NT/ndir.c
===================================================================
RCS file: windows-NT/ndir.c
diff -N windows-NT/ndir.c
--- windows-NT/ndir.c 26 May 2005 16:07:12 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,214 +0,0 @@
-/* msd_dir.c - portable directory routines
- Copyright (C) 1990 by Thorsten Ohl, address@hidden
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details. */
-
-/* Everything non trivial in this code is from: @(#)msd_dir.c 1.4
- 87/11/06. A public domain implementation of BSD directory routines
- for MS-DOS. Written by Michael Rendell ({uunet,address@hidden),
- August 1897 */
-
-
-#include <io.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <dos.h>
-
-#include <ndir.h>
-#include "xalloc.h"
-
-static void free_dircontents (struct _dircontents *);
-
-/* find ALL files! */
-#define ATTRIBUTES (_A_RDONLY | _A_HIDDEN | _A_SYSTEM | _A_SUBDIR)
-
-
-
-DIR *
-opendir (const char *name)
-{
- struct _finddata_t find_buf;
- DIR *dirp;
- struct _dircontents *dp;
- char name_buf[_MAX_PATH + 1];
- char *slash = "";
- long hFile;
-
- if (!name)
- name = "";
- else if (*name)
- {
- const char *s;
- int l = strlen (name);
-
- s = name + l - 1;
- if ( !(l == 2 && *s == ':') && *s != '\\' && *s != '/')
- slash = "/"; /* save to insert slash between path and "*.*" */
- }
-
- strcat (strcat (strcpy (name_buf, name), slash), "*.*");
-
- dirp = xmalloc (sizeof (DIR));
- if (!dirp) return NULL;
-
- dirp->dd_loc = 0;
- dirp->dd_contents = dirp->dd_cp = NULL;
-
- if ((hFile = _findfirst (name_buf, &find_buf)) < 0)
- {
- free (dirp);
- return NULL;
- }
-
- do
- {
- dp = xmalloc (sizeof (struct _dircontents));
- if (!dp)
- {
- free_dircontents (dirp->dd_contents);
- return NULL;
- }
-
- dp->_d_entry = xmalloc (strlen (find_buf.name) + 1);
- if (!dp->_d_entry)
- {
- free (dp);
- free_dircontents (dirp->dd_contents);
- return NULL;
- }
-
- if (dirp->dd_contents)
- dirp->dd_cp = dirp->dd_cp->_d_next = dp;
- else
- dirp->dd_contents = dirp->dd_cp = dp;
-
- strcpy (dp->_d_entry, find_buf.name);
-
- dp->_d_next = NULL;
-
- } while (!_findnext (hFile, &find_buf));
-
- dirp->dd_cp = dirp->dd_contents;
-
- _findclose(hFile);
-
- return dirp;
-}
-
-
-void
-closedir (DIR *dirp)
-{
- free_dircontents (dirp->dd_contents);
- free (dirp);
-}
-
-
-struct direct *
-readdir (DIR *dirp)
-{
- static struct direct dp;
-
- if (!dirp->dd_cp) return NULL;
- dp.d_namlen = dp.d_reclen =
- strlen (strcpy (dp.d_name, dirp->dd_cp->_d_entry));
-#if 0 /* JB */
- strlwr (dp.d_name); /* JF */
-#endif
- dp.d_ino = 0;
- dirp->dd_cp = dirp->dd_cp->_d_next;
- dirp->dd_loc++;
-
- return &dp;
-}
-
-
-void
-seekdir (DIR *dirp, long off)
-{
- long i = off;
- struct _dircontents *dp;
-
- if (off < 0)
- return;
- for (dp = dirp->dd_contents; --i >= 0 && dp; dp = dp->_d_next)
- ;
- dirp->dd_loc = off - (i + 1);
- dirp->dd_cp = dp;
-}
-
-
-long
-telldir (DIR *dirp)
-{
- return dirp->dd_loc;
-}
-
-
-/* Garbage collection */
-
-static void
-free_dircontents (struct _dircontents *dp)
-{
- struct _dircontents *odp;
-
- while (dp)
- {
- if (dp->_d_entry)
- free (dp->_d_entry);
- dp = (odp = dp)->_d_next;
- free (odp);
- }
-}
-
-
-#ifdef TEST
-
-void main (int argc, char *argv[]);
-
-void
-main (int argc, char *argv[])
-{
- static DIR *directory;
- struct direct *entry = NULL;
-
- char *name = "";
-
- if (argc > 1)
- name = argv[1];
-
- directory = opendir (name);
-
- if (!directory)
- {
- fprintf (stderr, "can't open directory `%s'.\n", name);
- exit (2);
- }
-
- while (entry = readdir (directory))
- printf ("> %s\n", entry->d_name);
-
- printf ("done.\n");
-}
-
-#endif /* TEST */
-
-/*
- * Local Variables:
- * mode:C
- * ChangeLog:ChangeLog
- * compile-command:make
- * End:
- */
Index: windows-NT/ndir.h
===================================================================
RCS file: windows-NT/ndir.h
diff -N windows-NT/ndir.h
--- windows-NT/ndir.h 26 May 2005 16:07:12 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,62 +0,0 @@
-/* ndir.c - portable directory routines
- Copyright (C) 1990 by Thorsten Ohl, address@hidden
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details. */
-
-/* Everything non trivial in this code is taken from: @(#)msd_dir.c 1.4
- 87/11/06. A public domain implementation of BSD directory routines
- for MS-DOS. Written by Michael Rendell ({uunet,address@hidden),
- August 1897 */
-
-#include <sys/types.h> /* ino_t definition */
-
-#define rewinddir(dirp) seekdir(dirp, 0L)
-
-/* 255 is said to be big enough for Windows NT. The more elegant
- solution would be declaring d_name as one byte long and allocating
- it to the actual size needed. */
-#define MAXNAMLEN 255
-
-struct direct
-{
- ino_t d_ino; /* a bit of a farce */
- int d_reclen; /* more farce */
- int d_namlen; /* length of d_name */
- char d_name[MAXNAMLEN + 1]; /* garentee null termination */
-};
-
-struct _dircontents
-{
- char *_d_entry;
- struct _dircontents *_d_next;
-};
-
-typedef struct _dirdesc
-{
- int dd_id; /* uniquely identify each open directory */
- long dd_loc; /* where we are in directory entry is this */
- struct _dircontents *dd_contents; /* pointer to contents of dir */
- struct _dircontents *dd_cp; /* pointer to current position */
-} DIR;
-
-void seekdir (DIR *, long);
-long telldir (DIR *);
-DIR *opendir (const char *);
-void closedir (DIR *);
-struct direct *readdir (DIR *);
-
-/*
- * Local Variables:
- * mode:C
- * ChangeLog:ChangeLog
- * compile-command:make
- * End:
- */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs ChangeLog cvsnt.dep cvsnt.dsp cvsnt.mak wi...,
Jim Hyslop <=