Numerus  v2.0.0
Roman numerals conversion and manipulation C library.
numerus_cli.c File Reference

Numerus command line interface for user-friendly conversions. More...

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "numerus.h"

Go to the source code of this file.

Functions

int numerus_cli (int argc, char **args)
 Starts a command line interface that converts any typed value to a roman numeral or vice-versa. More...
 

Detailed Description

Numerus command line interface for user-friendly conversions.

License:
This file is part of the Numerus project which is released under the BSD 3-clause license.

This file contains a command line interface that converts any typed value to a roman numeral or vice-versa. To use it, just call

numerus_cli(argc, args);

with argc and args the arguments of the main. This allows any command line parameters passed to the numerus executable to be interpreted as if they were written withing the command line interface.

Definition in file numerus_cli.c.

Function Documentation

int numerus_cli ( int  argc,
char **  args 
)

Starts a command line interface that converts any typed value to a roman numeral or vice-versa.

The argc and args arguments of the main may be passed to it. This allows any command line parameters passed to the numerus executable to be interpreted as if they were written withing the command line interface. To avoid this option, set argc to 0 and args to anything, e.g. NULL.

Parameters
argcint number of main arguments. Set to 0 to disable parsing of main arguments.
argsarray of main arguments to be parsed as commands.
Returns
int status code: 0 if everything went ok or a NUMERUS_ERROR_* otherwise.

Definition at line 285 of file numerus_cli.c.