Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

set_allegro_resource_path(3alleg4) [debian man page]

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)

Check Out this Related Man Page

find_allegro_resource(3alleg4)					  Allegro manual				    find_allegro_resource(3alleg4)

NAME
find_allegro_resource - Searches for a support file in many places. Allegro game programming library. SYNOPSIS
#include <allegro.h> int find_allegro_resource(char *dest, const char *resource, const char *ext, const char *datafile, const char *objectname, const char *envvar, const char *subdir, int size); DESCRIPTION
Searches for a support file, eg. `allegro.cfg' or `language.dat'. Passed a resource string describing what you are looking for, along with extra optional information such as the default extension, what datafile to look inside, what the datafile object name is likely to be, any special environment variable to check, and any subdirectory that you would like to check as well as the default location, this function looks in a hell of a lot of different places :-). Pass NULL for the parameters you are not using. Check the documentation chapter specific to your platform for information on additional paths this function might search for. Also, don't forget about set_allegro_resource_path() to extend the searches. Example: char path[256]; int ret; ret = find_allegro_resource(path, "scores.cfg", NULL, NULL, NULL, NULL, NULL, sizeof(path)); if (ret == 0) { /* Found system wide scores file. */ } else { /* No previous scores, create our own file. */ } RETURN VALUE
Returns zero on success, and stores a full path to the file (at most size bytes) into the dest buffer. SEE ALSO
set_allegro_resource_path(3alleg4) Allegro version 4.4.2 find_allegro_resource(3alleg4)
Man Page

13 More Discussions You Might Find Interesting

1. Programming

get path

I'm new to UNIX C programming and have a question. Is there a command in UNIX "C" that will get the current environment path? (2 Replies)
Discussion started by: ODogg
2 Replies

2. UNIX for Dummies Questions & Answers

path

This is my path for a directory in AIX /oracle/ab/xx/yy/data/ i dont want to type this everytime at the prompt. instead call the path using say cd call (6 Replies)
Discussion started by: thumsup9
6 Replies

3. Programming

C program

Hi, There is a C program with "check_log(log_loc,log_name,path)" in it. It seems that this C program is calling a check_log function but I didn't see any function called check_log in it. By the way, the C program itself is called 'check_log' I am just trying to learn a litter bit about C.... (6 Replies)
Discussion started by: whatisthis
6 Replies

4. Shell Programming and Scripting

negation in find path

Guys, Pl suggest me how to ignore a path in find command... I am aware of using "!" for other option... but how can i use it like this exampl... I want to search something for in / but not in Pl help. Thanks.. (2 Replies)
Discussion started by: clx
2 Replies

5. UNIX for Dummies Questions & Answers

Ld_library_path

Hi, can anyone explain this terrm? should we setup it ? Thanks (1 Reply)
Discussion started by: ccp
1 Replies

6. Shell Programming and Scripting

find multiple paths

How do i find files in more than one directory? I searched through forums, but could not land into the right thread. I tried something like find dir1|dir2 -name file1 but it doesn't work. Please suggest. (5 Replies)
Discussion started by: krishmaths
5 Replies

7. Shell Programming and Scripting

how to remove "../.. from a path"

My input path can be either somepath (/tmp/life ) or ../../somepath ( ../../tmp/life ) Can someone help me help me with script to always extract "somepath" on both inputs Thanks in advance (8 Replies)
Discussion started by: vickylife
8 Replies

8. UNIX for Dummies Questions & Answers

Check if last char in a line is '.' and if not, insert it

Hi all, I've searched for this but couldn't seem to find the answer I'm looking for. I have a text file that looks like this: sgea0447 Earnings followed the same path. earnings followed the same path sgea0448 Economic growth slowed further. economic growth slowed further... (13 Replies)
Discussion started by: pxalpine
13 Replies

9. Infrastructure Monitoring

Script to sort Cisco configs

Hi everyone :), I need sort Cisco configs to report but i cannot do the script to made this: #### INPUT ##### config-register 0x2102 version 12.2 ! hostname Router ! interface Ethernet0 description Red LAN ip address 192.168.1.1 255.255.255.0 no cdp enable ! interface Serial0... (6 Replies)
Discussion started by: azrael75
6 Replies

10. Programming

Finding the path of the C program

Hi All, I have a c program called findPath.c in a path /home/harsh/c-Programs/. How can i find the path where the program is stored at runtime?? I have given the following #include<stdio.h> int main() { system("dirname $0"); return 0; } This is resulting in the output as . <single dot... (6 Replies)
Discussion started by: sreeharshasn
6 Replies

11. UNIX for Advanced & Expert Users

conditional statement

I need to implement something like this. 1) search for a file(say *.doc) from a path (say /home/user/temp) 2) if file found & if file size > 0 : yes --> file valid else : print file not valid. I am trying to implement something like this, but seems i am terribly wrong somewhere.. ... (1 Reply)
Discussion started by: animesharma
1 Replies

12. Programming

Can't find paths.h

I wasn't sure which forum to post this in. I am trying to compile logsurfer. After I run configure and the make, I get a complaint that paths.h is not found. I see three places where there is a paths.h: /usr/include/pgsql/server/optimizer/paths.h... (3 Replies)
Discussion started by: brownwrap
3 Replies

13. Shell Programming and Scripting

Parse file name out of UNC path

Hello, I searched the forums and didn't see a situation like this: I cannot figure out how to parse out just the file name from the full path. The path looks like this: \\foo\bar\filename.ext I don't think something like 'cut' will work so I tried to whip up a regex but couldn't get it... (12 Replies)
Discussion started by: bytesnoop
12 Replies