~ubuntu-branches/ubuntu/maverick/grafx2/maverick

« back to all changes in this revision

Viewing changes to io.c

  • Committer: Bazaar Package Importer
  • Author(s): Gürkan Sengün
  • Date: 2009-09-21 14:24:19 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090921142419-lhpqq102buior0ol
Tags: 2.1-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
void For_each_file(const char * directory_name, void Callback(const char *))
244
244
{
245
245
  // Pour scan de r�pertoire
246
 
  DIR*  Repertoire_Courant; //R�pertoire courant
 
246
  DIR*  current_directory; //R�pertoire courant
247
247
  struct dirent* entry; // Structure de lecture des �l�ments
248
248
  char full_filename[MAX_PATH_CHARACTERS];
249
249
  int filename_position;
250
250
  strcpy(full_filename, directory_name);
251
 
  Repertoire_Courant=opendir(directory_name);
252
 
  if(Repertoire_Courant == NULL) return;        // R�pertoire invalide ...
 
251
  current_directory=opendir(directory_name);
 
252
  if(current_directory == NULL) return;        // R�pertoire invalide ...
253
253
  strcat(full_filename, PATH_SEPARATOR);
254
254
  filename_position = strlen(full_filename);
255
 
  while ((entry=readdir(Repertoire_Courant)))
 
255
  while ((entry=readdir(current_directory)))
256
256
  {
257
257
    struct stat Infos_enreg;
258
258
    strcpy(&full_filename[filename_position], entry->d_name);
262
262
      Callback(full_filename);
263
263
    }
264
264
  }
265
 
  closedir(Repertoire_Courant);
 
265
  closedir(current_directory);
266
266
}
267
267