home *** CD-ROM | disk | FTP | other *** search
- /* ********************************************************************** *\
- * Copyright IBM Corporation 1988,1991 - All Rights Reserved *
- ############################################################################
- # Copyright IBM Corporation 1988, 1991 - All Rights Reserved #
- # #
- # Permission to use, copy, modify, and distribute this software and its #
- # documentation for any purpose and without fee is hereby granted, #
- # provided that the above copyright notice appear in all copies and #
- # that both that copyright notice and this permission notice appear in #
- # supporting documentation, and that the name of IBM not be used in #
- # advertising or publicity pertaining to distribution of the software #
- # without specific, written prior permission. #
- # #
- # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL #
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL IBM #
- # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY #
- # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER #
- # IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING #
- # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #
- ############################################################################
- \* ********************************************************************** */
- /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R5/ftp/src/overhead/util/hdrs/RCS/util.h,v 2.26 1991/09/12 20:35:54 bobg Exp $ */
- /* $ACIS: $ */
- /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R5/ftp/src/overhead/util/hdrs/RCS/util.h,v $ */
-
- #ifndef _UTIL_H_
- #define _UTIL_H_ 1
- #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS)
- static char *rcsid_h = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R5/ftp/src/overhead/util/hdrs/RCS/util.h,v 2.26 1991/09/12 20:35:54 bobg Exp $ ";
-
- #endif /* !defined(lint) && !defined(LOCORE)
- * && defined(RCS_HDRS) */
-
- /* ************************************************************ *\
-
- Declarations for miscellaneous routines in libutil.a
- $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R5/ftp/src/overhead/util/hdrs/RCS/util.h,v 2.26 1991/09/12 20:35:54 bobg Exp $
-
- \* ************************************************************ */
-
- extern int getpty(); /* opens up both ends of a pty */
-
- /* Real backwards compatibility. */
- #define getvuid getuid
- #define getvpwuid getpwuid
- #define getvpwnam getpwnam
- #define getvpwent getpwent
- #define setvpwent setpwent
- #define endvpwent endpwent
- #define getcpwuid(X, Y) getpwuid(X)
- #define getcpwnam(X, Y) getpwnam(X)
- #define cpw_error errno
-
- extern char FoldTRT[256];
-
- #define FOLDEDEQ(s1,s2) (FoldTRT[s1[0]]==FoldTRT[s2[0]] && FoldedEQ(s1,s2))
- #define FOLDEDEQN(s1,s2,n) (n <= 0 || (FoldTRT[s1[0]]==FoldTRT[s2[0]] && FoldedEQn(s1,s2,n)))
-
- extern char *gethome(), *getMyHome();
-
- extern int GetHostDomainName(); /* works like gethostname() but extends with getdomainname() if necessary. */
-
- struct configurelist {
- char *programName;
- char *key;
- char *value;
- struct configurelist *next;
- };
-
- #define CONFIG_EOF -1
- #define CONFIG_FOUNDENTRY 0
- #define CONFIG_BADENTRY 1
- #define CONFIG_COMMENT 2
- #define CONFIG_FALSECONDITION 3
- #define CONFIG_EMPTYLINE 4
- #define CONFIG_NOKEY 5
- #define CONFIG_NOVALUE 6
-
- extern int ReadConfigureLine(); /* Reads a line from a file in
- * configure file format - returns one
- * of the above values */
- extern struct configurelist *ReadConfigureFile(); /* reads a configure
- * file given by
- * filename */
- extern char *GetConfig(); /* returns the value corresponding to a
- * key for a given configurelist */
- extern char *GetConfiguration(); /* returns the value for a key in the
- * AndrewSetup file */
- extern FreeConfigureList(); /* frees a configure list */
-
- extern char *getprofile(), *getprofilestring();
- extern int getprofileint(), getprofileswitch();
- extern char *GetProfileFileName();
- extern char *GetFirstProfileFileName();
- extern refreshprofile();
-
- extern setprofilestring();
-
- /* special additions to repair the fact
- * that this was ripped wholesale out of the ATK
- */
-
- #define SYS_NAME "i386"
- #define OPSYSNAME "SCOi386"
-
- #define GetHostDomainName(a,b) gethostname((a),(b))
-
- #include "futil.h"
- #endif /* _UTIL_H_ */
-