iOS/buildlibs/armv7/allegro-4.4.2/demos/skater/source/credits.c
/* helper to find a file or directory in the Allegro tree */
helper to find a file or directory in the Allegro tree
helper to find a file or directory in the Allegro tree
static int find_relative_path(char buf[], size_t bufsize, const char *name)
{
   static const char *locations[] = {
      "",
      "../",
      "../../",         
      "../../../",      
      "../../../../",   
      NULL
   };
   char exe[256];
   char dir[256];
   int i;
   get_executable_name(exe, sizeof(exe));
   for (i = 0; locations[i] != NULL; i++) {
      replace_filename(dir, exe, locations[i], sizeof(dir));
      append_filename(buf, dir, name, bufsize);
      if (file_exists(buf, FA_ALL, NULL)) {
         return 1;
      }
   }
   return 0;
}
static int find_relative_path ( char buf [ ] , size_t bufsize , const char * name ) { static const char * locations [ ] = { " " , " " , " " , " " , " " , NULL } ; char exe [ 256 ] ; char dir [ 256 ] ; int i ; get_executable_name ( exe , sizeof ( exe ) ) ; for ( i = 0 ; locations [ i ] != NULL ; i ++ ) { replace_filename ( dir , exe , locations [ i ] , sizeof ( dir ) ) ; append_filename ( buf , dir , name , bufsize ) ; if ( file_exists ( buf , FA_ALL , NULL ) ) { return 1 ; } } return 0 ; }
helper to find a file or directory in the Allegro tree
helper to find a file or directory in the Allegro tree
/* Allegro root, no build directory */ /* Allegro root, with build directory */ /* Allegro root, MSVC build configuration directory */