version 1.2, 2010/01/27 22:22:10
|
version 1.3, 2010/01/29 16:49:23
|
Line 104 formateur(struct_processus *s_etat_proce
|
Line 104 formateur(struct_processus *s_etat_proce
|
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
*/ |
*/ |
|
|
sprintf(tampon, "%016lX", (*((unsigned long *) ((*s_objet).objet)))); |
if (alsprintf(&chaine, "@ %016lX", (*((unsigned long *) |
|
((*s_objet).objet)))) < 0) |
chaine = (unsigned char *) malloc((strlen(tampon) + 3) |
|
* sizeof(unsigned char)); |
|
|
|
if (chaine == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return(NULL); |
return(NULL); |
} |
} |
|
|
strcpy(chaine, "@ "); |
|
strcat(chaine, tampon); |
|
} |
} |
else if ((*s_objet).type == SLB) |
else if ((*s_objet).type == SLB) |
{ |
{ |
Line 127 formateur(struct_processus *s_etat_proce
|
Line 120 formateur(struct_processus *s_etat_proce
|
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
*/ |
*/ |
|
|
sprintf(tampon, " %016lX", (unsigned long) (*((struct_bibliotheque *) |
if (alsprintf(&chaine, "Library $ %016lX [%s]", |
(*s_objet).objet)).descripteur); |
(unsigned long) (*((struct_bibliotheque *) |
|
(*s_objet).objet)).descripteur, (*((struct_bibliotheque *) |
chaine = (unsigned char *) malloc((strlen(tampon) + 10) |
(*s_objet).objet)).nom) < 0) |
* sizeof(unsigned char)); |
|
|
|
if (chaine == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return(NULL); |
|
} |
|
|
|
strcpy(chaine, "Library $"); |
|
strcat(chaine, tampon); |
|
|
|
registre = chaine; |
|
|
|
if ((chaine = malloc((strlen(registre) + 2 + |
|
strlen((*(struct_bibliotheque *) ((*s_objet).objet)).nom) |
|
+ 2) * sizeof(unsigned char))) == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return(NULL); |
return(NULL); |
} |
} |
|
|
sprintf(chaine, "%s [%s]", registre, (*((struct_bibliotheque *) |
|
(*s_objet).objet)).nom); |
|
free(registre); |
|
} |
} |
else if ((*s_objet).type == SPH) |
else if ((*s_objet).type == SPH) |
{ |
{ |
Line 165 formateur(struct_processus *s_etat_proce
|
Line 138 formateur(struct_processus *s_etat_proce
|
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
*/ |
*/ |
|
|
sprintf(tampon, "%016lX", (unsigned long) |
if (alsprintf(&chaine, "Semaphore $ %016lX '%s'", |
&((*((struct_semaphore *) (*s_objet).objet)).semaphore)); |
&((*((struct_semaphore *) (*s_objet).objet)).semaphore), |
|
(*((struct_semaphore *) (*s_objet).objet)).nom) < 0) |
chaine = (unsigned char *) malloc((strlen(tampon) + 15 + |
|
strlen((*((struct_semaphore *) (*s_objet).objet)).nom)) |
|
* sizeof(unsigned char)); |
|
|
|
if (chaine == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return(NULL); |
return(NULL); |
} |
} |
|
|
sprintf(chaine, "Semaphore $%s '%s'", tampon, |
|
(*((struct_semaphore *) (*s_objet).objet)).nom); |
|
} |
} |
else if ((*s_objet).type == SQL) |
else if ((*s_objet).type == SQL) |
{ |
{ |
Line 194 formateur(struct_processus *s_etat_proce
|
Line 159 formateur(struct_processus *s_etat_proce
|
"MYSQL") == 0) |
"MYSQL") == 0) |
{ |
{ |
# ifdef MYSQL_SUPPORT |
# ifdef MYSQL_SUPPORT |
sprintf(tampon, "Sql $%016lX (%s)", |
if (alsprintf(&chaine, "Sql $ %016lX (%s)", |
(long unsigned int) (*((struct_connecteur_sql *) |
(long unsigned int) (*((struct_connecteur_sql *) |
(*s_objet).objet)).descripteur.mysql, |
(*s_objet).objet)).descripteur.mysql, |
(*((struct_connecteur_sql *) (*s_objet).objet)).type); |
(*((struct_connecteur_sql *) (*s_objet).objet)).type) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return(NULL); |
|
} |
# else |
# else |
if ((*s_etat_processus).langue == 'F') |
if ((*s_etat_processus).langue == 'F') |
{ |
{ |
Line 217 formateur(struct_processus *s_etat_proce
|
Line 186 formateur(struct_processus *s_etat_proce
|
"POSTGRESQL") == 0) |
"POSTGRESQL") == 0) |
{ |
{ |
# ifdef POSTGRESQL_SUPPORT |
# ifdef POSTGRESQL_SUPPORT |
sprintf(tampon, "Sql $%016lX [ %s ]", |
if (alsprintf(&chaine, "Sql $ %016lX (%s)", |
(long unsigned int) (*((struct_connecteur_sql *) |
(long unsigned int) (*((struct_connecteur_sql *) |
(*s_objet).objet)).descripteur.postgresql, |
(*s_objet).objet)).descripteur.mysql, |
(*((struct_connecteur_sql *) (*s_objet).objet)).type); |
(*((struct_connecteur_sql *) (*s_objet).objet)).type) < 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return(NULL); |
|
} |
# else |
# else |
if ((*s_etat_processus).langue == 'F') |
if ((*s_etat_processus).langue == 'F') |
{ |
{ |
Line 242 formateur(struct_processus *s_etat_proce
|
Line 215 formateur(struct_processus *s_etat_proce
|
(*((struct_connecteur_sql *) (*s_objet).objet)) |
(*((struct_connecteur_sql *) (*s_objet).objet)) |
.type)); |
.type)); |
} |
} |
|
|
chaine = (unsigned char *) malloc((strlen(tampon) + 1) |
|
* sizeof(unsigned char)); |
|
|
|
if (chaine == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return(NULL); |
|
} |
|
|
|
strcpy(chaine, tampon); |
|
} |
} |
else if ((*s_objet).type == PRC) |
else if ((*s_objet).type == PRC) |
{ |
{ |
Line 266 formateur(struct_processus *s_etat_proce
|
Line 228 formateur(struct_processus *s_etat_proce
|
if ((*(*((struct_processus_fils *) (*s_objet).objet)).thread) |
if ((*(*((struct_processus_fils *) (*s_objet).objet)).thread) |
.processus_detache == d_vrai) |
.processus_detache == d_vrai) |
{ |
{ |
sprintf(tampon, " %016lX", (unsigned long) |
if (alsprintf(&chaine, "Process $ %016lX", (unsigned long) |
(*(*((struct_processus_fils *) (*s_objet).objet)).thread) |
(*(*((struct_processus_fils *) (*s_objet).objet)).thread) |
.pid); |
.pid) < 0) |
|
|
chaine = (unsigned char *) malloc((strlen(tampon) + 10) |
|
* sizeof(unsigned char)); |
|
|
|
if (chaine == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return(NULL); |
return(NULL); |
} |
} |
|
|
strcpy(chaine, "Process $"); |
|
strcat(chaine, tampon); |
|
} |
} |
else |
else |
{ |
{ |
sprintf(tampon, " %016lX/%016lX", |
if (alsprintf(&chaine, "Light weight process $ %016lX/%016lX", |
(unsigned long) (*(*((struct_processus_fils *) |
(unsigned long) (*(*((struct_processus_fils *) |
(*s_objet).objet)).thread).pid, |
(*s_objet).objet)).thread).pid, |
(unsigned long) (*(*((struct_processus_fils *) |
(unsigned long) (*(*((struct_processus_fils *) |
(*s_objet).objet)).thread).tid); |
(*s_objet).objet)).thread).tid) < 0) |
|
|
chaine = (unsigned char *) malloc((strlen(tampon) + 23) |
|
* sizeof(unsigned char)); |
|
|
|
if (chaine == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return(NULL); |
return(NULL); |
} |
} |
|
|
strcpy(chaine, "Light weight process $"); |
|
strcat(chaine, tampon); |
|
} |
} |
} |
} |
else if ((*s_objet).type == FCH) |
else if ((*s_objet).type == FCH) |
Line 312 formateur(struct_processus *s_etat_proce
|
Line 258 formateur(struct_processus *s_etat_proce
|
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
*/ |
*/ |
|
|
sprintf(tampon, " %016lX", (unsigned long) (*((struct_fichier *) |
if (alsprintf(&chaine, "File $ %016lX", (unsigned long) |
((*s_objet).objet))).descripteur); |
(*((struct_fichier *) ((*s_objet).objet))).descripteur) < 0) |
|
|
chaine = (unsigned char *) malloc((strlen(tampon) + 7) |
|
* sizeof(unsigned char)); |
|
|
|
if (chaine == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return(NULL); |
return(NULL); |
} |
} |
|
|
strcpy(chaine, "File $"); |
|
strcat(chaine, tampon); |
|
|
|
registre45 = test_cfsf(s_etat_processus, 45); |
registre45 = test_cfsf(s_etat_processus, 45); |
cf(s_etat_processus, 45); |
cf(s_etat_processus, 45); |
|
|
Line 452 formateur(struct_processus *s_etat_proce
|
Line 390 formateur(struct_processus *s_etat_proce
|
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
*/ |
*/ |
|
|
sprintf(tampon, " %016lX", (unsigned long) (*((struct_socket *) |
if (alsprintf(&chaine, "Socket %016lX", |
((*s_objet).objet))).socket); |
(unsigned long) (*((struct_socket *) |
|
((*s_objet).objet))).socket) < 0) |
chaine = (unsigned char *) malloc((strlen(tampon) + 9) |
|
* sizeof(unsigned char)); |
|
|
|
if (chaine == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return(NULL); |
return(NULL); |
} |
} |
|
|
strcpy(chaine, "Socket $"); |
|
strcat(chaine, tampon); |
|
|
|
registre45 = test_cfsf(s_etat_processus, 45); |
registre45 = test_cfsf(s_etat_processus, 45); |
cf(s_etat_processus, 45); |
cf(s_etat_processus, 45); |
|
|
Line 3052 formateur(struct_processus *s_etat_proce
|
Line 2983 formateur(struct_processus *s_etat_proce
|
} |
} |
else if ((*s_objet).type == MTX) |
else if ((*s_objet).type == MTX) |
{ |
{ |
sprintf(tampon, " %016lX", (unsigned long) |
if (alsprintf(&chaine, "Mutex $ %016lX", (unsigned long) |
&((*((struct_mutex *) (*s_objet).objet)).mutex)); |
&((*((struct_mutex *) (*s_objet).objet)).mutex)) < 0) |
|
|
chaine = (unsigned char *) malloc((strlen(tampon) + 8) |
|
* sizeof(unsigned char)); |
|
|
|
if (chaine == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return(NULL); |
return(NULL); |
} |
} |
|
|
strcpy(chaine, "Mutex $"); |
|
strcat(chaine, tampon); |
|
} |
} |
else if ((*s_objet).type == NOM) |
else if ((*s_objet).type == NOM) |
{ |
{ |
Line 3517 formateur_reel(struct_processus *s_etat_
|
Line 3440 formateur_reel(struct_processus *s_etat_
|
long longueur_utile_limite; |
long longueur_utile_limite; |
|
|
unsigned char *chaine; |
unsigned char *chaine; |
unsigned char format[16 + 1]; |
unsigned char format[32 + 1]; |
unsigned char mode[3 + 1]; |
unsigned char mode[3 + 1]; |
unsigned char *ptr; |
unsigned char *ptr; |
unsigned char tampon[16 + 1]; |
unsigned char tampon[32 + 1]; |
|
|
unsigned long i; |
unsigned long i; |
unsigned long j; |
unsigned long j; |