version 1.65, 2013/03/15 11:37:26
|
version 1.68, 2013/04/01 15:29:37
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.13 |
RPL/2 (R) version 4.1.14 |
Copyright (C) 1989-2013 Dr. BERTRAND Joël |
Copyright (C) 1989-2013 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 210 instruction_or(struct_processus *s_etat_
|
Line 210 instruction_or(struct_processus *s_etat_
|
struct_objet *s_objet_argument_2; |
struct_objet *s_objet_argument_2; |
struct_objet *s_objet_resultat; |
struct_objet *s_objet_resultat; |
|
|
unsigned long nombre_elements; |
integer8 nombre_elements; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 907 instruction_open(struct_processus *s_eta
|
Line 907 instruction_open(struct_processus *s_eta
|
int buffer_reception; |
int buffer_reception; |
int drapeau; |
int drapeau; |
int priorite; |
int priorite; |
|
int prochain_descripteur; |
int protocole_numerique; |
int protocole_numerique; |
int timeout_emission; |
int timeout_emission; |
int timeout_reception; |
int timeout_reception; |
Line 973 instruction_open(struct_processus *s_eta
|
Line 974 instruction_open(struct_processus *s_eta
|
|
|
unsigned long i; |
unsigned long i; |
unsigned long nombre_elements; |
unsigned long nombre_elements; |
unsigned long prochain_descripteur; |
|
unsigned long unite; |
unsigned long unite; |
|
|
# define d_BIND_TO_DEVICE 0 |
# define d_BIND_TO_DEVICE 0 |
Line 1998 instruction_open(struct_processus *s_eta
|
Line 1998 instruction_open(struct_processus *s_eta
|
if ((protocole_socket[i] >= 'a') && |
if ((protocole_socket[i] >= 'a') && |
(protocole_socket[i] <= 'z')) |
(protocole_socket[i] <= 'z')) |
{ |
{ |
protocole_socket[i] -= 'a' - 'A'; |
protocole_socket[i] = (unsigned char) |
|
(protocole_socket[i] |
|
- ('a' - 'A')); |
} |
} |
} |
} |
} |
} |
Line 3670 instruction_open(struct_processus *s_eta
|
Line 3672 instruction_open(struct_processus *s_eta
|
"230400", |
"230400", |
#endif |
#endif |
NULL }; |
NULL }; |
int vitesses_constantes[] = |
tcflag_t vitesses_constantes[] = |
{ B0, B50, B75, B110, B134, B150, B200, B300, B600, |
{ B0, B50, B75, B110, B134, B150, B200, B300, B600, |
B1200, B1800, B2400, B4800, B9600, B19200, B38400, |
B1200, B1800, B2400, B4800, B9600, B19200, B38400, |
#ifdef B57600 |
#ifdef B57600 |
Line 3696 instruction_open(struct_processus *s_eta
|
Line 3698 instruction_open(struct_processus *s_eta
|
d_code_espace) |
d_code_espace) |
{ |
{ |
#ifdef CBAUD |
#ifdef CBAUD |
tc.c_cflag &= ~CBAUD; |
tc.c_cflag &= ~((tcflag_t) CBAUD); |
tc.c_cflag |= vitesses_constantes[vitesse_courante]; |
tc.c_cflag |= vitesses_constantes[vitesse_courante]; |
#else // POSIX |
#else // POSIX |
cfsetispeed(&tc, |
cfsetispeed(&tc, |
Line 3742 instruction_open(struct_processus *s_eta
|
Line 3744 instruction_open(struct_processus *s_eta
|
{ |
{ |
case '5': |
case '5': |
{ |
{ |
tc.c_cflag &= ~CSIZE; |
tc.c_cflag &= ~((tcflag_t) CSIZE); |
tc.c_cflag |= CS5; |
tc.c_cflag |= CS5; |
break; |
break; |
} |
} |
|
|
case '6': |
case '6': |
{ |
{ |
tc.c_cflag &= ~CSIZE; |
tc.c_cflag &= ~((tcflag_t) CSIZE); |
tc.c_cflag |= CS6; |
tc.c_cflag |= CS6; |
break; |
break; |
} |
} |
|
|
case '7': |
case '7': |
{ |
{ |
tc.c_cflag &= ~CSIZE; |
tc.c_cflag &= ~((tcflag_t) CSIZE); |
tc.c_cflag |= CS7; |
tc.c_cflag |= CS7; |
break; |
break; |
} |
} |
|
|
case '8': |
case '8': |
{ |
{ |
tc.c_cflag &= ~CSIZE; |
tc.c_cflag &= ~((tcflag_t) CSIZE); |
tc.c_cflag |= CS8; |
tc.c_cflag |= CS8; |
break; |
break; |
} |
} |
Line 3809 instruction_open(struct_processus *s_eta
|
Line 3811 instruction_open(struct_processus *s_eta
|
{ |
{ |
case 'N': |
case 'N': |
{ |
{ |
tc.c_cflag &= ~PARENB; |
tc.c_cflag &= ~((tcflag_t) PARENB); |
break; |
break; |
} |
} |
|
|
Line 3823 instruction_open(struct_processus *s_eta
|
Line 3825 instruction_open(struct_processus *s_eta
|
case 'E': |
case 'E': |
{ |
{ |
tc.c_cflag |= PARENB; |
tc.c_cflag |= PARENB; |
tc.c_cflag &= ~PARODD; |
tc.c_cflag &= ~((tcflag_t) PARODD); |
break; |
break; |
} |
} |
|
|
Line 3868 instruction_open(struct_processus *s_eta
|
Line 3870 instruction_open(struct_processus *s_eta
|
{ |
{ |
case '1': |
case '1': |
{ |
{ |
tc.c_cflag &= ~CSTOPB; |
tc.c_cflag &= ~((tcflag_t) CSTOPB); |
break; |
break; |
} |
} |
|
|
Line 3962 instruction_open(struct_processus *s_eta
|
Line 3964 instruction_open(struct_processus *s_eta
|
#endif |
#endif |
"ISIG", "ICANON", "ECHO", "ECHOE", "ECHOK", |
"ISIG", "ICANON", "ECHO", "ECHOE", "ECHOK", |
"ECHONL", "NOFLSH", "TOSTOP", "IEXTEN", NULL }; |
"ECHONL", "NOFLSH", "TOSTOP", "IEXTEN", NULL }; |
int 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, |
1, INPCK, 1, ISTRIP, 1, INLCR, 1, IGNCR, 1, ICRNL, |
1, INPCK, 1, ISTRIP, 1, INLCR, 1, IGNCR, 1, ICRNL, |
Line 4307 instruction_open(struct_processus *s_eta
|
Line 4309 instruction_open(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
prochain_descripteur = i; |
prochain_descripteur = (int) i; |
|
|
/* |
/* |
* Ajout d'un élément à la fin de la liste chaînée |
* Ajout d'un élément à la fin de la liste chaînée |
Line 4397 instruction_open(struct_processus *s_eta
|
Line 4399 instruction_open(struct_processus *s_eta
|
# ifdef SO_BINDTODEVICE |
# ifdef SO_BINDTODEVICE |
if (setsockopt((*((struct_socket *) (*s_objet_resultat) |
if (setsockopt((*((struct_socket *) (*s_objet_resultat) |
.objet)).socket, SOL_SOCKET, SO_BINDTODEVICE, |
.objet)).socket, SOL_SOCKET, SO_BINDTODEVICE, |
peripherique, strlen(peripherique)) != 0) |
peripherique, (socklen_t) strlen(peripherique)) |
|
!= 0) |
{ |
{ |
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); |
Line 5251 instruction_open(struct_processus *s_eta
|
Line 5254 instruction_open(struct_processus *s_eta
|
|
|
adresse_ipv4 = 0; |
adresse_ipv4 = 0; |
for(i = 0; i < 4; adresse_ipv4 = |
for(i = 0; i < 4; adresse_ipv4 = |
(256 * adresse_ipv4) + adresse[i++]); |
(256 * adresse_ipv4) + |
|
((unsigned char) adresse[i++])); |
|
|
socket_ipv4.sin_addr.s_addr = htonl(adresse_ipv4); |
socket_ipv4.sin_addr.s_addr = htonl(adresse_ipv4); |
|
|
Line 5840 instruction_open(struct_processus *s_eta
|
Line 5844 instruction_open(struct_processus *s_eta
|
|
|
adresse_ipv4 = 0; |
adresse_ipv4 = 0; |
for(i = 0; i < 4; adresse_ipv4 = |
for(i = 0; i < 4; adresse_ipv4 = |
(256 * adresse_ipv4) + adresse[i++]); |
(256 * adresse_ipv4) |
|
+ ((unsigned char) adresse[i++])); |
|
|
socket_ipv4.sin_addr.s_addr = htonl(adresse_ipv4); |
socket_ipv4.sin_addr.s_addr = htonl(adresse_ipv4); |
|
|