Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

al_findfirst(3alleg4) [debian man page]

al_findfirst(3alleg4)						  Allegro manual					     al_findfirst(3alleg4)

NAME
al_findfirst - Low-level function for searching files. Allegro game programming library. SYNOPSIS
#include <allegro.h> int al_findfirst(const char *pattern, struct al_ffblk *info, int attrib); DESCRIPTION
Low-level function for searching files. This function finds the first file which matches the given wildcard specification and file attributes (see above). The information about the file (if any) will be put in the al_ffblk structure which you have to provide. The al_ffblk structure looks like: struct al_ffblk { int attrib; - actual attributes of the file found time_t time; - modification time of file char name[512]; - name of file }; There is some other stuff in the structure as well, but it is there for internal use only. Example: struct al_ffblk info; if (al_findfirst("*.pcx", &info, FA_ALL) != 0) { /* Tell user there are no PCX files. */ return; } RETURN VALUE
The function returns non-zero if no match is found or if an error occurred and, in the latter case, sets `errno' accordingly. It returns zero if a match is found, allocating some memory for internal use in the structure. Therefore you have to close your search when you are finished to avoid memory leaks in your program. SEE ALSO
al_findnext(3alleg4), al_findclose(3alleg4), al_ffblk_get_size(3alleg4) Allegro version 4.4.2 al_findfirst(3alleg4)

Check Out this Related Man Page

exscale(3alleg4)						  Allegro manual						  exscale(3alleg4)

NAME
exscale - Loading PCX files and bitmap stretching. Allegro game programming library. SYNOPSIS
#include <allegro.h> Example exscale DESCRIPTION
This example demonstrates how to use PCX files, palettes and stretch blits. It loads a PCX file, sets its palette and does some random stretch_blits. Don't worry - it's VERY slowed down using vsync(). SEE ALSO
BITMAP(3alleg4), END_OF_MAIN(3alleg4), PALETTE(3alleg4), SCREEN_H(3alleg4), SCREEN_W(3alleg4), allegro_error(3alleg4), alle- gro_init(3alleg4), allegro_message(3alleg4), blit(3alleg4), destroy_bitmap(3alleg4), install_keyboard(3alleg4), keypressed(3alleg4), load_pcx(3alleg4), replace_filename(3alleg4), screen(3alleg4), set_gfx_mode(3alleg4), set_palette(3alleg4), stretch_blit(3alleg4), vsync(3alleg4) Allegro version 4.4.2 exscale(3alleg4)
Man Page

4 More Discussions You Might Find Interesting

1. Programming

Help

i have a struct defined in a .h file now 2 other C files are in cluding this .h file so during make file i get a error sayiny that the variables in this structure are being redifined how do i encounter this i would also like to know what causes this (2 Replies)
Discussion started by: wojtyla
2 Replies

2. Programming

New to programming, need some basic info.

So, I'm actually new to programming, and thought some basics would be really benefiting to me, I'm not really asking to be spoon-fed with everything you know, I just need some info to show where should i start, I can figure the rest by myself, but really am in doubt about which programming language... (3 Replies)
Discussion started by: MEdgeworth
3 Replies

3. Programming

search file and put into struct

hi everybody, I need some help with some programming. I need to write a file that can search in a text file and read the whole line into a struct. the struct = struct Transistor { char chType; char chFabrikant; float fPrijs; enum Transistor_Behuizing { empty,TO18, TO39,... (8 Replies)
Discussion started by: metal005
8 Replies

4. Shell Programming and Scripting

Add column info from one file to larger second file

Hi, long time reader, first time poster. I've done some searching so please if this is a repeated post excuse the duplicate, but what I have are two files roughly like so: File 1: A W B X C Y D Z File 2: A 1 C 2 D 3 And what I would like to get out is... (4 Replies)
Discussion started by: wallysb01
4 Replies