martin 98/07/29 03:14:41
Modified:src/support ab.c
Log:
Added EBCDIC support to ApacheBench
Revision ChangesPath
1.11 +8 -0 apache-1.3/src/support/ab.c
Index: ab.c
===
RCS file: /home/cvs/apache-1.3/src/support/ab.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -u -r1.10 -r1.11
--- ab.c 1998/07/15 18:33:12 1.10
+++ ab.c 1998/07/29 10:14:40 1.11
@@ -382,7 +382,11 @@
int l = 4;
int space = CBUFFSIZE - c->cbx - 1; /* -1 to allow for 0
terminator */
int tocopy = (space < r) ? space : r;
+#ifndef CHARSET_EBCDIC
memcpy(c->cbuff + c->cbx, buffer, space);
+#else /*CHARSET_EBCDIC*/
+ascii2ebcdic(c->cbuff + c->cbx, buffer, space);
+#endif /*CHARSET_EBCDIC*/
c->cbx += tocopy;
space -= tocopy;
c->cbuff[c->cbx] = 0; /* terminate for benefit of strstr */
@@ -526,6 +530,10 @@
hostname);
reqlen = strlen(request);
+
+#ifdef CHARSET_EBCDIC
+ebcdic2ascii(request, request, reqlen);
+#endif /*CHARSET_EBCDIC*/
/* ok - lets start */
gettimeofday(&start, 0);