Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tessopt.h File Reference
#include "host.h"
#include "notdll.h"

Go to the source code of this file.

Functions

int tessopt (inT32 argc, char *argv[], const char *arglist)
 

Variables

int tessoptind
 
char * tessoptarg
 

Function Documentation

int tessopt ( inT32  argc,
char *  argv[],
const char *  arglist 
)

Definition at line 35 of file tessopt.cpp.

39  {
40  const char *arg; //arg char
41 
42  if (tessoptind == 0)
43  tessoptind = 1;
44  if (tessoptind < argc && argv[tessoptind][0] == '-') {
45  arg = strchr (arglist, argv[tessoptind][1]);
46  if (arg == NULL || *arg == ':')
47  return '?'; //dud option
48  tessoptind++;
49  tessoptarg = argv[tessoptind];
50  if (arg[1] == ':') {
51  if (argv[tessoptind - 1][2] != '\0')
52  //immediately after
53  tessoptarg = argv[tessoptind - 1] + 2;
54  else
55  tessoptind++;
56  }
57  return *arg;
58  }
59  else
60  return EOF;
61 }
int tessoptind
Definition: tessopt.cpp:26
#define NULL
Definition: host.h:144
char * tessoptarg
Definition: tessopt.cpp:27

Variable Documentation

char* tessoptarg

Definition at line 27 of file tessopt.cpp.

int tessoptind

Definition at line 26 of file tessopt.cpp.