71
68
fprintf(fdo,"\\epsfig{file=\\Figdir %s.ps}\n",filename);
73
fprintf(fdo,"%% if you want to use epsfig uncomment the following line \n");
74
fprintf(fdo,"%% and comment the special line \n");
75
fprintf(fdo,"%%\\epsfig{file=\\Figdir %s.ps}\n",filename);
70
fprintf(fdo,"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n");
71
fprintf(fdo,"%% If you want do not want to use epsfig ,comment the following line \n");
72
fprintf(fdo,"%% and uncomment the \\special line \n");
73
fprintf(fdo,"\\epsfig{file=\\Figdir %s.ps}\n",filename);
74
fprintf(fdo,"%%\\special{psfile=\\Figdir %s.ps}\n", filename);
77
fprintf(fdo,"\\special{psfile=\\Figdir %s.ps}\n", filename);
78
76
fprintf(fdo,"\\end{picture}}\n");
79
77
fprintf(fdo,"\\end{center}\n");
88
86
file et en ecrivant sur fdo
89
87
-------------------------------------------------------*/
91
void Sed(file,strin1,strout1,strin2,strout2,strin3,strout3,fdo)
93
char file[],strin1[],strout1[],strout3[];
94
char strin2[],strout2[],strin3[];
89
void Sed(char *file, char *strin1, char *strout1, char *strin2, char *strout2, char *strin3, char *strout3, FILE *fdo)
93
static char *buff = NULL;
94
static int buflen = 512;
97
buff = malloc(buflen*sizeof(char));
100
fprintf(stderr,"Running out of space \n");
97
105
fd=fopen(file,"r");
100
108
while ( stop != 1)
102
readOneLine (buff,&stop,fd);
110
read_one_line (&buff,&stop,fd,&buflen);
103
111
if (strncmp(buff,strin1,strlen(strin1))==0)
104
112
fprintf(fdo,"%s\n",strout1);
127
135
/*-----------------------------------------------
128
lit une ligne dans fd et la stocke dans buff
129
---------------------------------------------------*/
131
void readOneLine(buff,stop,fd)
136
for ( i = 0 ; (c =getc(fd)) != '\n' && c != EOF ; i++) buff[i]= c ;
137
buff[i]='\n';buff[i+1]='\0';
138
if ( c == EOF) {*stop = 1;}
141
/*-----------------------------------------------
142
136
calcule la taille pour un dessin suivant le nombre de dessin a
143
137
placer dans la feuille
144
138
num est le nombre de dessins et i le numero du dessin
147
141
(*wt et *ht sont la hauteur totale et la argeur totale)
148
142
-----------------------------------------------------*/
150
void ComputeSize(num,i,x,y,w,h,wt,ht)
152
double *x,*y,*w,*h,*wt,*ht;
144
void ComputeSize(int num, int i, double *x, double *y, double *w, double *h, double *wt, double *ht)