nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
diff --git a/src/core/nginx.c b/src/core/nginx.c
index e9046fd..920b601 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 769a9bf..c53ad7a 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 8ecb83f..0bc25a9 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 a6a1c8a..6a2fe03 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 16398a6..ca64783 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 1927ed4..fa2a544 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 */
+typedef void * ngx_buf_tag_t;
-/* 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 */
-
-/* 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 @@
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 e0fec6f..99c5df1 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 d2c7613..567c86c 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 63a42ef..f23176d 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 @@
#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 5fc99b3..5b66374 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 fbfe67f..a925084 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 0a12fb2..671956e 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 @@
#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 c6234c3..208001d 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 @@
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 e5b30b1..86528ba 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 1b24dd3..f1e88b1 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 ef92a0a..7ae77de 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 db46d54..d6ca67d 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 924f11a..ea2529a 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 5bc8471..b445944 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 94d0c72..5000ee0 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 dbdf6f0..5e30c9e 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 885f8f5..85e3b64 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 f43f235..b65eff3 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 e542920..b23d8bb 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 45ab6e0..782d28a 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 @@
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 8efd369..f40dfd3 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 132eb70..47f9a86 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 1700efb..3a3f244 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 9d62f70..8edcc5a 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 630cabe..1423a97 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 5c7a801..15949e5 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 a5b8c62..2e3319b 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 083ec10..f3c7ac9 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 04d7622..47ced3e 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 f4d827d..9cae52a 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 3a99a2f..1d19686 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 dad7265..93d7565 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)
{
-
-
return NULL;
}
diff --git a/src/core/ngx_slab.h b/src/core/ngx_slab.h
index 11b249a..0ae7100 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 4de23c1..16e6a5c 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 4cdb267..21de891 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 6b22a67..4475425 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 @@
#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 f49ec3a..7315ea3 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 b6d5a3f..90ceaae 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 @@
/*
- * 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 @@
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 4260405..5384b53 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_