|
Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
|
#include <assert.h>#include <ctype.h>#include <errno.h>#include <signal.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include "exec.h"#include "target.h"#include "util.h"#include "cmdopt.h"
Go to the source code of this file.
Functions | |
| int | eval_options (int argc, char **argv, struct target_opts *defaults, const char **exe_opts) |
| char ** | split_opt_string (const char *opts) |
Variables | |
| const char * | exe_name |
| const char | escape_code = '\\' |
| const char | default_path_sep = '/' |
| const char | suffix_sep = '.' |
| const size_t | exe_suffix_len = 0 |
| int eval_options | ( | int | argc, |
| char ** | argv, | ||
| struct target_opts * | defaults, | ||
| const char ** | exe_opts | ||
| ) |
Parses command line arguments for switches and options.
| argc | number of command line arguments. |
| argv | command line arguments. |
| defaults | target_status structure containing default values. |
| exe_opts | handle to default child process arguments string |
Definition at line 435 of file cmdopt.cpp.
| char ** split_opt_string | ( | const char * | opts | ) |
Translates opts into an array that can be passed to exec().
This method malloc ()s two blocks of memory. The first block is the generated argv index array. This is the return value of this method. The second block is the parsed and split string contents the index referenced.
This block is stored in element 1 of the return array. It is the responsibility of the calling method to free () both blocks.
| opts | option string to split |
Definition at line 678 of file cmdopt.cpp.
| const char default_path_sep = '/' |
Primary path seperator
Definition at line 60 of file cmdopt.cpp.
| const char escape_code = '\\' |
Escape character used in paths.
Definition at line 59 of file cmdopt.cpp.
| const char* exe_name |
cmdopt.cpp - Definitions of the option parsing subsystem
$Id$
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Alias for process argv [0].
Definition at line 55 of file cmdopt.cpp.
| const size_t exe_suffix_len = 0 |
Length of executable suffix.
Definition at line 62 of file cmdopt.cpp.
| const char suffix_sep = '.' |
File suffix seperator.
Definition at line 61 of file cmdopt.cpp.