getprojall(3c) getprojall(3c)
getprojall, fgetprojall - enumerate all project IDs
#include <proj.h>
int getprojall(projid_t *buf, int len);
int fgetprojall(PROJ token, projid_t *buf, int len);
The getprojall function stores information about all of the project IDs
known to the system into an array of projid_t structs pointed to by buf.
A maximum of len entries will be stored. The projid_t struct is defined
in <proj.h> and has the following format:
#define MAXPROJNAMELEN 32
typedef struct projid {
char proj_name[MAXPROJNAMELEN]; /* project name */
prid_t proj_id; /* project ID */
} projid_t;
Note that project names that have more than MAXPROJNAMELEN-1 characters
will be truncated. The proj_name field is always null-terminated.
The fgetprojall function is a variant of getprojall that uses a PROJ
token to make it more efficient for repeated use. Otherwise its
operation is identical. For more details on creating a PROJ token, see
openproj(3C).
/etc/projid System project name to project ID mappings.
closeproj(3C), getprojuser(3C), openproj(3C), projid(3C), projname(3C),
projid(4), projects(5).
getprojall and fgetprojall both return the number of projid_t's stored
(which may be 0 if the none are defined for the system) or -1 if an error
occurred.
All of the functions use fopen(3S) and are thus subject to its
limitations.
Project ID information should be (optionally) obtained via NIS.
PPPPaaaaggggeeee 1111 [ Back ]
|