1*7f2fe78bSCy Schubert // ATTENTION: someone in the past edited this file manually
2*7f2fe78bSCy Schubert // I am continuing this tradition just to get the release out. 3/6/97
3*7f2fe78bSCy Schubert // This needs to be revisited and repaired!!!XXXX
4*7f2fe78bSCy Schubert // pbh
5*7f2fe78bSCy Schubert
6*7f2fe78bSCy Schubert
7*7f2fe78bSCy Schubert /*
8*7f2fe78bSCy Schubert * leasherr.c
9*7f2fe78bSCy Schubert * This file is the C file for leasherr.et.
10*7f2fe78bSCy Schubert * Please do not edit it as it is automatically generated.
11*7f2fe78bSCy Schubert */
12*7f2fe78bSCy Schubert
13*7f2fe78bSCy Schubert #include <stdlib.h>
14*7f2fe78bSCy Schubert #include <windows.h>
15*7f2fe78bSCy Schubert
16*7f2fe78bSCy Schubert static const char* const text[] = {
17*7f2fe78bSCy Schubert "Only one instance of Leash can be run at a time.",
18*7f2fe78bSCy Schubert "Principal invalid.",
19*7f2fe78bSCy Schubert "Realm failed.",
20*7f2fe78bSCy Schubert "Instance invalid.",
21*7f2fe78bSCy Schubert "Realm invalid.",
22*7f2fe78bSCy Schubert "Unexpected end of Kerberos memory storage.",
23*7f2fe78bSCy Schubert "Warning! Your Kerberos tickets expire soon.",
24*7f2fe78bSCy Schubert "You did not type the same new password.",
25*7f2fe78bSCy Schubert "You can only use printable characters in a password.",
26*7f2fe78bSCy Schubert "Fatal error; cannot run this program.",
27*7f2fe78bSCy Schubert "Couldn't initialize WinSock.",
28*7f2fe78bSCy Schubert "Couldn't find the timeserver host entry.",
29*7f2fe78bSCy Schubert "Couldn't open a socket.",
30*7f2fe78bSCy Schubert "Couldn't connect to timeserver.",
31*7f2fe78bSCy Schubert "Couldn't get time from server.",
32*7f2fe78bSCy Schubert "Couldn't get local time of day.",
33*7f2fe78bSCy Schubert "Couldn't set local time of day.",
34*7f2fe78bSCy Schubert "Error while receiving time from server.",
35*7f2fe78bSCy Schubert "Protocol problem with timeserver.",
36*7f2fe78bSCy Schubert "The time was already reset. Try using a different program to synchronize the time.",
37*7f2fe78bSCy Schubert 0
38*7f2fe78bSCy Schubert };
39*7f2fe78bSCy Schubert
40*7f2fe78bSCy Schubert typedef LPSTR (*err_func)(int, long);
41*7f2fe78bSCy Schubert struct error_table {
42*7f2fe78bSCy Schubert char const * const * msgs;
43*7f2fe78bSCy Schubert err_func func;
44*7f2fe78bSCy Schubert long base;
45*7f2fe78bSCy Schubert int n_msgs;
46*7f2fe78bSCy Schubert };
47*7f2fe78bSCy Schubert struct et_list {
48*7f2fe78bSCy Schubert #ifdef WINDOWS
49*7f2fe78bSCy Schubert HANDLE next;
50*7f2fe78bSCy Schubert #else
51*7f2fe78bSCy Schubert struct et_list *next;
52*7f2fe78bSCy Schubert #endif
53*7f2fe78bSCy Schubert const struct error_table * table;
54*7f2fe78bSCy Schubert };
55*7f2fe78bSCy Schubert
56*7f2fe78bSCy Schubert static const struct error_table et = { text, (err_func)0, 40591872L, 20 };
57*7f2fe78bSCy Schubert
58*7f2fe78bSCy Schubert #ifdef WINDOWS
initialize_lsh_error_table(HANDLE * __et_list)59*7f2fe78bSCy Schubert void initialize_lsh_error_table(HANDLE *__et_list) {
60*7f2fe78bSCy Schubert // struct et_list *_link,*_et_list;
61*7f2fe78bSCy Schubert struct et_list *_link;
62*7f2fe78bSCy Schubert HANDLE ghlink;
63*7f2fe78bSCy Schubert
64*7f2fe78bSCy Schubert ghlink=GlobalAlloc(GHND,sizeof(struct et_list));
65*7f2fe78bSCy Schubert _link=GlobalLock(ghlink);
66*7f2fe78bSCy Schubert _link->next=*__et_list;
67*7f2fe78bSCy Schubert _link->table=&et;
68*7f2fe78bSCy Schubert GlobalUnlock(ghlink);
69*7f2fe78bSCy Schubert *__et_list=ghlink;
70*7f2fe78bSCy Schubert }
71*7f2fe78bSCy Schubert #else
initialize_lsh_error_table(struct et_list ** __et_list)72*7f2fe78bSCy Schubert void initialize_lsh_error_table(struct et_list **__et_list) {
73*7f2fe78bSCy Schubert struct et_list *_link;
74*7f2fe78bSCy Schubert
75*7f2fe78bSCy Schubert _link=malloc(sizeof(struct et_list));
76*7f2fe78bSCy Schubert _link->next=*__et_list;
77*7f2fe78bSCy Schubert _link->table=&et;
78*7f2fe78bSCy Schubert *__et_list=_link;
79*7f2fe78bSCy Schubert }
80*7f2fe78bSCy Schubert #endif
81*7f2fe78bSCy Schubert
82*7f2fe78bSCy Schubert #ifdef WINDOWS
83*7f2fe78bSCy Schubert
Leash_initialize_krb_error_func(err_func func,HANDLE * __et_list)84*7f2fe78bSCy Schubert void Leash_initialize_krb_error_func(err_func func, HANDLE *__et_list)
85*7f2fe78bSCy Schubert {
86*7f2fe78bSCy Schubert }
87*7f2fe78bSCy Schubert
Leash_initialize_kadm_error_table(HANDLE * __et_list)88*7f2fe78bSCy Schubert void Leash_initialize_kadm_error_table(HANDLE *__et_list)
89*7f2fe78bSCy Schubert {
90*7f2fe78bSCy Schubert }
91*7f2fe78bSCy Schubert #else
92*7f2fe78bSCy Schubert #include <krberr.h>
93*7f2fe78bSCy Schubert
Leash_initialize_krb_error_func(err_func func,struct et_list ** __et_list)94*7f2fe78bSCy Schubert void Leash_initialize_krb_error_func(err_func func, struct et_list **__et_list)
95*7f2fe78bSCy Schubert {
96*7f2fe78bSCy Schubert (*pinitialize_krb_error_func)(func,__et_list);
97*7f2fe78bSCy Schubert }
98*7f2fe78bSCy Schubert
99*7f2fe78bSCy Schubert #include <kadm_err.h>
100*7f2fe78bSCy Schubert
Leash_initialize_kadm_error_table(struct et_list ** __et_list)101*7f2fe78bSCy Schubert void Leash_initialize_kadm_error_table(struct et_list **__et_list)
102*7f2fe78bSCy Schubert {
103*7f2fe78bSCy Schubert initialize_kadm_error_table(__et_list);
104*7f2fe78bSCy Schubert }
105*7f2fe78bSCy Schubert #endif
106