aroplat

Utilitaire pour manipuler le format aroplat (métaformat de plat)
git clone git://git.asteride.xyz/~ldp/aroplat.git
Journaux | Fichiers | Références | LICENCE

commit d2a7476d97c27289bc87d319b95ba5b159d30157
parent 97c7cb6ead24e82ab5ad7af5022543ef98d6e1c5
Auteur: Selve <selve@asteride.xyz>
Date:   Thu, 25 Jan 2024 09:39:00 -0500

adaptation au nouveau format plat (encore)

Le commit a28ab003978515843623aada7996f4e198ce7b5c (aplat) a restauré le
deux-points final.

Diffstat:
Mbloquer.c | 6+++++-
Mmeta.c | 1-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/bloquer.c b/bloquer.c @@ -200,10 +200,14 @@ static int valider_etqs(struct meta *m) { if (*tp_deb(&m->tp) != ':') { - fprintf(stderr, "%s: fichier corrompu; le premier champ ne " + fprintf(stderr, "%s: fichier corrompu: le premier champ ne " "commence pas par « : »\n", nom_prog); return -1; } + if (*(tp_deb(&m->tp) + m->draps - 2) != ':') { + fprintf(stderr, "%s: fichier corrompu: le dernier champ ne se " + "termine pas par « : »\n", nom_prog); + } return 0; } diff --git a/meta.c b/meta.c @@ -45,7 +45,6 @@ m_lire(FILE *f, struct meta *m) if (tp_ecr(c, &m->tp) < 0) return -1; } - tp_ecr(':', &m->tp); tp_ecr('\0', &m->tp); /* lire les drapeaux */