gattrib

parsecmd.c File Reference

Functions to parse the command line. More...

#include <config.h>
#include <stdio.h>
#include <libgeda/libgeda.h>
#include "../include/struct.h"
#include "../include/prototype.h"
#include "../include/globals.h"
Include dependency graph for parsecmd.c:

Go to the source code of this file.

Defines

#define OPTIONS   "qvh"
 Command line option string for getopt.

Functions

void usage (char *cmd)
 Print usage message.
int parse_commandline (int argc, char *argv[])
 Parse command line switches.

Variables

char * optarg
int optind

Detailed Description

Functions to parse the command line and to provide usage information.

Definition in file parsecmd.c.


Define Documentation

#define OPTIONS   "qvh"

Command line option string for getopt. Defines "q" for quiet, "v" for verbose and "h" for help.

Definition at line 48 of file parsecmd.c.


Function Documentation

void usage ( char *  cmd)

Prints gattrib usage information to stdout.

Parameters:
cmdUnused parameter.

Definition at line 77 of file parsecmd.c.

int parse_commandline ( int  argc,
char *  argv[] 
)

Parse command line switches at startup. There are only 3 command line switches:

  • verbose
  • quiet
  • help
    Parameters:
    argcNumber of command line arguments
    argvCommand line arguments (array of strings)
    Returns:
    I don't know what - looks uninitialised in some circumstances.

Definition at line 119 of file parsecmd.c.

Here is the call graph for this function:


Variable Documentation

char* optarg
int optind
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines