/unit/ |
H A D | CHANGES | diff 846:b366e89a9b73 Thu Nov 15 12:56:00 UTC 2018 Valentin Bartenev <vbart@nginx.com> Added version 1.6 CHANGES.
|
/unit/auto/ |
H A D | make | diff 877:ed8b1aaefdd1 Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> libunit: added generation of version header file.
|
H A D | sources | diff 2433:56bf272df01d Mon Mar 27 18:28:00 UTC 2023 Andrew Clayton <a.clayton@nginx.com> Remove a bunch of dead code.
This removes a bunch of unused files that would have been touched by subsequent commits that switch to using nxt_bool_t (AKA unit6_t) in structures.
In auto/sources we have
NXT_LIB_SRC0=" \ src/nxt_buf_filter.c \ src/nxt_job_file.c \ src/nxt_stream_module.c \ src/nxt_stream_source.c \ src/nxt_upstream_source.c \ src/nxt_http_source.c \ src/nxt_fastcgi_source.c \ src/nxt_fastcgi_record_parse.c \ \ src/nxt_mem_pool_cleanup.h \ src/nxt_mem_pool_cleanup.c \ "
None of these seem to actually be used anywhere (other than within themselves). That variable is _not_ referenced anywhere else.
Also remove the unused related header files: src/nxt_buf_filter.h, src/nxt_fastcgi_source.h, src/nxt_http_source.h, src/nxt_job_file.h, src/nxt_stream_source.h and src/nxt_upstream_source.h
Also, these files do not seem to be used, no mention under auto/ or build/
src/nxt_file_cache.c src/nxt_cache.c src/nxt_job_file_cache.c
src/nxt_cache.h is #included in src/nxt_main.h, but AFAICT is not actually used.
With all the above removed
$ ./configure --openssl --debug --tests && make -j && make -j tests && make libnxt
all builds.
Buildbot passes.
NOTE: You may need to do a 'make clean' before the next build attempt.
Reviewed-by: Alejandro Colomar <alx@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com> diff 106:a30dda81de1d Wed Jun 28 15:56:00 UTC 2017 Valentin Bartenev <vbart@nginx.com> Configuration: reduced names of structures, functions, and macros. diff 1:fdc027c56872 Mon Jan 23 16:56:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Introducing tasks.
|
/unit/auto/modules/ |
H A D | nodejs | diff 878:8867c1c7c2bf Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: added check for libunit version at compile time. diff 877:ed8b1aaefdd1 Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> libunit: added generation of version header file.
|
/unit/docs/ |
H A D | Makefile | diff 1312:56e3068e3285 Tue Dec 24 14:03:00 UTC 2019 Valentin Bartenev <vbart@nginx.com> Removed unused variables from "docs/Makefile".
They actually have been broken since 00d8049418cf, where NXT_VERSION was removed from nxt_main.h.
Also, shebang is added.
|
H A D | changes.xml | diff 2251:6e5a9550ead3 Thu Nov 17 21:56:00 UTC 2022 Andrew Clayton <a.clayton@nginx.com> Python: Added support for Python 3.11.
Python 3.8 added a new Python initialisation configuration API[0].
Python 3.11 marked the old API as deprecated resulting in the following compiler warnings which we treat as errors, failing the build
src/python/nxt_python.c: In function ‘nxt_python_start’: src/python/nxt_python.c:130:13: error: ‘Py_SetProgramName’ is deprecated [-Werror=deprecated-declarations] 130 | Py_SetProgramName(nxt_py_home); | ^~~~~~~~~~~~~~~~~ In file included from /opt/python-3.11/include/python3.11/Python.h:94, from src/python/nxt_python.c:7: /opt/python-3.11/include/python3.11/pylifecycle.h:37:38: note: declared here 37 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *); | ^~~~~~~~~~~~~~~~~ src/python/nxt_python.c:134:13: error: ‘Py_SetPythonHome’ is deprecated [-Werror=deprecated-declarations] 134 | Py_SetPythonHome(nxt_py_home); | ^~~~~~~~~~~~~~~~ /opt/python-3.11/include/python3.11/pylifecycle.h:40:38: note: declared here 40 | Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *); | ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
We actually have a few config scenarios: Python < 3, Python >= 3.0 < 3.8 and for Python 3 we have two configs where we select one based on virtual environment setup.
Factor out the Python 3 config initialisation into its own function. We actually create two functions, one for Python 3.8+ and one for older Python 3. We pick the right function to use at build time.
The new API also has error checking (where the old API doesn't) which we handle.
[0]: https://peps.python.org/pep-0587/
Closes: <https://github.com/nginx/unit/issues/710> [ Andrew: Expanded upon patch from @sandeep-gh ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com> diff 1991:61155eb41a96 Fri Nov 05 14:56:00 UTC 2021 Zhidao HONG <z.hong@f5.com> Router: matching query string support.
The "query" option matches decoded arguments, including plus ('+') to space (' '). Like "uri", it can be a string or an array of strings. diff 1950:b946abe2fe03 Fri Aug 20 03:56:00 UTC 2021 Artem Konev <artem.konev@nginx.com> Fixed a typo in changes.xml. diff 1904:da7a4754f8bd Thu Jul 01 10:56:00 UTC 2021 Max Romanov <max.romanov@nginx.com> Fixing multiple TLS-enabled listeners initialization.
Because of the incorrect 'last' field assignment, multiple listeners with a TLS certificate did not initialize properly, which caused a router crash while establishing a connection.
Test with multiple TLS listeners added.
The issue was introduced in the c548e46fe516 commit.
This closes #561 issue on GitHub. diff 846:b366e89a9b73 Thu Nov 15 12:56:00 UTC 2018 Valentin Bartenev <vbart@nginx.com> Added version 1.6 CHANGES.
|
/unit/pkg/deb/ |
H A D | Makefile | diff 1750:19886d8508b5 Wed Dec 16 06:56:00 UTC 2020 Andrei Belov <defan@nginx.com> Packages: eliminated debuild warning about debian/rules.
|
/unit/pkg/deb/debian/ |
H A D | rules.in | diff 1749:4ec154f7ebd7 Wed Dec 16 06:56:00 UTC 2020 Andrei Belov <defan@nginx.com> Packages: the NOTICE file added to debian binaries.
This resolves the following lintian error: https://lintian.debian.org/tags/missing-notice-file-for-apache-license.html
While here, changed upstream changelog name to conform with the policy: https://lintian.debian.org/tags/wrong-name-for-upstream-changelog.html
|
/unit/pkg/docker/ |
H A D | Dockerfile.minimal | diff 1193:9e6b9345c8da Thu Sep 19 21:56:00 UTC 2019 Konstantin Pavlov <thresh@nginx.com> Packages: bump docker release for 1.11.0-2.
|
/unit/pkg/npm/ |
H A D | Makefile | diff 878:8867c1c7c2bf Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: added check for libunit version at compile time.
|
/unit/src/nodejs/unit-http/ |
H A D | binding.gyp | diff 877:ed8b1aaefdd1 Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> libunit: added generation of version header file.
|
H A D | http_server.js | diff 875:dae402cb243f Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: checking uniqueness of HTTP headers for different case. diff 874:5df32621af19 Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: calling write callback asynchronously. diff 873:89f7d6b67fa7 Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: style fixes.
No functional changes. diff 871:3c679d901524 Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: napi_call_function() replaced with napi_make_callback().
The sequence of napi_open_callback_scope(), napi_call_function(), and napi_close_callback_scope() functions calls executes the provided JS code and all functions enqueued by process.nextTick() and Promises during this execution.
|
H A D | package.json | diff 878:8867c1c7c2bf Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: added check for libunit version at compile time.
|
H A D | socket.js | diff 872:d6de17ee0e58 Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: changed the unit-http socket constructor.
Third-party file descriptors are not supported. Socket "readable" and "writable" options are set true by default.
|
H A D | unit.cpp | diff 1731:43759e8fd1f6 Mon Dec 07 14:56:00 UTC 2020 Max Romanov <max.romanov@nginx.com> Node.js: avoided use of request struct for debug logging.
This fixes a crash on exit of Node.js application. The crash reproduced on Ubuntu 20.10 with Node.js v15.1.0. Tests 'test_node_websockets_two_clients' and 'test_node_websockets_7_13_1__7_13_2'.
The reason of the crash is using request struct which was already freed.
The issue was introduced in 5be509fda29e. diff 876:c73c6c985986 Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: checking for exception after running JS code from C++. diff 875:dae402cb243f Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: checking uniqueness of HTTP headers for different case. diff 871:3c679d901524 Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: napi_call_function() replaced with napi_make_callback().
The sequence of napi_open_callback_scope(), napi_call_function(), and napi_close_callback_scope() functions calls executes the provided JS code and all functions enqueued by process.nextTick() and Promises during this execution.
|
H A D | unit.h | diff 878:8867c1c7c2bf Wed Dec 19 12:56:00 UTC 2018 Alexander Borisov <alexander.borisov@nginx.com> Node.js: added check for libunit version at compile time.
|
/unit/src/ |
H A D | nxt_app_log.c | diff 704:1fcac04f0a15 Mon Jun 25 13:56:00 UTC 2018 Igor Sysoev <igor@sysoev.ru> Removed '\r' and '\n' artifact macros.
|
H A D | nxt_application.c | diff 56:92b4984ca3c1 Tue Jun 06 15:57:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> C99 style declaration of connection states. diff 1:fdc027c56872 Mon Jan 23 16:56:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Introducing tasks.
|
H A D | nxt_array.h | diff 2084:7d479274f334 Sat Apr 30 17:20:00 UTC 2022 Alejandro Colomar <alx.manpages@gmail.com> Fixed #define style.
We had a mix of styles for declaring function-like macros:
Style A: #define \ foo() \ do { \ ... \ } while (0)
Style B: #define foo() \ do { \ ... \ } while (0)
We had a similar number of occurences of each style:
$ grep -rnI '^\w*(.*\\' | wc -l 244 $ grep -rn 'define.*(.*)' | wc -l 239
(Those regexes aren't perfect, but a very decent approximation.)
Real examples:
$ find src -type f | xargs sed -n '/^nxt_double_is_zero/,/^$/p' nxt_double_is_zero(f) \ (fabs(f) <= FLT_EPSILON)
$ find src -type f | xargs sed -n '/define nxt_http_field_set/,/^$/p' #define nxt_http_field_set(_field, _name, _value) \ do { \ (_field)->name_length = nxt_length(_name); \ (_field)->value_length = nxt_length(_value); \ (_field)->name = (u_char *) _name; \ (_field)->value = (u_char *) _value; \ } while (0)
I'd like to standardize on a single style for them, and IMO, having the identifier in the same line as #define is a better option for the following reasons:
- Programmers are used to `#define foo() ...` (readability). - One less line of code. - The program for finding them is really simple (see below).
function grep_ngx_func() { if (($# != 1)); then >&2 echo "Usage: ${FUNCNAME[0]} <func>"; return 1; fi;
find src -type f \ | grep '\.[ch]$' \ | xargs grep -l "$1" \ | sort \ | xargs pcregrep -Mn "(?s)^\$[\w\s*]+?^$1\(.*?^}";
find src -type f \ | grep '\.[ch]$' \ | xargs grep -l "$1" \ | sort \ | xargs pcregrep -Mn "(?s)define $1\(.*?^$" \ | sed -E '1s/^[^:]+:[0-9]+:/&\n\n/'; }
$ grep_ngx_func Usage: grep_ngx_func <func>
$ grep_ngx_func nxt_http_field_set src/nxt_http.h:98:
#define nxt_http_field_set(_field, _name, _value) \ do { \ (_field)->name_length = nxt_length(_name); \ (_field)->value_length = nxt_length(_value); \ (_field)->name = (u_char *) _name; \ (_field)->value = (u_char *) _value; \ } while (0)
$ grep_ngx_func nxt_sprintf src/nxt_sprintf.c:56:
u_char * nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...) { u_char *p; va_list args;
va_start(args, fmt); p = nxt_vsprintf(buf, end, fmt, args); va_end(args);
return p; }
................ Scripted change: ................
$ find src -type f \ | grep '\.[ch]$' \ | xargs sed -i '/define *\\$/{N;s/ *\\\n/ /;s/ //}'
|
H A D | nxt_atomic.h | diff 2084:7d479274f334 Sat Apr 30 17:20:00 UTC 2022 Alejandro Colomar <alx.manpages@gmail.com> Fixed #define style.
We had a mix of styles for declaring function-like macros:
Style A: #define \ foo() \ do { \ ... \ } while (0)
Style B: #define foo() \ do { \ ... \ } while (0)
We had a similar number of occurences of each style:
$ grep -rnI '^\w*(.*\\' | wc -l 244 $ grep -rn 'define.*(.*)' | wc -l 239
(Those regexes aren't perfect, but a very decent approximation.)
Real examples:
$ find src -type f | xargs sed -n '/^nxt_double_is_zero/,/^$/p' nxt_double_is_zero(f) \ (fabs(f) <= FLT_EPSILON)
$ find src -type f | xargs sed -n '/define nxt_http_field_set/,/^$/p' #define nxt_http_field_set(_field, _name, _value) \ do { \ (_field)->name_length = nxt_length(_name); \ (_field)->value_length = nxt_length(_value); \ (_field)->name = (u_char *) _name; \ (_field)->value = (u_char *) _value; \ } while (0)
I'd like to standardize on a single style for them, and IMO, having the identifier in the same line as #define is a better option for the following reasons:
- Programmers are used to `#define foo() ...` (readability). - One less line of code. - The program for finding them is really simple (see below).
function grep_ngx_func() { if (($# != 1)); then >&2 echo "Usage: ${FUNCNAME[0]} <func>"; return 1; fi;
find src -type f \ | grep '\.[ch]$' \ | xargs grep -l "$1" \ | sort \ | xargs pcregrep -Mn "(?s)^\$[\w\s*]+?^$1\(.*?^}";
find src -type f \ | grep '\.[ch]$' \ | xargs grep -l "$1" \ | sort \ | xargs pcregrep -Mn "(?s)define $1\(.*?^$" \ | sed -E '1s/^[^:]+:[0-9]+:/&\n\n/'; }
$ grep_ngx_func Usage: grep_ngx_func <func>
$ grep_ngx_func nxt_http_field_set src/nxt_http.h:98:
#define nxt_http_field_set(_field, _name, _value) \ do { \ (_field)->name_length = nxt_length(_name); \ (_field)->value_length = nxt_length(_value); \ (_field)->name = (u_char *) _name; \ (_field)->value = (u_char *) _value; \ } while (0)
$ grep_ngx_func nxt_sprintf src/nxt_sprintf.c:56:
u_char * nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...) { u_char *p; va_list args;
va_start(args, fmt); p = nxt_vsprintf(buf, end, fmt, args); va_end(args);
return p; }
................ Scripted change: ................
$ find src -type f \ | grep '\.[ch]$' \ | xargs sed -i '/define *\\$/{N;s/ *\\\n/ /;s/ //}'
|
H A D | nxt_buf.c | diff 1:fdc027c56872 Mon Jan 23 16:56:00 UTC 2017 Igor Sysoev <igor@sysoev.ru> Introducing tasks.
|
H A D | nxt_buf.h | diff 2084:7d479274f334 Sat Apr 30 17:20:00 UTC 2022 Alejandro Colomar <alx.manpages@gmail.com> Fixed #define style.
We had a mix of styles for declaring function-like macros:
Style A: #define \ foo() \ do { \ ... \ } while (0)
Style B: #define foo() \ do { \ ... \ } while (0)
We had a similar number of occurences of each style:
$ grep -rnI '^\w*(.*\\' | wc -l 244 $ grep -rn 'define.*(.*)' | wc -l 239
(Those regexes aren't perfect, but a very decent approximation.)
Real examples:
$ find src -type f | xargs sed -n '/^nxt_double_is_zero/,/^$/p' nxt_double_is_zero(f) \ (fabs(f) <= FLT_EPSILON)
$ find src -type f | xargs sed -n '/define nxt_http_field_set/,/^$/p' #define nxt_http_field_set(_field, _name, _value) \ do { \ (_field)->name_length = nxt_length(_name); \ (_field)->value_length = nxt_length(_value); \ (_field)->name = (u_char *) _name; \ (_field)->value = (u_char *) _value; \ } while (0)
I'd like to standardize on a single style for them, and IMO, having the identifier in the same line as #define is a better option for the following reasons:
- Programmers are used to `#define foo() ...` (readability). - One less line of code. - The program for finding them is really simple (see below).
function grep_ngx_func() { if (($# != 1)); then >&2 echo "Usage: ${FUNCNAME[0]} <func>"; return 1; fi;
find src -type f \ | grep '\.[ch]$' \ | xargs grep -l "$1" \ | sort \ | xargs pcregrep -Mn "(?s)^\$[\w\s*]+?^$1\(.*?^}";
find src -type f \ | grep '\.[ch]$' \ | xargs grep -l "$1" \ | sort \ | xargs pcregrep -Mn "(?s)define $1\(.*?^$" \ | sed -E '1s/^[^:]+:[0-9]+:/&\n\n/'; }
$ grep_ngx_func Usage: grep_ngx_func <func>
$ grep_ngx_func nxt_http_field_set src/nxt_http.h:98:
#define nxt_http_field_set(_field, _name, _value) \ do { \ (_field)->name_length = nxt_length(_name); \ (_field)->value_length = nxt_length(_value); \ (_field)->name = (u_char *) _name; \ (_field)->value = (u_char *) _value; \ } while (0)
$ grep_ngx_func nxt_sprintf src/nxt_sprintf.c:56:
u_char * nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...) { u_char *p; va_list args;
va_start(args, fmt); p = nxt_vsprintf(buf, end, fmt, args); va_end(args);
return p; }
................ Scripted change: ................
$ find src -type f \ | grep '\.[ch]$' \ | xargs sed -i '/define *\\$/{N;s/ *\\\n/ /;s/ //}'
|
H A D | nxt_buf_pool.h | diff 2084:7d479274f334 Sat Apr 30 17:20:00 UTC 2022 Alejandro Colomar <alx.manpages@gmail.com> Fixed #define style.
We had a mix of styles for declaring function-like macros:
Style A: #define \ foo() \ do { \ ... \ } while (0)
Style B: #define foo() \ do { \ ... \ } while (0)
We had a similar number of occurences of each style:
$ grep -rnI '^\w*(.*\\' | wc -l 244 $ grep -rn 'define.*(.*)' | wc -l 239
(Those regexes aren't perfect, but a very decent approximation.)
Real examples:
$ find src -type f | xargs sed -n '/^nxt_double_is_zero/,/^$/p' nxt_double_is_zero(f) \ (fabs(f) <= FLT_EPSILON)
$ find src -type f | xargs sed -n '/define nxt_http_field_set/,/^$/p' #define nxt_http_field_set(_field, _name, _value) \ do { \ (_field)->name_length = nxt_length(_name); \ (_field)->value_length = nxt_length(_value); \ (_field)->name = (u_char *) _name; \ (_field)->value = (u_char *) _value; \ } while (0)
I'd like to standardize on a single style for them, and IMO, having the identifier in the same line as #define is a better option for the following reasons:
- Programmers are used to `#define foo() ...` (readability). - One less line of code. - The program for finding them is really simple (see below).
function grep_ngx_func() { if (($# != 1)); then >&2 echo "Usage: ${FUNCNAME[0]} <func>"; return 1; fi;
find src -type f \ | grep '\.[ch]$' \ | xargs grep -l "$1" \ | sort \ | xargs pcregrep -Mn "(?s)^\$[\w\s*]+?^$1\(.*?^}";
find src -type f \ | grep '\.[ch]$' \ | xargs grep -l "$1" \ | sort \ | xargs pcregrep -Mn "(?s)define $1\(.*?^$" \ | sed -E '1s/^[^:]+:[0-9]+:/&\n\n/'; }
$ grep_ngx_func Usage: grep_ngx_func <func>
$ grep_ngx_func nxt_http_field_set src/nxt_http.h:98:
#define nxt_http_field_set(_field, _name, _value) \ do { \ (_field)->name_length = nxt_length(_name); \ (_field)->value_length = nxt_length(_value); \ (_field)->name = (u_char *) _name; \ (_field)->value = (u_char *) _value; \ } while (0)
$ grep_ngx_func nxt_sprintf src/nxt_sprintf.c:56:
u_char * nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...) { u_char *p; va_list args;
va_start(args, fmt); p = nxt_vsprintf(buf, end, fmt, args); va_end(args);
return p; }
................ Scripted change: ................
$ find src -type f \ | grep '\.[ch]$' \ | xargs sed -i '/define *\\$/{N;s/ *\\\n/ /;s/ //}'
|
H A D | nxt_clang.h | diff 2084:7d479274f334 Sat Apr 30 17:20:00 UTC 2022 Alejandro Colomar <alx.manpages@gmail.com> Fixed #define style.
We had a mix of styles for declaring function-like macros:
Style A: #define \ foo() \ do { \ ... \ } while (0)
Style B: #define foo() \ do { \ ... \ } while (0)
We had a similar number of occurences of each style:
$ grep -rnI '^\w*(.*\\' | wc -l 244 $ grep -rn 'define.*(.*)' | wc -l 239
(Those regexes aren't perfect, but a very decent approximation.)
Real examples:
$ find src -type f | xargs sed -n '/^nxt_double_is_zero/,/^$/p' nxt_double_is_zero(f) \ (fabs(f) <= FLT_EPSILON)
$ find src -type f | xargs sed -n '/define nxt_http_field_set/,/^$/p' #define nxt_http_field_set(_field, _name, _value) \ do { \ (_field)->name_length = nxt_length(_name); \ (_field)->value_length = nxt_length(_value); \ (_field)->name = (u_char *) _name; \ (_field)->value = (u_char *) _value; \ } while (0)
I'd like to standardize on a single style for them, and IMO, having the identifier in the same line as #define is a better option for the following reasons:
- Programmers are used to `#define foo() ...` (readability). - One less line of code. - The program for finding them is really simple (see below).
function grep_ngx_func() { if (($# != 1)); then >&2 echo "Usage: ${FUNCNAME[0]} <func>"; return 1; fi;
find src -type f \ | grep '\.[ch]$' \ | xargs grep -l "$1" \ | sort \ | xargs pcregrep -Mn "(?s)^\$[\w\s*]+?^$1\(.*?^}";
find src -type f \ | grep '\.[ch]$' \ | xargs grep -l "$1" \ | sort \ | xargs pcregrep -Mn "(?s)define $1\(.*?^$" \ | sed -E '1s/^[^:]+:[0-9]+:/&\n\n/'; }
$ grep_ngx_func Usage: grep_ngx_func <func>
$ grep_ngx_func nxt_http_field_set src/nxt_http.h:98:
#define nxt_http_field_set(_field, _name, _value) \ do { \ (_field)->name_length = nxt_length(_name); \ (_field)->value_length = nxt_length(_value); \ (_field)->name = (u_char *) _name; \ (_field)->value = (u_char *) _value; \ } while (0)
$ grep_ngx_func nxt_sprintf src/nxt_sprintf.c:56:
u_char * nxt_cdecl nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...) { u_char *p; va_list args;
va_start(args, fmt); p = nxt_vsprintf(buf, end, fmt, args); va_end(args);
return p; }
................ Scripted change: ................
$ find src -type f \ | grep '\.[ch]$' \ | xargs sed -i '/define *\\$/{N;s/ *\\\n/ /;s/ //}'
|
H A D | nxt_conf.c | 106:a30dda81de1d Wed Jun 28 15:56:00 UTC 2017 Valentin Bartenev <vbart@nginx.com> Configuration: reduced names of structures, functions, and macros.
|