/*

italiane.h

*/

#include <exec/nodes.h>

#ifndef H_FMLIB
    #include "fmlib.h"
#endif

/* #define CMD_ 0x */

#define CMD_NULL  0x00
#define CMD_CLOSE 0x01
#define CMD_NEWF  0x02
#define CMD_SAVE  0x03
#define CMD_RSTRT 0x04

#define BS_DONE 0x10        /* Finita conversione buffer */
#define BS_PROC 0x11        /* PROCessing buffer */
#define BS_VOID 0x12        /* Nessun buffer attivo */

#define MAXLINEA 1024

typedef struct buf_line_node {
    struct Node bln_node;
    UBYTE      *bln_lineptr;
    int         bln_len;            /* lunghezza della linea puntata */
} BLN;

typedef struct buff_stat {
    char  bs_nome[ NOME_DOS ];
    long  bs_size;
    int   bs_tot39;                 /* totale  '  nel file */
    int   bs_tot96;                 /* totale  `  nel file */
    int   bs_status;                /* processing | finito */
} BUST;

typedef struct ital_ctl_blk {
    struct List *icb_tlista;        /* per primo vale come estensione */
    BUFD        *icb_bufd;          /* buffer corrente */
    BUST        *icb_bust;          /* dati del buffer corrente */
    int          icb_er;            /* codice di errore */
    int          icb_command;       /* comando richiesto (funzione) */
    void        *icb_cpb;           /* c)ommand p)arameter b)lock */
    void        *icb_crb;           /* c)ommand r)esult    b)lock */
    UBYTE    icb_linea[ MAXLINEA ]; /* nell'ipotesi una linea per volta */
} ICTB;

/*-----------------------------  FUNZIONI  -----------------------------*/

extern void CHIUDI();       /* void CHIUDI( ICTB * ) */
extern void MANAGE_CMD();   /* void MANAGE_CMD( ICTB * ) */
extern BOOL LINEA_CMD();    /* BOOL LINEA_CMD( int , char ** ) */

extern void INTERFACCIA();  /* void INTERFACCIA( ICTB* ) */

extern void PASSI();        /* void PASSI( BUFD * ) */

extern void exit();
