Commit ddf6131
committed
color: add color_parse_gently()
When parsing colors, a failed parse leads to an error message due to the
result returning error(). To allow for quiet parsing, create
color_parse_gently().
To accomplish this, convert the implementation of color_parse_mem() into
a static color_parse_mem_1() helper that adds a 'gently' parameter. The
color_parse_gently() method can then use this. Since it is a near
equivalent to color_parse(), move that method down in the file so they
can be nearby while also appearing after color_parse_mem_1().
Signed-off-by: Derrick Stolee <stolee@gmail.com>1 parent 9221ca2 commit ddf6131
2 files changed
+19
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | 226 | | |
232 | 227 | | |
233 | 228 | | |
| |||
264 | 259 | | |
265 | 260 | | |
266 | 261 | | |
267 | | - | |
| 262 | + | |
| 263 | + | |
268 | 264 | | |
269 | 265 | | |
270 | 266 | | |
| |||
365 | 361 | | |
366 | 362 | | |
367 | 363 | | |
368 | | - | |
| 364 | + | |
369 | 365 | | |
370 | 366 | | |
371 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
372 | 383 | | |
373 | 384 | | |
374 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
0 commit comments