kom-errno.h 4.07 KB
Newer Older
Linus Tolke's avatar
Linus Tolke committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * $Id: kom-errno.h,v 0.2 1991/09/15 10:13:03 linus Exp $
 * Copyright (C) 1991  Lysator Academic Computer Association.
 *
 * This file is part of the LysKOM server.
 * 
 * LysKOM is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by 
 * the Free Software Foundation; either version 1, or (at your option) 
 * any later version.
 * 
 * LysKOM is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with LysKOM; see the file COPYING.  If not, write to
 * Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
 * or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
 * MA 02139, USA.
 *
 * Please mail bug reports to bug-lyskom@lysator.liu.se. 
 */
Per Cederqvist's avatar
.    
Per Cederqvist committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*
 * kom_errno.h
 *
 * Created by ceder 1990-04-18
 *
 * The values that kom_errno can take.
 */


#ifndef  _KOM_ERRNO_ALREADY_INCLUDED__
#define  _KOM_ERRNO_ALREADY_INCLUDED__

#include <sys/types.h>


typedef enum 
{
    KOM_NO_ERROR = 0,		/* No error has occured */
    KOM_NOT_IMPL = 2,		/* Not implemented yet */
    KOM_OBSOLETE = 3,		/* No longer implemented */
    KOM_PWD = 4,			/* Wrong/illegal password */
    KOM_LONG_STR = 5,		/* String too long */
    KOM_LOGIN = 6,			/* Not logged in. */
    KOM_LOGIN_DISALLOWED = 7,	/* System is in 'singel-user mode' */
    KOM_CONF_ZERO = 8,		/* Attempt to use conference number 0. */
    KOM_UNDEF_CONF = 9,		/* Undefined or secret conference */
    KOM_UNDEF_PERS = 10,		/* Undefined or secret person */
    KOM_ACCESS = 11,		 	/* No 'read/write permission' */
    KOM_PERM = 12,			/* No permission */
    KOM_NOT_MEMBER = 13,             /* Not member in conf */
    KOM_NO_SUCH_TEXT = 14,		/* No such global text_no, or no access */
    KOM_TEXT_ZERO = 15,		/* Can't use text no 0 */
    KOM_NO_SUCH_LOCAL_TEXT = 16,	/* No such local text_no */
    KOM_LOCAL_TEXT_ZERO = 17,	/* Can't use local text no 0 */
    KOM_BAD_NAME = 18,		/* Too short/long or contains illegal chars */
    KOM_INDEX_OUT_OF_RANGE = 19,	/*  */
    KOM_CONF_EXISTS = 20,		/* Already exists */
    KOM_PERS_EXISTS = 21,		/* Already exists */
    KOM_SECRET_PUBLIC = 22,		/* Cannot be secret and !rd_prot */
    KOM_LETTER_BOX = 23,		/* Cannot change letter_box flag */
    KOM_LDB_ERR = 24,		/* Should never happen, unless Willf|r makes
				 * a mistake. */
    KOM_ILL_MISC = 25,		/* Illegal misc field.
				   err_stat holds field no */

    KOM_ILLEGAL_INFO_TYPE = 26,	/* Info_type parameter was illegal. This
				   means that there is a bug in the client. */
    KOM_ALREADY_RECIPIENT = 27,	/* Already recipient to this text. */
    KOM_ALREADY_COMMENT = 28,	/* Already comment to this text. */
    KOM_ALREADY_FOOTNOTE = 29,	/* Already footnote to this text. */
    KOM_NOT_RECIPIENT = 30,		/* Not recipient */
    KOM_NOT_COMMENT = 31,		/* Not comment to this text. */
    KOM_NOT_FOOTNOTE = 32,		/* Not footnote to this text. */
    KOM_RECIPIENT_LIMIT = 33,	/* Too many recipients */
    KOM_COMM_LIMIT = 34,		/* Too many comments */
    KOM_FOOT_LIMIT = 35,		/* Too many footnotes */
    KOM_MARK_LIMIT = 36,		/* Too many marks. */
    KOM_NOT_AUTHOR = 37,		/* Only the author may add footnotes or
				   delete texts. */


    KOM_NO_CONNECT = 38,		/* Can't connect to specified server */
    KOM_OUT_OF_MEMORY = 39,		/* Couldn't get memory for result */
    KOM_SERVER_IS_CRAZY = 40,	/* Client can't understand server */
    KOM_CLIENT_IS_CRAZY = 41,	/* Client thinks that server says it can't
				 * understand client. */
    KOM_UNDEF_SESSION = 42,	/* No such session exists. */
    not_used			/* Det {r jobbigt att flytta kommatecknet hela
				   tiden... :-) /ceder */
} Kom_err;


extern Kom_err kom_errno;


extern u_long err_stat;		/* Additional information about the error */

/*
 * print a short description of the error to stdout
 */
  
void
kom_perror(void);


#endif  /* _KOM_ERRNO_ALREADY_INCLUDED__ */