|
17 | 17 | import optparse
|
18 | 18 | import sys
|
19 | 19 |
|
20 |
| -TEMPLATE = '''/* |
| 20 | +TEMPLATE = r'''/* |
21 | 21 | *
|
22 | 22 | * Copyright (c) 2020 Project CHIP Authors
|
23 | 23 | * All rights reserved.
|
24 | 24 | *
|
25 |
| - * Licensed under the Apache License, Version 2.0 (the \"License\"); |
| 25 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
26 | 26 | * you may not use this file except in compliance with the License.
|
27 | 27 | * You may obtain a copy of the License at
|
28 | 28 | *
|
29 | 29 | * http://www.apache.org/licenses/LICENSE-2.0
|
30 | 30 | *
|
31 | 31 | * Unless required by applicable law or agreed to in writing, software
|
32 |
| - * distributed under the License is distributed on an \"AS IS\" BASIS, |
| 32 | + * distributed under the License is distributed on an "AS IS" BASIS, |
33 | 33 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
34 | 34 | * See the License for the specific language governing permissions and
|
35 | 35 | * limitations under the License.
|
|
94 | 94 | * \@endcode
|
95 | 95 | *
|
96 | 96 | */
|
97 |
| -#define CHIP_VERSION_CODE_ENCODE(major, minor, patch) \\ |
98 |
| - ((((major) & _CHIP_VERSION_CODE_MAJOR_MASK) << _CHIP_VERSION_CODE_MAJOR_SHIFT) | \\ |
99 |
| - (((minor) & _CHIP_VERSION_CODE_MINOR_MASK) << _CHIP_VERSION_CODE_MINOR_SHIFT) | \\ |
| 97 | +#define CHIP_VERSION_CODE_ENCODE(major, minor, patch) \ |
| 98 | + ((((major) & _CHIP_VERSION_CODE_MAJOR_MASK) << _CHIP_VERSION_CODE_MAJOR_SHIFT) | \ |
| 99 | + (((minor) & _CHIP_VERSION_CODE_MINOR_MASK) << _CHIP_VERSION_CODE_MINOR_SHIFT) | \ |
100 | 100 | (((patch) & _CHIP_VERSION_CODE_PATCH_MASK) << _CHIP_VERSION_CODE_PATCH_SHIFT))
|
101 | 101 |
|
102 | 102 | /**
|
|
160 | 160 | * The CHIP version extra component, as a quoted C string.
|
161 | 161 | *
|
162 | 162 | */
|
163 |
| -#define CHIP_VERSION_EXTRA \"%(chip_extra)s\" |
| 163 | +#define CHIP_VERSION_EXTRA "%(chip_extra)s" |
164 | 164 |
|
165 | 165 | /**
|
166 | 166 | * \@def CHIP_VERSION_STRING
|
|
169 | 169 | * The CHIP version, as a quoted C string.
|
170 | 170 | *
|
171 | 171 | */
|
172 |
| -#define CHIP_VERSION_STRING \"%(chip_version)s\" |
| 172 | +#define CHIP_VERSION_STRING "%(chip_version)s" |
173 | 173 |
|
174 | 174 | /**
|
175 | 175 | * \@def CHIP_VERSION_CODE
|
|
191 | 191 | * \@endcode
|
192 | 192 | *
|
193 | 193 | */
|
194 |
| -#define CHIP_VERSION_CODE CHIP_VERSION_CODE_ENCODE( \\ |
195 |
| - CHIP_VERSION_MAJOR, \\ |
196 |
| - CHIP_VERSION_MINOR, \\ |
197 |
| - CHIP_VERSION_PATCH \\ |
| 194 | +#define CHIP_VERSION_CODE CHIP_VERSION_CODE_ENCODE( \ |
| 195 | + CHIP_VERSION_MAJOR, \ |
| 196 | + CHIP_VERSION_MINOR, \ |
| 197 | + CHIP_VERSION_PATCH \ |
198 | 198 | )
|
199 | 199 |
|
200 | 200 | #endif /* CHIP_VERSION_H_ */
|
|
0 commit comments