char buffer[80];
sprintf(buffer,"%s_%d.m",base,i);
- of=fopen(buffer,"w");
+ of=fopen(buffer,"we");
if(!of)perror("failed to open data dump file");
char buffer[80];
sprintf(buffer,"line_%dx%ld_class%d.vqd",
vb->pcmend/2,posts-2,class);
- of=fopen(buffer,"a");
+ of=fopen(buffer,"ae");
fprintf(of,"%d\n",cval);
fclose(of);
}
char buffer[80];
sprintf(buffer,"line_%dx%ld_%dsub%d.vqd",
vb->pcmend/2,posts-2,class,bookas[k]);
- of=fopen(buffer,"a");
+ of=fopen(buffer,"ae");
fprintf(of,"%d\n",out[j+k]);
fclose(of);
}
FILE *of;
char buffer[80];
sprintf(buffer,"%s_%d.m",base,i);
- of=fopen(buffer,"w");
+ of=fopen(buffer,"we");
for(j=0;j<n;j++){
if(dB && v[j]==0)
/* long and short into the same bucket by current convention */
sprintf(buffer,"res_sub%d_part%d_pass%d.vqd",look->submap,j,k);
- of=fopen(buffer,"a");
+ of=fopen(buffer,"ae");
for(l=0;l<statebook->entries;l++)
fprintf(of,"%d:%ld\n",l,look->training_data[k][j][l]);
for(i=0;i<ch;i++){
sprintf(buffer,"resaux_%d.vqd",look->train_seq);
- of=fopen(buffer,"a");
+ of=fopen(buffer,"ae");
for(j=0;j<partvals;j++)
fprintf(of,"%ld, ",partword[i][j]);
fprintf(of,"\n");
#ifdef TRAIN_RESAUX
sprintf(buffer,"resaux_%d.vqd",look->train_seq);
- of=fopen(buffer,"a");
+ of=fopen(buffer,"ae");
for(i=0;i<partvals;i++)
fprintf(of,"%ld, ",partword[0][i]);
fprintf(of,"\n");
int ov_fopen(const char *path,OggVorbis_File *vf){
int ret;
- FILE *f = fopen(path,"rb");
+ FILE *f = fopen(path,"rbe");
if(!f) return -1;
ret = ov_open(f,vf,NULL,0);