Remove unused code.

This commit is contained in:
Egor Pugin 2022-02-07 01:59:33 +03:00
parent 91d836a556
commit 58c52dbce6
3 changed files with 0 additions and 31 deletions

View File

@ -31,12 +31,6 @@ enum TessErrorLogCode {
ABORT = 2 /*abort after error */
};
/* Explicit Error Abort codes */
#define NO_ABORT_CODE 0
#define LIST_ABORT 1
#define MEMORY_ABORT 2
#define FILE_ABORT 3
#if !defined(__GNUC__) && !defined(__attribute__)
# define __attribute__(attr) // compiler without support for __attribute__
#endif

View File

@ -24,14 +24,6 @@
namespace tesseract {
constexpr ERRCODE CANTOPENFILE("Can't open file");
constexpr ERRCODE CANTCREATEFILE("Can't create file");
constexpr ERRCODE CANTMAKEPIPE("Can't create pipe");
constexpr ERRCODE CANTCONNECTPIPE("Can't reconnect pipes to stdin/stdout");
constexpr ERRCODE READFAILED("Read of file failed");
constexpr ERRCODE WRITEFAILED("Write of file failed");
constexpr ERRCODE SELECTFAILED("Select failed");
constexpr ERRCODE EXECFAILED("Could not exec new process");
} // namespace tesseract

View File

@ -93,13 +93,6 @@ inline void chomp_string(char *str) {
}
}
// Advance the current pointer of the file if it points to a newline character.
inline void SkipNewline(FILE *file) {
if (fgetc(file) != '\n') {
fseek(file, -1, SEEK_CUR);
}
}
// return the smallest multiple of block_size greater than or equal to n.
inline int RoundUp(int n, int block_size) {
return block_size * ((n + block_size - 1) / block_size);
@ -197,21 +190,11 @@ inline void ReverseN(void *ptr, int num_bytes) {
}
}
// Reverse the order of bytes in a 16 bit quantity for big/little-endian switch.
inline void Reverse16(void *ptr) {
ReverseN(ptr, 2);
}
// Reverse the order of bytes in a 32 bit quantity for big/little-endian switch.
inline void Reverse32(void *ptr) {
ReverseN(ptr, 4);
}
// Reverse the order of bytes in a 64 bit quantity for big/little-endian switch.
inline void Reverse64(void *ptr) {
ReverseN(ptr, 8);
}
// Reads a vector of simple types from the given file. Assumes that bitwise
// read/write will work with ReverseN according to sizeof(T).
// Returns false in case of error.