Tesseract  3.02
tesseract-ocr/training/tessopt.cpp File Reference
#include "mfcpch.h"
#include <string.h>
#include <stdio.h>
#include "tessopt.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.

  {
  const char *arg;                     //arg char

  if (tessoptind == 0)
    tessoptind = 1;
  if (tessoptind < argc && argv[tessoptind][0] == '-') {
    arg = strchr (arglist, argv[tessoptind][1]);
    if (arg == NULL || *arg == ':')
      return '?';                //dud option
    tessoptind++;
    tessoptarg = argv[tessoptind];
    if (arg[1] == ':') {
      if (argv[tessoptind - 1][2] != '\0')
                                 //immediately after
        tessoptarg = argv[tessoptind - 1] + 2;
      else
        tessoptind++;
    }
    return *arg;
  }
  else
    return EOF;
}

Variable Documentation

char* tessoptarg

Definition at line 27 of file tessopt.cpp.

Definition at line 26 of file tessopt.cpp.