Revision 1483,
1021 bytes
checked in by eichin, 36 years ago
(diff) |
routine to convert hesiod non-standard error returns to Error table
values (needs hesiod_err.et with it.)
|
Rev | Line | |
---|
[1472] | 1 | /* This file is part of the Project Athena Global Message System. |
---|
| 2 | * Created by: Mark W. Eichin <eichin@athena.mit.edu> |
---|
| 3 | * $Source: /afs/dev.mit.edu/source/repository/athena/bin/gms/hesiod_errors.c,v $ |
---|
| 4 | * $Author: eichin $ |
---|
| 5 | * |
---|
| 6 | * Copyright (c) 1988 by the Massachusetts Institute of Technology. |
---|
| 7 | * For copying and distribution information, see the file |
---|
| 8 | * "mit-copyright.h". |
---|
| 9 | */ |
---|
| 10 | #include <mit-copyright.h> |
---|
| 11 | #ifndef lint |
---|
[1483] | 12 | static char rcsid_hes_errors_c[] = "$Header: /afs/dev.mit.edu/source/repository/athena/bin/gms/hesiod_errors.c,v 1.2 1988-09-26 15:31:17 eichin Exp $"; |
---|
[1472] | 13 | #endif lint |
---|
| 14 | |
---|
| 15 | #include "hesiod_err.h" |
---|
| 16 | #include <hesiod.h> |
---|
| 17 | |
---|
[1483] | 18 | typedef int Code_t; |
---|
| 19 | |
---|
[1472] | 20 | Code_t hesiod_error() |
---|
| 21 | { |
---|
| 22 | init_hes_err_tbl(); |
---|
| 23 | |
---|
| 24 | switch(hes_error()) { |
---|
| 25 | case HES_ER_UNINIT: |
---|
| 26 | return(HESIOD_ER_UNINIT); |
---|
| 27 | case HES_ER_NOTFOUND: |
---|
| 28 | return(HESIOD_ER_NOTFOUND); |
---|
| 29 | case HES_ER_CONFIG: |
---|
| 30 | return(HESIOD_ER_CONFIG); |
---|
| 31 | case HES_ER_NET: |
---|
| 32 | return(HESIOD_ER_NET); |
---|
| 33 | case HES_ER_OK: |
---|
| 34 | return(HESIOD_ER_OK); |
---|
| 35 | default: |
---|
| 36 | return(HESIOD_ER_INVALID); |
---|
| 37 | } |
---|
| 38 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.