#define   LEN_EDIT_ARRAY                        6
#define   SPECIALNO                             6


#define   BIDI_ATT_DESHAPE_LTR                  19l
#define   BIDI_ATT_DESHAPE_RTL                  65555
#define   INC_ONE_MORE_TIME                     1

#define   NO_STATE                              0
#define   BGN_STATE                            'B'
#define   FNL_STATE                            'F'
#define   MID_STATE                            'M'
#define   SSSD_STATE                           'S'
#define   LAM_MID_STATE                        'L'
#define   LAM_FNL_STATE                        'Z'

#define ISOLATED_SHADDA_CH                      0xF1
#define YEH_HAMZA_CH                            0xC6
#define HAMZA_CH                                0xC1
#define TAIL_CH                                 0x9F
#define INITIAL_MID_LAM_CH                      0xE4
#define ISOLATED_LAM_CH                         0xFB
#define NULL_CH                                 0x00
#define CONNECTED_SHADDA_CH                     0xF0
#define BLANK_CH                                0x20
#define LAM                                     0xE4

VOID block_interface (PUSHORT, ULONG, PULONG, PCHAR,
          PCHAR, ULONG, ULONG, ULONG, PUCHAR ,
          ULONG);

ULONG pre_deshape (ULONG,PCHAR,PCHAR,ULONG,ULONG,
                    ULONG,ULONG,PUSHORT,ULONG);

VOID   editasd (PCHAR,ULONG);

ULONG  verify (ULONG , PCHAR );

VOID   deshape( PUCHAR, PCHAR, ULONG, ULONG );

VOID   getbase( PUCHAR, PCHAR, LONG , LONG, LONG );

VOID   deshape_int_mid( PUCHAR, PCHAR, LONG, LONG, LONG, PCHAR );

VOID   deshape_iso_fin( PUCHAR, PCHAR, LONG, LONG, LONG, PCHAR );

VOID   RWTest(PULONG , ULONG, ULONG, ULONG, PINT, PINT);

extern VOID classify( ULONG, PBYTE );

extern VOID find_char( ULONG, ULONG, ULONG, PUCHAR );

INT shape_input( PBYTE, PUCHAR, PUCHAR, PUCHAR, PUCHAR );

extern VOID pre_edit ( PUCHAR , PUCHAR , ULONG , PUCHAR);

VOID adjust1( ULONG long_group_num, PUCHAR char1, ULONG char2, PBYTE state );

VOID adjust2( ULONG long_group_num, ULONG char2, PBYTE state );
