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

ngx_string.h « core « src - github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9ee3e5e29686205799eff905f2e1a7ca4f153f6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef _NGX_STRING_H_INCLUDED_
#define _NGX_STRING_H_INCLUDED_


#include <ngx_config.h>


typedef struct {
    size_t  len;
    char   *data;
} ngx_str_t;


#define ngx_string(str)  { sizeof(str) - 1, str }


#if (WIN32)

#define ngx_memzero               ZeroMemory

#define strcasecmp                stricmp
#define ngx_strcmp                strcmp

#define ngx_snprintf              _snprintf
#define ngx_vsnprintf             _vsnprintf

#else

#define ngx_memzero               bzero

#define ngx_strcmp                strcmp

#define ngx_snprintf              snprintf
#define ngx_vsnprintf             vsnprintf

#endif

#define ngx_memcpy(dst, src, n)   memcpy(dst, src, n)
#define ngx_cpymem(dst, src, n)   memcpy(dst, src, n) + n

char *ngx_cpystrn(char *dst, char *src, size_t n);


#endif /* _NGX_STRING_H_INCLUDED_ */