![]() ![]() | ![]() |
1.1 bertrand 1: /*
2: ================================================================================
1.64 ! bertrand 3: RPL/2 (R) version 4.1.13
1.63 bertrand 4: Copyright (C) 1989-2013 Dr. BERTRAND Joël
1.1 bertrand 5:
6: This file is part of RPL/2.
7:
8: RPL/2 is free software; you can redistribute it and/or modify it
9: under the terms of the CeCILL V2 License as published by the french
10: CEA, CNRS and INRIA.
11:
12: RPL/2 is distributed in the hope that it will be useful, but WITHOUT
13: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14: FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL V2 License
15: for more details.
16:
17: You should have received a copy of the CeCILL License
18: along with RPL/2. If not, write to info@cecill.info.
19: ================================================================================
20: */
21:
22:
1.14 bertrand 23: #include "rpl-conv.h"
24: #include "tex-conv.h"
1.5 bertrand 25:
1.1 bertrand 26: #include <stdarg.h>
1.5 bertrand 27:
1.1 bertrand 28: #undef fprintf
29: #undef printf
30:
31:
32: /*
33: ================================================================================
34: Fonction de translitération
35: ================================================================================
36: Entrées :
37: --------------------------------------------------------------------------------
38: Sorties :
39: --------------------------------------------------------------------------------
40: Effets de bord : néant
41: ================================================================================
42: */
43:
44: unsigned char *
45: transliteration(struct_processus *s_etat_processus,
46: unsigned char *chaine_entree,
47: unsigned char *codage_entree,
48: unsigned char *codage_sortie)
49: {
50: unsigned char *codage_sortie_transliteral;
51: unsigned char *tampon;
52:
53: if ((codage_sortie_transliteral = malloc((strlen(codage_sortie)
54: + strlen("//TRANSLIT") + 1) * sizeof(unsigned char))) == NULL)
55: {
56: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
57: return(NULL);
58: }
59:
60: sprintf(codage_sortie_transliteral, "%s//TRANSLIT", codage_sortie);
61:
62: tampon = reencodage(s_etat_processus, chaine_entree,
63: codage_entree, codage_sortie_transliteral);
64: free(codage_sortie_transliteral);
65:
66: return(tampon);
67: }
68:
69:
70: unsigned char *
71: reencodage(struct_processus *s_etat_processus,
72: unsigned char *chaine_entree,
73: unsigned char *codage_entree,
74: unsigned char *codage_sortie)
75: {
76: # define d_LONGUEUR 1024
77:
78: iconv_t transcodage;
79:
80: size_t ios;
81: size_t longueur_entree;
82: size_t longueur_sortie;
83:
84: unsigned char *buffer_entree;
85: unsigned char *buffer_sortie;
86: unsigned char *chaine_sortie;
87: unsigned char *pointeur;
88: unsigned char *tampon;
89:
90: if ((transcodage = iconv_open(codage_sortie, codage_entree)) ==
91: (iconv_t) -1)
92: {
1.59 bertrand 93: // On affiche une erreur ici car la fonction d'affichage
94: // de l'erreur utilise la macro printf() donc une
95: // opération de translitération qui échouera elle aussi.
96: // Le positionnement de l'erreur permet de sortir du programme.
97:
98: if ((*s_etat_processus).langue == 'F')
99: {
100: fprintf(stderr, "+++Erreur : Erreur de transcodage\n");
101: }
102: else
103: {
104: fprintf(stderr, "+++Error : Transcodage error\n");
105: }
106:
1.1 bertrand 107: (*s_etat_processus).erreur_execution = d_ex_erreur_transcodage;
108: return(NULL);
109: }
110:
111: buffer_entree = chaine_entree;
112: longueur_entree = strlen(chaine_entree);
113:
114: if ((chaine_sortie = malloc(sizeof(unsigned char))) == NULL)
115: {
116: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
117: return(NULL);
118: }
119:
120: chaine_sortie[0] = d_code_fin_chaine;
121:
1.39 bertrand 122: if ((buffer_sortie = malloc((d_LONGUEUR + 1) * sizeof(unsigned char)))
123: == NULL)
1.1 bertrand 124: {
125: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
126: return(NULL);
127: }
128:
129: do
130: {
131: longueur_sortie = d_LONGUEUR;
132: pointeur = buffer_sortie;
133:
1.55 bertrand 134: if ((ios = iconv(transcodage, (char **) &buffer_entree,
1.1 bertrand 135: &longueur_entree, (char **) &pointeur, &longueur_sortie))
136: == (size_t) -1)
137: {
138: // On autorise les erreurs EINVAL et EILSEQ
139: if (errno == EILSEQ)
140: {
141: free(buffer_sortie);
1.3 bertrand 142: free(chaine_sortie);
143:
1.59 bertrand 144: // On affiche une erreur ici car la fonction d'affichage
145: // de l'erreur utilise la macro printf() donc une
146: // opération de translitération qui échouera elle aussi.
147: // Le positionnement de l'erreur permet de sortir du programme.
148:
149: if ((*s_etat_processus).langue == 'F')
150: {
151: fprintf(stderr, "+++Erreur : Erreur de transcodage\n");
152: }
153: else
154: {
155: fprintf(stderr, "+++Error : Transcodage error\n");
156: }
157:
1.1 bertrand 158: (*s_etat_processus).erreur_execution = d_ex_erreur_transcodage;
159: return(NULL);
160: }
161: }
162:
1.38 bertrand 163: tampon = chaine_sortie;
1.1 bertrand 164: (*pointeur) = d_code_fin_chaine;
165:
166: if ((chaine_sortie = malloc((strlen(tampon) + strlen(buffer_sortie) + 1)
167: * sizeof(unsigned char))) == NULL)
168: {
169: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
170: return(NULL);
171: }
172:
173: sprintf(chaine_sortie, "%s%s", tampon, buffer_sortie);
174: free(tampon);
175: } while((*buffer_entree) != d_code_fin_chaine);
176:
177: free(buffer_sortie);
178: iconv_close(transcodage);
179:
180: return(chaine_sortie);
181: }
182:
183:
184: /*
185: ================================================================================
186: Fonctions spécifiques
187: ================================================================================
188: Entrées :
189: --------------------------------------------------------------------------------
1.26 bertrand 190: Sorties :
1.1 bertrand 191: --------------------------------------------------------------------------------
192: Effets de bord : néant
193: ================================================================================
194: */
195:
196: void
197: localisation_courante(struct_processus *s_etat_processus)
198: {
199: char **arguments;
200:
201: int ios;
202: int pipes_entree[2];
203: int pipes_erreur[2];
204: int pipes_sortie[2];
205: int status;
206:
207: long i;
208: long nombre_arguments;
209:
210: pid_t pid;
211:
212: unsigned char *tampon;
213:
214: unsigned long longueur_lecture;
215: unsigned long nombre_iterations;
216: unsigned long pointeur;
217:
218: if ((arguments = malloc(3 * sizeof(char **))) == NULL)
219: {
220: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
221: return;
222: }
223:
224: if ((arguments[0] = malloc((strlen("locale") + 1) * sizeof(char))) == NULL)
225: {
226: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
227: return;
228: }
229:
230: if ((arguments[1] = malloc((strlen("charmap") + 1) * sizeof(char))) == NULL)
231: {
232: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
233: return;
234: }
235:
236: strcpy(arguments[0], "locale");
237: strcpy(arguments[1], "charmap");
238: arguments[2] = NULL;
239:
240: nombre_arguments = 2;
241:
242: if (pipe(pipes_entree) != 0)
243: {
244: (*s_etat_processus).erreur_systeme = d_es_processus;
245: return;
246: }
247:
248: if (pipe(pipes_sortie) != 0)
249: {
250: (*s_etat_processus).erreur_systeme = d_es_processus;
251: return;
252: }
253:
254: if (pipe(pipes_erreur) != 0)
255: {
256: (*s_etat_processus).erreur_systeme = d_es_processus;
257: return;
258: }
259:
260: verrouillage_threads_concurrents(s_etat_processus);
261: pid = fork();
262: deverrouillage_threads_concurrents(s_etat_processus);
263:
264: if (pid < 0)
265: {
266: if (close(pipes_entree[0]) != 0)
267: {
268: (*s_etat_processus).erreur_systeme = d_es_processus;
269: return;
270: }
271:
272: if (close(pipes_entree[1]) != 0)
273: {
274: (*s_etat_processus).erreur_systeme = d_es_processus;
275: return;
276: }
277:
278: if (close(pipes_sortie[0]) != 0)
279: {
280: (*s_etat_processus).erreur_systeme = d_es_processus;
281: return;
282: }
283:
284: if (close(pipes_sortie[1]) != 0)
285: {
286: (*s_etat_processus).erreur_systeme = d_es_processus;
287: return;
288: }
289:
290: if (close(pipes_erreur[0]) != 0)
291: {
292: (*s_etat_processus).erreur_systeme = d_es_processus;
293: return;
294: }
295:
296: if (close(pipes_erreur[1]) != 0)
297: {
298: (*s_etat_processus).erreur_systeme = d_es_processus;
299: return;
300: }
301:
302: (*s_etat_processus).erreur_systeme = d_es_processus;
303: return;
304: }
305: else if (pid == 0)
306: {
307: if (close(pipes_entree[1]) != 0)
308: {
309: (*s_etat_processus).erreur_systeme = d_es_processus;
310: return;
311: }
312:
313: if (close(pipes_sortie[0]) != 0)
314: {
315: (*s_etat_processus).erreur_systeme = d_es_processus;
316: return;
317: }
318:
319: if (close(pipes_erreur[0]) != 0)
320: {
321: (*s_etat_processus).erreur_systeme = d_es_processus;
322: return;
323: }
324:
325: if (pipes_entree[0] != STDIN_FILENO)
326: {
327: if (dup2(pipes_entree[0], STDIN_FILENO) == -1)
328: {
329: (*s_etat_processus).erreur_systeme = d_es_processus;
330: return;
331: }
332: }
333:
334: if (pipes_sortie[1] != STDOUT_FILENO)
335: {
336: if (dup2(pipes_sortie[1], STDOUT_FILENO) == -1)
337: {
338: (*s_etat_processus).erreur_systeme = d_es_processus;
339: return;
340: }
341: }
342:
343: if (pipes_sortie[1] != STDERR_FILENO)
344: {
345: if (dup2(pipes_sortie[1], STDERR_FILENO) == -1)
346: {
347: (*s_etat_processus).erreur_systeme = d_es_processus;
348: return;
349: }
350: }
351:
352: if (nombre_arguments != 0)
353: {
354: execvp(arguments[0], arguments);
355: }
356: else
357: {
358: exit(EXIT_SUCCESS);
359: }
360:
361: /*
362: * L'appel système execvp() a généré une erreur et n'a pu exécuter
363: * argument[0] (fichier non exécutable ou inexistant).
364: */
365:
366: close(pipes_entree[0]);
367: close(pipes_sortie[1]);
368:
369: for(i = 0; i < nombre_arguments; i++)
370: {
371: free(arguments[i]);
372: }
373:
374: free(arguments);
375: (*s_etat_processus).erreur_systeme = d_es_processus;
376:
377: /*
378: * Envoi d'une erreur dans le pipe idoine. On ne regarde pas
379: * le nombre d'octets écrits car l'erreur ne pourra de toute
380: * façon pas être traitée.
381: */
382:
383: write_atomic(s_etat_processus, pipes_erreur[1], " ", 1);
384: close(pipes_erreur[1]);
385:
386: exit(EXIT_SUCCESS);
387: }
388: else
389: {
390: if (close(pipes_entree[0]) != 0)
391: {
392: (*s_etat_processus).erreur_systeme = d_es_processus;
393: return;
394: }
395:
396: if (close(pipes_sortie[1]) != 0)
397: {
398: (*s_etat_processus).erreur_systeme = d_es_processus;
399: return;
400: }
401:
402: if (close(pipes_erreur[1]) != 0)
403: {
404: (*s_etat_processus).erreur_systeme = d_es_processus;
405: return;
406: }
407:
408: if (close(pipes_entree[1]) != 0)
409: {
410: (*s_etat_processus).erreur_systeme = d_es_processus;
411: return;
412: }
413:
414: do
415: {
416: if (kill(pid, 0) != 0)
417: {
418: break;
419: }
420:
421: /*
422: * Récupération de la valeur de retour du processus détaché
423: */
424:
1.44 bertrand 425: # ifndef SEMAPHORES_NOMMES
426: if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0)
427: # else
428: if (sem_post((*s_etat_processus).semaphore_fork) != 0)
429: # endif
1.1 bertrand 430: {
431: (*s_etat_processus).erreur_systeme = d_es_processus;
432: return;
433: }
434:
435: if (waitpid(pid, &status, 0) == -1)
436: {
1.44 bertrand 437: # ifndef SEMAPHORES_NOMMES
438: while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0)
439: # else
440: while(sem_wait((*s_etat_processus).semaphore_fork) != 0)
441: # endif
1.1 bertrand 442: {
1.43 bertrand 443: if (errno != EINTR)
444: {
445: (*s_etat_processus).erreur_systeme = d_es_processus;
446: return;
447: }
1.1 bertrand 448: }
449:
450: (*s_etat_processus).erreur_systeme = d_es_processus;
451: return;
452: }
453:
1.44 bertrand 454: # ifndef SEMAPHORES_NOMMES
455: while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0)
456: # else
457: while(sem_wait((*s_etat_processus).semaphore_fork) != 0)
458: # endif
1.1 bertrand 459: {
1.43 bertrand 460: if (errno != EINTR)
461: {
462: (*s_etat_processus).erreur_systeme = d_es_processus;
463: return;
464: }
1.1 bertrand 465: }
466: } while((!WIFEXITED(status)) && (!WIFSIGNALED(status)));
467:
468: longueur_lecture = 256;
469: pointeur = 0;
470: nombre_iterations = 1;
471:
472: if ((tampon = malloc((longueur_lecture + 1) *
473: sizeof(unsigned char))) == NULL)
474: {
475: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
476: return;
477: }
478:
1.18 bertrand 479: tampon[0] = d_code_fin_chaine;
480:
1.44 bertrand 481: # ifndef SEMAPHORES_NOMMES
482: if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0)
483: # else
484: if (sem_post((*s_etat_processus).semaphore_fork) != 0)
485: # endif
1.1 bertrand 486: {
487: (*s_etat_processus).erreur_systeme = d_es_processus;
488: return;
489: }
490:
491: while((ios = read_atomic(s_etat_processus,
492: pipes_sortie[0], &(tampon[pointeur]),
493: longueur_lecture)) > 0)
494: {
1.44 bertrand 495: # ifndef SEMAPHORES_NOMMES
496: while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0)
497: # else
498: while(sem_wait((*s_etat_processus).semaphore_fork) != 0)
499: # endif
1.1 bertrand 500: {
1.43 bertrand 501: if (errno != EINTR)
502: {
503: (*s_etat_processus).erreur_systeme = d_es_processus;
504: return;
505: }
1.1 bertrand 506: }
507:
508: tampon[pointeur + ios] = d_code_fin_chaine;
509: pointeur += longueur_lecture;
510: nombre_iterations++;
511:
512: if ((tampon = realloc(tampon,
513: ((nombre_iterations * longueur_lecture) + 1) *
514: sizeof(unsigned char))) == NULL)
515: {
516: (*s_etat_processus).erreur_systeme =
517: d_es_allocation_memoire;
518: return;
519: }
520:
1.44 bertrand 521: # ifndef SEMAPHORES_NOMMES
522: if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0)
523: # else
524: if (sem_post((*s_etat_processus).semaphore_fork) != 0)
525: # endif
1.1 bertrand 526: {
527: (*s_etat_processus).erreur_systeme = d_es_processus;
528: return;
529: }
530: }
531:
1.44 bertrand 532: # ifndef SEMAPHORES_NOMMES
533: while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0)
534: # else
535: while(sem_wait((*s_etat_processus).semaphore_fork) != 0)
536: # endif
1.1 bertrand 537: {
1.43 bertrand 538: if (errno != EINTR)
539: {
540: (*s_etat_processus).erreur_systeme = d_es_processus;
541: return;
542: }
1.1 bertrand 543: }
544:
545: if (strlen(tampon) == 0)
546: {
547: (*s_etat_processus).erreur_systeme = d_es_processus;
548: return;
549: }
550:
551: tampon[strlen(tampon) - 1] = d_code_fin_chaine;
552:
553: if (ios == -1)
554: {
555: (*s_etat_processus).erreur_systeme = d_es_processus;
556: return;
557: }
558:
559: if (close(pipes_sortie[0]) != 0)
560: {
561: (*s_etat_processus).erreur_systeme = d_es_processus;
562: return;
563: }
564:
1.17 bertrand 565: if (strlen(tampon) > 0)
566: {
567: (*s_etat_processus).localisation = tampon;
568: }
569: else
570: {
571: free(tampon);
572:
573: if (((*s_etat_processus).localisation = malloc((strlen(d_locale)
574: + 1) * sizeof(unsigned char))) == NULL)
575: {
576: (*s_etat_processus).erreur_systeme = d_es_processus;
577: return;
578: }
579:
580: strcpy((*s_etat_processus).localisation, d_locale);
581: }
1.1 bertrand 582:
583: for(i = 0; i < nombre_arguments; i++)
584: {
585: free(arguments[i]);
586: }
587:
588: free(arguments);
589:
1.44 bertrand 590: # ifndef SEMAPHORES_NOMMES
591: if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0)
592: # else
593: if (sem_post((*s_etat_processus).semaphore_fork) != 0)
594: # endif
1.1 bertrand 595: {
596: (*s_etat_processus).erreur_systeme = d_es_processus;
597: return;
598: }
599:
600: if (read_atomic(s_etat_processus, pipes_erreur[0], tampon, 1) > 0)
601: {
602: // Le processus fils renvoie une erreur.
603:
1.18 bertrand 604: free(tampon);
605:
606: if (((*s_etat_processus).localisation = malloc((strlen(d_locale)
607: + 1) * sizeof(unsigned char))) == NULL)
1.1 bertrand 608: {
1.18 bertrand 609: (*s_etat_processus).erreur_systeme = d_es_processus;
610: return;
1.1 bertrand 611: }
612:
1.18 bertrand 613: strcpy((*s_etat_processus).localisation, d_locale);
1.1 bertrand 614: }
615:
1.44 bertrand 616: # ifndef SEMAPHORES_NOMMES
617: while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0)
618: # else
619: while(sem_wait((*s_etat_processus).semaphore_fork) != 0)
620: # endif
1.1 bertrand 621: {
1.43 bertrand 622: if (errno != EINTR)
623: {
624: (*s_etat_processus).erreur_systeme = d_es_processus;
625: return;
626: }
1.1 bertrand 627: }
628:
629: if (close(pipes_erreur[0]) != 0)
630: {
631: (*s_etat_processus).erreur_systeme = d_es_processus;
632: return;
633: }
634: }
635:
636: return;
637: }
638:
639:
640: int
641: transliterated_fprintf(struct_processus *s_etat_processus, file *flux,
642: const char *format, ...)
643: {
644: int ios;
1.5 bertrand 645:
646: unsigned char *tampon;
1.1 bertrand 647: unsigned char *tampon2;
1.5 bertrand 648:
1.1 bertrand 649: va_list arguments;
650:
651: va_start(arguments, format);
652:
1.17 bertrand 653: # ifdef OS2
654: unsigned char *ptr_e;;
655: unsigned char *ptr_l;;
656: unsigned char *tampon3;
657:
658: unsigned long i;
659: # endif
660:
1.5 bertrand 661: if (valsprintf(&tampon, format, arguments) < 0)
1.1 bertrand 662: {
663: va_end(arguments);
664:
665: if (s_etat_processus != NULL)
666: {
667: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
668: }
669:
670: return(-1);
671: }
672:
673: va_end(arguments);
674:
675: if (s_etat_processus != NULL)
676: {
677: if ((tampon2 = transliteration(s_etat_processus, tampon,
678: d_locale, (*s_etat_processus).localisation)) == NULL)
679: {
680: free(tampon);
681: return(-1);
682: }
683:
684: free(tampon);
685: }
686: else
687: {
688: tampon2 = tampon;
689: }
690:
1.17 bertrand 691: # ifdef OS2
1.46 bertrand 692: if ((flux == stderr) || (flux == stdout))
1.23 bertrand 693: {
694: i = 0;
695: ptr_l = tampon2;
1.17 bertrand 696:
1.23 bertrand 697: while((*ptr_l) != d_code_fin_chaine)
1.17 bertrand 698: {
1.23 bertrand 699: if ((*ptr_l) == '\n')
700: {
701: i++;
702: }
703:
704: ptr_l++;
1.17 bertrand 705: }
706:
1.23 bertrand 707: if ((tampon3 = malloc((strlen(tampon2) + i + 1) *
708: sizeof(unsigned char))) == NULL)
709: {
710: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
1.46 bertrand 711: return(-1);
1.23 bertrand 712: }
1.17 bertrand 713:
1.23 bertrand 714: ptr_e = tampon3;
715: ptr_l = tampon2;
1.17 bertrand 716:
1.23 bertrand 717: while((*ptr_l) != d_code_fin_chaine)
718: {
719: (*ptr_e) = (*ptr_l);
1.17 bertrand 720:
1.23 bertrand 721: if ((*ptr_l) == '\n')
722: {
723: (*(++ptr_e)) = '\r';
724: ptr_e++;
725: ptr_l++;
726: }
727: else
728: {
729: ptr_e++;
730: ptr_l++;
731: }
1.17 bertrand 732: }
733:
1.23 bertrand 734: (*ptr_e) = d_code_fin_chaine;
1.17 bertrand 735:
1.23 bertrand 736: free(tampon2);
737: tampon2 = tampon3;
738: }
1.17 bertrand 739: # endif
740:
1.1 bertrand 741: # ifdef SunOS
742: while((ios = fprintf(flux, "%s", tampon2)) < 0)
743: {
744: if ((errno != EINTR) && (errno != 0))
745: {
746: break;
747: }
748: }
749: # else
750: ios = fprintf(flux, "%s", tampon2);
751: # endif
752:
753: free(tampon2);
754:
755: return(ios);
756: }
757:
1.5 bertrand 758:
759: int
760: tex_fprintf(struct_processus *s_etat_processus,
761: file *flux, const char *format, ...)
762: {
763: int ios;
764:
765: unsigned char *tampon;
766: unsigned char *tampon2;
767:
768: va_list arguments;
769:
770: va_start(arguments, format);
771:
772: if (valsprintf(&tampon, format, arguments) < 0)
773: {
774: va_end(arguments);
775:
776: if (s_etat_processus != NULL)
777: {
778: (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
779: }
780:
781: return(-1);
782: }
783:
784: va_end(arguments);
785:
786: if ((tampon2 = transliteration(s_etat_processus, tampon,
787: d_locale, ds_tex_encodage_3)) == NULL)
788: {
789: free(tampon);
790: return(-1);
791: }
792:
793: free(tampon);
794:
795: # ifdef SunOS
796: while((ios = fprintf(flux, "%s", tampon2)) < 0)
797: {
798: if ((errno != EINTR) && (errno != 0))
799: {
800: break;
801: }
802: }
803: # else
804: ios = fprintf(flux, "%s", tampon2);
805: # endif
806:
807: free(tampon2);
808:
809: return(ios);
810: }
811:
1.21 bertrand 812: #undef readline
1.19 bertrand 813:
814: unsigned char *
815: readline_wrapper(unsigned char *invite)
816: {
817: unsigned char *chaine;
818:
819: chaine = readline(invite);
820: printf("\r");
821:
822: return(chaine);
823: }
824:
825:
1.1 bertrand 826: #define fprintf NULL
827: #define printf NULL
828:
829: // vim: ts=4