version 1.78, 2015/01/05 15:32:25
|
version 1.81, 2015/04/14 11:26:18
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.20 |
RPL/2 (R) version 4.1.21 |
Copyright (C) 1989-2015 Dr. BERTRAND Joël |
Copyright (C) 1989-2015 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 690 transliterated_fprintf(struct_processus
|
Line 690 transliterated_fprintf(struct_processus
|
unsigned long i; |
unsigned long i; |
# endif |
# endif |
|
|
if (valsprintf(&tampon, format, arguments) < 0) |
if (valsprintf(s_etat_processus, &tampon, format, arguments) < 0) |
{ |
{ |
va_end(arguments); |
va_end(arguments); |
|
|
Line 789 transliterated_fprintf(struct_processus
|
Line 789 transliterated_fprintf(struct_processus
|
|
|
|
|
int |
int |
|
std_fprintf(file *flux, const char *format, ...) |
|
{ |
|
int ios; |
|
|
|
va_list arguments; |
|
|
|
va_start(arguments, format); |
|
ios = vfprintf(flux, format, arguments); |
|
va_end(arguments); |
|
|
|
// Pas de parenthèses pour ne pas appeler la macro. |
|
return ios; |
|
} |
|
|
|
|
|
int |
tex_fprintf(struct_processus *s_etat_processus, |
tex_fprintf(struct_processus *s_etat_processus, |
file *flux, const char *format, ...) |
file *flux, const char *format, ...) |
{ |
{ |
Line 801 tex_fprintf(struct_processus *s_etat_pro
|
Line 817 tex_fprintf(struct_processus *s_etat_pro
|
|
|
va_start(arguments, format); |
va_start(arguments, format); |
|
|
if (valsprintf(&tampon, format, arguments) < 0) |
if (valsprintf(s_etat_processus, &tampon, format, arguments) < 0) |
{ |
{ |
va_end(arguments); |
va_end(arguments); |
|
|
Line 844 tex_fprintf(struct_processus *s_etat_pro
|
Line 860 tex_fprintf(struct_processus *s_etat_pro
|
#undef readline |
#undef readline |
|
|
unsigned char * |
unsigned char * |
readline_wrapper(unsigned char *invite) |
readline_wrapper(struct_processus *s_etat_processus, unsigned char *invite) |
{ |
{ |
unsigned char *chaine; |
unsigned char *rpl_chaine; |
|
unsigned char *sys_chaine; |
|
|
|
association_etat_processus_readline(s_etat_processus); |
|
sys_chaine = readline(invite); |
|
|
chaine = readline(invite); |
# ifdef OS2 |
printf("\r"); |
printf("\r"); |
|
# endif |
|
|
|
if (sys_chaine == NULL) |
|
{ |
|
return(NULL); |
|
} |
|
|
|
if ((rpl_chaine = rpl_malloc(s_etat_processus, (strlen(sys_chaine) + 1) * |
|
sizeof(unsigned char *))) == NULL) |
|
{ |
|
sys_free(sys_chaine); |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return(NULL); |
|
} |
|
|
|
strcpy(rpl_chaine, sys_chaine); |
|
sys_free(sys_chaine); |
|
|
return(chaine); |
return(rpl_chaine); |
} |
} |
|
|
|
|