Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 71572c0

Browse files
committed
Revert "Merge pull request #111 from msysgit/fix-https-prompt"
This reverts commit b08b38a, reversing changes made to bac2422.
1 parent b08b38a commit 71572c0

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

compat/mingw.c

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "../strbuf.h"
66
#include "../run-command.h"
77
#include "../cache.h"
8-
#include "../string-list.h"
98

109
static const int delay[] = { 0, 1, 10, 20, 40 };
1110
unsigned int _CRT_fmode = _O_BINARY;
@@ -406,60 +405,12 @@ int mingw_fgetc(FILE *stream)
406405
return ch;
407406
}
408407

409-
static struct string_list_item dos_device_names_items[] = {
410-
{ "AUX", NULL},
411-
{ "CLOCK$", NULL},
412-
{ "COM1", NULL},
413-
{ "COM2", NULL},
414-
{ "COM3", NULL},
415-
{ "COM4", NULL},
416-
{ "CON", NULL},
417-
{ "CONERR$", NULL},
418-
{ "CONIN$", NULL},
419-
{ "CONOUT$", NULL},
420-
{ "LPT1", NULL},
421-
{ "LPT2", NULL},
422-
{ "LPT3", NULL},
423-
{ "NUL", NULL},
424-
{ "PRN", NULL},
425-
{ "aux", NULL},
426-
{ "clock$", NULL},
427-
{ "com1", NULL},
428-
{ "com2", NULL},
429-
{ "com3", NULL},
430-
{ "com4", NULL},
431-
{ "con", NULL},
432-
{ "conerr$", NULL},
433-
{ "conin$", NULL},
434-
{ "conout$", NULL},
435-
{ "lpt1", NULL},
436-
{ "lpt2", NULL},
437-
{ "lpt3", NULL},
438-
{ "nul", NULL},
439-
{ "prn", NULL}
440-
};
441-
442-
static struct string_list dos_device_names = {
443-
&dos_device_names_items[0], ARRAY_SIZE(dos_device_names_items),
444-
0, 0, NULL
445-
};
446-
447-
static int is_dos_device_name(const char *filename)
448-
{
449-
return filename && !strchr(filename, '/') &&
450-
string_list_has_string(&dos_device_names, filename);
451-
}
452-
453408
#undef fopen
454409
FILE *mingw_fopen (const char *filename, const char *otype)
455410
{
456411
int hide = 0;
457412
FILE *file;
458413
wchar_t wfilename[MAX_PATH], wotype[4];
459-
460-
if (is_dos_device_name(filename))
461-
return fopen(filename, otype);
462-
463414
if (hide_dotfiles == HIDE_DOTFILES_TRUE &&
464415
basename((char*)filename)[0] == '.')
465416
hide = access(filename, F_OK);
@@ -474,16 +425,11 @@ FILE *mingw_fopen (const char *filename, const char *otype)
474425
return file;
475426
}
476427

477-
#undef freopen
478428
FILE *mingw_freopen (const char *filename, const char *otype, FILE *stream)
479429
{
480430
int hide = 0;
481431
FILE *file;
482432
wchar_t wfilename[MAX_PATH], wotype[4];
483-
484-
if (is_dos_device_name(filename))
485-
return freopen(filename, otype, stream);
486-
487433
if (hide_dotfiles == HIDE_DOTFILES_TRUE &&
488434
basename((char*)filename)[0] == '.')
489435
hide = access(filename, F_OK);

0 commit comments

Comments
 (0)