Sponsored Content
Full Discussion: Need some help with this...
Top Forums Programming Need some help with this... Post 302138220 by Legend986 on Sunday 30th of September 2007 01:31:39 PM
Old 09-30-2007
Thank You. I did as you instructed but I keep getting this Segmentation Fault:

Code:
  int processIt(const char* command,  char* paths[])
  {
           
        /*paths contains the current path to be searched*/
        for(i=0;i<MAX_PATHS;i++) {
            strcat(temp,paths[i]);  
            strcat(temp,pathsep);
            strcat(temp,command);
            result = access(temp, F_OK);
            if(result == 0)
            {
              printf("%s\t",temp);
              printf("%d\n",result);
            }
            for(j=0;j<MAX_PATHS;j++)
              temp[j] = '\0';
        }
        return 0;
  } /* processIt! */

Any advice please?
 
set_allegro_resource_path(3alleg4)				  Allegro manual				set_allegro_resource_path(3alleg4)

NAME
set_allegro_resource_path - Sets a specific resource search path. Allegro game programming library. SYNOPSIS
#include <allegro.h> int set_allegro_resource_path(int priority, const char *path); DESCRIPTION
Sometimes Allegro doesn't look in enough places to find a resource. For those special cases, you can call this function before loading your resource with additional paths to search for. You set up the priorities, higher numbers are searched for first. To modify an already setup path, call this function with the same priority and the new path. To remove an already setup path, call this function with the priority of the path and NULL as the path parameter. Example: set_allegro_resource_path(10, "my_game/configs"); set_allegro_resource_path(0, "users/configs/"); set_allegro_resource_path(-45, "temp"); These custom paths will be valid until you call allegro_exit(). You can call this function before install_allegro(), but after set_ufor- mat() if you want to use a text encoding format other than the default. RETURN VALUE
Returns non-zero on success, zero if the path could not be added or you wanted to remove a path and the priority used didn't have any asso- ciated path. Modification of existing paths always succeeds. SEE ALSO
find_allegro_resource(3alleg4) Allegro version 4.4.2 set_allegro_resource_path(3alleg4)
All times are GMT -4. The time now is 11:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy