This file is indexed.

/usr/include/ocradlib.h is in libocrad-dev 0.24-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
/*  Ocradlib - Optical Character Recognition library
    Copyright (C) 2009-2014 Antonio Diaz Diaz.

    This library is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this library.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifdef __cplusplus
extern "C" {
#endif

const char * const OCRAD_version_string = "0.24";


/* OCRAD_Pixmap.data is a pointer to image data formed by "height" rows
   of "width" pixels each.
   The format for each pixel depends on mode like this:
   OCRAD_bitmap   --> 1 byte  per pixel;  0 = white, 1 = black
   OCRAD_greymap  --> 1 byte  per pixel;  256 level greymap (0 = black)
   OCRAD_colormap --> 3 bytes per pixel;  16777216 colors RGB (0,0,0 = black) */

enum OCRAD_Pixmap_Mode { OCRAD_bitmap, OCRAD_greymap, OCRAD_colormap };

struct OCRAD_Pixmap
  {
  const unsigned char * data;
  int height;
  int width;
  enum OCRAD_Pixmap_Mode mode;
  };


enum OCRAD_Errno { OCRAD_ok = 0, OCRAD_bad_argument, OCRAD_mem_error,
                   OCRAD_sequence_error, OCRAD_library_error };

struct OCRAD_Descriptor;


const char * OCRAD_version( void );


/*--------------------- Functions ---------------------*/

struct OCRAD_Descriptor * OCRAD_open( void );

int OCRAD_close( struct OCRAD_Descriptor * const ocrdes );

enum OCRAD_Errno OCRAD_get_errno( struct OCRAD_Descriptor * const ocrdes );

int OCRAD_set_image( struct OCRAD_Descriptor * const ocrdes,
                     const struct OCRAD_Pixmap * const image,
                     const bool invert );

int OCRAD_set_image_from_file( struct OCRAD_Descriptor * const ocrdes,
                               const char * const filename,
                               const bool invert );

int OCRAD_set_utf8_format( struct OCRAD_Descriptor * const ocrdes,
                           const bool utf8 );		// 0 = byte, 1 = utf8

int OCRAD_set_threshold( struct OCRAD_Descriptor * const ocrdes,
                         const int threshold );		// 0..255, -1 = auto

int OCRAD_scale( struct OCRAD_Descriptor * const ocrdes, const int value );

int OCRAD_recognize( struct OCRAD_Descriptor * const ocrdes,
                     const bool layout );

int OCRAD_result_blocks( struct OCRAD_Descriptor * const ocrdes );

int OCRAD_result_lines( struct OCRAD_Descriptor * const ocrdes,
                        const int blocknum );		// 0..blocks-1

int OCRAD_result_chars_total( struct OCRAD_Descriptor * const ocrdes );

int OCRAD_result_chars_block( struct OCRAD_Descriptor * const ocrdes,
                              const int blocknum );	// 0..blocks-1

int OCRAD_result_chars_line( struct OCRAD_Descriptor * const ocrdes,
                             const int blocknum,	// 0..blocks-1
                             const int linenum );	// 0..lines(block)-1

const char * OCRAD_result_line( struct OCRAD_Descriptor * const ocrdes,
                                const int blocknum,	// 0..blocks-1
                                const int linenum );	// 0..lines(block)-1

int OCRAD_result_first_character( struct OCRAD_Descriptor * const ocrdes );

#ifdef __cplusplus
}
#endif