From: Adam Dickmeiss Date: Fri, 31 May 1996 08:02:54 +0000 (+0000) Subject: Bug fix: egw_enc encoded '/' - it shouldn't. X-Git-Url: http://git.indexdata.com/?p=egate.git;a=commitdiff_plain;h=e2a084bc142e25d6fa9cd7b0b4a853099247303f Bug fix: egw_enc encoded '/' - it shouldn't. --- diff --git a/www/Makefile b/www/Makefile index 168a465..92905ad 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1,7 +1,7 @@ # Makefile for www gateway utility # Europagate, 1995 # -# $Id: Makefile,v 1.39 1996/05/15 18:43:37 adam Exp $ +# $Id: Makefile,v 1.40 1996/05/31 08:02:54 adam Exp $ # SHELL=/bin/sh @@ -13,7 +13,7 @@ IRTCLLIB=$(IRTCLDIR)/libirtcl.a IRTCLINC=-I$(IRTCLDIR) #MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a -#NETLIB=-lnsl -lsocket +#ELIB=-lnsl -lsocket OLIB=../lib/util.a ../lib/libres+log.a TCLLIB=/usr/local/lib/libtcl7.5.a @@ -53,10 +53,10 @@ $(TPROG1): $(P1) $(OLIB) $(TPROG2): $(P2) $(OLIB) $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(IRTCLLIB) \ - $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm + $(ZLIB) $(MOSILIB) $(TCLLIB) $(ELIB) -lm $(TPROG3): $(P3) $(OLIB) - $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB) + $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB) $(ELIB) WAISDIR=../../freeWAIS-sf-2.0 @@ -65,7 +65,7 @@ WAISLIB=$(IRTCLDIR)/wais-tcl.o $(WAISDIR)/ir/libwais.a $(TPROG4): $(P4) $(OLIB) $(CC) $(CFLAGS) -o $(TPROG4) $(P4) \ $(OLIB) $(IRTCLLIB) \ - $(WAISLIB) $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm + $(WAISLIB) $(ZLIB) $(MOSILIB) $(TCLLIB) $(ELIB) -lm install: install.prog install.script install.gif diff --git a/www/wtcl.c b/www/wtcl.c index 5728d56..fea3bfd 100644 --- a/www/wtcl.c +++ b/www/wtcl.c @@ -41,6 +41,9 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. * * $Log: wtcl.c,v $ + * Revision 1.17 1996/05/31 08:02:56 adam + * Bug fix: egw_enc encoded '/' - it shouldn't. + * * Revision 1.16 1996/05/23 15:53:12 adam * Bug fix: egw_enc failed on 8-bit chars. * New command: egw_parms. @@ -299,13 +302,17 @@ static int proc_enc (ClientData clientData, Tcl_Interp *interp, { const char *cp = argv[i]; while (*cp) - { - if (*cp <= ' ' || *cp >= 127 || *cp == '/' || *cp == ' ' || - *cp == '&' || *cp == ':' || *cp == '%') + { + if (*cp < ' ' || *cp >= 127 || *cp == '&' || *cp == '?' + || *cp == '%' || *cp == '+') { sprintf (buf1+1, "%02X", *cp & 0xff); Tcl_AppendResult (interp, buf1, NULL); } + else if (*cp == ' ') + { + Tcl_AppendResult (interp, "+", NULL); + } else { buf2[0] = *cp;