|
|
1.1 ! root 1: /* dsaplose.c - DSAP: Support for directory protocol mappings */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/dsap/net/RCS/dsaplose.c,v 7.0 90/07/26 14:45:55 mrose Exp $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/dsap/net/RCS/dsaplose.c,v 7.0 90/07/26 14:45:55 mrose Exp $ ! 9: * ! 10: * ! 11: * $Log: dsaplose.c,v $ ! 12: * Revision 7.0 90/07/26 14:45:55 mrose ! 13: * *** empty log message *** ! 14: * ! 15: */ ! 16: ! 17: /* ! 18: * NOTICE ! 19: * ! 20: * Acquisition, use, and distribution of this module and related ! 21: * materials are subject to the restrictions of a license agreement. ! 22: * Consult the Preface in the User's Manual for the full terms of ! 23: * this agreement. ! 24: * ! 25: */ ! 26: ! 27: ! 28: /* LINTLIBRARY */ ! 29: ! 30: #include <stdio.h> ! 31: #include <varargs.h> ! 32: #include "tailor.h" ! 33: #include "quipu/dsap.h" ! 34: ! 35: /* */ ! 36: ! 37: #ifndef lint ! 38: int dsaplose (va_alist) ! 39: va_dcl ! 40: { ! 41: int reason, ! 42: result; ! 43: struct DSAPindication *di; ! 44: va_list ap; ! 45: ! 46: va_start (ap); ! 47: ! 48: di = va_arg (ap, struct DSAPindication *); ! 49: reason = va_arg (ap, int); ! 50: ! 51: result = _dsaplose (di, reason, ap); ! 52: ! 53: va_end (ap); ! 54: ! 55: return result; ! 56: } ! 57: #else ! 58: /* VARARGS4 */ ! 59: ! 60: int dsaplose (di, reason, what, fmt) ! 61: struct DSAPindication *di; ! 62: int reason; ! 63: char *what, ! 64: *fmt; ! 65: { ! 66: return dsaplose (di, reason, what, fmt); ! 67: } ! 68: #endif ! 69: ! 70: /* */ ! 71: ! 72: #ifndef lint ! 73: static int _dsaplose (di, reason, ap) /* what, fmt, args ... */ ! 74: register struct DSAPindication *di; ! 75: int reason; ! 76: va_list ap; ! 77: { ! 78: register char *bp; ! 79: char buffer[BUFSIZ]; ! 80: struct DSAPabort * da; ! 81: ! 82: if (di) { ! 83: bzero ((char *) di, sizeof *di); ! 84: di->di_type = DI_ABORT; ! 85: da = &(di->di_abort); ! 86: da->da_reason = reason; ! 87: ! 88: asprintf (bp = buffer, ap); ! 89: bp += strlen (bp); ! 90: ! 91: copyDSAPdata (buffer, bp - buffer, da); ! 92: } ! 93: ! 94: return NOTOK; ! 95: } ! 96: #endif ! 97: ! 98: #ifndef lint ! 99: int dsapreject (va_alist) ! 100: va_dcl ! 101: { ! 102: int reason, ! 103: id, ! 104: result; ! 105: struct DSAPindication *di; ! 106: va_list ap; ! 107: ! 108: va_start (ap); ! 109: ! 110: di = va_arg (ap, struct DSAPindication *); ! 111: reason = va_arg (ap, int); ! 112: id = va_arg (ap, int); ! 113: ! 114: result = _dsapreject (di, reason, id, ap); ! 115: ! 116: va_end (ap); ! 117: ! 118: return result; ! 119: } ! 120: #else ! 121: /* VARARGS4 */ ! 122: ! 123: int dsapreject (di, reason, id, what, fmt) ! 124: struct DSAPindication *di; ! 125: int reason; ! 126: int id; ! 127: char *what, ! 128: *fmt; ! 129: { ! 130: return dsapreject (di, reason, id, what, fmt); ! 131: } ! 132: #endif ! 133: ! 134: /* */ ! 135: ! 136: #ifndef lint ! 137: static int _dsapreject (di, reason, id, ap) /* what, fmt, args ... */ ! 138: register struct DSAPindication *di; ! 139: int reason; ! 140: int id; ! 141: va_list ap; ! 142: { ! 143: register char *bp; ! 144: char buffer[BUFSIZ]; ! 145: struct DSAPpreject * dp; ! 146: ! 147: if (di) { ! 148: bzero ((char *) di, sizeof *di); ! 149: di->di_type = DI_PREJECT; ! 150: dp = &(di->di_preject); ! 151: dp->dp_id = id; ! 152: dp->dp_reason = reason; ! 153: ! 154: asprintf (bp = buffer, ap); ! 155: bp += strlen (bp); ! 156: ! 157: copyDSAPdata (buffer, bp - buffer, dp); ! 158: } ! 159: ! 160: return (NOTOK); ! 161: } ! 162: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.