mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
More MS-DOS fixes.
This commit is contained in:
parent
7415b33b6c
commit
aa85e6cb46
@ -1,13 +1,23 @@
|
|||||||
|
2009-09-06 Gisle Vanem <gvanem@broadpark.no>
|
||||||
|
|
||||||
|
* Makefile.WC: Added compilation of new file msdos.c.
|
||||||
|
Simplified; no need to have explicit rules for files in ./lib and
|
||||||
|
./md5. Just use the suffix search path mechanism in wmake.
|
||||||
|
|
||||||
|
2009-09-06 Gisle Vanem <gvanem@broadpark.no>
|
||||||
|
|
||||||
|
* Makefile.DJ: Added compilation of new file msdos.c.
|
||||||
|
|
||||||
2009-09-05 Gisle Vanem <gvanem@broadpark.no>
|
2009-09-05 Gisle Vanem <gvanem@broadpark.no>
|
||||||
|
|
||||||
* config.h: Added 'HAVE_ALLOCA_H' for Watcom 1.5+. Added
|
* config.h: Added 'HAVE_ALLOCA_H' for Watcom 1.5+. Added
|
||||||
'USE_WATT32' since all DOS-targets use the Watt-32 tcp/ip stack.
|
'USE_WATT32' since all DOS-targets use the Watt-32 tcp/ip stack.
|
||||||
Added meaningless dummy LOCALEDIR.
|
Added meaningless dummy LOCALEDIR.
|
||||||
|
|
||||||
* Makefile.wc: A much needed update. Added rules for many files
|
* Makefile.WC: A much needed update. Added rules for many files
|
||||||
in ./lib, css.c and version.c.
|
in ./lib, css.c and version.c.
|
||||||
|
|
||||||
* Makefile.dj: A much needed update. Added rules for css.c and
|
* Makefile.DJ: A much needed update. Added rules for css.c and
|
||||||
version.c.
|
version.c.
|
||||||
|
|
||||||
2008-01-25 Micah Cowan <micah@cowan.name>
|
2008-01-25 Micah Cowan <micah@cowan.name>
|
||||||
|
@ -11,7 +11,7 @@ VERSION = 1.12 (djgpp/DOS)
|
|||||||
|
|
||||||
.SUFFIXES: .exe
|
.SUFFIXES: .exe
|
||||||
|
|
||||||
VPATH = ../lib ../md5
|
VPATH = ../lib ../md5 ../msdos
|
||||||
|
|
||||||
USE_OPENSSL = 0
|
USE_OPENSSL = 0
|
||||||
USE_IPV6 = 1
|
USE_IPV6 = 1
|
||||||
@ -48,6 +48,7 @@ SOURCES += cmpt.c connect.c cookies.c exits.c ftp.c ftp-basic.c ftp-ls.c \
|
|||||||
init.c log.c main.c gen-md5.c netrc.c progress.c recur.c \
|
init.c log.c main.c gen-md5.c netrc.c progress.c recur.c \
|
||||||
res.c retr.c snprintf.c url.c utils.c version.c convert.c \
|
res.c retr.c snprintf.c url.c utils.c version.c convert.c \
|
||||||
ptimer.c spider.c css.c css-url.c build_info.c ../md5/md5.c \
|
ptimer.c spider.c css.c css-url.c build_info.c ../md5/md5.c \
|
||||||
|
../msdos/msdos.c \
|
||||||
$(addprefix ../lib/, error.c exitfail.c quote.c \
|
$(addprefix ../lib/, error.c exitfail.c quote.c \
|
||||||
quotearg.c getopt.c getopt1.c xalloc-die.c xmalloc.c)
|
quotearg.c getopt.c getopt1.c xalloc-die.c xmalloc.c)
|
||||||
|
|
||||||
|
@ -12,6 +12,11 @@ COMPILE = *wcc386 -mf -3r -w3 -d2 -zq -zm -of -I. -I$(%watt_root)\inc &
|
|||||||
LINK = *wlink option quiet, map, verbose, eliminate, caseexact, stack=100k &
|
LINK = *wlink option quiet, map, verbose, eliminate, caseexact, stack=100k &
|
||||||
debug all system dos32a
|
debug all system dos32a
|
||||||
|
|
||||||
|
.c: ..\lib
|
||||||
|
.c: ..\md5
|
||||||
|
.c: ..\msdos
|
||||||
|
|
||||||
|
|
||||||
OBJ_DIR = WC_DOS.obj
|
OBJ_DIR = WC_DOS.obj
|
||||||
|
|
||||||
OBJECTS = $(OBJ_DIR)\cmpt.obj $(OBJ_DIR)\build_info.obj &
|
OBJECTS = $(OBJ_DIR)\cmpt.obj $(OBJ_DIR)\build_info.obj &
|
||||||
@ -23,7 +28,7 @@ OBJECTS = $(OBJ_DIR)\cmpt.obj $(OBJ_DIR)\build_info.obj &
|
|||||||
$(OBJ_DIR)\ftp-ls.obj $(OBJ_DIR)\ftp-opie.obj &
|
$(OBJ_DIR)\ftp-ls.obj $(OBJ_DIR)\ftp-opie.obj &
|
||||||
$(OBJ_DIR)\ftp.obj $(OBJ_DIR)\gen-md5.obj &
|
$(OBJ_DIR)\ftp.obj $(OBJ_DIR)\gen-md5.obj &
|
||||||
$(OBJ_DIR)\getopt.obj $(OBJ_DIR)\getopt1.obj &
|
$(OBJ_DIR)\getopt.obj $(OBJ_DIR)\getopt1.obj &
|
||||||
$(OBJ_DIR)\getpass.obj $(OBJ_DIR)\hash.obj &
|
$(OBJ_DIR)\hash.obj $(OBJ_DIR)\msdos.obj &
|
||||||
$(OBJ_DIR)\host.obj $(OBJ_DIR)\html-parse.obj &
|
$(OBJ_DIR)\host.obj $(OBJ_DIR)\html-parse.obj &
|
||||||
$(OBJ_DIR)\html-url.obj $(OBJ_DIR)\http.obj &
|
$(OBJ_DIR)\html-url.obj $(OBJ_DIR)\http.obj &
|
||||||
$(OBJ_DIR)\init.obj $(OBJ_DIR)\log.obj &
|
$(OBJ_DIR)\init.obj $(OBJ_DIR)\log.obj &
|
||||||
@ -46,50 +51,6 @@ $(OBJ_DIR):
|
|||||||
.c{$(OBJ_DIR)}.obj: .AUTODEPEND
|
.c{$(OBJ_DIR)}.obj: .AUTODEPEND
|
||||||
*$(COMPILE) -fo=$@ $[@
|
*$(COMPILE) -fo=$@ $[@
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\c-ctype.obj: ..\lib\c-ctype.c
|
|
||||||
*$(COMPILE) -fo=$@ $[@
|
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\exitfail.obj: ..\lib\exitfail.c
|
|
||||||
*$(COMPILE) -fo=$@ $[@
|
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\error.obj: ..\lib\error.c
|
|
||||||
*$(COMPILE) -fo=$@ $[@
|
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\getopt.obj: ..\lib\getopt.c
|
|
||||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\getopt1.obj: ..\lib\getopt1.c
|
|
||||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\getpass.obj: ..\lib\getpass.c
|
|
||||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\md5.obj: ..\md5\md5.c
|
|
||||||
*$(COMPILE) -fo=$@ $[@
|
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\xmalloc.obj: ..\lib\xmalloc.c
|
|
||||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\xalloc-die.obj: ..\lib\xalloc-die.c
|
|
||||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\quote.obj: ..\lib\quote.c
|
|
||||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\quotearg.obj: ..\lib\quotearg.c
|
|
||||||
*$(COMPILE) -d_UNISTD_H_INCLUDED -fo=$@ $[@
|
|
||||||
|
|
||||||
css.c: css.l
|
css.c: css.l
|
||||||
flex -8 -o$@ $[@
|
flex -8 -o$@ $[@
|
||||||
|
|
||||||
|
109
msdos/msdos.c
Normal file
109
msdos/msdos.c
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
<div class="moz-text-flowed" style="font-family: -moz-fixed">/* MSDOS utility functions.
|
||||||
|
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Wget.
|
||||||
|
|
||||||
|
GNU Wget 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 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
GNU Wget 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.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with Wget. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Additional permission under GNU GPL version 3 section 7
|
||||||
|
|
||||||
|
If you modify this program, or any covered work, by linking or
|
||||||
|
combining it with the OpenSSL project's OpenSSL library (or a
|
||||||
|
modified version of that library), containing parts covered by the
|
||||||
|
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
|
||||||
|
grants you additional permission to convey the resulting work.
|
||||||
|
Corresponding Source for a non-source form of such a combination
|
||||||
|
shall include the source code for the parts of OpenSSL used as well
|
||||||
|
as that of the covered work. */
|
||||||
|
|
||||||
|
#include "wget.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <conio.h>
|
||||||
|
|
||||||
|
/* This variable (i.e. MB_CUR_MAX) is set here so that we force a unibyte
|
||||||
|
locale in ../lib/quotearg.c. */
|
||||||
|
#ifdef __DJGPP__
|
||||||
|
int __dj_mb_cur_max = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __WATCOMC__
|
||||||
|
/* These is just a dummy function to make Wget link. These are never called
|
||||||
|
because 'unibyte_locale == 1' in ../lib/quotearg.c. */
|
||||||
|
int mbsinit (void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int mbrtowc (void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int iswprint (void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* __WATCOMC__ */
|
||||||
|
|
||||||
|
|
||||||
|
#define PASS_MAX 512
|
||||||
|
|
||||||
|
/* Get a user string with echo off. Handy for entering passwords. The prompt
|
||||||
|
optional. */
|
||||||
|
char *
|
||||||
|
getpass (const char *prompt)
|
||||||
|
{
|
||||||
|
char getpassbuf[PASS_MAX + 1];
|
||||||
|
size_t i = 0;
|
||||||
|
int c;
|
||||||
|
|
||||||
|
if (prompt)
|
||||||
|
{
|
||||||
|
fputs (prompt, stderr);
|
||||||
|
fflush (stderr);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
c = getch ();
|
||||||
|
if (c == '\r')
|
||||||
|
{
|
||||||
|
getpassbuf[i] = '\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (i < PASS_MAX)
|
||||||
|
{
|
||||||
|
getpassbuf[i++] = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i >= PASS_MAX)
|
||||||
|
{
|
||||||
|
getpassbuf[i] = '\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prompt)
|
||||||
|
{
|
||||||
|
fputs ("\r\n", stderr);
|
||||||
|
fflush (stderr);
|
||||||
|
}
|
||||||
|
|
||||||
|
return strdup (getpassbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user