Back to index

glibc  2.9
aliases.h
Go to the documentation of this file.
00001 /* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #ifndef _ALIASES_H
00020 #define _ALIASES_H   1
00021 
00022 #include <features.h>
00023 
00024 #include <sys/types.h>
00025 
00026 
00027 __BEGIN_DECLS
00028 
00029 /* Structure to represent one entry of the alias data base.  */
00030 struct aliasent
00031   {
00032     char *alias_name;
00033     size_t alias_members_len;
00034     char **alias_members;
00035     int alias_local;
00036   };
00037 
00038 
00039 /* Open alias data base files.  */
00040 extern void setaliasent (void) __THROW;
00041 
00042 /* Close alias data base files.  */
00043 extern void endaliasent (void) __THROW;
00044 
00045 /* Get the next entry from the alias data base.  */
00046 extern struct aliasent *getaliasent (void) __THROW;
00047 
00048 /* Get the next entry from the alias data base and put it in RESULT_BUF.  */
00049 extern int getaliasent_r (struct aliasent *__restrict __result_buf,
00050                        char *__restrict __buffer, size_t __buflen,
00051                        struct aliasent **__restrict __result) __THROW;
00052 
00053 /* Get alias entry corresponding to NAME.  */
00054 extern struct aliasent *getaliasbyname (__const char *__name) __THROW;
00055 
00056 /* Get alias entry corresponding to NAME and put it in RESULT_BUF.  */
00057 extern int getaliasbyname_r (__const char *__restrict __name,
00058                           struct aliasent *__restrict __result_buf,
00059                           char *__restrict __buffer, size_t __buflen,
00060                           struct aliasent **__restrict __result) __THROW;
00061 
00062 __END_DECLS
00063 
00064 #endif /* aliases.h */