home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume18 / X11R5-fix13 / part03 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  50.4 KB

  1. Path: uunet!dtix!darwin.sura.net!mips!msi!dcmartin
  2. From: gildea@EXPO.LCS.MIT.EDU (Stephen Gildea)
  3. Newsgroups: comp.sources.x
  4. Subject: v18i044: X11R5 public fix #13, Part03/05
  5. Message-ID: <1992Jul22.150708.18752@msi.com>
  6. Date: 22 Jul 92 15:07:08 GMT
  7. References: <csx-18i042-X11R5-fix13@uunet.UU.NET>
  8. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  9. Organization: Molecular Simulations, Inc.
  10. Lines: 1591
  11. Approved: dcmartin@msi.com
  12. Originator: dcmartin@fascet
  13.  
  14. Submitted-by: gildea@EXPO.LCS.MIT.EDU (Stephen Gildea)
  15. Posting-number: Volume 18, Issue 44
  16. Archive-name: X11R5-fix13/part03
  17.  
  18. #!/bin/sh
  19. # this is part.03 (part 3 of a multipart archive)
  20. # do not concatenate these parts, unpack them in order with /bin/sh
  21. # file fix-13 continued
  22. #
  23. if test ! -r _shar_seq_.tmp; then
  24.     echo 'Please unpack part 1 first!'
  25.     exit 1
  26. fi
  27. (read Scheck
  28.  if test "$Scheck" != 3; then
  29.     echo Please unpack part "$Scheck" next!
  30.     exit 1
  31.  else
  32.     exit 0
  33.  fi
  34. ) < _shar_seq_.tmp || exit 1
  35. if test ! -f _shar_wnt_.tmp; then
  36.     echo 'x - still skipping fix-13'
  37. else
  38. echo 'x - continuing file fix-13'
  39. sed 's/^X//' << 'SHAR_EOF' >> 'fix-13' &&
  40. --- 86,93 ----
  41. X      /* compute remaining accelerators */
  42. X      FontComputeInfoAccelerators (pinfo);
  43. X  
  44. +     *spfont = spf;
  45. X      return Successful;
  46. X  }
  47. X  
  48. ***************
  49. *** 102,108 ****
  50. X      char        *fileName;
  51. X      FontScalablePtr    vals;
  52. X  {
  53. !     SpeedoFontPtr spf;
  54. X      char        fullName[MAXFONTNAMELEN];
  55. X      int         err;
  56. X  
  57. --- 100,106 ----
  58. X      char        *fileName;
  59. X      FontScalablePtr    vals;
  60. X  {
  61. !     SpeedoFontPtr spf = NULL;
  62. X      char        fullName[MAXFONTNAMELEN];
  63. X      int         err;
  64. X  
  65. ***************
  66. *** 113,119 ****
  67. X  
  68. X      err = get_font_info(pFontInfo, fullName, fileName, entry, &spf);
  69. X  
  70. !     close_sp_font(spf);
  71. X      return err;
  72. X  }
  73. X  
  74. --- 111,119 ----
  75. X  
  76. X      err = get_font_info(pFontInfo, fullName, fileName, entry, &spf);
  77. X  
  78. !     if (spf)
  79. !     close_sp_font(spf);
  80. X      return err;
  81. X  }
  82. X  
  83. *** /tmp/da27273    Tue Jul 14 18:06:01 1992
  84. --- mit/fonts/lib/font/Speedo/spfile.c    Tue Jul 14 18:06:00 1992
  85. ***************
  86. *** 1,4 ****
  87. ! /* $XConsortium: spfile.c,v 1.4 91/07/15 18:16:46 keith Exp $ */
  88. X  /*
  89. X   * Copyright 1990, 1991 Network Computing Devices;
  90. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  91. --- 1,4 ----
  92. ! /* $XConsortium: spfile.c,v 1.6 92/04/09 18:13:03 gildea Exp $ */
  93. X  /*
  94. X   * Copyright 1990, 1991 Network Computing Devices;
  95. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  96. ***************
  97. *** 154,159 ****
  98. --- 154,162 ----
  99. X      if (!spmf)
  100. X      return AllocError;
  101. X      bzero(spmf, sizeof(SpeedoMasterFontRec));
  102. +     spmf->entry = NULL;
  103. +     spmf->f_buffer = NULL;
  104. +     spmf->c_buffer = NULL;
  105. X  
  106. X      /* open font */
  107. X      spmf->fname = (char *) xalloc(strlen(filename) + 1);
  108. ***************
  109. *** 265,270 ****
  110. --- 268,275 ----
  111. X      return;
  112. X      if (spmf->state & MasterFileOpen)
  113. X      fclose(spmf->fp);
  114. +     if (spmf->entry)
  115. +     spmf->entry->u.scalable.extra->private = NULL;
  116. X      xfree(spmf->fname);
  117. X      xfree(spmf->f_buffer);
  118. X      xfree(spmf->c_buffer);
  119. *** /tmp/da27342    Tue Jul 14 18:06:08 1992
  120. --- mit/fonts/lib/font/Speedo/spglyph.c    Tue Jul 14 18:06:07 1992
  121. ***************
  122. *** 1,4 ****
  123. ! /* $XConsortium: spglyph.c,v 1.10 91/07/31 01:08:59 keith Exp $ */
  124. X  /*
  125. X   * Copyright 1990, 1991 Network Computing Devices;
  126. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  127. --- 1,4 ----
  128. ! /* $XConsortium: spglyph.c,v 1.12 92/05/13 16:03:30 keith Exp $ */
  129. X  /*
  130. X   * Copyright 1990, 1991 Network Computing Devices;
  131. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  132. ***************
  133. *** 21,30 ****
  134. X   * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  135. X   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  136. X   *
  137. -  * $NCDId: @(#)spglyph.c,v 4.7 1991/06/24 16:55:40 lemke Exp $
  138. -  *
  139. X   * Author: Dave Lemke, Network Computing Devices Inc
  140. -  *
  141. X   */
  142. X  
  143. X  #include    <X11/X.h>    /* for bit order #defines */
  144. --- 21,27 ----
  145. ***************
  146. *** 34,41 ****
  147. X  
  148. X  static CurrentFontValuesRec current_font_values;
  149. X  static CurrentFontValuesPtr cfv = ¤t_font_values;
  150. ! static int  bit,
  151. !             byte,
  152. X              scan;
  153. X  
  154. X  unsigned long
  155. --- 31,38 ----
  156. X  
  157. X  static CurrentFontValuesRec current_font_values;
  158. X  static CurrentFontValuesPtr cfv = ¤t_font_values;
  159. ! static int  bit_order,
  160. !             byte_order,
  161. X              scan;
  162. X  
  163. X  unsigned long
  164. ***************
  165. *** 165,171 ****
  166. X      nmiddle = (xbit2 >> 3);
  167. X      xbit1 &= 7;
  168. X      xbit2 &= 7;
  169. !     if (bit == MSBFirst) {
  170. X      startmask = ((CARD8) ~0) >> xbit1;
  171. X      endmask = ~(((CARD8) ~0) >> xbit2);
  172. X      } else {
  173. --- 162,168 ----
  174. X      nmiddle = (xbit2 >> 3);
  175. X      xbit1 &= 7;
  176. X      xbit2 &= 7;
  177. !     if (bit_order == MSBFirst) {
  178. X      startmask = ((CARD8) ~0) >> xbit1;
  179. X      endmask = ~(((CARD8) ~0) >> xbit2);
  180. X      } else {
  181. ***************
  182. *** 260,266 ****
  183. X      finish_line(cur_spf);
  184. X      cfv->last_y++;
  185. X      }
  186. !     if (byte != bit) {
  187. X      switch (scan) {
  188. X      case 1:
  189. X          break;
  190. --- 257,263 ----
  191. X      finish_line(cur_spf);
  192. X      cfv->last_y++;
  193. X      }
  194. !     if (byte_order != bit_order) {
  195. X      switch (scan) {
  196. X      case 1:
  197. X          break;
  198. ***************
  199. *** 293,300 ****
  200. X  
  201. X      scan = 1;
  202. X      ret = CheckFSFormat(format, fmask,
  203. !             &bit, &byte, &scan, &glyph, &image);
  204. X  
  205. X      if (ret != Successful)
  206. X      return BadFontFormat;
  207. X  
  208. --- 290,301 ----
  209. X  
  210. X      scan = 1;
  211. X      ret = CheckFSFormat(format, fmask,
  212. !             &bit_order, &byte_order, &scan, &glyph, &image);
  213. X  
  214. +     pfont->bit = bit_order;
  215. +     pfont->byte = byte_order;
  216. +     pfont->glyph = glyph;
  217. +     pfont->scan = scan;
  218. X      if (ret != Successful)
  219. X      return BadFontFormat;
  220. X  
  221. *** /tmp/da27386    Tue Jul 14 18:06:11 1992
  222. --- mit/fonts/lib/font/Speedo/spint.h    Tue Jul 14 18:06:11 1992
  223. ***************
  224. *** 1,4 ****
  225. ! /* $XConsortium: spint.h,v 1.4 91/07/16 20:20:32 keith Exp $ */
  226. X  /*
  227. X   * Copyright 1990, 1991 Network Computing Devices;
  228. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  229. --- 1,4 ----
  230. ! /* $XConsortium: spint.h,v 1.5 92/03/25 18:45:51 keith Exp $ */
  231. X  /*
  232. X   * Copyright 1990, 1991 Network Computing Devices;
  233. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  234. ***************
  235. *** 52,57 ****
  236. --- 52,58 ----
  237. X  #define    MasterFileOpen    0x1
  238. X  
  239. X  typedef struct _sp_master {
  240. +     FontEntryPtr    entry;    /* back pointer */
  241. X      FILE       *fp;
  242. X      char       *fname;
  243. X      ufix8      *f_buffer;
  244. ***************
  245. *** 98,103 ****
  246. --- 99,106 ----
  247. X  typedef struct _sp_font {
  248. X      struct _sp_master *master;
  249. X      specs_t     specs;
  250. +     FontEntryPtr    entry;
  251. X  
  252. X      FontScalableRec vals;
  253. X  
  254. *** /tmp/da27732    Tue Jul 14 18:06:41 1992
  255. --- mit/fonts/lib/fs/FSFontInfo.c    Tue Jul 14 18:06:41 1992
  256. ***************
  257. *** 1,6 ****
  258. ! /* $XConsortium: FSFontInfo.c,v 1.2 91/05/13 15:11:37 gildea Exp $ */
  259. ! /* @(#)FSFontInfo.c    4.1    91/05/02
  260. X   * Copyright 1990 Network Computing Devices;
  261. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  262. X   * Massachusetts Institute of Technology
  263. --- 1,5 ----
  264. ! /* $XConsortium: FSFontInfo.c,v 1.4 92/05/13 15:41:58 gildea Exp $ */
  265. ! /*
  266. X   * Copyright 1990 Network Computing Devices;
  267. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  268. X   * Massachusetts Institute of Technology
  269. ***************
  270. *** 47,52 ****
  271. --- 46,52 ----
  272. X      char      **flist = NULL;
  273. X      fsListFontsWithXInfoReply reply;
  274. X      fsListFontsWithXInfoReq *req;
  275. +     Status status;
  276. X  
  277. X      GetReq(ListFontsWithXInfo, req);
  278. X      req->maxNames = maxNames;
  279. ***************
  280. *** 55,63 ****
  281. X      _FSSend(svr, pattern, nbytes);
  282. X  
  283. X      for (i = 0;; i++) {
  284. !     if (!_FSReply(svr, (fsReply *) & reply,
  285. !               ((SIZEOF(fsListFontsWithXInfoReply) -
  286. !             SIZEOF(fsGenericReply)) >> 2), fsFalse)) {
  287. X          for (j = (i - 1); j >= 0; j--) {
  288. X          FSfree((char *) fhdr[j]);
  289. X          FSfree((char *) pi[j]);
  290. --- 55,75 ----
  291. X      _FSSend(svr, pattern, nbytes);
  292. X  
  293. X      for (i = 0;; i++) {
  294. !     if (FSProtocolVersion(svr) > 1)
  295. !     {
  296. !         status = _FSReply(svr, (fsReply *) &reply, 0, fsFalse);
  297. !         if (status != 0  &&  reply.nameLength == 0)    /* got last reply */
  298. !         break;
  299. !         if (status)
  300. !         _FSRead(svr, (char *) &reply.nReplies,
  301. !             SIZEOF(fsListFontsWithXInfoReply) -
  302. !             SIZEOF(fsGenericReply));
  303. !     } else {
  304. !         status = _FSReply(svr, (fsReply *) & reply,
  305. !                   ((SIZEOF(fsListFontsWithXInfoReply) -
  306. !                 SIZEOF(fsGenericReply)) >> 2), fsFalse);
  307. !     }
  308. !     if (!status) {
  309. X          for (j = (i - 1); j >= 0; j--) {
  310. X          FSfree((char *) fhdr[j]);
  311. X          FSfree((char *) pi[j]);
  312. ***************
  313. *** 79,85 ****
  314. X          SyncHandle();
  315. X          return (char **) NULL;
  316. X      }
  317. !     if (reply.nameLength == 0)    /* got last reply */
  318. X          break;
  319. X      if ((i + reply.nReplies) >= size) {
  320. X          size = i + reply.nReplies + 1;
  321. --- 91,97 ----
  322. X          SyncHandle();
  323. X          return (char **) NULL;
  324. X      }
  325. !     if (reply.nameLength == 0)    /* got last reply in version 1 */
  326. X          break;
  327. X      if ((i + reply.nReplies) >= size) {
  328. X          size = i + reply.nReplies + 1;
  329. ***************
  330. *** 172,187 ****
  331. X          goto badmem;
  332. X      }
  333. X      bcopy((char *) &reply.header, (char *) fhdr[i], sizeof(fsFontHeader));
  334. X  
  335. !     /* get the name */
  336. X      flist[i] = (char *) FSmalloc((unsigned int) (reply.nameLength + 1));
  337. !     if (!flist[i]) {
  338. !         nbytes = reply.nameLength + 3 & ~3;
  339. !         _FSEatData(svr, (unsigned long) nbytes);
  340. !         goto badmem;
  341. X      }
  342. -     _FSReadPad(svr, flist[i], (long) reply.nameLength);
  343. -     flist[i][reply.nameLength] = '\0';
  344. X  
  345. X      pi[i] = (fsPropInfo *) FSmalloc(sizeof(fsPropInfo));
  346. X      if (!pi[i]) {
  347. --- 184,212 ----
  348. X          goto badmem;
  349. X      }
  350. X      bcopy((char *) &reply.header, (char *) fhdr[i], sizeof(fsFontHeader));
  351. +     if (FSProtocolVersion(svr) == 1)
  352. +     {
  353. +         fhdr[i]->char_range.min_char.high = reply.header.char_range.min_char.low;
  354. +         fhdr[i]->char_range.min_char.low = reply.header.char_range.min_char.high;
  355. +         fhdr[i]->char_range.max_char.high = reply.header.char_range.max_char.low;
  356. +         fhdr[i]->char_range.max_char.low = reply.header.char_range.max_char.high;
  357. +         fhdr[i]->default_char.high = reply.header.default_char.low;
  358. +         fhdr[i]->default_char.low = reply.header.default_char.high;
  359. +     }
  360. X  
  361. !     /* alloc space for the name */
  362. X      flist[i] = (char *) FSmalloc((unsigned int) (reply.nameLength + 1));
  363. !     if (FSProtocolVersion(svr) == 1)
  364. !     {
  365. !         /* get the name */
  366. !         if (!flist[i]) {
  367. !         nbytes = reply.nameLength + 3 & ~3;
  368. !         _FSEatData(svr, (unsigned long) nbytes);
  369. !         goto badmem;
  370. !         }
  371. !         _FSReadPad(svr, flist[i], (long) reply.nameLength);
  372. !         flist[i][reply.nameLength] = '\0';
  373. X      }
  374. X  
  375. X      pi[i] = (fsPropInfo *) FSmalloc(sizeof(fsPropInfo));
  376. X      if (!pi[i]) {
  377. ***************
  378. *** 208,215 ****
  379. X      _FSReadPad(svr, (char *) po[i],
  380. X             (pi[i]->num_offsets * sizeof(fsPropOffset)));
  381. X      /* get prop data */
  382. !     _FSReadPad(svr, (char *) pd[i], pi[i]->data_len);
  383. X  
  384. X      }
  385. X      *info = fhdr;
  386. X      *count = i;
  387. --- 233,257 ----
  388. X      _FSReadPad(svr, (char *) po[i],
  389. X             (pi[i]->num_offsets * sizeof(fsPropOffset)));
  390. X      /* get prop data */
  391. !     if (FSProtocolVersion(svr) == 1)
  392. !         _FSReadPad(svr, (char *) pd[i], pi[i]->data_len);
  393. !     else
  394. !         _FSRead(svr, (char *) pd[i], pi[i]->data_len);
  395. X  
  396. +     if (FSProtocolVersion(svr) != 1)
  397. +     {
  398. +         /* get the name */
  399. +         if (!flist[i]) {
  400. +         nbytes = reply.nameLength + 3 & ~3;
  401. +         _FSEatData(svr, (unsigned long) nbytes);
  402. +         goto badmem;
  403. +         }
  404. +         _FSRead(svr, flist[i], (long) reply.nameLength);
  405. +         flist[i][reply.nameLength] = '\0';
  406. +         nbytes = pi[i]->data_len + reply.nameLength;
  407. +         _FSEatData(svr, (unsigned long) (((nbytes+3)&~3) - nbytes));
  408. +     }
  409. X      }
  410. X      *info = fhdr;
  411. X      *count = i;
  412. *** /tmp/da27843    Tue Jul 14 18:06:50 1992
  413. --- mit/fonts/lib/fs/FSQGlyphs.c    Tue Jul 14 18:06:49 1992
  414. ***************
  415. *** 1,29 ****
  416. ! /* $XConsortium: FSQGlyphs.c,v 1.2 91/05/13 15:11:49 gildea Exp $ */
  417. ! /* @(#)FSQGlyphs.c    4.1    91/05/02
  418. X   * Copyright 1990 Network Computing Devices;
  419. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  420. X   * Massachusetts Institute of Technology
  421. X   *
  422. !  * Permission to use, copy, modify, and distribute this protoype software
  423. !  * and its documentation to Members and Affiliates of the MIT X Consortium
  424. !  * any purpose and without fee is hereby granted, provided
  425. X   * that the above copyright notice appear in all copies and that both that
  426. X   * copyright notice and this permission notice appear in supporting
  427. X   * documentation, and that the names of Network Computing Devices, Digital or
  428. !  * MIT not be used in advertising or publicity pertaining to distribution of
  429. !  * the software without specific, written prior permission.
  430. X   *
  431. !  * NETWORK COMPUTING DEVICES, DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH
  432. !  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  433. !  * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT BE
  434. !  * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  435. !  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  436. !  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  437. !  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  438. X   */
  439. X  
  440. ! #include    "FSlibint.h"
  441. X  
  442. X  int
  443. X  FSQueryXBitmaps8(svr, fid, format, range_type, str, str_len, offsets, glyphdata)
  444. --- 1,28 ----
  445. ! /* $XConsortium: FSQGlyphs.c,v 1.4 92/05/26 17:27:39 gildea Exp $ */
  446. ! /*
  447. X   * Copyright 1990 Network Computing Devices;
  448. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  449. X   * Massachusetts Institute of Technology
  450. X   *
  451. !  * Permission to use, copy, modify, distribute, and sell this software and
  452. !  * its documentation for any purpose is hereby granted without fee, provided
  453. X   * that the above copyright notice appear in all copies and that both that
  454. X   * copyright notice and this permission notice appear in supporting
  455. X   * documentation, and that the names of Network Computing Devices, Digital or
  456. !  * M.I.T. not be used in advertising or publicity pertaining to distribution
  457. !  * of the software without specific, written prior permission.
  458. X   *
  459. !  * NETWORK COMPUTING DEVICES, DIGITAL AND M.I.T. DISCLAIM ALL WARRANTIES WITH
  460. !  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  461. !  * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES,
  462. !  * DIGITAL OR M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
  463. !  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  464. !  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  465. !  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  466. !  * THIS SOFTWARE.
  467. X   */
  468. X  
  469. ! #include "FSlibint.h"
  470. X  
  471. X  int
  472. X  FSQueryXBitmaps8(svr, fid, format, range_type, str, str_len, offsets, glyphdata)
  473. ***************
  474. *** 98,104 ****
  475. X      req->format = format;
  476. X      req->num_ranges = str_len;
  477. X      req->length += ((str_len * sizeof(fsChar2b)) + 3) >> 2;
  478. !     _FSSend(svr, (char *) str, (str_len * sizeof(fsChar2b)));
  479. X  
  480. X      /* get back the info */
  481. X      if (!_FSReply(svr, (fsReply *) & reply,
  482. --- 97,119 ----
  483. X      req->format = format;
  484. X      req->num_ranges = str_len;
  485. X      req->length += ((str_len * sizeof(fsChar2b)) + 3) >> 2;
  486. !     if (FSProtocolVersion(svr) == 1)
  487. !     {
  488. !     int i;
  489. !     fsChar2b_version1 *swapped_str;
  490. !     swapped_str = (fsChar2b_version1 *)
  491. !         FSmalloc(sizeof(fsChar2b_version1) * str_len);
  492. !     if (!swapped_str)
  493. !         return FSBadAlloc;
  494. !     for (i = 0; i < str_len; i++) {
  495. !         swapped_str[i].low = str[i].low;
  496. !         swapped_str[i].high = str[i].high;
  497. !     }
  498. !     _FSSend(svr, (char *)swapped_str, (str_len*sizeof(fsChar2b_version1)));
  499. !     FSfree(swapped_str);
  500. !     } else
  501. !     _FSSend(svr, (char *) str, (str_len * sizeof(fsChar2b)));
  502. X  
  503. X      /* get back the info */
  504. X      if (!_FSReply(svr, (fsReply *) & reply,
  505. *** /tmp/da27865    Tue Jul 14 18:06:52 1992
  506. --- mit/fonts/lib/fs/FSQXExt.c    Tue Jul 14 18:06:51 1992
  507. ***************
  508. *** 1,29 ****
  509. ! /* $XConsortium: FSQXExt.c,v 1.2 91/05/13 15:11:50 gildea Exp $ */
  510. ! /* @(#)FSQXExt.c    4.1    91/05/02
  511. X   * Copyright 1990 Network Computing Devices;
  512. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  513. X   * Massachusetts Institute of Technology
  514. X   *
  515. !  * Permission to use, copy, modify, and distribute this protoype software
  516. !  * and its documentation to Members and Affiliates of the MIT X Consortium
  517. !  * any purpose and without fee is hereby granted, provided
  518. X   * that the above copyright notice appear in all copies and that both that
  519. X   * copyright notice and this permission notice appear in supporting
  520. X   * documentation, and that the names of Network Computing Devices, Digital or
  521. !  * MIT not be used in advertising or publicity pertaining to distribution of
  522. !  * the software without specific, written prior permission.
  523. X   *
  524. !  * NETWORK COMPUTING DEVICES, DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH
  525. !  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  526. !  * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT BE
  527. !  * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  528. !  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  529. !  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  530. !  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  531. X   */
  532. X  
  533. ! #include    "FSlibint.h"
  534. X  
  535. X  int
  536. X  FSQueryXExtents8(svr, fid, range_type, str, str_len, extents)
  537. --- 1,28 ----
  538. ! /* $XConsortium: FSQXExt.c,v 1.4 92/05/26 17:26:53 gildea Exp $ */
  539. ! /*
  540. X   * Copyright 1990 Network Computing Devices;
  541. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  542. X   * Massachusetts Institute of Technology
  543. X   *
  544. !  * Permission to use, copy, modify, distribute, and sell this software and
  545. !  * its documentation for any purpose is hereby granted without fee, provided
  546. X   * that the above copyright notice appear in all copies and that both that
  547. X   * copyright notice and this permission notice appear in supporting
  548. X   * documentation, and that the names of Network Computing Devices, Digital or
  549. !  * M.I.T. not be used in advertising or publicity pertaining to distribution
  550. !  * of the software without specific, written prior permission.
  551. X   *
  552. !  * NETWORK COMPUTING DEVICES, DIGITAL AND M.I.T. DISCLAIM ALL WARRANTIES WITH
  553. !  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  554. !  * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES,
  555. !  * DIGITAL OR M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
  556. !  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  557. !  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  558. !  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  559. !  * THIS SOFTWARE.
  560. X   */
  561. X  
  562. ! #include "FSlibint.h"
  563. X  
  564. X  int
  565. X  FSQueryXExtents8(svr, fid, range_type, str, str_len, extents)
  566. ***************
  567. *** 83,89 ****
  568. X      req->range = range_type;
  569. X      req->num_ranges = str_len;
  570. X      req->length += ((str_len * sizeof(fsChar2b)) + 3) >> 2;
  571. !     _FSSend(svr, (char *) str, (str_len * sizeof(fsChar2b)));
  572. X  
  573. X      /* get back the info */
  574. X      if (!_FSReply(svr, (fsReply *) & reply,
  575. --- 82,103 ----
  576. X      req->range = range_type;
  577. X      req->num_ranges = str_len;
  578. X      req->length += ((str_len * sizeof(fsChar2b)) + 3) >> 2;
  579. !     if (FSProtocolVersion(svr) == 1)
  580. !     {
  581. !     fsChar2b_version1 *swapped_str;
  582. !     swapped_str = (fsChar2b_version1 *)
  583. !         FSmalloc(sizeof(fsChar2b_version1) * str_len);
  584. !     if (!swapped_str)
  585. !         return FSBadAlloc;
  586. !     for (i = 0; i < str_len; i++) {
  587. !         swapped_str[i].low = str[i].low;
  588. !         swapped_str[i].high = str[i].high;
  589. !     }
  590. !     _FSSend(svr, (char *)swapped_str, (str_len*sizeof(fsChar2b_version1)));
  591. !     FSfree(swapped_str);
  592. !     } else
  593. !     _FSSend(svr, (char *) str, (str_len * sizeof(fsChar2b)));
  594. X  
  595. X      /* get back the info */
  596. X      if (!_FSReply(svr, (fsReply *) & reply,
  597. *** /tmp/da27887    Tue Jul 14 18:06:54 1992
  598. --- mit/fonts/lib/fs/FSQXInfo.c    Tue Jul 14 18:06:53 1992
  599. ***************
  600. *** 1,6 ****
  601. ! /* $XConsortium: FSQXInfo.c,v 1.2 91/05/13 15:11:51 gildea Exp $ */
  602. ! /* @(#)FSQXInfo.c    4.1    91/05/02
  603. X   * Copyright 1990 Network Computing Devices;
  604. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  605. X   * Massachusetts Institute of Technology
  606. --- 1,5 ----
  607. ! /* $XConsortium: FSQXInfo.c,v 1.3 92/05/12 18:07:24 gildea Exp $ */
  608. ! /*
  609. X   * Copyright 1990 Network Computing Devices;
  610. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  611. X   * Massachusetts Institute of Technology
  612. ***************
  613. *** 53,58 ****
  614. --- 52,66 ----
  615. X      return FSBadAlloc;
  616. X      }
  617. X      bcopy((char *) &reply.header, (char *) info, sizeof(fsFontHeader));
  618. +     if (FSProtocolVersion(svr) == 1)
  619. +     {
  620. +     info->char_range.min_char.high = reply.header.char_range.min_char.low;
  621. +     info->char_range.min_char.low = reply.header.char_range.min_char.high;
  622. +     info->char_range.max_char.high = reply.header.char_range.max_char.low;
  623. +     info->char_range.max_char.low = reply.header.char_range.max_char.high;
  624. +     info->default_char.high = reply.header.default_char.low;
  625. +     info->default_char.low = reply.header.default_char.high;
  626. +     }
  627. X      /* get the prop header */
  628. X      _FSReadPad(svr, (char *) props, sizeof(fsPropInfo));
  629. X      /* prepare for prop data */
  630. *** /tmp/da27951    Tue Jul 14 18:06:59 1992
  631. --- mit/fonts/lib/fs/FSSync.c    Tue Jul 14 18:06:59 1992
  632. ***************
  633. *** 1,33 ****
  634. ! /* $XConsortium: FSSync.c,v 1.3 91/07/22 11:29:21 rws Exp $ */
  635. ! /* @(#)FSSync.c    4.1    91/05/02
  636. X   * Copyright 1990 Network Computing Devices;
  637. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  638. X   * Massachusetts Institute of Technology
  639. X   *
  640. !  * Permission to use, copy, modify, and distribute this protoype software
  641. !  * and its documentation to Members and Affiliates of the MIT X Consortium
  642. !  * any purpose and without fee is hereby granted, provided
  643. X   * that the above copyright notice appear in all copies and that both that
  644. X   * copyright notice and this permission notice appear in supporting
  645. X   * documentation, and that the names of Network Computing Devices, Digital or
  646. !  * MIT not be used in advertising or publicity pertaining to distribution of
  647. !  * the software without specific, written prior permission.
  648. X   *
  649. !  * NETWORK COMPUTING DEVICES, DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH
  650. !  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  651. !  * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT BE
  652. !  * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  653. !  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  654. !  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  655. !  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  656. X   */
  657. X  
  658. ! #include    "FSlibint.h"
  659. X  
  660. X  extern _FSQEvent *_FSqfree;
  661. X  
  662. ! /* synchronize withe errors and events */
  663. X  
  664. X  FSSync(svr, discard)
  665. X      FSServer     *svr;
  666. --- 1,32 ----
  667. ! /* $XConsortium: FSSync.c,v 1.4 92/05/26 17:14:57 gildea Exp $ */
  668. ! /*
  669. X   * Copyright 1990 Network Computing Devices;
  670. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  671. X   * Massachusetts Institute of Technology
  672. X   *
  673. !  * Permission to use, copy, modify, distribute, and sell this software and
  674. !  * its documentation for any purpose is hereby granted without fee, provided
  675. X   * that the above copyright notice appear in all copies and that both that
  676. X   * copyright notice and this permission notice appear in supporting
  677. X   * documentation, and that the names of Network Computing Devices, Digital or
  678. !  * M.I.T. not be used in advertising or publicity pertaining to distribution
  679. !  * of the software without specific, written prior permission.
  680. X   *
  681. !  * NETWORK COMPUTING DEVICES, DIGITAL AND M.I.T. DISCLAIM ALL WARRANTIES WITH
  682. !  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  683. !  * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES,
  684. !  * DIGITAL OR M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
  685. !  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  686. !  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  687. !  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  688. !  * THIS SOFTWARE.
  689. X   */
  690. X  
  691. ! #include "FSlibint.h"
  692. X  
  693. X  extern _FSQEvent *_FSqfree;
  694. X  
  695. ! /* synchronize with errors and events */
  696. X  
  697. X  FSSync(svr, discard)
  698. X      FSServer     *svr;
  699. ***************
  700. *** 38,46 ****
  701. X  
  702. X      GetEmptyReq(ListExtensions, req);
  703. X      (void) _FSReply(svr, (fsReply *) & rep, 0, fsTrue);
  704. -     if (rep.nExtensions) {
  705. -     _FSEatData(svr, (unsigned long) rep.length << 2);
  706. -     }
  707. X  
  708. X      if (discard && svr->head) {
  709. X      ((_FSQEvent *) svr->tail)->next = _FSqfree;
  710. --- 37,42 ----
  711. *** /tmp/da28759    Tue Jul 14 18:08:08 1992
  712. --- mit/fonts/server/os/access.c    Tue Jul 14 18:08:07 1992
  713. ***************
  714. *** 1,28 ****
  715. ! /* $XConsortium: access.c,v 1.5 91/07/18 22:34:38 keith Exp $ */
  716. X  /*
  717. X   * Copyright 1990, 1991 Network Computing Devices;
  718. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  719. X   * Massachusetts Institute of Technology
  720. X   *
  721. !  * Permission to use, copy, modify, and distribute this protoype software
  722. !  * and its documentation to Members and Affiliates of the MIT X Consortium
  723. !  * any purpose and without fee is hereby granted, provided
  724. X   * that the above copyright notice appear in all copies and that both that
  725. X   * copyright notice and this permission notice appear in supporting
  726. X   * documentation, and that the names of Network Computing Devices, Digital or
  727. !  * MIT not be used in advertising or publicity pertaining to distribution of
  728. !  * the software without specific, written prior permission.
  729. X   *
  730. !  * NETWORK COMPUTING DEVICES, DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH
  731. !  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  732. !  * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT BE
  733. !  * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  734. !  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  735. !  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  736. !  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  737. !  *
  738. !  * $NCDId: @(#)access.c,v 4.5 1991/07/02 18:32:37 lemke Exp $
  739. !  *
  740. X   */
  741. X  
  742. X  #include        <sys/param.h>
  743. --- 1,25 ----
  744. ! /* $XConsortium: access.c,v 1.6 92/06/01 17:07:58 gildea Exp $ */
  745. X  /*
  746. X   * Copyright 1990, 1991 Network Computing Devices;
  747. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  748. X   * Massachusetts Institute of Technology
  749. X   *
  750. !  * Permission to use, copy, modify, distribute, and sell this software and
  751. !  * its documentation for any purpose is hereby granted without fee, provided
  752. X   * that the above copyright notice appear in all copies and that both that
  753. X   * copyright notice and this permission notice appear in supporting
  754. X   * documentation, and that the names of Network Computing Devices, Digital or
  755. !  * M.I.T. not be used in advertising or publicity pertaining to distribution
  756. !  * of the software without specific, written prior permission.
  757. X   *
  758. !  * NETWORK COMPUTING DEVICES, DIGITAL AND M.I.T. DISCLAIM ALL WARRANTIES WITH
  759. !  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  760. !  * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES,
  761. !  * DIGITAL OR M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
  762. !  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  763. !  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  764. !  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  765. !  * THIS SOFTWARE.
  766. X   */
  767. X  
  768. X  #include        <sys/param.h>
  769. ***************
  770. *** 91,105 ****
  771. X  {
  772. X      OsCommPtr    oc;
  773. X  
  774. !     /* now that its connected, zero the connect time so it doesn't get killed */
  775. X      oc = (OsCommPtr)client->osPrivate;
  776. X      oc->conn_time = 0;
  777. X  
  778. X      *size = 0;
  779. X      *accept = AuthSuccess;
  780. !     if (*index > 0)
  781. !     *index = 0;
  782. !     else
  783. !     *index = -1;
  784. X      return FSSuccess;
  785. X  }
  786. --- 88,100 ----
  787. X  {
  788. X      OsCommPtr    oc;
  789. X  
  790. !     /* now that it's connected, zero the connect time
  791. !        so it doesn't get killed */
  792. X      oc = (OsCommPtr)client->osPrivate;
  793. X      oc->conn_time = 0;
  794. X  
  795. X      *size = 0;
  796. X      *accept = AuthSuccess;
  797. !     *index = 0;            /* we support no authorization protocols */
  798. X      return FSSuccess;
  799. X  }
  800. *** /tmp/da28803    Tue Jul 14 18:08:12 1992
  801. --- mit/fonts/server/os/io.c    Tue Jul 14 18:08:11 1992
  802. ***************
  803. *** 1,7 ****
  804. ! /* $XConsortium: io.c,v 1.5 91/06/21 18:19:12 keith Exp $ */
  805. X  /*
  806. X   * i/o functions
  807. -  *
  808. X   */
  809. X  /*
  810. X   * Copyright 1990, 1991 Network Computing Devices;
  811. --- 1,6 ----
  812. ! /* $XConsortium: io.c,v 1.9 92/05/18 13:50:44 gildea Exp $ */
  813. X  /*
  814. X   * i/o functions
  815. X   */
  816. X  /*
  817. X   * Copyright 1990, 1991 Network Computing Devices;
  818. ***************
  819. *** 24,32 ****
  820. X   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  821. X   * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  822. X   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  823. -  *
  824. -  * @(#)io.c    4.2    5/3/91
  825. -  *
  826. X   */
  827. X  
  828. X  #include    <stdio.h>
  829. --- 23,28 ----
  830. ***************
  831. *** 156,162 ****
  832. X          if (needed > oci->size) {
  833. X          char       *ibuf;
  834. X  
  835. !         ibuf = (char *) fsrealloc(oci, needed);
  836. X          if (!ibuf) {
  837. X              yield_control_death();
  838. X              return -1;
  839. --- 152,158 ----
  840. X          if (needed > oci->size) {
  841. X          char       *ibuf;
  842. X  
  843. !         ibuf = (char *) fsrealloc(oci->buffer, needed);
  844. X          if (!ibuf) {
  845. X              yield_control_death();
  846. X              return -1;
  847. ***************
  848. *** 320,333 ****
  849. X      }
  850. X  }
  851. X  
  852. - static int  padlength[4] = {0, 3, 2, 1};
  853. X  int
  854. ! FlushClient(client, oc, extraBuf, extraCount)
  855. X      ClientPtr   client;
  856. X      OsCommPtr   oc;
  857. X      char       *extraBuf;
  858. X      int         extraCount;
  859. X  {
  860. X      ConnectionOutputPtr oco = oc->output;
  861. X      int         fd = oc->fd;
  862. --- 316,328 ----
  863. X      }
  864. X  }
  865. X  
  866. X  int
  867. ! FlushClient(client, oc, extraBuf, extraCount, padsize)
  868. X      ClientPtr   client;
  869. X      OsCommPtr   oc;
  870. X      char       *extraBuf;
  871. X      int         extraCount;
  872. +     int         padsize;
  873. X  {
  874. X      ConnectionOutputPtr oco = oc->output;
  875. X      int         fd = oc->fd;
  876. ***************
  877. *** 334,340 ****
  878. X      struct iovec iov[3];
  879. X      char        padBuffer[3];
  880. X      long        written;
  881. -     long        padsize;
  882. X      long        notWritten;
  883. X      long        todo;
  884. X  
  885. --- 329,334 ----
  886. ***************
  887. *** 341,347 ****
  888. X      if (!oco)
  889. X      return 0;
  890. X      written = 0;
  891. -     padsize = padlength[extraCount & 3];
  892. X      notWritten = oco->count + extraCount + padsize;
  893. X      todo = notWritten;
  894. X      while (notWritten) {
  895. --- 335,340 ----
  896. ***************
  897. *** 484,503 ****
  898. X          BITSET(OutputPending, oc->fd);
  899. X          NewOutputPending = TRUE;
  900. X          } else {
  901. !         (void) FlushClient(client, oc, (char *) NULL, 0);
  902. X          }
  903. X      }
  904. X      }
  905. X  }
  906. X  
  907. ! WriteToClient(client, count, buf)
  908. X      ClientPtr   client;
  909. X      int         count;
  910. X      char       *buf;
  911. X  {
  912. X      OsCommPtr   oc = (OsCommPtr) client->osPrivate;
  913. X      ConnectionOutputPtr oco = oc->output;
  914. -     int         padBytes;
  915. X  
  916. X      if (!count)
  917. X      return 0;
  918. --- 477,500 ----
  919. X          BITSET(OutputPending, oc->fd);
  920. X          NewOutputPending = TRUE;
  921. X          } else {
  922. !         (void) FlushClient(client, oc, (char *) NULL, 0, 0);
  923. X          }
  924. X      }
  925. X      }
  926. X  }
  927. X  
  928. ! /*
  929. !  * returns number of bytes written
  930. !  */
  931. ! static int
  932. ! write_to_client_internal(client, count, buf, padBytes)
  933. X      ClientPtr   client;
  934. X      int         count;
  935. X      char       *buf;
  936. +     int         padBytes;
  937. X  {
  938. X      OsCommPtr   oc = (OsCommPtr) client->osPrivate;
  939. X      ConnectionOutputPtr oco = oc->output;
  940. X  
  941. X      if (!count)
  942. X      return 0;
  943. ***************
  944. *** 512,523 ****
  945. X      }
  946. X      oc->output = oco;
  947. X      }
  948. -     padBytes = padlength[count & 3];
  949. X      if (oco->count + count + padBytes > oco->size) {
  950. X      BITCLEAR(OutputPending, oc->fd);
  951. X      NewOutputPending = FALSE;
  952. !     return FlushClient(client, oc, buf, count);
  953. X      }
  954. X      NewOutputPending = TRUE;
  955. X      BITSET(OutputPending, oc->fd);
  956. --- 509,518 ----
  957. X      }
  958. X      oc->output = oco;
  959. X      }
  960. X      if (oco->count + count + padBytes > oco->size) {
  961. X      BITCLEAR(OutputPending, oc->fd);
  962. X      NewOutputPending = FALSE;
  963. !     return FlushClient(client, oc, buf, count, padBytes);
  964. X      }
  965. X      NewOutputPending = TRUE;
  966. X      BITSET(OutputPending, oc->fd);
  967. ***************
  968. *** 525,530 ****
  969. --- 520,543 ----
  970. X      oco->count += count + padBytes;
  971. X  
  972. X      return count;
  973. + }
  974. + WriteToClientUnpadded(client, count, buf)
  975. +     ClientPtr   client;
  976. +     int         count;
  977. +     char       *buf;
  978. + {
  979. +     write_to_client_internal(client, count, buf, 0);
  980. + }
  981. + static int  padlength[4] = {0, 3, 2, 1};
  982. + WriteToClient(client, count, buf)
  983. +     ClientPtr   client;
  984. +     int         count;
  985. +     char       *buf;
  986. + {
  987. +      write_to_client_internal(client, count, buf, padlength[count & 3]);
  988. X  }
  989. X  
  990. X  static      ConnectionInputPtr
  991. *** /tmp/da28825    Tue Jul 14 18:08:14 1992
  992. --- mit/fonts/server/os/connection.c    Tue Jul 14 18:08:14 1992
  993. ***************
  994. *** 1,4 ****
  995. ! /* $XConsortium: connection.c,v 1.17 91/09/09 18:56:03 rws Exp $ */
  996. X  /*
  997. X   * handles connections
  998. X   */
  999. --- 1,4 ----
  1000. ! /* $XConsortium: connection.c,v 1.19 92/05/18 13:51:29 gildea Exp $ */
  1001. X  /*
  1002. X   * handles connections
  1003. X   */
  1004. ***************
  1005. *** 23,31 ****
  1006. X   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  1007. X   * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  1008. X   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  1009. -  *
  1010. -  * $NCDId: @(#)connection.c,v 4.10 1991/07/03 17:19:22 lemke Exp $
  1011. -  *
  1012. X   */
  1013. X  
  1014. X  /* sorry, streams support not here yet */
  1015. --- 23,28 ----
  1016. ***************
  1017. *** 471,477 ****
  1018. X      OsCommPtr   oc = (OsCommPtr) client->osPrivate;
  1019. X  
  1020. X      if (oc->output && oc->output->count)
  1021. !     FlushClient(client, oc, (char *) NULL, 0);
  1022. X      ConnectionTranslation[oc->fd] = 0;
  1023. X      close_fd(oc);
  1024. X      client->osPrivate = (pointer) NULL;
  1025. --- 468,474 ----
  1026. X      OsCommPtr   oc = (OsCommPtr) client->osPrivate;
  1027. X  
  1028. X      if (oc->output && oc->output->count)
  1029. !     FlushClient(client, oc, (char *) NULL, 0, 0);
  1030. X      ConnectionTranslation[oc->fd] = 0;
  1031. X      close_fd(oc);
  1032. X      client->osPrivate = (pointer) NULL;
  1033. *** /tmp/da28868    Tue Jul 14 18:08:18 1992
  1034. --- mit/fonts/server/os/utils.c    Tue Jul 14 18:08:18 1992
  1035. ***************
  1036. *** 1,4 ****
  1037. ! /* $XConsortium: utils.c,v 1.7 91/07/25 12:15:52 keith Exp $ */
  1038. X  /*
  1039. X   * misc os utilities
  1040. X   */
  1041. --- 1,4 ----
  1042. ! /* $XConsortium: utils.c,v 1.9 92/01/31 17:45:40 eswu Exp $ */
  1043. X  /*
  1044. X   * misc os utilities
  1045. X   */
  1046. ***************
  1047. *** 32,37 ****
  1048. --- 32,38 ----
  1049. X  #include    <X11/Xos.h>
  1050. X  #include    "misc.h"
  1051. X  #include    "globals.h"
  1052. + #include    <signal.h>
  1053. X  
  1054. X  #ifndef X_NOT_POSIX
  1055. X  #ifdef _POSIX_SOURCE
  1056. ***************
  1057. *** 44,54 ****
  1058. --- 45,57 ----
  1059. X  #endif /* X_NOT_POSIX */
  1060. X  #ifndef PATH_MAX
  1061. X  #include <sys/param.h>
  1062. + #ifndef PATH_MAX
  1063. X  #ifdef MAXPATHLEN
  1064. X  #define PATH_MAX MAXPATHLEN
  1065. X  #else
  1066. X  #define PATH_MAX 1024
  1067. X  #endif
  1068. + #endif
  1069. X  #endif /* PATH_MAX */
  1070. X  
  1071. X  #ifdef SIGNALRETURNSINT
  1072. ***************
  1073. *** 73,78 ****
  1074. --- 76,85 ----
  1075. X  
  1076. X      dispatchException |= DE_RESET;
  1077. X      isItTimeToYield = TRUE;
  1078. + #ifdef SYSV
  1079. +     signal(SIGHUP, AutoResetServer);
  1080. + #endif
  1081. X  }
  1082. X  
  1083. X  SIGVAL
  1084. ***************
  1085. *** 97,102 ****
  1086. --- 104,113 ----
  1087. X  
  1088. X      dispatchException |= DE_RECONFIG;
  1089. X      isItTimeToYield = TRUE;
  1090. + #ifdef SYSV
  1091. +     signal(SIGUSR1, ServerReconfig);
  1092. + #endif
  1093. X  }
  1094. X  
  1095. X  SIGVAL
  1096. ***************
  1097. *** 109,114 ****
  1098. --- 120,129 ----
  1099. X  
  1100. X      dispatchException |= DE_FLUSH;
  1101. X      isItTimeToYield = TRUE;
  1102. + #ifdef SYSV
  1103. +     signal(SIGUSR2, ServerCacheFlush);
  1104. + #endif
  1105. X  }
  1106. X  
  1107. X  long
  1108. ***************
  1109. *** 140,146 ****
  1110. --- 155,165 ----
  1111. X      extern pointer MemoryAllocationBase;
  1112. X  
  1113. X      if (!MemoryAllocationBase)
  1114. + #ifndef AIXV3
  1115. X          MemoryAllocationBase = (pointer) sbrk(0);
  1116. + #else
  1117. +         MemoryAllocationBase = (pointer) 0x20000000;
  1118. + #endif
  1119. X      }
  1120. X  #endif
  1121. X  
  1122. *** /tmp/da28953    Tue Jul 14 18:08:25 1992
  1123. --- mit/fonts/server/os/osdep.h    Tue Jul 14 18:08:25 1992
  1124. ***************
  1125. *** 1,4 ****
  1126. ! /* $XConsortium: osdep.h,v 1.3 91/05/13 16:51:04 gildea Exp $ */
  1127. X  /*
  1128. X   * Copyright 1990, 1991 Network Computing Devices;
  1129. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  1130. --- 1,4 ----
  1131. ! /* $XConsortium: osdep.h,v 1.4 92/01/31 17:45:07 eswu Exp $ */
  1132. X  /*
  1133. X   * Copyright 1990, 1991 Network Computing Devices;
  1134. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  1135. ***************
  1136. *** 131,141 ****
  1137. X  #define MASKANDSETBITS(dst, b1, b2)  \
  1138. X                { int cri;            \
  1139. X              for (cri=0; cri<mskcnt; cri++)    \
  1140. !                   dst[cri] = (b1[cri] & b2[cri]) }
  1141. X  #define ORBITS(dst, b1, b2)  \
  1142. X                { int cri;            \
  1143. X                for (cri=0; cri<mskcnt; cri++)    \
  1144. !                   dst[cri] = (b1[cri] | b2[cri]) }
  1145. X  #define UNSETBITS(dst, b1) \
  1146. X                { int cri;            \
  1147. X                for (cri=0; cri<mskcnt; cri++)    \
  1148. --- 131,141 ----
  1149. X  #define MASKANDSETBITS(dst, b1, b2)  \
  1150. X                { int cri;            \
  1151. X              for (cri=0; cri<mskcnt; cri++)    \
  1152. !                   dst[cri] = (b1[cri] & b2[cri]); }
  1153. X  #define ORBITS(dst, b1, b2)  \
  1154. X                { int cri;            \
  1155. X                for (cri=0; cri<mskcnt; cri++)    \
  1156. !                   dst[cri] = (b1[cri] | b2[cri]); }
  1157. X  #define UNSETBITS(dst, b1) \
  1158. X                { int cri;            \
  1159. X                for (cri=0; cri<mskcnt; cri++)    \
  1160. *** /tmp/da29017    Tue Jul 14 18:08:31 1992
  1161. --- mit/fonts/server/os/error.c    Tue Jul 14 18:08:31 1992
  1162. ***************
  1163. *** 1,4 ****
  1164. ! /* $XConsortium: error.c,v 1.3 91/08/16 16:20:23 rws Exp $ */
  1165. X  /*
  1166. X   * error message handling
  1167. X   */
  1168. --- 1,4 ----
  1169. ! /* $XConsortium: error.c,v 1.4 91/12/09 16:49:23 converse Exp $ */
  1170. X  /*
  1171. X   * error message handling
  1172. X   */
  1173. ***************
  1174. *** 41,50 ****
  1175. --- 41,52 ----
  1176. X  #endif
  1177. X  #ifndef PATH_MAX
  1178. X  #include <sys/param.h>
  1179. + #ifndef PATH_MAX
  1180. X  #ifdef MAXPATHLEN
  1181. X  #define PATH_MAX MAXPATHLEN
  1182. X  #else
  1183. X  #define PATH_MAX 1024
  1184. + #endif
  1185. X  #endif
  1186. X  #endif
  1187. X  
  1188. *** /tmp/da29043    Tue Jul 14 18:08:34 1992
  1189. --- mit/fonts/server/difs/fontinfo.c    Tue Jul 14 18:08:33 1992
  1190. ***************
  1191. *** 1,4 ****
  1192. ! /* $XConsortium: fontinfo.c,v 1.7 91/07/25 12:24:51 keith Exp $ */
  1193. X  /*
  1194. X   * font data query
  1195. X   */
  1196. --- 1,4 ----
  1197. ! /* $XConsortium: fontinfo.c,v 1.8 92/05/12 18:08:08 gildea Exp $ */
  1198. X  /*
  1199. X   * font data query
  1200. X   */
  1201. ***************
  1202. *** 23,31 ****
  1203. X   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  1204. X   * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  1205. X   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  1206. -  *
  1207. -  * @(#)fontinfo.c    4.1    5/2/91
  1208. -  *
  1209. X   */
  1210. X  
  1211. X  #include        "FS.h"
  1212. --- 23,28 ----
  1213. ***************
  1214. *** 132,138 ****
  1215. X  
  1216. X  
  1217. X  int
  1218. ! LoadFontHeader(pinfo, hdr, pi)
  1219. X      FontInfoPtr pinfo;
  1220. X      fsFontHeader *hdr;
  1221. X      fsPropInfo **pi;
  1222. --- 129,136 ----
  1223. X  
  1224. X  
  1225. X  int
  1226. ! LoadXFontInfo(client, pinfo, hdr, pi)
  1227. !     ClientPtr client;        /* for client version info */
  1228. X      FontInfoPtr pinfo;
  1229. X      fsFontHeader *hdr;
  1230. X      fsPropInfo **pi;
  1231. ***************
  1232. *** 147,158 ****
  1233. X  
  1234. X      if (pinfo->inkInside)
  1235. X      hdr->flags |= FontInfoInkInside;
  1236. !     hdr->char_range.min_char.low = pinfo->firstCol;
  1237. !     hdr->char_range.min_char.high = pinfo->firstRow;
  1238. !     hdr->char_range.max_char.low = pinfo->lastCol;
  1239. !     hdr->char_range.max_char.high = pinfo->lastRow;
  1240. !     hdr->default_char.low = pinfo->defaultCh & 0xff;
  1241. !     hdr->default_char.high = pinfo->defaultCh >> 8;
  1242. X  
  1243. X      CopyCharInfo(&pinfo->ink_minbounds, &hdr->min_bounds);
  1244. X      CopyCharInfo(&pinfo->ink_maxbounds, &hdr->max_bounds);
  1245. --- 145,165 ----
  1246. X  
  1247. X      if (pinfo->inkInside)
  1248. X      hdr->flags |= FontInfoInkInside;
  1249. !     if (client->major_version > 1) {
  1250. !     hdr->char_range.min_char.low = pinfo->firstCol;
  1251. !     hdr->char_range.min_char.high = pinfo->firstRow;
  1252. !     hdr->char_range.max_char.low = pinfo->lastCol;
  1253. !     hdr->char_range.max_char.high = pinfo->lastRow;
  1254. !     hdr->default_char.low = pinfo->defaultCh & 0xff;
  1255. !     hdr->default_char.high = pinfo->defaultCh >> 8;
  1256. !     } else {
  1257. !     hdr->char_range.min_char.high = pinfo->firstCol;
  1258. !     hdr->char_range.min_char.low = pinfo->firstRow;
  1259. !     hdr->char_range.max_char.high = pinfo->lastCol;
  1260. !     hdr->char_range.max_char.low = pinfo->lastRow;
  1261. !     hdr->default_char.high = pinfo->defaultCh & 0xff;
  1262. !     hdr->default_char.low = pinfo->defaultCh >> 8;
  1263. !     }
  1264. X  
  1265. X      CopyCharInfo(&pinfo->ink_minbounds, &hdr->min_bounds);
  1266. X      CopyCharInfo(&pinfo->ink_maxbounds, &hdr->max_bounds);
  1267. ***************
  1268. *** 233,238 ****
  1269. --- 240,265 ----
  1270. X      }
  1271. X  }
  1272. X  
  1273. + /*
  1274. +  * provide backward compatibility with version 1, which had
  1275. +  * the bytes of char2b backwards
  1276. +  */
  1277. + static void
  1278. + swap_char2b (values, number)
  1279. +     fsChar2b *values;
  1280. +     int number;
  1281. + {
  1282. +     fsChar2b temp;
  1283. +     int i;
  1284. +     for (i = 0; i < number; i++) {
  1285. +     temp.low = ((fsChar2b_version1 *)values)->low;
  1286. +     temp.high = ((fsChar2b_version1 *)values)->high;
  1287. +     *values++ = temp;
  1288. +     }
  1289. + }
  1290. X  static Bool
  1291. X  do_query_extents(client, c)
  1292. X      ClientPtr   client;
  1293. ***************
  1294. *** 244,250 ****
  1295. X      fsCharInfo *extents;
  1296. X      fsQueryXExtents8Reply reply;
  1297. X  
  1298. !     err = (*c->pfont->get_extents) ((pointer) c->client, c->pfont,
  1299. X               c->flags, c->nranges, c->range, &num_extents, &extents);
  1300. X      if (err == Suspended) {
  1301. X      if (!c->slept) {
  1302. --- 271,277 ----
  1303. X      fsCharInfo *extents;
  1304. X      fsQueryXExtents8Reply reply;
  1305. X  
  1306. !     err = GetExtents (c->client, c->pfont,
  1307. X               c->flags, c->nranges, c->range, &num_extents, &extents);
  1308. X      if (err == Suspended) {
  1309. X      if (!c->slept) {
  1310. ***************
  1311. *** 288,293 ****
  1312. --- 315,323 ----
  1313. X      fsRange    *fixed_range;
  1314. X      Bool        all_glyphs = FALSE;
  1315. X  
  1316. +     if (item_size == 2  &&  client->major_version == 1)
  1317. +     swap_char2b (range_data, nranges);
  1318. X      fixed_range = build_range(range_flag, range_data, item_size,
  1319. X                    &nranges, &all_glyphs);
  1320. X  
  1321. ***************
  1322. *** 322,328 ****
  1323. X      fsQueryXBitmaps8Reply reply;
  1324. X      int        freedata;
  1325. X  
  1326. !     err = (*c->pfont->get_bitmaps) ((pointer) c->client, c->pfont, c->format,
  1327. X                      c->flags, c->nranges, c->range,
  1328. X                   &data_size, &num_glyphs, &offsets, &glyph_data, &freedata);
  1329. X  
  1330. --- 352,358 ----
  1331. X      fsQueryXBitmaps8Reply reply;
  1332. X      int        freedata;
  1333. X  
  1334. !     err = GetBitmaps (c->client, c->pfont, c->format,
  1335. X                      c->flags, c->nranges, c->range,
  1336. X                   &data_size, &num_glyphs, &offsets, &glyph_data, &freedata);
  1337. X  
  1338. ***************
  1339. *** 375,380 ****
  1340. --- 405,413 ----
  1341. X      QBclosurePtr c;
  1342. X      fsRange    *fixed_range;
  1343. X      Bool        all_glyphs = FALSE;
  1344. +     if (item_size == 2  &&  client->major_version == 1)
  1345. +     swap_char2b (range_data, nranges);
  1346. X  
  1347. X      fixed_range = build_range(range_flag, range_data, item_size,
  1348. X                    &nranges, &all_glyphs);
  1349. *** /tmp/da29128    Tue Jul 14 18:08:42 1992
  1350. --- mit/fonts/server/difs/dispatch.c    Tue Jul 14 18:08:41 1992
  1351. ***************
  1352. *** 1,4 ****
  1353. ! /* $XConsortium: dispatch.c,v 1.7 91/07/27 02:29:05 keith Exp $ */
  1354. X  /*
  1355. X   * protocol dispatcher
  1356. X   */
  1357. --- 1,4 ----
  1358. ! /* $XConsortium: dispatch.c,v 1.15 92/06/02 14:15:53 gildea Exp $ */
  1359. X  /*
  1360. X   * protocol dispatcher
  1361. X   */
  1362. ***************
  1363. *** 7,31 ****
  1364. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  1365. X   * Massachusetts Institute of Technology
  1366. X   *
  1367. !  * Permission to use, copy, modify, and distribute this protoype software
  1368. !  * and its documentation to Members and Affiliates of the MIT X Consortium
  1369. !  * any purpose and without fee is hereby granted, provided
  1370. X   * that the above copyright notice appear in all copies and that both that
  1371. X   * copyright notice and this permission notice appear in supporting
  1372. X   * documentation, and that the names of Network Computing Devices, Digital or
  1373. !  * MIT not be used in advertising or publicity pertaining to distribution of
  1374. !  * the software without specific, written prior permission.
  1375. X   *
  1376. !  * NETWORK COMPUTING DEVICES, DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH
  1377. !  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  1378. !  * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT BE
  1379. !  * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  1380. !  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  1381. !  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  1382. !  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  1383. !  *
  1384. !  * $NCDId: @(#)dispatch.c,v 4.11 1991/07/09 14:09:07 lemke Exp $
  1385. !  *
  1386. X   */
  1387. X  
  1388. X  #include    "FS.h"
  1389. --- 7,28 ----
  1390. X   * Portions Copyright 1987 by Digital Equipment Corporation and the
  1391. X   * Massachusetts Institute of Technology
  1392. X   *
  1393. !  * Permission to use, copy, modify, distribute, and sell this software and
  1394. !  * its documentation for any purpose is hereby granted without fee, provided
  1395. X   * that the above copyright notice appear in all copies and that both that
  1396. X   * copyright notice and this permission notice appear in supporting
  1397. X   * documentation, and that the names of Network Computing Devices, Digital or
  1398. !  * M.I.T. not be used in advertising or publicity pertaining to distribution
  1399. !  * of the software without specific, written prior permission.
  1400. X   *
  1401. !  * NETWORK COMPUTING DEVICES, DIGITAL AND M.I.T. DISCLAIM ALL WARRANTIES WITH
  1402. !  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  1403. !  * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES,
  1404. !  * DIGITAL OR M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
  1405. !  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  1406. !  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  1407. !  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
  1408. !  * THIS SOFTWARE.
  1409. X   */
  1410. X  
  1411. X  #include    "FS.h"
  1412. ***************
  1413. *** 138,143 ****
  1414. --- 135,141 ----
  1415. X          NoticeF("Re-reading config file\n");
  1416. X          if (ReadConfigFile(configfilename) != FSSuccess)
  1417. X              ErrorF("couldn't parse config file");
  1418. +         SetConfigValues();
  1419. X          dispatchException &= ~DE_RECONFIG;
  1420. X          }
  1421. X          /* flush all the caches */
  1422. ***************
  1423. *** 146,156 ****
  1424. X          CacheReset();
  1425. X          dispatchException &= ~DE_FLUSH;
  1426. X          }
  1427. !         /* reset when no clients left */
  1428. !         if ((dispatchException & DE_RESET) && (nClients == 0)) {
  1429. !         NoticeF("reseting\n");
  1430. X          break;
  1431. X          }
  1432. X          /* die *now* */
  1433. X          if (dispatchException & DE_TERMINATE) {
  1434. --- 144,153 ----
  1435. X          CacheReset();
  1436. X          dispatchException &= ~DE_FLUSH;
  1437. X          }
  1438. !         /* reset */
  1439. !         if (dispatchException & DE_RESET) {
  1440. !         NoticeF("resetting\n");
  1441. X          break;
  1442. X          }
  1443. X          /* die *now* */
  1444. X          if (dispatchException & DE_TERMINATE) {
  1445. ***************
  1446. *** 176,188 ****
  1447. X      nClients++;
  1448. X      prefix = (fsConnClientPrefix *) ((char *) stuff + sz_fsReq);
  1449. X      if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B'))
  1450. !     return (client->noClientException = -1);
  1451. X      if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) ||
  1452. X          (!(*(char *) &whichbyte) && (prefix->byteOrder == 'l'))) {
  1453. X      client->swapped = TRUE;
  1454. X      SwapConnClientPrefix(prefix);
  1455. X      }
  1456. X      stuff->reqType = 2;
  1457. X      if (client->swapped) {
  1458. X      swaps(&stuff->length, whichbyte);
  1459. X      }
  1460. --- 173,188 ----
  1461. X      nClients++;
  1462. X      prefix = (fsConnClientPrefix *) ((char *) stuff + sz_fsReq);
  1463. X      if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B'))
  1464. !     return (client->noClientException = -2);
  1465. X      if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) ||
  1466. X          (!(*(char *) &whichbyte) && (prefix->byteOrder == 'l'))) {
  1467. X      client->swapped = TRUE;
  1468. X      SwapConnClientPrefix(prefix);
  1469. X      }
  1470. +     client->major_version = prefix->major_version;
  1471. +     client->minor_version = prefix->minor_version;
  1472. X      stuff->reqType = 2;
  1473. +     stuff->length += prefix->auth_len;
  1474. X      if (client->swapped) {
  1475. X      swaps(&stuff->length, whichbyte);
  1476. X      }
  1477. ***************
  1478. *** 221,227 ****
  1479. X  /* XXXX -- this needs work for multiple auth replies */
  1480. X  
  1481. X      /* build up a list of the stuff */
  1482. !     for (i = 0, ad = auth_data; i < prefix->num_auths; i++) {
  1483. X      client_auth[i].namelen = *(short *) ad;
  1484. X      ad += 2;
  1485. X      client_auth[i].datalen = *(short *) ad;
  1486. --- 221,227 ----
  1487. X  /* XXXX -- this needs work for multiple auth replies */
  1488. X  
  1489. X      /* build up a list of the stuff */
  1490. !     for (i = 0, ad = auth_data; i < (int)prefix->num_auths; i++) {
  1491. X      client_auth[i].namelen = *(short *) ad;
  1492. X      ad += 2;
  1493. X      client_auth[i].datalen = *(short *) ad;
  1494. ***************
  1495. *** 248,254 ****
  1496. X      return FSBadAlloc;
  1497. X      }
  1498. X      csp.status = auth_accept;
  1499. !     csp.major_version = FS_PROTOCOL;
  1500. X      csp.minor_version = FS_PROTOCOL_MINOR;
  1501. X      csp.num_alternates = num_alts;
  1502. X      csp.alternate_len = altlen;
  1503. --- 248,258 ----
  1504. X      return FSBadAlloc;
  1505. X      }
  1506. X      csp.status = auth_accept;
  1507. !     if (client->major_version == 1)
  1508. !     /* we implement backwards compatibility for version 1.0 */
  1509. !     csp.major_version = client->major_version;
  1510. !     else
  1511. !     csp.major_version = FS_PROTOCOL;
  1512. X      csp.minor_version = FS_PROTOCOL_MINOR;
  1513. X      csp.num_alternates = num_alts;
  1514. X      csp.alternate_len = altlen;
  1515. ***************
  1516. *** 271,281 ****
  1517. X      (void) WriteToClient(client, altservers[i].namelen + 2, tmp);
  1518. X      }
  1519. X  
  1520. !     (void) WriteToClient(client, auth_len, (char *) server_auth_data);
  1521. X  
  1522. X      if (auth_accept != AuthSuccess) {
  1523. X      nClients--;
  1524. !     return (client->noClientException = -1);
  1525. X      }
  1526. X      client->requestVector = client->swapped ? SwappedProcVector : ProcVector;
  1527. X      client->sequence = 0;
  1528. --- 275,286 ----
  1529. X      (void) WriteToClient(client, altservers[i].namelen + 2, tmp);
  1530. X      }
  1531. X  
  1532. !     if (auth_len)
  1533. !     (void) WriteToClient(client, auth_len, (char *) server_auth_data);
  1534. X  
  1535. X      if (auth_accept != AuthSuccess) {
  1536. X      nClients--;
  1537. !     return (client->noClientException = -2);
  1538. X      }
  1539. X      client->requestVector = client->swapped ? SwappedProcVector : ProcVector;
  1540. X      client->sequence = 0;
  1541. ***************
  1542. *** 311,316 ****
  1543. --- 316,322 ----
  1544. X      case FSBadFont:
  1545. X      case FSBadAccessContext:
  1546. X      case FSBadIDChoice:
  1547. +     case FSBadEventMask:
  1548. X      if (client->swapped)
  1549. X          SwapLongs((long *) data, 1);
  1550. X      extralen = sizeof(Font);
  1551. ***************
  1552. *** 496,502 ****
  1553. X          }
  1554. X      }
  1555. X      /* build up a list of the stuff */
  1556. !     for (i = 0, ad = (pointer) &stuff[1]; i < stuff->num_auths; i++) {
  1557. X      acp[i].namelen = *(short *) ad;
  1558. X      ad += 2;
  1559. X      acp[i].datalen = *(short *) ad;
  1560. --- 502,508 ----
  1561. X          }
  1562. X      }
  1563. X      /* build up a list of the stuff */
  1564. !     for (i = 0, ad = (pointer) &stuff[1]; i < (int)stuff->num_auths; i++) {
  1565. X      acp[i].namelen = *(short *) ad;
  1566. X      ad += 2;
  1567. X      acp[i].datalen = *(short *) ad;
  1568. SHAR_EOF
  1569. true || echo 'restore of fix-13 failed'
  1570. fi
  1571. echo 'End of  part 3'
  1572. echo 'File fix-13 is continued in part 4'
  1573. echo 4 > _shar_seq_.tmp
  1574. exit 0
  1575. -- 
  1576. ---
  1577. Senior Systems Scientist        mail: dcmartin@msi.com
  1578. Molecular Simulations, Inc.        uucp: uunet!dcmartin
  1579. 796 North Pastoria Avenue        at&t: 408/522-9236
  1580.