al_findfirst man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

al_findfirst(3)			Allegro manual		       al_findfirst(3)

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(3), al_findclose(3), al_ffblk_get_size(3)

Allegro				 version 4.4.2		       al_findfirst(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net