Revision: 473141c1dedf
Author: Zdenko Podobný <
zde...@gmail.com>
Date: Sun Dec 28 16:55:56 2014 UTC
Log: fix bool in c-api
https://code.google.com/p/tesseract-ocr/source/detail?r=473141c1dedf
Modified:
/api/capi.cpp
/api/capi.h
=======================================
--- /api/capi.cpp Sun Dec 7 13:07:14 2014 UTC
+++ /api/capi.cpp Sun Dec 28 16:55:56 2014 UTC
@@ -667,13 +667,17 @@
handle->Orientation(orientation, writing_direction, textline_order,
deskew_angle);
}
-TESS_API void TESS_CALL TessPageIteratorParagraphInfo(TessPageIterator*
handle, TessParagraphJustification* justification,
- bool *is_list_item,
- bool *is_crown,
- int *first_line_indent)
+TESS_API void TESS_CALL TessPageIteratorParagraphInfo(TessPageIterator*
handle, TessParagraphJustification* justification,
+ BOOL *is_list_item,
BOOL *is_crown, int *first_line_indent);
{
- handle->ParagraphInfo(justification, is_list_item, is_crown,
first_line_indent);
+ bool bool_is_list_item, bool_is_crown;
+ handle->ParagraphInfo(justification, &bool_is_list_item,
&bool_is_crown, first_line_indent);
+ if (is_list_item)
+ *is_list_item = bool_is_list_item ? TRUE : FALSE;
+ if (is_crown)
+ *is_crown = bool_is_crown ? TRUE : FALSE;
}
+
TESS_API void TESS_CALL TessResultIteratorDelete(TessResultIterator*
handle)
{
=======================================
--- /api/capi.h Sun Dec 7 13:07:14 2014 UTC
+++ /api/capi.h Sun Dec 28 16:55:56 2014 UTC
@@ -301,7 +301,7 @@
TESS_API void TESS_CALL TessBaseAPISetMinOrientationMargin(TessBaseAPI*
handle, double margin);
#ifdef TESS_CAPI_INCLUDE_BASEAPI
-TESS_API void TESS_CALL TessBaseGetBlockTextOrientations(TessBaseAPI*
handle, int** block_orientation, bool** vertical_writing);
+TESS_API void TESS_CALL TessBaseGetBlockTextOrientations(TessBaseAPI*
handle, int** block_orientation, BOOL** vertical_writing);
TESS_API BLOCK_LIST*
TESS_CALL TessBaseAPIFindLinesCreateBlockList(TessBaseAPI*
handle);
@@ -338,7 +338,7 @@
float* deskew_angle);
TESS_API void TESS_CALL TessPageIteratorParagraphInfo(TessPageIterator*
handle, TessParagraphJustification* justification,
- bool *is_list_item,
bool *is_crown, int *first_line_indent);
+ BOOL *is_list_item,
BOOL *is_crown, int *first_line_indent);
/* Result iterator */