mirror of
https://github.com/NishiOwO/tkwww.git
synced 2025-04-21 16:54:40 +00:00
fixed
This commit is contained in:
parent
dcb5869b78
commit
3af6cb142a
@ -70,8 +70,8 @@ extern int errno;
|
|||||||
#ifndef VMS
|
#ifndef VMS
|
||||||
#ifndef NeXT
|
#ifndef NeXT
|
||||||
#ifndef THINK_C
|
#ifndef THINK_C
|
||||||
extern char *sys_errlist[]; /* see man perror on cernvax */
|
/*extern char *sys_errlist[]; / * see man perror on cernvax */
|
||||||
extern int sys_nerr;
|
/*extern int sys_nerr;*/
|
||||||
#endif /* think c */
|
#endif /* think c */
|
||||||
#endif /* NeXT */
|
#endif /* NeXT */
|
||||||
#endif /* VMS */
|
#endif /* VMS */
|
||||||
@ -107,7 +107,7 @@ PUBLIC int HTInetStatus(where)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ER_NO_TRANS_DONE
|
#ifndef ER_NO_TRANS_DONE
|
||||||
errno < sys_nerr ? sys_errlist[errno] : "Unknown error" );
|
strerror(errno) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else /* VMS */
|
#else /* VMS */
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "HTTP.h"
|
#include "HTTP.h"
|
||||||
|
|
||||||
#define HTTP_VERSION "HTTP/1.0"
|
#define HTTP_VERSION "HTTP/1.1"
|
||||||
#define HTTP2 /* Version is greater than 0.9 */
|
#define HTTP2 /* Version is greater than 0.9 */
|
||||||
|
|
||||||
#define INIT_LINE_SIZE 1024 /* Start with line buffer this big */
|
#define INIT_LINE_SIZE 1024 /* Start with line buffer this big */
|
||||||
@ -310,6 +310,9 @@ PUBLIC int HTLoadHTTP ARGS1 (HTRequest *, request)
|
|||||||
HTAppVersion ? HTAppVersion : "0.0",
|
HTAppVersion ? HTAppVersion : "0.0",
|
||||||
HTLibraryVersion, CR, LF);
|
HTLibraryVersion, CR, LF);
|
||||||
StrAllocCat(command, line);
|
StrAllocCat(command, line);
|
||||||
|
StrAllocCat(command, "Host: ");
|
||||||
|
StrAllocCat(command, HTParse(gate ? gate : arg, "", PARSE_HOST));
|
||||||
|
StrAllocCat(command, "\r\n");
|
||||||
|
|
||||||
#ifdef ACCESS_AUTH
|
#ifdef ACCESS_AUTH
|
||||||
if (request->authorization != NULL) {
|
if (request->authorization != NULL) {
|
||||||
|
@ -108,7 +108,7 @@ HtLoadCmd(dummy, interp, argc, argv)
|
|||||||
|
|
||||||
|
|
||||||
if (!HTLoadAbsolute(argv[1], request)) {
|
if (!HTLoadAbsolute(argv[1], request)) {
|
||||||
if (*interp->result == '\0') {
|
if (*Tcl_GetStringResult(interp) == '\0') {
|
||||||
HTLoadError(request, 500, "Unable to access document.");
|
HTLoadError(request, 500, "Unable to access document.");
|
||||||
}
|
}
|
||||||
HTRequest_delete (request);
|
HTRequest_delete (request);
|
||||||
@ -207,7 +207,7 @@ HtParseNameCmd(dummy, interp, argc, argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tcl_SetResult(interp, HTParse(argv[1], current_address, PARSE_ALL),
|
Tcl_SetResult(interp, HTParse(argv[1], current_address, PARSE_ALL),
|
||||||
TCL_DYNAMIC);
|
TCL_VOLATILE);
|
||||||
free(current_address);
|
free(current_address);
|
||||||
|
|
||||||
return (TCL_OK);
|
return (TCL_OK);
|
||||||
|
@ -68,7 +68,7 @@ ALL_CFLAGS= $(DEFINES) $(INCLUDES) $(CFLAGS)
|
|||||||
WWW_LIB= $(srcdir)/../Library/libwww.a
|
WWW_LIB= $(srcdir)/../Library/libwww.a
|
||||||
TKWWW_LIB= $(srcdir)/../Server/libtkwww.a
|
TKWWW_LIB= $(srcdir)/../Server/libtkwww.a
|
||||||
|
|
||||||
LIBS= $(TK_LIBDIR) $(TCL_LIBDIR) -ltk -ltcl $(XLIBSW) @LIBS@ -lm
|
LIBS= $(TK_LIBDIR) $(TCL_LIBDIR) $(XLIBSW) @LIBS@ -lm
|
||||||
|
|
||||||
objs = binary.init.o binary.tk.o binary.tkbind.o binary.tcllib.o \
|
objs = binary.init.o binary.tk.o binary.tkbind.o binary.tcllib.o \
|
||||||
annotate.o bookmarks.o dialog.o edit.anchor.o \
|
annotate.o bookmarks.o dialog.o edit.anchor.o \
|
||||||
|
@ -133,8 +133,8 @@ main(argc, argv)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (Tk_ParseArgv(interp, (Tk_Window) NULL, &argc, argv, argTable, 0)
|
if (Tk_ParseArgv(interp, (Tk_Window) NULL, &argc, argv, argTable, 0)
|
||||||
!= TCL_OK) {
|
!= TCL_OK){
|
||||||
fprintf(stderr, "%s\n", interp->result);
|
fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -151,15 +151,23 @@ main(argc, argv)
|
|||||||
* Initialize the Tk application.
|
* Initialize the Tk application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mainWindow = Tk_CreateMainWindow(interp, display, "tkWWW", "Tk");
|
/*mainWindow = Tk_CreateMainWindow(interp, display, "tkWWW", "Tk");
|
||||||
if (mainWindow == NULL) {
|
if (mainWindow == NULL) {
|
||||||
fprintf(stderr, "%s\n", interp->result);
|
fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (synchronize) {
|
if (synchronize) {
|
||||||
XSynchronize(Tk_Display(mainWindow), True);
|
XSynchronize(Tk_Display(mainWindow), True);
|
||||||
}
|
}
|
||||||
Tk_GeometryRequest(mainWindow, 200, 200);
|
Tk_GeometryRequest(mainWindow, 200, 200);*/
|
||||||
|
if(Tcl_Init(interp) != TCL_OK){
|
||||||
|
fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
if(Tk_Init(interp) != TCL_OK){
|
||||||
|
fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make command-line arguments available in the Tcl variables "argc"
|
* Make command-line arguments available in the Tcl variables "argc"
|
||||||
@ -196,7 +204,7 @@ main(argc, argv)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (Tcl_AppInit(interp) != TCL_OK) {
|
if (Tcl_AppInit(interp) != TCL_OK) {
|
||||||
fprintf(stderr, "Tcl_AppInit failed: %s\n", interp->result);
|
fprintf(stderr, "Tcl_AppInit failed: %s\n", Tcl_GetStringResult(interp));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -206,7 +214,7 @@ main(argc, argv)
|
|||||||
if (geometry != NULL) {
|
if (geometry != NULL) {
|
||||||
code = Tcl_VarEval(interp, "wm geometry . ", geometry, (char *) NULL);
|
code = Tcl_VarEval(interp, "wm geometry . ", geometry, (char *) NULL);
|
||||||
if (code != TCL_OK) {
|
if (code != TCL_OK) {
|
||||||
fprintf(stderr, "%s\n", interp->result);
|
fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,7 +239,7 @@ main(argc, argv)
|
|||||||
error:
|
error:
|
||||||
msg = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
|
msg = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
msg = interp->result;
|
msg = Tcl_GetStringResult(interp);
|
||||||
}
|
}
|
||||||
fprintf(stderr, "%s\n", msg);
|
fprintf(stderr, "%s\n", msg);
|
||||||
Tcl_Eval(interp, errorExitCmd);
|
Tcl_Eval(interp, errorExitCmd);
|
||||||
|
85
TkWWW/configure
vendored
85
TkWWW/configure
vendored
@ -4692,91 +4692,14 @@ for dir in $PATH; do
|
|||||||
|
|
||||||
echo $testdir
|
echo $testdir
|
||||||
|
|
||||||
ac_fn_c_check_header_compile "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
|
TCL_INCDIR="`pkg-config --cflags tcl`"
|
||||||
if test "x$ac_cv_header_tcl_h" = xyes
|
TK_INCDIR="`pkg-config --cflags tk`"
|
||||||
then :
|
TCL_LIBDIR="`pkg-config --libs tcl`"
|
||||||
|
TK_LIBDIR="`pkg-config --libs tk`"
|
||||||
else case e in #(
|
|
||||||
e)
|
|
||||||
dirs="$testdir/include $testdir/include/tcl $x_includes/tk /usr/local/include"
|
|
||||||
dir=nope
|
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/tcl.h; then
|
|
||||||
dir=$i
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "$dir" = "nope" ; then
|
|
||||||
echo "What directory contains tcl.h (absolute path) ?"
|
|
||||||
read dir
|
|
||||||
fi
|
|
||||||
tclinc=$dir
|
|
||||||
TCL_INCDIR="-I$dir"
|
|
||||||
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
dirs="$testdir/lib $x_libraries /usr/local/lib /usr/pkg/lib"
|
|
||||||
dir=nope
|
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/libtcl.so; then
|
|
||||||
dir=$i
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "$dir" = nope ; then
|
|
||||||
echo "What directory contains libtcl.so ?"
|
|
||||||
read dir
|
|
||||||
fi
|
|
||||||
TCL_LIBDIR="-L$dir"
|
|
||||||
tcllib=$dir
|
|
||||||
|
|
||||||
|
|
||||||
ac_fn_c_check_header_compile "$LINENO" "tk.h" "ac_cv_header_tk_h" "$ac_includes_default"
|
|
||||||
if test "x$ac_cv_header_tk_h" = xyes
|
|
||||||
then :
|
|
||||||
|
|
||||||
else case e in #(
|
|
||||||
e)
|
|
||||||
if test ! -r $tclinc/tk.h ; then
|
|
||||||
dir=nope
|
|
||||||
dirs="$testdir/include $testdir/include/tk $x_includes/tk /usr/local/include"
|
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/tk.h; then
|
|
||||||
dir=$i
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "$dir" = nope ; then
|
|
||||||
echo "What directory contains tk.h?"
|
|
||||||
read dir
|
|
||||||
fi
|
|
||||||
TK_INCDIR="-I$dir"
|
|
||||||
fi
|
|
||||||
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if test ! -r $tcllib/libtk.so ; then
|
|
||||||
dirs="$testdir/lib $x_libraries /usr/local/lib /usr/pkg/lib"
|
|
||||||
dir=nope
|
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/libtk.a; then
|
|
||||||
dir = $i
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "$dir" = nope ; then
|
|
||||||
echo "What directory contains libtk.so?"
|
|
||||||
read dir
|
|
||||||
|
|
||||||
fi
|
|
||||||
TK_LIBDIR="-L$dir"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Add special libraries for solaris
|
# Add special libraries for solaris
|
||||||
|
@ -140,75 +140,14 @@ export testdir
|
|||||||
AC_FIND_PROG_PATH(wish,[testdir=`echo $dir|sed 's%/[^/][^/]*$%%'`])
|
AC_FIND_PROG_PATH(wish,[testdir=`echo $dir|sed 's%/[^/][^/]*$%%'`])
|
||||||
echo $testdir
|
echo $testdir
|
||||||
|
|
||||||
AC_HEADER_CHECK(tcl.h,, [
|
TCL_INCDIR="`pkg-config --cflags tcl`"
|
||||||
dirs="$testdir/include $testdir/include/tcl $x_includes/tk /usr/local/include"
|
TK_INCDIR="`pkg-config --cflags tk`"
|
||||||
dir=nope
|
TCL_LIBDIR="`pkg-config --libs tcl`"
|
||||||
for i in $dirs ; do
|
TK_LIBDIR="`pkg-config --libs tk`"
|
||||||
if test -r $i/tcl.h; then
|
|
||||||
dir=$i
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "$dir" = "nope" ; then
|
|
||||||
echo "What directory contains tcl.h (absolute path) ?"
|
|
||||||
read dir
|
|
||||||
fi
|
|
||||||
tclinc=$dir
|
|
||||||
TCL_INCDIR="-I$dir"
|
|
||||||
AC_SUBST(TCL_INCDIR)
|
AC_SUBST(TCL_INCDIR)
|
||||||
])
|
|
||||||
|
|
||||||
dirs="$testdir/lib $x_libraries /usr/local/lib /usr/pkg/lib"
|
|
||||||
dir=nope
|
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/libtcl.so; then
|
|
||||||
dir=$i
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "$dir" = nope ; then
|
|
||||||
echo "What directory contains libtcl.so ?"
|
|
||||||
read dir
|
|
||||||
fi
|
|
||||||
TCL_LIBDIR="-L$dir"
|
|
||||||
tcllib=$dir
|
|
||||||
AC_SUBST(TCL_LIBDIR)
|
AC_SUBST(TCL_LIBDIR)
|
||||||
|
|
||||||
AC_HEADER_CHECK(tk.h,, [
|
|
||||||
if test ! -r $tclinc/tk.h ; then
|
|
||||||
dir=nope
|
|
||||||
dirs="$testdir/include $testdir/include/tk $x_includes/tk /usr/local/include"
|
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/tk.h; then
|
|
||||||
dir=$i
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "$dir" = nope ; then
|
|
||||||
echo "What directory contains tk.h?"
|
|
||||||
read dir
|
|
||||||
fi
|
|
||||||
TK_INCDIR="-I$dir"
|
|
||||||
fi
|
|
||||||
AC_SUBST(TK_INCDIR)
|
AC_SUBST(TK_INCDIR)
|
||||||
])
|
|
||||||
|
|
||||||
if test ! -r $tcllib/libtk.so ; then
|
|
||||||
dirs="$testdir/lib $x_libraries /usr/local/lib /usr/pkg/lib"
|
|
||||||
dir=nope
|
|
||||||
for i in $dirs ; do
|
|
||||||
if test -r $i/libtk.a; then
|
|
||||||
dir = $i
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "$dir" = nope ; then
|
|
||||||
echo "What directory contains libtk.so?"
|
|
||||||
read dir
|
|
||||||
|
|
||||||
fi
|
|
||||||
TK_LIBDIR="-L$dir"
|
|
||||||
fi
|
|
||||||
AC_SUBST(TK_LIBDIR)
|
AC_SUBST(TK_LIBDIR)
|
||||||
|
|
||||||
# Add special libraries for solaris
|
# Add special libraries for solaris
|
||||||
|
Loading…
x
Reference in New Issue
Block a user