MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / get_next_arg

Function get_next_arg

external/ggml/examples/common.cpp:14–22  ·  view source on GitHub ↗

Function to check if the next argument exists

Source from the content-addressed store, hash-verified

12
13// Function to check if the next argument exists
14static std::string get_next_arg(int& i, int argc, char** argv, const std::string& flag, gpt_params& params) {
15 if (i + 1 < argc && argv[i + 1][0] != '-') {
16 return argv[++i];
17 } else {
18 fprintf(stderr, "error: %s requires one argument.\n", flag.c_str());
19 gpt_print_usage(argc, argv, params);
20 exit(0);
21 }
22}
23
24bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
25 for (int i = 1; i < argc; i++) {

Callers 1

gpt_params_parseFunction · 0.85

Calls 1

gpt_print_usageFunction · 0.85

Tested by

no test coverage detected