#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/hpack-tbl.h>
#include "../../src/hpack-tbl.c"
#include <haproxy/api.h>
#include <common/buf.h>
#include <common/chunk.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/istbuf.h>
#include <common/memory.h>
#include <haproxy/api.h>
#include <common/buf.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/memory.h>
#include <haproxy/api.h>
#include <common/standard.h>
#include <common/buf.h>
-#include <common/ist.h>
+#include <import/ist.h>
/* FCGI protocol version */
#define FCGI_VERSION 0x1
#include <common/buffer.h>
#include <common/http.h>
#include <common/http-hdr.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/standard.h>
#include <haproxy/api.h>
#include <common/http-hdr.h>
#include <common/htx.h>
-#include <common/ist.h>
+#include <import/ist.h>
/* indexes of most important pseudo headers can be simplified to an almost
#include <haproxy/api.h>
#include <common/buf.h>
#include <common/http.h>
-#include <common/ist.h>
+#include <import/ist.h>
int hpack_encode_header(struct buffer *out, const struct ist n,
const struct ist v);
#include <stdlib.h>
#include <haproxy/api.h>
#include <common/http-hdr.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/memory.h>
/* Dynamic Headers Table, usable for tables up to 4GB long and values of 64kB-1.
#define _COMMON_HTTP_HDR_H
#include <inttypes.h>
-#include <common/ist.h>
+#include <import/ist.h>
/* a header field made of a name and a value. Such structure stores 4 longs so
* it takes 16 bytes on 32-bit systems and 32 bytes on 64-bit systems.
#define _COMMON_HTTP_H
#include <common/buf.h>
-#include <common/ist.h>
+#include <import/ist.h>
/*
* some macros mainly used when parsing header fields.
#include <stdio.h>
#include <haproxy/api.h>
#include <common/buf.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/http.h>
#include <common/http-hdr.h>
#include <common/standard.h>
#include <inttypes.h>
#include <common/buf.h>
-#include <common/ist.h>
+#include <import/ist.h>
/* b_isteq() : returns > 0 if the first <n> characters of buffer <b> starting
/*
- * include/common/ist.h
+ * include/import/ist.h
* Very simple indirect string manipulation functions.
*
- * Copyright (C) 2014-2017 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2014-2020 Willy Tarreau - w@1wt.eu
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#ifndef _COMMON_IST_H
-#define _COMMON_IST_H
+#ifndef _IMPORT_IST_H
+#define _IMPORT_IST_H
+#include <sys/types.h>
#include <ctype.h>
+#include <stddef.h>
#include <string.h>
-#include <unistd.h>
#ifndef IST_FREESTANDING
#include <stdlib.h>
#endif
-#include <haproxy/api.h>
-
/* ASCII to lower case conversion table */
#define _IST_LC ((const unsigned char[256]){ \
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \
last += sizeof(long);
if (__builtin_expect(curr < last, 0)) {
do {
- if ((uint8_t)*curr < 0x20)
+ if ((unsigned char)*curr < 0x20)
return curr;
curr++;
} while (curr < last);
/* Allocate at least 1 byte to allow duplicating an empty string with
* malloc implementations that return NULL for a 0-size allocation.
*/
- struct ist dst = istalloc(MAX(src_size, 1));
+ struct ist dst = istalloc(src_size ? src_size : 1);
if (isttest(dst)) {
istcpy(&dst, src, src_size);
#define _PROTO_CONNECTION_H
#include <haproxy/api.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/memory.h>
#include <types/connection.h>
#include <types/listener.h>
#define _PROTO_H1_HTX_H
#include <common/buf.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/h1.h>
int h1_parse_msg_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx *dsthtx,
#define _PROTO_HTTP_HTX_H
#include <common/buf.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/regex.h>
#include <types/http_htx.h>
#define _PROTO_RING_H
#include <stdlib.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <types/ring.h>
struct ring *ring_new(size_t size);
#include <haproxy/api.h>
#include <common/buffer.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/mini-clist.h>
#include <types/log.h>
#include <types/sink.h>
#include <import/ebpttree.h>
#include <common/standard.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/mini-clist.h>
#include <common/regex.h>
#include <common/buf.h>
#include <sys/socket.h>
#include <haproxy/api-t.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <types/listener.h>
#include <types/obj_type.h>
#define _TYPES_HTTP_FCGI_H
#include <haproxy/api-t.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/fcgi.h>
#include <common/mini-clist.h>
#include <common/regex.h>
#include <haproxy/api-t.h>
#include <common/hathreads.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <types/port_range.h>
/* Direction for each FD event update */
#include <common/buf.h>
#include <common/http.h>
#include <common/htx.h>
-#include <common/ist.h>
+#include <import/ist.h>
/* Context used to find/remove an HTTP header. */
struct http_hdr_ctx {
#include <haproxy/api-t.h>
#include <common/buf.h>
-#include <common/ist.h>
+#include <import/ist.h>
/* The code below handles circular buffers with single-producer and multiple
* readers (up to 255). The buffer storage area must remain always allocated.
#include <haproxy/api-t.h>
#include <common/buffer.h>
-#include <common/ist.h>
+#include <import/ist.h>
/* A sink may be of 4 distinct types :
* - file descriptor (such as stdout)
#include <haproxy/api-t.h>
#include <common/buffer.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/mini-clist.h>
#include <types/sink.h>
#include <common/buf.h>
#include <common/debug.h>
#include <common/hathreads.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/net_helper.h>
#include <common/standard.h>
#include <haproxy/api.h>
#include <common/h2.h>
#include <common/http-hdr.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <types/global.h>
struct h2_frame_definition h2_frame_definition[H2_FT_ENTRIES] = {
#include <common/hpack-tbl.h>
#include <common/chunk.h>
#include <common/h2.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <types/global.h>
#include <common/hpack-enc.h>
#include <common/http-hdr.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <types/global.h>
#include <common/hpack-huff.h>
#include <common/hpack-tbl.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <types/global.h>
#include <common/fcgi.h>
#include <common/h1.h>
#include <common/htx.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/mini-clist.h>
#include <common/net_helper.h>
#include <haproxy/api.h>
#include <common/cfgparse.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/mini-clist.h>
#include <common/time.h>
#include <proto/cli.h>
#include <haproxy/api.h>
#include <common/buffer.h>
-#include <common/ist.h>
+#include <import/ist.h>
#include <common/mini-clist.h>
#include <proto/cli.h>
#include <proto/log.h>