Server Wait On Clients System - API Documentation v1.7.4
Server Wait On Clients System.
Loading...
Searching...
No Matches
cmdlineargs.c File Reference

Command line argument processing for swocclient using getopt_long. More...

#include <getopt.h>
#include <libgen.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include <libmgec/mge-errno.h>
#include <swoc/cmdlineargs.h>
Include dependency graph for cmdlineargs.c:

Functions

static void usage (char **argv)
 
int process_cla (int argc, char **argv,...)
 Process command line arguments using getopt_long.
 
int cpyarg (char *flagarg, char *srcarg)
 

Detailed Description

Command line argument processing for swocclient using getopt_long.

Author
Copyright (C) 2015-2023 Mark Grant

Released under the GPLv3 only.
SPDX-License-Identifier: GPL-3.0-only

Version
v1.2.0 ==== 26/11/2023

Function Documentation

◆ cpyarg()

int cpyarg ( char *  flagarg,
char *  srcarg 
)

◆ process_cla()

int process_cla ( int  argc,
char **  argv,
  ... 
)

Process command line arguments using getopt_long.

On error mge_errno will be set.

Parameters
argcThe standard CLA argc.
argvThe standard CLA argv.
...Variable number of flag structs.
Returns
0 on success, -mge_errno on failure.

◆ usage()

static void usage ( char **  argv)
static