diff options
| author | kx <kx@radix-linux.su> | 2026-10-02 08:45:51 +0300 |
|---|---|---|
| committer | kx <kx@radix-linux.su> | 2026-10-02 08:45:51 +0300 |
| commit | 9d5894a43e3b4dcc4c3b2756b289aba51eef6c63 (patch) | |
| tree | 5df3a0f2d7c387180da675aec606e276c0d76f11 /src/mcpp-options.c | |
| parent | ba1b04d64bdfaf377915b22f77520216ebe47674 (diff) | |
| download | mcpu-cpp-9d5894a43e3b4dcc4c3b2756b289aba51eef6c63.tar.xz | |
Move per-user configuration to /home/kx/.mcpu/etc/mcpu-cpp.conf and add --sys-root=PATH
Diffstat (limited to 'src/mcpp-options.c')
| -rw-r--r-- | src/mcpp-options.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mcpp-options.c b/src/mcpp-options.c index 62fafc6..8d0d8cd 100644 --- a/src/mcpp-options.c +++ b/src/mcpp-options.c @@ -139,6 +139,24 @@ mcpp_handle_options( mcpp_options *opts, int argc, char **argv ) if( strcmp(arg, "--help") == 0 ) opts->help = 1; else if( strcmp(arg, "--version") == 0 ) opts->version = 1; else if( strcmp(arg, "--no-config") == 0 ) opts->no_config = 1; + else if( strncmp(arg, "--sys-root=", 11) == 0 ) + { + if( arg[11] == 0 ) + { + fprintf( stderr, "%s: empty path in '--sys-root='\n", + opts->progname ); + return( -1 ); + } + opts->sys_root = arg + 11; + opts->no_config = 1; + } + else if( strcmp(arg, "--sys-root") == 0 ) + { + value = option_argument(opts, argc, argv, &i, NULL, arg); + if( value == NULL || *value == 0 ) return( -1 ); + opts->sys_root = value; + opts->no_config = 1; + } else if( strcmp(arg, "--config-file") == 0 ) { value = option_argument(opts, argc, argv, &i, NULL, arg); |
