version 1.96, 2018/12/24 15:56:09
|
version 1.108, 2024/01/09 07:33:52
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.30 |
RPL/2 (R) version 4.1.35 |
Copyright (C) 1989-2018 Dr. BERTRAND Joël |
Copyright (C) 1989-2024 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 1265 instruction_open(struct_processus *s_eta
|
Line 1265 instruction_open(struct_processus *s_eta
|
printf(" IMAXBEL, OPOST, ONLCR, OCRNL, ONOCR, ONLRET,\n"); |
printf(" IMAXBEL, OPOST, ONLCR, OCRNL, ONOCR, ONLRET,\n"); |
printf(" OFILL, HUPCL, CLOCAL, CRTSCTS, ISIG, ICANON,\n"); |
printf(" OFILL, HUPCL, CLOCAL, CRTSCTS, ISIG, ICANON,\n"); |
printf(" ECHO, ECHOE, ECHOK, ECHONL, NOFLSH, TOSTOP,\n"); |
printf(" ECHO, ECHOE, ECHOK, ECHONL, NOFLSH, TOSTOP,\n"); |
printf(" IEXTEN\n"); |
printf(" IEXTEN, RAW\n"); |
|
|
printf(" Address : { \"ADDRESS\" [ 127 0 0 1 ] }\n"); |
printf(" Address : { \"ADDRESS\" [ 127 0 0 1 ] }\n"); |
printf(" { \"HOST\" \"hostname\" }\n"); |
printf(" { \"HOST\" \"hostname\" }\n"); |
Line 3890 instruction_open(struct_processus *s_eta
|
Line 3890 instruction_open(struct_processus *s_eta
|
#ifdef B230400 |
#ifdef B230400 |
"230400", |
"230400", |
#endif |
#endif |
|
#ifdef B460800 |
|
"460800", |
|
#endif |
|
#ifdef B500000 |
|
"500000", |
|
#endif |
|
#ifdef B576000 |
|
"576000", |
|
#endif |
|
#ifdef B921600 |
|
"921600", |
|
#endif |
|
#ifdef B1000000 |
|
"1000000", |
|
#endif |
|
#ifdef B1152000 |
|
"1152000", |
|
#endif |
NULL }; |
NULL }; |
tcflag_t vitesses_constantes[] = |
tcflag_t vitesses_constantes[] = |
{ B50, B75, B110, B134, B150, B200, B300, B600, |
{ B50, B75, B110, B134, B150, B200, B300, B600, |
Line 3903 instruction_open(struct_processus *s_eta
|
Line 3921 instruction_open(struct_processus *s_eta
|
#ifdef B230400 |
#ifdef B230400 |
B230400, |
B230400, |
#endif |
#endif |
|
#ifdef B460800 |
|
B460800, |
|
#endif |
|
#ifdef B500000 |
|
B500000, |
|
#endif |
|
#ifdef B576000 |
|
B576000, |
|
#endif |
|
#ifdef B921600 |
|
B921600, |
|
#endif |
|
#ifdef B1000000 |
|
B1000000, |
|
#endif |
|
#ifdef B1152000 |
|
B1152000, |
|
#endif |
0 }; |
0 }; |
unsigned int vitesse_courante; |
unsigned int vitesse_courante; |
|
|
Line 4173 instruction_open(struct_processus *s_eta
|
Line 4209 instruction_open(struct_processus *s_eta
|
#ifdef IXANY |
#ifdef IXANY |
"IXANY", |
"IXANY", |
#endif |
#endif |
"IXOFF", "OPOST", |
"IXOFF", |
"ONLCR", "OCRNL", "ONOCR", "ONLRET", |
"OPOST", "ONLCR", "OCRNL", "ONOCR", "ONLRET", |
#ifdef OFILL |
#ifdef OFILL |
"OFILL", |
"OFILL", |
#endif |
#endif |
Line 4183 instruction_open(struct_processus *s_eta
|
Line 4219 instruction_open(struct_processus *s_eta
|
"CRTSCTS", |
"CRTSCTS", |
#endif |
#endif |
"ISIG", "ICANON", "ECHO", "ECHOE", "ECHOK", |
"ISIG", "ICANON", "ECHO", "ECHOE", "ECHOK", |
"ECHONL", "NOFLSH", "TOSTOP", "IEXTEN", NULL }; |
"ECHONL", "NOFLSH", "TOSTOP", "IEXTEN", |
|
|
|
"RAW", |
|
|
|
NULL }; |
tcflag_t fonctions_constantes[] = |
tcflag_t fonctions_constantes[] = |
{ /* c_iflag */ |
{ /* c_iflag */ |
1, IGNBRK, 1, BRKINT, 1, IGNPAR, 1, PARMRK, |
1, IGNBRK, 1, BRKINT, 1, IGNPAR, 1, PARMRK, |
Line 4204 instruction_open(struct_processus *s_eta
|
Line 4244 instruction_open(struct_processus *s_eta
|
#ifdef CRTSCTS |
#ifdef CRTSCTS |
3, CRTSCTS, |
3, CRTSCTS, |
#endif |
#endif |
/* c_lfkag */ |
/* c_lflag */ |
4, ISIG, 4, ICANON, 4, ECHO, 4, ECHOE, 4, ECHOK, |
4, ISIG, 4, ICANON, 4, ECHO, 4, ECHOE, 4, ECHOK, |
4, ECHONL, 4, NOFLSH, 4, TOSTOP, 4, IEXTEN }; |
4, ECHONL, 4, NOFLSH, 4, TOSTOP, 4, IEXTEN, |
|
|
|
/* RAW */ |
|
5, 0 }; |
unsigned int fonction_courante; |
unsigned int fonction_courante; |
|
|
// On vient de trouver quelque chose à interpréter. |
// On vient de trouver quelque chose à interpréter. |
Line 4256 instruction_open(struct_processus *s_eta
|
Line 4299 instruction_open(struct_processus *s_eta
|
[(fonction_courante * 2) + 1]; |
[(fonction_courante * 2) + 1]; |
break; |
break; |
} |
} |
|
|
|
case 5: |
|
{ |
|
// RAW ne peut être négatif |
|
break; |
|
} |
} |
} |
} |
} |
else |
else |
Line 4290 instruction_open(struct_processus *s_eta
|
Line 4339 instruction_open(struct_processus *s_eta
|
[(fonction_courante * 2) + 1]; |
[(fonction_courante * 2) + 1]; |
break; |
break; |
} |
} |
|
|
|
case 5: |
|
{ |
|
// no ignbrk |
|
tc.c_iflag &= ~(tcflag_t) IGNBRK; |
|
// no brkint |
|
tc.c_iflag &= ~(tcflag_t) BRKINT; |
|
// no ignpar |
|
tc.c_iflag &= ~(tcflag_t) IGNPAR; |
|
// no parmrk |
|
tc.c_iflag &= ~(tcflag_t) PARMRK; |
|
// no inpck |
|
tc.c_iflag &= ~(tcflag_t) INPCK; |
|
// no istrip |
|
tc.c_iflag &= ~(tcflag_t) ISTRIP; |
|
// no inlcr |
|
tc.c_iflag &= ~(tcflag_t) INLCR; |
|
// no icrnl |
|
tc.c_iflag &= ~(tcflag_t) ICRNL; |
|
// no ixon |
|
tc.c_iflag &= ~(tcflag_t) IXON; |
|
// no ixoff |
|
tc.c_iflag &= ~(tcflag_t) IXOFF; |
|
#ifdef IXANY |
|
// no ixany |
|
tc.c_iflag &= ~(tcflag_t) IXANY; |
|
#endif |
|
// no opost |
|
tc.c_oflag &= ~(tcflag_t) OPOST; |
|
// no isig |
|
tc.c_lflag &= ~(tcflag_t) ISIG; |
|
// no icanon |
|
tc.c_lflag &= ~(tcflag_t) ICANON; |
|
// no echo |
|
tc.c_lflag &= ~(tcflag_t) ECHO; |
|
// no echoe |
|
tc.c_lflag &= ~(tcflag_t) ECHOE; |
|
// no echok |
|
tc.c_lflag &= ~(tcflag_t) ECHOK; |
|
} |
} |
} |
} |
} |
|
|
break; |
// On sort si on a trouvé un paramètre |
|
// correct et donc différent de "NO RAW". |
|
|
|
if (!((negation == d_vrai) && |
|
(fonctions_constantes[fonction_courante * 2] |
|
== 5))) |
|
{ |
|
break; |
|
} |
} |
} |
} |
} |
|
|
if (fonctions[fonction_courante] == NULL) |
if (fonctions[fonction_courante] == NULL) |
{ |
{ |
|
// Paramètre inconnu |
free(parametre_courant_majuscule); |
free(parametre_courant_majuscule); |
liberation(s_etat_processus, s_objet_argument); |
liberation(s_etat_processus, s_objet_argument); |
liberation(s_etat_processus, s_objet_resultat); |
liberation(s_etat_processus, s_objet_resultat); |