Server Wait On Clients System - API Documentation  v1.6.4
Server Wait On Clients System.
cmdlineargs.h File Reference

Header file for command line processing. More...

#include <limits.h>
#include <libmgec/mge-portability.h>
Include dependency graph for cmdlineargs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cla
 Command line argument. More...
 

Macros

#define ARG_BUF   PATH_MAX
 Argument buffer size. More...
 

Functions

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

Detailed Description

Header file for command line processing.

Author
Copyright (C) 2015-2022 Mark Grant

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

Version
v1.0.12 ==== 17/09/2022

Macro Definition Documentation

◆ ARG_BUF

#define ARG_BUF   PATH_MAX

Argument buffer size.

Use maximum path length as size of argument for want of a more meaningful value.

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.