"Fossies" - the Fresh Open Source Software Archive

Member "tesseract-ocr/doc/html/globaloc_8cpp.html" (26 Oct 2012, 17638 Bytes) of package /linux/misc/old/tesseract-ocr-3.02.02-doc-html.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the tesseract-ocr-3.02.02-doc-html.tar.gz project site itself.

Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
globaloc.cpp File Reference
#include "mfcpch.h"
#include <signal.h>
#include "errcode.h"
#include "tprintf.h"

Go to the source code of this file.

Functions

void signal_exit (int signal_code)
void err_exit ()
void signal_termination_handler (int sig)
void set_global_loc_code (int loc_code)
void set_global_subloc_code (int loc_code)
void set_global_subsubloc_code (int loc_code)

Function Documentation

void err_exit ( )

Definition at line 73 of file globaloc.cpp.

{
}
void set_global_loc_code ( int  loc_code)

Definition at line 100 of file globaloc.cpp.

{
// global_loc_code = loc_code;
}
void set_global_subloc_code ( int  loc_code)

Definition at line 106 of file globaloc.cpp.

{
// global_subloc_code = loc_code;
}
void set_global_subsubloc_code ( int  loc_code)

Definition at line 112 of file globaloc.cpp.

{
// global_subsubloc_code = loc_code;
}
void signal_exit ( int  signal_code)

Definition at line 33 of file globaloc.cpp.

{
/*int exit_status;
if ((global_loc_code == LOC_PASS2) || (global_loc_code == LOC_FUZZY_SPACE))
global_loc_code += global_subloc_code + global_subsubloc_code;
if (signal_code < 0) {
exit_status = global_loc_code * 8 + global_abort_code * 2 + 1;
tprintf ("Signal_exit %d ABORT. LocCode: %d AbortCode: %d\n",
exit_status, global_loc_code, global_abort_code);
}
else {
exit_status = global_loc_code * 8 + signal_code * 2;
tprintf ("Signal_exit %d SIGNAL ABORT. LocCode: %d SignalCode: %d\n",
exit_status, global_loc_code, signal_code);
}
exit(exit_status);*/
exit(signal_code);
}
void signal_termination_handler ( int  sig)

Definition at line 78 of file globaloc.cpp.

{
const ERRCODE SIGNAL_HANDLER_ERR = "Signal_termination_handler called";
SIGNAL_HANDLER_ERR.error("signal_termination_handler", ABORT, "Code %d", sig);
switch (sig) {
case SIGABRT:
signal_exit (-1); //use abort code
// case SIGBUS:
case SIGSEGV:
case SIGFPE:
signal_exit (1); //floating point
case SIGTERM:
signal_exit (2); //timeout by cmdtimer
default:
signal_exit (3); //Anything else
}
}