107 |
|
#endif |
108 |
|
#endif |
109 |
|
|
110 |
< |
#if defined(_PSP) || defined(__ps2sdk__) |
110 |
> |
#if defined(_PSP) || defined(__ps2sdk__) || defined(__bsdi__) |
111 |
|
#include "strptime.h" |
112 |
|
#endif |
113 |
|
|
620 |
|
time_t t; |
621 |
|
struct tm* btm; |
622 |
|
strptime(req.headers[i + 1], "%a, %d %b %Y %H:%M:%S GMT", &tm); |
623 |
< |
#if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__USLC__) || defined(__NeXT__) |
623 |
> |
#if defined(__MINGW32__) || defined(_PSP) || defined(__PPU__) || defined(__ps2sdk__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__USLC__) || defined(__NeXT__) || defined(__bsdi__) |
624 |
|
t = 0; |
625 |
|
btm = localtime(&t); |
626 |
|
cmtime = mktime(&tm); |
791 |
|
addstring(&str, " <tr>\n"); |
792 |
|
addstring(&str, " <th></th>\n"); |
793 |
|
addstring(&str, " <th>Filename</th>\n"); |
794 |
+ |
addstring(&str, " <th>Last-modified</th>\n"); |
795 |
|
addstring(&str, " <th>MIME</th>\n"); |
796 |
|
addstring(&str, " <th>Size</th>\n"); |
797 |
|
addstring(&str, " </tr>\n"); |
809 |
|
char* fpth = cm_strcat3(path, "/", items[i]); |
810 |
|
struct stat s; |
811 |
|
char size[512]; |
812 |
+ |
char date[512]; |
813 |
|
char* showmime; |
814 |
|
char* mime; |
815 |
+ |
struct tm* tm; |
816 |
|
size[0] = 0; |
817 |
|
stat(fpth, &s); |
818 |
+ |
tm = localtime(&s.st_mtime); |
819 |
+ |
strftime(date, 512, "%a, %d %b %Y %H:%M:%S %Z", tm); |
820 |
|
if(phase == 0 && !S_ISDIR(s.st_mode)) { |
821 |
|
free(fpth); |
822 |
|
continue; |
890 |
|
addstring(&str, "<tr>\n"); |
891 |
|
addstring(&str, " <td><img src=\"%s\" alt=\"icon\"></td>\n", icon); |
892 |
|
addstring(&str, " <td><a href=\"%l\"><code>%h</code></a></td>\n", items[i], itm); |
893 |
+ |
addstring(&str, " <td><code> %h </code></td>\n", date); |
894 |
|
addstring(&str, " <td><code> %h </code></td>\n", showmime); |
895 |
|
addstring(&str, " <td><code> %s </code></td>\n", size); |
896 |
|
addstring(&str, "</tr>\n"); |
1019 |
|
fd_set fdset; |
1020 |
|
struct timeval tv; |
1021 |
|
#endif |
1022 |
< |
#if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__NETWARE__)) |
1022 |
> |
#if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__NETWARE__) && !defined(__DOS__)) |
1023 |
|
struct thread_entry threads[2048]; |
1024 |
|
for(i = 0; i < sizeof(threads) / sizeof(threads[0]); i++) { |
1025 |
|
threads[i].used = false; |