1 /* ========================================================================
2  * Copyright 1988-2006 University of Washington
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *
11  * ========================================================================
12  */
13 
14 /*
15  * Program:	TOPS-20 environment routines
16  *
17  * Author:	Mark Crispin
18  *		Networks and Distributed Computing
19  *		Computing & Communications
20  *		University of Washington
21  *		Administration Building, AG-44
22  *		Seattle, WA  98195
23  *		Internet: MRC@CAC.Washington.EDU
24  *
25  * Date:	25 May 1995
26  * Last Edited:	30 August 2006
27  */
28 
29 
30 /* Dedication:
31  * This file is dedicated with affection to the TOPS-20 operating system, which
32  * set standards for user and programmer friendliness that have still not been
33  * equaled by more `modern' operating systems.
34  * Wasureru mon ka!!!!
35  */
36 
37 
38 #define SUBSCRIPTIONFILE(t) sprintf (t,"%s\\SUBSCRIPTIONS.TXT",myhomedir ())
39 #define SUBSCRIPTIONTEMP(t) sprintf (t,"%s\\SUBSCRIPTIONS.TMP",myhomedir ())
40 
41 /* Function prototypes */
42 
43 #include "env.h"
44 
45 char *myusername_full (unsigned long *flags);
46 #define MU_LOGGEDIN 0
47 #define MU_NOTLOGGEDIN 1
48 #define MU_ANONYMOUS 2
49 #define myusername() \
50   myusername_full (NIL)
51 
52 
53 /* syslog() emulation */
54 
55 #define LOG_MAIL	(2<<3)	/* mail system */
56 #define LOG_DAEMON	(3<<3)	/* system daemons */
57 #define LOG_AUTH	(4<<3)	/* security/authorization messages */
58 #define LOG_EMERG	0	/* system is unusable */
59 #define LOG_ALERT	1	/* action must be taken immediately */
60 #define LOG_CRIT	2	/* critical conditions */
61 #define LOG_ERR		3	/* error conditions */
62 #define LOG_WARNING	4	/* warning conditions */
63 #define LOG_NOTICE	5	/* normal but signification condition */
64 #define LOG_INFO	6	/* informational */
65 #define LOG_DEBUG	7	/* debug-level messages */
66 #define LOG_PID		0x01	/* log the pid with each message */
67 #define LOG_CONS	0x02	/* log on the console if errors in sending */
68 #define LOG_ODELAY	0x04	/* delay open until syslog() is called */
69 #define LOG_NDELAY	0x08	/* don't delay open */
70 #define LOG_NOWAIT	0x10	/* if forking to log on console, don't wait() */
71 
72 void openlog (const char *ident,int logopt,int facility);
73 void syslog (int priority,const char *message,...);
74