15e9cd1aeSAssar Westerlund /* 2*ae771770SStanislav Sedov * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan 35e9cd1aeSAssar Westerlund * (Royal Institute of Technology, Stockholm, Sweden). 45e9cd1aeSAssar Westerlund * All rights reserved. 55e9cd1aeSAssar Westerlund * 65e9cd1aeSAssar Westerlund * Redistribution and use in source and binary forms, with or without 75e9cd1aeSAssar Westerlund * modification, are permitted provided that the following conditions 85e9cd1aeSAssar Westerlund * are met: 95e9cd1aeSAssar Westerlund * 105e9cd1aeSAssar Westerlund * 1. Redistributions of source code must retain the above copyright 115e9cd1aeSAssar Westerlund * notice, this list of conditions and the following disclaimer. 125e9cd1aeSAssar Westerlund * 135e9cd1aeSAssar Westerlund * 2. Redistributions in binary form must reproduce the above copyright 145e9cd1aeSAssar Westerlund * notice, this list of conditions and the following disclaimer in the 155e9cd1aeSAssar Westerlund * documentation and/or other materials provided with the distribution. 165e9cd1aeSAssar Westerlund * 175e9cd1aeSAssar Westerlund * 3. Neither the name of the Institute nor the names of its contributors 185e9cd1aeSAssar Westerlund * may be used to endorse or promote products derived from this software 195e9cd1aeSAssar Westerlund * without specific prior written permission. 205e9cd1aeSAssar Westerlund * 215e9cd1aeSAssar Westerlund * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 225e9cd1aeSAssar Westerlund * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 235e9cd1aeSAssar Westerlund * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 245e9cd1aeSAssar Westerlund * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 255e9cd1aeSAssar Westerlund * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 265e9cd1aeSAssar Westerlund * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 275e9cd1aeSAssar Westerlund * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 285e9cd1aeSAssar Westerlund * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 295e9cd1aeSAssar Westerlund * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 305e9cd1aeSAssar Westerlund * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 315e9cd1aeSAssar Westerlund * SUCH DAMAGE. 325e9cd1aeSAssar Westerlund */ 335e9cd1aeSAssar Westerlund 34*ae771770SStanislav Sedov /* $Id$ */ 355e9cd1aeSAssar Westerlund 365e9cd1aeSAssar Westerlund #ifndef __COM_RIGHT_H__ 375e9cd1aeSAssar Westerlund #define __COM_RIGHT_H__ 385e9cd1aeSAssar Westerlund 39*ae771770SStanislav Sedov #ifndef KRB5_LIB 40*ae771770SStanislav Sedov #ifndef KRB5_LIB_FUNCTION 41*ae771770SStanislav Sedov #if defined(_WIN32) 42*ae771770SStanislav Sedov #define KRB5_LIB_FUNCTION __declspec(dllimport) 43*ae771770SStanislav Sedov #define KRB5_LIB_CALL __stdcall 44*ae771770SStanislav Sedov #define KRB5_LIB_VARIABLE __declspec(dllimport) 45*ae771770SStanislav Sedov #else 46*ae771770SStanislav Sedov #define KRB5_LIB_FUNCTION 47*ae771770SStanislav Sedov #define KRB5_LIB_CALL 48*ae771770SStanislav Sedov #define KRB5_LIB_VARIABLE 49*ae771770SStanislav Sedov #endif 50*ae771770SStanislav Sedov #endif 51*ae771770SStanislav Sedov #endif 52*ae771770SStanislav Sedov 53*ae771770SStanislav Sedov #ifdef _WIN32 54*ae771770SStanislav Sedov #define KRB5_CALLCONV __stdcall 55*ae771770SStanislav Sedov #else 56*ae771770SStanislav Sedov #define KRB5_CALLCONV 57*ae771770SStanislav Sedov #endif 58*ae771770SStanislav Sedov 595e9cd1aeSAssar Westerlund #ifdef __STDC__ 605e9cd1aeSAssar Westerlund #include <stdarg.h> 615e9cd1aeSAssar Westerlund #endif 625e9cd1aeSAssar Westerlund 635e9cd1aeSAssar Westerlund struct error_table { 645e9cd1aeSAssar Westerlund char const * const * msgs; 655e9cd1aeSAssar Westerlund long base; 665e9cd1aeSAssar Westerlund int n_msgs; 675e9cd1aeSAssar Westerlund }; 685e9cd1aeSAssar Westerlund struct et_list { 695e9cd1aeSAssar Westerlund struct et_list *next; 705e9cd1aeSAssar Westerlund struct error_table *table; 715e9cd1aeSAssar Westerlund }; 725e9cd1aeSAssar Westerlund extern struct et_list *_et_list; 735e9cd1aeSAssar Westerlund 74*ae771770SStanislav Sedov KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL 75*ae771770SStanislav Sedov com_right (struct et_list *list, long code); 76*ae771770SStanislav Sedov 77*ae771770SStanislav Sedov KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL 78*ae771770SStanislav Sedov com_right_r (struct et_list *list, long code, char *, size_t); 79*ae771770SStanislav Sedov 80*ae771770SStanislav Sedov KRB5_LIB_FUNCTION void KRB5_LIB_CALL 81*ae771770SStanislav Sedov initialize_error_table_r (struct et_list **, const char **, int, long); 82*ae771770SStanislav Sedov 83*ae771770SStanislav Sedov KRB5_LIB_FUNCTION void KRB5_LIB_CALL 84*ae771770SStanislav Sedov free_error_table (struct et_list *); 855e9cd1aeSAssar Westerlund 865e9cd1aeSAssar Westerlund #endif /* __COM_RIGHT_H__ */ 87