version 1.18, 2010/08/22 16:38:36
|
version 1.25, 2011/01/03 12:08:10
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.18 |
RPL/2 (R) version 4.0.20 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 241 localisation_courante(struct_processus *
|
Line 241 localisation_courante(struct_processus *
|
|
|
verrouillage_threads_concurrents(s_etat_processus); |
verrouillage_threads_concurrents(s_etat_processus); |
pid = fork(); |
pid = fork(); |
|
|
# ifdef OS2 |
|
if (pid == 0) |
|
{ |
|
sem_init(&semaphore_liste_threads, 0, 1); |
|
sem_init(&semaphore_gestionnaires_signaux, 0, 0); |
|
sem_init(&semaphore_gestionnaires_signaux_atomique, 0, 1); |
|
sem_init(&((*s_etat_processus).semaphore_fork), 0, 0); |
|
} |
|
# endif |
|
|
|
deverrouillage_threads_concurrents(s_etat_processus); |
deverrouillage_threads_concurrents(s_etat_processus); |
|
|
pthread_sigmask(SIG_SETMASK, &oldset, NULL); |
pthread_sigmask(SIG_SETMASK, &oldset, NULL); |
Line 697 transliterated_fprintf(struct_processus
|
Line 686 transliterated_fprintf(struct_processus
|
} |
} |
|
|
# ifdef OS2 |
# ifdef OS2 |
i = 0; |
if ((flux == stdin) || (flux == stdout)) |
ptr_l = tampon2; |
|
|
|
while((*ptr_l) != d_code_fin_chaine) |
|
{ |
{ |
if ((*ptr_l) == '\n') |
i = 0; |
{ |
ptr_l = tampon2; |
i++; |
|
} |
|
|
|
ptr_l++; |
while((*ptr_l) != d_code_fin_chaine) |
} |
{ |
|
if ((*ptr_l) == '\n') |
if ((tampon3 = malloc((strlen(tampon2) + i + 1) * sizeof(unsigned char))) |
{ |
== NULL) |
i++; |
{ |
} |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return(NULL); |
|
} |
|
|
|
ptr_e = tampon3; |
|
ptr_l = tampon2; |
|
|
|
while((*ptr_l) != d_code_fin_chaine) |
ptr_l++; |
{ |
} |
(*ptr_e) = (*ptr_l); |
|
|
|
if ((*ptr_l) == '\n') |
if ((tampon3 = malloc((strlen(tampon2) + i + 1) * |
|
sizeof(unsigned char))) == NULL) |
{ |
{ |
(*(++ptr_e)) = '\r'; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
ptr_e++; |
return(NULL); |
ptr_l++; |
|
} |
} |
else |
|
|
ptr_e = tampon3; |
|
ptr_l = tampon2; |
|
|
|
while((*ptr_l) != d_code_fin_chaine) |
{ |
{ |
ptr_e++; |
(*ptr_e) = (*ptr_l); |
ptr_l++; |
|
|
if ((*ptr_l) == '\n') |
|
{ |
|
(*(++ptr_e)) = '\r'; |
|
ptr_e++; |
|
ptr_l++; |
|
} |
|
else |
|
{ |
|
ptr_e++; |
|
ptr_l++; |
|
} |
} |
} |
} |
|
|
|
(*ptr_e) = d_code_fin_chaine; |
(*ptr_e) = d_code_fin_chaine; |
|
|
free(tampon2); |
free(tampon2); |
tampon2 = tampon3; |
tampon2 = tampon3; |
|
} |
# endif |
# endif |
|
|
# ifdef SunOS |
# ifdef SunOS |
Line 814 tex_fprintf(struct_processus *s_etat_pro
|
Line 806 tex_fprintf(struct_processus *s_etat_pro
|
return(ios); |
return(ios); |
} |
} |
|
|
|
#undef readline |
|
|
|
unsigned char * |
|
readline_wrapper(unsigned char *invite) |
|
{ |
|
unsigned char *chaine; |
|
|
|
chaine = readline(invite); |
|
printf("\r"); |
|
|
|
return(chaine); |
|
} |
|
|
|
|
#define fprintf NULL |
#define fprintf NULL |
#define printf NULL |
#define printf NULL |
|
|