mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-01-15 14:10:33 +01:00
The third arg to strtol() specifies the base to assume for the number. When 0 is passed, as is currently done in option-parser.c, hexadecimal and octal numbers are permitted and automatically detected and converted. In weston and the weston clients and tests using option-parser.c, the options are all things that can be expected to be specified in base 10: widths, heights, counts, scales, font sizes, ports, ttys, connectors, etc. The subsurfaces client uses two modes, limited to values 0 and 1 only. The zuc testsuite has a --random parameter for specifying a seed, which is the only option where using hexadecimal or octal numbers might conceivably happen. The benefit of limiting this to base-10 is to eliminate surprises when parsing numbers from the command line. Also, by making the code consistent with other usages of strtol/strtoul, it may make it possible to factor out the common code in the future. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> |
||
|---|---|---|
| .. | ||
| cairo-util.c | ||
| cairo-util.h | ||
| config-parser.c | ||
| config-parser.h | ||
| file-util.c | ||
| file-util.h | ||
| frame.c | ||
| helpers.h | ||
| image-loader.c | ||
| image-loader.h | ||
| matrix.c | ||
| matrix.h | ||
| option-parser.c | ||
| os-compatibility.c | ||
| os-compatibility.h | ||
| platform.h | ||
| timespec-util.h | ||
| xalloc.c | ||
| xalloc.h | ||
| zalloc.h | ||