74
extern Word8 language;
75
extern BYTE multy_language;
77
extern Word16 actual_resolution;
79
extern Word8 spec_camera;
80
extern Word8 no_linpen;
81
extern Int16 prop_l_delta, prop_r_delta;
84
extern Word8 *letters_pidx_table; // 512
85
extern Word8 decode_ASCII_to_[256][4];
88
INT minrow,mincol, maxrow, maxcol;
89
INT bs_got=0; // in baton.c - LONG - error!?
91
INT bbs0,bbs1, bbs2, bbs3, bbs4, bbsm; // bbst,
92
INT bsdust_upper, bsdust_lower, bsdust_ps;
93
INT Nb1, Nb2, Nb3, Nb4, Nbt, Ps, Psf;
96
INT Ns1=0,Ns2=0; // in Iot.c only !!!
97
//INT pen_up; // for otladka 't' in St_tools.c
102
CHAR all_diffs_made=0;
74
extern uchar language;
75
extern uchar multy_language;
77
extern uint16_t actual_resolution;
79
extern uchar spec_camera;
80
extern uchar no_linpen;
81
extern int16_t prop_l_delta, prop_r_delta;
84
extern uchar *letters_pidx_table; // 512
85
extern uchar decode_ASCII_to_[256][4];
88
int16_t minrow,mincol, maxrow, maxcol;
89
int16_t bs_got=0; // in baton.c - int32_t - error!?
91
int16_t bbs0,bbs1, bbs2, bbs3, bbs4, bbsm; // bbst,
92
int16_t bsdust_upper, bsdust_lower, bsdust_ps;
93
int16_t Nb1, Nb2, Nb3, Nb4, Nbt, Ps, Psf;
96
int16_t Ns1=0,Ns2=0; // in Iot.c only !!!
97
//int16_t pen_up; // for otladka 't' in St_tools.c
102
char all_diffs_made=0;
103
103
CSTR_line lin_str=(CSTR_line)NULL; // pass3.c only
107
107
static BAL_bas_ln all_bases[32];
110
INT sMALL_SIZE=SMALL_SIZE;
110
int16_t sMALL_SIZE=SMALL_SIZE;
112
INT obtain_diff(INT arg);
112
int16_t obtain_diff(int16_t arg);
114
114
/////////////////////
117
117
{ return (bbsm+minrow); }
119
INT def_locbas(cell *cl)
119
int16_t def_locbas(cell *cl)
121
121
BAL_bas_ln *bc, *bn, *bsp;
122
int16_t i, x, y, dc, dn;
125
125
if ((multi_bas & 128) == 0)
126
126
goto retps; // multiple bases not set
241
241
/*============= Func prototypes ==================*/
243
BYTE to_lower(BYTE c);
244
BYTE to_upper(BYTE c);
245
INT is_lower(BYTE ch);
246
INT is_upper(BYTE ch);
247
INT isletter(BYTE ch);
248
BYTE get_homot(BYTE ch);
249
INT draft_cut_hyps(INT bs,INT fl);
243
uchar to_lower(uchar c);
244
uchar to_upper(uchar c);
245
int16_t is_lower(uchar ch);
246
int16_t is_upper(uchar ch);
247
int16_t isletter(uchar ch);
248
uchar get_homot(uchar ch);
249
int16_t draft_cut_hyps(int16_t bs,int16_t fl);
251
251
/*============= Source code ============*/
252
BOOL is_liga_ff(BYTE c)
252
Bool is_liga_ff(uchar c)
254
254
// ��� ���� ��������� ����� ����� � ligas.h 05.09.2000 E.P.
255
255
return (c==liga_ff);
257
BOOL is_liga_ffl(BYTE c)
257
Bool is_liga_ffl(uchar c)
259
259
// ��� ���� ��������� ����� ����� � ligas.h 05.09.2000 E.P.
260
260
return (c==liga_ffl);
263
INT is_russian(BYTE ch)
263
int16_t is_russian(uchar ch)
265
265
if( language==LANG_RUSSIAN || language==LANG_ENGLISH && multy_language )
267
267
case ED_ASCII: // for ASCII
268
if((ch >=(BYTE)'�' && ch <=(BYTE)'�') ||
269
(ch >=(BYTE)'�' && ch <=(BYTE)'�') ||
270
(ch >=(BYTE)'�' && ch <=(BYTE)'�') ||
268
if((ch >=(uchar)'�' && ch <=(uchar)'�') ||
269
(ch >=(uchar)'�' && ch <=(uchar)'�') ||
270
(ch >=(uchar)'�' && ch <=(uchar)'�') ||
271
271
memchr("��������",ch,8)
274
274
case ED_WIN: // for Windows (ANSI)
275
if( (ch >=0xE0 && ch <=0xFF)||(ch >=(BYTE)'�' && ch <=(BYTE)'�'))
275
if( (ch >=0xE0 && ch <=0xFF)||(ch >=(uchar)'�' && ch <=(uchar)'�'))
278
278
case ED_MAC: // for Macintosh
570
570
///////////////////////////////////////
571
INT is_lower(BYTE ch)
571
int16_t is_lower(uchar ch)
574
574
if(language==LANG_RUSSIAN)
576
576
case ED_ASCII: // for ASCII
577
if((ch >=(BYTE)'�' && ch <=(BYTE)'�') ||
578
(ch >=(BYTE)'�' && ch <=(BYTE)'�') ||
577
if((ch >=(uchar)'�' && ch <=(uchar)'�') ||
578
(ch >=(uchar)'�' && ch <=(uchar)'�') ||
579
579
memchr("�������",ch,7)
613
BOOL is_digit(BYTE ch)
613
Bool is_digit(uchar ch)
615
if(ch >= (BYTE)'0' && ch <= (BYTE)'9') return TRUE;
615
if(ch >= (uchar)'0' && ch <= (uchar)'9') return TRUE;
616
616
else return FALSE;
619
INT isletter(BYTE ch)
619
int16_t isletter(uchar ch)
621
621
if(is_lower(ch) || is_upper(ch)) return 1;
625
static const BYTE non_twin[]="������";
626
static const BYTE lat_twins[]="cCoOpPsSvVwWxXzZ";
625
static const uchar non_twin[]="������";
626
static const uchar lat_twins[]="cCoOpPsSvVwWxXzZ";
628
int16_t twin(uchar ch)
630
630
if(!isletter(ch)) return 0;
631
631
if( language==LANG_RUSSIAN )
638
BYTE get_homot(BYTE ch )
638
uchar get_homot(uchar ch )
640
if(ch == '0') return ((BYTE)'�');
640
if(ch == '0') return ((uchar)'�');
641
641
if(is_upper(ch)) return to_lower(ch);
642
642
if(is_lower(ch)) return to_upper(ch);
646
646
/* Function returns UPPER CASE variant of the letter. */
647
BYTE to_upper( BYTE c )
647
uchar to_upper( uchar c )
649
if ( c >= (BYTE)'a' && c <= (BYTE)'z') return c - (BYTE)'a' + (BYTE)'A';
649
if ( c >= (uchar)'a' && c <= (uchar)'z') return c - (uchar)'a' + (uchar)'A';
650
650
if(language==LANG_RUSSIAN)
652
652
case ED_ASCII: // for ASCII
653
if ( c >= (BYTE)'�' && c <= (BYTE)'�') return c - (BYTE)'�' + (BYTE)'�';
654
if ( c >= (BYTE)'�' && c <= (BYTE)'�') return c - (BYTE)'�' + (BYTE)'�';
653
if ( c >= (uchar)'�' && c <= (uchar)'�') return c - (uchar)'�' + (uchar)'�';
654
if ( c >= (uchar)'�' && c <= (uchar)'�') return c - (uchar)'�' + (uchar)'�';
656
656
case ED_WIN: // for Windows (ANSI)
657
657
if ( c >= 0xE0 && c <= 0xFF ) return c - 0xE0 + 0xC0;
667
667
/* Function returns LOWER CASE variant of the letter. */
668
BYTE to_lower(BYTE c)
668
uchar to_lower(uchar c)
670
if ( c >= (BYTE)'A' && c <= (BYTE)'Z') return c - (BYTE)'A'+ (BYTE)'a' ;
670
if ( c >= (uchar)'A' && c <= (uchar)'Z') return c - (uchar)'A'+ (uchar)'a' ;
671
671
if(language==LANG_RUSSIAN)
673
673
case ED_ASCII: // for ASCII
674
if ( c >= (BYTE)'�' && c <= (BYTE)'�') return c - (BYTE)'�'+ (BYTE)'�' ;
675
if ( c >= (BYTE)'�' && c <= (BYTE)'�') return c - (BYTE)'�'+ (BYTE)'�' ;
674
if ( c >= (uchar)'�' && c <= (uchar)'�') return c - (uchar)'�'+ (uchar)'�' ;
675
if ( c >= (uchar)'�' && c <= (uchar)'�') return c - (uchar)'�'+ (uchar)'�' ;
677
677
case ED_WIN: // for Windows
678
678
if ( c >= 0xC0 && c <= 0xDF) return c - 0xC0 + 0xE0 ;
973
973
void clear_cells(void);
974
974
void Cells2CSTR(CSTR_line lin,CSTR_line lino,cell *cur,Bool32 enable_scaled);
975
975
// ��� CopyAttr2CSTR � Cells2CSTR() !!!
976
BOOL SetFontReady(BOOL fready);
977
Int32 p2_Cstr2Cell( CSTR_line lin,CSTR_rast first,CSTR_rast last,Bool32 needVers, Word32 disable );
976
Bool SetFontReady(Bool fready);
977
int32_t p2_Cstr2Cell( CSTR_line lin,CSTR_rast first,CSTR_rast last,Bool32 needVers, uint32_t disable );
978
978
// ��������������� ����� ������� �����
979
979
void basedraft(CSTR_line ln)