Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-09-28 12:34:51 +0400
committerIgor Sysoev <igor@sysoev.ru>2004-09-28 12:34:51 +0400
commitd90282d8ba69973d6612c405e52636085623ddcd (patch)
tree59e36e780b2f5b8f9348013d3037f8fc06ba0247 /src/core
parent6d2a14aa906b1d576d5151b2410b59cfcab5edd4 (diff)
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Diffstat (limited to 'src/core')
-rw-r--r--src/core/nginx.c5
-rw-r--r--src/core/nginx.h6
-rw-r--r--src/core/ngx_array.c5
-rw-r--r--src/core/ngx_array.h6
-rw-r--r--src/core/ngx_buf.c5
-rw-r--r--src/core/ngx_buf.h54
-rw-r--r--src/core/ngx_conf_file.c5
-rw-r--r--src/core/ngx_conf_file.h6
-rw-r--r--src/core/ngx_config.h11
-rw-r--r--src/core/ngx_connection.c5
-rw-r--r--src/core/ngx_connection.h6
-rw-r--r--src/core/ngx_core.h13
-rw-r--r--src/core/ngx_crc.h9
-rw-r--r--src/core/ngx_cycle.c5
-rw-r--r--src/core/ngx_cycle.h6
-rw-r--r--src/core/ngx_file.c5
-rw-r--r--src/core/ngx_file.h6
-rw-r--r--src/core/ngx_garbage_collector.c5
-rw-r--r--src/core/ngx_garbage_collector.h6
-rw-r--r--src/core/ngx_inet.c6
-rw-r--r--src/core/ngx_inet.h6
-rw-r--r--src/core/ngx_list.c5
-rw-r--r--src/core/ngx_list.h6
-rw-r--r--src/core/ngx_log.c5
-rw-r--r--src/core/ngx_log.h56
-rw-r--r--src/core/ngx_output_chain.c5
-rw-r--r--src/core/ngx_palloc.c5
-rw-r--r--src/core/ngx_palloc.h8
-rw-r--r--src/core/ngx_parse.c5
-rw-r--r--src/core/ngx_parse.h6
-rw-r--r--src/core/ngx_radix_tree.c5
-rw-r--r--src/core/ngx_radix_tree.h6
-rw-r--r--src/core/ngx_rbtree.c5
-rw-r--r--src/core/ngx_rbtree.h6
-rw-r--r--src/core/ngx_regex.c5
-rw-r--r--src/core/ngx_regex.h6
-rw-r--r--src/core/ngx_slab.c7
-rw-r--r--src/core/ngx_slab.h6
-rw-r--r--src/core/ngx_spinlock.c5
-rw-r--r--src/core/ngx_string.c5
-rw-r--r--src/core/ngx_string.h41
-rw-r--r--src/core/ngx_table.h6
-rw-r--r--src/core/ngx_times.c8
-rw-r--r--src/core/ngx_times.h6
44 files changed, 280 insertions, 119 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index e9046fd95..920b60163 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 769a9bf41..c53ad7a54 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGINX_H_INCLUDED_
#define _NGINX_H_INCLUDED_
diff --git a/src/core/ngx_array.c b/src/core/ngx_array.c
index 8ecb83f86..0bc25a931 100644
--- a/src/core/ngx_array.c
+++ b/src/core/ngx_array.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_array.h b/src/core/ngx_array.h
index a6a1c8aea..6a2fe0357 100644
--- a/src/core/ngx_array.h
+++ b/src/core/ngx_array.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_ARRAY_H_INCLUDED_
#define _NGX_ARRAY_H_INCLUDED_
diff --git a/src/core/ngx_buf.c b/src/core/ngx_buf.c
index 16398a638..ca64783e7 100644
--- a/src/core/ngx_buf.c
+++ b/src/core/ngx_buf.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_buf.h b/src/core/ngx_buf.h
index 1927ed415..fa2a544d0 100644
--- a/src/core/ngx_buf.h
+++ b/src/core/ngx_buf.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_BUF_H_INCLUDED_
#define _NGX_BUF_H_INCLUDED_
@@ -6,46 +12,9 @@
#include <ngx_core.h>
-#if 0
-/* the buf type */
-
-/* the buf's content is in memory */
-#define NGX_HUNK_IN_MEMORY 0x0001
-/* the buf's content can be changed */
-#define NGX_HUNK_TEMP 0x0002
-/* the buf's content is in cache and can not be changed */
-#define NGX_HUNK_MEMORY 0x0004
-#define NGX_HUNK_MMAP 0x0008
-
-/* the buf's content is recycled */
-#define NGX_HUNK_RECYCLED 0x0010
-
-/* the buf's content is in a file */
-#define NGX_HUNK_FILE 0x0020
-
-#define NGX_HUNK_STORAGE (NGX_HUNK_IN_MEMORY \
- |NGX_HUNK_TEMP|NGX_HUNK_MEMORY|NGX_HUNK_MMAP \
- |NGX_HUNK_RECYCLED|NGX_HUNK_FILE)
-
-/* the buf flags */
+typedef void * ngx_buf_tag_t;
-/* in thread state flush means to write the buf completely before return */
-/* in event state flush means to start to write the buf */
-#define NGX_HUNK_FLUSH 0x0100
-
-/* the last buf */
-#define NGX_HUNK_LAST 0x0200
-
-
-#define NGX_HUNK_PREREAD 0x2000
-#define NGX_HUNK_LAST_SHADOW 0x4000
-#define NGX_HUNK_TEMP_FILE 0x8000
-#endif
-
-
-typedef void * ngx_buf_tag_t;
-
-typedef struct ngx_buf_s ngx_buf_t;
+typedef struct ngx_buf_s ngx_buf_t;
struct ngx_buf_s {
u_char *pos;
@@ -61,17 +30,18 @@ struct ngx_buf_s {
ngx_buf_t *shadow;
- /* the buf's content can be changed */
+ /* the buf's content could be changed */
unsigned temporary:1;
/*
* the buf's content is in a memory cache or in a read only memory
- * and can not be changed
+ * and must not be changed
*/
unsigned memory:1;
- /* the buf's content is mmap()ed and can not be changed */
+ /* the buf's content is mmap()ed and must not be changed */
unsigned mmap:1;
+
unsigned recycled:1;
unsigned in_file:1;
unsigned flush:1;
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index e0fec6fa0..99c5df1cf 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_conf_file.h b/src/core/ngx_conf_file.h
index d2c76131a..567c86cfd 100644
--- a/src/core/ngx_conf_file.h
+++ b/src/core/ngx_conf_file.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_HTTP_CONF_FILE_H_INCLUDED_
#define _NGX_HTTP_CONF_FILE_H_INCLUDED_
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h
index 63a42efd1..f23176dba 100644
--- a/src/core/ngx_config.h
+++ b/src/core/ngx_config.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_CONFIG_H_INCLUDED_
#define _NGX_CONFIG_H_INCLUDED_
@@ -116,5 +122,10 @@ typedef long ngx_flag_t;
#define INET_ADDRSTRLEN 16
#endif
+#define NGX_MAXHOSTNAMELEN 64
+/*
+#define NGX_MAXHOSTNAMELEN MAXHOSTNAMELEN
+*/
+
#endif /* _NGX_CONFIG_H_INCLUDED_ */
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index 5fc99b39e..5b663740a 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index fbfe67fd2..a9250848d 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_CONNECTION_H_INCLUDED_
#define _NGX_CONNECTION_H_INCLUDED_
diff --git a/src/core/ngx_core.h b/src/core/ngx_core.h
index 0a12fb21a..671956e33 100644
--- a/src/core/ngx_core.h
+++ b/src/core/ngx_core.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_CORE_H_INCLUDED_
#define _NGX_CORE_H_INCLUDED_
@@ -70,11 +76,4 @@ typedef void (*ngx_event_handler_pt)(ngx_event_t *ev);
#define CRLF "\x0d\x0a"
-
-#define NGX_MAXHOSTNAMELEN 64
-/*
-#define NGX_MAXHOSTNAMELEN MAXHOSTNAMELEN
-*/
-
-
#endif /* _NGX_CORE_H_INCLUDED_ */
diff --git a/src/core/ngx_crc.h b/src/core/ngx_crc.h
index c6234c37a..208001d48 100644
--- a/src/core/ngx_crc.h
+++ b/src/core/ngx_crc.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_CRC_H_INCLUDED_
#define _NGX_CRC_H_INCLUDED_
@@ -9,9 +15,10 @@ ngx_inline static uint32_t ngx_crc(char *data, size_t len)
uint32_t sum;
for (sum = 0; len; len--) {
+
/*
* gcc 2.95.2 x86 and icc 7.1.006 compile that operator
- * into the single rol opcode.
+ * into the single "rol" opcode.
* msvc 6.0sp2 compiles it into four opcodes.
*/
sum = sum >> 1 | sum << 31;
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index e5b30b100..86528ba1e 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
diff --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h
index 1b24dd333..f1e88b1ed 100644
--- a/src/core/ngx_cycle.h
+++ b/src/core/ngx_cycle.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_CYCLE_H_INCLUDED_
#define _NGX_CYCLE_H_INCLUDED_
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c
index ef92a0ab1..7ae77de6e 100644
--- a/src/core/ngx_file.c
+++ b/src/core/ngx_file.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_file.h b/src/core/ngx_file.h
index db46d5408..d6ca67db0 100644
--- a/src/core/ngx_file.h
+++ b/src/core/ngx_file.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_FILE_H_INCLUDED_
#define _NGX_FILE_H_INCLUDED_
diff --git a/src/core/ngx_garbage_collector.c b/src/core/ngx_garbage_collector.c
index 924f11add..ea2529aad 100644
--- a/src/core/ngx_garbage_collector.c
+++ b/src/core/ngx_garbage_collector.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_garbage_collector.h>
diff --git a/src/core/ngx_garbage_collector.h b/src/core/ngx_garbage_collector.h
index 5bc8471dc..b445944e9 100644
--- a/src/core/ngx_garbage_collector.h
+++ b/src/core/ngx_garbage_collector.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_GARBAGE_COLLECTOR_H_INCLUDED_
#define _NGX_GARBAGE_COLLECTOR_H_INCLUDED_
diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c
index 94d0c72e5..5000ee076 100644
--- a/src/core/ngx_inet.c
+++ b/src/core/ngx_inet.c
@@ -1,4 +1,10 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_inet.h b/src/core/ngx_inet.h
index dbdf6f0b3..5e30c9e33 100644
--- a/src/core/ngx_inet.h
+++ b/src/core/ngx_inet.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_INET_H_INCLUDED_
#define _NGX_INET_H_INCLUDED_
diff --git a/src/core/ngx_list.c b/src/core/ngx_list.c
index 885f8f508..85e3b6459 100644
--- a/src/core/ngx_list.c
+++ b/src/core/ngx_list.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_list.h b/src/core/ngx_list.h
index f43f235e5..b65eff361 100644
--- a/src/core/ngx_list.h
+++ b/src/core/ngx_list.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_LIST_H_INCLUDED_
#define _NGX_LIST_H_INCLUDED_
diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c
index e542920d4..b23d8bba1 100644
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_log.h b/src/core/ngx_log.h
index 45ab6e07c..782d28ae8 100644
--- a/src/core/ngx_log.h
+++ b/src/core/ngx_log.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_LOG_H_INCLUDED_
#define _NGX_LOG_H_INCLUDED_
@@ -24,8 +30,8 @@
#define NGX_LOG_DEBUG_IMAP 0x200
/*
- * after the adding a new debug level do not forget to update
- * debug_levels[] in src/core/ngx_log.c
+ * do not forget to update debug_levels[] in src/core/ngx_log.c
+ * after the adding a new debug level
*/
#define NGX_LOG_DEBUG_FIRST NGX_LOG_DEBUG_CORE
@@ -34,50 +40,6 @@
#define NGX_LOG_DEBUG_ALL 0x7ffffff0
-/*
- "[%time] [%level] %pid#%tid: %message:(%errno)%errstr, while %action"
- " %peer and while processing %context"
-
- ----
- message = "recv() failed";
- errno = 32;
- action = "reading request headers from client";
- peer = "192.168.1.1";
- context = "URL /"
-
- "[2002/08/20 12:00:00] [error] 412#3: recv() failed (32: Broken pipe)"
- " while reading request headers from client 192.168.1.1"
- " and while processing URL /"
-
- ----
- message = "recv() failed";
- errno = 32;
- ngx_http_proxy_error_context_t:
- action = "reading headers from server %s for client %s and "
- "while processing %s"
- backend = "127.0.0.1";
- peer = "192.168.1.1";
- context = "URL /"
-
- "[2002/08/20 12:00:00] [error] 412#3: recv() failed (32: Broken pipe)"
- " while reading headers from backend 127.0.0.1"
- " for client 192.168.1.1 and while processing URL /"
-
- ----
- "[alert] 412#3: ngx_alloc: malloc() 102400 bytes failed (12: Cannot "
- "allocate memory) while reading request headers from client 192.168.1.1"
- " and while processing URL /"
-
-
- OLD:
- "... while ", action = "reading client request headers"
- "... while reading client request headers"
- "... while ", action = "reading client request headers"
- context: pop3 user account
- "... while reading client command for 'john_doe'"
-*/
-
-
typedef size_t (*ngx_log_handler_pt) (void *ctx, char *buf, size_t len);
@@ -88,7 +50,7 @@ struct ngx_log_s {
ngx_log_handler_pt handler;
};
-#define MAX_ERROR_STR 2048
+#define MAX_ERROR_STR 2048
/*********************************/
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 8efd369ed..f40dfd313 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>
diff --git a/src/core/ngx_palloc.c b/src/core/ngx_palloc.c
index 132eb70d7..47f9a8645 100644
--- a/src/core/ngx_palloc.c
+++ b/src/core/ngx_palloc.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_palloc.h b/src/core/ngx_palloc.h
index 1700efb45..3a3f244b3 100644
--- a/src/core/ngx_palloc.h
+++ b/src/core/ngx_palloc.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_PALLOC_H_INCLUDED_
#define _NGX_PALLOC_H_INCLUDED_
@@ -8,7 +14,7 @@
/*
* NGX_MAX_ALLOC_FROM_POOL should be (ngx_page_size - 1), i.e. 4095 on x86.
- * On FreeBSD 5.x it allows to use zero copy send.
+ * On FreeBSD 5.x it allows to use the zero copy sending.
* On Windows NT it decreases a number of locked pages in a kernel.
*/
#define NGX_MAX_ALLOC_FROM_POOL (ngx_pagesize - 1)
diff --git a/src/core/ngx_parse.c b/src/core/ngx_parse.c
index 9d62f703b..8edcc5a61 100644
--- a/src/core/ngx_parse.c
+++ b/src/core/ngx_parse.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_parse.h b/src/core/ngx_parse.h
index 630cabecc..1423a97a3 100644
--- a/src/core/ngx_parse.h
+++ b/src/core/ngx_parse.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_PARSE_H_INCLUDED_
#define _NGX_PARSE_H_INCLUDED_
diff --git a/src/core/ngx_radix_tree.c b/src/core/ngx_radix_tree.c
index 5c7a801d8..15949e5e1 100644
--- a/src/core/ngx_radix_tree.c
+++ b/src/core/ngx_radix_tree.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_radix_tree.h b/src/core/ngx_radix_tree.h
index a5b8c6243..2e3319b36 100644
--- a/src/core/ngx_radix_tree.h
+++ b/src/core/ngx_radix_tree.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_RADIX_TREE_H_INCLUDED_
#define _NGX_RADIX_TREE_H_INCLUDED_
diff --git a/src/core/ngx_rbtree.c b/src/core/ngx_rbtree.c
index 083ec10f8..f3c7ac9d4 100644
--- a/src/core/ngx_rbtree.c
+++ b/src/core/ngx_rbtree.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_rbtree.h b/src/core/ngx_rbtree.h
index 04d762292..47ced3ea2 100644
--- a/src/core/ngx_rbtree.h
+++ b/src/core/ngx_rbtree.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_RBTREE_H_INCLUDED_
#define _NGX_RBTREE_H_INCLUDED_
diff --git a/src/core/ngx_regex.c b/src/core/ngx_regex.c
index f4d827d83..9cae52a89 100644
--- a/src/core/ngx_regex.c
+++ b/src/core/ngx_regex.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_regex.h b/src/core/ngx_regex.h
index 3a99a2f36..1d19686af 100644
--- a/src/core/ngx_regex.h
+++ b/src/core/ngx_regex.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_REGEX_H_INCLUDED_
#define _NGX_REGEX_H_INCLUDED_
diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c
index dad726530..93d7565f6 100644
--- a/src/core/ngx_slab.c
+++ b/src/core/ngx_slab.c
@@ -1,8 +1,11 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
-void *ngx_slab_alloc(ngx_slab_pool_t *pool, size_t size)
-{
+void *ngx_slab_alloc(ngx_slab_pool_t *pool, size_t size)
+{
return NULL;
}
diff --git a/src/core/ngx_slab.h b/src/core/ngx_slab.h
index 11b249aee..0ae71004a 100644
--- a/src/core/ngx_slab.h
+++ b/src/core/ngx_slab.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_SLAB_H_INCLUDED_
#define _NGX_SLAB_H_INCLUDED_
diff --git a/src/core/ngx_spinlock.c b/src/core/ngx_spinlock.c
index 4de23c13b..16e6a5c81 100644
--- a/src/core/ngx_spinlock.c
+++ b/src/core/ngx_spinlock.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c
index 4cdb267dd..21de8916b 100644
--- a/src/core/ngx_string.c
+++ b/src/core/ngx_string.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h
index 6b22a67ba..447542508 100644
--- a/src/core/ngx_string.h
+++ b/src/core/ngx_string.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_STRING_H_INCLUDED_
#define _NGX_STRING_H_INCLUDED_
@@ -19,48 +25,47 @@ typedef struct {
#if (WIN32)
#define ngx_strncasecmp(s1, s2, n) \
- strnicmp((const char *) s1, (const char *) s2, n)
+ strnicmp((const char *) s1, (const char *) s2, n)
#define ngx_strcasecmp(s1, s2) \
- stricmp((const char *) s1, (const char *) s2)
+ stricmp((const char *) s1, (const char *) s2)
-#define ngx_snprintf _snprintf
-#define ngx_vsnprintf _vsnprintf
+#define ngx_snprintf _snprintf
+#define ngx_vsnprintf _vsnprintf
#else
#define ngx_strncasecmp(s1, s2, n) \
- strncasecmp((const char *) s1, (const char *) s2, n)
+ strncasecmp((const char *) s1, (const char *) s2, n)
#define ngx_strcasecmp(s1, s2) \
- strcasecmp((const char *) s1, (const char *) s2)
+ strcasecmp((const char *) s1, (const char *) s2)
-#define ngx_snprintf snprintf
-#define ngx_vsnprintf vsnprintf
+#define ngx_snprintf snprintf
+#define ngx_vsnprintf vsnprintf
#endif
#define ngx_strncmp(s1, s2, n) \
- strncmp((const char *) s1, (const char *) s2, n)
+ strncmp((const char *) s1, (const char *) s2, n)
/* msvc and icc compile strcmp() to inline loop */
-#define ngx_strcmp(s1, s2) strcmp((const char *) s1, (const char *) s2)
+#define ngx_strcmp(s1, s2) strcmp((const char *) s1, (const char *) s2)
-#define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2)
-#define ngx_strlen(s) strlen((const char *) s)
+#define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2)
+#define ngx_strlen(s) strlen((const char *) s)
/*
- * msvc and icc compile memset() to inline "rep stos"
- * while ZeroMemory and bzero are calls.
- *
- * icc can also inline mov's of a zeroed register for small blocks.
+ * msvc and icc compile memset() to the inline "rep stos"
+ * while ZeroMemory() and bzero() are the calls.
+ * icc may also inline several mov's of a zeroed register for small blocks.
*/
#define ngx_memzero(buf, n) memset(buf, 0, n)
-/* msvc and icc compile memcpy() to inline "rep movs" */
+/* msvc and icc compile memcpy() to the inline "rep movs" */
#define ngx_memcpy(dst, src, n) memcpy(dst, src, n)
#define ngx_cpymem(dst, src, n) ((u_char *) memcpy(dst, src, n)) + n
-/* msvc and icc compile memcmp() to inline loop */
+/* msvc and icc compile memcmp() to the inline loop */
#define ngx_memcmp memcmp
u_char *ngx_cpystrn(u_char *dst, u_char *src, size_t n);
diff --git a/src/core/ngx_table.h b/src/core/ngx_table.h
index f49ec3af5..7315ea3a7 100644
--- a/src/core/ngx_table.h
+++ b/src/core/ngx_table.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_TABLE_H_INCLUDED_
#define _NGX_TABLE_H_INCLUDED_
diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c
index b6d5a3f1d..90ceaaeab 100644
--- a/src/core/ngx_times.c
+++ b/src/core/ngx_times.c
@@ -1,4 +1,9 @@
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#include <ngx_config.h>
#include <ngx_core.h>
@@ -12,7 +17,7 @@ static ngx_int_t ngx_gmtoff;
/*
- * In the threaded mode only one thread updates cached time and strings
+ * In the threaded mode only one thread updates the cached time and strings
* and these operations are protected by the mutex. The reading of the cached
* time and strings is not protected by the mutex. To avoid the race
* conditions for non-atomic values we use the NGX_TIME_SLOTS slots to store
@@ -290,6 +295,7 @@ void ngx_gmtime(time_t t, ngx_tm_t *tp)
mon += 2;
if (yday >= 306) {
+
/*
* there is no "yday" in Win32 SYSTEMTIME
*
diff --git a/src/core/ngx_times.h b/src/core/ngx_times.h
index 426040577..5384b5319 100644
--- a/src/core/ngx_times.h
+++ b/src/core/ngx_times.h
@@ -1,3 +1,9 @@
+
+/*
+ * Copyright (C) 2002-2004 Igor Sysoev
+ */
+
+
#ifndef _NGX_TIMES_H_INCLUDED_
#define _NGX_TIMES_H_INCLUDED_