home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / fonts / lib / fs / FSQuExt.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-13  |  2.1 KB  |  52 lines

  1. /* $XConsortium: FSQuExt.c,v 1.2 91/05/13 15:11:53 gildea Exp $ */
  2.  
  3. /* @(#)FSQuExt.c    4.1    91/05/02
  4.  * Copyright 1990 Network Computing Devices;
  5.  * Portions Copyright 1987 by Digital Equipment Corporation and the
  6.  * Massachusetts Institute of Technology
  7.  *
  8.  * Permission to use, copy, modify, and distribute this protoype software
  9.  * and its documentation to Members and Affiliates of the MIT X Consortium
  10.  * any purpose and without fee is hereby granted, provided
  11.  * that the above copyright notice appear in all copies and that both that
  12.  * copyright notice and this permission notice appear in supporting
  13.  * documentation, and that the names of Network Computing Devices, Digital or
  14.  * MIT not be used in advertising or publicity pertaining to distribution of
  15.  * the software without specific, written prior permission.
  16.  *
  17.  * NETWORK COMPUTING DEVICES, DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH
  18.  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  19.  * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT BE
  20.  * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  21.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  22.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  23.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  24.  */
  25.  
  26. #include    "FSlibint.h"
  27.  
  28. Bool
  29. FSQueryExtension(svr, name, major_opcode, first_event, first_error)
  30.     FSServer   *svr;
  31.     char       *name;
  32.     int        *major_opcode;
  33.     int        *first_event;
  34.     int        *first_error;
  35. {
  36.     fsQueryExtensionReply rep;
  37.     fsQueryExtensionReq *req;
  38.  
  39.     GetReq(QueryExtension, req);
  40.     req->nbytes = name ? strlen(name) : 0;
  41.     req->length += (req->nbytes + 3) >> 2;
  42.     _FSSend(svr, name, (long) req->nbytes);
  43.     if (!_FSReply(svr, (fsReply *) & rep,
  44.       (sizeof(fsQueryExtensionReply) - sizeof(fsGenericReply)) >> 2, fsFalse))
  45.     return FSBadAlloc;
  46.     *major_opcode = rep.major_opcode;
  47.     *first_event = rep.first_event;
  48.     *first_error = rep.first_error;
  49.     SyncHandle();
  50.     return (rep.present);
  51. }
  52.