/usr/include/libhocr/ho_string.h is in libhocr-dev 0.10.18-2.
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 | /***************************************************************************
* ho_string.h
*
* Sat Dec 10 21:00:29 2005
* Copyright 2005 Yacov Zamir
* <kzamir@walla.co.il>
****************************************************************************/
/*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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 program. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file ho_string.h
@brief libhocr C language header.
libhocr - LIBrary for Hebrew Optical Character Recognition
*/
#ifndef HO_STRING_H
#define HO_STRING_H 1
/** @struct ho_string
@brief libhocr string struct
*/
typedef struct
{
char *string;
int size;
int allocated_size;
} ho_string;
/**
@brief creats a new ho_string struct
@return pointer to a newly allocate ho_string or null.
*/
ho_string *ho_string_new ();
/**
@brief free a hocr_text_buffer struct from memory
@param s_str pointer to ho_string struct.
@return 1
*/
int ho_string_free (ho_string * s_str);
/**
@brief add a string to hocr_text_buffer struct
@param s_str pointer to hocr_text_buffer struct.
@param text pointer to the string to be added to the buffer.
@return new size of text
*/
int ho_string_cat (ho_string * s_str, const char *text);
/**
@brief set a string to ho_string struct
@param s_str pointer to hocr_text_buffer struct.
@param text pointer to the string to be set to the buffer.
@return new size of text
*/
int ho_string_set (ho_string * s_str, const char *text);
/**
@brief get the string of ho_string struct
@param s_str pointer to hocr_text_buffer struct.
@return pointer to a newly allocated string (use free to free it)
*/
char * ho_string_get (const ho_string * s_str);
/**
@brief copy ho_string struct
@param s_str pointer to hocr_text_buffer struct.
@return new ho_string
*/
ho_string *ho_string_copy (const ho_string * s_str);
#endif /* HO_STRING_H */
|