"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "utils/util_io.cc" between
speech_tools-2.4-release.tar.gz and speech_tools-2.5.0-release.tar.gz

About: The speech_tools - Edinburgh Speech Tools Library (used by the Festival Speech Synthesis System).

util_io.cc  (speech_tools-2.4-release):util_io.cc  (speech_tools-2.5.0-release)
skipping to change at line 97 skipping to change at line 97
else if ((access(filename,F_OK) == -1) && // doesn't exists else if ((access(filename,F_OK) == -1) && // doesn't exists
(access(EST_Pathname(filename).directory(),W_OK) == 0)) (access(EST_Pathname(filename).directory(),W_OK) == 0))
return TRUE; // probably; return TRUE; // probably;
else else
return FALSE; return FALSE;
} }
EST_String stdin_to_file() EST_String stdin_to_file()
{ {
/* Copy stding to a file and return the name of that tmpfile */ /* Copy stding to a file and return the name of that tmpfile */
EST_String tmpname = make_tmp_filename(); EST_String tmpname = (const char *)make_tmp_filename();
char buff[1024]; char buff[1024];
FILE *fd; FILE *fd;
unsigned int n; unsigned int n;
if ((fd = fopen(tmpname,"wb")) == NULL) if ((fd = fopen(tmpname,"wb")) == NULL)
{ {
cerr << "Write access failed for temporary file\n"; cerr << "Write access failed for temporary file\n";
return tmpname; return tmpname;
} }
while ((n=fread(buff,1,1024,stdin)) > 0) while ((n=fread(buff,1,1024,stdin)) > 0)
skipping to change at line 208 skipping to change at line 208
s = s.after(0); s = s.after(0);
if (quote_char(0) == s(s.length()-1)) if (quote_char(0) == s(s.length()-1))
s = s.before((int)(s.length()-1)); s = s.before((int)(s.length()-1));
} }
// uncompression via temporary file // uncompression via temporary file
EST_String EST_String
uncompress_file_to_temporary(const EST_String &filename, const EST_String &prog_ name) uncompress_file_to_temporary(const EST_String &filename, const EST_String &prog_ name)
{ {
EST_String new_filename = make_tmp_filename(); EST_String new_filename = (const char *)make_tmp_filename();
EST_String sysstr = prog_name + " " + filename + " > " + new_filename; EST_String sysstr = prog_name + " " + filename + " > " + new_filename;
//cerr << "Uncompressing file : " << sysstr << endl; //cerr << "Uncompressing file : " << sysstr << endl;
int stat = system(sysstr); int stat = system(sysstr);
if(stat != 0) if(stat != 0)
{ {
(void)delete_file(new_filename); (void)delete_file(new_filename);
new_filename = ""; new_filename = "";
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)