diff src/core/ngx_conf_file.c @ 195:8dee38ea9117

nginx-0.0.1-2003-11-25-23:44:56 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 25 Nov 2003 20:44:56 +0000
parents 2357fa41738a
children e1c815be05ae
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -3,9 +3,6 @@
 #include <ngx_core.h>
 
 
-
-#define MAX_CONF_ERRSTR  256
-
 /* Ten fixed arguments */
 
 static int argument_number[] = {
@@ -471,7 +468,29 @@ ngx_log_debug(cf->log, "%d:%d:%d:%d:%d '
                      len++)
                 {
                     if (*src == '\\') {
-                        src++;
+                        switch (src[1]) {
+                        case '"':
+                        case '\'':
+                        case '\\':
+                            src++;
+                            break;
+
+                        case 't':
+                            *dst++ = '\t';
+                            src += 2;
+                            continue;
+
+                        case 'r':
+                            *dst++ = '\r';
+                            src += 2;
+                            continue;
+
+                        case 'n':
+                            *dst++ = '\n';
+                            src += 2;
+                            continue;
+                        }
+
                     }
                     *dst++ = *src++;
                 }
@@ -525,7 +544,7 @@ void ngx_conf_log_error(int level, ngx_c
                         char *fmt, ...)
 {
     int      len;
-    char     errstr[MAX_CONF_ERRSTR];
+    char     errstr[NGX_MAX_CONF_ERRSTR];
     va_list  args;
 
     va_start(args, fmt);