const ev_uint32_t EVUTIL_ISLOWER_TABLE[8] = { 0, 0, 0, 0x7fffffe, 0, 0, 0, 0 };
/* Upper-casing and lowercasing tables to map characters to upper/lowercase
* equivalents. */
-const char EVUTIL_TOUPPER_TABLE[256] = {
+const unsigned char EVUTIL_TOUPPER_TABLE[256] = {
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,
224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
};
-const char EVUTIL_TOLOWER_TABLE[256] = {
+const unsigned char EVUTIL_TOLOWER_TABLE[256] = {
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,
return (myhttp);
}
-EVRPC_HEADER(Message, msg, kill);
-EVRPC_HEADER(NeverReply, msg, kill);
+EVRPC_HEADER(Message, msg, kill)
+EVRPC_HEADER(NeverReply, msg, kill)
-EVRPC_GENERATE(Message, msg, kill);
-EVRPC_GENERATE(NeverReply, msg, kill);
+EVRPC_GENERATE(Message, msg, kill)
+EVRPC_GENERATE(NeverReply, msg, kill)
static int need_input_hook = 0;
static int need_output_hook = 0;
total_received += states[i].received;
total_persec += persec;
total_sq_persec += persec*persec;
- printf("%d: %lf per second\n", i, persec);
+ printf("%d: %f per second\n", i, persec);
}
- printf(" total: %lf per second\n",
+ printf(" total: %f per second\n",
((double)total_received)/cfg_duration);
- printf(" average: %lf per second\n",
+ printf(" average: %f per second\n",
(((double)total_received)/cfg_duration)/cfg_n_connections);
variance = total_sq_persec/cfg_n_connections - total_persec*total_persec/(cfg_n_connections*cfg_n_connections);
- printf(" stddev: %lf per second\n", sqrt(variance));
+ printf(" stddev: %f per second\n", sqrt(variance));
}
static struct option {
"Pushes bytes through a number of possibly rate-limited connections, and\n"
"displays average throughput.\n\n"
" -n INT: Number of connections to open (default: 30)\n"
-" -d INT: Duration of the test in seconds (default: 5 sec)\n"
+" -d INT: Duration of the test in seconds (default: 5 sec)\n");
+ fprintf(stderr,
" -c INT: Connection-rate limit applied to each connection in bytes per second\n"
" (default: None.)\n"
" -g INT: Group-rate limit applied to sum of all usage in bytes per second\n"
DECLARE_CTYPE_FN(ISPRINT)
DECLARE_CTYPE_FN(ISLOWER)
DECLARE_CTYPE_FN(ISUPPER)
-extern const char EVUTIL_TOUPPER_TABLE[];
-extern const char EVUTIL_TOLOWER_TABLE[];
-#define EVUTIL_TOLOWER(c) (EVUTIL_TOLOWER_TABLE[(ev_uint8_t)c])
-#define EVUTIL_TOUPPER(c) (EVUTIL_TOUPPER_TABLE[(ev_uint8_t)c])
+extern const unsigned char EVUTIL_TOUPPER_TABLE[];
+extern const unsigned char EVUTIL_TOLOWER_TABLE[];
+#define EVUTIL_TOLOWER(c) ((char)EVUTIL_TOLOWER_TABLE[(ev_uint8_t)c])
+#define EVUTIL_TOUPPER(c) ((char)EVUTIL_TOUPPER_TABLE[(ev_uint8_t)c])
/** Helper macro. If we know that a given pointer points to a field in a
structure, return a pointer to the structure itself. Used to implement