| 1 |
/* |
| 2 |
Copyright (c) 1993-2008, Cognitive Technologies |
| 3 |
All rights reserved. |
| 4 |
|
| 5 |
Разрешается повторное распространение и использование как в виде исходного кода, |
| 6 |
так и в двоичной форме, с изменениями или без, при соблюдении следующих условий: |
| 7 |
|
| 8 |
* При повторном распространении исходного кода должны оставаться указанное |
| 9 |
выше уведомление об авторском праве, этот список условий и последующий |
| 10 |
отказ от гарантий. |
| 11 |
* При повторном распространении двоичного кода в документации и/или в |
| 12 |
других материалах, поставляемых при распространении, должны сохраняться |
| 13 |
указанная выше информация об авторском праве, этот список условий и |
| 14 |
последующий отказ от гарантий. |
| 15 |
* Ни название Cognitive Technologies, ни имена ее сотрудников не могут |
| 16 |
быть использованы в качестве средства поддержки и/или продвижения |
| 17 |
продуктов, основанных на этом ПО, без предварительного письменного |
| 18 |
разрешения. |
| 19 |
|
| 20 |
ЭТА ПРОГРАММА ПРЕДОСТАВЛЕНА ВЛАДЕЛЬЦАМИ АВТОРСКИХ ПРАВ И/ИЛИ ДРУГИМИ ЛИЦАМИ "КАК |
| 21 |
ОНА ЕСТЬ" БЕЗ КАКОГО-ЛИБО ВИДА ГАРАНТИЙ, ВЫРАЖЕННЫХ ЯВНО ИЛИ ПОДРАЗУМЕВАЕМЫХ, |
| 22 |
ВКЛЮЧАЯ ГАРАНТИИ КОММЕРЧЕСКОЙ ЦЕННОСТИ И ПРИГОДНОСТИ ДЛЯ КОНКРЕТНОЙ ЦЕЛИ, НО НЕ |
| 23 |
ОГРАНИЧИВАЯСЬ ИМИ. НИ ВЛАДЕЛЕЦ АВТОРСКИХ ПРАВ И НИ ОДНО ДРУГОЕ ЛИЦО, КОТОРОЕ |
| 24 |
МОЖЕТ ИЗМЕНЯТЬ И/ИЛИ ПОВТОРНО РАСПРОСТРАНЯТЬ ПРОГРАММУ, НИ В КОЕМ СЛУЧАЕ НЕ |
| 25 |
НЕСЁТ ОТВЕТСТВЕННОСТИ, ВКЛЮЧАЯ ЛЮБЫЕ ОБЩИЕ, СЛУЧАЙНЫЕ, СПЕЦИАЛЬНЫЕ ИЛИ |
| 26 |
ПОСЛЕДОВАВШИЕ УБЫТКИ, СВЯЗАННЫЕ С ИСПОЛЬЗОВАНИЕМ ИЛИ ПОНЕСЕННЫЕ ВСЛЕДСТВИЕ |
| 27 |
НЕВОЗМОЖНОСТИ ИСПОЛЬЗОВАНИЯ ПРОГРАММЫ (ВКЛЮЧАЯ ПОТЕРИ ДАННЫХ, ИЛИ ДАННЫЕ, |
| 28 |
СТАВШИЕ НЕГОДНЫМИ, ИЛИ УБЫТКИ И/ИЛИ ПОТЕРИ ДОХОДОВ, ПОНЕСЕННЫЕ ИЗ-ЗА ДЕЙСТВИЙ |
| 29 |
ТРЕТЬИХ ЛИЦ И/ИЛИ ОТКАЗА ПРОГРАММЫ РАБОТАТЬ СОВМЕСТНО С ДРУГИМИ ПРОГРАММАМИ, |
| 30 |
НО НЕ ОГРАНИЧИВАЯСЬ ЭТИМИ СЛУЧАЯМИ), НО НЕ ОГРАНИЧИВАЯСЬ ИМИ, ДАЖЕ ЕСЛИ ТАКОЙ |
| 31 |
ВЛАДЕЛЕЦ ИЛИ ДРУГОЕ ЛИЦО БЫЛИ ИЗВЕЩЕНЫ О ВОЗМОЖНОСТИ ТАКИХ УБЫТКОВ И ПОТЕРЬ. |
| 32 |
|
| 33 |
Redistribution and use in source and binary forms, with or without modification, |
| 34 |
are permitted provided that the following conditions are met: |
| 35 |
|
| 36 |
* Redistributions of source code must retain the above copyright notice, |
| 37 |
this list of conditions and the following disclaimer. |
| 38 |
* Redistributions in binary form must reproduce the above copyright notice, |
| 39 |
this list of conditions and the following disclaimer in the documentation |
| 40 |
and/or other materials provided with the distribution. |
| 41 |
* Neither the name of the Cognitive Technologies nor the names of its |
| 42 |
contributors may be used to endorse or promote products derived from this |
| 43 |
software without specific prior written permission. |
| 44 |
|
| 45 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 46 |
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 47 |
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 48 |
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE |
| 49 |
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 50 |
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 51 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 52 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 53 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 54 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 55 |
*/ |
| 56 |
|
| 57 |
#ifndef __ERR16_H |
| 58 |
#define __ERR16_H |
| 59 |
|
| 60 |
typedef signed short int Err16 ; |
| 61 |
#ifdef _SETTYPES |
| 62 |
_SETTYPES( Err16 ); |
| 63 |
#endif |
| 64 |
|
| 65 |
// common use error codes |
| 66 |
#define ER_NONE 0 // all right |
| 67 |
#define ER_INTERNAL -1 // internal error |
| 68 |
#define ER_UNDOCUMENTED -2 // undocumented error (no message for unknown error code) |
| 69 |
#define ER_NOMEMORY -3 // lack of memory |
| 70 |
#define ER_NOSUCHFILE -4 // no such file |
| 71 |
#define ER_DLLFAILED -5 // cannot load dll |
| 72 |
#define ER_CANTOPEN -6 // cannot open file |
| 73 |
#define ER_CANTREAD -7 // cannot read file |
| 74 |
#define ER_CANTWRITE -8 // cannor write file |
| 75 |
#define ER_DISKFULL -9 // disk full |
| 76 |
#define ER_UNSUPPORTEDFORMAT -10 // unsupported format |
| 77 |
#define ER_UNSUPPORTEDVERSION -11 // unsupported version (modification) |
| 78 |
#define ER_UNSUPPORTEDDEVICE -12 // unsupperted device |
| 79 |
#define ER_UNSUPPORTEDPLATFORM -13 // unsupported platform |
| 80 |
#define ER_CORRUPTED -14 // data corrupted (file, internal structure) |
| 81 |
#define ER_EMPTYFEEDER -15 // scanner feeder is empty |
| 82 |
#define ER_IMPROPERIMAGETYPE -16 // improper image |
| 83 |
#define ER_NOTIMPLEMENTED -17 // not implemented routine |
| 84 |
#define ER_CURRENTLYDISABLED -18 // attempt to do currently disabled action |
| 85 |
#define ER_TOOMANYITEMS -19 // too many items |
| 86 |
#define ER_BADUSAGE -20 // wrong arguments, etc... |
| 87 |
#define ER_SKEWTOOBIG -21 // too big image skew... |
| 88 |
#define ER_CANTCONVERT -22 // cannot convert from source to dest. |
| 89 |
#define ER_CANTLOCK -23 // some resource cannot be locked |
| 90 |
#define ER_CANTCREATE -24 // cannot create some object... |
| 91 |
#define ER_CANTDELETE -25 // cannot delete some object... |
| 92 |
#define ER_IMPROPERVALUE -26 // some another value expected! |
| 93 |
#define ER_EMPTY -27 // some value or object assumed to be not empty |
| 94 |
#define ER_TOOLONG -28 // some file or string too long |
| 95 |
#define ER_NOFITNESS -29 // some object does not correspond another |
| 96 |
#define ER_TIMEOUT -30 // timeout !!! |
| 97 |
#define ER_OVERTURN -31 // something is overturned - image, bytes,... |
| 98 |
#define ER_PAGETOOBLACK -32 // f.e. bad binarization result |
| 99 |
#define ER_NOTREADY -33 // abstract device still not ready |
| 100 |
#define ER_OVERFLOW -34 // something overflowed |
| 101 |
#define ER_ACCESSDENIED -35 // something overflowed |
| 102 |
#define ER_BADIMAGE -36 // |
| 103 |
#define ER_BADIMAGEGEOMETRY -37 // |
| 104 |
#define ER_BADIMAGEWIDTH -38 // |
| 105 |
#define ER_BADIMAGEHEIGHT -39 // |
| 106 |
#define ER_BADIMAGEINTENSITY -40 // |
| 107 |
#define ER_CANTFIND -41 // cannot find something |
| 108 |
#define ER_BUSY -42 // object busy |
| 109 |
#define ER_CANTCLOSE -43 // cant close file, stream,... |
| 110 |
#define ER_USERBREAK -44 // user breaks the process... |
| 111 |
|
| 112 |
// DLL specific |
| 113 |
#define ER_NDX_FIRST -1024 |
| 114 |
// |
| 115 |
//#define ER_USERFIRST -1024 |
| 116 |
|
| 117 |
#define ER_USERFIRST -1024 |
| 118 |
// user's error coding convention: |
| 119 |
// #define ER_MY_ERROR1 (ER_USERFIRST - 1) |
| 120 |
// #define ER_MY_ERROR2 (ER_USERFIRST - 2) |
| 121 |
// ... |
| 122 |
|
| 123 |
#endif |