Resolu. Toutes mes fonctions déclarées ont une erreur void ?

Bonjour,

Je ne comprends pas, je declare des prototypes de fonctions,

pour l’instant elles sont vides, mais j’ai 51 errors disant

soit
error: 'vt_erase_line' was not declared in this scope
ou
error: variable or field 'vt_linefeed' declared void

protoypes

void vt_bell(void);
void vt_linefeed(vt200_t *t);
void vt_put_char(vt200_t *t, char c);

void vt_sgr(vt220_t *t);
void vt_exec_csi(vt220_t *t, char cmd);
void vt220_process(vt220_t *t, char c);
void vt220_init(vt220_t *t, int rows, int cols);
void vt_reset_params(vt220_t *t);
void vt_exec_esc(vt200_t *t, char c);
void vt_exec_csi(vt200_t *t, char c);
void vt_erase_display(vt200_t *t, int param);
void vt_erase_line(vt200_t *t, int param);

déclaration

void vt_bell(void)
{

}

void vt_linefeed(vt200_t *t)
{

}

void vt_put_char(vt200_t *t, char c)
{

}

void vt_reset_params(vt220_t *t)
{

}

void vt_exec_esc(vt200_t *t, char c)
{

}

void vt_exec_csi(vt200_t *t, char c)
{

}

void vt_erase_display(vt200_t *t, int param)
{

}

void vt_erase_line(vt200_t *t, int param)
{

}

Erreurs

On a pas le droit de définir une fonction qui retourne void ?

ca fait 3h que je suis la dessus ou bien j’ai oublié quelque chose.

ide 2.3.7
core 3.3.5 esp32-p4
arduino, pioarduino

Merci de votre aide

ah je viens de trouvé, purée la honte, c’était vt220_t et non vt200_t au niveau des paramètres.

[EDIT]

ah non ca ne change rien, j’ai toujours les memes erreurs, meme en remplacant vt200_t par vt220_t, cette structure est déclaré dans le fichier include.

include file:


#define _TERM_PARSE_H

#define VT_MAX_PARAMS 16

typedef enum {
    ST_GROUND,        // texte normal
    ST_ESC,           // ESC reçu
    ST_ESC_INTER,     // ESC + intermédiaire
    ST_CSI_ENTRY,     // ESC [
    ST_CSI_PARAM,     // paramètres CSI
    ST_CSI_INTER,     // intermédiaires CSI
    ST_CSI_FINAL,     // exécution CSI
    ST_OSC,           // ESC ]
    ST_DCS,           // ESC P
    ST_IGNORE         // séquences ignorées
} vt_state_t;

typedef struct {
    // Curseur
    int row, col;
    int saved_row, saved_col;

    // Dimensions
    int rows, cols;

    // Attributs graphiques
    int fg, bg;
    int bold, underline, blink, reverse;

    // Modes DEC
    int origin_mode;      // DECOM
    int wrap_mode;        // DECAWM
    int cursor_visible;

    // Scroll
    int scroll_top;
    int scroll_bottom;

    // Parser
    vt_state_t state;
    int params[VT_MAX_PARAMS];
    int param_count;
    int param_value;
    char intermediates[4];
    int inter_count;

} vt220_t;






#endif

ca compile maintenant, j’avais une duplication de fonction.

problème résolu.

Le fichier terms.h contenait une directive #endif superflue.
Soit vt220, soit vt200 était incorrect.

merci, j’avais vu pour vt200 mais pas pour le #endif