From 72321c2675a95767303f4b478c9e39e4c2176e20 Mon Sep 17 00:00:00 2001 From: dawes Date: Thu, 23 Aug 2001 21:35:13 +0000 Subject: Remove client-side libraries not needed for the DRI components. --- xc/lib/FS/FSClServ.c | 86 - xc/lib/FS/FSCloseFt.c | 63 - xc/lib/FS/FSConnServ.c | 269 -- xc/lib/FS/FSErrDis.c | 114 - xc/lib/FS/FSErrHndlr.c | 77 - xc/lib/FS/FSFlush.c | 56 - xc/lib/FS/FSFontInfo.c | 323 -- xc/lib/FS/FSFtNames.c | 119 - xc/lib/FS/FSGetCats.c | 102 - xc/lib/FS/FSListCats.c | 120 - xc/lib/FS/FSListExt.c | 112 - xc/lib/FS/FSMisc.c | 57 - xc/lib/FS/FSNextEv.c | 72 - xc/lib/FS/FSOpenFont.c | 85 - xc/lib/FS/FSOpenServ.c | 272 -- xc/lib/FS/FSQGlyphs.c | 182 - xc/lib/FS/FSQXExt.c | 159 - xc/lib/FS/FSQXInfo.c | 118 - xc/lib/FS/FSQuExt.c | 75 - xc/lib/FS/FSServName.c | 70 - xc/lib/FS/FSSetCats.c | 87 - xc/lib/FS/FSSync.c | 74 - xc/lib/FS/FSSynchro.c | 84 - xc/lib/FS/FSlib.h | 315 -- xc/lib/FS/FSlibInt.c | 1347 ------- xc/lib/FS/FSlibint.h | 401 --- xc/lib/FS/FSlibos.h | 326 -- xc/lib/FS/Imakefile | 48 - xc/lib/ICE/ICE-def.cpp | 64 - xc/lib/ICE/ICE.h | 98 - xc/lib/ICE/ICEconn.h | 245 -- xc/lib/ICE/ICElib.h | 534 --- xc/lib/ICE/ICElibint.h | 584 --- xc/lib/ICE/ICEmsg.h | 298 -- xc/lib/ICE/ICEos2.def | 134 - xc/lib/ICE/ICEos2.rsp | 6 - xc/lib/ICE/ICEproto.h | 170 - xc/lib/ICE/ICEutil.h | 133 - xc/lib/ICE/Imakefile | 92 - xc/lib/ICE/accept.c | 181 - xc/lib/ICE/authutil.c | 542 --- xc/lib/ICE/connect.c | 555 --- xc/lib/ICE/error.c | 638 ---- xc/lib/ICE/getauth.c | 266 -- xc/lib/ICE/globals.h | 63 - xc/lib/ICE/iceauth.c | 276 -- xc/lib/ICE/listen.c | 276 -- xc/lib/ICE/listenwk.c | 154 - xc/lib/ICE/locking.c | 60 - xc/lib/ICE/misc.c | 619 ---- xc/lib/ICE/ping.c | 59 - xc/lib/ICE/process.c | 2509 ------------- xc/lib/ICE/protosetup.c | 285 -- xc/lib/ICE/register.c | 249 -- xc/lib/ICE/replywait.c | 154 - xc/lib/ICE/setauth.c | 114 - xc/lib/ICE/shutdown.c | 321 -- xc/lib/ICE/watch.c | 199 -- xc/lib/Imakefile | 2 +- xc/lib/PEX5/Imakefile | 87 - xc/lib/PEX5/PEX.h | 1222 ------- xc/lib/PEX5/PEX5-def.cpp | 283 -- xc/lib/PEX5/PEX5os2.def | 429 --- xc/lib/PEX5/PEX5os2.rsp | 6 - xc/lib/PEX5/PEXlib.h | 4426 ----------------------- xc/lib/PEX5/PEXlibint.h | 1052 ------ xc/lib/PEX5/PEXproto.h | 2241 ------------ xc/lib/PEX5/PEXprotost.h | 678 ---- xc/lib/PEX5/jump_funcs | 417 --- xc/lib/PEX5/jump_ignore | 3 - xc/lib/PEX5/jump_vars | 10 - xc/lib/PEX5/pl_convert.c | 234 -- xc/lib/PEX5/pl_convert.h | 345 -- xc/lib/PEX5/pl_escape.c | 195 - xc/lib/PEX5/pl_extract.h | 1160 ------ xc/lib/PEX5/pl_font.c | 671 ---- xc/lib/PEX5/pl_free.c | 551 --- xc/lib/PEX5/pl_global.h | 422 --- xc/lib/PEX5/pl_lut.c | 1588 --------- xc/lib/PEX5/pl_lut.h | 56 - xc/lib/PEX5/pl_nameset.c | 298 -- xc/lib/PEX5/pl_oc_attr.c | 1979 ----------- xc/lib/PEX5/pl_oc_dec.c | 1925 ---------- xc/lib/PEX5/pl_oc_enc.c | 2138 ----------- xc/lib/PEX5/pl_oc_prim.c | 2448 ------------- xc/lib/PEX5/pl_oc_str.c | 199 -- xc/lib/PEX5/pl_oc_util.c | 2961 ---------------- xc/lib/PEX5/pl_oc_util.h | 838 ----- xc/lib/PEX5/pl_pc.c | 1218 ------- xc/lib/PEX5/pl_pick.c | 1213 ------- xc/lib/PEX5/pl_rdr.c | 1114 ------ xc/lib/PEX5/pl_sc.c | 596 ---- xc/lib/PEX5/pl_startup.c | 961 ----- xc/lib/PEX5/pl_store.h | 975 ----- xc/lib/PEX5/pl_struct.c | 1312 ------- xc/lib/PEX5/pl_util.c | 3279 ----------------- xc/lib/PEX5/pl_util.h | 110 - xc/lib/PEX5/pl_wks.c | 1574 --------- xc/lib/PEX5/pl_xdata.h | 244 -- xc/lib/SM/Imakefile | 52 - xc/lib/SM/SM-def.cpp | 41 - xc/lib/SM/SM.h | 126 - xc/lib/SM/SMlib.h | 655 ---- xc/lib/SM/SMlibint.h | 516 --- xc/lib/SM/SMos2.def | 63 - xc/lib/SM/SMos2.rsp | 4 - xc/lib/SM/SMproto.h | 202 -- xc/lib/SM/globals.h | 64 - xc/lib/SM/sm_auth.c | 36 - xc/lib/SM/sm_client.c | 624 ---- xc/lib/SM/sm_error.c | 333 -- xc/lib/SM/sm_genid.c | 179 - xc/lib/SM/sm_manager.c | 366 -- xc/lib/SM/sm_misc.c | 210 -- xc/lib/SM/sm_process.c | 871 ----- xc/lib/XIE/Imakefile | 74 - xc/lib/XIE/XIE-def.cpp | 113 - xc/lib/XIE/XIElib.h | 1910 ---------- xc/lib/XIE/XIElibint.h | 313 -- xc/lib/XIE/XIEos2.def | 207 -- xc/lib/XIE/XIEos2.rsp | 5 - xc/lib/XIE/abort.c | 54 - xc/lib/XIE/await.c | 54 - xc/lib/XIE/clientdata.c | 128 - xc/lib/XIE/colorlist.c | 154 - xc/lib/XIE/conven.c | 1447 -------- xc/lib/XIE/elements.c | 1191 ------- xc/lib/XIE/elements.h | 102 - xc/lib/XIE/errors.c | 133 - xc/lib/XIE/events.c | 160 - xc/lib/XIE/free.c | 117 - xc/lib/XIE/globals.h | 120 - xc/lib/XIE/ieee.c | 192 - xc/lib/XIE/init.c | 452 --- xc/lib/XIE/init.h | 39 - xc/lib/XIE/jump_funcs | 197 -- xc/lib/XIE/jump_ignore | 3 - xc/lib/XIE/jump_vars | 6 - xc/lib/XIE/lut.c | 77 - xc/lib/XIE/photoflo.c | 301 -- xc/lib/XIE/photomap.c | 134 - xc/lib/XIE/photospace.c | 120 - xc/lib/XIE/roi.c | 77 - xc/lib/XIE/technique.c | 1329 ------- xc/lib/XIE/technique.h | 81 - xc/lib/XIE/utils.c | 105 - xc/lib/Xaw/Actions.c | 1130 ------ xc/lib/Xaw/AllWidgets.c | 117 - xc/lib/Xaw/AllWidgets.h | 32 - xc/lib/Xaw/AsciiSink.c | 1908 ---------- xc/lib/Xaw/AsciiSink.h | 78 - xc/lib/Xaw/AsciiSinkP.h | 97 - xc/lib/Xaw/AsciiSrc.c | 1869 ---------- xc/lib/Xaw/AsciiSrc.h | 171 - xc/lib/Xaw/AsciiSrcP.h | 141 - xc/lib/Xaw/AsciiText.c | 353 -- xc/lib/Xaw/AsciiText.h | 124 - xc/lib/Xaw/AsciiTextP.h | 165 - xc/lib/Xaw/Box.c | 668 ---- xc/lib/Xaw/Box.h | 104 - xc/lib/Xaw/BoxP.h | 99 - xc/lib/Xaw/CHANGES | 153 - xc/lib/Xaw/Cardinals.h | 39 - xc/lib/Xaw/Changelog | 1370 ------- xc/lib/Xaw/Command.c | 622 ---- xc/lib/Xaw/Command.h | 115 - xc/lib/Xaw/CommandP.h | 113 - xc/lib/Xaw/Converters.c | 698 ---- xc/lib/Xaw/Dialog.c | 451 --- xc/lib/Xaw/Dialog.h | 97 - xc/lib/Xaw/DialogP.h | 100 - xc/lib/Xaw/DisplayList.c | 2250 ------------ xc/lib/Xaw/Form.c | 1118 ------ xc/lib/Xaw/Form.h | 167 - xc/lib/Xaw/FormP.h | 132 - xc/lib/Xaw/Grip.c | 181 - xc/lib/Xaw/Grip.h | 95 - xc/lib/Xaw/GripP.h | 87 - xc/lib/Xaw/Imakefile | 200 -- xc/lib/Xaw/Label.c | 813 ----- xc/lib/Xaw/Label.h | 131 - xc/lib/Xaw/LabelP.h | 117 - xc/lib/Xaw/List.c | 1238 ------- xc/lib/Xaw/List.h | 232 -- xc/lib/Xaw/ListP.h | 110 - xc/lib/Xaw/MenuButtoP.h | 76 - xc/lib/Xaw/MenuButton.c | 225 -- xc/lib/Xaw/MenuButton.h | 87 - xc/lib/Xaw/MultiSink.c | 969 ----- xc/lib/Xaw/MultiSink.h | 109 - xc/lib/Xaw/MultiSinkP.h | 137 - xc/lib/Xaw/MultiSrc.c | 1604 --------- xc/lib/Xaw/MultiSrc.h | 129 - xc/lib/Xaw/MultiSrcP.h | 178 - xc/lib/Xaw/OS.c | 60 - xc/lib/Xaw/Paned.c | 2058 ----------- xc/lib/Xaw/Paned.h | 260 -- xc/lib/Xaw/PanedP.h | 176 - xc/lib/Xaw/Panner.c | 1077 ------ xc/lib/Xaw/Panner.h | 102 - xc/lib/Xaw/PannerP.h | 104 - xc/lib/Xaw/Pixmap.c | 931 ----- xc/lib/Xaw/Porthole.c | 371 -- xc/lib/Xaw/Porthole.h | 58 - xc/lib/Xaw/PortholeP.h | 60 - xc/lib/Xaw/Private.h | 154 - xc/lib/Xaw/Repeater.c | 293 -- xc/lib/Xaw/Repeater.h | 71 - xc/lib/Xaw/RepeaterP.h | 80 - xc/lib/Xaw/Reports.h | 50 - xc/lib/Xaw/Scrollbar.c | 873 ----- xc/lib/Xaw/Scrollbar.h | 133 - xc/lib/Xaw/ScrollbarP.h | 105 - xc/lib/Xaw/Simple.c | 458 --- xc/lib/Xaw/Simple.h | 112 - xc/lib/Xaw/SimpleMenP.h | 97 - xc/lib/Xaw/SimpleMenu.c | 1815 ---------- xc/lib/Xaw/SimpleMenu.h | 169 - xc/lib/Xaw/SimpleP.h | 91 - xc/lib/Xaw/Sme.c | 265 -- xc/lib/Xaw/Sme.h | 68 - xc/lib/Xaw/SmeBSB.c | 765 ---- xc/lib/Xaw/SmeBSB.h | 94 - xc/lib/Xaw/SmeBSBP.h | 90 - xc/lib/Xaw/SmeLine.c | 260 -- xc/lib/Xaw/SmeLine.h | 67 - xc/lib/Xaw/SmeLineP.h | 71 - xc/lib/Xaw/SmeP.h | 80 - xc/lib/Xaw/StripCharP.h | 106 - xc/lib/Xaw/StripChart.c | 572 --- xc/lib/Xaw/StripChart.h | 107 - xc/lib/Xaw/Template.c | 191 - xc/lib/Xaw/Template.h | 58 - xc/lib/Xaw/TemplateP.h | 60 - xc/lib/Xaw/Text.c | 4116 --------------------- xc/lib/Xaw/Text.h | 369 -- xc/lib/Xaw/TextAction.c | 4301 ---------------------- xc/lib/Xaw/TextP.h | 304 -- xc/lib/Xaw/TextPop.c | 1526 -------- xc/lib/Xaw/TextSink.c | 1795 ---------- xc/lib/Xaw/TextSink.h | 360 -- xc/lib/Xaw/TextSinkP.h | 302 -- xc/lib/Xaw/TextSrc.c | 1963 ---------- xc/lib/Xaw/TextSrc.h | 276 -- xc/lib/Xaw/TextSrcP.h | 253 -- xc/lib/Xaw/TextTr.c | 155 - xc/lib/Xaw/Tip.c | 629 ---- xc/lib/Xaw/Tip.h | 120 - xc/lib/Xaw/TipP.h | 77 - xc/lib/Xaw/Toggle.c | 624 ---- xc/lib/Xaw/Toggle.h | 177 - xc/lib/Xaw/ToggleP.h | 91 - xc/lib/Xaw/Tree.c | 1010 ------ xc/lib/Xaw/Tree.h | 134 - xc/lib/Xaw/TreeP.h | 137 - xc/lib/Xaw/Vendor.c | 499 --- xc/lib/Xaw/VendorEP.h | 80 - xc/lib/Xaw/Viewport.c | 1093 ------ xc/lib/Xaw/Viewport.h | 117 - xc/lib/Xaw/ViewportP.h | 105 - xc/lib/Xaw/Xaw-def.cpp | 134 - xc/lib/Xaw/Xaw.man | 555 --- xc/lib/Xaw/XawI18n.c | 97 - xc/lib/Xaw/XawI18n.h | 115 - xc/lib/Xaw/XawIm.c | 1611 --------- xc/lib/Xaw/XawImP.h | 209 -- xc/lib/Xaw/XawInit.c | 51 - xc/lib/Xaw/XawInit.h | 45 - xc/lib/Xaw/Xawos2.def | 193 - xc/lib/Xaw/Xawos2.rsp | 9 - xc/lib/Xaw/genlist.sh | 41 - xc/lib/Xaw/jump_funcs | 113 - xc/lib/Xaw/jump_ignore | 3 - xc/lib/Xaw/jump_vars | 79 - xc/lib/Xaw/sharedlib.c | 167 - xc/lib/Xaw6/Imakefile | 170 - xc/lib/Xaw6/Xaw6os2.def | 205 -- xc/lib/Xaw6/Xaw6os2.rsp | 10 - xc/lib/Xfontcache/FontCache.c | 213 -- xc/lib/Xfontcache/Imakefile | 33 - xc/lib/Xft/Imakefile | 80 - xc/lib/Xft/Xft-def.cpp | 146 - xc/lib/Xft/Xft.h | 524 --- xc/lib/Xft/Xft.man | 181 - xc/lib/Xft/XftConfig.cpp | 36 - xc/lib/Xft/XftFreetype.h | 164 - xc/lib/Xft/xftcache.c | 608 ---- xc/lib/Xft/xftcfg.c | 665 ---- xc/lib/Xft/xftcolor.c | 125 - xc/lib/Xft/xftcore.c | 247 -- xc/lib/Xft/xftdbg.c | 221 -- xc/lib/Xft/xftdir.c | 78 - xc/lib/Xft/xftdpy.c | 425 --- xc/lib/Xft/xftdraw.c | 482 --- xc/lib/Xft/xftextent.c | 190 - xc/lib/Xft/xftfont.c | 327 -- xc/lib/Xft/xftfreetype.c | 678 ---- xc/lib/Xft/xftfs.c | 74 - xc/lib/Xft/xftglyphs.c | 495 --- xc/lib/Xft/xftgram.y | 452 --- xc/lib/Xft/xftinit.c | 48 - xc/lib/Xft/xftint.h | 488 --- xc/lib/Xft/xftlex.l | 275 -- xc/lib/Xft/xftlist.c | 328 -- xc/lib/Xft/xftmatch.c | 330 -- xc/lib/Xft/xftmatrix.c | 104 - xc/lib/Xft/xftname.c | 391 -- xc/lib/Xft/xftpat.c | 411 --- xc/lib/Xft/xftrender.c | 527 --- xc/lib/Xft/xftstr.c | 259 -- xc/lib/Xft/xftxlfd.c | 335 -- xc/lib/Xi/Imakefile | 103 - xc/lib/Xi/XAllowDv.c | 84 - xc/lib/Xi/XChgDCtl.c | 126 - xc/lib/Xi/XChgFCtl.c | 203 -- xc/lib/Xi/XChgKMap.c | 90 - xc/lib/Xi/XChgKbd.c | 84 - xc/lib/Xi/XChgPnt.c | 88 - xc/lib/Xi/XChgProp.c | 94 - xc/lib/Xi/XCloseDev.c | 81 - xc/lib/Xi/XDevBell.c | 85 - xc/lib/Xi/XExtInt.c | 658 ---- xc/lib/Xi/XExtToWire.c | 448 --- xc/lib/Xi/XFreeLst.c | 68 - xc/lib/Xi/XGMotion.c | 138 - xc/lib/Xi/XGetBMap.c | 104 - xc/lib/Xi/XGetDCtl.c | 169 - xc/lib/Xi/XGetFCtl.c | 269 -- xc/lib/Xi/XGetKMap.c | 116 - xc/lib/Xi/XGetMMap.c | 100 - xc/lib/Xi/XGetProp.c | 116 - xc/lib/Xi/XGetVers.c | 106 - xc/lib/Xi/XGrDvBut.c | 110 - xc/lib/Xi/XGrDvKey.c | 113 - xc/lib/Xi/XGrabDev.c | 105 - xc/lib/Xi/XGtFocus.c | 88 - xc/lib/Xi/XGtSelect.c | 142 - xc/lib/Xi/XIint.h | 12 - xc/lib/Xi/XListDev.c | 255 -- xc/lib/Xi/XOpenDev.c | 109 - xc/lib/Xi/XQueryDv.c | 194 - xc/lib/Xi/XSelect.c | 90 - xc/lib/Xi/XSetBMap.c | 89 - xc/lib/Xi/XSetDVal.c | 96 - xc/lib/Xi/XSetMMap.c | 87 - xc/lib/Xi/XSetMode.c | 84 - xc/lib/Xi/XSndExEv.c | 119 - xc/lib/Xi/XStFocus.c | 83 - xc/lib/Xi/XUngrDev.c | 82 - xc/lib/Xi/XUngrDvB.c | 89 - xc/lib/Xi/XUngrDvK.c | 89 - xc/lib/Xi/Xi-def.cpp | 49 - xc/lib/Xi/Xios2.def | 53 - xc/lib/Xi/Xios2.rsp | 9 - xc/lib/Xinerama/Imakefile | 29 - xc/lib/Xinerama/Xinerama.c | 315 -- xc/lib/Xmu/AllCmap.c | 151 - xc/lib/Xmu/Atoms.c | 146 - xc/lib/Xmu/Atoms.h | 120 - xc/lib/Xmu/CharSet.h | 73 - xc/lib/Xmu/ClientWin.c | 87 - xc/lib/Xmu/Clip.c | 1614 --------- xc/lib/Xmu/CloseHook.c | 295 -- xc/lib/Xmu/CloseHook.h | 68 - xc/lib/Xmu/CmapAlloc.c | 339 -- xc/lib/Xmu/Converters.h | 276 -- xc/lib/Xmu/CrCmap.c | 530 --- xc/lib/Xmu/CrPixFBit.c | 78 - xc/lib/Xmu/CurUtil.h | 45 - xc/lib/Xmu/CursorName.c | 133 - xc/lib/Xmu/CvtCache.c | 140 - xc/lib/Xmu/CvtCache.h | 58 - xc/lib/Xmu/CvtStdSel.c | 340 -- xc/lib/Xmu/DefErrMsg.c | 166 - xc/lib/Xmu/DelCmap.c | 66 - xc/lib/Xmu/DisplayQue.c | 189 - xc/lib/Xmu/DisplayQue.h | 151 - xc/lib/Xmu/Distinct.c | 87 - xc/lib/Xmu/DrRndRect.c | 175 - xc/lib/Xmu/DrawLogo.c | 148 - xc/lib/Xmu/Drawing.h | 158 - xc/lib/Xmu/Editres.h | 38 - xc/lib/Xmu/EditresCom.c | 2205 ------------ xc/lib/Xmu/EditresP.h | 405 --- xc/lib/Xmu/Error.h | 53 - xc/lib/Xmu/ExtAgent.c | 39 - xc/lib/Xmu/ExtAgent.h | 39 - xc/lib/Xmu/FToCback.c | 41 - xc/lib/Xmu/GetHost.c | 81 - xc/lib/Xmu/GrayPixmap.c | 132 - xc/lib/Xmu/Imakefile | 172 - xc/lib/Xmu/Initer.c | 110 - xc/lib/Xmu/Initer.h | 53 - xc/lib/Xmu/LocBitmap.c | 265 -- xc/lib/Xmu/Lookup.c | 272 -- xc/lib/Xmu/Lookup.h | 128 - xc/lib/Xmu/LookupCmap.c | 323 -- xc/lib/Xmu/Lower.c | 163 - xc/lib/Xmu/Misc.h | 61 - xc/lib/Xmu/README | 8 - xc/lib/Xmu/RdBitF.c | 394 --- xc/lib/Xmu/ScrOfWin.c | 53 - xc/lib/Xmu/ShapeWidg.c | 244 -- xc/lib/Xmu/StdCmap.c | 229 -- xc/lib/Xmu/StdCmap.h | 115 - xc/lib/Xmu/StdSel.h | 52 - xc/lib/Xmu/StrToBS.c | 142 - xc/lib/Xmu/StrToBmap.c | 143 - xc/lib/Xmu/StrToCurs.c | 343 -- xc/lib/Xmu/StrToGrav.c | 144 - xc/lib/Xmu/StrToJust.c | 133 - xc/lib/Xmu/StrToLong.c | 76 - xc/lib/Xmu/StrToOrnt.c | 123 - xc/lib/Xmu/StrToShap.c | 118 - xc/lib/Xmu/StrToWidg.c | 218 -- xc/lib/Xmu/SysUtil.h | 49 - xc/lib/Xmu/UpdMapHint.c | 55 - xc/lib/Xmu/VisCmap.c | 176 - xc/lib/Xmu/WhitePoint.h | 61 - xc/lib/Xmu/WidgetNode.c | 303 -- xc/lib/Xmu/WidgetNode.h | 93 - xc/lib/Xmu/WinUtil.h | 60 - xc/lib/Xmu/Xct.c | 685 ---- xc/lib/Xmu/Xct.h | 164 - xc/lib/Xmu/Xmu-def.cpp | 100 - xc/lib/Xmu/Xmu.h | 115 - xc/lib/Xmu/Xmuos2.def | 128 - xc/lib/Xmu/Xmuos2.rsp | 11 - xc/lib/Xmu/sharedlib.c | 67 - xc/lib/Xmuu/Imakefile | 64 - xc/lib/Xmuu/Xmuu-def.cpp | 20 - xc/lib/Xp/Imakefile | 108 - xc/lib/Xp/Xp-def.cpp | 40 - xc/lib/Xp/XpAttr.c | 211 -- xc/lib/Xp/XpContext.c | 252 -- xc/lib/Xp/XpDoc.c | 155 - xc/lib/Xp/XpExtUtil.c | 336 -- xc/lib/Xp/XpExtUtil.h | 35 - xc/lib/Xp/XpExtVer.c | 116 - xc/lib/Xp/XpGetData.c | 212 -- xc/lib/Xp/XpImageRes.c | 116 - xc/lib/Xp/XpInput.c | 104 - xc/lib/Xp/XpJob.c | 201 -- xc/lib/Xp/XpLocale.c | 265 -- xc/lib/Xp/XpNotifyPdm.c | 893 ----- xc/lib/Xp/XpPage.c | 155 - xc/lib/Xp/XpPageDim.c | 87 - xc/lib/Xp/XpPrinter.c | 247 -- xc/lib/Xp/XpPutData.c | 97 - xc/lib/Xp/XpScreens.c | 117 - xc/lib/Xp/Xpos2.def | 45 - xc/lib/Xp/Xpos2.rsp | 5 - xc/lib/Xpm/Imakefile | 98 - xc/lib/Xpm/Xpm-def.cpp | 39 - xc/lib/Xpm/Xpmos2.def | 41 - xc/lib/Xpm/Xpmos2.rsp | 7 - xc/lib/Xrandr/Imakefile | 33 - xc/lib/Xrandr/Xrandr-def.cpp | 18 - xc/lib/Xrandr/Xrandr.c | 472 --- xc/lib/Xrandr/Xrandr.h | 107 - xc/lib/Xrandr/Xrandrint.h | 67 - xc/lib/Xrandr/test.c | 21 - xc/lib/Xrender/Composite.c | 65 - xc/lib/Xrender/FillRect.c | 104 - xc/lib/Xrender/FillRects.c | 77 - xc/lib/Xrender/Glyph.c | 176 - xc/lib/Xrender/Imakefile | 39 - xc/lib/Xrender/Picture.c | 136 - xc/lib/Xrender/Xrender-def.cpp | 28 - xc/lib/Xrender/Xrender.c | 336 -- xc/lib/Xrender/Xrender.h | 203 -- xc/lib/Xrender/Xrenderint.h | 50 - xc/lib/Xss/Imakefile | 32 - xc/lib/Xss/XScrnSaver.c | 441 --- xc/lib/Xss/Xss-def.cpp | 14 - xc/lib/Xss/Xssos2.def | 19 - xc/lib/Xss/Xssos2.rsp | 3 - xc/lib/Xt/ActionHook.c | 127 - xc/lib/Xt/Alloc.c | 492 --- xc/lib/Xt/ArgList.c | 72 - xc/lib/Xt/Callback.c | 735 ---- xc/lib/Xt/CallbackI.h | 130 - xc/lib/Xt/ClickTime.c | 86 - xc/lib/Xt/Composite.c | 279 -- xc/lib/Xt/Composite.h | 114 - xc/lib/Xt/CompositeP.h | 107 - xc/lib/Xt/ConstrainP.h | 90 - xc/lib/Xt/Constraint.c | 127 - xc/lib/Xt/Constraint.h | 56 - xc/lib/Xt/Convert.c | 1168 ------ xc/lib/Xt/ConvertI.h | 99 - xc/lib/Xt/Converters.c | 1883 ---------- xc/lib/Xt/Core.c | 393 --- xc/lib/Xt/Core.h | 62 - xc/lib/Xt/CoreP.h | 167 - xc/lib/Xt/Create.c | 824 ----- xc/lib/Xt/Destroy.c | 379 -- xc/lib/Xt/Display.c | 831 ----- xc/lib/Xt/Error.c | 732 ---- xc/lib/Xt/Event.c | 1842 ---------- xc/lib/Xt/EventI.h | 123 - xc/lib/Xt/EventUtil.c | 217 -- xc/lib/Xt/Functions.c | 224 -- xc/lib/Xt/GCManager.c | 346 -- xc/lib/Xt/Geometry.c | 823 ----- xc/lib/Xt/GetActKey.c | 95 - xc/lib/Xt/GetResList.c | 187 - xc/lib/Xt/GetValues.c | 246 -- xc/lib/Xt/HookObj.c | 126 - xc/lib/Xt/HookObjI.h | 67 - xc/lib/Xt/Hooks.c | 159 - xc/lib/Xt/Imakefile | 259 -- xc/lib/Xt/InitialI.h | 456 --- xc/lib/Xt/Initialize.c | 1041 ------ xc/lib/Xt/Intrinsic.c | 1648 --------- xc/lib/Xt/Intrinsic.h | 3210 ----------------- xc/lib/Xt/IntrinsicI.h | 274 -- xc/lib/Xt/IntrinsicP.h | 357 -- xc/lib/Xt/Keyboard.c | 850 ----- xc/lib/Xt/Manage.c | 495 --- xc/lib/Xt/NextEvent.c | 1648 --------- xc/lib/Xt/Object.c | 290 -- xc/lib/Xt/Object.h | 56 - xc/lib/Xt/ObjectP.h | 135 - xc/lib/Xt/PassivGraI.h | 191 - xc/lib/Xt/PassivGrab.c | 1115 ------ xc/lib/Xt/Pointer.c | 108 - xc/lib/Xt/Popup.c | 207 -- xc/lib/Xt/PopupCB.c | 77 - xc/lib/Xt/RectObj.c | 184 - xc/lib/Xt/RectObj.h | 56 - xc/lib/Xt/RectObjP.h | 125 - xc/lib/Xt/ResConfig.c | 1010 ------ xc/lib/Xt/ResConfigP.h | 59 - xc/lib/Xt/ResourceI.h | 84 - xc/lib/Xt/Resources.c | 1292 ------- xc/lib/Xt/Selection.c | 2302 ------------ xc/lib/Xt/SelectionI.h | 166 - xc/lib/Xt/SetSens.c | 127 - xc/lib/Xt/SetValues.c | 434 --- xc/lib/Xt/SetWMCW.c | 148 - xc/lib/Xt/Shell.c | 3432 ------------------ xc/lib/Xt/ShellI.h | 12 - xc/lib/Xt/ShellP.h | 424 --- xc/lib/Xt/TMaction.c | 1065 ------ xc/lib/Xt/TMgrab.c | 338 -- xc/lib/Xt/TMkey.c | 740 ---- xc/lib/Xt/TMparse.c | 2140 ----------- xc/lib/Xt/TMprint.c | 885 ----- xc/lib/Xt/TMstate.c | 2335 ------------ xc/lib/Xt/Threads.c | 469 --- xc/lib/Xt/ThreadsI.h | 130 - xc/lib/Xt/TranslateI.h | 651 ---- xc/lib/Xt/VarCreate.c | 505 --- xc/lib/Xt/VarGet.c | 347 -- xc/lib/Xt/Varargs.c | 561 --- xc/lib/Xt/VarargsI.h | 80 - xc/lib/Xt/Vendor.c | 133 - xc/lib/Xt/Vendor.h | 65 - xc/lib/Xt/VendorP.h | 99 - xc/lib/Xt/Xt-def.cpp | 341 -- xc/lib/Xt/Xtos.h | 71 - xc/lib/Xt/Xtos2.def | 475 --- xc/lib/Xt/Xtos2.rsp | 12 - xc/lib/Xt/jump_funcs | 752 ---- xc/lib/Xt/jump_ignore | 11 - xc/lib/Xt/jump_vars | 67 - xc/lib/Xt/libXt.elist | 42 - xc/lib/Xt/sharedlib.c | 299 -- xc/lib/Xt/util/Shell.ht | 95 - xc/lib/Xt/util/StrDefs.ct | 53 - xc/lib/Xt/util/StrDefs.ht | 63 - xc/lib/Xt/util/string.list | 399 --- xc/lib/Xtst/Imakefile | 27 - xc/lib/Xtst/XRecord.c | 1102 ------ xc/lib/Xtst/XTest.c | 485 --- xc/lib/Xtst/Xtst-def.cpp | 32 - xc/lib/Xtst/Xtstos2.def | 37 - xc/lib/Xtst/Xtstos2.rsp | 3 - xc/lib/Xv/Imakefile | 29 - xc/lib/Xv/Xv.c | 873 ----- xc/lib/Xv/Xvlibint.h | 99 - xc/lib/XvMC/Imakefile | 29 - xc/lib/XvMC/XvMC.c | 468 --- xc/lib/XvMC/XvMClibint.h | 40 - xc/lib/Xxf86dga/Imakefile | 32 - xc/lib/Xxf86dga/XF86DGA.c | 715 ---- xc/lib/Xxf86dga/XF86DGA2.c | 941 ----- xc/lib/Xxf86dga/Xxf86dga-def.cpp | 16 - xc/lib/Xxf86dga/Xxf86dgaos2.def | 18 - xc/lib/Xxf86dga/Xxf86dgaos2.rsp | 3 - xc/lib/Xxf86misc/Imakefile | 32 - xc/lib/Xxf86misc/XF86Misc.c | 230 -- xc/lib/Xxf86misc/Xxf86misc-def.cpp | 13 - xc/lib/Xxf86misc/Xxf86miscos2.def | 13 - xc/lib/Xxf86misc/Xxf86miscos2.rsp | 3 - xc/lib/Xxf86rush/Imakefile | 31 - xc/lib/Xxf86rush/XF86Rush.c | 291 -- xc/lib/Xxf86vm/Imakefile | 32 - xc/lib/Xxf86vm/XF86VMode.c | 1111 ------ xc/lib/Xxf86vm/Xxf86vm-def.cpp | 16 - xc/lib/Xxf86vm/Xxf86vmos2.def | 16 - xc/lib/Xxf86vm/Xxf86vmos2.rsp | 3 - xc/lib/dps/DPSCAP.h | 77 - xc/lib/dps/DPSCAPClient.h | 142 - xc/lib/dps/DPSCAPproto.h | 180 - xc/lib/dps/Imakefile | 319 -- xc/lib/dps/XDPS.c | 2330 ------------ xc/lib/dps/Xlibnet.h | 277 -- xc/lib/dps/Xstreams.h | 218 -- xc/lib/dps/csconndi.c | 852 ----- xc/lib/dps/csfindNX.c | 658 ---- xc/lib/dps/csfindNX.h | 100 - xc/lib/dps/cslibext.c | 759 ---- xc/lib/dps/cslibint.c | 2003 ----------- xc/lib/dps/cslibint.h | 291 -- xc/lib/dps/csopendi.c | 571 --- xc/lib/dps/csstartNX.c | 236 -- xc/lib/dps/csstartNX.h | 73 - xc/lib/dps/dps-def.cpp | 991 ------ xc/lib/dps/dpsNXprops.h | 91 - xc/lib/dps/dpsXclient.c | 1136 ------ xc/lib/dps/dpsXcmu.c | 1618 --------- xc/lib/dps/dpsXint.h | 101 - xc/lib/dps/dpsXops.psw | 80 - xc/lib/dps/dpsXpriv.c | 530 --- xc/lib/dps/dpsXpriv.h | 138 - xc/lib/dps/dpsXtdisp.c | 112 - xc/lib/dps/dpsabbrev.c | 362 -- xc/lib/dps/dpsassert.h | 55 - xc/lib/dps/dpsclient.c | 2918 --------------- xc/lib/dps/dpsclrops.psw | 81 - xc/lib/dps/dpsctrlops.psw | 114 - xc/lib/dps/dpsctxtops.psw | 110 - xc/lib/dps/dpsdataops.psw | 258 -- xc/lib/dps/dpsdict.c | 184 - xc/lib/dps/dpsdict.h | 77 - xc/lib/dps/dpsendif.txt | 7 - xc/lib/dps/dpsexcept.c | 73 - xc/lib/dps/dpsfontops.psw | 109 - xc/lib/dps/dpsgsttops.psw | 213 -- xc/lib/dps/dpsifdef.txt | 5 - xc/lib/dps/dpsint.h | 104 - xc/lib/dps/dpsioops.psw | 153 - xc/lib/dps/dpsl2ops.psw | 208 -- xc/lib/dps/dpsmathops.psw | 125 - xc/lib/dps/dpsmiscops.psw | 53 - xc/lib/dps/dpsmtrxops.psw | 65 - xc/lib/dps/dpsname.txt | 4 - xc/lib/dps/dpsops.h.os2 | 1601 --------- xc/lib/dps/dpsopstack.psw | 96 - xc/lib/dps/dpsos2.def | 854 ----- xc/lib/dps/dpsos2.rsp | 13 - xc/lib/dps/dpspathops.psw | 169 - xc/lib/dps/dpspntops.psw | 129 - xc/lib/dps/dpsprintf.c | 103 - xc/lib/dps/dpsprivate.h | 171 - xc/lib/dps/dpssimpint.h | 88 - xc/lib/dps/dpssysnames.c | 444 --- xc/lib/dps/dpssysops.psw | 149 - xc/lib/dps/dpswinops.psw | 65 - xc/lib/dps/else.txt | 6 - xc/lib/dps/genheader.cmd | 14 - xc/lib/dps/header.txt | 35 - xc/lib/dps/psXops.psw | 80 - xc/lib/dps/psclrops.psw | 81 - xc/lib/dps/psctrlops.psw | 113 - xc/lib/dps/psctxtops.psw | 109 - xc/lib/dps/psdataops.psw | 257 -- xc/lib/dps/psendif.txt | 7 - xc/lib/dps/psfontops.psw | 109 - xc/lib/dps/psgsttops.psw | 213 -- xc/lib/dps/psifdef.txt | 5 - xc/lib/dps/psioops.psw | 153 - xc/lib/dps/psl2ops.psw | 208 -- xc/lib/dps/psmathops.psw | 125 - xc/lib/dps/psmiscops.psw | 53 - xc/lib/dps/psmtrxops.psw | 65 - xc/lib/dps/psname.txt | 3 - xc/lib/dps/psops.h.os2 | 1602 --------- xc/lib/dps/psopstack.psw | 96 - xc/lib/dps/pspathops.psw | 169 - xc/lib/dps/pspntops.psw | 129 - xc/lib/dps/pssysops.psw | 150 - xc/lib/dps/pswinops.psw | 66 - xc/lib/dps/publictypes.h | 70 - xc/lib/dpstk/CSBwraps.psw | 343 -- xc/lib/dpstk/ColorSB.c | 3393 ------------------ xc/lib/dpstk/ColorSelect.ad | 162 - xc/lib/dpstk/DPSScrollW.c | 3531 ------------------ xc/lib/dpstk/DSWwraps.psw | 75 - xc/lib/dpstk/FSBwraps.psw | 491 --- xc/lib/dpstk/FontCreato.c | 1643 --------- xc/lib/dpstk/FontSB.c | 4909 -------------------------- xc/lib/dpstk/FontSBI.h | 74 - xc/lib/dpstk/FontSample.c | 1852 ---------- xc/lib/dpstk/FontSelect.ad | 415 --- xc/lib/dpstk/Imakefile | 85 - xc/lib/dpstk/XDPSpreview.c | 649 ---- xc/lib/dpstk/XDPSpwraps.psw | 97 - xc/lib/dpstk/XDPSshare.c | 760 ---- xc/lib/dpstk/XDPSswraps.psw | 110 - xc/lib/dpstk/XDPSuserpath.c | 239 -- xc/lib/dpstk/dpsXcommonI.h | 73 - xc/lib/dpstk/dpstk-def.cpp | 65 - xc/lib/dpstk/dpstkos2.def | 69 - xc/lib/dpstk/dpstkos2.rsp | 4 - xc/lib/dpstk/eyedrop16.xbm | 8 - xc/lib/dpstk/eyedrop32.xbm | 16 - xc/lib/dpstk/eyedropmask16.xbm | 8 - xc/lib/dpstk/eyedropmask32.xbm | 16 - xc/lib/dpstk/heyedrop.xbm | 7 - xc/lib/dpstk/square.xbm | 8 - xc/lib/dpstk/squaremask.xbm | 6 - xc/lib/fontenc/Imakefile | 28 - xc/lib/freetype2/Imakefile | 105 - xc/lib/freetype2/freetype-def.cpp | 160 - xc/lib/freetype2/freetype/Imakefile | 56 - xc/lib/freetype2/freetype/cache/Imakefile | 23 - xc/lib/freetype2/freetype/config/Imakefile | 19 - xc/lib/freetype2/freetype/internal/Imakefile | 49 - xc/lib/oldX/Imakefile | 40 - xc/lib/oldX/X10.h | 85 - xc/lib/oldX/XCrAssoc.c | 68 - xc/lib/oldX/XDelAssoc.c | 75 - xc/lib/oldX/XDestAssoc.c | 60 - xc/lib/oldX/XDraw.c | 705 ---- xc/lib/oldX/XLookAssoc.c | 71 - xc/lib/oldX/XMakeAssoc.c | 106 - xc/lib/oldX/oldX-def.cpp | 11 - xc/lib/psres/Imakefile | 30 - xc/lib/psres/PSres.c | 1667 --------- xc/lib/psres/psres-def.cpp | 11 - xc/lib/psres/psresos2.def | 29 - xc/lib/psres/psresos2.rsp | 3 - xc/lib/xkbfile/Imakefile | 13 +- xc/lib/xkbui/Imakefile | 20 - xc/lib/xkbui/XKBui.c | 836 ----- xc/lib/xkbui/XKBui.h | 217 -- xc/lib/xkbui/XKBuiPriv.h | 71 - 740 files changed, 12 insertions(+), 271860 deletions(-) delete mode 100644 xc/lib/FS/FSClServ.c delete mode 100644 xc/lib/FS/FSCloseFt.c delete mode 100644 xc/lib/FS/FSConnServ.c delete mode 100644 xc/lib/FS/FSErrDis.c delete mode 100644 xc/lib/FS/FSErrHndlr.c delete mode 100644 xc/lib/FS/FSFlush.c delete mode 100644 xc/lib/FS/FSFontInfo.c delete mode 100644 xc/lib/FS/FSFtNames.c delete mode 100644 xc/lib/FS/FSGetCats.c delete mode 100644 xc/lib/FS/FSListCats.c delete mode 100644 xc/lib/FS/FSListExt.c delete mode 100644 xc/lib/FS/FSMisc.c delete mode 100644 xc/lib/FS/FSNextEv.c delete mode 100644 xc/lib/FS/FSOpenFont.c delete mode 100644 xc/lib/FS/FSOpenServ.c delete mode 100644 xc/lib/FS/FSQGlyphs.c delete mode 100644 xc/lib/FS/FSQXExt.c delete mode 100644 xc/lib/FS/FSQXInfo.c delete mode 100644 xc/lib/FS/FSQuExt.c delete mode 100644 xc/lib/FS/FSServName.c delete mode 100644 xc/lib/FS/FSSetCats.c delete mode 100644 xc/lib/FS/FSSync.c delete mode 100644 xc/lib/FS/FSSynchro.c delete mode 100644 xc/lib/FS/FSlib.h delete mode 100644 xc/lib/FS/FSlibInt.c delete mode 100644 xc/lib/FS/FSlibint.h delete mode 100644 xc/lib/FS/FSlibos.h delete mode 100644 xc/lib/FS/Imakefile delete mode 100644 xc/lib/ICE/ICE-def.cpp delete mode 100644 xc/lib/ICE/ICE.h delete mode 100644 xc/lib/ICE/ICEconn.h delete mode 100644 xc/lib/ICE/ICElib.h delete mode 100644 xc/lib/ICE/ICElibint.h delete mode 100644 xc/lib/ICE/ICEmsg.h delete mode 100644 xc/lib/ICE/ICEos2.def delete mode 100644 xc/lib/ICE/ICEos2.rsp delete mode 100644 xc/lib/ICE/ICEproto.h delete mode 100644 xc/lib/ICE/ICEutil.h delete mode 100644 xc/lib/ICE/Imakefile delete mode 100644 xc/lib/ICE/accept.c delete mode 100644 xc/lib/ICE/authutil.c delete mode 100644 xc/lib/ICE/connect.c delete mode 100644 xc/lib/ICE/error.c delete mode 100644 xc/lib/ICE/getauth.c delete mode 100644 xc/lib/ICE/globals.h delete mode 100644 xc/lib/ICE/iceauth.c delete mode 100644 xc/lib/ICE/listen.c delete mode 100644 xc/lib/ICE/listenwk.c delete mode 100644 xc/lib/ICE/locking.c delete mode 100644 xc/lib/ICE/misc.c delete mode 100644 xc/lib/ICE/ping.c delete mode 100644 xc/lib/ICE/process.c delete mode 100644 xc/lib/ICE/protosetup.c delete mode 100644 xc/lib/ICE/register.c delete mode 100644 xc/lib/ICE/replywait.c delete mode 100644 xc/lib/ICE/setauth.c delete mode 100644 xc/lib/ICE/shutdown.c delete mode 100644 xc/lib/ICE/watch.c delete mode 100644 xc/lib/PEX5/Imakefile delete mode 100644 xc/lib/PEX5/PEX.h delete mode 100644 xc/lib/PEX5/PEX5-def.cpp delete mode 100644 xc/lib/PEX5/PEX5os2.def delete mode 100644 xc/lib/PEX5/PEX5os2.rsp delete mode 100644 xc/lib/PEX5/PEXlib.h delete mode 100644 xc/lib/PEX5/PEXlibint.h delete mode 100644 xc/lib/PEX5/PEXproto.h delete mode 100644 xc/lib/PEX5/PEXprotost.h delete mode 100644 xc/lib/PEX5/jump_funcs delete mode 100644 xc/lib/PEX5/jump_ignore delete mode 100644 xc/lib/PEX5/jump_vars delete mode 100644 xc/lib/PEX5/pl_convert.c delete mode 100644 xc/lib/PEX5/pl_convert.h delete mode 100644 xc/lib/PEX5/pl_escape.c delete mode 100644 xc/lib/PEX5/pl_extract.h delete mode 100644 xc/lib/PEX5/pl_font.c delete mode 100644 xc/lib/PEX5/pl_free.c delete mode 100644 xc/lib/PEX5/pl_global.h delete mode 100644 xc/lib/PEX5/pl_lut.c delete mode 100644 xc/lib/PEX5/pl_lut.h delete mode 100644 xc/lib/PEX5/pl_nameset.c delete mode 100644 xc/lib/PEX5/pl_oc_attr.c delete mode 100644 xc/lib/PEX5/pl_oc_dec.c delete mode 100644 xc/lib/PEX5/pl_oc_enc.c delete mode 100644 xc/lib/PEX5/pl_oc_prim.c delete mode 100644 xc/lib/PEX5/pl_oc_str.c delete mode 100644 xc/lib/PEX5/pl_oc_util.c delete mode 100644 xc/lib/PEX5/pl_oc_util.h delete mode 100644 xc/lib/PEX5/pl_pc.c delete mode 100644 xc/lib/PEX5/pl_pick.c delete mode 100644 xc/lib/PEX5/pl_rdr.c delete mode 100644 xc/lib/PEX5/pl_sc.c delete mode 100644 xc/lib/PEX5/pl_startup.c delete mode 100644 xc/lib/PEX5/pl_store.h delete mode 100644 xc/lib/PEX5/pl_struct.c delete mode 100644 xc/lib/PEX5/pl_util.c delete mode 100644 xc/lib/PEX5/pl_util.h delete mode 100644 xc/lib/PEX5/pl_wks.c delete mode 100644 xc/lib/PEX5/pl_xdata.h delete mode 100644 xc/lib/SM/Imakefile delete mode 100644 xc/lib/SM/SM-def.cpp delete mode 100644 xc/lib/SM/SM.h delete mode 100644 xc/lib/SM/SMlib.h delete mode 100644 xc/lib/SM/SMlibint.h delete mode 100644 xc/lib/SM/SMos2.def delete mode 100644 xc/lib/SM/SMos2.rsp delete mode 100644 xc/lib/SM/SMproto.h delete mode 100644 xc/lib/SM/globals.h delete mode 100644 xc/lib/SM/sm_auth.c delete mode 100644 xc/lib/SM/sm_client.c delete mode 100644 xc/lib/SM/sm_error.c delete mode 100644 xc/lib/SM/sm_genid.c delete mode 100644 xc/lib/SM/sm_manager.c delete mode 100644 xc/lib/SM/sm_misc.c delete mode 100644 xc/lib/SM/sm_process.c delete mode 100644 xc/lib/XIE/Imakefile delete mode 100644 xc/lib/XIE/XIE-def.cpp delete mode 100644 xc/lib/XIE/XIElib.h delete mode 100644 xc/lib/XIE/XIElibint.h delete mode 100644 xc/lib/XIE/XIEos2.def delete mode 100644 xc/lib/XIE/XIEos2.rsp delete mode 100644 xc/lib/XIE/abort.c delete mode 100644 xc/lib/XIE/await.c delete mode 100644 xc/lib/XIE/clientdata.c delete mode 100644 xc/lib/XIE/colorlist.c delete mode 100644 xc/lib/XIE/conven.c delete mode 100644 xc/lib/XIE/elements.c delete mode 100644 xc/lib/XIE/elements.h delete mode 100644 xc/lib/XIE/errors.c delete mode 100644 xc/lib/XIE/events.c delete mode 100644 xc/lib/XIE/free.c delete mode 100644 xc/lib/XIE/globals.h delete mode 100644 xc/lib/XIE/ieee.c delete mode 100644 xc/lib/XIE/init.c delete mode 100644 xc/lib/XIE/init.h delete mode 100644 xc/lib/XIE/jump_funcs delete mode 100644 xc/lib/XIE/jump_ignore delete mode 100644 xc/lib/XIE/jump_vars delete mode 100644 xc/lib/XIE/lut.c delete mode 100644 xc/lib/XIE/photoflo.c delete mode 100644 xc/lib/XIE/photomap.c delete mode 100644 xc/lib/XIE/photospace.c delete mode 100644 xc/lib/XIE/roi.c delete mode 100644 xc/lib/XIE/technique.c delete mode 100644 xc/lib/XIE/technique.h delete mode 100644 xc/lib/XIE/utils.c delete mode 100644 xc/lib/Xaw/Actions.c delete mode 100644 xc/lib/Xaw/AllWidgets.c delete mode 100644 xc/lib/Xaw/AllWidgets.h delete mode 100644 xc/lib/Xaw/AsciiSink.c delete mode 100644 xc/lib/Xaw/AsciiSink.h delete mode 100644 xc/lib/Xaw/AsciiSinkP.h delete mode 100644 xc/lib/Xaw/AsciiSrc.c delete mode 100644 xc/lib/Xaw/AsciiSrc.h delete mode 100644 xc/lib/Xaw/AsciiSrcP.h delete mode 100644 xc/lib/Xaw/AsciiText.c delete mode 100644 xc/lib/Xaw/AsciiText.h delete mode 100644 xc/lib/Xaw/AsciiTextP.h delete mode 100644 xc/lib/Xaw/Box.c delete mode 100644 xc/lib/Xaw/Box.h delete mode 100644 xc/lib/Xaw/BoxP.h delete mode 100644 xc/lib/Xaw/CHANGES delete mode 100644 xc/lib/Xaw/Cardinals.h delete mode 100644 xc/lib/Xaw/Changelog delete mode 100644 xc/lib/Xaw/Command.c delete mode 100644 xc/lib/Xaw/Command.h delete mode 100644 xc/lib/Xaw/CommandP.h delete mode 100644 xc/lib/Xaw/Converters.c delete mode 100644 xc/lib/Xaw/Dialog.c delete mode 100644 xc/lib/Xaw/Dialog.h delete mode 100644 xc/lib/Xaw/DialogP.h delete mode 100644 xc/lib/Xaw/DisplayList.c delete mode 100644 xc/lib/Xaw/Form.c delete mode 100644 xc/lib/Xaw/Form.h delete mode 100644 xc/lib/Xaw/FormP.h delete mode 100644 xc/lib/Xaw/Grip.c delete mode 100644 xc/lib/Xaw/Grip.h delete mode 100644 xc/lib/Xaw/GripP.h delete mode 100644 xc/lib/Xaw/Imakefile delete mode 100644 xc/lib/Xaw/Label.c delete mode 100644 xc/lib/Xaw/Label.h delete mode 100644 xc/lib/Xaw/LabelP.h delete mode 100644 xc/lib/Xaw/List.c delete mode 100644 xc/lib/Xaw/List.h delete mode 100644 xc/lib/Xaw/ListP.h delete mode 100644 xc/lib/Xaw/MenuButtoP.h delete mode 100644 xc/lib/Xaw/MenuButton.c delete mode 100644 xc/lib/Xaw/MenuButton.h delete mode 100644 xc/lib/Xaw/MultiSink.c delete mode 100644 xc/lib/Xaw/MultiSink.h delete mode 100644 xc/lib/Xaw/MultiSinkP.h delete mode 100644 xc/lib/Xaw/MultiSrc.c delete mode 100644 xc/lib/Xaw/MultiSrc.h delete mode 100644 xc/lib/Xaw/MultiSrcP.h delete mode 100644 xc/lib/Xaw/OS.c delete mode 100644 xc/lib/Xaw/Paned.c delete mode 100644 xc/lib/Xaw/Paned.h delete mode 100644 xc/lib/Xaw/PanedP.h delete mode 100644 xc/lib/Xaw/Panner.c delete mode 100644 xc/lib/Xaw/Panner.h delete mode 100644 xc/lib/Xaw/PannerP.h delete mode 100644 xc/lib/Xaw/Pixmap.c delete mode 100644 xc/lib/Xaw/Porthole.c delete mode 100644 xc/lib/Xaw/Porthole.h delete mode 100644 xc/lib/Xaw/PortholeP.h delete mode 100644 xc/lib/Xaw/Private.h delete mode 100644 xc/lib/Xaw/Repeater.c delete mode 100644 xc/lib/Xaw/Repeater.h delete mode 100644 xc/lib/Xaw/RepeaterP.h delete mode 100644 xc/lib/Xaw/Reports.h delete mode 100644 xc/lib/Xaw/Scrollbar.c delete mode 100644 xc/lib/Xaw/Scrollbar.h delete mode 100644 xc/lib/Xaw/ScrollbarP.h delete mode 100644 xc/lib/Xaw/Simple.c delete mode 100644 xc/lib/Xaw/Simple.h delete mode 100644 xc/lib/Xaw/SimpleMenP.h delete mode 100644 xc/lib/Xaw/SimpleMenu.c delete mode 100644 xc/lib/Xaw/SimpleMenu.h delete mode 100644 xc/lib/Xaw/SimpleP.h delete mode 100644 xc/lib/Xaw/Sme.c delete mode 100644 xc/lib/Xaw/Sme.h delete mode 100644 xc/lib/Xaw/SmeBSB.c delete mode 100644 xc/lib/Xaw/SmeBSB.h delete mode 100644 xc/lib/Xaw/SmeBSBP.h delete mode 100644 xc/lib/Xaw/SmeLine.c delete mode 100644 xc/lib/Xaw/SmeLine.h delete mode 100644 xc/lib/Xaw/SmeLineP.h delete mode 100644 xc/lib/Xaw/SmeP.h delete mode 100644 xc/lib/Xaw/StripCharP.h delete mode 100644 xc/lib/Xaw/StripChart.c delete mode 100644 xc/lib/Xaw/StripChart.h delete mode 100644 xc/lib/Xaw/Template.c delete mode 100644 xc/lib/Xaw/Template.h delete mode 100644 xc/lib/Xaw/TemplateP.h delete mode 100644 xc/lib/Xaw/Text.c delete mode 100644 xc/lib/Xaw/Text.h delete mode 100644 xc/lib/Xaw/TextAction.c delete mode 100644 xc/lib/Xaw/TextP.h delete mode 100644 xc/lib/Xaw/TextPop.c delete mode 100644 xc/lib/Xaw/TextSink.c delete mode 100644 xc/lib/Xaw/TextSink.h delete mode 100644 xc/lib/Xaw/TextSinkP.h delete mode 100644 xc/lib/Xaw/TextSrc.c delete mode 100644 xc/lib/Xaw/TextSrc.h delete mode 100644 xc/lib/Xaw/TextSrcP.h delete mode 100644 xc/lib/Xaw/TextTr.c delete mode 100644 xc/lib/Xaw/Tip.c delete mode 100644 xc/lib/Xaw/Tip.h delete mode 100644 xc/lib/Xaw/TipP.h delete mode 100644 xc/lib/Xaw/Toggle.c delete mode 100644 xc/lib/Xaw/Toggle.h delete mode 100644 xc/lib/Xaw/ToggleP.h delete mode 100644 xc/lib/Xaw/Tree.c delete mode 100644 xc/lib/Xaw/Tree.h delete mode 100644 xc/lib/Xaw/TreeP.h delete mode 100644 xc/lib/Xaw/Vendor.c delete mode 100644 xc/lib/Xaw/VendorEP.h delete mode 100644 xc/lib/Xaw/Viewport.c delete mode 100644 xc/lib/Xaw/Viewport.h delete mode 100644 xc/lib/Xaw/ViewportP.h delete mode 100644 xc/lib/Xaw/Xaw-def.cpp delete mode 100644 xc/lib/Xaw/Xaw.man delete mode 100644 xc/lib/Xaw/XawI18n.c delete mode 100644 xc/lib/Xaw/XawI18n.h delete mode 100644 xc/lib/Xaw/XawIm.c delete mode 100644 xc/lib/Xaw/XawImP.h delete mode 100644 xc/lib/Xaw/XawInit.c delete mode 100644 xc/lib/Xaw/XawInit.h delete mode 100644 xc/lib/Xaw/Xawos2.def delete mode 100644 xc/lib/Xaw/Xawos2.rsp delete mode 100755 xc/lib/Xaw/genlist.sh delete mode 100644 xc/lib/Xaw/jump_funcs delete mode 100644 xc/lib/Xaw/jump_ignore delete mode 100644 xc/lib/Xaw/jump_vars delete mode 100644 xc/lib/Xaw/sharedlib.c delete mode 100644 xc/lib/Xaw6/Imakefile delete mode 100644 xc/lib/Xaw6/Xaw6os2.def delete mode 100644 xc/lib/Xaw6/Xaw6os2.rsp delete mode 100644 xc/lib/Xfontcache/FontCache.c delete mode 100644 xc/lib/Xfontcache/Imakefile delete mode 100644 xc/lib/Xft/Imakefile delete mode 100644 xc/lib/Xft/Xft-def.cpp delete mode 100644 xc/lib/Xft/Xft.h delete mode 100644 xc/lib/Xft/Xft.man delete mode 100644 xc/lib/Xft/XftConfig.cpp delete mode 100644 xc/lib/Xft/XftFreetype.h delete mode 100644 xc/lib/Xft/xftcache.c delete mode 100644 xc/lib/Xft/xftcfg.c delete mode 100644 xc/lib/Xft/xftcolor.c delete mode 100644 xc/lib/Xft/xftcore.c delete mode 100644 xc/lib/Xft/xftdbg.c delete mode 100644 xc/lib/Xft/xftdir.c delete mode 100644 xc/lib/Xft/xftdpy.c delete mode 100644 xc/lib/Xft/xftdraw.c delete mode 100644 xc/lib/Xft/xftextent.c delete mode 100644 xc/lib/Xft/xftfont.c delete mode 100644 xc/lib/Xft/xftfreetype.c delete mode 100644 xc/lib/Xft/xftfs.c delete mode 100644 xc/lib/Xft/xftglyphs.c delete mode 100644 xc/lib/Xft/xftgram.y delete mode 100644 xc/lib/Xft/xftinit.c delete mode 100644 xc/lib/Xft/xftint.h delete mode 100644 xc/lib/Xft/xftlex.l delete mode 100644 xc/lib/Xft/xftlist.c delete mode 100644 xc/lib/Xft/xftmatch.c delete mode 100644 xc/lib/Xft/xftmatrix.c delete mode 100644 xc/lib/Xft/xftname.c delete mode 100644 xc/lib/Xft/xftpat.c delete mode 100644 xc/lib/Xft/xftrender.c delete mode 100644 xc/lib/Xft/xftstr.c delete mode 100644 xc/lib/Xft/xftxlfd.c delete mode 100644 xc/lib/Xi/Imakefile delete mode 100644 xc/lib/Xi/XAllowDv.c delete mode 100644 xc/lib/Xi/XChgDCtl.c delete mode 100644 xc/lib/Xi/XChgFCtl.c delete mode 100644 xc/lib/Xi/XChgKMap.c delete mode 100644 xc/lib/Xi/XChgKbd.c delete mode 100644 xc/lib/Xi/XChgPnt.c delete mode 100644 xc/lib/Xi/XChgProp.c delete mode 100644 xc/lib/Xi/XCloseDev.c delete mode 100644 xc/lib/Xi/XDevBell.c delete mode 100644 xc/lib/Xi/XExtInt.c delete mode 100644 xc/lib/Xi/XExtToWire.c delete mode 100644 xc/lib/Xi/XFreeLst.c delete mode 100644 xc/lib/Xi/XGMotion.c delete mode 100644 xc/lib/Xi/XGetBMap.c delete mode 100644 xc/lib/Xi/XGetDCtl.c delete mode 100644 xc/lib/Xi/XGetFCtl.c delete mode 100644 xc/lib/Xi/XGetKMap.c delete mode 100644 xc/lib/Xi/XGetMMap.c delete mode 100644 xc/lib/Xi/XGetProp.c delete mode 100644 xc/lib/Xi/XGetVers.c delete mode 100644 xc/lib/Xi/XGrDvBut.c delete mode 100644 xc/lib/Xi/XGrDvKey.c delete mode 100644 xc/lib/Xi/XGrabDev.c delete mode 100644 xc/lib/Xi/XGtFocus.c delete mode 100644 xc/lib/Xi/XGtSelect.c delete mode 100644 xc/lib/Xi/XIint.h delete mode 100644 xc/lib/Xi/XListDev.c delete mode 100644 xc/lib/Xi/XOpenDev.c delete mode 100644 xc/lib/Xi/XQueryDv.c delete mode 100644 xc/lib/Xi/XSelect.c delete mode 100644 xc/lib/Xi/XSetBMap.c delete mode 100644 xc/lib/Xi/XSetDVal.c delete mode 100644 xc/lib/Xi/XSetMMap.c delete mode 100644 xc/lib/Xi/XSetMode.c delete mode 100644 xc/lib/Xi/XSndExEv.c delete mode 100644 xc/lib/Xi/XStFocus.c delete mode 100644 xc/lib/Xi/XUngrDev.c delete mode 100644 xc/lib/Xi/XUngrDvB.c delete mode 100644 xc/lib/Xi/XUngrDvK.c delete mode 100644 xc/lib/Xi/Xi-def.cpp delete mode 100644 xc/lib/Xi/Xios2.def delete mode 100644 xc/lib/Xi/Xios2.rsp delete mode 100644 xc/lib/Xinerama/Imakefile delete mode 100644 xc/lib/Xinerama/Xinerama.c delete mode 100644 xc/lib/Xmu/AllCmap.c delete mode 100644 xc/lib/Xmu/Atoms.c delete mode 100644 xc/lib/Xmu/Atoms.h delete mode 100644 xc/lib/Xmu/CharSet.h delete mode 100644 xc/lib/Xmu/ClientWin.c delete mode 100644 xc/lib/Xmu/Clip.c delete mode 100644 xc/lib/Xmu/CloseHook.c delete mode 100644 xc/lib/Xmu/CloseHook.h delete mode 100644 xc/lib/Xmu/CmapAlloc.c delete mode 100644 xc/lib/Xmu/Converters.h delete mode 100644 xc/lib/Xmu/CrCmap.c delete mode 100644 xc/lib/Xmu/CrPixFBit.c delete mode 100644 xc/lib/Xmu/CurUtil.h delete mode 100644 xc/lib/Xmu/CursorName.c delete mode 100644 xc/lib/Xmu/CvtCache.c delete mode 100644 xc/lib/Xmu/CvtCache.h delete mode 100644 xc/lib/Xmu/CvtStdSel.c delete mode 100644 xc/lib/Xmu/DefErrMsg.c delete mode 100644 xc/lib/Xmu/DelCmap.c delete mode 100644 xc/lib/Xmu/DisplayQue.c delete mode 100644 xc/lib/Xmu/DisplayQue.h delete mode 100644 xc/lib/Xmu/Distinct.c delete mode 100644 xc/lib/Xmu/DrRndRect.c delete mode 100644 xc/lib/Xmu/DrawLogo.c delete mode 100644 xc/lib/Xmu/Drawing.h delete mode 100644 xc/lib/Xmu/Editres.h delete mode 100644 xc/lib/Xmu/EditresCom.c delete mode 100644 xc/lib/Xmu/EditresP.h delete mode 100644 xc/lib/Xmu/Error.h delete mode 100644 xc/lib/Xmu/ExtAgent.c delete mode 100644 xc/lib/Xmu/ExtAgent.h delete mode 100644 xc/lib/Xmu/FToCback.c delete mode 100644 xc/lib/Xmu/GetHost.c delete mode 100644 xc/lib/Xmu/GrayPixmap.c delete mode 100644 xc/lib/Xmu/Imakefile delete mode 100644 xc/lib/Xmu/Initer.c delete mode 100644 xc/lib/Xmu/Initer.h delete mode 100644 xc/lib/Xmu/LocBitmap.c delete mode 100644 xc/lib/Xmu/Lookup.c delete mode 100644 xc/lib/Xmu/Lookup.h delete mode 100644 xc/lib/Xmu/LookupCmap.c delete mode 100644 xc/lib/Xmu/Lower.c delete mode 100644 xc/lib/Xmu/Misc.h delete mode 100644 xc/lib/Xmu/README delete mode 100644 xc/lib/Xmu/RdBitF.c delete mode 100644 xc/lib/Xmu/ScrOfWin.c delete mode 100644 xc/lib/Xmu/ShapeWidg.c delete mode 100644 xc/lib/Xmu/StdCmap.c delete mode 100644 xc/lib/Xmu/StdCmap.h delete mode 100644 xc/lib/Xmu/StdSel.h delete mode 100644 xc/lib/Xmu/StrToBS.c delete mode 100644 xc/lib/Xmu/StrToBmap.c delete mode 100644 xc/lib/Xmu/StrToCurs.c delete mode 100644 xc/lib/Xmu/StrToGrav.c delete mode 100644 xc/lib/Xmu/StrToJust.c delete mode 100644 xc/lib/Xmu/StrToLong.c delete mode 100644 xc/lib/Xmu/StrToOrnt.c delete mode 100644 xc/lib/Xmu/StrToShap.c delete mode 100644 xc/lib/Xmu/StrToWidg.c delete mode 100644 xc/lib/Xmu/SysUtil.h delete mode 100644 xc/lib/Xmu/UpdMapHint.c delete mode 100644 xc/lib/Xmu/VisCmap.c delete mode 100644 xc/lib/Xmu/WhitePoint.h delete mode 100644 xc/lib/Xmu/WidgetNode.c delete mode 100644 xc/lib/Xmu/WidgetNode.h delete mode 100644 xc/lib/Xmu/WinUtil.h delete mode 100644 xc/lib/Xmu/Xct.c delete mode 100644 xc/lib/Xmu/Xct.h delete mode 100644 xc/lib/Xmu/Xmu-def.cpp delete mode 100644 xc/lib/Xmu/Xmu.h delete mode 100644 xc/lib/Xmu/Xmuos2.def delete mode 100644 xc/lib/Xmu/Xmuos2.rsp delete mode 100644 xc/lib/Xmu/sharedlib.c delete mode 100644 xc/lib/Xmuu/Imakefile delete mode 100644 xc/lib/Xmuu/Xmuu-def.cpp delete mode 100644 xc/lib/Xp/Imakefile delete mode 100644 xc/lib/Xp/Xp-def.cpp delete mode 100644 xc/lib/Xp/XpAttr.c delete mode 100644 xc/lib/Xp/XpContext.c delete mode 100644 xc/lib/Xp/XpDoc.c delete mode 100644 xc/lib/Xp/XpExtUtil.c delete mode 100644 xc/lib/Xp/XpExtUtil.h delete mode 100644 xc/lib/Xp/XpExtVer.c delete mode 100644 xc/lib/Xp/XpGetData.c delete mode 100644 xc/lib/Xp/XpImageRes.c delete mode 100644 xc/lib/Xp/XpInput.c delete mode 100644 xc/lib/Xp/XpJob.c delete mode 100644 xc/lib/Xp/XpLocale.c delete mode 100644 xc/lib/Xp/XpNotifyPdm.c delete mode 100644 xc/lib/Xp/XpPage.c delete mode 100644 xc/lib/Xp/XpPageDim.c delete mode 100644 xc/lib/Xp/XpPrinter.c delete mode 100644 xc/lib/Xp/XpPutData.c delete mode 100644 xc/lib/Xp/XpScreens.c delete mode 100644 xc/lib/Xp/Xpos2.def delete mode 100644 xc/lib/Xp/Xpos2.rsp delete mode 100644 xc/lib/Xpm/Imakefile delete mode 100644 xc/lib/Xpm/Xpm-def.cpp delete mode 100644 xc/lib/Xpm/Xpmos2.def delete mode 100644 xc/lib/Xpm/Xpmos2.rsp delete mode 100644 xc/lib/Xrandr/Imakefile delete mode 100644 xc/lib/Xrandr/Xrandr-def.cpp delete mode 100644 xc/lib/Xrandr/Xrandr.c delete mode 100644 xc/lib/Xrandr/Xrandr.h delete mode 100644 xc/lib/Xrandr/Xrandrint.h delete mode 100644 xc/lib/Xrandr/test.c delete mode 100644 xc/lib/Xrender/Composite.c delete mode 100644 xc/lib/Xrender/FillRect.c delete mode 100644 xc/lib/Xrender/FillRects.c delete mode 100644 xc/lib/Xrender/Glyph.c delete mode 100644 xc/lib/Xrender/Imakefile delete mode 100644 xc/lib/Xrender/Picture.c delete mode 100644 xc/lib/Xrender/Xrender-def.cpp delete mode 100644 xc/lib/Xrender/Xrender.c delete mode 100644 xc/lib/Xrender/Xrender.h delete mode 100644 xc/lib/Xrender/Xrenderint.h delete mode 100644 xc/lib/Xss/Imakefile delete mode 100644 xc/lib/Xss/XScrnSaver.c delete mode 100644 xc/lib/Xss/Xss-def.cpp delete mode 100644 xc/lib/Xss/Xssos2.def delete mode 100644 xc/lib/Xss/Xssos2.rsp delete mode 100644 xc/lib/Xt/ActionHook.c delete mode 100644 xc/lib/Xt/Alloc.c delete mode 100644 xc/lib/Xt/ArgList.c delete mode 100644 xc/lib/Xt/Callback.c delete mode 100644 xc/lib/Xt/CallbackI.h delete mode 100644 xc/lib/Xt/ClickTime.c delete mode 100644 xc/lib/Xt/Composite.c delete mode 100644 xc/lib/Xt/Composite.h delete mode 100644 xc/lib/Xt/CompositeP.h delete mode 100644 xc/lib/Xt/ConstrainP.h delete mode 100644 xc/lib/Xt/Constraint.c delete mode 100644 xc/lib/Xt/Constraint.h delete mode 100644 xc/lib/Xt/Convert.c delete mode 100644 xc/lib/Xt/ConvertI.h delete mode 100644 xc/lib/Xt/Converters.c delete mode 100644 xc/lib/Xt/Core.c delete mode 100644 xc/lib/Xt/Core.h delete mode 100644 xc/lib/Xt/CoreP.h delete mode 100644 xc/lib/Xt/Create.c delete mode 100644 xc/lib/Xt/Destroy.c delete mode 100644 xc/lib/Xt/Display.c delete mode 100644 xc/lib/Xt/Error.c delete mode 100644 xc/lib/Xt/Event.c delete mode 100644 xc/lib/Xt/EventI.h delete mode 100644 xc/lib/Xt/EventUtil.c delete mode 100644 xc/lib/Xt/Functions.c delete mode 100644 xc/lib/Xt/GCManager.c delete mode 100644 xc/lib/Xt/Geometry.c delete mode 100644 xc/lib/Xt/GetActKey.c delete mode 100644 xc/lib/Xt/GetResList.c delete mode 100644 xc/lib/Xt/GetValues.c delete mode 100644 xc/lib/Xt/HookObj.c delete mode 100644 xc/lib/Xt/HookObjI.h delete mode 100644 xc/lib/Xt/Hooks.c delete mode 100644 xc/lib/Xt/Imakefile delete mode 100644 xc/lib/Xt/InitialI.h delete mode 100644 xc/lib/Xt/Initialize.c delete mode 100644 xc/lib/Xt/Intrinsic.c delete mode 100644 xc/lib/Xt/Intrinsic.h delete mode 100644 xc/lib/Xt/IntrinsicI.h delete mode 100644 xc/lib/Xt/IntrinsicP.h delete mode 100644 xc/lib/Xt/Keyboard.c delete mode 100644 xc/lib/Xt/Manage.c delete mode 100644 xc/lib/Xt/NextEvent.c delete mode 100644 xc/lib/Xt/Object.c delete mode 100644 xc/lib/Xt/Object.h delete mode 100644 xc/lib/Xt/ObjectP.h delete mode 100644 xc/lib/Xt/PassivGraI.h delete mode 100644 xc/lib/Xt/PassivGrab.c delete mode 100644 xc/lib/Xt/Pointer.c delete mode 100644 xc/lib/Xt/Popup.c delete mode 100644 xc/lib/Xt/PopupCB.c delete mode 100644 xc/lib/Xt/RectObj.c delete mode 100644 xc/lib/Xt/RectObj.h delete mode 100644 xc/lib/Xt/RectObjP.h delete mode 100644 xc/lib/Xt/ResConfig.c delete mode 100644 xc/lib/Xt/ResConfigP.h delete mode 100644 xc/lib/Xt/ResourceI.h delete mode 100644 xc/lib/Xt/Resources.c delete mode 100644 xc/lib/Xt/Selection.c delete mode 100644 xc/lib/Xt/SelectionI.h delete mode 100644 xc/lib/Xt/SetSens.c delete mode 100644 xc/lib/Xt/SetValues.c delete mode 100644 xc/lib/Xt/SetWMCW.c delete mode 100644 xc/lib/Xt/Shell.c delete mode 100644 xc/lib/Xt/ShellI.h delete mode 100644 xc/lib/Xt/ShellP.h delete mode 100644 xc/lib/Xt/TMaction.c delete mode 100644 xc/lib/Xt/TMgrab.c delete mode 100644 xc/lib/Xt/TMkey.c delete mode 100644 xc/lib/Xt/TMparse.c delete mode 100644 xc/lib/Xt/TMprint.c delete mode 100644 xc/lib/Xt/TMstate.c delete mode 100644 xc/lib/Xt/Threads.c delete mode 100644 xc/lib/Xt/ThreadsI.h delete mode 100644 xc/lib/Xt/TranslateI.h delete mode 100644 xc/lib/Xt/VarCreate.c delete mode 100644 xc/lib/Xt/VarGet.c delete mode 100644 xc/lib/Xt/Varargs.c delete mode 100644 xc/lib/Xt/VarargsI.h delete mode 100644 xc/lib/Xt/Vendor.c delete mode 100644 xc/lib/Xt/Vendor.h delete mode 100644 xc/lib/Xt/VendorP.h delete mode 100644 xc/lib/Xt/Xt-def.cpp delete mode 100644 xc/lib/Xt/Xtos.h delete mode 100644 xc/lib/Xt/Xtos2.def delete mode 100644 xc/lib/Xt/Xtos2.rsp delete mode 100644 xc/lib/Xt/jump_funcs delete mode 100644 xc/lib/Xt/jump_ignore delete mode 100644 xc/lib/Xt/jump_vars delete mode 100644 xc/lib/Xt/libXt.elist delete mode 100644 xc/lib/Xt/sharedlib.c delete mode 100644 xc/lib/Xt/util/Shell.ht delete mode 100644 xc/lib/Xt/util/StrDefs.ct delete mode 100644 xc/lib/Xt/util/StrDefs.ht delete mode 100644 xc/lib/Xt/util/string.list delete mode 100644 xc/lib/Xtst/Imakefile delete mode 100644 xc/lib/Xtst/XRecord.c delete mode 100644 xc/lib/Xtst/XTest.c delete mode 100644 xc/lib/Xtst/Xtst-def.cpp delete mode 100644 xc/lib/Xtst/Xtstos2.def delete mode 100644 xc/lib/Xtst/Xtstos2.rsp delete mode 100644 xc/lib/Xv/Imakefile delete mode 100644 xc/lib/Xv/Xv.c delete mode 100644 xc/lib/Xv/Xvlibint.h delete mode 100644 xc/lib/XvMC/Imakefile delete mode 100644 xc/lib/XvMC/XvMC.c delete mode 100644 xc/lib/XvMC/XvMClibint.h delete mode 100644 xc/lib/Xxf86dga/Imakefile delete mode 100644 xc/lib/Xxf86dga/XF86DGA.c delete mode 100644 xc/lib/Xxf86dga/XF86DGA2.c delete mode 100644 xc/lib/Xxf86dga/Xxf86dga-def.cpp delete mode 100644 xc/lib/Xxf86dga/Xxf86dgaos2.def delete mode 100644 xc/lib/Xxf86dga/Xxf86dgaos2.rsp delete mode 100644 xc/lib/Xxf86misc/Imakefile delete mode 100644 xc/lib/Xxf86misc/XF86Misc.c delete mode 100644 xc/lib/Xxf86misc/Xxf86misc-def.cpp delete mode 100644 xc/lib/Xxf86misc/Xxf86miscos2.def delete mode 100644 xc/lib/Xxf86misc/Xxf86miscos2.rsp delete mode 100644 xc/lib/Xxf86rush/Imakefile delete mode 100644 xc/lib/Xxf86rush/XF86Rush.c delete mode 100644 xc/lib/Xxf86vm/Imakefile delete mode 100644 xc/lib/Xxf86vm/XF86VMode.c delete mode 100644 xc/lib/Xxf86vm/Xxf86vm-def.cpp delete mode 100644 xc/lib/Xxf86vm/Xxf86vmos2.def delete mode 100644 xc/lib/Xxf86vm/Xxf86vmos2.rsp delete mode 100644 xc/lib/dps/DPSCAP.h delete mode 100644 xc/lib/dps/DPSCAPClient.h delete mode 100644 xc/lib/dps/DPSCAPproto.h delete mode 100644 xc/lib/dps/Imakefile delete mode 100644 xc/lib/dps/XDPS.c delete mode 100644 xc/lib/dps/Xlibnet.h delete mode 100644 xc/lib/dps/Xstreams.h delete mode 100644 xc/lib/dps/csconndi.c delete mode 100644 xc/lib/dps/csfindNX.c delete mode 100644 xc/lib/dps/csfindNX.h delete mode 100644 xc/lib/dps/cslibext.c delete mode 100644 xc/lib/dps/cslibint.c delete mode 100644 xc/lib/dps/cslibint.h delete mode 100644 xc/lib/dps/csopendi.c delete mode 100644 xc/lib/dps/csstartNX.c delete mode 100644 xc/lib/dps/csstartNX.h delete mode 100644 xc/lib/dps/dps-def.cpp delete mode 100644 xc/lib/dps/dpsNXprops.h delete mode 100644 xc/lib/dps/dpsXclient.c delete mode 100644 xc/lib/dps/dpsXcmu.c delete mode 100644 xc/lib/dps/dpsXint.h delete mode 100644 xc/lib/dps/dpsXops.psw delete mode 100644 xc/lib/dps/dpsXpriv.c delete mode 100644 xc/lib/dps/dpsXpriv.h delete mode 100644 xc/lib/dps/dpsXtdisp.c delete mode 100644 xc/lib/dps/dpsabbrev.c delete mode 100644 xc/lib/dps/dpsassert.h delete mode 100644 xc/lib/dps/dpsclient.c delete mode 100644 xc/lib/dps/dpsclrops.psw delete mode 100644 xc/lib/dps/dpsctrlops.psw delete mode 100644 xc/lib/dps/dpsctxtops.psw delete mode 100644 xc/lib/dps/dpsdataops.psw delete mode 100644 xc/lib/dps/dpsdict.c delete mode 100644 xc/lib/dps/dpsdict.h delete mode 100644 xc/lib/dps/dpsendif.txt delete mode 100644 xc/lib/dps/dpsexcept.c delete mode 100644 xc/lib/dps/dpsfontops.psw delete mode 100644 xc/lib/dps/dpsgsttops.psw delete mode 100644 xc/lib/dps/dpsifdef.txt delete mode 100644 xc/lib/dps/dpsint.h delete mode 100644 xc/lib/dps/dpsioops.psw delete mode 100644 xc/lib/dps/dpsl2ops.psw delete mode 100644 xc/lib/dps/dpsmathops.psw delete mode 100644 xc/lib/dps/dpsmiscops.psw delete mode 100644 xc/lib/dps/dpsmtrxops.psw delete mode 100644 xc/lib/dps/dpsname.txt delete mode 100644 xc/lib/dps/dpsops.h.os2 delete mode 100644 xc/lib/dps/dpsopstack.psw delete mode 100644 xc/lib/dps/dpsos2.def delete mode 100644 xc/lib/dps/dpsos2.rsp delete mode 100644 xc/lib/dps/dpspathops.psw delete mode 100644 xc/lib/dps/dpspntops.psw delete mode 100644 xc/lib/dps/dpsprintf.c delete mode 100644 xc/lib/dps/dpsprivate.h delete mode 100644 xc/lib/dps/dpssimpint.h delete mode 100644 xc/lib/dps/dpssysnames.c delete mode 100644 xc/lib/dps/dpssysops.psw delete mode 100644 xc/lib/dps/dpswinops.psw delete mode 100644 xc/lib/dps/else.txt delete mode 100644 xc/lib/dps/genheader.cmd delete mode 100644 xc/lib/dps/header.txt delete mode 100644 xc/lib/dps/psXops.psw delete mode 100644 xc/lib/dps/psclrops.psw delete mode 100644 xc/lib/dps/psctrlops.psw delete mode 100644 xc/lib/dps/psctxtops.psw delete mode 100644 xc/lib/dps/psdataops.psw delete mode 100644 xc/lib/dps/psendif.txt delete mode 100644 xc/lib/dps/psfontops.psw delete mode 100644 xc/lib/dps/psgsttops.psw delete mode 100644 xc/lib/dps/psifdef.txt delete mode 100644 xc/lib/dps/psioops.psw delete mode 100644 xc/lib/dps/psl2ops.psw delete mode 100644 xc/lib/dps/psmathops.psw delete mode 100644 xc/lib/dps/psmiscops.psw delete mode 100644 xc/lib/dps/psmtrxops.psw delete mode 100644 xc/lib/dps/psname.txt delete mode 100644 xc/lib/dps/psops.h.os2 delete mode 100644 xc/lib/dps/psopstack.psw delete mode 100644 xc/lib/dps/pspathops.psw delete mode 100644 xc/lib/dps/pspntops.psw delete mode 100644 xc/lib/dps/pssysops.psw delete mode 100644 xc/lib/dps/pswinops.psw delete mode 100644 xc/lib/dps/publictypes.h delete mode 100644 xc/lib/dpstk/CSBwraps.psw delete mode 100644 xc/lib/dpstk/ColorSB.c delete mode 100644 xc/lib/dpstk/ColorSelect.ad delete mode 100644 xc/lib/dpstk/DPSScrollW.c delete mode 100644 xc/lib/dpstk/DSWwraps.psw delete mode 100644 xc/lib/dpstk/FSBwraps.psw delete mode 100644 xc/lib/dpstk/FontCreato.c delete mode 100644 xc/lib/dpstk/FontSB.c delete mode 100644 xc/lib/dpstk/FontSBI.h delete mode 100644 xc/lib/dpstk/FontSample.c delete mode 100644 xc/lib/dpstk/FontSelect.ad delete mode 100644 xc/lib/dpstk/Imakefile delete mode 100644 xc/lib/dpstk/XDPSpreview.c delete mode 100644 xc/lib/dpstk/XDPSpwraps.psw delete mode 100644 xc/lib/dpstk/XDPSshare.c delete mode 100644 xc/lib/dpstk/XDPSswraps.psw delete mode 100644 xc/lib/dpstk/XDPSuserpath.c delete mode 100644 xc/lib/dpstk/dpsXcommonI.h delete mode 100644 xc/lib/dpstk/dpstk-def.cpp delete mode 100644 xc/lib/dpstk/dpstkos2.def delete mode 100644 xc/lib/dpstk/dpstkos2.rsp delete mode 100644 xc/lib/dpstk/eyedrop16.xbm delete mode 100644 xc/lib/dpstk/eyedrop32.xbm delete mode 100644 xc/lib/dpstk/eyedropmask16.xbm delete mode 100644 xc/lib/dpstk/eyedropmask32.xbm delete mode 100644 xc/lib/dpstk/heyedrop.xbm delete mode 100644 xc/lib/dpstk/square.xbm delete mode 100644 xc/lib/dpstk/squaremask.xbm delete mode 100644 xc/lib/fontenc/Imakefile delete mode 100644 xc/lib/freetype2/Imakefile delete mode 100644 xc/lib/freetype2/freetype-def.cpp delete mode 100644 xc/lib/freetype2/freetype/Imakefile delete mode 100644 xc/lib/freetype2/freetype/cache/Imakefile delete mode 100644 xc/lib/freetype2/freetype/config/Imakefile delete mode 100644 xc/lib/freetype2/freetype/internal/Imakefile delete mode 100644 xc/lib/oldX/Imakefile delete mode 100644 xc/lib/oldX/X10.h delete mode 100644 xc/lib/oldX/XCrAssoc.c delete mode 100644 xc/lib/oldX/XDelAssoc.c delete mode 100644 xc/lib/oldX/XDestAssoc.c delete mode 100644 xc/lib/oldX/XDraw.c delete mode 100644 xc/lib/oldX/XLookAssoc.c delete mode 100644 xc/lib/oldX/XMakeAssoc.c delete mode 100644 xc/lib/oldX/oldX-def.cpp delete mode 100644 xc/lib/psres/Imakefile delete mode 100644 xc/lib/psres/PSres.c delete mode 100644 xc/lib/psres/psres-def.cpp delete mode 100644 xc/lib/psres/psresos2.def delete mode 100644 xc/lib/psres/psresos2.rsp delete mode 100644 xc/lib/xkbui/Imakefile delete mode 100644 xc/lib/xkbui/XKBui.c delete mode 100644 xc/lib/xkbui/XKBui.h delete mode 100644 xc/lib/xkbui/XKBuiPriv.h (limited to 'xc/lib') diff --git a/xc/lib/FS/FSClServ.c b/xc/lib/FS/FSClServ.c deleted file mode 100644 index 637ac6df4..000000000 --- a/xc/lib/FS/FSClServ.c +++ /dev/null @@ -1,86 +0,0 @@ -/* $TOG: FSClServ.c /main/9 1998/05/01 12:50:19 kaleb $ */ - -/* @(#)FSClServ.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/FS/FSClServ.c,v 1.3 1999/02/20 15:07:12 hohndel Exp $ */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlib.h" -#include "FSlibint.h" - -extern FSServer *_FSHeadOfServerList; - -int -FSCloseServer(svr) - FSServer *svr; -{ - _FSExtension *ext; - FSServer **sv = &_FSHeadOfServerList; - FSServer *s = _FSHeadOfServerList; - - svr->flags |= FSlibServerClosing; - (void) FSSync(svr, 1); /* throw out pending events */ - ext = svr->ext_procs; - while (ext) { - if (ext->close_server != NULL) - (*ext->close_server) (svr, &ext->codes); - ext = ext->next; - } - _FSDisconnectServer(svr->trans_conn); - while (s != NULL) { - if (s == svr) { - *sv = s->next; - _FSFreeServerStructure(svr); - break; - } - sv = &(s->next); - s = *sv; - } - if (_FSHeadOfServerList == NULL) { - _FSFreeQ(); - } - return 1; -} diff --git a/xc/lib/FS/FSCloseFt.c b/xc/lib/FS/FSCloseFt.c deleted file mode 100644 index a2445aeec..000000000 --- a/xc/lib/FS/FSCloseFt.c +++ /dev/null @@ -1,63 +0,0 @@ -/* $TOG: FSCloseFt.c /main/7 1998/05/01 12:50:25 kaleb $ */ - -/* @(#)FSCloseFt.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - - -int -FSCloseFont(svr, fid) - FSServer *svr; - Font fid; -{ - fsResourceReq *req; - - GetResReq(CloseFont, fid, req); - SyncHandle(); - return 1; -} diff --git a/xc/lib/FS/FSConnServ.c b/xc/lib/FS/FSConnServ.c deleted file mode 100644 index c3f801f81..000000000 --- a/xc/lib/FS/FSConnServ.c +++ /dev/null @@ -1,269 +0,0 @@ -/* $TOG: FSConnServ.c /main/29 1998/05/01 11:34:29 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $XFree86: xc/lib/FS/FSConnServ.c,v 3.6 1998/10/03 08:41:06 dawes Exp $ */ - -#include -#include "FSlibint.h" -#include "X11/Xpoll.h" -#ifdef NCD -#include -#endif -#ifdef WIN32 -#define ECHECK(err) (WSAGetLastError() == err) -#else -#ifdef ISC -#define ECHECK(err) ((errno == err) || errno == EAGAIN || errno == EWOULDBLOCK) -#else -#define ECHECK(err) (errno == err) -#endif -#endif - -#ifdef MINIX -#include -#define select(n,r,w,x,t) nbio_select(n,r,w,x,t) -#endif - -/* - * Attempts to connect to server, given server name. Returns transport - * connection object or NULL if connection fails. - */ - -#define FS_CONNECTION_RETRIES 5 - -XtransConnInfo -_FSConnectServer(server_name) - char *server_name; -{ - XtransConnInfo trans_conn; /* transport connection object */ - int retry, connect_stat; - int madeConnection = 0; - - /* - * Open the network connection. - */ - - for (retry = FS_CONNECTION_RETRIES; retry >= 0; retry--) - { - if ((trans_conn = _FSTransOpenCOTSClient(server_name)) == NULL) - { - break; - } - - if ((connect_stat = _FSTransConnect(trans_conn,server_name)) < 0) - { - _FSTransClose(trans_conn); - - if (connect_stat == TRANS_TRY_CONNECT_AGAIN) - { - sleep(1); - continue; - } - else - break; - } - else - { - madeConnection = 1; - break; - } - } - - if (!madeConnection) - return (NULL); - - - /* - * set it non-blocking. This is so we can read data when blocked for - * writing in the library. - */ - - _FSTransSetOption(trans_conn, TRANS_NONBLOCKING, 1); - - return (trans_conn); -} - -/* - * Disconnect from server. - */ - -void -_FSDisconnectServer(trans_conn) - XtransConnInfo trans_conn; - -{ - (void) _FSTransClose(trans_conn); -} - -#ifndef __NetBSD__ -#undef NULL -#define NULL ((char *) 0) -#endif -/* - * This is an OS dependent routine which: - * 1) returns as soon as the connection can be written on.... - * 2) if the connection can be read, must enqueue events and handle errors, - * until the connection is writable. - */ -void _FSWaitForWritable(svr) - FSServer *svr; -{ - fd_set r_mask; - fd_set w_mask; - int nfound; - - FD_ZERO(&r_mask); - FD_ZERO(&w_mask); - - while (1) { - FD_SET(svr->fd, &r_mask); - FD_SET(svr->fd, &w_mask); - - do { -#ifndef AMOEBA - nfound = Select(svr->fd + 1, &r_mask, &w_mask, NULL, NULL); -#else /* AMOEBA */ - if (_FSTransAmSelect(svr->fd, 0) > 0) { - BITSET(r_mask, svr->fd); - } else { - CLEARBITS(r_mask); - } - /* Always immediately writable because data is enqueued to be - * written by separate virtual circuit threads. - */ - nfound = 1; - BITSET(w_mask, svr->fd); -#endif /* AMOEBA */ - if (nfound < 0 && !ECHECK(EINTR)) - (*_FSIOErrorFunction) (svr); - } while (nfound <= 0); - - if (XFD_ANYSET(&r_mask)) { - char buf[BUFSIZE]; - BytesReadable_t pend_not_register; - register BytesReadable_t pend; - register fsEvent *ev; - - /* find out how much data can be read */ - if (_FSTransBytesReadable(svr->trans_conn, &pend_not_register) < 0) - (*_FSIOErrorFunction) (svr); - pend = pend_not_register; - - /* - * must read at least one fsEvent; if none is pending, then we'll - * just block waiting for it - */ - if (pend < SIZEOF(fsEvent)) - pend = SIZEOF(fsEvent); - - /* but we won't read more than the max buffer size */ - if (pend > BUFSIZE) - pend = BUFSIZE; - - /* round down to an integral number of FSReps */ - pend = (pend / SIZEOF(fsEvent)) * SIZEOF(fsEvent); - - _FSRead(svr, buf, pend); - - /* no space between comma and type or else macro will die */ - STARTITERATE(ev, fsEvent, buf, (pend > 0), - (pend -= SIZEOF(fsEvent))) { - if (ev->type == FS_Error) - _FSError(svr, (fsError *) ev); - else /* it's an event packet; enqueue it */ - _FSEnq(svr, ev); - } - ENDITERATE - } - if (XFD_ANYSET(&w_mask)) - return; - } -} - - -void _FSWaitForReadable(svr) - FSServer *svr; -{ - fd_set r_mask; - int result; - - FD_ZERO(&r_mask); - do { - FD_SET(svr->fd, &r_mask); -#ifndef AMOEBA - result = Select(svr->fd + 1, &r_mask, NULL, NULL, NULL); -#else - if ((result = _FSTransAmSelect(svr->fd, 0)) > 0) { - BITSET(r_mask, svr->fd); - } else { - CLEARBITS(r_mask); - } -#endif - if (result == -1 && !ECHECK(EINTR)) - (*_FSIOErrorFunction) (svr); - } while (result <= 0); -} - -void _FSSendClientPrefix(svr, client) - FSServer *svr; - fsConnClientPrefix *client; -{ - struct iovec iovarray[5], - *iov = iovarray; - int niov = 0; - -#define add_to_iov(b,l) \ - { iov->iov_base = (b); iov->iov_len = (l); iov++, niov++; } - - add_to_iov((caddr_t) client, SIZEOF(fsConnClientPrefix)); - -#undef add_to_iov - - (void) _FSTransWritev(svr->trans_conn, iovarray, niov); - return; -} diff --git a/xc/lib/FS/FSErrDis.c b/xc/lib/FS/FSErrDis.c deleted file mode 100644 index f25a9b0d7..000000000 --- a/xc/lib/FS/FSErrDis.c +++ /dev/null @@ -1,114 +0,0 @@ -/* $TOG: FSErrDis.c /main/8 1998/05/01 12:50:29 kaleb $ */ - -/* @(#)FSErrDis.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include -#include "FSlibint.h" -#include - -char *FSErrorList[] = { - /* FSBadRequest */ "BadRequest, invalid request code or no such operation", - /* FSBadFormat */ "BadFormat, bad font format mask", - /* FSBadFont */ "BadFont, invalid Font parameter", - /* FSBadRange */ "BadRange, invalid character range attributes", - /* FSBadEventMask */ "BadEventMask, illegal event mask", - /* FSBadAccessContext */ "BadAccessContext, insufficient permissions for operation", - /* FSBadIDChoice */ "BadIDChoice, invalid resource ID chosen for this connection", - /* FSBadName */ "BadName, named font does not exist", - /* FSBadResolution */ "BadResolution, improperly formatted resolution", - /* FSBadAlloc */ "BadAlloc, insufficient resources for operation", - /* FSBadLength */ "BadLength, request too large or internal FSlib length error", - /* FSBadImplementation */ "BadImplementation, request unsupported", -}; -int FSErrorListSize = sizeof(FSErrorList); - - -/* ARGSUSED */ -int FSGetErrorDatabaseText(svr, name, type, defaultp, buffer, nbytes) - register char *name, - *type; - char *defaultp; - FSServer *svr; - char *buffer; - int nbytes; -{ - if (nbytes == 0) - return 0; - (void) strncpy(buffer, (char *) defaultp, nbytes); - if ((strlen(defaultp) + 1) > nbytes) - buffer[nbytes - 1] = '\0'; - return 1; -} - -int FSGetErrorText(svr, code, buffer, nbytes) - register int code; - register FSServer *svr; - char *buffer; - int nbytes; -{ - - char *defaultp = NULL; - char buf[32]; - register _FSExtension *ext; - - if (nbytes == 0) - return 0; - sprintf(buf, "%d", code); - if (code <= (FSErrorListSize / sizeof(char *)) && code > 0) { - defaultp = FSErrorList[code]; - FSGetErrorDatabaseText(svr, "FSProtoError", buf, defaultp, buffer, nbytes); - } - ext = svr->ext_procs; - while (ext) { /* call out to any extensions interested */ - if (ext->error_string != NULL) - (*ext->error_string) (svr, code, &ext->codes, buffer, nbytes); - ext = ext->next; - } - return 1; -} - diff --git a/xc/lib/FS/FSErrHndlr.c b/xc/lib/FS/FSErrHndlr.c deleted file mode 100644 index 355bd208b..000000000 --- a/xc/lib/FS/FSErrHndlr.c +++ /dev/null @@ -1,77 +0,0 @@ -/* $TOG: FSErrHndlr.c /main/5 1998/02/06 13:42:28 kaleb $ */ - -/* @(#)FSErrHndlr.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. -*/ -/* $XFree86: xc/lib/FS/FSErrHndlr.c,v 1.3 1999/02/20 15:07:12 hohndel Exp $ */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -FSErrorHandler -FSSetErrorHandler(FSErrorHandler handler) -{ - FSErrorHandler oldhandler = _FSErrorFunction; - - if (handler != NULL) { - _FSErrorFunction = handler; - } else { - _FSErrorFunction = _FSDefaultError; - } - return oldhandler; -} - -FSIOErrorHandler -FSSetIOErrorHandler(FSIOErrorHandler handler) -{ - FSIOErrorHandler oldhandler = _FSIOErrorFunction; - - if (handler != NULL) { - _FSIOErrorFunction = handler; - } else { - _FSIOErrorFunction = _FSDefaultIOError; - } - return oldhandler; -} diff --git a/xc/lib/FS/FSFlush.c b/xc/lib/FS/FSFlush.c deleted file mode 100644 index 116c2250b..000000000 --- a/xc/lib/FS/FSFlush.c +++ /dev/null @@ -1,56 +0,0 @@ -/* $TOG: FSFlush.c /main/6 1998/05/01 11:34:38 kaleb $ */ - -/* @(#)FSFlush.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -#include "FSlibint.h" - -int FSFlush(svr) - FSServer *svr; -{ - _FSFlush(svr); - return 1; -} diff --git a/xc/lib/FS/FSFontInfo.c b/xc/lib/FS/FSFontInfo.c deleted file mode 100644 index 986be4a13..000000000 --- a/xc/lib/FS/FSFontInfo.c +++ /dev/null @@ -1,323 +0,0 @@ -/* $TOG: FSFontInfo.c /main/9 1998/05/01 12:50:34 kaleb $ */ -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -#include "FSlibint.h" - -char ** -FSListFontsWithXInfo(svr, pattern, maxNames, count, info, pprops, offsets, prop_data) - FSServer *svr; - char *pattern; - int maxNames; - int *count; - FSXFontInfoHeader ***info; - FSPropInfo ***pprops; - FSPropOffset ***offsets; - unsigned char ***prop_data; -{ - long nbytes; - int i, - j; - int size = 0; - FSXFontInfoHeader **fhdr = (FSXFontInfoHeader **) 0; - FSPropInfo **pi = (FSPropInfo **) 0; - FSPropOffset **po = (FSPropOffset **) 0; - unsigned char **pd = (unsigned char **) 0; - char **flist = NULL; - fsListFontsWithXInfoReply reply; - fsListFontsWithXInfoReq *req; - fsPropInfo local_pi; - fsPropOffset local_po; - Status status; - - GetReq(ListFontsWithXInfo, req); - req->maxNames = maxNames; - nbytes = req->nbytes = pattern ? strlen(pattern) : 0; - req->length += (nbytes + 3) >> 2; - _FSSend(svr, pattern, nbytes); - - for (i = 0;; i++) { - if (FSProtocolVersion(svr) > 1) - { - status = _FSReply(svr, (fsReply *) &reply, 0, fsFalse); - if (status != 0 && reply.nameLength == 0) /* got last reply */ - break; - if (status) - _FSRead(svr, ((char *) &reply) + SIZEOF(fsGenericReply), - SIZEOF(fsListFontsWithXInfoReply) - - SIZEOF(fsGenericReply)); - } else { - status = _FSReply(svr, (fsReply *) & reply, - ((SIZEOF(fsListFontsWithXInfoReply) - - SIZEOF(fsGenericReply)) >> 2), fsFalse); - } - if (!status) { - for (j = (i - 1); j >= 0; j--) { - FSfree((char *) fhdr[j]); - FSfree((char *) pi[j]); - FSfree((char *) po[j]); - FSfree((char *) pd[j]); - FSfree(flist[j]); - } - if (flist) - FSfree((char *) flist); - if (fhdr) - FSfree((char *) fhdr); - if (pi) - FSfree((char *) pi); - if (po) - FSfree((char *) po); - if (pd) - FSfree((char *) pd); - - SyncHandle(); - return (char **) NULL; - } - if (reply.nameLength == 0) /* got last reply in version 1 */ - break; - if ((i + reply.nReplies) >= size) { - size = i + reply.nReplies + 1; - - if (fhdr) { - FSXFontInfoHeader **tmp_fhdr = (FSXFontInfoHeader **) - FSrealloc((char *) fhdr, - (unsigned) (sizeof(FSXFontInfoHeader *) * size)); - char **tmp_flist = (char **) FSrealloc((char *) flist, - (unsigned) (sizeof(char *) * size)); - FSPropInfo **tmp_pi = (FSPropInfo **) - FSrealloc((char *) pi, - (unsigned) (sizeof(FSPropInfo *) * size)); - FSPropOffset **tmp_po = (FSPropOffset **) - FSrealloc((char *) po, - (unsigned) (sizeof(FSPropOffset *) * size)); - unsigned char **tmp_pd = (unsigned char **) - FSrealloc((char *) pd, - (unsigned) (sizeof(unsigned char *) * size)); - - if (!tmp_fhdr || !tmp_flist || !tmp_pi || !tmp_po || !tmp_pd) { - for (j = (i - 1); j >= 0; j--) { - FSfree((char *) flist[j]); - FSfree((char *) fhdr[j]); - FSfree((char *) pi[j]); - FSfree((char *) po[j]); - FSfree((char *) pd[j]); - } - if (tmp_flist) - FSfree((char *) tmp_flist); - else - FSfree((char *) flist); - if (tmp_fhdr) - FSfree((char *) tmp_fhdr); - else - FSfree((char *) fhdr); - if (tmp_pi) - FSfree((char *) tmp_pi); - else - FSfree((char *) pi); - if (tmp_po) - FSfree((char *) tmp_po); - else - FSfree((char *) po); - if (tmp_pd) - FSfree((char *) tmp_pd); - else - FSfree((char *) pd); - goto clearwire; - } - fhdr = tmp_fhdr; - flist = tmp_flist; - pi = tmp_pi; - po = tmp_po; - pd = tmp_pd; - } else { - if (!(fhdr = (FSXFontInfoHeader **) - FSmalloc((unsigned) (sizeof(FSXFontInfoHeader *) * size)))) - goto clearwire; - if (!(flist = (char **) - FSmalloc((unsigned) (sizeof(char *) * size)))) { - FSfree((char *) fhdr); - goto clearwire; - } - if (!(pi = (FSPropInfo **) - FSmalloc((unsigned) (sizeof(FSPropInfo *) * size)))) { - FSfree((char *) fhdr); - FSfree((char *) flist); - goto clearwire; - } - if (!(po = (FSPropOffset **) - FSmalloc((unsigned) (sizeof(FSPropOffset *) * size)))) { - FSfree((char *) fhdr); - FSfree((char *) flist); - FSfree((char *) pi); - goto clearwire; - } - if (!(pd = (unsigned char **) - FSmalloc((unsigned) (sizeof(unsigned char *) * size)))) { - FSfree((char *) fhdr); - FSfree((char *) flist); - FSfree((char *) pi); - FSfree((char *) po); - goto clearwire; - } - } - } - fhdr[i] = (FSXFontInfoHeader *) FSmalloc(sizeof(FSXFontInfoHeader)); - if (!fhdr[i]) { - goto badmem; - } - FSUnpack_XFontInfoHeader(&reply, fhdr[i], FSProtocolVersion(svr)); - - /* alloc space for the name */ - flist[i] = (char *) FSmalloc((unsigned int) (reply.nameLength + 1)); - if (FSProtocolVersion(svr) == 1) - { - /* get the name */ - if (!flist[i]) { - nbytes = (reply.nameLength + 3) & ~3; - _FSEatData(svr, (unsigned long) nbytes); - goto badmem; - } - _FSReadPad(svr, flist[i], (long) reply.nameLength); - flist[i][reply.nameLength] = '\0'; - } - - pi[i] = (FSPropInfo *) FSmalloc(sizeof(FSPropInfo)); - if (!pi[i]) { - FSfree((char *) fhdr[i]); - goto badmem; - } - _FSReadPad(svr, (char *) &local_pi, SIZEOF(fsPropInfo)); - pi[i]->num_offsets = local_pi.num_offsets; - pi[i]->data_len = local_pi.data_len; - - po[i] = (FSPropOffset *) - FSmalloc(pi[i]->num_offsets * sizeof(FSPropOffset)); - if (!po[i]) { - FSfree((char *) fhdr[i]); - FSfree((char *) pi[i]); - goto badmem; - } - pd[i] = (unsigned char *) FSmalloc(pi[i]->data_len); - if (!pd[i]) { - FSfree((char *) fhdr[i]); - FSfree((char *) pi[i]); - FSfree((char *) po[i]); - goto badmem; - } - /* get offsets */ - for (j=0; jnum_offsets; j++) - { - _FSReadPad(svr, (char *) &local_po, SIZEOF(fsPropOffset)); - po[i][j].name.position = local_po.name.position; - po[i][j].name.length = local_po.name.length; - po[i][j].value.position = local_po.value.position; - po[i][j].value.length = local_po.value.length; - po[i][j].type = local_po.type; - } - - /* get prop data */ - if (FSProtocolVersion(svr) == 1) - _FSReadPad(svr, (char *) pd[i], pi[i]->data_len); - else - _FSRead(svr, (char *) pd[i], pi[i]->data_len); - - if (FSProtocolVersion(svr) != 1) - { - /* get the name */ - if (!flist[i]) { - nbytes = (reply.nameLength + 3) & ~3; - _FSEatData(svr, (unsigned long) nbytes); - goto badmem; - } - _FSRead(svr, flist[i], (long) reply.nameLength); - flist[i][reply.nameLength] = '\0'; - - nbytes = pi[i]->data_len + reply.nameLength; - _FSEatData(svr, (unsigned long) (((nbytes+3)&~3) - nbytes)); - } - } - *info = fhdr; - *count = i; - *pprops = pi; - *offsets = po; - *prop_data = pd; - SyncHandle(); - return flist; - -badmem: - for (j = (i - 1); j >= 0; j--) { - FSfree((char *) pi[j]); - FSfree((char *) po[j]); - FSfree((char *) pd[j]); - FSfree(flist[j]); - FSfree((char *) fhdr[j]); - } - if (flist) - FSfree((char *) flist); - if (fhdr) - FSfree((char *) fhdr); - if (pi) - FSfree((char *) pi); - if (po) - FSfree((char *) po); - if (pd) - FSfree((char *) pd); - - -clearwire: - do { - fsPropInfo ti; - - _FSEatData(svr, (reply.nameLength + 3) & ~3); - _FSReadPad(svr, (char *) &ti, SIZEOF(fsPropInfo)); - _FSEatData(svr, (SIZEOF(fsPropOffset) * ti.num_offsets)); - _FSEatData(svr, ti.data_len); - } while (_FSReply(svr, (fsReply *) & reply, - ((SIZEOF(fsListFontsWithXInfoReply) - - SIZEOF(fsGenericReply)) >> 2), fsFalse) && (reply.nameLength != 0)); - SyncHandle(); - return (char **) NULL; -} diff --git a/xc/lib/FS/FSFtNames.c b/xc/lib/FS/FSFtNames.c deleted file mode 100644 index b7c9d8a85..000000000 --- a/xc/lib/FS/FSFtNames.c +++ /dev/null @@ -1,119 +0,0 @@ -/* $TOG: FSFtNames.c /main/7 1998/05/01 11:34:42 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -char ** -FSListFonts(svr, pattern, maxNames, actualCount) - FSServer *svr; - char *pattern; - int maxNames; - int *actualCount; -{ - long nbytes; - int i, - length; - char **flist; - char *c; - fsListFontsReply rep; - fsListFontsReq *req; - long rlen; - - GetReq(ListFonts, req); - req->maxNames = maxNames; - nbytes = req->nbytes = pattern ? strlen(pattern) : 0; - req->length += (nbytes + 3) >> 2; - _FSSend(svr, pattern, nbytes); - if (!_FSReply(svr, (fsReply *) & rep, - (SIZEOF(fsListFontsReply) - SIZEOF(fsGenericReply)) >> 2, fsFalse)) - return (char **) 0; - - if (rep.nFonts) { - flist = (char **) FSmalloc((unsigned) rep.nFonts * sizeof(char *)); - rlen = (rep.length << 2) - SIZEOF(fsListFontsReply); - c = (char *) FSmalloc((unsigned) (rlen + 1)); - - if ((!flist) || (!c)) { - if (flist) - FSfree((char *) flist); - if (c) - FSfree(c); - _FSEatData(svr, (unsigned long) rlen); - SyncHandle(); - return (char **) NULL; - } - _FSReadPad(svr, c, rlen); - /* unpack */ - length = *(unsigned char *)c; - for (i = 0; i < rep.nFonts; i++) { - flist[i] = c + 1; - c += length + 1; - length = *(unsigned char *)c; - *c = '\0'; - } - } else { - - flist = (char **) NULL; - } - - *actualCount = rep.nFonts; - SyncHandle(); - return flist; - -} - -int FSFreeFontNames(list) - char **list; -{ - if (list) { - FSfree(list[0] - 1); - FSfree((char *) list); - } - return 1; -} diff --git a/xc/lib/FS/FSGetCats.c b/xc/lib/FS/FSGetCats.c deleted file mode 100644 index 84687abc0..000000000 --- a/xc/lib/FS/FSGetCats.c +++ /dev/null @@ -1,102 +0,0 @@ -/* $TOG: FSGetCats.c /main/4 1998/02/06 13:42:48 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -char ** -FSGetCatalogues(svr, num) - FSServer *svr; - int *num; -{ - fsGetCataloguesReply rep; - char **list; - char *c; - int i, - length; - fsReq *req; - long rlen; - - GetEmptyReq(GetCatalogues, req); - - if (!_FSReply(svr, (fsReply *) & rep, 0, fsFalse)) { - SyncHandle(); - return (char **) NULL; - } - if (rep.num_catalogues) { - list = (char **) - FSmalloc((unsigned) (rep.num_catalogues * sizeof(char *))); - rlen = (rep.length << 2) - SIZEOF(fsGetCataloguesReply); - c = (char *) FSmalloc((unsigned) rlen + 1); - if ((!list) || (!c)) { - if (list) - FSfree((char *) list); - if (c) - FSfree(c); - _FSEatData(svr, (unsigned long) rlen); - SyncHandle(); - return (char **) NULL; - } - _FSReadPad(svr, c, rlen); - /* - * unpack the strings - */ - length = *c; - for (i = 0; i < (int)rep.num_catalogues; i++) { - list[i] = c + 1; /* skip length */ - c += length + 1; /* find next length */ - length = *c; - *c = '\0'; /* change length to NULL */ - } - } else { - list = (char **) NULL; - } - SyncHandle(); - *num = rep.num_catalogues; - return list; -} diff --git a/xc/lib/FS/FSListCats.c b/xc/lib/FS/FSListCats.c deleted file mode 100644 index b1520a9b7..000000000 --- a/xc/lib/FS/FSListCats.c +++ /dev/null @@ -1,120 +0,0 @@ -/* $TOG: FSListCats.c /main/6 1998/05/01 12:58:31 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -char ** -FSListCatalogues(svr, pattern, maxNames, actualCount) - FSServer *svr; - char *pattern; - int maxNames; - int *actualCount; -{ - long nbytes; - int i, - length; - char **clist; - char *c; - fsListCataloguesReply rep; - fsListCataloguesReq *req; - long rlen; - - GetReq(ListCatalogues, req); - req->maxNames = maxNames; - nbytes = req->nbytes = pattern ? strlen(pattern) : 0; - req->length += (nbytes + 3) >> 2; - _FSSend(svr, pattern, nbytes); - if (!_FSReply(svr, (fsReply *) & rep, - (SIZEOF(fsListCataloguesReply) - SIZEOF(fsGenericReply)) >> 2, fsFalse)) - return (char **) 0; - - if (rep.num_catalogues) { - clist = (char **) - FSmalloc((unsigned) rep.num_catalogues * sizeof(char *)); - rlen = (rep.length << 2) - SIZEOF(fsListCataloguesReply); - c = (char *) FSmalloc((unsigned) (rlen + 1)); - - if ((!clist) || (!c)) { - if (clist) - FSfree((char *) clist); - if (c) - FSfree(c); - _FSEatData(svr, (unsigned long) rlen); - SyncHandle(); - return (char **) NULL; - } - _FSReadPad(svr, c, rlen); - /* unpack */ - length = *c; - for (i = 0; i < rep.num_catalogues; i++) { - clist[i] = c + 1; - c += length + 1; - length = *c; - *c = '\0'; - } - } else { - - clist = (char **) NULL; - } - - *actualCount = rep.num_catalogues; - SyncHandle(); - return clist; - -} - -int FSFreeCatalogues(list) - char **list; -{ - if (list) { - FSfree(list[0] - 1); - FSfree((char *) list); - } - return 1; -} diff --git a/xc/lib/FS/FSListExt.c b/xc/lib/FS/FSListExt.c deleted file mode 100644 index f781a54e0..000000000 --- a/xc/lib/FS/FSListExt.c +++ /dev/null @@ -1,112 +0,0 @@ -/* $TOG: FSListExt.c /main/7 1998/05/01 11:34:51 kaleb $ */ - -/* @(#)FSListExt.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -char ** -FSListExtensions(svr, next) - FSServer *svr; - int *next; -{ - fsListExtensionsReply rep; - char **list; - char *c; - int i, - length; - fsReq *req; - long rlen; - - GetEmptyReq(ListExtensions, req); - - if (!_FSReply(svr, (fsReply *) & rep, 0, fsFalse)) { - SyncHandle(); - return (char **) NULL; - } - if (rep.nExtensions) { - list = (char **) FSmalloc((unsigned)(rep.nExtensions * sizeof(char *))); - rlen = (rep.length << 2) - SIZEOF(fsListExtensionsReply); - c = (char *) FSmalloc((unsigned) rlen + 1); - if ((!list) || (!c)) { - if (list) - FSfree((char *) list); - if (c) - FSfree(c); - _FSEatData(svr, (unsigned long) rlen); - SyncHandle(); - return (char **) NULL; - } - _FSReadPad(svr, c, rlen); - /* - * unpack the strings - */ - length = *c; - for (i = 0; i < rep.nExtensions; i++) { - list[i] = c + 1; /* skip length */ - c += length + 1; /* find next length */ - length = *c; - *c = '\0'; /* change length to NULL */ - } - } else { - list = (char **) NULL; - } - SyncHandle(); - *next = rep.nExtensions; - return list; - -} - -int FSFreeExtensionList(list) - char **list; -{ - if (list != NULL) { - FSfree(list[0] - 1); - FSfree((char *) list); - } - return 1; -} diff --git a/xc/lib/FS/FSMisc.c b/xc/lib/FS/FSMisc.c deleted file mode 100644 index 721c6c30a..000000000 --- a/xc/lib/FS/FSMisc.c +++ /dev/null @@ -1,57 +0,0 @@ -/* $TOG: FSMisc.c /main/5 1998/02/06 13:43:27 kaleb $ */ - -/* @(#)FSMisc.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -long -FSMaxRequestSize(svr) - FSServer *svr; -{ - return svr->max_request_size; -} diff --git a/xc/lib/FS/FSNextEv.c b/xc/lib/FS/FSNextEv.c deleted file mode 100644 index 131397e34..000000000 --- a/xc/lib/FS/FSNextEv.c +++ /dev/null @@ -1,72 +0,0 @@ -/* $TOG: FSNextEv.c /main/7 1998/05/01 11:34:56 kaleb $ */ - -/* @(#)FSNextEv.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -extern _FSQEvent *_FSqfree; - -int FSNextEvent(svr, event) - FSServer *svr; - FSEvent *event; -{ - _FSQEvent *qelt; - - if (svr->head == NULL) - _FSReadEvents(svr); - qelt = svr->head; - *event = qelt->event; - - if ((svr->head = qelt->next) == NULL) - svr->tail = NULL; - qelt->next = _FSqfree; - _FSqfree = qelt; - svr->qlen--; - - return 1; -} diff --git a/xc/lib/FS/FSOpenFont.c b/xc/lib/FS/FSOpenFont.c deleted file mode 100644 index 341d2dc31..000000000 --- a/xc/lib/FS/FSOpenFont.c +++ /dev/null @@ -1,85 +0,0 @@ -/* $TOG: FSOpenFont.c /main/8 1998/05/17 16:30:48 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/FS/FSOpenFont.c,v 1.4 1999/02/25 06:00:55 dawes Exp $ */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -Font -FSOpenBitmapFont(svr, hint, fmask, name, otherid) - FSServer *svr; - FSBitmapFormat hint; - FSBitmapFormatMask fmask; - char *name; - Font *otherid; -{ - unsigned char nbytes; - fsOpenBitmapFontReq *req; - fsOpenBitmapFontReply reply; - Font fid; - char buf[256]; - - nbytes = name ? strlen(name) : 0; - if (nbytes > 255) return 0; - GetReq(OpenBitmapFont, req); - buf[0] = nbytes; - memcpy(&buf[1], name, nbytes); - nbytes++; - req->fid = fid = svr->resource_id++; - req->format_hint = hint; - req->format_mask = fmask; - req->length += (nbytes + 3) >> 2; - _FSSend(svr, buf, (long) nbytes); - if (!_FSReply(svr, (fsReply *) & reply, - (SIZEOF(fsOpenBitmapFontReply)-SIZEOF(fsGenericReply)) >> 2, - fsFalse)) - return 0; - *otherid = reply.otherid; - SyncHandle(); - return fid; -} diff --git a/xc/lib/FS/FSOpenServ.c b/xc/lib/FS/FSOpenServ.c deleted file mode 100644 index 9c4943347..000000000 --- a/xc/lib/FS/FSOpenServ.c +++ /dev/null @@ -1,272 +0,0 @@ -/* $TOG: FSOpenServ.c /main/8 1998/05/01 11:35:00 kaleb $ */ - -/* @(#)FSOpenServ.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/FS/FSOpenServ.c,v 1.3 1999/02/20 15:07:13 hohndel Exp $ */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -/* - * does initial handshake w/ font server - */ - -#include -#include "FSlibint.h" -#include - -int _FSdebug = 0; - -static fsReq _dummy_request = { - 0, 0, 0 -}; - -static void OutOfMemory ( FSServer *svr, char *setup ); - -FSServer *_FSHeadOfServerList = NULL; - -void _FSFreeServerStructure(svr) - FSServer *svr; -{ - if (svr->server_name) - FSfree(svr->server_name); - if (svr->vendor) - FSfree(svr->vendor); - - if (svr->buffer) - FSfree(svr->buffer); - - FSfree((char *) svr); -} - -static -void OutOfMemory(svr, setup) - FSServer *svr; - char *setup; -{ - - _FSDisconnectServer(svr->trans_conn); - _FSFreeServerStructure(svr); - FSfree(setup); - errno = ENOMEM; -} - -/* - * connects to a server, makes a FSServer object and returns a pointer - * to it - */ - -FSServer * -FSOpenServer(server) - char *server; -{ - FSServer *svr; - int i; - int endian; - fsConnClientPrefix client; - fsConnSetup prefix; - char *setup; - fsConnSetupAccept conn; - char *auth_data; - char *alt_data, - *ad; - AlternateServer *alts; - int altlen; - char *vendor_string; - long setuplength; -#ifdef X_NOT_STDC_ENV - extern char *getenv(); -#endif - - if (server == NULL || *server == '\0') { - if ((server = getenv("FONTSERVER")) == NULL) { - return (FSServer *) NULL; - } - } - - if ((svr = (FSServer *) FScalloc(1, sizeof(FSServer))) == NULL) { - errno = ENOMEM; - return (FSServer *) NULL; - } - if ((svr->trans_conn = _FSConnectServer(server)) == NULL) { - FSfree((char *) svr); - return (FSServer *) NULL; - } - - svr->fd = _FSTransGetConnectionNumber (svr->trans_conn); - - endian = 1; - if (*(char *) &endian) - client.byteOrder = 'l'; - else - client.byteOrder = 'B'; - client.major_version = FS_PROTOCOL; - client.minor_version = FS_PROTOCOL_MINOR; -/* XXX -- fix this when we have some auths */ - client.num_auths = 0; - client.auth_len = 0; - _FSSendClientPrefix(svr, &client); - -/* see if connection was accepted */ - _FSRead(svr, (char *) &prefix, (long) SIZEOF(fsConnSetup)); - - setuplength = prefix.alternate_len << 2; - if ((alt_data = (char *) - (setup = FSmalloc((unsigned) setuplength))) == NULL) { - errno = ENOMEM; - FSfree((char *) svr); - return (FSServer *) NULL; - } - _FSRead(svr, (char *) alt_data, setuplength); - ad = alt_data; - - alts = (AlternateServer *) - FSmalloc(sizeof(AlternateServer) * prefix.num_alternates); - if (!alts) { - errno = ENOMEM; - FSfree((char *) svr); - return (FSServer *) 0; - } - for (i = 0; i < prefix.num_alternates; i++) { - alts[i].subset = (Bool) *ad++; - altlen = (int) *ad++; - alts[i].name = (char *) FSmalloc(altlen + 1); - if (!alts[i].name) { - while (--i) { - FSfree((char *) alts[i].name); - } - FSfree((char *) alts); - FSfree((char *) alt_data); - FSfree((char *) svr); - errno = ENOMEM; - return (FSServer *) 0; - } - bcopy(ad, alts[i].name, altlen); - alts[i].name[altlen] = '\0'; - ad += altlen + ((4 - (altlen + 2)) & 3); - } - FSfree((char *) alt_data); - - svr->alternate_servers = alts; - svr->num_alternates = prefix.num_alternates; - - setuplength = prefix.auth_len << 2; - if ((auth_data = (char *) - (setup = FSmalloc((unsigned) setuplength))) == NULL) { - errno = ENOMEM; - FSfree((char *) svr); - return (FSServer *) NULL; - } - _FSRead(svr, (char *) auth_data, setuplength); - - if (prefix.status != AuthSuccess) { - fprintf(stderr, "%s: connection to \"%s\" refused by server\r\n%s: ", - "FSlib", server, "FSlib"); - FSfree((char *) svr); - FSfree(setup); - return (FSServer *) NULL; - } - /* get rest */ - _FSRead(svr, (char *) &conn, (long) SIZEOF(fsConnSetupAccept)); - - if ((vendor_string = (char *) - FSmalloc((unsigned) conn.vendor_len + 1)) == NULL) { - errno = ENOMEM; - FSfree((char *) svr); - return (FSServer *) NULL; - } - _FSReadPad(svr, (char *) vendor_string, conn.vendor_len); - - /* move the data into the FSServer struct */ - svr->next = (FSServer *) NULL; - svr->proto_version = prefix.major_version; - svr->release = conn.release_number; - svr->max_request_size = conn.max_request_len; - - svr->event_vec[FS_Error] = _FSUnknownWireEvent; - svr->event_vec[FS_Reply] = _FSUnknownWireEvent; - svr->wire_vec[FS_Error] = _FSUnknownNativeEvent; - svr->wire_vec[FS_Reply] = _FSUnknownNativeEvent; - for (i = FSLASTEvent; i < 128; i++) { - svr->event_vec[i] = _FSUnknownWireEvent; - svr->wire_vec[i] = _FSUnknownNativeEvent; - } - svr->resource_id = 1; - - svr->vendor = vendor_string; - svr->vendor[conn.vendor_len] = '\0'; - - svr->vnumber = FS_PROTOCOL; - svr->request = 0; - svr->last_request_read = 0; - svr->last_req = (char *) &_dummy_request; - - if ((svr->server_name = FSmalloc((unsigned) (strlen(server) + 1))) - == NULL) { - OutOfMemory(svr, setup); - return (FSServer *) NULL; - } - (void) strcpy(svr->server_name, server); - - /* setup the output buffers */ - if ((svr->bufptr = svr->buffer = FSmalloc(BUFSIZE)) == NULL) { - OutOfMemory(svr, setup); - return (FSServer *) NULL; - } - svr->bufmax = svr->buffer + BUFSIZE; - - /* set up input event queue */ - svr->head = svr->tail = NULL; - svr->qlen = 0; - - FSfree(setup); - - (void) FSSynchronize(svr, _FSdebug); - - svr->next = _FSHeadOfServerList; - _FSHeadOfServerList = svr; - - return (svr); -} - diff --git a/xc/lib/FS/FSQGlyphs.c b/xc/lib/FS/FSQGlyphs.c deleted file mode 100644 index 7155926d0..000000000 --- a/xc/lib/FS/FSQGlyphs.c +++ /dev/null @@ -1,182 +0,0 @@ -/* $TOG: FSQGlyphs.c /main/7 1998/02/06 13:43:46 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -int -FSQueryXBitmaps8(svr, fid, format, range_type, str, str_len, offsets, glyphdata) - FSServer *svr; - Font fid; - FSBitmapFormat format; - Bool range_type; - unsigned char *str; - unsigned long str_len; - FSOffset **offsets; - unsigned char **glyphdata; -{ - fsQueryXBitmaps8Req *req; - fsQueryXBitmaps8Reply reply; - FSOffset *offs; - fsOffset32 local_offs; - unsigned char *gd; - int left; - int i; - - GetReq(QueryXBitmaps8, req); - req->fid = fid; - req->range = range_type; - req->format = format; - req->num_ranges = str_len; - req->length += (str_len + 3) >> 2; - _FSSend(svr, (char *) str, str_len); - - /* get back the info */ - if (!_FSReply(svr, (fsReply *) & reply, - (SIZEOF(fsQueryXBitmaps8Reply) - SIZEOF(fsGenericReply)) >> 2, fsFalse)) - return FSBadAlloc; - - offs = (FSOffset *) FSmalloc(sizeof(FSOffset) * reply.num_chars); - *offsets = offs; - if (!offs) - return FSBadAlloc; - left = (reply.length << 2) - SIZEOF(fsQueryXBitmaps8Reply) - - (SIZEOF(fsOffset32) * reply.num_chars); - gd = (unsigned char *) FSmalloc(left); - *glyphdata = gd; - if (!gd) { - FSfree((char *) offs); - return FSBadAlloc; - } - for (i=0; iposition = local_offs.position; - offs->length = local_offs.length; - offs++; - } - _FSReadPad(svr, (char *) gd, left); - - SyncHandle(); - return FSSuccess; -} - -int -FSQueryXBitmaps16(svr, fid, format, range_type, str, str_len, - offsets, glyphdata) - FSServer *svr; - Font fid; - FSBitmapFormat format; - Bool range_type; - FSChar2b *str; - unsigned long str_len; - FSOffset **offsets; - unsigned char **glyphdata; -{ - fsQueryXBitmaps16Req *req; - fsQueryXBitmaps16Reply reply; - FSOffset *offs; - fsOffset32 local_offs; - unsigned char *gd; - int left; - int i; - - GetReq(QueryXBitmaps16, req); - req->fid = fid; - req->range = range_type; - req->format = format; - req->num_ranges = str_len; - req->length += ((str_len * SIZEOF(fsChar2b)) + 3) >> 2; - if (FSProtocolVersion(svr) == 1) - { - int i; - fsChar2b_version1 *swapped_str; - - swapped_str = (fsChar2b_version1 *) - FSmalloc(SIZEOF(fsChar2b_version1) * str_len); - if (!swapped_str) - return FSBadAlloc; - for (i = 0; i < str_len; i++) { - swapped_str[i].low = str[i].low; - swapped_str[i].high = str[i].high; - } - _FSSend(svr, (char *)swapped_str, (str_len*SIZEOF(fsChar2b_version1))); - FSfree(swapped_str); - } else - _FSSend(svr, (char *) str, (str_len * SIZEOF(fsChar2b))); - - /* get back the info */ - if (!_FSReply(svr, (fsReply *) & reply, - (SIZEOF(fsQueryXBitmaps16Reply) - SIZEOF(fsGenericReply)) >> 2, - fsFalse)) - return FSBadAlloc; - - offs = (FSOffset *) FSmalloc(sizeof(FSOffset) * reply.num_chars); - *offsets = offs; - if (!offs) - return FSBadAlloc; - left = (reply.length << 2) - SIZEOF(fsQueryXBitmaps16Reply) - - (SIZEOF(fsOffset32) * reply.num_chars); - gd = (unsigned char *) FSmalloc(left); - *glyphdata = gd; - if (!gd) { - FSfree((char *) offs); - return FSBadAlloc; - } - for (i=0; iposition = local_offs.position; - offs->length = local_offs.length; - offs++; - } - _FSReadPad(svr, (char *) gd, left); - - SyncHandle(); - return FSSuccess; -} diff --git a/xc/lib/FS/FSQXExt.c b/xc/lib/FS/FSQXExt.c deleted file mode 100644 index fc4375f45..000000000 --- a/xc/lib/FS/FSQXExt.c +++ /dev/null @@ -1,159 +0,0 @@ -/* $TOG: FSQXExt.c /main/7 1998/02/06 13:43:56 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/FS/FSQXExt.c,v 1.3 1999/02/20 15:07:13 hohndel Exp $ */ - -/* - -Copyright 1987, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -static void -_FS_convert_char_info(fsXCharInfo *src, FSXCharInfo *dst) -{ - dst->ascent = src->ascent; - dst->descent = src->descent; - dst->left = src->left; - dst->right = src->right; - dst->width = src->width; - dst->attributes = src->attributes; -} - -int -FSQueryXExtents8(svr, fid, range_type, str, str_len, extents) - FSServer *svr; - Font fid; - Bool range_type; - unsigned char *str; - unsigned long str_len; - FSXCharInfo **extents; -{ - fsQueryXExtents8Req *req; - fsQueryXExtents8Reply reply; - FSXCharInfo *ext; - fsXCharInfo local_exts; - int i; - - GetReq(QueryXExtents8, req); - req->fid = fid; - req->range = range_type; - req->num_ranges = str_len; - req->length += (str_len + 3) >> 2; - _FSSend(svr, (char *) str, str_len); - - /* get back the info */ - if (!_FSReply(svr, (fsReply *) & reply, - (SIZEOF(fsQueryXExtents8Reply) - SIZEOF(fsGenericReply)) >> 2, - fsFalse)) - return FSBadAlloc; - - ext = (FSXCharInfo *) FSmalloc(sizeof(FSXCharInfo) * reply.num_extents); - *extents = ext; - if (!ext) - return FSBadAlloc; - for (i = 0; i < reply.num_extents; i++) { - _FSReadPad(svr, (char *) &local_exts, SIZEOF(fsXCharInfo)); - _FS_convert_char_info(&local_exts, &ext[i]); - } - - SyncHandle(); - return FSSuccess; -} - -int -FSQueryXExtents16(svr, fid, range_type, str, str_len, extents) - FSServer *svr; - Font fid; - Bool range_type; - FSChar2b *str; - unsigned long str_len; - FSXCharInfo **extents; -{ - fsQueryXExtents16Req *req; - fsQueryXExtents16Reply reply; - FSXCharInfo *ext; - fsXCharInfo local_exts; - int i; - - GetReq(QueryXExtents16, req); - req->fid = fid; - req->range = range_type; - req->num_ranges = str_len; - req->length += ((str_len * SIZEOF(fsChar2b)) + 3) >> 2; - if (FSProtocolVersion(svr) == 1) - { - fsChar2b_version1 *swapped_str; - - swapped_str = (fsChar2b_version1 *) - FSmalloc(SIZEOF(fsChar2b_version1) * str_len); - if (!swapped_str) - return FSBadAlloc; - for (i = 0; i < str_len; i++) { - swapped_str[i].low = str[i].low; - swapped_str[i].high = str[i].high; - } - _FSSend(svr, (char *)swapped_str, (str_len*SIZEOF(fsChar2b_version1))); - FSfree(swapped_str); - } else - _FSSend(svr, (char *) str, (str_len * SIZEOF(fsChar2b))); - - /* get back the info */ - if (!_FSReply(svr, (fsReply *) & reply, - (SIZEOF(fsQueryXExtents16Reply) - SIZEOF(fsGenericReply)) >> 2, - fsFalse)) - return FSBadAlloc; - - ext = (FSXCharInfo *) FSmalloc(sizeof(FSXCharInfo) * reply.num_extents); - *extents = ext; - if (!ext) - return FSBadAlloc; - for (i = 0; i < reply.num_extents; i++) { - _FSReadPad(svr, (char *) &local_exts, SIZEOF(fsXCharInfo)); - _FS_convert_char_info(&local_exts, &ext[i]); - } - - SyncHandle(); - return FSSuccess; -} diff --git a/xc/lib/FS/FSQXInfo.c b/xc/lib/FS/FSQXInfo.c deleted file mode 100644 index 67c6ff50e..000000000 --- a/xc/lib/FS/FSQXInfo.c +++ /dev/null @@ -1,118 +0,0 @@ -/* $TOG: FSQXInfo.c /main/6 1998/02/06 13:44:01 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -/* - * Note: only the range in the first FSQuery is sent to the server. - * the others exist as return values only. - */ - -int -FSQueryXInfo(svr, fid, info, props, offsets, prop_data) - FSServer *svr; - Font fid; - FSXFontInfoHeader *info; - FSPropInfo *props; - FSPropOffset **offsets; - unsigned char **prop_data; -{ - fsQueryXInfoReq *req; - fsQueryXInfoReply reply; - FSPropOffset *offset_data; - unsigned char *pdata; - fsPropInfo local_pi; - fsPropOffset local_po; - int j; - - GetReq(QueryXInfo, req); - req->id = fid; - - /* get back the info */ - if (!_FSReply(svr, (fsReply *) & reply, ((SIZEOF(fsQueryXInfoReply) - - SIZEOF(fsGenericReply)) >> 2), fsFalse)) { - return FSBadAlloc; - } - - FSUnpack_XFontInfoHeader(&reply, info, FSProtocolVersion(svr)); - - /* get the prop header */ - _FSReadPad(svr, (char *) &local_pi, SIZEOF(fsPropInfo)); - props->num_offsets = local_pi.num_offsets; - props->data_len = local_pi.data_len; - - /* prepare for prop data */ - offset_data = (FSPropOffset *) - FSmalloc(props->num_offsets * sizeof(FSPropOffset)); - if (!offset_data) - return FSBadAlloc; - pdata = (unsigned char *) FSmalloc(props->data_len); - if (!pdata) { - FSfree((char *) offset_data); - return FSBadAlloc; - } - /* get offsets */ - for (j=0; jnum_offsets; j++) - { - _FSReadPad(svr, (char *) &local_po, SIZEOF(fsPropOffset)); - offset_data[j].name.position = local_po.name.position; - offset_data[j].name.length = local_po.name.length; - offset_data[j].value.position = local_po.value.position; - offset_data[j].value.length = local_po.value.length; - offset_data[j].type = local_po.type; - } - - /* get data */ - _FSReadPad(svr, (char *) pdata, props->data_len); - *offsets = offset_data; - *prop_data = pdata; - - SyncHandle(); - return FSSuccess; -} diff --git a/xc/lib/FS/FSQuExt.c b/xc/lib/FS/FSQuExt.c deleted file mode 100644 index 0710a33a8..000000000 --- a/xc/lib/FS/FSQuExt.c +++ /dev/null @@ -1,75 +0,0 @@ -/* $TOG: FSQuExt.c /main/5 1998/02/06 13:43:52 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -Bool -FSQueryExtension(svr, name, major_opcode, first_event, first_error) - FSServer *svr; - char *name; - int *major_opcode; - int *first_event; - int *first_error; -{ - fsQueryExtensionReply rep; - fsQueryExtensionReq *req; - - GetReq(QueryExtension, req); - req->nbytes = name ? strlen(name) : 0; - req->length += (req->nbytes + 3) >> 2; - _FSSend(svr, name, (long) req->nbytes); - if (!_FSReply(svr, (fsReply *) & rep, - (SIZEOF(fsQueryExtensionReply) - SIZEOF(fsGenericReply)) >> 2, fsFalse)) - return FSBadAlloc; - *major_opcode = rep.major_opcode; - *first_event = rep.first_event; - *first_error = rep.first_error; - SyncHandle(); - return (rep.present); -} diff --git a/xc/lib/FS/FSServName.c b/xc/lib/FS/FSServName.c deleted file mode 100644 index b966470f7..000000000 --- a/xc/lib/FS/FSServName.c +++ /dev/null @@ -1,70 +0,0 @@ -/* $TOG: FSServName.c /main/6 1998/02/06 13:44:07 kaleb $ */ - -/* @(#)FSServName.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include - -#include -#ifndef X_NOT_STDC_ENV -#include -#else -char *getenv(); -#endif - -char * -FSServerName(server) - char *server; -{ - char *s; - - if (server != NULL && *server != '\0') - return server; - if ((s = getenv("FONTSERVER")) != NULL) - return s; - return NULL; -} diff --git a/xc/lib/FS/FSSetCats.c b/xc/lib/FS/FSSetCats.c deleted file mode 100644 index 6a8d8f43f..000000000 --- a/xc/lib/FS/FSSetCats.c +++ /dev/null @@ -1,87 +0,0 @@ -/* $TOG: FSSetCats.c /main/5 1998/05/17 16:30:54 kaleb $ */ - -/* @(#)FSFlush.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/FS/FSSetCats.c,v 1.3 1999/03/14 03:20:36 dawes Exp $ */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -int -FSSetCatalogues(svr, num, cats) - FSServer *svr; - int num; - char **cats; -{ - int nbytes; - fsSetCataloguesReq *req; - char buf[256]; - int i; - int len, tlen, tnum; - - for (i = 0, tnum = 0, len = 0; i < num; i++) { - if ((tlen = strlen(cats[i])) < 256) { - len += tlen; - tnum++; - } - } - - GetReq(SetCatalogues, req); - req->num_catalogues = tnum; - req->length += (len + 3) >> 2; - - for (i = 0; i < num; i++) { - nbytes = strlen(cats[i]); - if (nbytes < 256) { - buf[0] = nbytes; - memcpy(&buf[1], cats[i], nbytes); - nbytes++; - _FSSend(svr, buf, (long) nbytes); - } - } - SyncHandle(); - return FSSuccess; -} diff --git a/xc/lib/FS/FSSync.c b/xc/lib/FS/FSSync.c deleted file mode 100644 index 4f82c97dc..000000000 --- a/xc/lib/FS/FSSync.c +++ /dev/null @@ -1,74 +0,0 @@ -/* $TOG: FSSync.c /main/7 1998/05/01 11:35:05 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlibint.h" - -extern _FSQEvent *_FSqfree; - -/* synchronize with errors and events */ - -int FSSync(svr, discard) - FSServer *svr; - Bool discard; -{ - fsListExtensionsReply rep; - fsReq *req; - - GetEmptyReq(ListExtensions, req); - (void) _FSReply(svr, (fsReply *) & rep, 0, fsTrue); - - if (discard && svr->head) { - ((_FSQEvent *) svr->tail)->next = _FSqfree; - _FSqfree = (_FSQEvent *) svr->head; - svr->head = svr->tail = NULL; - svr->qlen = 0; - } - - return 1; -} diff --git a/xc/lib/FS/FSSynchro.c b/xc/lib/FS/FSSynchro.c deleted file mode 100644 index fee61bc77..000000000 --- a/xc/lib/FS/FSSynchro.c +++ /dev/null @@ -1,84 +0,0 @@ -/* $TOG: FSSynchro.c /main/7 1998/05/01 12:50:38 kaleb $ */ - -/* @(#)FSSynchro.c 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/FS/FSSynchro.c,v 1.3 1999/02/20 15:07:13 hohndel Exp $ */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -#include "FSlib.h" -#include "FSlibint.h" - -static int -_FSSyncFunction(FSServer *svr) -{ - - return FSSync(svr, 0); -} - -FSSyncHandler -FSSynchronize(FSServer *svr, int onoff) -{ - FSSyncHandler temp; - - temp = svr->synchandler; - if (onoff) - svr->synchandler = _FSSyncFunction; - else - svr->synchandler = NULL; - return temp; -} - -FSSyncHandler -FSSetAfterFunction(svr, func) - FSServer *svr; - FSSyncHandler func; -{ - FSSyncHandler temp; - - temp = svr->synchandler; - svr->synchandler = func; - return temp; -} diff --git a/xc/lib/FS/FSlib.h b/xc/lib/FS/FSlib.h deleted file mode 100644 index 0bdd39b4e..000000000 --- a/xc/lib/FS/FSlib.h +++ /dev/null @@ -1,315 +0,0 @@ -/* $TOG: FSlib.h /main/10 1998/02/06 13:43:12 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ -/* $XFree86: xc/lib/FS/FSlib.h,v 1.3 1999/02/20 15:07:14 hohndel Exp $ */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -/* - * Font server C interface library - */ - -#ifndef _FSLIB_H_ -#define _FSLIB_H_ - -#include -#include - -#define Bool int -#define Status int -#define True 1 -#define False 0 - -#define QueuedAlready 0 -#define QueuedAfterReading 1 -#define QueuedAfterFlush 2 - -#define FSServerString(svr) ((svr)->server_name) -#define FSVendorRelease(svr) ((svr)->release) -#define FSProtocolVersion(svr) ((svr)->proto_version) -#define FSServerVendor(svr) ((svr)->vendor) -#define FSAuthorizationData(svr) ((svr)->auth_data) -#define FSAlternateServers(svr) ((svr)->alternate_servers) -#define FSNumAlternateServers(svr) ((svr)->num_alternates) - -#ifdef QLength -#undef QLength -#endif -#define QLength(svr) ((svr)->qlen) -#ifdef NextRequest -#undef NextRequest -#endif -#define NextRequest(svr) ((svr)->request + 1) -#ifdef LastKnownRequestProcessed -#undef LastKnownRequestProcessed -#endif -#define LastKnownRequestProcessed(svr) ((svr)->last_request_read) - -#define FSAllocID(svr) ((*(svr)->resource_alloc)((svr))) - -typedef struct _alternate { - Bool subset; - char *name; -} AlternateServer; - -/* extension stuff */ -typedef struct _FSExtData { - int number; /* number returned by FSRegisterExtension */ - struct _FSExtData *next; /* next item on list of data for structure */ - int (*free_private) (char *); /* called to free private storage */ - char *private_data; /* data private to this extension. */ -} FSExtData; - - -typedef struct { /* public to extension, cannot be changed */ - int extension; /* extension number */ - int major_opcode; /* major op-code assigned by server */ - int first_event; /* first event number for the extension */ - int first_error; /* first error number for the extension */ -} FSExtCodes; - -typedef struct _FSServer FSServer; -typedef union _FSEvent FSEvent; - -typedef struct _FSExtent { - struct _FSExtent *next; /* next in list */ - FSExtCodes codes; /* public information, all extension told */ - int (*close_server) (FSServer *, FSExtCodes *); /* routine to call when connection - * closed */ - int (*error) (FSServer *, fsError *, FSExtCodes *, int *); /* who to call when an error occurs */ - int (*error_string) (FSServer *, int, FSExtCodes *, char *, int); /* routine to supply error string */ - char *name; -} _FSExtension; - -typedef int (*FSSyncHandler)(FSServer *); - -/* server data structure */ -struct _FSServer { - struct _FSServer *next; - int fd; - int proto_version; - char *vendor; - int byte_order; - int vnumber; - int release; - int resource_id; - struct _FSQEvent *head, - *tail; - int qlen; - unsigned long last_request_read; - unsigned long request; - char *last_req; - char *buffer; - char *bufptr; - char *bufmax; - unsigned max_request_size; - char *server_name; - char *auth_data; - AlternateServer *alternate_servers; - int num_alternates; - FSExtData *ext_data; - _FSExtension *ext_procs; - int ext_number; - Bool (*event_vec[132]) (FSServer *, FSEvent *, fsEvent *); - Status (*wire_vec[132]) (FSServer *, FSEvent *, fsEvent *); - char *scratch_buffer; - unsigned long scratch_length; - FSSyncHandler synchandler; - unsigned long flags; - struct _XtransConnInfo *trans_conn; /* transport connection object */ -}; - -typedef struct { - int type; - unsigned long serial; - Bool send_event; - FSServer *server; -} FSAnyEvent; - -typedef struct { - int type; - FSServer *server; - FSID resourceid; - unsigned long serial; - unsigned char error_code; - unsigned char request_code; - unsigned char minor_code; -} FSErrorEvent; - -union _FSEvent { - int type; - FSAnyEvent fsany; -}; - -typedef struct _FSQEvent { - struct _FSQEvent *next; - FSEvent event; -} _FSQEvent; - - -/* protocol-related stuctures */ - -typedef unsigned long FSBitmapFormat; -typedef unsigned long FSBitmapFormatMask; - -typedef struct _FSChar2b { - unsigned char high; - unsigned char low; -} FSChar2b; - -typedef struct _FSRange { - FSChar2b min_char; - FSChar2b max_char; -} FSRange; - -typedef struct _FSOffset { - unsigned int position; - unsigned int length; -} FSOffset; - -/* use names as in xCharInfo? */ -typedef struct _FSXCharInfo { - short left; - short right; - short width; - short ascent; - short descent; - unsigned short attributes; -} FSXCharInfo; - -typedef struct _FSPropOffset { - FSOffset name; - FSOffset value; - unsigned char type; -} FSPropOffset; - -typedef struct _FSPropInfo { - unsigned int num_offsets; - unsigned int data_len; -} FSPropInfo; - -/* should names match FontInfoRec? */ -typedef struct _FSXFontInfoHeader { - int flags; - FSRange char_range; - unsigned draw_direction; - FSChar2b default_char; - FSXCharInfo min_bounds; - FSXCharInfo max_bounds; - short font_ascent; - short font_descent; -} FSXFontInfoHeader; - - - -/* function decls */ - -extern FSServer * FSOpenServer ( char *server ); - -extern FSSyncHandler FSSynchronize(FSServer *, int); -extern FSSyncHandler FSSetAfterFunction(FSServer *, FSSyncHandler); - -extern char * FSServerName ( char *server ); -extern char ** FSListExtensions ( FSServer *svr, int *next ); -extern int FSQueryExtension ( FSServer *svr, char *name, int *major_opcode, - int *first_event, int *first_error ); - -extern char ** FSListCatalogues ( FSServer *svr, char *pattern, - int maxNames, int *actualCount ); -extern char ** FSGetCatalogues ( FSServer *svr, int *num ); - -extern long FSMaxRequestSize ( FSServer *svr ); - -extern char ** FSListFonts ( FSServer *svr, char *pattern, int maxNames, - int *actualCount ); -extern char ** FSListFontsWithXInfo ( FSServer *svr, char *pattern, - int maxNames, int *count, - FSXFontInfoHeader ***info, - FSPropInfo ***pprops, - FSPropOffset ***offsets, - unsigned char ***prop_data ); -extern Font FSOpenBitmapFont ( FSServer *svr, FSBitmapFormat hint, - FSBitmapFormatMask fmask, char *name, - Font *otherid ); - -extern int FSSync ( FSServer *svr, Bool discard ); - -extern int FSCloseServer ( FSServer *svr ); -extern int FSCloseFont ( FSServer *svr, Font fid ); -extern int FSGetErrorDatabaseText ( FSServer *svr, char *name, char *type, - char *defaultp, char *buffer, int nbytes ); -extern int FSGetErrorText ( FSServer *svr, int code, char *buffer, - - int nbytes ); -extern int FSFlush ( FSServer *svr ); -extern int FSFreeFontNames ( char **list ); -extern int FSFreeCatalogues ( char **list ); -extern int FSFreeExtensionList ( char **list ); -extern int FSNextEvent ( FSServer *svr, FSEvent *event ); -extern int FSQueryXBitmaps8 ( FSServer *svr, Font fid, FSBitmapFormat format, - int range_type, unsigned char *str, - unsigned long str_len, FSOffset **offsets, - unsigned char **glyphdata ); -extern int FSQueryXBitmaps16 ( FSServer *svr, Font fid, FSBitmapFormat format, - int range_type, FSChar2b *str, - unsigned long str_len, FSOffset **offsets, - unsigned char **glyphdata ); -extern int FSQueryXExtents8 ( FSServer *svr, Font fid, int range_type, - unsigned char *str, unsigned long str_len, - FSXCharInfo **extents ); -extern int FSQueryXExtents16 ( FSServer *svr, Font fid, int range_type, - FSChar2b *str, unsigned long str_len, - FSXCharInfo **extents ); -extern int FSQueryXInfo ( FSServer *svr, Font fid, FSXFontInfoHeader *info, - FSPropInfo *props, FSPropOffset **offsets, - unsigned char **prop_data ); -extern int FSSetCatalogues ( FSServer *svr, int num, char **cats ); -extern int FSSync ( FSServer *svr, int discard ); -extern int FSFree ( char *data ); -extern unsigned char * FSMalloc ( unsigned size ); - - -#endif /* _FSLIB_H_ */ diff --git a/xc/lib/FS/FSlibInt.c b/xc/lib/FS/FSlibInt.c deleted file mode 100644 index ccd13fac5..000000000 --- a/xc/lib/FS/FSlibInt.c +++ /dev/null @@ -1,1347 +0,0 @@ -/* $TOG: FSlibInt.c /main/23 1998/05/01 11:42:57 kaleb $ */ - -/* - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $XFree86: xc/lib/FS/FSlibInt.c,v 3.6 1999/02/25 06:00:56 dawes Exp $ */ - -/* - * FSlibInt.c - Internal support routines for the C subroutine - * interface library (FSlib). - */ -#include -#include "FSlibint.h" -#include - -static void _EatData32 ( FSServer *svr, unsigned long n ); -static char * _SysErrorMsg ( int n ); - -/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX - * systems are broken and return EWOULDBLOCK when they should return EAGAIN - */ -#ifdef WIN32 -#define ETEST() (WSAGetLastError() == WSAEWOULDBLOCK) -#else -#if defined(EAGAIN) && defined(EWOULDBLOCK) -#define ETEST() (errno == EAGAIN || errno == EWOULDBLOCK) -#else -#ifdef EAGAIN -#define ETEST() (errno == EAGAIN) -#else -#define ETEST() (errno == EWOULDBLOCK) -#endif -#endif -#endif -#ifdef WIN32 -#define ECHECK(err) (WSAGetLastError() == err) -#define ESET(val) WSASetLastError(val) -#else -#ifdef ISC -#define ECHECK(err) ((errno == err) || ETEST()) -#else -#define ECHECK(err) (errno == err) -#endif -#define ESET(val) errno = val -#endif - -/* - * The following routines are internal routines used by FSlib for protocol - * packet transmission and reception. - * - * FSIOError(FSServer *) will be called if any sort of system call error occurs. - * This is assumed to be a fatal condition, i.e., FSIOError should not return. - * - * FSError(FSServer *, FSErrorEvent *) will be called whenever an FS_Error event is - * received. This is not assumed to be a fatal condition, i.e., it is - * acceptable for this procedure to return. However, FSError should NOT - * perform any operations (directly or indirectly) on the DISPLAY. - * - * Routines declared with a return type of 'Status' return 0 on failure, - * and non 0 on success. Routines with no declared return type don't - * return anything. Whenever possible routines that create objects return - * the object they have created. - */ - -_FSQEvent *_FSqfree = NULL; /* NULL _FSQEvent. */ - -static int padlength[4] = {0, 3, 2, 1}; - - /* - * lookup table for adding padding bytes to data that is read from or written - * to the FS socket. - */ - -static fsReq _dummy_request = { - 0, 0, 0 -}; - -/* - * _FSFlush - Flush the FS request buffer. If the buffer is empty, no - * action is taken. This routine correctly handles incremental writes. - * This routine may have to be reworked if int < long. - */ -void -_FSFlush(svr) - register FSServer *svr; -{ - register long size, - todo; - register int write_stat; - register char *bufindex; - - size = todo = svr->bufptr - svr->buffer; - bufindex = svr->bufptr = svr->buffer; - /* - * While write has not written the entire buffer, keep looping until the - * entire buffer is written. bufindex will be incremented and size - * decremented as buffer is written out. - */ - while (size) { - ESET(0); - write_stat = _FSTransWrite(svr->trans_conn, bufindex, (int) todo); - if (write_stat >= 0) { - size -= write_stat; - todo = size; - bufindex += write_stat; - } else if (ETEST()) { - _FSWaitForWritable(svr); -#ifdef SUNSYSV - } else if (ECHECK(0)) { - _FSWaitForWritable(svr); -#endif - -#ifdef EMSGSIZE - } else if (ECHECK(EMSGSIZE)) { - if (todo > 1) - todo >>= 1; - else - _FSWaitForWritable(svr); -#endif - } else { - /* Write failed! */ - /* errno set by write system call. */ - (*_FSIOErrorFunction) (svr); - } - } - svr->last_req = (char *) &_dummy_request; -} - -int -_FSEventsQueued(svr, mode) - register FSServer *svr; - int mode; -{ - register BytesReadable_t len; - BytesReadable_t pend; - char buf[BUFSIZE]; - register fsReply *rep; - - if (mode == QueuedAfterFlush) { - _FSFlush(svr); - if (svr->qlen) - return (svr->qlen); - } - if (_FSTransBytesReadable(svr->trans_conn, &pend) < 0) - (*_FSIOErrorFunction) (svr); - if ((len = pend) < SIZEOF(fsReply)) - return (svr->qlen); /* _FSFlush can enqueue events */ - else if (len > BUFSIZE) - len = BUFSIZE; - len /= SIZEOF(fsReply); - pend = len * SIZEOF(fsReply); - _FSRead(svr, buf, (long) pend); - - /* no space between comma and type or else macro will die */ - STARTITERATE(rep, fsReply, buf, (len > 0), len--) { - if (rep->generic.type == FS_Error) - _FSError(svr, (fsError *) rep); - else /* must be an event packet */ - _FSEnq(svr, (fsEvent *) rep); - } - ENDITERATE - return (svr->qlen); -} - -/* _FSReadEvents - Flush the output queue, - * then read as many events as possible (but at least 1) and enqueue them - */ -void -_FSReadEvents(svr) - register FSServer *svr; -{ - char buf[BUFSIZE]; - BytesReadable_t pend_not_register; /* because can't "&" a register - * variable */ - register BytesReadable_t pend; - register fsEvent *ev; - Bool not_yet_flushed = True; - - do { - /* find out how much data can be read */ - if (_FSTransBytesReadable(svr->trans_conn, &pend_not_register) < 0) - (*_FSIOErrorFunction) (svr); - pend = pend_not_register; - - /* - * must read at least one fsEvent; if none is pending, then we'll just - * flush and block waiting for it - */ - if (pend < SIZEOF(fsEvent)) { - pend = SIZEOF(fsEvent); - /* don't flush until we block the first time */ - if (not_yet_flushed) { - int qlen = svr->qlen; - - _FSFlush(svr); - if (qlen != svr->qlen) - return; - not_yet_flushed = False; - } - } - /* but we won't read more than the max buffer size */ - if (pend > BUFSIZE) - pend = BUFSIZE; - - /* round down to an integral number of XReps */ - pend = (pend / SIZEOF(fsEvent)) * SIZEOF(fsEvent); - - _FSRead(svr, buf, (long)pend); - - /* no space between comma and type or else macro will die */ - STARTITERATE(ev, fsEvent, buf, (pend > 0), - pend -= SIZEOF(fsEvent)) { - if (ev->type == FS_Error) - _FSError(svr, (fsError *) ev); - else /* it's an event packet; enqueue it */ - _FSEnq(svr, ev); - } - ENDITERATE - } while (svr->head == NULL); -} - -/* - * _FSRead - Read bytes from the socket taking into account incomplete - * reads. This routine may have to be reworked if int < long. - */ -void -_FSRead(svr, data, size) - register FSServer *svr; - register char *data; - register long size; -{ - register long bytes_read; -#if defined(SVR4) && defined(i386) - int num_failed_reads = 0; -#endif - - if (size == 0) - return; - ESET(0); - /* - * For SVR4 with a unix-domain connection, ETEST() after selecting - * readable means the server has died. To do this here, we look for - * two consecutive reads returning ETEST(). - */ - while ((bytes_read = _FSTransRead(svr->trans_conn, data, (int) size)) - != size) { - - if (bytes_read > 0) { - size -= bytes_read; - data += bytes_read; -#if defined(SVR4) && defined(i386) - num_failed_reads = 0; -#endif - } - else if (ETEST()) { - _FSWaitForReadable(svr); -#if defined(SVR4) && defined(i386) - num_failed_reads++; - if (num_failed_reads > 1) { - ESET(EPIPE); - (*_FSIOErrorFunction) (svr); - } -#endif - ESET(0); - } -#ifdef SUNSYSV - else if (ECHECK(0)) { - _FSWaitForReadable(svr); - } -#endif - - else if (bytes_read == 0) { - /* Read failed because of end of file! */ - ESET(EPIPE); - (*_FSIOErrorFunction) (svr); - } else { /* bytes_read is less than 0; presumably -1 */ - /* If it's a system call interrupt, it's not an error. */ - if (!ECHECK(EINTR)) - (*_FSIOErrorFunction) (svr); -#if defined(SVR4) && defined(i386) - else - num_failed_reads = 0; -#endif - } - } -} - -#ifdef WORD64 -/* - * XXX This is a *really* stupid way of doing this.... - */ - -#define PACKBUFFERSIZE 4096 - - -/* - * _FSRead32 - Read bytes from the socket unpacking each 32 bits - * into a long (64 bits on a CRAY computer). - * - */ -static void -_doFSRead32(svr, data, size, packbuffer) - register FSServer *svr; - register long *data; - register long size; - register char *packbuffer; -{ - long *lpack, - *lp; - long mask32 = 0x00000000ffffffff; - long maskw, - nwords, - i, - bits; - - _FSReadPad(svr, packbuffer, size); - - lp = data; - lpack = (long *) packbuffer; - nwords = size >> 2; - bits = 32; - - for (i = 0; i < nwords; i++) { - maskw = mask32 << bits; - *lp++ = (*lpack & maskw) >> bits; - bits = bits ^ 32; - if (bits) { - lpack++; - } - } -} - -void -_FSRead32(svr, data, len) - FSServer *svr; - long *data; - long len; -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nwords = (PACKBUFFERSIZE >> 2); /* bytes to CARD32 */ - - for (; len > nwords; len -= nwords, data += nwords) { - _doFSRead32(svr, data, nwords, packbuffer); - } - _doFSRead32(svr, data, len, packbuffer); -} - - - -/* - * _FSRead16 - Read bytes from the socket unpacking each 16 bits - * into a long (64 bits on a CRAY computer). - * - */ -static void -_doFSRead16(svr, data, size, packbuffer) - register FSServer *svr; - register short *data; - register long size; - char *packbuffer; -{ - long *lpack, - *lp; - long mask16 = 0x000000000000ffff; - long maskw, - nwords, - i, - bits; - - _FSRead(svr, packbuffer, size); /* don't do a padded read... */ - - lp = (long *) data; - lpack = (long *) packbuffer; - nwords = size >> 1; /* number of 16 bit words to be unpacked */ - bits = 48; - for (i = 0; i < nwords; i++) { - maskw = mask16 << bits; - *lp++ = (*lpack & maskw) >> bits; - bits -= 16; - if (bits < 0) { - lpack++; - bits = 48; - } - } -} - -void -_FSRead16(svr, data, len) - FSServer *svr; - short *data; - long len; -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nwords = (PACKBUFFERSIZE >> 1); /* bytes to CARD16 */ - - for (; len > nwords; len -= nwords, data += nwords) { - _doFSRead16(svr, data, nwords, packbuffer); - } - _doFSRead16(svr, data, len, packbuffer); -} - -void -_FSRead16Pad(svr, data, size) - FSServer *svr; - short *data; - long size; -{ - int slop = (size & 3); - short slopbuf[3]; - - _FSRead16(svr, data, size); - if (slop > 0) { - _FSRead16(svr, slopbuf, 4 - slop); - } -} - -#endif /* WORD64 */ - - -/* - * _FSReadPad - Read bytes from the socket taking into account incomplete - * reads. If the number of bytes is not 0 mod 32, read additional pad - * bytes. This routine may have to be reworked if int < long. - */ -void -_FSReadPad(svr, data, size) - register FSServer *svr; - register char *data; - register long size; -{ - register long bytes_read; - struct iovec iov[2]; - char pad[3]; - - if (size == 0) - return; - iov[0].iov_len = (int) size; - iov[0].iov_base = data; - /* - * The following hack is used to provide 32 bit long-word aligned padding. - * The [1] vector is of length 0, 1, 2, or 3, whatever is needed. - */ - - iov[1].iov_len = padlength[size & 3]; - iov[1].iov_base = pad; - size += iov[1].iov_len; - - ESET(0); - while ((bytes_read = _FSTransReadv(svr->trans_conn, iov, 2)) != size) { - - if (bytes_read > 0) { - size -= bytes_read; - if ((iov[0].iov_len -= bytes_read) < 0) { - iov[1].iov_len += iov[0].iov_len; - iov[1].iov_base = (char *)iov[1].iov_base - iov[0].iov_len; - iov[0].iov_len = 0; - } else - iov[0].iov_base = (char *)iov[0].iov_base + bytes_read; - } - else if (ETEST()) { - _FSWaitForReadable(svr); - ESET(0); - } -#ifdef SUNSYSV - else if (ECHECK(0)) { - _FSWaitForReadable(svr); - } -#endif - - else if (bytes_read == 0) { - /* Read failed because of end of file! */ - ESET(EPIPE); - (*_FSIOErrorFunction) (svr); - } else { /* bytes_read is less than 0; presumably -1 */ - /* If it's a system call interrupt, it's not an error. */ - if (!ECHECK(EINTR)) - (*_FSIOErrorFunction) (svr); - } - } -} - -/* - * _FSSend - Flush the buffer and send the client data. 32 bit word aligned - * transmission is used, if size is not 0 mod 4, extra bytes are transmitted. - * This routine may have to be reworked if int < long; - */ -void -_FSSend(svr, data, size) - register FSServer *svr; - char *data; - register long size; -{ - struct iovec iov[3]; - static char pad[3] = {0, 0, 0}; - - long skip = 0; - long svrbufsize = (svr->bufptr - svr->buffer); - long padsize = padlength[size & 3]; - long total = svrbufsize + size + padsize; - long todo = total; - - /* - * There are 3 pieces that may need to be written out: - * - * o whatever is in the display buffer o the data passed in by the user o - * any padding needed to 32bit align the whole mess - * - * This loop looks at all 3 pieces each time through. It uses skip to figure - * out whether or not a given piece is needed. - */ - while (total) { - long before = skip; /* amount of whole thing written */ - long remain = todo; /* amount to try this time, <= total */ - int i = 0; - long len; - - /* - * You could be very general here and have "in" and "out" iovecs and - * write a loop without using a macro, but what the heck. This - * translates to: - * - * how much of this piece is new? if more new then we are trying this - * time, clamp if nothing new then bump down amount already written, - * for next piece else put new stuff in iovec, will need all of next - * piece - * - * Note that todo had better be at least 1 or else we'll end up writing 0 - * iovecs. - */ -#define InsertIOV(pointer, length) \ - len = (length) - before; \ - if (len > remain) \ - len = remain; \ - if (len <= 0) { \ - before = (-len); \ - } else { \ - iov[i].iov_len = len; \ - iov[i].iov_base = (pointer) + before; \ - i++; \ - remain -= len; \ - before = 0; \ - } - - InsertIOV(svr->buffer, svrbufsize) - InsertIOV(data, size) - InsertIOV(pad, padsize) - - ESET(0); - if ((len = _FSTransWritev(svr->trans_conn, iov, i)) >= 0) { - skip += len; - total -= len; - todo = total; - } else if (ETEST()) { - _FSWaitForWritable(svr); -#ifdef SUNSYSV - } else if (ECHECK(0)) { - _FSWaitForWritable(svr); -#endif - -#ifdef EMSGSIZE - } else if (ECHECK(EMSGSIZE)) { - if (todo > 1) - todo >>= 1; - else - _FSWaitForWritable(svr); -#endif - } else { - (*_FSIOErrorFunction) (svr); - } - } - - svr->bufptr = svr->buffer; - svr->last_req = (char *) &_dummy_request; -} - -#ifdef undef -/* - * _FSAllocID - normal resource ID allocation routine. A client - * can roll his own and instatantiate it if he wants, but must - * follow the rules. - */ -FSID -_FSAllocID(svr) - register FSServer *svr; -{ - return (svr->resource_base + (svr->resource_id++ << svr->resource_shift)); -} - -#endif - -/* - * The hard part about this is that we only get 16 bits from a reply. Well, - * then, we have three values that will march along, with the following - * invariant: - * svr->last_request_read <= rep->sequenceNumber <= svr->request - * The right choice for rep->sequenceNumber is the largest that - * still meets these constraints. - */ - -unsigned long -_FSSetLastRequestRead(svr, rep) - register FSServer *svr; - register fsGenericReply *rep; -{ - register unsigned long newseq, - lastseq; - - newseq = (svr->last_request_read & ~((unsigned long) 0xffff)) | - rep->sequenceNumber; - lastseq = svr->last_request_read; - while (newseq < lastseq) { - newseq += 0x10000; - if (newseq > svr->request) { - (void) fprintf(stderr, - "FSlib: sequence lost (0x%lx > 0x%lx) in reply type 0x%x!\n", - newseq, svr->request, - (unsigned int) rep->type); - newseq -= 0x10000; - break; - } - } - - svr->last_request_read = newseq; - return (newseq); -} - -/* - * _FSReply - Wait for a reply packet and copy its contents into the - * specified rep. Mean while we must handle error and event packets that - * we may encounter. - */ -Status -_FSReply(svr, rep, extra, discard) - register FSServer *svr; - register fsReply *rep; - int extra; /* number of 32-bit words expected after the - * reply */ - Bool discard; /* should I discard data followind "extra" - * words? */ -{ - /* - * Pull out the serial number now, so that (currently illegal) requests - * generated by an error handler don't confuse us. - */ - unsigned long cur_request = svr->request; - long rem_length; - - _FSFlush(svr); - while (1) { - _FSRead(svr, (char *) rep, (long) SIZEOF(fsReply)); - switch ((int) rep->generic.type) { - - case FS_Reply: - /* - * Reply received. Fast update for synchronous replies, but deal - * with multiple outstanding replies. - */ - if (rep->generic.sequenceNumber == (cur_request & 0xffff)) - svr->last_request_read = cur_request; - else - (void) _FSSetLastRequestRead(svr, &rep->generic); - rem_length = rep->generic.length - (SIZEOF(fsReply) >> 2); - if (rem_length < 0) rem_length = 0; - if (extra == 0) { - if (discard && rem_length) - /* unexpectedly long reply! */ - _EatData32(svr, rem_length); - return (1); - } - if (extra == rem_length) { - /* - * Read the extra data into storage immediately following the - * GenericReply structure. - */ - _FSRead(svr, (char *) NEXTPTR(rep, fsReply), ((long) extra) << 2); - return (1); - } - if (extra < rem_length) { - /* Actual reply is longer than "extra" */ - _FSRead(svr, (char *) NEXTPTR(rep, fsReply), ((long) extra) << 2); - if (discard) - _EatData32(svr, rem_length - extra); - return (1); - } - /* - * if we get here, then extra > rem_length -- meaning we - * read a reply that's shorter than we expected. This is an - * error, but we still need to figure out how to handle it... - */ - _FSRead(svr, (char *) NEXTPTR(rep, fsReply), rem_length << 2); - (*_FSIOErrorFunction) (svr); - return (0); - - case FS_Error: - { - register _FSExtension *ext; - register Bool ret = False; - int ret_code; - fsError err; - unsigned long serial; - long err_data; - - err = *(fsError *) rep; - /* read the rest of the error */ - _FSRead(svr, (char *) &err + SIZEOF(fsReply), - (long) (SIZEOF(fsError) - SIZEOF(fsReply))); - serial = _FSSetLastRequestRead(svr, (fsGenericReply *) rep); - if (serial == cur_request) - /* do not die on certain failures */ - switch ((int) err.request) { - /* suck in any extra error info */ - case FSBadResolution: - case FSBadLength: - case FSBadIDChoice: - case FSBadRange: - case FSBadFont: - case FSBadFormat: - _FSRead(svr, (char *) &err_data, 4); - break; - case FSBadAccessContext: - _FSRead(svr, (char *) &err_data, 4); - return 0; - case FSBadAlloc: - return (0); - /* - * we better see if there is an extension who may want - * to suppress the error. - */ - default: - ext = svr->ext_procs; - while (ext) { - if (ext->error != NULL) - ret = (*ext->error) - (svr, &err, &ext->codes, &ret_code); - ext = ext->next; - } - if (ret) - return (ret_code); - break; - } - _FSError(svr, &err); - if (serial == cur_request) - return (0); - } - break; - default: - _FSEnq(svr, (fsEvent *) rep); - break; - } - } -} - - -/* Read and discard "n" 8-bit bytes of data */ - -void -_FSEatData(svr, n) - FSServer *svr; - register unsigned long n; -{ -#define SCRATCHSIZE 2048 - char buf[SCRATCHSIZE]; - - while (n > 0) { - register long bytes_read = (n > SCRATCHSIZE) ? SCRATCHSIZE : n; - - _FSRead(svr, buf, bytes_read); - n -= bytes_read; - } -#undef SCRATCHSIZE -} - - -/* Read and discard "n" 32-bit words. */ - -static void -_EatData32(svr, n) - FSServer *svr; - unsigned long n; -{ - _FSEatData(svr, n << 2); -} - - -/* - * _FSEnq - Place event packets on the display's queue. - * note that no squishing of move events in V11, since there - * is pointer motion hints.... - */ -void -_FSEnq(svr, event) - register FSServer *svr; - register fsEvent *event; -{ - register _FSQEvent *qelt; - -/*NOSTRICT*/ - if ((qelt = _FSqfree) != NULL) { - /* If _FSqfree is non-NULL do this, else malloc a new one. */ - _FSqfree = qelt->next; - } else if ((qelt = - (_FSQEvent *) FSmalloc((unsigned) sizeof(_FSQEvent))) == NULL) { - /* Malloc call failed! */ - ESET(ENOMEM); - (*_FSIOErrorFunction) (svr); - } - qelt->next = NULL; - /* go call through display to find proper event reformatter */ - if ((*svr->event_vec[event->type & 0177]) (svr, &qelt->event, event)) { - if (svr->tail) - svr->tail->next = qelt; - else - svr->head = qelt; - - svr->tail = qelt; - svr->qlen++; - } else { - /* ignored, or stashed away for many-to-one compression */ - qelt->next = _FSqfree; - _FSqfree = qelt; - } -} - -/* - * EventToWire in seperate file in that often not needed. - */ - -/*ARGSUSED*/ -Bool -_FSUnknownWireEvent(svr, re, event) - register FSServer *svr; /* pointer to display structure */ - register FSEvent *re; /* pointer to where event should be - * reformatted */ - register fsEvent *event; /* wire protocol event */ -{ - -#ifdef notdef - (void) fprintf(stderr, - "FSlib: unhandled wire event! event number = %d, display = %x\n.", - event->type, svr); -#endif - - return (False); -} - -/*ARGSUSED*/ -Status -_FSUnknownNativeEvent(svr, re, event) - register FSServer *svr; /* pointer to display structure */ - register FSEvent *re; /* pointer to where event should be - * reformatted */ - register fsEvent *event; /* wire protocol event */ -{ - -#ifdef notdef - (void) fprintf(stderr, - "FSlib: unhandled native event! event number = %d, display = %x\n.", - re->type, svr); -#endif - - return (0); -} - -/* - * reformat a wire event into an FSEvent structure of the right type. - */ -Bool -_FSWireToEvent(svr, re, event) - register FSServer *svr; /* pointer to display structure */ - register FSEvent *re; /* pointer to where event should be - * reformatted */ - register fsEvent *event; /* wire protocol event */ -{ - - re->type = event->type & 0x7f; - ((FSAnyEvent *) re)->serial = _FSSetLastRequestRead(svr, - (fsGenericReply *) event); - ((FSAnyEvent *) re)->send_event = ((event->type & 0x80) != 0); - ((FSAnyEvent *) re)->server = svr; - - /* - * Ignore the leading bit of the event type since it is set when a client - * sends an event rather than the server. - */ - - switch (event->type & 0177) { - default: - return (_FSUnknownWireEvent(svr, re, event)); - } -} - - -static char * -_SysErrorMsg(n) - int n; -{ - char *s = strerror(n); - - return (s ? s : "no such error"); -} - -/* - * _FSDefaultIOError - Default fatal system error reporting routine. Called - * when an X internal system error is encountered. - */ -int -_FSDefaultIOError(svr) - FSServer *svr; -{ - (void) fprintf(stderr, - "FSIO: fatal IO error %d (%s) on font server \"%s\"\r\n", -#ifdef WIN32 - WSAGetLastError(), strerror(WSAGetLastError()), -#else - - errno, _SysErrorMsg(errno), -#endif - FSServerString(svr)); - (void) fprintf(stderr, - " after %lu requests (%lu known processed) with %d events remaining.\r\n", - NextRequest(svr) - 1, LastKnownRequestProcessed(svr), - QLength(svr)); - - if (ECHECK(EPIPE)) { - (void) fprintf(stderr, - " The connection was probably broken by a server shutdown.\r\n"); - } - exit(1); - return 0; -} - -/* - * _FSError - Default non-fatal error reporting routine. Called when an - * FS_Error packet is encountered in the input stream. - */ -int -_FSError(svr, rep) - FSServer *svr; - fsError *rep; -{ - FSErrorEvent event; - - /* - * FS_Error packet encountered! We need to unpack the error before giving - * it to the user. - */ - - event.server = svr; - event.type = FS_Error; - event.serial = _FSSetLastRequestRead(svr, (fsGenericReply *) rep); - event.error_code = rep->request; - event.request_code = rep->major_opcode; - event.minor_code = rep->minor_opcode; - if (_FSErrorFunction != NULL) { - return ((*_FSErrorFunction) (svr, &event)); - } - exit(1); - /* NOTREACHED */ -} - -int -_FSPrintDefaultError(svr, event, fp) - FSServer *svr; - FSErrorEvent *event; - FILE *fp; -{ - char buffer[BUFSIZ]; - char mesg[BUFSIZ]; - char number[32]; - char *mtype = "FSlibMessage"; - register _FSExtension *ext = (_FSExtension *) NULL; - - (void) FSGetErrorText(svr, event->error_code, buffer, BUFSIZ); - (void) FSGetErrorDatabaseText(svr, mtype, "FSError", "FS Error", mesg, - BUFSIZ); - (void) fprintf(fp, "%s: %s\n ", mesg, buffer); - (void) FSGetErrorDatabaseText(svr, mtype, "MajorCode", - "Request Major code %d", mesg, BUFSIZ); - (void) fprintf(fp, mesg, event->request_code); - if (event->request_code < 128) { - sprintf(number, "%d", event->request_code); - (void) FSGetErrorDatabaseText(svr, "FSRequest", number, "", buffer, - BUFSIZ); - } else { - for (ext = svr->ext_procs; - ext && (ext->codes.major_opcode != event->request_code); - ext = ext->next); - if (ext) - strcpy(buffer, ext->name); - else - buffer[0] = '\0'; - } - (void) fprintf(fp, " (%s)\n ", buffer); - (void) FSGetErrorDatabaseText(svr, mtype, "MinorCode", - "Request Minor code %d", mesg, BUFSIZ); - (void) fprintf(fp, mesg, event->minor_code); - if (ext) { - sprintf(mesg, "%s.%d", ext->name, event->minor_code); - (void) FSGetErrorDatabaseText(svr, "FSRequest", mesg, "", buffer, - BUFSIZ); - (void) fprintf(fp, " (%s)", buffer); - } - fputs("\n ", fp); - (void) FSGetErrorDatabaseText(svr, mtype, "ResourceID", "ResourceID 0x%x", - mesg, BUFSIZ); - (void) fprintf(fp, mesg, event->resourceid); - fputs("\n ", fp); - (void) FSGetErrorDatabaseText(svr, mtype, "ErrorSerial", "Error Serial #%d", - mesg, BUFSIZ); - (void) fprintf(fp, mesg, event->serial); - fputs("\n ", fp); - (void) FSGetErrorDatabaseText(svr, mtype, "CurrentSerial", - "Current Serial #%d", mesg, BUFSIZ); - (void) fprintf(fp, mesg, svr->request); - fputs("\n", fp); - return 1; -} - -int -_FSDefaultError(svr, event) - FSServer *svr; - FSErrorEvent *event; -{ - if (_FSPrintDefaultError(svr, event, stderr) == 0) - return 0; - exit(1); - /* NOTREACHED */ -} - - -FSIOErrorHandler _FSIOErrorFunction = _FSDefaultIOError; -FSErrorHandler _FSErrorFunction = _FSDefaultError; - -/* - * This routine can be used to (cheaply) get some memory within a single - * Xlib routine for scratch space. It is reallocated from the same place - * each time, unless the library needs a large scratch space. - */ -char * -_FSAllocScratch(svr, nbytes) - register FSServer *svr; - unsigned long nbytes; -{ - if (nbytes > svr->scratch_length) { - if (svr->scratch_buffer != NULL) - FSfree(svr->scratch_buffer); - return (svr->scratch_length = nbytes, - svr->scratch_buffer = FSmalloc((unsigned) nbytes)); - } - return (svr->scratch_buffer); -} - -int -FSFree(data) - char *data; -{ - FSfree(data); - return 1; -} - -unsigned char * -FSMalloc(size) - unsigned size; -{ - return (unsigned char *) FSmalloc(size); -} - -#ifdef DataRoutineIsProcedure -void -Data(svr, data, len) - FSServer *svr; - char *data; - long len; -{ - if (svr->bufptr + (len) <= svr->bufmax) { - bcopy(data, svr->bufptr, (int) len); - svr->bufptr += ((len) + 3) & ~3; - } else { - _FSSend(svr, data, len); - } -} - -#endif /* DataRoutineIsProcedure */ - - -#ifdef WORD64 -/* - * XXX This is a *really* stupid way of doing this. It should just use - * svr->bufptr directly, taking into account where in the word it is. - */ - -/* - * Data16 - Place 16 bit data in the buffer. - * - * "svr" is a pointer to a FSServer. - * "data" is a pointer to the data. - * "len" is the length in bytes of the data. - */ - -static void -doData16(svr, data, len, packbuffer) - register FSServer *svr; - short *data; - unsigned len; - char *packbuffer; -{ - long *lp, - *lpack; - long i, - nwords, - bits; - long mask16 = 0x000000000000ffff; - - lp = (long *) data; - lpack = (long *) packbuffer; - *lpack = 0; - -/* nwords is the number of 16 bit values to be packed, - * the low order 16 bits of each word will be packed - * into 64 bit words - */ - nwords = len >> 1; - bits = 48; - - for (i = 0; i < nwords; i++) { - *lpack ^= (*lp & mask16) << bits; - bits -= 16; - lp++; - if (bits < 0) { - lpack++; - *lpack = 0; - bits = 48; - } - } - Data(svr, packbuffer, len); -} - -void -Data16(svr, data, len) - FSServer *svr; - short *data; - unsigned len; -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nwords = (PACKBUFFERSIZE >> 1); /* bytes to CARD16 */ - - for (; len > nwords; len -= nwords, data += nwords) { - doData16(svr, data, nwords, packbuffer); - } - doData16(svr, data, len, packbuffer); -} - -/* - * Data32 - Place 32 bit data in the buffer. - * - * "svr" is a pointer to a FSServer. - * "data" is a pointer to the data. - * "len" is the length in bytes of the data. - */ - -static -doData32(svr, data, len, packbuffer) - register FSServer *svr; - long *data; - unsigned len; - char *packbuffer; -{ - long *lp, - *lpack; - long i, - bits, - nwords; - long mask32 = 0x00000000ffffffff; - - lpack = (long *) packbuffer; - lp = data; - - *lpack = 0; - -/* nwords is the number of 32 bit values to be packed - * the low order 32 bits of each word will be packed - * into 64 bit words - */ - nwords = len >> 2; - bits = 32; - - for (i = 0; i < nwords; i++) { - *lpack ^= (*lp & mask32) << bits; - bits = bits ^ 32; - lp++; - if (bits) { - lpack++; - *lpack = 0; - } - } - Data(svr, packbuffer, len); -} - -void -Data32(svr, data, len) - FSServer *svr; - short *data; - unsigned len; -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nwords = (PACKBUFFERSIZE >> 2); /* bytes to CARD32 */ - - for (; len > nwords; len -= nwords, data += nwords) { - doData32(svr, data, nwords, packbuffer); - } - doData32(svr, data, len, packbuffer); -} - -#endif /* WORD64 */ - - - -/* - * _FSFreeQ - free the queue of events, called by XCloseServer when there are - * no more displays left on the display list - */ - -void -_FSFreeQ() -{ - register _FSQEvent *qelt = _FSqfree; - - while (qelt) { - register _FSQEvent *qnext = qelt->next; - - FSfree(qelt); - qelt = qnext; - } - _FSqfree = NULL; - return; -} - -#ifdef _POSIX_SOURCE /* stupid makedepend [need if] */ -#define NEED_UTSNAME -#endif -#ifdef hpux -#define NEED_UTSNAME -#endif -#ifdef USG -#define NEED_UTSNAME -#endif -#ifdef SVR4 -#ifndef _SEQUENT_ -#define NEED_UTSNAME -#endif -#endif - -#ifdef NEED_UTSNAME -#include -#endif - - -/* - * _FSGetHostname - similar to gethostname but allows special processing. - */ -int -_FSGetHostname(buf, maxlen) - char *buf; - int maxlen; -{ - int len; - -#ifdef NEED_UTSNAME - /* - * same host name crock as in server and xinit. - */ - struct utsname name; - - uname(&name); - len = strlen(name.nodename); - if (len >= maxlen) - len = maxlen - 1; - strncpy(buf, name.nodename, len); - buf[len] = '\0'; -#else - buf[0] = '\0'; - (void) gethostname(buf, maxlen); - buf[maxlen - 1] = '\0'; - len = strlen(buf); -#endif /* NEED_UTSNAME */ - - return len; -} - -#ifndef _FSANYSET -/* - * This is not always a macro. - */ -_FSANYSET(src) - long *src; -{ - int i; - - for (i=0; i -#ifdef USG -#ifndef __TYPES__ -#include /* forgot to protect it... */ -#define __TYPES__ -#endif /* __TYPES__ */ -#else -#if defined(_POSIX_SOURCE) && defined(MOTOROLA) -#undef _POSIX_SOURCE -#include -#define _POSIX_SOURCE -#else -#include -#endif -#endif /* USG */ - -#include "FSlib.h" -#include "FSproto.h" -#include "FSlibos.h" -#include - -#ifndef NULL -#define NULL 0 -#endif - -#ifdef X_NOT_STDC_ENV -extern int errno; /* Internal system error number. */ -#endif - -typedef int (* FSIOErrorHandler)(FSServer *); -typedef int (* FSErrorHandler)(FSServer *, FSErrorEvent *); - -extern FSIOErrorHandler _FSIOErrorFunction; -extern FSErrorHandler _FSErrorFunction; - -extern void _FSEatData ( FSServer *svr, unsigned long n ); -extern void _FSWaitForWritable ( FSServer *svr ); -extern void _FSWaitForReadable ( FSServer *svr ); -extern void _FSFlush ( FSServer *svr ); -extern void _FSRead ( FSServer *svr, char *data, long size ); -extern void _FSReadEvents ( FSServer *svr ); -extern void _FSReadPad ( FSServer *svr, char *data, long size ); -extern void _FSSend ( FSServer *svr, char *data, long size ); -extern void _FSEnq ( FSServer *svr, fsEvent *event ); -extern void _FSFreeServerStructure ( FSServer *svr ); -extern int _FSError ( FSServer *svr, fsError *rep ); -extern int _FSReply ( FSServer *svr, fsReply *rep, int extra, int discard ); -extern XtransConnInfo _FSConnectServer ( char *server_name ); -extern void _FSDisconnectServer ( XtransConnInfo trans_conn ); -extern void _FSSendClientPrefix ( FSServer *svr, fsConnClientPrefix *client ); -extern int _FSEventsQueued ( FSServer *svr, int mode ); -extern unsigned long _FSSetLastRequestRead ( FSServer *svr, - fsGenericReply *rep ); -extern int _FSUnknownWireEvent ( FSServer *svr, FSEvent *re, fsEvent *event ); -extern int _FSUnknownNativeEvent ( FSServer *svr, FSEvent *re, - fsEvent *event ); -extern int _FSWireToEvent ( FSServer *svr, FSEvent *re, fsEvent *event ); -extern int _FSDefaultIOError ( FSServer *svr ); -extern int _FSPrintDefaultError ( FSServer *svr, FSErrorEvent *event, - FILE *fp ); -extern int _FSDefaultError ( FSServer *svr, FSErrorEvent *event ); -extern char * _FSAllocScratch ( FSServer *svr, unsigned long nbytes ); -extern void _FSFreeQ ( void ); -extern int _FSGetHostname ( char *buf, int maxlen ); - -extern FSErrorHandler FSSetErrorHandler ( FSErrorHandler handler ); -extern FSIOErrorHandler FSSetIOErrorHandler ( FSIOErrorHandler handler ); - -#ifndef BUFSIZE -#define BUFSIZE 2048 /* FS output buffer size. */ -#endif - -/* - * server flags - */ -#define FSlibServerIOError (1L << 0) -#define FSlibServerClosing (1L << 1) - -/* Need to start requests on 64 bit word boundries - * on a CRAY computer so add a NoOp (127) if needed. - * A character pointer on a CRAY computer will be non-zero - * after shifting right 61 bits of it is not pointing to - * a word boundary. - */ - -#ifdef WORD64 -#define WORD64ALIGN if ((long)svr->bufptr >> 61) {\ - svr->last_req = svr->bufptr;\ - *(svr->bufptr) = FS_Noop;\ - *(svr->bufptr+1) = 0;\ - *(svr->bufptr+2) = 0;\ - *(svr->bufptr+3) = 1;\ - svr->request += 1;\ - svr->bufptr += 4;\ - } -#else /* else does not require alignment on 64-bit - * boundaries */ -#define WORD64ALIGN -#endif /* WORD64 */ - -/* - * GetReq - Get the next avilable FS request packet in the buffer and - * return it. - * - * "name" is the name of the request, e.g. InternAtom, OpenFont, etc. - * "req" is the name of the request pointer. - * - */ - -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) -#define GetReq(name, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fs##name##Req)) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fs##name##Req *)(svr->last_req = svr->bufptr);\ - req->reqType = FS_##name;\ - req->length = (SIZEOF(fs##name##Req))>>2;\ - svr->bufptr += SIZEOF(fs##name##Req);\ - svr->request++ - -#else /* non-ANSI C uses empty comment instead of - * "##" for token concatenation */ -#define GetReq(name, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fs/**/name/**/Req)) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fs/**/name/**/Req *)(svr->last_req = svr->bufptr);\ - req->reqType = FS_/**/name;\ - req->length = (SIZEOF(fs/**/name/**/Req))>>2;\ - svr->bufptr += SIZEOF(fs/**/name/**/Req);\ - svr->request++ -#endif - -/* GetReqExtra is the same as GetReq, but allocates "n" additional - bytes after the request. "n" must be a multiple of 4! */ - -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) -#define GetReqExtra(name, n, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fs##name##Req) + n) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fs##name##Req *)(svr->last_req = svr->bufptr);\ - req->reqType = FS_##name;\ - req->length = (SIZEOF(fs##name##Req) + n)>>2;\ - svr->bufptr += SIZEOF(fs##name##Req) + n;\ - svr->request++ -#else -#define GetReqExtra(name, n, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fs/**/name/**/Req) + n) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fs/**/name/**/Req *)(svr->last_req = svr->bufptr);\ - req->reqType = FS_/**/name;\ - req->length = (SIZEOF(fs/**/name/**/Req) + n)>>2;\ - svr->bufptr += SIZEOF(fs/**/name/**/Req) + n;\ - svr->request++ -#endif - - -/* - * GetResReq is for those requests that have a resource ID - * (Window, Pixmap, GContext, etc.) as their single argument. - * "rid" is the name of the resource. - */ - -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) -#define GetResReq(name, rid, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fsResourceReq)) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fsResourceReq *) (svr->last_req = svr->bufptr);\ - req->reqType = FS_##name;\ - req->length = 2;\ - req->id = (rid);\ - svr->bufptr += SIZEOF(fsResourceReq);\ - svr->request++ -#else -#define GetResReq(name, rid, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fsResourceReq)) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fsResourceReq *) (svr->last_req = svr->bufptr);\ - req->reqType = FS_/**/name;\ - req->length = 2;\ - req->id = (rid);\ - svr->bufptr += SIZEOF(fsResourceReq);\ - svr->request++ -#endif - -/* - * GetEmptyReq is for those requests that have no arguments - * at all. - */ - -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) -#define GetEmptyReq(name, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fsReq)) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fsReq *) (svr->last_req = svr->bufptr);\ - req->reqType = FS_##name;\ - req->length = 1;\ - svr->bufptr += SIZEOF(fsReq);\ - svr->request++ -#else -#define GetEmptyReq(name, req) \ - WORD64ALIGN\ - if ((svr->bufptr + SIZEOF(fsReq)) > svr->bufmax)\ - _FSFlush(svr);\ - req = (fsReq *) (svr->last_req = svr->bufptr);\ - req->reqType = FS_/**/name;\ - req->length = 1;\ - svr->bufptr += SIZEOF(fsReq);\ - svr->request++ -#endif - -#define SyncHandle() \ - if (svr->synchandler) (*svr->synchandler)(svr) - -/* - * Data - Place data in the buffer and pad the end to provide - * 32 bit word alignment. Transmit if the buffer fills. - * - * "svr" is a pointer to a Display. - * "data" is a pinter to a data buffer. - * "len" is the length of the data buffer. - * we can presume buffer less than 2^16 bytes, so bcopy can be used safely. - */ - -#ifdef DataRoutineIsProcedure -extern void Data(); - -#else -#define Data(svr, data, len) \ - if (svr->bufptr + (len) <= svr->bufmax) {\ - bcopy(data, svr->bufptr, (int)len);\ - svr->bufptr += ((len) + 3) & ~3;\ - } else\ - _FSSend(svr, data, len) -#endif /* DataRoutineIsProcedure */ - - -/* Allocate bytes from the buffer. No padding is done, so if - * the length is not a multiple of 4, the caller must be - * careful to leave the buffer aligned after sending the - * current request. - * - * "type" is the type of the pointer being assigned to. - * "ptr" is the pointer being assigned to. - * "n" is the number of bytes to allocate. - * - * Example: - * xTextElt *elt; - * BufAlloc (xTextElt *, elt, nbytes) - */ - -#define BufAlloc(type, ptr, n) \ - if (svr->bufptr + (n) > svr->bufmax) \ - _FSFlush (svr); \ - ptr = (type) svr->bufptr; \ - svr->bufptr += (n); - -/* - * provide emulation routines for smaller architectures - */ -#ifndef WORD64 -#define Data16(dpy, data, len) Data((dpy), (char *)(data), (len)) -#define Data32(dpy, data, len) Data((dpy), (char *)(data), (len)) -#define _FSRead16Pad(dpy, data, len) _FSReadPad((dpy), (char *)(data), (len)) -#define _FSRead16(dpy, data, len) _FSRead((dpy), (char *)(data), (len)) -#define _FSRead32(dpy, data, len) _FSRead((dpy), (char *)(data), (len)) -#endif /* not WORD64 */ - -#define PackData16(dpy,data,len) Data16 (dpy, data, len) -#define PackData32(dpy,data,len) Data32 (dpy, data, len) - -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#define max(a,b) (((a) > (b)) ? (a) : (b)) - -#ifdef MUSTCOPY -/* a little bit of magic */ -#define OneDataCard32(svr,dstaddr,srcvar) \ - { svr->bufptr -= 4; Data32 (svr, (char *) &(srcvar), 4); } - -#define STARTITERATE(tpvar,type,start,endcond,decr) \ - { register char *cpvar; \ - for (cpvar = (char *) start; endcond; cpvar = NEXTPTR(cpvar,type), decr) { \ - type dummy; bcopy (cpvar, (char *) &dummy, SIZEOF(type)); \ - tpvar = (type *) cpvar; -#define ENDITERATE }} - -#else - -/* srcvar must be a variable for large architecture version */ -#define OneDataCard32(svr,dstaddr,srcvar) \ - { *(unsigned long *)(dstaddr) = (srcvar); } - -#define STARTITERATE(tpvar,type,start,endcond,decr) \ - for (tpvar = (type *) start; endcond; tpvar++, decr) { -#define ENDITERATE } -#endif /* MUSTCOPY - used machines whose C structs - * don't line up with proto */ - - -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) -#define FSCat(x,y) x##_##y -#else -#define FSCat(x,y) x/**/_/**/y -#endif - -/* copy XCharInfo parts of a protocol reply into a FSXCharInfo */ - -#define FSUnpack_XCharInfo(packet, structure) \ - (structure)->left = FSCat(packet,left); \ - (structure)->right = FSCat(packet,right); \ - (structure)->width = FSCat(packet,width); \ - (structure)->ascent = FSCat(packet,ascent); \ - (structure)->descent = FSCat(packet,descent); \ - (structure)->attributes = FSCat(packet,attributes) - - -/* copy XFontInfoHeader parts of a protocol reply into a FSXFontInfoHeader */ - -#define FSUnpack_XFontInfoHeader(packet, structure, serverversion) \ - (structure)->flags = (packet)->font_header_flags; \ - (structure)->draw_direction = (packet)->font_header_draw_direction; \ - \ - if (serverversion > 1) { \ - (structure)->char_range.min_char.high = (packet)->font_hdr_char_range_min_char_high; \ - (structure)->char_range.min_char.low = (packet)->font_hdr_char_range_min_char_low; \ - (structure)->char_range.max_char.high = (packet)->font_hdr_char_range_max_char_high; \ - (structure)->char_range.max_char.low = (packet)->font_hdr_char_range_max_char_low; \ - (structure)->default_char.high = (packet)->font_header_default_char_high; \ - (structure)->default_char.low = (packet)->font_header_default_char_low; \ - } else { \ - (structure)->char_range.min_char.high = (packet)->font_hdr_char_range_min_char_low; \ - (structure)->char_range.min_char.low = (packet)->font_hdr_char_range_min_char_high; \ - (structure)->char_range.max_char.high = (packet)->font_hdr_char_range_max_char_low; \ - (structure)->char_range.max_char.low = (packet)->font_hdr_char_range_max_char_high; \ - (structure)->default_char.high = (packet)->font_header_default_char_low; \ - (structure)->default_char.low = (packet)->font_header_default_char_high; \ - } \ - \ - (structure)->font_ascent = (packet)->font_header_font_ascent; \ - (structure)->font_descent = (packet)->font_header_font_descent; \ - \ - FSUnpack_XCharInfo((packet)->font_header_min_bounds, &(structure)->min_bounds); \ - FSUnpack_XCharInfo((packet)->font_header_max_bounds, &(structure)->max_bounds) diff --git a/xc/lib/FS/FSlibos.h b/xc/lib/FS/FSlibos.h deleted file mode 100644 index bf781546c..000000000 --- a/xc/lib/FS/FSlibos.h +++ /dev/null @@ -1,326 +0,0 @@ -/* $TOG: FSlibos.h /main/24 1998/02/06 13:43:07 kaleb $ */ - -/* @(#)FSlibos.h 4.1 91/05/02 - * Copyright 1990 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the names of Network Computing - * Devices or Digital not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. Network Computing Devices or Digital make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES - * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - -Copyright 1987, 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $XFree86: xc/lib/FS/FSlibos.h,v 3.4 1998/10/03 08:41:08 dawes Exp $ */ - -/* - * FSlib networking & os include file - */ - -#include -#include - -#ifndef WIN32 - -/* - * makedepend screws up on #undef OPEN_MAX, so we define a new symbol - */ - -#ifndef FS_OPEN_MAX - -#ifndef X_NOT_POSIX -#ifdef _POSIX_SOURCE -#include -#else -#define _POSIX_SOURCE -#include -#undef _POSIX_SOURCE -#endif -#endif -#ifndef OPEN_MAX -#ifdef SVR4 -#define OPEN_MAX 256 -#else -#include -#ifndef OPEN_MAX -#ifdef __OSF1__ -#define OPEN_MAX 256 -#else -#ifdef NOFILE -#define OPEN_MAX NOFILE -#else -#ifndef __EMX__ -#ifdef __GNU__ -#define OPEN_MAX (sysconf(_SC_OPEN_MAX)) -#else /* !__GNU__ */ -#define OPEN_MAX NOFILES_MAX -#endif /* __GNU__ */ -#else /* __EMX__ */ -#define OPEN_MAX 256 -#endif /* __EMX__ */ -#endif -#endif -#endif -#endif -#endif - -#ifdef __GNU__ -#define FS_OPEN_MAX 256 -#else /*!__GNU__*/ -#if OPEN_MAX > 256 -#define FS_OPEN_MAX 256 -#else -#define FS_OPEN_MAX OPEN_MAX -#endif -#endif /*__GNU__*/ - -#endif /* FS_OPEN_MAX */ - -/* Utek leaves kernel macros around in include files (bleah) */ - -#ifdef dirty -#undef dirty -#endif - -#ifdef WORD64 -#define NMSKBITS 64 -#else -#define NMSKBITS 32 -#endif - -#define MSKCNT ((FS_OPEN_MAX + NMSKBITS - 1) / NMSKBITS) - -#ifdef LONG64 -typedef unsigned int FdSet[MSKCNT]; -#else -typedef unsigned long FdSet[MSKCNT]; -#endif - -#if (MSKCNT==1) -#define BITMASK(i) (1 << (i)) -#define MASKIDX(i) 0 -#endif - -#if (MSKCNT>1) -#define BITMASK(i) (1 << ((i) & (NMSKBITS - 1))) -#define MASKIDX(i) ((i) / NMSKBITS) -#endif - -#define MASKWORD(buf, i) buf[MASKIDX(i)] -#define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i) -#define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) -#define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) - -#if (MSKCNT==1) -#define COPYBITS(src, dst) dst[0] = src[0] -#define CLEARBITS(buf) buf[0] = 0 -#define MASKANDSETBITS(dst, b1, b2) dst[0] = (b1[0] & b2[0]) -#define ORBITS(dst, b1, b2) dst[0] = (b1[0] | b2[0]) -#define UNSETBITS(dst, b1) (dst[0] &= ~b1[0]) -#define _FSANYSET(src) (src[0]) -#endif - -#if (MSKCNT==2) -#define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; } -#define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; } -#define MASKANDSETBITS(dst, b1, b2) {\ - dst[0] = (b1[0] & b2[0]);\ - dst[1] = (b1[1] & b2[1]); } -#define ORBITS(dst, b1, b2) {\ - dst[0] = (b1[0] | b2[0]);\ - dst[1] = (b1[1] | b2[1]); } -#define UNSETBITS(dst, b1) {\ - dst[0] &= ~b1[0]; \ - dst[1] &= ~b1[1]; } -#define _FSANYSET(src) (src[0] || src[1]) -#endif - -#if (MSKCNT==3) -#define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; \ - dst[2] = src[2]; } -#define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; buf[2] = 0; } -#define MASKANDSETBITS(dst, b1, b2) {\ - dst[0] = (b1[0] & b2[0]);\ - dst[1] = (b1[1] & b2[1]);\ - dst[2] = (b1[2] & b2[2]); } -#define ORBITS(dst, b1, b2) {\ - dst[0] = (b1[0] | b2[0]);\ - dst[1] = (b1[1] | b2[1]);\ - dst[2] = (b1[2] | b2[2]); } -#define UNSETBITS(dst, b1) {\ - dst[0] &= ~b1[0]; \ - dst[1] &= ~b1[1]; \ - dst[2] &= ~b1[2]; } -#define _FSANYSET(src) (src[0] || src[1] || src[2]) -#endif - -#if (MSKCNT==4) -#define COPYBITS(src, dst) dst[0] = src[0]; dst[1] = src[1]; \ - dst[2] = src[2]; dst[3] = src[3] -#define CLEARBITS(buf) buf[0] = 0; buf[1] = 0; buf[2] = 0; buf[3] = 0 -#define MASKANDSETBITS(dst, b1, b2) \ - dst[0] = (b1[0] & b2[0]);\ - dst[1] = (b1[1] & b2[1]);\ - dst[2] = (b1[2] & b2[2]);\ - dst[3] = (b1[3] & b2[3]) -#define ORBITS(dst, b1, b2) \ - dst[0] = (b1[0] | b2[0]);\ - dst[1] = (b1[1] | b2[1]);\ - dst[2] = (b1[2] | b2[2]);\ - dst[3] = (b1[3] | b2[3]) -#define UNSETBITS(dst, b1) \ - dst[0] &= ~b1[0]; \ - dst[1] &= ~b1[1]; \ - dst[2] &= ~b1[2]; \ - dst[3] &= ~b1[3] -#define _FSANYSET(src) (src[0] || src[1] || src[2] || src[3]) -#endif - -#if (MSKCNT>4) -#define COPYBITS(src, dst) bcopy((caddr_t) src, (caddr_t) dst, sizeof(FdSet)) -#define CLEARBITS(buf) bzero((caddr_t) buf, sizeof(FdSet)) -#define MASKANDSETBITS(dst, b1, b2) \ - { int cri; \ - for (cri=0; cri4 and not 8, then _FSANYSET is a routine defined in FSlibInt.c. - * - * #define _FSANYSET(src) (src[0] || src[1] || src[2] || src[3] || src[4] ...) - */ -#endif - - -#else - -#include -#include - -typedef fd_set FdSet; - -#define CLEARBITS(set) FD_ZERO(&set) -#define BITSET(set,s) FD_SET(s,&set) -#define _FSANYSET(set) set.fd_count - -#endif - -#include -#ifndef X_NOT_STDC_ENV -#include -#include -#else -char *malloc(), *realloc(), *calloc(); -void exit(); -#ifdef SYSV -#include -#else -#include -#endif -#endif - -/* - * The following definitions can be used for locking requests in multi-threaded - * address spaces. - */ -#define LockDisplay(dis) -#define LockMutex(mutex) -#define UnlockMutex(mutex) -#define UnlockDisplay(dis) -#define FSfree(ptr) free((ptr)) - - -/* - * Note that some machines do not return a valid pointer for malloc(0), in - * which case we provide an alternate under the control of the - * define MALLOC_0_RETURNS_NULL. This is necessary because some - * FSlib code expects malloc(0) to return a valid pointer to storage. - */ - -#ifdef MALLOC_0_RETURNS_NULL -#define FSmalloc(size) malloc(((size) > 0 ? (size) : 1)) -#define FSrealloc(ptr, size) realloc((ptr), ((size) > 0 ? (size) : 1)) -#define FScalloc(nelem, elsize) calloc(((nelem) > 0 ? (nelem) : 1), (elsize)) - -#else - -#define FSmalloc(size) malloc((size)) -#define FSrealloc(ptr, size) realloc((ptr), (size)) -#define FScalloc(nelem, elsize) calloc((nelem), (elsize)) -#endif - -/* - * ReadvFromServer and WritevToSever use struct iovec, normally found - * in Berkeley systems in . See the readv(2) and writev(2) - * manual pages for details. - * - * struct iovec { - * caddr_t iov_base; - * int iov_len; - * }; - */ - -#ifdef USG - -#if defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) -#ifndef __TIMEVAL__ -#define __TIMEVAL__ -struct timeval { /* BSD has in */ - long tv_sec; - long tv_usec; -}; - -#endif /* __TIMEVAL__ */ - -#endif /* not CRAY or umips */ - -#endif /* USG */ - - -#define SearchString(string, char) index((string), (char)) diff --git a/xc/lib/FS/Imakefile b/xc/lib/FS/Imakefile deleted file mode 100644 index a391d0d24..000000000 --- a/xc/lib/FS/Imakefile +++ /dev/null @@ -1,48 +0,0 @@ -XCOMM $XConsortium: Imakefile /main/20 1996/09/28 16:32:46 rws $ -XCOMM $XFree86: xc/lib/FS/Imakefile,v 3.4 1999/02/19 21:26:52 hohndel Exp $ -#define DoNormalLib NormalLibFS -#define DoSharedLib SharedLibFS -#define DoExtraLib SharedLibFS -#define DoDebugLib DebugLibFS -#define DoProfileLib ProfileLibFS -#define LibName FS -#define SoRev SOFSREV -#define IncSubdir X11 -#define IncSubSubdir fonts - -#if Malloc0ReturnsNull - DEFINES = -DMALLOC_0_RETURNS_NULL -#endif - -DEPEND_DEFINES = $(TRANS_INCLUDES) $(CONN_DEFINES) - -HEADERS = FSlib.h - -INCLUDES = -I$(FONTINCSRC) - -SRCS = FSClServ.c FSCloseFt.c FSConnServ.c FSErrDis.c FSErrHndlr.c \ - FSFlush.c FSFontInfo.c FSFtNames.c FSGetCats.c FSListCats.c \ - FSListExt.c FSMisc.c FSNextEv.c FSOpenFont.c FSOpenServ.c \ - FSQGlyphs.c FSQXExt.c FSQXInfo.c FSQuExt.c FSServName.c \ - FSSetCats.c FSSync.c FSSynchro.c FSlibInt.c transport.c - -OBJS = FSClServ.o FSCloseFt.o FSConnServ.o FSErrDis.o FSErrHndlr.o \ - FSFlush.o FSFontInfo.o FSFtNames.o FSGetCats.o FSListCats.o \ - FSListExt.o FSMisc.o FSNextEv.o FSOpenFont.o FSOpenServ.o \ - FSQGlyphs.o FSQXExt.o FSQXInfo.o FSQuExt.o FSServName.o \ - FSSetCats.o FSSync.o FSSynchro.o FSlibInt.o transport.o - -CONN_DEFINES = $(CONNECTION_FLAGS) -DFS_t -DTRANS_CLIENT -#if HasBSD44Sockets -SOCK_DEFINES = -DBSD44SOCKETS -#endif - -#include - -SpecialCLibObjectRule(FSlibInt,$(ICONFIGFILES),$(CONN_DEFINES)) -SpecialCLibObjectRule(FSOpenServ,$(ICONFIGFILES),$(CONN_DEFINES)) -SpecialCLibObjectRule(FSConnServ,$(ICONFIGFILES),$(CONN_DEFINES) $(SOCK_DEFINES)) -SpecialCLibObjectRule(transport,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)) -LinkSourceFile(transport.c,$(TRANSCOMMSRC)) - -DependTarget() diff --git a/xc/lib/ICE/ICE-def.cpp b/xc/lib/ICE/ICE-def.cpp deleted file mode 100644 index cf494cda3..000000000 --- a/xc/lib/ICE/ICE-def.cpp +++ /dev/null @@ -1,64 +0,0 @@ -LIBRARY ICE -VERSION LIBRARY_VERSION -EXPORTS - IceAcceptConnection - IceAddConnectionWatch - IceAllocScratch - IceAppLockConn - IceAppUnlockConn - IceAuthFileName - IceCheckShutdownNegotiation - IceCloseConnection - IceComposeNetworkIdList - IceConnectionNumber - IceConnectionStatus - IceConnectionString - IceFlush - IceFreeAuthFileEntry - IceFreeListenObjs - IceGenerateMagicCookie - IceGetAuthFileEntry - IceGetConnectionContext - IceGetInBufSize - IceGetListenConnectionNumber - IceGetListenConnectionString - IceGetOutBufSize - IceInitThreads - IceLastReceivedSequenceNumber - IceLastSentSequenceNumber - IceListenForConnections - IceLockAuthFile - IceOpenConnection - IcePing - IceProcessMessages - IceProtocolRevision - IceProtocolSetup - IceProtocolShutdown - IceProtocolVersion - IceReadAuthFileEntry - IceRegisterForProtocolReply - IceRegisterForProtocolSetup - IceRelease - IceRemoveConnectionWatch - IceSetErrorHandler - IceSetHostBasedAuthProc - IceSetIOErrorHandler - IceSetPaAuthData - IceSetShutdownNegotiation - IceSwapping - IceUnlockAuthFile - IceVendor - IceWriteAuthFileEntry - _IceTransGetPeerAddr - _IceTransGetPeerNetworkId - _IceErrorBadMinor - _IceErrorBadLength - _IceErrorBadState - _IceErrorBadValue - _IcePaMagicCookie1Proc - _IcePoMagicCookie1Proc - _IceRead - _IceReadSkip - _IceWrite - IceListenForWellKnownConnections -/* $TOG: ICE-def.cpp /main/7 1998/01/04 12:31:53 kaleb $ */ diff --git a/xc/lib/ICE/ICE.h b/xc/lib/ICE/ICE.h deleted file mode 100644 index 8d5422efa..000000000 --- a/xc/lib/ICE/ICE.h +++ /dev/null @@ -1,98 +0,0 @@ -/* $TOG: ICE.h /main/7 1998/02/06 13:56:58 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium - -******************************************************************************/ - -#ifndef _ICE_H_ -#define _ICE_H_ - -/* - * Protocol Version - */ - -#define IceProtoMajor 1 -#define IceProtoMinor 0 - - -/* - * Byte Order - */ - -#define IceLSBfirst 0 -#define IceMSBfirst 1 - - -/* - * ICE minor opcodes - */ - -#define ICE_Error 0 -#define ICE_ByteOrder 1 -#define ICE_ConnectionSetup 2 -#define ICE_AuthRequired 3 -#define ICE_AuthReply 4 -#define ICE_AuthNextPhase 5 -#define ICE_ConnectionReply 6 -#define ICE_ProtocolSetup 7 -#define ICE_ProtocolReply 8 -#define ICE_Ping 9 -#define ICE_PingReply 10 -#define ICE_WantToClose 11 -#define ICE_NoClose 12 - - -/* - * Error severity - */ - -#define IceCanContinue 0 -#define IceFatalToProtocol 1 -#define IceFatalToConnection 2 - - -/* - * ICE error classes that are common to all protocols - */ - -#define IceBadMinor 0x8000 -#define IceBadState 0x8001 -#define IceBadLength 0x8002 -#define IceBadValue 0x8003 - - -/* - * ICE error classes that are specific to the ICE protocol - */ - -#define IceBadMajor 0 -#define IceNoAuth 1 -#define IceNoVersion 2 -#define IceSetupFailed 3 -#define IceAuthRejected 4 -#define IceAuthFailed 5 -#define IceProtocolDuplicate 6 -#define IceMajorOpcodeDuplicate 7 -#define IceUnknownProtocol 8 - -#endif /* _ICE_H_ */ diff --git a/xc/lib/ICE/ICEconn.h b/xc/lib/ICE/ICEconn.h deleted file mode 100644 index a9c613ebe..000000000 --- a/xc/lib/ICE/ICEconn.h +++ /dev/null @@ -1,245 +0,0 @@ -/* $TOG: ICEconn.h /main/5 1998/02/06 13:56:22 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#ifndef _ICECONN_H_ -#define _ICECONN_H_ - -/* - * Data structures for ICE connection object - */ - -typedef struct _IceSavedReplyWait { - IceReplyWaitInfo *reply_wait; - Bool reply_ready; - struct _IceSavedReplyWait *next; -} _IceSavedReplyWait; - -typedef struct _IcePingWait { - IcePingReplyProc ping_reply_proc; - IcePointer client_data; - struct _IcePingWait *next; -} _IcePingWait; - -typedef struct { - char *vendor; - char *release; - int version_count; - IcePoVersionRec *version_recs; - int auth_count; - char **auth_names; - IcePoAuthProc *auth_procs; - IceIOErrorProc io_error_proc; -} _IcePoProtocol; - -typedef struct { - char *vendor; - char *release; - int version_count; - IcePaVersionRec *version_recs; - IceProtocolSetupProc protocol_setup_proc; - IceProtocolActivateProc protocol_activate_proc; - int auth_count; - char **auth_names; - IcePaAuthProc *auth_procs; - IceHostBasedAuthProc host_based_auth_proc; - IceIOErrorProc io_error_proc; -} _IcePaProtocol; - -typedef struct { - char *protocol_name; - _IcePoProtocol *orig_client; - _IcePaProtocol *accept_client; -} _IceProtocol; - -typedef struct { - Bool in_use; - int my_opcode; - _IceProtocol *protocol; - IcePointer client_data; - Bool accept_flag; - union { - IcePaProcessMsgProc accept_client; - IcePoProcessMsgProc orig_client; - } process_msg_proc; -} _IceProcessMsgInfo; - -typedef struct { - int his_version_index; - int my_version_index; - char *his_vendor; - char *his_release; - char my_auth_index; - IcePointer my_auth_state; - Bool must_authenticate; -} _IceConnectToMeInfo; - -typedef struct { - int his_opcode; - int my_opcode; - int his_version_index; - int my_version_index; - char *his_vendor; - char *his_release; - char my_auth_index; - IcePointer my_auth_state; - Bool must_authenticate; -} _IceProtoSetupToMeInfo; - -typedef struct { - Bool auth_active; - char my_auth_index; - IcePointer my_auth_state; -} _IceConnectToYouInfo; - -typedef struct { - int my_opcode; - int my_auth_count; - int *my_auth_indices; - Bool auth_active; - char my_auth_index; - IcePointer my_auth_state; -} _IceProtoSetupToYouInfo; - - -struct _IceConn { - - unsigned int io_ok : 1; /* did an IO error occur? */ - unsigned int swap : 1; /* do we need to swap on reads? */ - unsigned int waiting_for_byteorder : 1; /* waiting for a ByteOrder msg? */ - unsigned int skip_want_to_close : 1; /* avoid shutdown negotiation? */ - unsigned int want_to_close : 1; /* did we send a WantToClose? */ - unsigned int free_asap : 1; /* free as soon as possible */ - unsigned int unused1 : 2; /* future use */ - unsigned int unused2 : 8; /* future use */ - - IceConnectStatus connection_status; /* pending, accepted, rejected */ - - unsigned char my_ice_version_index; /* which version are we using? */ - - struct _XtransConnInfo *trans_conn; /* transport connection object */ - unsigned long send_sequence; /* Sequence # of last msg sent */ - unsigned long receive_sequence; /* Sequence # of last msg received */ - - char *connection_string; /* network connection string */ - char *vendor; /* other client's vendor */ - char *release; /* other client's release */ - - char *inbuf; /* Input buffer starting address */ - char *inbufptr; /* Input buffer index pointer */ - char *inbufmax; /* Input buffer maximum+1 address */ - - char *outbuf; /* Output buffer starting address */ - char *outbufptr; /* Output buffer index pointer */ - char *outbufmax; /* Output buffer maximum+1 address */ - - char *scratch; /* scratch buffer */ - unsigned long scratch_size; /* scratch size */ - - int dispatch_level; /* IceProcessMessages dispatch level */ - - IcePointer context; /* context associated with caller - of IceOpenConnection */ - - /* - * Before we read a message, the major opcode of the message must be - * mapped to our corresponding major opcode (the two clients can use - * different opcodes for the same protocol). In order to save space, - * we keep track of the mininum and maximum major opcodes used by the - * other client. To get the information on how to process this message, - * we do the following... - * - * processMsgInfo = iceConn->process_msg_info[ - * message->majorOpcode - iceConn->his_min_opcode] - * - * Note that the number of elements in the iceConn->process_msg_info - * array is always (iceConn->his_max_opcode - iceConn->his_min_opcode + 1). - * We check process_msg_info->in_use to see if the opcode is being used. - */ - - _IceProcessMsgInfo *process_msg_info; - char his_min_opcode; /* [1..255] */ - char his_max_opcode; /* [1..255] */ - - - /* - * Number of times this iceConn was returned in IceOpenConnection - * or IceAcceptConnection. - */ - - unsigned char open_ref_count; - - - /* - * Number of active protocols. - */ - - unsigned char proto_ref_count; - - - /* - * If this ICE connection was created with IceAcceptConnection, - * the listen_obj field is set to the listen object. Otherwise, - * the listen_obj field is NULL. - */ - - IceListenObj listen_obj; - - - - - /* - * We need to keep track of all the replies we're waiting for. - * Check the comments in process.c for how this works. - */ - - _IceSavedReplyWait *saved_reply_waits; - - - /* - * We keep track of all Pings sent from the client. When the Ping reply - * arrives, we remove it from the list. - */ - - _IcePingWait *ping_waits; - - - /* - * Some state for a client doing a Connection/Protocol Setup - */ - - _IceConnectToYouInfo *connect_to_you; - _IceProtoSetupToYouInfo *protosetup_to_you; - - - /* - * Some state for a client receiving a Connection/Protocol Setup - */ - - _IceConnectToMeInfo *connect_to_me; - _IceProtoSetupToMeInfo *protosetup_to_me; - -}; - -#endif /* _ICECONN_H_ */ diff --git a/xc/lib/ICE/ICElib.h b/xc/lib/ICE/ICElib.h deleted file mode 100644 index 8486d1293..000000000 --- a/xc/lib/ICE/ICElib.h +++ /dev/null @@ -1,534 +0,0 @@ -/* $TOG: ICElib.h /main/42 1998/02/06 13:56:32 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ -/* $XFree86: xc/lib/ICE/ICElib.h,v 3.2 1998/10/03 08:41:09 dawes Exp $ */ - -#ifndef _ICELIB_H_ -#define _ICELIB_H_ - -#include -#include - -#define Bool int -#define Status int -#define True 1 -#define False 0 - -#if NeedFunctionPrototypes -typedef void *IcePointer; -#else -typedef char *IcePointer; -#endif - -typedef enum { - IcePoAuthHaveReply, - IcePoAuthRejected, - IcePoAuthFailed, - IcePoAuthDoneCleanup -} IcePoAuthStatus; - -typedef enum { - IcePaAuthContinue, - IcePaAuthAccepted, - IcePaAuthRejected, - IcePaAuthFailed -} IcePaAuthStatus; - -typedef enum { - IceConnectPending, - IceConnectAccepted, - IceConnectRejected, - IceConnectIOError -} IceConnectStatus; - -typedef enum { - IceProtocolSetupSuccess, - IceProtocolSetupFailure, - IceProtocolSetupIOError, - IceProtocolAlreadyActive -} IceProtocolSetupStatus; - -typedef enum { - IceAcceptSuccess, - IceAcceptFailure, - IceAcceptBadMalloc -} IceAcceptStatus; - -typedef enum { - IceClosedNow, - IceClosedASAP, - IceConnectionInUse, - IceStartedShutdownNegotiation -} IceCloseStatus; - -typedef enum { - IceProcessMessagesSuccess, - IceProcessMessagesIOError, - IceProcessMessagesConnectionClosed -} IceProcessMessagesStatus; - -typedef struct { - unsigned long sequence_of_request; - int major_opcode_of_request; - int minor_opcode_of_request; - IcePointer reply; -} IceReplyWaitInfo; - -typedef struct _IceConn *IceConn; -typedef struct _IceListenObj *IceListenObj; - -typedef void (*IceWatchProc) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IcePointer /* clientData */, - Bool /* opening */, - IcePointer * /* watchData */ -#endif -); - -typedef void (*IcePoProcessMsgProc) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IcePointer /* clientData */, - int /* opcode */, - unsigned long /* length */, - Bool /* swap */, - IceReplyWaitInfo * /* replyWait */, - Bool * /* replyReadyRet */ -#endif -); - -typedef void (*IcePaProcessMsgProc) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IcePointer /* clientData */, - int /* opcode */, - unsigned long /* length */, - Bool /* swap */ -#endif -); - -typedef struct { - int major_version; - int minor_version; - IcePoProcessMsgProc process_msg_proc; -} IcePoVersionRec; - -typedef struct { - int major_version; - int minor_version; - IcePaProcessMsgProc process_msg_proc; -} IcePaVersionRec; - -typedef IcePoAuthStatus (*IcePoAuthProc) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IcePointer * /* authStatePtr */, - Bool /* cleanUp */, - Bool /* swap */, - int /* authDataLen */, - IcePointer /* authData */, - int * /* replyDataLenRet */, - IcePointer * /* replyDataRet */, - char ** /* errorStringRet */ -#endif -); - -typedef IcePaAuthStatus (*IcePaAuthProc) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IcePointer * /* authStatePtr */, - Bool /* swap */, - int /* authDataLen */, - IcePointer /* authData */, - int * /* replyDataLenRet */, - IcePointer * /* replyDataRet */, - char ** /* errorStringRet */ -#endif -); - -typedef Bool (*IceHostBasedAuthProc) ( -#if NeedFunctionPrototypes - char * /* hostName */ -#endif -); - -typedef Status (*IceProtocolSetupProc) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* majorVersion */, - int /* minorVersion */, - char * /* vendor */, - char * /* release */, - IcePointer * /* clientDataRet */, - char ** /* failureReasonRet */ -#endif -); - -typedef void (*IceProtocolActivateProc) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IcePointer /* clientData */ -#endif -); - -typedef void (*IceIOErrorProc) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -typedef void (*IcePingReplyProc) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IcePointer /* clientData */ -#endif -); - -typedef void (*IceErrorHandler) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - Bool /* swap */, - int /* offendingMinorOpcode */, - unsigned long /* offendingSequence */, - int /* errorClass */, - int /* severity */, - IcePointer /* values */ -#endif -); - -typedef void (*IceIOErrorHandler) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - - -/* - * Function prototypes - */ - -_XFUNCPROTOBEGIN - -extern int IceRegisterForProtocolSetup ( -#if NeedFunctionPrototypes - char * /* protocolName */, - char * /* vendor */, - char * /* release */, - int /* versionCount */, - IcePoVersionRec * /* versionRecs */, - int /* authCount */, - char ** /* authNames */, - IcePoAuthProc * /* authProcs */, - IceIOErrorProc /* IOErrorProc */ -#endif -); - -extern int IceRegisterForProtocolReply ( -#if NeedFunctionPrototypes - char * /* protocolName */, - char * /* vendor */, - char * /* release */, - int /* versionCount */, - IcePaVersionRec * /* versionRecs */, - int /* authCount */, - char ** /* authNames */, - IcePaAuthProc * /* authProcs */, - IceHostBasedAuthProc /* hostBasedAuthProc */, - IceProtocolSetupProc /* protocolSetupProc */, - IceProtocolActivateProc /* protocolActivateProc */, - IceIOErrorProc /* IOErrorProc */ -#endif -); - -extern IceConn IceOpenConnection ( -#if NeedFunctionPrototypes - char * /* networkIdsList */, - IcePointer /* context */, - Bool /* mustAuthenticate */, - int /* majorOpcodeCheck */, - int /* errorLength */, - char * /* errorStringRet */ -#endif -); - -extern IcePointer IceGetConnectionContext ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern Status IceListenForConnections ( -#if NeedFunctionPrototypes - int * /* countRet */, - IceListenObj ** /* listenObjsRet */, - int /* errorLength */, - char * /* errorStringRet */ -#endif -); - -extern Status IceListenForWellKnownConnections ( -#if NeedFunctionPrototypes - char * /* port */, - int * /* countRet */, - IceListenObj ** /* listenObjsRet */, - int /* errorLength */, - char * /* errorStringRet */ -#endif -); - -extern int IceGetListenConnectionNumber ( -#if NeedFunctionPrototypes - IceListenObj /* listenObj */ -#endif -); - -extern char *IceGetListenConnectionString ( -#if NeedFunctionPrototypes - IceListenObj /* listenObj */ -#endif -); - -extern char *IceComposeNetworkIdList ( -#if NeedFunctionPrototypes - int /* count */, - IceListenObj * /* listenObjs */ -#endif -); - -extern void IceFreeListenObjs ( -#if NeedFunctionPrototypes - int /* count */, - IceListenObj * /* listenObjs */ -#endif -); - -extern void IceSetHostBasedAuthProc ( -#if NeedFunctionPrototypes - IceListenObj /* listenObj */, - IceHostBasedAuthProc /* hostBasedAuthProc */ -#endif -); - -extern IceConn IceAcceptConnection ( -#if NeedFunctionPrototypes - IceListenObj /* listenObj */, - IceAcceptStatus * /* statusRet */ -#endif -); - -extern void IceSetShutdownNegotiation ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - Bool /* negotiate */ -#endif -); - -extern Bool IceCheckShutdownNegotiation ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern IceCloseStatus IceCloseConnection ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern Status IceAddConnectionWatch ( -#if NeedFunctionPrototypes - IceWatchProc /* watchProc */, - IcePointer /* clientData */ -#endif -); - -extern void IceRemoveConnectionWatch ( -#if NeedFunctionPrototypes - IceWatchProc /* watchProc */, - IcePointer /* clientData */ -#endif -); - -extern IceProtocolSetupStatus IceProtocolSetup ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* myOpcode */, - IcePointer /* clientData */, - Bool /* mustAuthenticate */, - int * /* majorVersionRet */, - int * /* minorVersionRet */, - char ** /* vendorRet */, - char ** /* releaseRet */, - int /* errorLength */, - char * /* errorStringRet */ -#endif -); - -extern Status IceProtocolShutdown ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* majorOpcode */ -#endif -); - -extern IceProcessMessagesStatus IceProcessMessages ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IceReplyWaitInfo * /* replyWait */, - Bool * /* replyReadyRet */ -#endif -); - -extern Status IcePing ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IcePingReplyProc /* pingReplyProc */, - IcePointer /* clientData */ -#endif -); - -extern char *IceAllocScratch ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - unsigned long /* size */ -#endif -); - -extern int IceFlush ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern int IceGetOutBufSize ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern int IceGetInBufSize ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern IceConnectStatus IceConnectionStatus ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern char *IceVendor ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern char *IceRelease ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern int IceProtocolVersion ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern int IceProtocolRevision ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern int IceConnectionNumber ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern char *IceConnectionString ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern unsigned long IceLastSentSequenceNumber ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern unsigned long IceLastReceivedSequenceNumber ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern Bool IceSwapping ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern IceErrorHandler IceSetErrorHandler ( -#if NeedFunctionPrototypes - IceErrorHandler /* handler */ -#endif -); - -extern IceIOErrorHandler IceSetIOErrorHandler ( -#if NeedFunctionPrototypes - IceIOErrorHandler /* handler */ -#endif -); - - -/* - * Multithread Routines - */ - -extern Status IceInitThreads ( -#if NeedFunctionPrototypes - void -#endif -); - -extern void IceAppLockConn ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern void IceAppUnlockConn ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -_XFUNCPROTOEND - -#endif /* _ICELIB_H_ */ diff --git a/xc/lib/ICE/ICElibint.h b/xc/lib/ICE/ICElibint.h deleted file mode 100644 index de929db93..000000000 --- a/xc/lib/ICE/ICElibint.h +++ /dev/null @@ -1,584 +0,0 @@ -/* $TOG: ICElibint.h /main/43 1998/02/06 13:56:27 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#ifndef _ICELIBINT_H_ -#define _ICELIBINT_H_ - -#include -#include -#include -#include -#include -#include - -#ifndef X_NOT_STDC_ENV -#include -#else -char *malloc(); -#endif - -#ifndef NULL -#define NULL 0 -#endif - - -/* - * Vendor & Release - */ - -#define IceVendorString "MIT" -#define IceReleaseString "1.0" - - -/* - * Pad to a 64 bit boundary - */ - -#define PAD64(_bytes) ((8 - ((unsigned int) (_bytes) % 8)) % 8) - -#define PADDED_BYTES64(_bytes) (_bytes + PAD64 (_bytes)) - - -/* - * Pad to 32 bit boundary - */ - -#define PAD32(_bytes) ((4 - ((unsigned int) (_bytes) % 4)) % 4) - -#define PADDED_BYTES32(_bytes) (_bytes + PAD32 (_bytes)) - - -/* - * Number of 8 byte units in _bytes. - */ - -#define WORD64COUNT(_bytes) (((unsigned int) ((_bytes) + 7)) >> 3) - - -/* - * Number of 4 byte units in _bytes. - */ - -#define WORD32COUNT(_bytes) (((unsigned int) ((_bytes) + 3)) >> 2) - - -/* - * Given a string, compute the number of bytes for the STRING representation - */ - -#define STRING_BYTES(_string) \ - (2 + strlen (_string) + PAD32 (2 + strlen (_string))) - - -/* - * Size of ICE input/output buffers - */ - -#define ICE_INBUFSIZE 1024 - -#define ICE_OUTBUFSIZE 1024 - - -/* - * Maxium number of ICE authentication methods allowed, and maxiumum - * number of authentication data entries allowed to be set in the - * IceSetPaAuthData function. - * - * We should use linked lists, but this is easier and should suffice. - */ - -#define MAX_ICE_AUTH_NAMES 32 -#define ICE_MAX_AUTH_DATA_ENTRIES 100 - - -/* - * ICE listen object - */ - -struct _IceListenObj { - struct _XtransConnInfo *trans_conn; /* transport connection object */ - char *network_id; - IceHostBasedAuthProc host_based_auth_proc; -}; - - -/* - * Some internal data structures for processing ICE messages. - */ - -typedef void (*_IceProcessCoreMsgProc) ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* opcode */, - unsigned long /* length */, - Bool /* swap */, - IceReplyWaitInfo * /* replyWait */, - Bool * /* replyReadyRet */, - Bool * /* connectionClosedRet */ -#endif -); - -typedef struct { - int major_version; - int minor_version; - _IceProcessCoreMsgProc process_core_msg_proc; -} _IceVersion; - - -/* - * STORE FOO - */ - -#define STORE_CARD8(_pBuf, _val) \ -{ \ - *((CARD8 *) _pBuf) = _val; \ - _pBuf += 1; \ -} - -#ifndef WORD64 - -#define STORE_CARD16(_pBuf, _val) \ -{ \ - *((CARD16 *) _pBuf) = _val; \ - _pBuf += 2; \ -} - -#define STORE_CARD32(_pBuf, _val) \ -{ \ - *((CARD32 *) _pBuf) = _val; \ - _pBuf += 4; \ -} - -#else /* WORD64 */ - -#define STORE_CARD16(_pBuf, _val) \ -{ \ - struct { \ - int value :16; \ - int pad :16; \ - } _d; \ - _d.value = _val; \ - memcpy (_pBuf, &_d, 2); \ - _pBuf += 2; \ -} - -#define STORE_CARD32(_pBuf, _val) \ -{ \ - struct { \ - int value :32; \ - } _d; \ - _d.value = _val; \ - memcpy (_pBuf, &_d, 4); \ - _pBuf += 4; \ -} - -#endif /* WORD64 */ - -#define STORE_STRING(_pBuf, _string) \ -{ \ - CARD16 _len = strlen (_string); \ - STORE_CARD16 (_pBuf, _len); \ - memcpy (_pBuf, _string, _len); \ - _pBuf += _len; \ - if (PAD32 (2 + _len)) \ - _pBuf += PAD32 (2 + _len); \ -} - - -/* - * EXTRACT FOO - */ - -#define EXTRACT_CARD8(_pBuf, _val) \ -{ \ - _val = *((CARD8 *) _pBuf); \ - _pBuf += 1; \ -} - -#ifndef WORD64 - -#define EXTRACT_CARD16(_pBuf, _swap, _val) \ -{ \ - _val = *((CARD16 *) _pBuf); \ - _pBuf += 2; \ - if (_swap) \ - _val = lswaps (_val); \ -} - -#define EXTRACT_CARD32(_pBuf, _swap, _val) \ -{ \ - _val = *((CARD32 *) _pBuf); \ - _pBuf += 4; \ - if (_swap) \ - _val = lswapl (_val); \ -} - -#else /* WORD64 */ - -#define EXTRACT_CARD16(_pBuf, _swap, _val) \ -{ \ - _val = *(_pBuf + 0) & 0xff; /* 0xff incase _pBuf is signed */ \ - _val <<= 8; \ - _val |= *(_pBuf + 1) & 0xff;\ - _pBuf += 2; \ - if (_swap) \ - _val = lswaps (_val); \ -} - -#define EXTRACT_CARD32(_pBuf, _swap, _val) \ -{ \ - _val = *(_pBuf + 0) & 0xff; /* 0xff incase _pBuf is signed */ \ - _val <<= 8; \ - _val |= *(_pBuf + 1) & 0xff;\ - _val <<= 8; \ - _val |= *(_pBuf + 2) & 0xff;\ - _val <<= 8; \ - _val |= *(_pBuf + 3) & 0xff;\ - _pBuf += 4; \ - if (_swap) \ - _val = lswapl (_val); \ -} - -#endif /* WORD64 */ - -#define EXTRACT_STRING(_pBuf, _swap, _string) \ -{ \ - CARD16 _len; \ - EXTRACT_CARD16 (_pBuf, _swap, _len); \ - _string = (char *) malloc (_len + 1); \ - memcpy (_string, _pBuf, _len); \ - _pBuf += _len; \ - _string[_len] = '\0'; \ - if (PAD32 (2 + _len)) \ - _pBuf += PAD32 (2 + _len); \ -} - -#define EXTRACT_LISTOF_STRING(_pBuf, _swap, _count, _strings) \ -{ \ - int _i; \ - for (_i = 0; _i < _count; _i++) \ - EXTRACT_STRING (_pBuf, _swap, _strings[_i]); \ -} - - -#define SKIP_STRING(_pBuf, _swap) \ -{ \ - CARD16 _len; \ - EXTRACT_CARD16 (_pBuf, _swap, _len); \ - _pBuf += _len; \ - if (PAD32 (2 + _len)) \ - _pBuf += PAD32 (2 + _len); \ -} - -#define SKIP_LISTOF_STRING(_pBuf, _swap, _count) \ -{ \ - int _i; \ - for (_i = 0; _i < _count; _i++) \ - SKIP_STRING (_pBuf, _swap); \ -} - - - -/* - * Byte swapping - */ - -/* byte swap a long literal */ -#define lswapl(_val) ((((_val) & 0xff) << 24) |\ - (((_val) & 0xff00) << 8) |\ - (((_val) & 0xff0000) >> 8) |\ - (((_val) >> 24) & 0xff)) - -/* byte swap a short literal */ -#define lswaps(_val) ((((_val) & 0xff) << 8) | (((_val) >> 8) & 0xff)) - - - -/* - * ICE replies (not processed via callbacks because we block) - */ - -#define ICE_CONNECTION_REPLY 1 -#define ICE_CONNECTION_ERROR 2 -#define ICE_PROTOCOL_REPLY 3 -#define ICE_PROTOCOL_ERROR 4 - -typedef struct { - int type; - int version_index; - char *vendor; - char *release; -} _IceConnectionReply; - -typedef struct { - int type; - char *error_message; -} _IceConnectionError; - -typedef struct { - int type; - int major_opcode; - int version_index; - char *vendor; - char *release; -} _IceProtocolReply; - -typedef struct { - int type; - char *error_message; -} _IceProtocolError; - - -typedef union { - int type; - _IceConnectionReply connection_reply; - _IceConnectionError connection_error; - _IceProtocolReply protocol_reply; - _IceProtocolError protocol_error; -} _IceReply; - - -/* - * Watch for ICE connection create/destroy. - */ - -typedef struct _IceWatchedConnection { - IceConn iceConn; - IcePointer watch_data; - struct _IceWatchedConnection *next; -} _IceWatchedConnection; - -typedef struct _IceWatchProc { - IceWatchProc watch_proc; - IcePointer client_data; - _IceWatchedConnection *watched_connections; - struct _IceWatchProc *next; -} _IceWatchProc; - - -/* - * Locking - */ - -#define IceLockConn(_iceConn) -#define IceUnlockConn(_iceConn) - - -/* - * Extern declarations - */ - -extern IceConn _IceConnectionObjs[]; -extern char *_IceConnectionStrings[]; -extern int _IceConnectionCount; - -extern _IceProtocol _IceProtocols[]; -extern int _IceLastMajorOpcode; - -extern int _IceAuthCount; -extern char *_IceAuthNames[]; -extern IcePoAuthProc _IcePoAuthProcs[]; -extern IcePaAuthProc _IcePaAuthProcs[]; - -extern int _IceVersionCount; -extern _IceVersion _IceVersions[]; - -extern _IceWatchProc *_IceWatchProcs; - -extern IceErrorHandler _IceErrorHandler; -extern IceIOErrorHandler _IceIOErrorHandler; - - -extern void _IceErrorBadMajor ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* offendingMajor */, - int /* offendingMinor */, - int /* severity */ -#endif -); - -extern void _IceErrorNoAuthentication ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* offendingMinor */ -#endif -); - -extern void _IceErrorNoVersion ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* offendingMinor */ -#endif -); - -extern void _IceErrorSetupFailed ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* offendingMinor */, - char * /* reason */ -#endif -); - -extern void _IceErrorAuthenticationRejected ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* offendingMinor */, - char * /* reason */ -#endif -); - -extern void _IceErrorAuthenticationFailed ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* offendingMinor */, - char * /* reason */ -#endif -); - -extern void _IceErrorProtocolDuplicate ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - char * /* protocolName */ -#endif -); - -extern void _IceErrorMajorOpcodeDuplicate ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* majorOpcode */ -#endif -); - -extern void _IceErrorUnknownProtocol ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - char * /* protocolName */ -#endif -); - -extern void _IceAddOpcodeMapping ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* hisOpcode */, - int /* myOpcode */ -#endif -); - -extern char *_IceGetPeerName ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern void _IceFreeConnection ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern void _IceAddReplyWait ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IceReplyWaitInfo * /* replyWait */ -#endif -); - -extern IceReplyWaitInfo *_IceSearchReplyWaits ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* majorOpcode */ -#endif -); - -extern void _IceSetReplyReady ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IceReplyWaitInfo * /* replyWait */ -#endif -); - -extern Bool _IceCheckReplyReady ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - IceReplyWaitInfo * /* replyWait */ -#endif -); - -extern void _IceConnectionOpened ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern void _IceConnectionClosed ( -#if NeedFunctionPrototypes - IceConn /* iceConn */ -#endif -); - -extern void _IceGetPoAuthData ( -#if NeedFunctionPrototypes - char * /* protocol_name */, - char * /* address */, - char * /* auth_name */, - unsigned short * /* auth_data_length_ret */, - char ** /* auth_data_ret */ -#endif -); - -extern void _IceGetPaAuthData ( -#if NeedFunctionPrototypes - char * /* protocol_name */, - char * /* address */, - char * /* auth_name */, - unsigned short * /* auth_data_length_ret */, - char ** /* auth_data_ret */ -#endif -); - -extern void _IceGetPoValidAuthIndices ( -#if NeedFunctionPrototypes - char * /* protocol_name */, - char * /* address */, - int /* num_auth_names */, - char ** /* auth_names */, - int * /* num_indices_ret */, - int * /* indices_ret */ -#endif -); - -extern void _IceGetPaValidAuthIndices ( -#if NeedFunctionPrototypes - char * /* protocol_name */, - char * /* address */, - int /* num_auth_names */, - char ** /* auth_names */, - int * /* num_indices_ret */, - int * /* indices_ret */ -#endif -); - -#endif /* _ICELIBINT_H_ */ diff --git a/xc/lib/ICE/ICEmsg.h b/xc/lib/ICE/ICEmsg.h deleted file mode 100644 index 9f9452615..000000000 --- a/xc/lib/ICE/ICEmsg.h +++ /dev/null @@ -1,298 +0,0 @@ -/* $TOG: ICEmsg.h /main/6 1998/02/06 13:56:38 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#ifndef _ICEMSG_H_ -#define _ICEMSG_H_ - -#include - -/* - * Function prototypes for internal ICElib functions - */ - -extern Status _IceRead ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - unsigned long /* nbytes */, - char * /* ptr */ -#endif -); - -extern void _IceReadSkip ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - unsigned long /* nbytes */ -#endif -); - -extern void _IceWrite ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - unsigned long /* nbytes */, - char * /* ptr */ -#endif -); - - -extern void _IceErrorBadMinor ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* majorOpcode */, - int /* offendingMinor */, - int /* severity */ -#endif -); - -extern void _IceErrorBadState ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* majorOpcode */, - int /* offendingMinor */, - int /* severity */ -#endif -); - -extern void _IceErrorBadLength ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* majorOpcode */, - int /* offendingMinor */, - int /* severity */ -#endif -); - -extern void _IceErrorBadValue ( -#if NeedFunctionPrototypes - IceConn /* iceConn */, - int /* majorOpcode */, - int /* offendingMinor */, - int /* offset */, - int /* length */, - IcePointer /* value */ -#endif -); - - -/* - * Macro to check if IO operations are valid on an ICE connection. - */ - -#define IceValidIO(_iceConn) _iceConn->io_ok - - -/* - * Macros for writing messages. - */ - -#define IceGetHeader(_iceConn, _major, _minor, _headerSize, _msgType, _pMsg) \ - if ((_iceConn->outbufptr + _headerSize) > _iceConn->outbufmax) \ - IceFlush (_iceConn); \ - _pMsg = (_msgType *) _iceConn->outbufptr; \ - _pMsg->majorOpcode = _major; \ - _pMsg->minorOpcode = _minor; \ - _pMsg->length = (_headerSize - SIZEOF (iceMsg)) >> 3; \ - _iceConn->outbufptr += _headerSize; \ - _iceConn->send_sequence++ - -#define IceGetHeaderExtra(_iceConn, _major, _minor, _headerSize, _extra, _msgType, _pMsg, _pData) \ - if ((_iceConn->outbufptr + \ - _headerSize + ((_extra) << 3)) > _iceConn->outbufmax) \ - IceFlush (_iceConn); \ - _pMsg = (_msgType *) _iceConn->outbufptr; \ - if ((_iceConn->outbufptr + \ - _headerSize + ((_extra) << 3)) <= _iceConn->outbufmax) \ - _pData = (char *) _pMsg + _headerSize; \ - else \ - _pData = NULL; \ - _pMsg->majorOpcode = _major; \ - _pMsg->minorOpcode = _minor; \ - _pMsg->length = ((_headerSize - SIZEOF (iceMsg)) >> 3) + (_extra); \ - _iceConn->outbufptr += (_headerSize + ((_extra) << 3)); \ - _iceConn->send_sequence++ - -#define IceSimpleMessage(_iceConn, _major, _minor) \ -{ \ - iceMsg *_pMsg; \ - IceGetHeader (_iceConn, _major, _minor, SIZEOF (iceMsg), iceMsg, _pMsg); \ -} - -#define IceErrorHeader(_iceConn, _offendingMajorOpcode, _offendingMinorOpcode, _offendingSequenceNum, _severity, _errorClass, _dataLength) \ -{ \ - iceErrorMsg *_pMsg; \ -\ - IceGetHeader (_iceConn, _offendingMajorOpcode, ICE_Error, \ - SIZEOF (iceErrorMsg), iceErrorMsg, _pMsg); \ - _pMsg->length += (_dataLength); \ - _pMsg->offendingMinorOpcode = _offendingMinorOpcode; \ - _pMsg->severity = _severity; \ - _pMsg->offendingSequenceNum = _offendingSequenceNum; \ - _pMsg->errorClass = _errorClass; \ -} - - -/* - * Write data into the ICE output buffer. - */ - -#define IceWriteData(_iceConn, _bytes, _data) \ -{ \ - if ((_iceConn->outbufptr + (_bytes)) > _iceConn->outbufmax) \ - { \ - IceFlush (_iceConn); \ - _IceWrite (_iceConn, (unsigned long) (_bytes), _data); \ - } \ - else \ - { \ - memcpy (_iceConn->outbufptr, _data, _bytes); \ - _iceConn->outbufptr += (_bytes); \ - } \ -} - -#ifndef WORD64 - -#define IceWriteData16(_iceConn, _bytes, _data) \ - IceWriteData (_iceConn, _bytes, (char *) _data) - -#define IceWriteData32(_iceConn, _bytes, _data) \ - IceWriteData (_iceConn, _bytes, (char *) _data) - -#else /* WORD64 */ - -/* IceWriteData16 and IceWriteData32 defined in misc.c for WORD64 */ - -#endif /* WORD64 */ - - -/* - * The IceSendData macro bypasses copying the data to the - * ICE connection buffer and sends the data directly. If necessary, - * the ICE connection buffer is first flushed. - */ - -#define IceSendData(_iceConn, _bytes, _data) \ -{ \ - if (_iceConn->outbufptr > _iceConn->outbuf) \ - IceFlush (_iceConn); \ - _IceWrite (_iceConn, (unsigned long) (_bytes), _data); \ -} - - -/* - * Write pad bytes. Used to force 32 or 64 bit alignment. - * A maxium of 7 pad bytes can be specified. - */ - -#define IceWritePad(_iceConn, _bytes) \ -{ \ - if ((_iceConn->outbufptr + (_bytes)) > _iceConn->outbufmax) \ - { \ - char _dummy[7]; \ - IceFlush (_iceConn); \ - _IceWrite (_iceConn, (unsigned long) (_bytes), _dummy); \ - } \ - else \ - { \ - _iceConn->outbufptr += (_bytes); \ - } \ -} - - -/* - * Macros for reading messages. - */ - -#define IceReadCompleteMessage(_iceConn, _headerSize, _msgType, _pMsg, _pData)\ -{ \ - unsigned long _bytes; \ - IceReadMessageHeader (_iceConn, _headerSize, _msgType, _pMsg); \ - _bytes = (_pMsg->length << 3) - (_headerSize - SIZEOF (iceMsg)); \ - if ((_iceConn->inbufmax - _iceConn->inbufptr) >= _bytes) \ - { \ - _IceRead (_iceConn, _bytes, _iceConn->inbufptr); \ - _pData = _iceConn->inbufptr; \ - _iceConn->inbufptr += _bytes; \ - } \ - else \ - { \ - _pData = (char *) malloc ((unsigned) _bytes); \ - if (_pData) \ - _IceRead (_iceConn, _bytes, _pData); \ - else \ - _IceReadSkip (_iceConn, _bytes); \ - } \ -} - -#define IceDisposeCompleteMessage(_iceConn, _pData) \ - if ((char *) _pData < _iceConn->inbuf || \ - (char *) _pData >= _iceConn->inbufmax) \ - free ((char *) _pData); - - -#define IceReadSimpleMessage(_iceConn, _msgType, _pMsg) \ - _pMsg = (_msgType *) (_iceConn->inbuf); - -#define IceReadMessageHeader(_iceConn, _headerSize, _msgType, _pMsg) \ -{ \ - _IceRead (_iceConn, \ - (unsigned long) (_headerSize - SIZEOF (iceMsg)), \ - _iceConn->inbufptr); \ - _pMsg = (_msgType *) (_iceConn->inbuf); \ - _iceConn->inbufptr += (_headerSize - SIZEOF (iceMsg)); \ -} - -#define IceReadData(_iceConn, _bytes, _pData) \ - _IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \ - -#ifndef WORD64 - -#define IceReadData16(_iceConn, _swap, _bytes, _pData) \ -{ \ - _IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \ -} - -#define IceReadData32(_iceConn, _swap, _bytes, _pData) \ -{ \ - _IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \ -} - -#else /* WORD64 */ - -/* IceReadData16 and IceReadData32 defined in misc.c for WORD64 */ - -#endif /* WORD64 */ - - -/* - * Read pad bytes (for 32 or 64 bit alignment). - * A maxium of 7 pad bytes can be specified. - */ - -#define IceReadPad(_iceConn, _bytes) \ -{ \ - char _dummy[7]; \ - _IceRead (_iceConn, (unsigned long) (_bytes), _dummy); \ -} - -#endif /* _ICEMSG_H_ */ diff --git a/xc/lib/ICE/ICEos2.def b/xc/lib/ICE/ICEos2.def deleted file mode 100644 index 987b19d34..000000000 --- a/xc/lib/ICE/ICEos2.def +++ /dev/null @@ -1,134 +0,0 @@ -LIBRARY ICE -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/ICE/ICEos2.def,v 3.7 1999/04/29 09:13:27 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 4096 -EXPORTS - IceAcceptConnection @ 1 - IceAddConnectionWatch @ 2 - IceAllocScratch @ 3 - IceAppLockConn @ 4 - IceAppUnlockConn @ 5 - IceAuthFileName @ 6 - IceCheckShutdownNegotiation @ 7 - IceCloseConnection @ 8 - IceComposeNetworkIdList @ 9 - IceConnectionNumber @ 10 - IceConnectionStatus @ 11 - IceConnectionString @ 12 - IceFlush @ 13 - IceFreeAuthFileEntry @ 14 - IceFreeListenObjs @ 15 - IceGenerateMagicCookie @ 16 - IceGetAuthFileEntry @ 17 - IceGetConnectionContext @ 18 - IceGetInBufSize @ 19 - IceGetListenConnectionNumber @ 20 - IceGetListenConnectionString @ 21 - IceGetOutBufSize @ 22 - IceInitThreads @ 23 - IceLastReceivedSequenceNumber @ 24 - IceLastSentSequenceNumber @ 25 - IceListenForConnections @ 26 - IceLockAuthFile @ 27 - IceOpenConnection @ 28 - IcePing @ 29 - IceProcessMessages @ 30 - IceProtocolRevision @ 31 - IceProtocolSetup @ 32 - IceProtocolShutdown @ 33 - IceProtocolVersion @ 34 - IceReadAuthFileEntry @ 35 - IceRegisterForProtocolReply @ 36 - IceRegisterForProtocolSetup @ 37 - IceRelease @ 38 - IceRemoveConnectionWatch @ 39 - IceSetErrorHandler @ 40 - IceSetHostBasedAuthProc @ 41 - IceSetIOErrorHandler @ 42 - IceSetPaAuthData @ 43 - IceSetShutdownNegotiation @ 44 - IceSwapping @ 45 - IceUnlockAuthFile @ 46 - IceVendor @ 47 - IceWriteAuthFileEntry @ 48 - _IceTransGetPeerAddr @ 49 - _IceTransGetPeerNetworkId @ 50 - _IceErrorBadMinor @ 51 - _IceErrorBadLength @ 52 - _IceErrorBadState @ 53 - _IceErrorBadValue @ 54 - _IcePaMagicCookie1Proc @ 55 - _IcePoMagicCookie1Proc @ 56 - _IceRead @ 57 - _IceReadSkip @ 58 - _IceWrite @ 59 - _IceErrorNoAuthentication @ 60 - _IceErrorNoVersion @ 61 - _IceErrorAuthenticationRejected @ 62 - _IceErrorAuthenticationFailed @ 63 - _IceErrorProtocolDuplicate @ 64 - _IceErrorMajorOpcodeDuplicate @ 65 - _IceErrorUnknownProtocol @ 66 - _IceErrorBadMajor @ 67 - _IceDefaultErrorHandler @ 68 - _IceDefaultIOErrorHandler @ 69 - _IceGetPoValidAuthIndices @ 70 - _IceGetPaValidAuthIndices @ 71 - _IceAddOpcodeMapping @ 72 - _IceGetPeerName @ 73 - _IceProcessCoreMessage @ 74 - _IceAddReplyWait @ 75 - _IceSearchReplyWaits @ 76 - _IceCheckReplyReady @ 77 - _IceFreeConnection @ 78 - _IceConnectionOpened @ 79 - _IceConnectionClosed @ 80 - _IceErrorSetupFailed @ 81 - _IceGetPoAuthData @ 82 - _IceGetPaAuthData @ 83 - _IceTransOpenCOTSClient @ 84 - _IceTransOpenCOTSServer @ 85 - _IceTransOpenCLTSClient @ 86 - _IceTransOpenCLTSServer @ 87 - _IceTransSetOption @ 88 - _IceTransCreateListener @ 89 - _IceTransResetListener @ 90 - _IceTransAccept @ 91 - _IceTransConnect @ 92 - _IceTransBytesReadable @ 93 - _IceTransRead @ 94 - _IceTransWrite @ 95 - _IceTransReadv @ 96 - _IceTransWritev @ 97 - _IceTransDisconnect @ 98 - _IceTransClose @ 99 - _IceTransCloseForCloning @ 100 - _IceTransIsLocal @ 101 - _IceTransGetMyAddr @ 102 - _IceTransGetConnectionNumber @ 103 - _IceTransMakeAllCOTSServerListeners @ 104 - _IceTransMakeAllCLTSServerListeners @ 105 - _IceTransGetHostname @ 106 - _IceTransGetMyNetworkId @ 107 - _IceConnectionCount @ 108 - _IceLastMajorOpcode @ 109 - _IceAuthCount @ 110 - _IceAuthNames @ 111 - _IcePoAuthProcs @ 112 - _IcePaAuthProcs @ 113 - _IcePaAuthDataEntryCount @ 114 - _IceVersionCount @ 115 - _IceVersions @ 116 - _IceWatchProcs @ 117 - _IceErrorHandler @ 118 - _IceIOErrorHandler @ 119 - _IceConnectionObjs @ 120 - _IceConnectionStrings @ 121 - _IceProtocols @ 122 - _IcePaAuthDataEntries @ 123 - _IceTransSocketINETFuncs @ 124 - _IceTransSocketTCPFuncs @ 125 - IceListenForWellKnownConnections @ 126 diff --git a/xc/lib/ICE/ICEos2.rsp b/xc/lib/ICE/ICEos2.rsp deleted file mode 100644 index 6aaf77c1e..000000000 --- a/xc/lib/ICE/ICEos2.rsp +++ /dev/null @@ -1,6 +0,0 @@ -accept.obj authutil.obj connect.obj error.obj getauth.obj iceauth.obj+ -listen.obj locking.obj misc.obj ping.obj process.obj protosetup.obj+ -register.obj replywait.obj setauth.obj shutdown.obj transport.obj+ -watch.obj listenwk.obj /NOI /NOL /NOD /BAT -ICE.dll -ICE.map diff --git a/xc/lib/ICE/ICEproto.h b/xc/lib/ICE/ICEproto.h deleted file mode 100644 index 629da6eba..000000000 --- a/xc/lib/ICE/ICEproto.h +++ /dev/null @@ -1,170 +0,0 @@ -/* $TOG: ICEproto.h /main/8 1998/02/06 13:56:44 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#ifndef _ICEPROTO_H_ -#define _ICEPROTO_H_ - -typedef struct { - CARD8 majorOpcode; - CARD8 minorOpcode; - CARD8 data[2]; - CARD32 length B32; -} iceMsg; - -typedef struct { - CARD8 majorOpcode; - CARD8 minorOpcode; - CARD16 errorClass B16; - CARD32 length B32; - CARD8 offendingMinorOpcode; - CARD8 severity; - CARD16 unused B16; - CARD32 offendingSequenceNum B32; - /* n varying values */ - /* p p = pad (n, 8) */ -} iceErrorMsg; - -typedef struct { - CARD8 majorOpcode; - CARD8 minorOpcode; - CARD8 byteOrder; - CARD8 unused; - CARD32 length B32; -} iceByteOrderMsg; - -typedef struct { - CARD8 majorOpcode; - CARD8 minorOpcode; - CARD8 versionCount; - CARD8 authCount; - CARD32 length B32; - CARD8 mustAuthenticate; - CARD8 unused[7]; - /* i STRING vendor */ - /* j STRING release */ - /* k LIST of STRING authentication-protocol-names */ - /* m LIST of VERSION version-list */ - /* p p = pad (i+j+k+m, 8) */ -} iceConnectionSetupMsg; - -typedef struct { - CARD8 majorOpcode; - CARD8 minorOpcode; - CARD8 authIndex; - CARD8 unused1; - CARD32 length B32; - CARD16 authDataLength B16; - CARD8 unused2[6]; - /* n varying data */ - /* p p = pad (n, 8) */ -} iceAuthRequiredMsg; - -typedef struct { - CARD8 majorOpcode; - CARD8 minorOpcode; - CARD8 unused1[2]; - CARD32 length B32; - CARD16 authDataLength B16; - CARD8 unused2[6]; - /* n varying data */ - /* p p = pad (n, 8) */ -} iceAuthReplyMsg; - -typedef struct { - CARD8 majorOpcode; - CARD8 minorOpcode; - CARD8 unused1[2]; - CARD32 length B32; - CARD16 authDataLength B16; - CARD8 unused2[6]; - /* n varying data */ - /* p p = pad (n, 8) */ -} iceAuthNextPhaseMsg; - -typedef struct { - CARD8 majorOpcode; - CARD8 minorOpcode; - CARD8 versionIndex; - CARD8 unused; - CARD32 length B32; - /* i STRING vendor */ - /* j STRING release */ - /* p p = pad (i+j, 8) */ -} iceConnectionReplyMsg; - -typedef struct { - CARD8 majorOpcode; - CARD8 minorOpcode; - CARD8 protocolOpcode; - CARD8 mustAuthenticate; - CARD32 length B32; - CARD8 versionCount; - CARD8 authCount; - CARD8 unused[6]; - /* i STRING protocol-name */ - /* j STRING vendor */ - /* k STRING release */ - /* m LIST of STRING authentication-protocol-names */ - /* n LIST of VERSION version-list */ - /* p p = pad (i+j+k+m+n, 8) */ -} iceProtocolSetupMsg; - -typedef struct { - CARD8 majorOpcode; - CARD8 minorOpcode; - CARD8 versionIndex; - CARD8 protocolOpcode; - CARD32 length B32; - /* i STRING vendor */ - /* j STRING release */ - /* p p = pad (i+j, 8) */ -} iceProtocolReplyMsg; - -typedef iceMsg icePingMsg; -typedef iceMsg icePingReplyMsg; -typedef iceMsg iceWantToCloseMsg; -typedef iceMsg iceNoCloseMsg; - - -/* - * SIZEOF values. These better be multiples of 8. - */ - -#define sz_iceMsg 8 -#define sz_iceErrorMsg 16 -#define sz_iceByteOrderMsg 8 -#define sz_iceConnectionSetupMsg 16 -#define sz_iceAuthRequiredMsg 16 -#define sz_iceAuthReplyMsg 16 -#define sz_iceAuthNextPhaseMsg 16 -#define sz_iceConnectionReplyMsg 8 -#define sz_iceProtocolSetupMsg 16 -#define sz_iceProtocolReplyMsg 8 -#define sz_icePingMsg 8 -#define sz_icePingReplyMsg 8 -#define sz_iceWantToCloseMsg 8 -#define sz_iceNoCloseMsg 8 - -#endif /* _ICEPROTO_H_ */ diff --git a/xc/lib/ICE/ICEutil.h b/xc/lib/ICE/ICEutil.h deleted file mode 100644 index 46146dc2b..000000000 --- a/xc/lib/ICE/ICEutil.h +++ /dev/null @@ -1,133 +0,0 @@ -/* $TOG: ICEutil.h /main/6 1998/02/06 13:56:49 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#ifndef _ICEUTIL_H_ -#define _ICEUTIL_H_ - -#include - -/* - * Data structure for entry in ICE authority file - */ - -typedef struct { - char *protocol_name; - unsigned short protocol_data_length; - char *protocol_data; - char *network_id; - char *auth_name; - unsigned short auth_data_length; - char *auth_data; -} IceAuthFileEntry; - - -/* - * Authentication data maintained in memory. - */ - -typedef struct { - char *protocol_name; - char *network_id; - char *auth_name; - unsigned short auth_data_length; - char *auth_data; -} IceAuthDataEntry; - - -/* - * Return values from IceLockAuthFile - */ - -#define IceAuthLockSuccess 0 /* lock succeeded */ -#define IceAuthLockError 1 /* lock unexpectely failed, check errno */ -#define IceAuthLockTimeout 2 /* lock failed, timeouts expired */ - - -/* - * Function Prototypes - */ - -extern char *IceAuthFileName ( -#if NeedFunctionPrototypes - void -#endif -); - -extern int IceLockAuthFile ( -#if NeedFunctionPrototypes - char * /* file_name */, - int /* retries */, - int /* timeout */, - long /* dead */ -#endif -); - -extern void IceUnlockAuthFile ( -#if NeedFunctionPrototypes - char * /* file_name */ -#endif -); - -extern IceAuthFileEntry *IceReadAuthFileEntry ( -#if NeedFunctionPrototypes - FILE * /* auth_file */ -#endif -); - -extern void IceFreeAuthFileEntry ( -#if NeedFunctionPrototypes - IceAuthFileEntry * /* auth */ -#endif -); - -extern Status IceWriteAuthFileEntry ( -#if NeedFunctionPrototypes - FILE * /* auth_file */, - IceAuthFileEntry * /* auth */ -#endif -); - -extern IceAuthFileEntry *IceGetAuthFileEntry ( -#if NeedFunctionPrototypes - char * /* protocol_name */, - char * /* network_id */, - char * /* auth_name */ -#endif -); - -extern char *IceGenerateMagicCookie ( -#if NeedFunctionPrototypes - int /* len */ -#endif -); - -extern void IceSetPaAuthData ( -#if NeedFunctionPrototypes - int /* numEntries */, - IceAuthDataEntry * /* entries */ -#endif -); - -#endif /* _ICEUTIL_H_ */ diff --git a/xc/lib/ICE/Imakefile b/xc/lib/ICE/Imakefile deleted file mode 100644 index 340496319..000000000 --- a/xc/lib/ICE/Imakefile +++ /dev/null @@ -1,92 +0,0 @@ -XCOMM $XConsortium: Imakefile /main/21 1996/11/29 13:30:33 swick $ -XCOMM $XFree86: xc/lib/ICE/Imakefile,v 3.3 1998/12/20 11:56:49 dawes Exp $ - -#define DoNormalLib NormalLibICE -#define DoSharedLib SharedLibICE -#define DoExtraLib SharedLibICE -#define DoDebugLib DebugLibICE -#define DoProfileLib ProfileLibICE -#define LibName ICE -#define SoRev SOICEREV -#define IncSubdir X11 -#define IncSubSubdir ICE - -#ifdef SharedICEReqs -REQUIREDLIBS = SharedICEReqs -#endif - -#if (SystemV || SystemV4) && !HasSockets -CONN_DEFINES = -DTCPCONN -DICE_t -DTRANS_CLIENT -DTRANS_SERVER -#else -#ifdef USLArchitecture -/* XXX temporary hack, PTS is failing on UnixWare */ -CONN_DEFINES = -DSTREAMSCONN -DUNIXCONN -DICE_t -DTRANS_CLIENT -DTRANS_SERVER -#else -CONN_DEFINES = $(CONNECTION_FLAGS) -DICE_t -DTRANS_CLIENT -DTRANS_SERVER -#endif -#endif - -#if HasBSD44Sockets -SOCK_DEFINES = -DBSD44SOCKETS -#endif - -DEPEND_DEFINES = $(TRANS_INCLUDES) $(CONN_DEFINES) - -HEADERS = ICE.h \ - ICEconn.h \ - ICEproto.h \ - ICElib.h \ - ICEmsg.h \ - ICEutil.h - -SRCS = accept.c \ - authutil.c \ - connect.c \ - error.c \ - getauth.c \ - iceauth.c \ - listen.c \ - listenwk.c \ - locking.c \ - misc.c \ - ping.c \ - process.c \ - protosetup.c \ - register.c \ - replywait.c \ - setauth.c \ - shutdown.c \ - transport.c \ - watch.c - -OBJS = accept.o \ - authutil.o \ - connect.o \ - error.o \ - getauth.o \ - iceauth.o \ - listen.o \ - listenwk.o \ - locking.o \ - misc.o \ - ping.o \ - process.o \ - protosetup.o \ - register.o \ - replywait.o \ - setauth.o \ - shutdown.o \ - transport.o \ - watch.o - -#include - -SpecialCLibObjectRule(accept,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES)) -SpecialCLibObjectRule(connect,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES)) -SpecialCLibObjectRule(listen,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES)) -SpecialCLibObjectRule(listenwk,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES)) -SpecialCLibObjectRule(misc,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES)) -SpecialCLibObjectRule(transport,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)) -LinkSourceFile(transport.c,$(TRANSCOMMSRC)) - -DependTarget() diff --git a/xc/lib/ICE/accept.c b/xc/lib/ICE/accept.c deleted file mode 100644 index 13549e9ca..000000000 --- a/xc/lib/ICE/accept.c +++ /dev/null @@ -1,181 +0,0 @@ -/* $TOG: accept.c /main/25 1998/02/06 13:55:44 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#include -#include "ICElibint.h" -#include - - -IceConn -IceAcceptConnection (listenObj, statusRet) - -IceListenObj listenObj; -IceAcceptStatus *statusRet; - -{ - IceConn iceConn; - XtransConnInfo newconn; - iceByteOrderMsg *pMsg; - int endian, status; - - /* - * Accept the connection. - */ - - if ((newconn = _IceTransAccept (listenObj->trans_conn, &status)) == 0) - { - if (status == TRANS_ACCEPT_BAD_MALLOC) - *statusRet = IceAcceptBadMalloc; - else - *statusRet = IceAcceptFailure; - return (NULL); - } - - - /* - * Set close-on-exec so that programs that fork() don't get confused. - */ - - _IceTransSetOption (newconn, TRANS_CLOSEONEXEC, 1); - - - /* - * Create an ICE object for this connection. - */ - - if ((iceConn = (IceConn) malloc (sizeof (struct _IceConn))) == NULL) - { - _IceTransClose (newconn); - *statusRet = IceAcceptBadMalloc; - return (NULL); - } - - iceConn->listen_obj = listenObj; - - iceConn->waiting_for_byteorder = True; - iceConn->connection_status = IceConnectPending; - iceConn->io_ok = True; - iceConn->dispatch_level = 0; - iceConn->context = NULL; - iceConn->my_ice_version_index = 0; - - iceConn->trans_conn = newconn; - iceConn->send_sequence = 0; - iceConn->receive_sequence = 0; - - iceConn->connection_string = (char *) malloc ( - strlen (listenObj->network_id) + 1); - - if (iceConn->connection_string == NULL) - { - _IceTransClose (newconn); - free ((char *) iceConn); - *statusRet = IceAcceptBadMalloc; - return (NULL); - } - else - strcpy (iceConn->connection_string, listenObj->network_id); - - iceConn->vendor = NULL; - iceConn->release = NULL; - - if ((iceConn->inbuf = iceConn->inbufptr = - (char *) malloc (ICE_INBUFSIZE)) != NULL) - { - iceConn->inbufmax = iceConn->inbuf + ICE_INBUFSIZE; - } - else - { - _IceTransClose (newconn); - free ((char *) iceConn); - *statusRet = IceAcceptBadMalloc; - return (NULL); - } - - if ((iceConn->outbuf = iceConn->outbufptr = - (char *) malloc (ICE_OUTBUFSIZE)) != NULL) - { - iceConn->outbufmax = iceConn->outbuf + ICE_OUTBUFSIZE; - } - else - { - _IceTransClose (newconn); - free (iceConn->inbuf); - free ((char *) iceConn); - *statusRet = IceAcceptBadMalloc; - return (NULL); - } - - iceConn->scratch = NULL; - iceConn->scratch_size = 0; - - iceConn->open_ref_count = 1; - iceConn->proto_ref_count = 0; - - iceConn->skip_want_to_close = False; - iceConn->want_to_close = False; - iceConn->free_asap = False; - - iceConn->saved_reply_waits = NULL; - iceConn->ping_waits = NULL; - - iceConn->process_msg_info = NULL; - - iceConn->connect_to_you = NULL; - iceConn->protosetup_to_you = NULL; - - iceConn->connect_to_me = NULL; - iceConn->protosetup_to_me = NULL; - - - /* - * Send our byte order. - */ - - IceGetHeader (iceConn, 0, ICE_ByteOrder, - SIZEOF (iceByteOrderMsg), iceByteOrderMsg, pMsg); - - endian = 1; - if (*(char *) &endian) - pMsg->byteOrder = IceLSBfirst; - else - pMsg->byteOrder = IceMSBfirst; - - IceFlush (iceConn); - - - if (_IceWatchProcs) - { - /* - * Notify the watch procedures that an iceConn was opened. - */ - - _IceConnectionOpened (iceConn); - } - - *statusRet = IceAcceptSuccess; - - return (iceConn); -} diff --git a/xc/lib/ICE/authutil.c b/xc/lib/ICE/authutil.c deleted file mode 100644 index 453ad0457..000000000 --- a/xc/lib/ICE/authutil.c +++ /dev/null @@ -1,542 +0,0 @@ -/* $TOG: authutil.c /main/18 1998/02/06 13:55:51 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ -/* $XFree86: xc/lib/ICE/authutil.c,v 3.5 1999/05/23 06:33:23 dawes Exp $ */ - -#include -#include "ICElibint.h" -#include -#include -#include -#include - -#if defined(X_NOT_STDC_ENV) && !defined(__EMX__) -extern int errno; -extern long time (); -extern char *getenv(); -#define Time_t long -#else -#include -#define Time_t time_t -#ifdef __EMX__ -extern char* getenv(const char*); -#define link rename -#endif -#endif -#ifndef X_NOT_POSIX -#include -#else -#ifndef WIN32 -extern unsigned sleep (); -#else -#define link rename -#endif -#endif - -static Status read_short (); -static Status read_string (); -static Status read_counted_string (); -static Status write_short (); -static Status write_string (); -static Status write_counted_string (); - - - -/* - * The following routines are for manipulating the .ICEauthority file - * These are utility functions - they are not part of the standard - * ICE library specification. - */ - -char * -IceAuthFileName () - -{ - static char slashDotICEauthority[] = "/.ICEauthority"; - char *name; - static char *buf; - static int bsize; - int size; -#if defined(WIN32) || defined(__EMX__) -#ifndef PATH_MAX -#define PATH_MAX 512 -#endif - char dir[PATH_MAX]; -#endif - - if ((name = getenv ("ICEAUTHORITY"))) - return (name); - - name = getenv ("HOME"); - - if (!name) - { -#ifdef WIN32 - register char *ptr1; - register char *ptr2; - int len1 = 0, len2 = 0; - - if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) { - len1 = strlen (ptr1); - len2 = strlen (ptr2); - } else if (ptr2 = getenv("USERNAME")) { - len1 = strlen (ptr1 = "/users/"); - len2 = strlen (ptr2); - } - if ((len1 + len2 + 1) < PATH_MAX) { - sprintf (dir, "%s%s", ptr1, (ptr2) ? ptr2 : ""); - name = dir; - } - if (!name) -#endif -#ifdef __EMX__ - strcpy (dir,"c:"); - name = dir; - if (!name) -#endif - return (NULL); - } - - size = strlen (name) + strlen (&slashDotICEauthority[1]) + 2; - - if (size > bsize) - { - if (buf) - free (buf); - buf = malloc ((unsigned) size); - if (!buf) - return (NULL); - bsize = size; - } - - strcpy (buf, name); - strcat (buf, slashDotICEauthority + (name[1] == '\0' ? 1 : 0)); - - return (buf); -} - - - -int -IceLockAuthFile (file_name, retries, timeout, dead) - -char *file_name; -int retries; -int timeout; -long dead; - -{ - char creat_name[1025], link_name[1025]; - struct stat statb; - Time_t now; - int creat_fd = -1; - - if ((int) strlen (file_name) > 1022) - return (IceAuthLockError); - - strcpy (creat_name, file_name); - strcat (creat_name, "-c"); - strcpy (link_name, file_name); - strcat (link_name, "-l"); - - if (stat (creat_name, &statb) != -1) - { - now = time ((Time_t *) 0); - - /* - * NFS may cause ctime to be before now, special - * case a 0 deadtime to force lock removal - */ - - if (dead == 0 || now - statb.st_ctime > dead) - { - unlink (creat_name); - unlink (link_name); - } - } - - while (retries > 0) - { - if (creat_fd == -1) - { - creat_fd = creat (creat_name, 0666); - - if (creat_fd == -1) - { - if (errno != EACCES) - return (IceAuthLockError); - } - else - close (creat_fd); - } - - if (creat_fd != -1) - { - if (link (creat_name, link_name) != -1) - return (IceAuthLockSuccess); - - if (errno == ENOENT) - { - creat_fd = -1; /* force re-creat next time around */ - continue; - } - - if (errno != EEXIST) - return (IceAuthLockError); - } - - sleep ((unsigned) timeout); - --retries; - } - - return (IceAuthLockTimeout); -} - - - -void -IceUnlockAuthFile (file_name) - -char *file_name; - -{ -#ifndef WIN32 - char creat_name[1025]; -#endif - char link_name[1025]; - - if ((int) strlen (file_name) > 1022) - return; - -#ifndef WIN32 - strcpy (creat_name, file_name); - strcat (creat_name, "-c"); -#endif - strcpy (link_name, file_name); - strcat (link_name, "-l"); - -#ifndef WIN32 - unlink (creat_name); -#endif - unlink (link_name); -} - - - -IceAuthFileEntry * -IceReadAuthFileEntry (auth_file) - -FILE *auth_file; - -{ - IceAuthFileEntry local; - IceAuthFileEntry *ret; - - local.protocol_name = NULL; - local.protocol_data = NULL; - local.network_id = NULL; - local.auth_name = NULL; - local.auth_data = NULL; - - if (!read_string (auth_file, &local.protocol_name)) - return (NULL); - - if (!read_counted_string (auth_file, - &local.protocol_data_length, &local.protocol_data)) - goto bad; - - if (!read_string (auth_file, &local.network_id)) - goto bad; - - if (!read_string (auth_file, &local.auth_name)) - goto bad; - - if (!read_counted_string (auth_file, - &local.auth_data_length, &local.auth_data)) - goto bad; - - if (!(ret = (IceAuthFileEntry *) malloc (sizeof (IceAuthFileEntry)))) - goto bad; - - *ret = local; - - return (ret); - - bad: - - if (local.protocol_name) free (local.protocol_name); - if (local.protocol_data) free (local.protocol_data); - if (local.network_id) free (local.network_id); - if (local.auth_name) free (local.auth_name); - if (local.auth_data) free (local.auth_data); - - return (NULL); -} - - - -void -IceFreeAuthFileEntry (auth) - -IceAuthFileEntry *auth; - -{ - if (auth) - { - if (auth->protocol_name) free (auth->protocol_name); - if (auth->protocol_data) free (auth->protocol_data); - if (auth->network_id) free (auth->network_id); - if (auth->auth_name) free (auth->auth_name); - if (auth->auth_data) free (auth->auth_data); - free ((char *) auth); - } -} - - - -Status -IceWriteAuthFileEntry (auth_file, auth) - -FILE *auth_file; -IceAuthFileEntry *auth; - -{ - if (!write_string (auth_file, auth->protocol_name)) - return (0); - - if (!write_counted_string (auth_file, - auth->protocol_data_length, auth->protocol_data)) - return (0); - - if (!write_string (auth_file, auth->network_id)) - return (0); - - if (!write_string (auth_file, auth->auth_name)) - return (0); - - if (!write_counted_string (auth_file, - auth->auth_data_length, auth->auth_data)) - return (0); - - return (1); -} - - - -IceAuthFileEntry * -IceGetAuthFileEntry (protocol_name, network_id, auth_name) - -char *protocol_name; -char *network_id; -char *auth_name; - -{ - FILE *auth_file; - char *filename; - IceAuthFileEntry *entry; - - if (!(filename = IceAuthFileName ())) - return (NULL); - - if (access (filename, R_OK) != 0) /* checks REAL id */ - return (NULL); - - if (!(auth_file = fopen (filename, "rb"))) - return (NULL); - - for (;;) - { - if (!(entry = IceReadAuthFileEntry (auth_file))) - break; - - if (strcmp (protocol_name, entry->protocol_name) == 0 && - strcmp (network_id, entry->network_id) == 0 && - strcmp (auth_name, entry->auth_name) == 0) - { - break; - } - - IceFreeAuthFileEntry (entry); - } - - fclose (auth_file); - - return (entry); -} - - - -/* - * local routines - */ - -static Status -read_short (file, shortp) - -FILE *file; -unsigned short *shortp; - -{ - unsigned char file_short[2]; - - if (fread ((char *) file_short, (int) sizeof (file_short), 1, file) != 1) - return (0); - - *shortp = file_short[0] * 256 + file_short[1]; - return (1); -} - - -static Status -read_string (file, stringp) - -FILE *file; -char **stringp; - -{ - unsigned short len; - char *data; - - if (!read_short (file, &len)) - return (0); - - if (len == 0) - { - data = 0; - } - else - { - data = malloc ((unsigned) len + 1); - - if (!data) - return (0); - - if (fread (data, (int) sizeof (char), (int) len, file) != len) - { - free (data); - return (0); - } - - data[len] = '\0'; - } - - *stringp = data; - - return (1); -} - - -static Status -read_counted_string (file, countp, stringp) - -FILE *file; -unsigned short *countp; -char **stringp; - -{ - unsigned short len; - char *data; - - if (!read_short (file, &len)) - return (0); - - if (len == 0) - { - data = 0; - } - else - { - data = malloc ((unsigned) len); - - if (!data) - return (0); - - if (fread (data, (int) sizeof (char), (int) len, file) != len) - { - free (data); - return (0); - } - } - - *stringp = data; - *countp = len; - - return (1); -} - - -static Status -write_short (file, s) - -FILE *file; -unsigned short s; - -{ - unsigned char file_short[2]; - - file_short[0] = (s & (unsigned) 0xff00) >> 8; - file_short[1] = s & 0xff; - - if (fwrite ((char *) file_short, (int) sizeof (file_short), 1, file) != 1) - return (0); - - return (1); -} - - -static Status -write_string (file, string) - -FILE *file; -char *string; - -{ - unsigned short count = strlen (string); - - if (!write_short (file, count)) - return (0); - - if (fwrite (string, (int) sizeof (char), (int) count, file) != count) - return (0); - - return (1); -} - - -static Status -write_counted_string (file, count, string) - -FILE *file; -unsigned short count; -char *string; - -{ - if (!write_short (file, count)) - return (0); - - if (fwrite (string, (int) sizeof (char), (int) count, file) != count) - return (0); - - return (1); -} diff --git a/xc/lib/ICE/connect.c b/xc/lib/ICE/connect.c deleted file mode 100644 index 780e133cf..000000000 --- a/xc/lib/ICE/connect.c +++ /dev/null @@ -1,555 +0,0 @@ -/* $TOG: connect.c /main/34 1998/05/29 14:30:51 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ -/* $XFree86: xc/lib/ICE/connect.c,v 3.5 1999/03/21 07:34:27 dawes Exp $ */ - -#include -#include "ICElibint.h" -#include -#include "globals.h" - -static XtransConnInfo ConnectToPeer(); - -#ifndef X_NOT_STDC_ENV -#define Strstr strstr -#else -static char *Strstr(s1, s2) - char *s1, *s2; -{ - int n1, n2; - - n1 = strlen(s1); - n2 = strlen(s2); - for ( ; n1 >= n2; s1++, n1--) { - if (!strncmp(s1, s2, n2)) - return s1; - } - return NULL; -} -#endif - -IceConn -IceOpenConnection (networkIdsList, context, mustAuthenticate, majorOpcodeCheck, - errorLength, errorStringRet) - -char *networkIdsList; -IcePointer context; -Bool mustAuthenticate; -int majorOpcodeCheck; -int errorLength; -char *errorStringRet; - -{ - IceConn iceConn; - int extra, i, j; - int endian; - Bool gotReply, ioErrorOccured; - unsigned long setup_sequence; - iceByteOrderMsg *pByteOrderMsg; - iceConnectionSetupMsg *pSetupMsg; - char *pData; - IceReplyWaitInfo replyWait; - _IceReply reply; - int authUsableCount; - int authUsableFlags[MAX_ICE_AUTH_NAMES]; - int authIndices[MAX_ICE_AUTH_NAMES]; - - if (errorStringRet && errorLength > 0) - *errorStringRet = '\0'; - - if (networkIdsList == NULL || *networkIdsList == '\0') - { - strncpy (errorStringRet, - "networkIdsList argument is NULL", errorLength); - return (NULL); - } - - /* - * Check to see if we can use a previously created ICE connection. - * - * If iceConn->want_to_close is True, or iceConn->free_asap is True, - * we can not use the iceConn. - * - * If 'context' is non-NULL, we will only use a previously opened ICE - * connection if the specified 'context' is equal to the context - * associated with the ICE connection, or if the context associated - * with the ICE connection is NULL. - * - * If 'majorOpcodeCheck' is non-zero, it will contain a protocol major - * opcode that we should make sure is not already active on the ICE - * connection. Some clients will want two seperate connections for the - * same protocol to the same destination client. - */ - - for (i = 0; i < _IceConnectionCount; i++) - { - char *strptr; - if ((strptr = (char *) Strstr ( - networkIdsList, _IceConnectionStrings[i])) != NULL) - { - char ch = *(strptr + strlen (_IceConnectionStrings[i])); - if (ch == ',' || ch == '\0') - { - /* - * OK, we found a connection. Make sure we can reuse it. - */ - - IceConn iceConn = _IceConnectionObjs[i]; - - if (iceConn->want_to_close || iceConn->free_asap || - (context && iceConn->context && - iceConn->context != context)) - { - /* force a new connection to be created */ - break; - } - - if (majorOpcodeCheck) - { - for (j = iceConn->his_min_opcode; - j <= iceConn->his_max_opcode; j++) - { - if (iceConn->process_msg_info[ - j - iceConn->his_min_opcode].in_use && - iceConn->process_msg_info[ - j - iceConn->his_min_opcode].my_opcode == - majorOpcodeCheck) - break; - } - - if (j <= iceConn->his_max_opcode || - (iceConn->protosetup_to_you && - iceConn->protosetup_to_you->my_opcode == - majorOpcodeCheck)) - { - /* force a new connection to be created */ - break; - } - } - - iceConn->open_ref_count++; - if (context && !iceConn->context) - iceConn->context = context; - return (iceConn); - } - } - } - - if ((iceConn = (IceConn) malloc (sizeof (struct _IceConn))) == NULL) - { - strncpy (errorStringRet, "Can't malloc", errorLength); - return (NULL); - } - - - /* - * Open a network connection with the peer client. - */ - - if ((iceConn->trans_conn = ConnectToPeer (networkIdsList, - &iceConn->connection_string)) == NULL) - { - free ((char *) iceConn); - strncpy (errorStringRet, "Could not open network socket", errorLength); - return (NULL); - } - - /* - * Set close-on-exec so that programs that fork() don't get confused. - */ - - _IceTransSetOption (iceConn->trans_conn, TRANS_CLOSEONEXEC, 1); - - iceConn->listen_obj = NULL; - - iceConn->connection_status = IceConnectPending; - iceConn->io_ok = True; - iceConn->dispatch_level = 0; - iceConn->context = context; - iceConn->my_ice_version_index = 0; - iceConn->send_sequence = 0; - iceConn->receive_sequence = 0; - - iceConn->vendor = NULL; - iceConn->release = NULL; - iceConn->outbuf = NULL; - - iceConn->scratch = NULL; - iceConn->scratch_size = 0; - - iceConn->process_msg_info = NULL; - - iceConn->connect_to_you = NULL; - iceConn->protosetup_to_you = NULL; - - iceConn->connect_to_me = NULL; - iceConn->protosetup_to_me = NULL; - - if ((iceConn->inbuf = iceConn->inbufptr = - (char *) malloc (ICE_INBUFSIZE)) == NULL) - { - _IceFreeConnection (iceConn); - strncpy (errorStringRet, "Can't malloc", errorLength); - return (NULL); - } - - iceConn->inbufmax = iceConn->inbuf + ICE_INBUFSIZE; - - if ((iceConn->outbuf = iceConn->outbufptr = - (char *) malloc (ICE_OUTBUFSIZE)) == NULL) - { - _IceFreeConnection (iceConn); - strncpy (errorStringRet, "Can't malloc", errorLength); - return (NULL); - } - - iceConn->outbufmax = iceConn->outbuf + ICE_OUTBUFSIZE; - - iceConn->open_ref_count = 1; - iceConn->proto_ref_count = 0; - - iceConn->skip_want_to_close = False; - iceConn->want_to_close = False; - iceConn->free_asap = False; - - iceConn->saved_reply_waits = NULL; - iceConn->ping_waits = NULL; - - iceConn->connect_to_you = (_IceConnectToYouInfo *) malloc ( - sizeof (_IceConnectToYouInfo)); - iceConn->connect_to_you->auth_active = 0; - - /* - * Send our byte order. - */ - - IceGetHeader (iceConn, 0, ICE_ByteOrder, - SIZEOF (iceByteOrderMsg), iceByteOrderMsg, pByteOrderMsg); - - endian = 1; - if (*(char *) &endian) - pByteOrderMsg->byteOrder = IceLSBfirst; - else - pByteOrderMsg->byteOrder = IceMSBfirst; - - IceFlush (iceConn); - - - /* - * Now read the ByteOrder message from the other client. - * iceConn->swap should be set to the appropriate boolean - * value after the call to IceProcessMessages. - */ - - iceConn->waiting_for_byteorder = True; - - ioErrorOccured = False; - while (iceConn->waiting_for_byteorder == True && !ioErrorOccured) - { - ioErrorOccured = (IceProcessMessages ( - iceConn, NULL, NULL) == IceProcessMessagesIOError); - } - - if (ioErrorOccured) - { - _IceFreeConnection (iceConn); - strncpy (errorStringRet, "IO error occured opening connection", - errorLength); - return (NULL); - } - - if (iceConn->connection_status == IceConnectRejected) - { - /* - * We failed to get the required ByteOrder message. - */ - - _IceFreeConnection (iceConn); - strncpy (errorStringRet, - "Internal error - did not receive the expected ByteOrder message", - errorLength); - return (NULL); - } - - - /* - * Determine which authentication methods are available for - * the Connection Setup authentication. - */ - - _IceGetPoValidAuthIndices ( - "ICE", iceConn->connection_string, - _IceAuthCount, _IceAuthNames, &authUsableCount, authIndices); - - for (i = 0; i < _IceAuthCount; i++) - { - authUsableFlags[i] = 0; - for (j = 0; j < authUsableCount && !authUsableFlags[i]; j++) - authUsableFlags[i] = (authIndices[j] == i); - } - - - /* - * Now send a Connection Setup message. - */ - - extra = STRING_BYTES (IceVendorString) + STRING_BYTES (IceReleaseString); - - for (i = 0; i < _IceAuthCount; i++) - if (authUsableFlags[i]) - { - extra += STRING_BYTES (_IceAuthNames[i]); - } - - extra += (_IceVersionCount * 4); - - IceGetHeaderExtra (iceConn, 0, ICE_ConnectionSetup, - SIZEOF (iceConnectionSetupMsg), WORD64COUNT (extra), - iceConnectionSetupMsg, pSetupMsg, pData); - - setup_sequence = iceConn->send_sequence; - - pSetupMsg->versionCount = _IceVersionCount; - pSetupMsg->authCount = authUsableCount; - pSetupMsg->mustAuthenticate = mustAuthenticate; - - STORE_STRING (pData, IceVendorString); - STORE_STRING (pData, IceReleaseString); - - for (i = 0; i < _IceAuthCount; i++) - if (authUsableFlags[i]) - { - STORE_STRING (pData, _IceAuthNames[i]); - } - - for (i = 0; i < _IceVersionCount; i++) - { - STORE_CARD16 (pData, _IceVersions[i].major_version); - STORE_CARD16 (pData, _IceVersions[i].minor_version); - } - - IceFlush (iceConn); - - - /* - * Process messages until we get a Connection Reply or an Error Message. - * Authentication will take place behind the scenes. - */ - - replyWait.sequence_of_request = setup_sequence; - replyWait.major_opcode_of_request = 0; - replyWait.minor_opcode_of_request = ICE_ConnectionSetup; - replyWait.reply = (IcePointer) &reply; - - gotReply = False; - ioErrorOccured = False; - - while (!gotReply && !ioErrorOccured) - { - ioErrorOccured = (IceProcessMessages ( - iceConn, &replyWait, &gotReply) == IceProcessMessagesIOError); - - if (ioErrorOccured) - { - strncpy (errorStringRet, "IO error occured opening connection", - errorLength); - _IceFreeConnection (iceConn); - iceConn = NULL; - } - else if (gotReply) - { - if (reply.type == ICE_CONNECTION_REPLY) - { - if (reply.connection_reply.version_index >= _IceVersionCount) - { - strncpy (errorStringRet, - "Got a bad version index in the Connection Reply", - errorLength); - - free (reply.connection_reply.vendor); - free (reply.connection_reply.release); - _IceFreeConnection (iceConn); - iceConn = NULL; - } - else - { - iceConn->my_ice_version_index = - reply.connection_reply.version_index; - iceConn->vendor = reply.connection_reply.vendor; - iceConn->release = reply.connection_reply.release; - - _IceConnectionObjs[_IceConnectionCount] = iceConn; - _IceConnectionStrings[_IceConnectionCount] = - iceConn->connection_string; - _IceConnectionCount++; - - free ((char *) iceConn->connect_to_you); - iceConn->connect_to_you = NULL; - - iceConn->connection_status = IceConnectAccepted; - } - } - else /* reply.type == ICE_CONNECTION_ERROR */ - { - /* Connection failed */ - - strncpy (errorStringRet, reply.connection_error.error_message, - errorLength); - - free (reply.connection_error.error_message); - - _IceFreeConnection (iceConn); - iceConn = NULL; - } - } - } - - if (iceConn && _IceWatchProcs) - { -#ifdef MINIX - _IceTransSetOption(iceConn->trans_conn, TRANS_NONBLOCKING, 1); -#endif - /* - * Notify the watch procedures that an iceConn was opened. - */ - - _IceConnectionOpened (iceConn); - } - - return (iceConn); -} - - - -IcePointer -IceGetConnectionContext (iceConn) - -IceConn iceConn; - -{ - return (iceConn->context); -} - - - -/* ------------------------------------------------------------------------- * - * local routines * - * ------------------------------------------------------------------------- */ - -#define ICE_CONNECTION_RETRIES 5 - - -static XtransConnInfo -ConnectToPeer (networkIdsList, actualConnectionRet) - -char *networkIdsList; -char **actualConnectionRet; - -{ - char addrbuf[256]; - char* address; - char *ptr, *endptr, *delim; - int madeConnection = 0; - int len, retry; - int connect_stat; - int address_size; - XtransConnInfo trans_conn = NULL; - - *actualConnectionRet = NULL; - - ptr = networkIdsList; - len = strlen (networkIdsList); - endptr = networkIdsList + len; - - if (len < sizeof addrbuf) - { - address = addrbuf; - address_size = 256; - } - else - { - address = malloc (len + 1); - address_size = len; - } - - while (ptr < endptr && !madeConnection) - { - if ((delim = (char *) strchr (ptr, ',')) == NULL) - delim = endptr; - - len = delim - ptr; - if (len > address_size - 1) - len = address_size - 1; - strncpy (address, ptr, len); - address[len] = '\0'; - - ptr = delim + 1; - - for (retry = ICE_CONNECTION_RETRIES; retry >= 0; retry--) - { - if ((trans_conn = _IceTransOpenCOTSClient (address)) == NULL) - { - break; - } - - if ((connect_stat = _IceTransConnect (trans_conn, address)) < 0) - { - _IceTransClose (trans_conn); - - if (connect_stat == TRANS_TRY_CONNECT_AGAIN) - { - sleep(1); - continue; - } - else - break; - } - else - { - madeConnection = 1; - break; - } - } - } - - if (madeConnection) - { - /* - * We need to return the actual network connection string - */ - - *actualConnectionRet = (char *) malloc (strlen (address) + 1); - strcpy (*actualConnectionRet, address); - - - /* - * Return the file descriptor - */ - } - else trans_conn = NULL; - - if (address != addrbuf) free (address); - - return trans_conn; -} diff --git a/xc/lib/ICE/error.c b/xc/lib/ICE/error.c deleted file mode 100644 index b14c3b998..000000000 --- a/xc/lib/ICE/error.c +++ /dev/null @@ -1,638 +0,0 @@ -/* $TOG: error.c /main/17 1998/02/06 13:56:02 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ -/* $XFree86: xc/lib/ICE/error.c,v 1.2 1999/05/23 06:33:23 dawes Exp $ */ - -#include -#include "ICElibint.h" -#include - -#include - -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif - - -void -_IceErrorBadMinor (iceConn, majorOpcode, offendingMinor, severity) - -IceConn iceConn; -int majorOpcode; -int offendingMinor; -int severity; - -{ - IceErrorHeader (iceConn, - majorOpcode, offendingMinor, - iceConn->receive_sequence, - severity, - IceBadMinor, - 0); - - IceFlush (iceConn); -} - - -void -_IceErrorBadState (iceConn, majorOpcode, offendingMinor, severity) - -IceConn iceConn; -int majorOpcode; -int offendingMinor; -int severity; - -{ - IceErrorHeader (iceConn, - majorOpcode, offendingMinor, - iceConn->receive_sequence, - severity, - IceBadState, - 0); - - IceFlush (iceConn); -} - - -void -_IceErrorBadLength (iceConn, majorOpcode, offendingMinor, severity) - -IceConn iceConn; -int majorOpcode; -int offendingMinor; -int severity; - -{ - IceErrorHeader (iceConn, - majorOpcode, offendingMinor, - iceConn->receive_sequence, - severity, - IceBadLength, - 0); - - IceFlush (iceConn); -} - - -void -_IceErrorBadValue (iceConn, majorOpcode, offendingMinor, offset, length, value) - -IceConn iceConn; -int majorOpcode; -int offendingMinor; -int offset; -int length; /* in bytes */ -IcePointer value; - -{ - IceErrorHeader (iceConn, - majorOpcode, offendingMinor, - iceConn->receive_sequence, - IceCanContinue, - IceBadValue, - WORD64COUNT (8 + length)); - - IceWriteData32 (iceConn, 4, &offset); - IceWriteData32 (iceConn, 4, &length); - IceWriteData (iceConn, length, (char *) value); - - if (PAD64 (length)) - IceWritePad (iceConn, PAD64 (length)); - - IceFlush (iceConn); -} - - -void -_IceErrorNoAuthentication (iceConn, offendingMinor) - -IceConn iceConn; -int offendingMinor; - -{ - int severity = (offendingMinor == ICE_ConnectionSetup) ? - IceFatalToConnection : IceFatalToProtocol; - - IceErrorHeader (iceConn, - 0, offendingMinor, - iceConn->receive_sequence, - severity, - IceNoAuth, - 0); - - IceFlush (iceConn); -} - - -void -_IceErrorNoVersion (iceConn, offendingMinor) - -IceConn iceConn; -int offendingMinor; - -{ - int severity = (offendingMinor == ICE_ConnectionSetup) ? - IceFatalToConnection : IceFatalToProtocol; - - IceErrorHeader (iceConn, - 0, offendingMinor, - iceConn->receive_sequence, - severity, - IceNoVersion, - 0); - - IceFlush (iceConn); -} - - -void -_IceErrorSetupFailed (iceConn, offendingMinor, reason) - -IceConn iceConn; -int offendingMinor; -char *reason; - -{ - char *pBuf, *pStart; - int bytes; - int severity = (offendingMinor == ICE_ConnectionSetup) ? - IceFatalToConnection : IceFatalToProtocol; - - if (!reason) - reason = ""; - bytes = STRING_BYTES (reason); - - IceErrorHeader (iceConn, - 0, offendingMinor, - iceConn->receive_sequence, - severity, - IceSetupFailed, - WORD64COUNT (bytes)); - - pBuf = pStart = IceAllocScratch (iceConn, PADDED_BYTES64 (bytes)); - STORE_STRING (pBuf, reason); - - IceWriteData (iceConn, PADDED_BYTES64 (bytes), pStart); - IceFlush (iceConn); -} - - -void -_IceErrorAuthenticationRejected (iceConn, offendingMinor, reason) - -IceConn iceConn; -int offendingMinor; -char *reason; - -{ - char *pBuf, *pStart; - int bytes; - - if (!reason) - reason = ""; - bytes = STRING_BYTES (reason); - - IceErrorHeader (iceConn, - 0, offendingMinor, - iceConn->receive_sequence, - IceFatalToProtocol, - IceAuthRejected, - WORD64COUNT (bytes)); - - pBuf = pStart = IceAllocScratch (iceConn, PADDED_BYTES64 (bytes)); - STORE_STRING (pBuf, reason); - - IceWriteData (iceConn, PADDED_BYTES64 (bytes), pStart); - IceFlush (iceConn); -} - - -void -_IceErrorAuthenticationFailed (iceConn, offendingMinor, reason) - -IceConn iceConn; -int offendingMinor; -char *reason; - -{ - char *pBuf, *pStart; - int bytes; - - if (!reason) - reason = ""; - bytes = STRING_BYTES (reason); - - IceErrorHeader (iceConn, - 0, offendingMinor, - iceConn->receive_sequence, - IceFatalToProtocol, - IceAuthFailed, - WORD64COUNT (bytes)); - - pBuf = pStart = IceAllocScratch (iceConn, PADDED_BYTES64 (bytes)); - STORE_STRING (pBuf, reason); - - IceWriteData (iceConn, PADDED_BYTES64 (bytes), pStart); - IceFlush (iceConn); -} - - -void -_IceErrorProtocolDuplicate (iceConn, protocolName) - -IceConn iceConn; -char *protocolName; - -{ - char *pBuf, *pStart; - int bytes; - - if (!protocolName) - protocolName = ""; - bytes = STRING_BYTES (protocolName); - - IceErrorHeader (iceConn, - 0, ICE_ProtocolSetup, - iceConn->receive_sequence, - IceFatalToProtocol, - IceProtocolDuplicate, - WORD64COUNT (bytes)); - - pBuf = pStart = IceAllocScratch (iceConn, PADDED_BYTES64 (bytes)); - STORE_STRING (pBuf, protocolName); - - IceWriteData (iceConn, PADDED_BYTES64 (bytes), pStart); - IceFlush (iceConn); -} - - -void -_IceErrorMajorOpcodeDuplicate (iceConn, majorOpcode) - -IceConn iceConn; -int majorOpcode; - -{ - char mOp = (char) majorOpcode; - - IceErrorHeader (iceConn, - 0, ICE_ProtocolSetup, - iceConn->receive_sequence, - IceFatalToProtocol, - IceMajorOpcodeDuplicate, - 1 /* length */); - - IceWriteData (iceConn, 8, &mOp); - IceFlush (iceConn); -} - - -void -_IceErrorUnknownProtocol (iceConn, protocolName) - -IceConn iceConn; -char *protocolName; - -{ - char *pBuf, *pStart; - int bytes; - - if (!protocolName) - protocolName = ""; - bytes = STRING_BYTES (protocolName); - - IceErrorHeader (iceConn, - 0, ICE_ProtocolSetup, - iceConn->receive_sequence, - IceFatalToProtocol, - IceUnknownProtocol, - WORD64COUNT (bytes)); - - pBuf = pStart = IceAllocScratch (iceConn, PADDED_BYTES64 (bytes)); - STORE_STRING (pBuf, protocolName); - - IceWriteData (iceConn, PADDED_BYTES64 (bytes), pStart); - IceFlush (iceConn); -} - - -void -_IceErrorBadMajor (iceConn, offendingMajor, offendingMinor, severity) - -IceConn iceConn; -int offendingMajor; -int offendingMinor; -int severity; - -{ - char maj = (char) offendingMajor; - - IceErrorHeader (iceConn, - 0, offendingMinor, - iceConn->receive_sequence, - severity, - IceBadMajor, - 1 /* length */); - - IceWriteData (iceConn, 8, &maj); - IceFlush (iceConn); -} - - - -/* - * Default error handler. - */ - -void -_IceDefaultErrorHandler (iceConn, swap, - offendingMinorOpcode, offendingSequence, errorClass, severity, values) - -IceConn iceConn; -Bool swap; -int offendingMinorOpcode; -unsigned long offendingSequence; -int errorClass; -int severity; -IcePointer values; - -{ - char *str; - char *pData = (char *) values; - - switch (offendingMinorOpcode) - { - case ICE_ConnectionSetup: - str = "ConnectionSetup"; - break; - case ICE_AuthRequired: - str = "AuthRequired"; - break; - case ICE_AuthReply: - str = "AuthReply"; - break; - case ICE_AuthNextPhase: - str = "AuthNextPhase"; - break; - case ICE_ConnectionReply: - str = "ConnectionReply"; - break; - case ICE_ProtocolSetup: - str = "ProtocolSetup"; - break; - case ICE_ProtocolReply: - str = "ProtocolReply"; - break; - case ICE_Ping: - str = "Ping"; - break; - case ICE_PingReply: - str = "PingReply"; - break; - case ICE_WantToClose: - str = "WantToClose"; - break; - case ICE_NoClose: - str = "NoClose"; - break; - default: - str = ""; - } - - fprintf (stderr, "\n"); - - fprintf (stderr, "ICE error: Offending minor opcode = %d (%s)\n", - offendingMinorOpcode, str); - - fprintf (stderr, " Offending sequence number = %lu\n", - offendingSequence); - - switch (errorClass) - { - case IceBadMinor: - str = "BadMinor"; - break; - case IceBadState: - str = "BadState"; - break; - case IceBadLength: - str = "BadLength"; - break; - case IceBadValue: - str = "BadValue"; - break; - case IceBadMajor: - str = "BadMajor"; - break; - case IceNoAuth: - str = "NoAuthentication"; - break; - case IceNoVersion: - str = "NoVersion"; - break; - case IceSetupFailed: - str = "SetupFailed"; - break; - case IceAuthRejected: - str = "AuthenticationRejected"; - break; - case IceAuthFailed: - str = "AuthenticationFailed"; - break; - case IceProtocolDuplicate: - str = "ProtocolDuplicate"; - break; - case IceMajorOpcodeDuplicate: - str = "MajorOpcodeDuplicate"; - break; - case IceUnknownProtocol: - str = "UnknownProtocol"; - break; - default: - str = "???"; - } - - fprintf (stderr, " Error class = %s\n", str); - - if (severity == IceCanContinue) - str = "CanContinue"; - else if (severity == IceFatalToProtocol) - str = "FatalToProtocol"; - else if (severity == IceFatalToConnection) - str = "FatalToConnection"; - else - str = "???"; - - fprintf (stderr, " Severity = %s\n", str); - - switch (errorClass) - { - case IceBadValue: - { - int offset, length, val; - - EXTRACT_CARD32 (pData, swap, offset); - EXTRACT_CARD32 (pData, swap, length); - - fprintf (stderr, - " BadValue Offset = %d\n", offset); - fprintf (stderr, - " BadValue Length = %d\n", length); - - if (length <= 4) - { - if (length == 1) - val = (int) *pData; - else if (length == 2) - { - EXTRACT_CARD16 (pData, swap, val); - } - else - { - EXTRACT_CARD32 (pData, swap, val); - } - - fprintf (stderr, - " BadValue = %d\n", val); - } - break; - } - - case IceBadMajor: - - fprintf (stderr, "Major opcode : %d\n", (int) *pData); - break; - - case IceSetupFailed: - - EXTRACT_STRING (pData, swap, str); - fprintf (stderr, "Reason : %s\n", str); - break; - - case IceAuthRejected: - - EXTRACT_STRING (pData, swap, str); - fprintf (stderr, "Reason : %s\n", str); - break; - - case IceAuthFailed: - - EXTRACT_STRING (pData, swap, str); - fprintf (stderr, "Reason : %s\n", str); - break; - - case IceProtocolDuplicate: - - EXTRACT_STRING (pData, swap, str); - fprintf (stderr, "Protocol name : %s\n", str); - break; - - case IceMajorOpcodeDuplicate: - - fprintf (stderr, "Major opcode : %d\n", (int) *pData); - break; - - case IceUnknownProtocol: - - EXTRACT_STRING (pData, swap, str); - fprintf (stderr, "Protocol name : %s\n", str); - break; - - default: - break; - } - - fprintf (stderr, "\n"); - - if (severity != IceCanContinue) - exit (1); -} - - - -/* - * This procedure sets the ICE error handler to be the specified - * routine. If NULL is passed in the default error handler is restored. - * The function's return value is the previous error handler. - */ - -IceErrorHandler -IceSetErrorHandler (handler) - -IceErrorHandler handler; - -{ - IceErrorHandler oldHandler = _IceErrorHandler; - - if (handler != NULL) - _IceErrorHandler = handler; - else - _IceErrorHandler = _IceDefaultErrorHandler; - - return (oldHandler); -} - - - -/* - * Default IO error handler. - */ - -void -_IceDefaultIOErrorHandler (iceConn) - -IceConn iceConn; - -{ - fprintf (stderr, - "ICE default IO error handler doing an exit(), pid = %d, errno = %d\n", - getpid(), errno); - - exit (1); -} - - - -/* - * This procedure sets the ICE fatal I/O error handler to be the - * specified routine. If NULL is passed in the default error - * handler is restored. The function's return value is the - * previous error handler. - */ - -IceIOErrorHandler -IceSetIOErrorHandler (handler) - -IceIOErrorHandler handler; - -{ - IceIOErrorHandler oldHandler = _IceIOErrorHandler; - - if (handler != NULL) - _IceIOErrorHandler = handler; - else - _IceIOErrorHandler = _IceDefaultIOErrorHandler; - - return (oldHandler); -} diff --git a/xc/lib/ICE/getauth.c b/xc/lib/ICE/getauth.c deleted file mode 100644 index 7f84e7e3b..000000000 --- a/xc/lib/ICE/getauth.c +++ /dev/null @@ -1,266 +0,0 @@ -/* $TOG: getauth.c /main/9 1998/02/06 13:56:07 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#include -#include "ICElibint.h" -#include - -static Bool auth_valid (); - -extern int _IcePaAuthDataEntryCount; -extern IceAuthDataEntry _IcePaAuthDataEntries[]; - - -/* - * The functions in this file are not a standard part of ICElib. - * - * The sample implementation uses an .ICEauthority to manipulate - * authentication data. - * - * For the client that initiates a Protocol Setup, we look in the - * .ICEauthority file to get the data. - * - * For the client accepting the Protocol Setup, we get the data - * from an in-memory database of authentication data (set by the - * application calling IceSetPaAuthData). We have to get the data - * from memory because getting it directly from the .ICEauthority - * file is not secure - someone can just modify the contents of the - * .ICEauthority file behind our back. - */ - -void -_IceGetPoAuthData (protocolName, networkId, authName, - authDataLenRet, authDataRet) - -char *protocolName; -char *networkId; -char *authName; -unsigned short *authDataLenRet; -char **authDataRet; - -{ - IceAuthFileEntry *entry; - - entry = IceGetAuthFileEntry (protocolName, networkId, authName); - - if (entry) - { - *authDataLenRet = entry->auth_data_length; - - if ((*authDataRet = (char *) malloc (entry->auth_data_length)) != NULL) - memcpy (*authDataRet, entry->auth_data, entry->auth_data_length); - } - else - { - *authDataLenRet = 0; - *authDataRet = NULL; - } - - IceFreeAuthFileEntry (entry); -} - - - -void -_IceGetPaAuthData (protocolName, networkId, authName, - authDataLenRet, authDataRet) - -char *protocolName; -char *networkId; -char *authName; -unsigned short *authDataLenRet; -char **authDataRet; - -{ - IceAuthDataEntry *entry; - int found = 0; - int i; - - for (i = 0; i < _IcePaAuthDataEntryCount && !found; i++) - { - entry = &_IcePaAuthDataEntries[i]; - - found = - strcmp (protocolName, entry->protocol_name) == 0 && - strcmp (networkId, entry->network_id) == 0 && - strcmp (authName, entry->auth_name) == 0; - } - - if (found) - { - *authDataLenRet = entry->auth_data_length; - - if ((*authDataRet = (char *) malloc (entry->auth_data_length)) != NULL) - memcpy (*authDataRet, entry->auth_data, entry->auth_data_length); - } - else - { - *authDataLenRet = 0; - *authDataRet = NULL; - } -} - - - -void -_IceGetPoValidAuthIndices (protocol_name, network_id, - num_auth_names, auth_names, num_indices_ret, indices_ret) - -char *protocol_name; -char *network_id; -int num_auth_names; -char **auth_names; -int *num_indices_ret; -int *indices_ret; /* in/out arg */ - -{ - FILE *auth_file; - char *filename; - IceAuthFileEntry *entry; - int index_ret, i; - - *num_indices_ret = 0; - - if (!(filename = IceAuthFileName ())) - return; - - if (access (filename, R_OK) != 0) /* checks REAL id */ - return; - - if (!(auth_file = fopen (filename, "rb"))) - return; - - for (;;) - { - if (!(entry = IceReadAuthFileEntry (auth_file))) - break; - - if (strcmp (protocol_name, entry->protocol_name) == 0 && - strcmp (network_id, entry->network_id) == 0 && - auth_valid (entry->auth_name, num_auth_names, - auth_names, &index_ret)) - { - /* - * Make sure we didn't store this index already. - */ - - for (i = 0; i < *num_indices_ret; i++) - if (index_ret == indices_ret[i]) - break; - - if (i >= *num_indices_ret) - { - indices_ret[*num_indices_ret] = index_ret; - *num_indices_ret += 1; - } - } - - IceFreeAuthFileEntry (entry); - } - - fclose (auth_file); -} - - - -void -_IceGetPaValidAuthIndices (protocol_name, network_id, - num_auth_names, auth_names, num_indices_ret, indices_ret) - -char *protocol_name; -char *network_id; -int num_auth_names; -char **auth_names; -int *num_indices_ret; -int *indices_ret; /* in/out arg */ - -{ - int index_ret; - int i, j; - IceAuthDataEntry *entry; - - *num_indices_ret = 0; - - for (i = 0; i < _IcePaAuthDataEntryCount; i++) - { - entry = &_IcePaAuthDataEntries[i]; - - if (strcmp (protocol_name, entry->protocol_name) == 0 && - strcmp (network_id, entry->network_id) == 0 && - auth_valid (entry->auth_name, num_auth_names, - auth_names, &index_ret)) - { - /* - * Make sure we didn't store this index already. - */ - - for (j = 0; j < *num_indices_ret; j++) - if (index_ret == indices_ret[j]) - break; - - if (j >= *num_indices_ret) - { - indices_ret[*num_indices_ret] = index_ret; - *num_indices_ret += 1; - } - } - } -} - - - -/* - * local routines - */ - -static Bool -auth_valid (auth_name, num_auth_names, auth_names, index_ret) - -char *auth_name; -int num_auth_names; -char **auth_names; -int *index_ret; - -{ - /* - * Check if auth_name is in auth_names. Return index. - */ - - int i; - - for (i = 0; i < num_auth_names; i++) - if (strcmp (auth_name, auth_names[i]) == 0) - { - break; - } - - if (i < num_auth_names) - { - *index_ret = i; - return (1); - } - else - return (0); -} diff --git a/xc/lib/ICE/globals.h b/xc/lib/ICE/globals.h deleted file mode 100644 index 2bcc8bb45..000000000 --- a/xc/lib/ICE/globals.h +++ /dev/null @@ -1,63 +0,0 @@ -/* $TOG: globals.h /main/15 1998/02/06 13:56:12 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ -/* $XFree86: xc/lib/ICE/globals.h,v 1.2 1998/12/20 11:56:49 dawes Exp $ */ - -extern void _IceDefaultErrorHandler (); -extern void _IceDefaultIOErrorHandler (); - -extern IcePoAuthStatus _IcePoMagicCookie1Proc (); -extern IcePaAuthStatus _IcePaMagicCookie1Proc (); - -extern void _IceProcessCoreMessage (); - -#ifndef __EMX__ -IceConn _IceConnectionObjs[256]; -char *_IceConnectionStrings[256]; -#else -IceConn _IceConnectionObjs[256] = {0}; -char *_IceConnectionStrings[256] = {0}; -#endif -int _IceConnectionCount = 0; - -#ifndef __EMX__ -_IceProtocol _IceProtocols[255]; -#else -_IceProtocol _IceProtocols[255] = {0}; -#endif -int _IceLastMajorOpcode = 0; - -int _IceAuthCount = 1; -char *_IceAuthNames[] = {"MIT-MAGIC-COOKIE-1"}; -IcePoAuthProc _IcePoAuthProcs[] = {_IcePoMagicCookie1Proc}; -IcePaAuthProc _IcePaAuthProcs[] = {_IcePaMagicCookie1Proc}; - -int _IceVersionCount = 1; -_IceVersion _IceVersions[] = { - {IceProtoMajor, IceProtoMinor, _IceProcessCoreMessage}}; - -_IceWatchProc *_IceWatchProcs = NULL; - -IceErrorHandler _IceErrorHandler = _IceDefaultErrorHandler; -IceIOErrorHandler _IceIOErrorHandler = _IceDefaultIOErrorHandler; diff --git a/xc/lib/ICE/iceauth.c b/xc/lib/ICE/iceauth.c deleted file mode 100644 index 6ff0fa514..000000000 --- a/xc/lib/ICE/iceauth.c +++ /dev/null @@ -1,276 +0,0 @@ -/* $TOG: iceauth.c /main/22 1998/02/06 13:56:17 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ -/* $XFree86: xc/lib/ICE/iceauth.c,v 3.2 1998/10/03 08:41:09 dawes Exp $ */ - -#include -#include "ICElibint.h" -#include - -#if defined(X_NOT_STDC_ENV) && !defined(__EMX__) -#define Time_t long -extern Time_t time (); -#else -#include -#define Time_t time_t -#endif - -static int binaryEqual (); - -static int was_called_state; - -/* - * MIT-MAGIC-COOKIE-1 is a sample authentication method implemented by - * the SI. It is not part of standard ICElib. - */ - - -char * -IceGenerateMagicCookie (len) - -int len; - -{ - char *auth; - long ldata[2]; - int seed; - int value; - int i; - - if ((auth = (char *) malloc (len + 1)) == NULL) - return (NULL); - -#ifdef ITIMER_REAL - { - struct timeval now; - X_GETTIMEOFDAY (&now); - ldata[0] = now.tv_sec; - ldata[1] = now.tv_usec; - } -#else - { -#ifndef __EMX__ - long time (); -#endif - ldata[0] = time ((long *) 0); - ldata[1] = getpid (); - } -#endif - seed = (ldata[0]) + (ldata[1] << 16); - srand (seed); - for (i = 0; i < len; i++) - { - value = rand (); - auth[i] = value & 0xff; - } - auth[len] = '\0'; - - return (auth); -} - - - -IcePoAuthStatus -_IcePoMagicCookie1Proc (iceConn, authStatePtr, cleanUp, swap, - authDataLen, authData, replyDataLenRet, replyDataRet, errorStringRet) - -IceConn iceConn; -IcePointer *authStatePtr; -Bool cleanUp; -Bool swap; -int authDataLen; -IcePointer authData; -int *replyDataLenRet; -IcePointer *replyDataRet; -char **errorStringRet; - -{ - if (cleanUp) - { - /* - * We didn't allocate any state. We're done. - */ - - return (IcePoAuthDoneCleanup); - } - - *errorStringRet = NULL; - - if (*authStatePtr == NULL) - { - /* - * This is the first time we're being called. Search the - * authentication data for the first occurence of - * MIT-MAGIC-COOKIE-1 that matches iceConn->connection_string. - */ - - unsigned short length; - char *data; - - _IceGetPoAuthData ("ICE", iceConn->connection_string, - "MIT-MAGIC-COOKIE-1", &length, &data); - - if (!data) - { - char *tempstr = - "Could not find correct MIT-MAGIC-COOKIE-1 authentication"; - - *errorStringRet = (char *) malloc (strlen (tempstr) + 1); - if (*errorStringRet) - strcpy (*errorStringRet, tempstr); - - return (IcePoAuthFailed); - } - else - { - *authStatePtr = (IcePointer) &was_called_state; - - *replyDataLenRet = length; - *replyDataRet = data; - - return (IcePoAuthHaveReply); - } - } - else - { - /* - * We should never get here for MIT-MAGIC-COOKIE-1 since it is - * a single pass authentication method. - */ - - char *tempstr = "MIT-MAGIC-COOKIE-1 authentication internal error"; - - *errorStringRet = (char *) malloc (strlen (tempstr) + 1); - if (*errorStringRet) - strcpy (*errorStringRet, tempstr); - - return (IcePoAuthFailed); - } -} - - - -IcePaAuthStatus -_IcePaMagicCookie1Proc (iceConn, authStatePtr, swap, - authDataLen, authData, replyDataLenRet, replyDataRet, errorStringRet) - -IceConn iceConn; -IcePointer *authStatePtr; -Bool swap; -int authDataLen; -IcePointer authData; -int *replyDataLenRet; -IcePointer *replyDataRet; -char **errorStringRet; - -{ - *errorStringRet = NULL; - *replyDataLenRet = 0; - *replyDataRet = NULL; - - if (*authStatePtr == NULL) - { - /* - * This is the first time we're being called. We don't have - * any data to pass to the other client. - */ - - *authStatePtr = (IcePointer) &was_called_state; - - return (IcePaAuthContinue); - } - else - { - /* - * Search the authentication data for the first occurence of - * MIT-MAGIC-COOKIE-1 that matches iceConn->connection_string. - */ - - unsigned short length; - char *data; - - _IceGetPaAuthData ("ICE", iceConn->connection_string, - "MIT-MAGIC-COOKIE-1", &length, &data); - - if (data) - { - IcePaAuthStatus stat; - - if (authDataLen == length && - binaryEqual ((char *) authData, data, authDataLen)) - { - stat = IcePaAuthAccepted; - } - else - { - char *tempstr = "MIT-MAGIC-COOKIE-1 authentication rejected"; - - *errorStringRet = (char *) malloc (strlen (tempstr) + 1); - if (*errorStringRet) - strcpy (*errorStringRet, tempstr); - - stat = IcePaAuthRejected; - } - - free (data); - return (stat); - } - else - { - /* - * We should never get here because in the ConnectionReply - * we should have passed all the valid methods. So we should - * always find a valid entry. - */ - - char *tempstr = - "MIT-MAGIC-COOKIE-1 authentication internal error"; - - *errorStringRet = (char *) malloc (strlen (tempstr) + 1); - if (*errorStringRet) - strcpy (*errorStringRet, tempstr); - - return (IcePaAuthFailed); - } - } -} - - - -/* - * local routines - */ - -static int -binaryEqual (a, b, len) - -register char *a, *b; -register unsigned len; - -{ - while (len--) - if (*a++ != *b++) - return 0; - return 1; -} diff --git a/xc/lib/ICE/listen.c b/xc/lib/ICE/listen.c deleted file mode 100644 index 0026fc079..000000000 --- a/xc/lib/ICE/listen.c +++ /dev/null @@ -1,276 +0,0 @@ -/* $TOG: listen.c /main/16 1998/02/06 13:57:14 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#include -#include "ICElibint.h" -#include -#include - - -Status -IceListenForConnections (countRet, listenObjsRet, errorLength, errorStringRet) - -int *countRet; -IceListenObj **listenObjsRet; -int errorLength; -char *errorStringRet; - -{ - struct _IceListenObj *listenObjs; - char *networkId; - int fd, transCount, partial, i, j; - Status status = 1; - XtransConnInfo *transConns = NULL; - - - if ((_IceTransMakeAllCOTSServerListeners (NULL, &partial, - &transCount, &transConns) < 0) || (transCount < 1)) - { - *listenObjsRet = NULL; - *countRet = 0; - - strncpy (errorStringRet, - "Cannot establish any listening sockets", errorLength); - - return (0); - } - - if ((listenObjs = (struct _IceListenObj *) malloc ( - transCount * sizeof (struct _IceListenObj))) == NULL) - { - for (i = 0; i < transCount; i++) - _IceTransClose (transConns[i]); - free ((char *) transConns); - return (0); - } - - *countRet = 0; - - for (i = 0; i < transCount; i++) - { - networkId = _IceTransGetMyNetworkId (transConns[i]); - - if (networkId) - { - listenObjs[*countRet].trans_conn = transConns[i]; - listenObjs[*countRet].network_id = networkId; - - (*countRet)++; - } - } - - if (*countRet == 0) - { - *listenObjsRet = NULL; - - strncpy (errorStringRet, - "Cannot establish any listening sockets", errorLength); - - status = 0; - } - else - { - *listenObjsRet = (IceListenObj *) malloc ( - *countRet * sizeof (IceListenObj)); - - if (*listenObjsRet == NULL) - { - strncpy (errorStringRet, "Malloc failed", errorLength); - - status = 0; - } - else - { - for (i = 0; i < *countRet; i++) - { - (*listenObjsRet)[i] = (IceListenObj) malloc ( - sizeof (struct _IceListenObj)); - - if ((*listenObjsRet)[i] == NULL) - { - strncpy (errorStringRet, "Malloc failed", errorLength); - - for (j = 0; j < i; j++) - free ((char *) (*listenObjsRet)[j]); - - free ((char *) *listenObjsRet); - - status = 0; - } - else - { - *((*listenObjsRet)[i]) = listenObjs[i]; - } - } - } - } - - if (status == 1) - { - if (errorStringRet && errorLength > 0) - *errorStringRet = '\0'; - - for (i = 0; i < *countRet; i++) - { - (*listenObjsRet)[i]->host_based_auth_proc = NULL; - } - } - else - { - for (i = 0; i < transCount; i++) - _IceTransClose (transConns[i]); - } - - free ((char *) listenObjs); - free ((char *) transConns); - - return (status); -} - - - -int -IceGetListenConnectionNumber (listenObj) - -IceListenObj listenObj; - -{ - return (_IceTransGetConnectionNumber (listenObj->trans_conn)); -} - - - -char * -IceGetListenConnectionString (listenObj) - -IceListenObj listenObj; - -{ - char *networkId; - - networkId = (char *) malloc (strlen (listenObj->network_id) + 1); - - if (networkId) - strcpy (networkId, listenObj->network_id); - - return (networkId); -} - - - -char * -IceComposeNetworkIdList (count, listenObjs) - -int count; -IceListenObj *listenObjs; - -{ - char *list; - int len = 0; - int i; - - if (count < 1 || listenObjs == NULL) - return (NULL); - - for (i = 0; i < count; i++) - len += (strlen (listenObjs[i]->network_id) + 1); - - list = (char *) malloc (len); - - if (list == NULL) - return (NULL); - else - { - int doneCount = 0; - - list[0] = '\0'; - - for (i = 0; i < count; i++) - { - if (_IceTransIsLocal (listenObjs[i]->trans_conn)) - { - strcat (list, listenObjs[i]->network_id); - doneCount++; - if (doneCount < count) - strcat (list, ","); - } - } - - if (doneCount < count) - { - for (i = 0; i < count; i++) - { - if (!_IceTransIsLocal (listenObjs[i]->trans_conn)) - { - strcat (list, listenObjs[i]->network_id); - doneCount++; - if (doneCount < count) - strcat (list, ","); - } - } - } - - return (list); - } -} - - - -void -IceFreeListenObjs (count, listenObjs) - -int count; -IceListenObj *listenObjs; - -{ - int i; - - for (i = 0; i < count; i++) - { - free (listenObjs[i]->network_id); - _IceTransClose (listenObjs[i]->trans_conn); - free ((char *) listenObjs[i]); - } - - free ((char *) listenObjs); -} - - - -/* - * Allow host based authentication for the ICE Connection Setup. - * Do not confuse with the host based authentication callbacks that - * can be set up in IceRegisterForProtocolReply. - */ - -void -IceSetHostBasedAuthProc (listenObj, hostBasedAuthProc) - -IceListenObj listenObj; -IceHostBasedAuthProc hostBasedAuthProc; - -{ - listenObj->host_based_auth_proc = hostBasedAuthProc; -} diff --git a/xc/lib/ICE/listenwk.c b/xc/lib/ICE/listenwk.c deleted file mode 100644 index 78b1b9368..000000000 --- a/xc/lib/ICE/listenwk.c +++ /dev/null @@ -1,154 +0,0 @@ -/* $TOG: listenwk.c /main/5 1998/02/09 08:30:39 barstow $ */ - -/* - -Copyright 1996, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $XFree86: xc/lib/ICE/listenwk.c,v 1.2 1999/05/23 06:33:24 dawes Exp $ */ - - -/* Author: Ralph Mor, X Consortium */ - -#include -#include "ICElibint.h" -#include -#include - - -Status -IceListenForWellKnownConnections (port, countRet, listenObjsRet, errorLength, errorStringRet) - -char *port; -int *countRet; -IceListenObj **listenObjsRet; -int errorLength; -char *errorStringRet; - -{ - struct _IceListenObj *listenObjs; - char *networkId; - int transCount, partial, i, j; - Status status = 1; - XtransConnInfo *transConns = NULL; - - - if ((_IceTransMakeAllCOTSServerListeners (port, &partial, - &transCount, &transConns) < 0) || (transCount < 1)) - { - *listenObjsRet = NULL; - *countRet = 0; - - strncpy (errorStringRet, - "Cannot establish any listening sockets", errorLength); - - return (0); - } - - if ((listenObjs = (struct _IceListenObj *) malloc ( - transCount * sizeof (struct _IceListenObj))) == NULL) - { - for (i = 0; i < transCount; i++) - _IceTransClose (transConns[i]); - free ((char *) transConns); - return (0); - } - - *countRet = 0; - - for (i = 0; i < transCount; i++) - { - networkId = (char *)_IceTransGetMyNetworkId (transConns[i]); - - if (networkId) - { - listenObjs[*countRet].trans_conn = transConns[i]; - listenObjs[*countRet].network_id = networkId; - - (*countRet)++; - } - } - - if (*countRet == 0) - { - *listenObjsRet = NULL; - - strncpy (errorStringRet, - "Cannot establish any listening sockets", errorLength); - - status = 0; - } - else - { - *listenObjsRet = (IceListenObj *) malloc ( - *countRet * sizeof (IceListenObj)); - - if (*listenObjsRet == NULL) - { - strncpy (errorStringRet, "Malloc failed", errorLength); - - status = 0; - } - else - { - for (i = 0; i < *countRet; i++) - { - (*listenObjsRet)[i] = (IceListenObj) malloc ( - sizeof (struct _IceListenObj)); - - if ((*listenObjsRet)[i] == NULL) - { - strncpy (errorStringRet, "Malloc failed", errorLength); - - for (j = 0; j < i; j++) - free ((char *) (*listenObjsRet)[j]); - - free ((char *) *listenObjsRet); - - status = 0; - } - else - { - *((*listenObjsRet)[i]) = listenObjs[i]; - } - } - } - } - - if (status == 1) - { - if (errorStringRet && errorLength > 0) - *errorStringRet = '\0'; - - for (i = 0; i < *countRet; i++) - { - (*listenObjsRet)[i]->host_based_auth_proc = NULL; - } - } - else - { - for (i = 0; i < transCount; i++) - _IceTransClose (transConns[i]); - } - - free ((char *) listenObjs); - free ((char *) transConns); - - return (status); -} diff --git a/xc/lib/ICE/locking.c b/xc/lib/ICE/locking.c deleted file mode 100644 index 0119d14f0..000000000 --- a/xc/lib/ICE/locking.c +++ /dev/null @@ -1,60 +0,0 @@ -/* $TOG: locking.c /main/5 1998/02/06 13:57:19 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#include -#include "ICElibint.h" - - -/* - * NOT IMPLEMENTED YET - */ - - -Status -IceInitThreads () - -{ - return (0); -} - - -void -IceAppLockConn (iceConn) - -IceConn iceConn; - -{ - IceLockConn (iceConn); -} - - -void -IceAppUnlockConn (iceConn) - -IceConn iceConn; - -{ - IceUnlockConn (iceConn); -} diff --git a/xc/lib/ICE/misc.c b/xc/lib/ICE/misc.c deleted file mode 100644 index b533c7f9e..000000000 --- a/xc/lib/ICE/misc.c +++ /dev/null @@ -1,619 +0,0 @@ -/* $TOG: misc.c /main/30 1998/02/06 13:57:24 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ -/* $XFree86: xc/lib/ICE/misc.c,v 1.2 1999/05/23 06:33:24 dawes Exp $ */ - -#ifdef WIN32 -#define _WILLWINSOCK_ -#endif -#include -#include "ICElibint.h" -#include -#include -#ifdef WIN32 -#include -#include -#endif - - -/* - * scratch buffer - */ - -char * -IceAllocScratch (iceConn, size) - -IceConn iceConn; -unsigned long size; - -{ - if (!iceConn->scratch || size > iceConn->scratch_size) - { - if (iceConn->scratch) - free (iceConn->scratch); - - iceConn->scratch = (char *) malloc ((unsigned) size); - iceConn->scratch_size = size; - } - - return (iceConn->scratch); -} - - - -/* - * Output/Input buffer functions - */ - -int -IceFlush (iceConn) - -IceConn iceConn; - -{ - _IceWrite (iceConn, - (unsigned long) (iceConn->outbufptr - iceConn->outbuf), - iceConn->outbuf); - - iceConn->outbufptr = iceConn->outbuf; - return 1; -} - - -int -IceGetOutBufSize (iceConn) - -IceConn iceConn; - -{ - return (iceConn->outbufmax - iceConn->outbuf); -} - - -int -IceGetInBufSize (iceConn) - -IceConn iceConn; - -{ - return (iceConn->inbufmax - iceConn->inbuf); -} - - - -/* - * informational functions - */ - -IceConnectStatus -IceConnectionStatus (iceConn) - -IceConn iceConn; - -{ - return (iceConn->connection_status); -} - - -char * -IceVendor (iceConn) - -IceConn iceConn; - -{ - char *string = (char *) malloc (strlen (iceConn->vendor) + 1); - - if (string) - strcpy (string, iceConn->vendor); - - return (string); -} - - -char * -IceRelease (iceConn) - -IceConn iceConn; - -{ - char *string = (char *) malloc (strlen (iceConn->release) + 1); - - if (string) - strcpy (string, iceConn->release); - - return (string); -} - - -int -IceProtocolVersion (iceConn) - -IceConn iceConn; - -{ - return (_IceVersions[iceConn->my_ice_version_index].major_version); -} - - -int -IceProtocolRevision (iceConn) - -IceConn iceConn; - -{ - return (_IceVersions[iceConn->my_ice_version_index].minor_version); -} - - -int -IceConnectionNumber (iceConn) - -IceConn iceConn; - -{ - return (_IceTransGetConnectionNumber (iceConn->trans_conn)); -} - - -char * -IceConnectionString (iceConn) - -IceConn iceConn; - -{ - if (iceConn->connection_string) - { - char *string = (char *) malloc ( - strlen (iceConn->connection_string) + 1); - - if (string) - strcpy (string, iceConn->connection_string); - - return (string); - } - else - return (NULL); -} - - -unsigned long -IceLastSentSequenceNumber (iceConn) - -IceConn iceConn; - -{ - return (iceConn->send_sequence); -} - - -unsigned long -IceLastReceivedSequenceNumber (iceConn) - -IceConn iceConn; - -{ - return (iceConn->receive_sequence); -} - - -Bool -IceSwapping (iceConn) - -IceConn iceConn; - -{ - return (iceConn->swap); -} - - - -/* - * Read "n" bytes from a connection. - * - * Return Status 0 if we detected an EXPECTED closed connection. - * - */ - -Status -_IceRead (iceConn, nbytes, ptr) - -register IceConn iceConn; -unsigned long nbytes; -register char *ptr; - -{ - register unsigned long nleft; - - nleft = nbytes; - while (nleft > 0) - { - int nread; - - if (iceConn->io_ok) - nread = _IceTransRead (iceConn->trans_conn, ptr, (int) nleft); - else - return (1); - - if (nread <= 0) - { -#ifdef WIN32 - errno = WSAGetLastError(); -#endif - if (iceConn->want_to_close) - { - /* - * We sent a WantToClose message and now we detected that - * the other side closed the connection. - */ - - _IceConnectionClosed (iceConn); /* invoke watch procs */ - _IceFreeConnection (iceConn); - - return (0); - } - else - { - /* - * Fatal IO error. First notify each protocol's IceIOErrorProc - * callback, then invoke the application IO error handler. - */ - - iceConn->io_ok = False; - - if (iceConn->connection_status == IceConnectPending) - { - /* - * Don't invoke IO error handler if we are in the - * middle of a connection setup. - */ - - return (1); - } - - if (iceConn->process_msg_info) - { - int i; - - for (i = iceConn->his_min_opcode; - i <= iceConn->his_max_opcode; i++) - { - _IceProcessMsgInfo *process; - - process = &iceConn->process_msg_info[ - i - iceConn->his_min_opcode]; - - if (process->in_use) - { - IceIOErrorProc IOErrProc = process->accept_flag ? - process->protocol->accept_client->io_error_proc : - process->protocol->orig_client->io_error_proc; - - if (IOErrProc) - (*IOErrProc) (iceConn); - } - } - } - - (*_IceIOErrorHandler) (iceConn); - return (1); - } - } - - nleft -= nread; - ptr += nread; - } - - return (1); -} - - - -/* - * If we read a message header with a bad major or minor opcode, - * we need to advance to the end of the message. This way, the next - * message can be processed correctly. - */ - -void -_IceReadSkip (iceConn, nbytes) - -register IceConn iceConn; -register unsigned long nbytes; - -{ - char temp[512]; - - while (nbytes > 0) - { - unsigned long rbytes = nbytes > 512 ? 512 : nbytes; - - _IceRead (iceConn, rbytes, temp); - nbytes -= rbytes; - } -} - - - -/* - * Write "n" bytes to a connection. - */ - -void -_IceWrite (iceConn, nbytes, ptr) - -register IceConn iceConn; -unsigned long nbytes; -register char *ptr; - -{ - register unsigned long nleft; - - nleft = nbytes; - while (nleft > 0) - { - int nwritten; - - if (iceConn->io_ok) - nwritten = _IceTransWrite (iceConn->trans_conn, ptr, (int) nleft); - else - return; - - if (nwritten <= 0) - { -#ifdef WIN32 - errno = WSAGetLastError(); -#endif - /* - * Fatal IO error. First notify each protocol's IceIOErrorProc - * callback, then invoke the application IO error handler. - */ - - iceConn->io_ok = False; - - if (iceConn->connection_status == IceConnectPending) - { - /* - * Don't invoke IO error handler if we are in the - * middle of a connection setup. - */ - - return; - } - - if (iceConn->process_msg_info) - { - int i; - - for (i = iceConn->his_min_opcode; - i <= iceConn->his_max_opcode; i++) - { - _IceProcessMsgInfo *process; - - process = &iceConn->process_msg_info[ - i - iceConn->his_min_opcode]; - - if (process->in_use) - { - IceIOErrorProc IOErrProc = process->accept_flag ? - process->protocol->accept_client->io_error_proc : - process->protocol->orig_client->io_error_proc; - - if (IOErrProc) - (*IOErrProc) (iceConn); - } - } - } - - (*_IceIOErrorHandler) (iceConn); - return; - } - - nleft -= nwritten; - ptr += nwritten; - } -} - -#ifdef WORD64 - -IceWriteData16 (iceConn, nbytes, data) - -IceConn iceConn; -unsigned long nbytes; -short *data; - -{ - int numShorts = nbytes / 2; - int index = 0; - - while (index < numShorts) - { - int spaceLeft, count, i; - int shortsLeft = numShorts - index; - - spaceLeft = iceConn->outbufmax - iceConn->outbufptr - 1; - - if (spaceLeft < 2) - { - IceFlush (iceConn); - spaceLeft = iceConn->outbufmax - iceConn->outbufptr - 1; - } - - count = (shortsLeft < spaceLeft / 2) ? shortsLeft : spaceLeft / 2; - - for (i = 0; i < count; i++) - STORE_CARD16 (iceConn->outbufptr, data[index++]); - } -} - - -IceWriteData32 (iceConn, nbytes, data) - -IceConn iceConn; -unsigned long nbytes; -int *data; - -{ - int numLongs = nbytes / 4; - int index = 0; - - while (index < numLongs) - { - int spaceLeft, count, i; - int longsLeft = numLongs - index; - - spaceLeft = iceConn->outbufmax - iceConn->outbufptr - 1; - - if (spaceLeft < 4) - { - IceFlush (iceConn); - spaceLeft = iceConn->outbufmax - iceConn->outbufptr - 1; - } - - count = (longsLeft < spaceLeft / 4) ? longsLeft : spaceLeft / 4; - - for (i = 0; i < count; i++) - STORE_CARD32 (iceConn->outbufptr, data[index++]); - } -} - - -IceReadData16 (iceConn, swap, nbytes, data) - -IceConn iceConn; -Bool swap; -unsigned long nbytes; -short *data; - -{ - /* NOT IMPLEMENTED YET */ -} - - -IceReadData32 (iceConn, swap, nbytes, data) - -IceConn iceConn; -Bool swap; -unsigned long nbytes; -int *data; - -{ - /* NOT IMPLEMENTED YET */ -} - -#endif /* WORD64 */ - - - -void -_IceAddOpcodeMapping (iceConn, hisOpcode, myOpcode) - -IceConn iceConn; -int hisOpcode; -int myOpcode; - -{ - if (hisOpcode <= 0 || hisOpcode > 255) - { - return; - } - else if (iceConn->process_msg_info == NULL) - { - iceConn->process_msg_info = (_IceProcessMsgInfo *) malloc ( - sizeof (_IceProcessMsgInfo)); - iceConn->his_min_opcode = iceConn->his_max_opcode = hisOpcode; - } - else if (hisOpcode < iceConn->his_min_opcode) - { - _IceProcessMsgInfo *oldVec = iceConn->process_msg_info; - int oldsize = iceConn->his_max_opcode - iceConn->his_min_opcode + 1; - int newsize = iceConn->his_max_opcode - hisOpcode + 1; - int i; - - iceConn->process_msg_info = (_IceProcessMsgInfo *) malloc ( - newsize * sizeof (_IceProcessMsgInfo)); - - memcpy (&iceConn->process_msg_info[ - iceConn->his_min_opcode - hisOpcode], oldVec, - oldsize * sizeof (_IceProcessMsgInfo)); - - free ((char *) oldVec); - - for (i = hisOpcode + 1; i < iceConn->his_min_opcode; i++) - { - iceConn->process_msg_info[i - - iceConn->his_min_opcode].in_use = False; - - iceConn->process_msg_info[i - - iceConn->his_min_opcode].protocol = NULL; - } - - iceConn->his_min_opcode = hisOpcode; - } - else if (hisOpcode > iceConn->his_max_opcode) - { - _IceProcessMsgInfo *oldVec = iceConn->process_msg_info; - int oldsize = iceConn->his_max_opcode - iceConn->his_min_opcode + 1; - int newsize = hisOpcode - iceConn->his_min_opcode + 1; - int i; - - iceConn->process_msg_info = (_IceProcessMsgInfo *) malloc ( - newsize * sizeof (_IceProcessMsgInfo)); - - memcpy (iceConn->process_msg_info, oldVec, - oldsize * sizeof (_IceProcessMsgInfo)); - - free ((char *) oldVec); - - for (i = iceConn->his_max_opcode + 1; i < hisOpcode; i++) - { - iceConn->process_msg_info[i - - iceConn->his_min_opcode].in_use = False; - - iceConn->process_msg_info[i - - iceConn->his_min_opcode].protocol = NULL; - } - - iceConn->his_max_opcode = hisOpcode; - } - - iceConn->process_msg_info[hisOpcode - - iceConn->his_min_opcode].in_use = True; - - iceConn->process_msg_info[hisOpcode - - iceConn->his_min_opcode].my_opcode = myOpcode; - - iceConn->process_msg_info[hisOpcode - - iceConn->his_min_opcode].protocol = &_IceProtocols[myOpcode - 1]; -} - - - -char * -_IceGetPeerName (iceConn) - -IceConn iceConn; - -{ - return (_IceTransGetPeerNetworkId (iceConn->trans_conn)); -} diff --git a/xc/lib/ICE/ping.c b/xc/lib/ICE/ping.c deleted file mode 100644 index 468f79f70..000000000 --- a/xc/lib/ICE/ping.c +++ /dev/null @@ -1,59 +0,0 @@ -/* $TOG: ping.c /main/9 1998/02/06 13:57:29 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#include -#include "ICElibint.h" - -Status -IcePing (iceConn, pingReplyProc, clientData) - -IceConn iceConn; -IcePingReplyProc pingReplyProc; -IcePointer clientData; - -{ - _IcePingWait *newping = (_IcePingWait *) malloc (sizeof (_IcePingWait)); - _IcePingWait *ptr = iceConn->ping_waits; - - if (newping == NULL) - return (0); - - newping->ping_reply_proc = pingReplyProc; - newping->client_data = clientData; - newping->next = NULL; - - while (ptr && ptr->next) - ptr = ptr->next; - - if (ptr == NULL) - iceConn->ping_waits = newping; - else - ptr->next = newping; - - IceSimpleMessage (iceConn, 0, ICE_Ping); - IceFlush (iceConn); - - return (1); -} diff --git a/xc/lib/ICE/process.c b/xc/lib/ICE/process.c deleted file mode 100644 index 0222ec386..000000000 --- a/xc/lib/ICE/process.c +++ /dev/null @@ -1,2509 +0,0 @@ -/* $TOG: process.c /main/44 1998/02/06 13:57:34 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ -/* $XFree86: xc/lib/ICE/process.c,v 3.3 1999/05/23 06:33:24 dawes Exp $ */ - -#include -#include "ICElibint.h" - -#include /* sprintf */ - -#ifdef MINIX -#include -#endif - -/* - * Check for bad length - */ - -#define CHECK_SIZE_MATCH(_iceConn, _opcode, _expected_len, _actual_len, _severity) \ - if ((((_actual_len) - SIZEOF (iceMsg)) >> 3) != _expected_len) \ - { \ - _IceErrorBadLength (_iceConn, 0, _opcode, _severity); \ - return (0); \ - } - -#define CHECK_AT_LEAST_SIZE(_iceConn, _opcode, _expected_len, _actual_len, _severity) \ - if ((((_actual_len) - SIZEOF (iceMsg)) >> 3) > _expected_len) \ - { \ - _IceErrorBadLength (_iceConn, 0, _opcode, _severity); \ - return (0); \ - } - -#define CHECK_COMPLETE_SIZE(_iceConn, _opcode, _expected_len, _actual_len, _pStart, _severity) \ - if (((PADDED_BYTES64((_actual_len)) - SIZEOF (iceMsg)) >> 3) \ - != _expected_len) \ - { \ - _IceErrorBadLength (_iceConn, 0, _opcode, _severity); \ - IceDisposeCompleteMessage (iceConn, _pStart); \ - return (0); \ - } - - - -/* - * IceProcessMessages: - * - * If replyWait == NULL, the client is not waiting for a reply. - * - * If replyWait != NULL, the client is waiting for a reply... - * - * - replyWait->sequence_of_request is the sequence number of the - * message for which the client is waiting a reply. This is needed - * to determine if an error matches a replyWait. - * - * - replyWait->major_opcode_of_request is the major opcode of the - * message for which we are waiting a reply. - * - * - replyWait->minor_opcode_of_request is the minor opcode of the - * message for which we are waiting a reply. - * - * - replyWait->reply is a pointer to the reply message which will be - * filled in when the reply is ready (the protocol library should - * cast this IcePointer to the appropriate reply type). In most cases, - * the reply will have some fixed-size part, and the sender function - * will have provided a pointer to a structure (e.g.) to hold this - * fixed-size data. If there is variable-length data, it would be - * expected that the reply function will have to allocate additional - * memory and store pointer(s) to that memory in the fixed-size - * structure. If the entire data is variable length (e.g., a single - * variable-length string), then the sender function would probably - * just pass a pointer to fixed-size space to hold a pointer, and the - * reply function would allocate the storage and store the pointer. - * It is the responsibility of the client receiving the reply to - * free up any memory allocated on it's behalf. - * - * We might be waiting for several different replies (a function can wait - * for a reply, and while calling IceProcessMessages, a callback can be - * invoked which will wait for another reply). We take advantage of the - * fact that for a given protocol, we are guaranteed that messages are - * processed in the order we sent them. So, everytime we have a new - * replyWait, we add it to the END of the 'saved_reply_waits' list. When - * we read a message and want to see if it matches a replyWait, we use the - * FIRST replyWait in the list with the major opcode of the message. If the - * reply is ready, we remove that replyWait from the list. - * - * If the reply/error is ready for the replyWait passed in to - * IceProcessMessages, *replyReadyRet is set to True. - * - * The return value of IceProcessMessages is one of the following: - * - * IceProcessMessagesSuccess - the message was processed successfully. - * IceProcessMessagesIOError - an IO error occured. The caller should - * invoked IceCloseConnection. - * IceProcessMessagesConnectionClosed - the connection was closed as a - * result of shutdown negotiation. - */ - -IceProcessMessagesStatus -IceProcessMessages (iceConn, replyWait, replyReadyRet) - -IceConn iceConn; -IceReplyWaitInfo *replyWait; -Bool *replyReadyRet; - -{ - iceMsg *header; - Bool replyReady = False; - IceReplyWaitInfo *useThisReplyWait = NULL; - IceProcessMessagesStatus retStatus = IceProcessMessagesSuccess; - - if (replyWait) - *replyReadyRet = False; - - /* - * Each time IceProcessMessages is entered, we increment the dispatch - * level. Each time we leave it, we decrement the dispatch level. - */ - - iceConn->dispatch_level++; - - - /* - * Read the ICE message header. - */ - - if (!_IceRead (iceConn, (unsigned long) SIZEOF (iceMsg), iceConn->inbuf)) - { - /* - * If we previously sent a WantToClose and now we detected - * that the connection was closed, _IceRead returns status 0. - * Since the connection was closed, we just want to return here. - */ - - return (IceProcessMessagesConnectionClosed); - } - - if (!iceConn->io_ok) - { - /* - * An unexpected IO error occured. The caller of IceProcessMessages - * should call IceCloseConnection which will cause the watch procedures - * to be invoked and the ICE connection to be freed. - */ - - iceConn->dispatch_level--; - iceConn->connection_status = IceConnectIOError; - return (IceProcessMessagesIOError); - } - - header = (iceMsg *) iceConn->inbuf; - iceConn->inbufptr = iceConn->inbuf + SIZEOF (iceMsg); - - iceConn->receive_sequence++; - - if (iceConn->waiting_for_byteorder) - { - if (header->majorOpcode == 0 && - header->minorOpcode == ICE_ByteOrder) - { - char byteOrder = ((iceByteOrderMsg *) header)->byteOrder; - int endian = 1; - - CHECK_SIZE_MATCH (iceConn, ICE_ByteOrder, - header->length, SIZEOF (iceByteOrderMsg), - IceFatalToConnection); - - if (byteOrder != IceMSBfirst && byteOrder != IceLSBfirst) - { - _IceErrorBadValue (iceConn, 0, - ICE_ByteOrder, 2, 1, &byteOrder); - - iceConn->connection_status = IceConnectRejected; - } - else - { - iceConn->swap = - (((*(char *) &endian) && byteOrder == IceMSBfirst) || - (!(*(char *) &endian) && byteOrder == IceLSBfirst)); - - iceConn->waiting_for_byteorder = 0; - } - } - else - { - if (header->majorOpcode != 0) - { - _IceErrorBadMajor (iceConn, header->majorOpcode, - header->minorOpcode, IceFatalToConnection); - } - else - { - _IceErrorBadState (iceConn, 0, - header->minorOpcode, IceFatalToConnection); - } - - iceConn->connection_status = IceConnectRejected; - } - - iceConn->dispatch_level--; - if (!iceConn->io_ok) - { - iceConn->connection_status = IceConnectIOError; - retStatus = IceProcessMessagesIOError; - } - - return (retStatus); - } - - if (iceConn->swap) - { - /* swap the length field */ - - header->length = lswapl (header->length); - } - - if (replyWait) - { - /* - * Add to the list of replyWaits (only if it doesn't exist - * in the list already. - */ - - _IceAddReplyWait (iceConn, replyWait); - - - /* - * Note that there are two different replyWaits. The first is - * the one passed into IceProcessMessages, and is the replyWait - * for the message the client is blocking on. The second is - * the replyWait for the message currently being processed - * by IceProcessMessages. We call it "useThisReplyWait". - */ - - useThisReplyWait = _IceSearchReplyWaits (iceConn, header->majorOpcode); - } - - if (header->majorOpcode == 0) - { - /* - * ICE protocol - */ - - Bool connectionClosed; - - _IceProcessCoreMsgProc processIce = - _IceVersions[iceConn->my_ice_version_index].process_core_msg_proc; - - (*processIce) (iceConn, header->minorOpcode, - header->length, iceConn->swap, - useThisReplyWait, &replyReady, &connectionClosed); - - if (connectionClosed) - { - /* - * As a result of shutdown negotiation, the connection was closed. - */ - - return (IceProcessMessagesConnectionClosed); - } - } - else - { - /* - * Sub protocol - */ - - if ((int) header->majorOpcode < iceConn->his_min_opcode || - (int) header->majorOpcode > iceConn->his_max_opcode || - !(iceConn->process_msg_info[header->majorOpcode - - iceConn->his_min_opcode].in_use)) - { - /* - * The protocol of the message we just read is not supported. - */ - - _IceErrorBadMajor (iceConn, header->majorOpcode, - header->minorOpcode, IceCanContinue); - - _IceReadSkip (iceConn, header->length << 3); - } - else - { - _IceProcessMsgInfo *processMsgInfo = &iceConn->process_msg_info[ - header->majorOpcode - iceConn->his_min_opcode]; - - if (processMsgInfo->accept_flag) - { - IcePaProcessMsgProc processProc = - processMsgInfo->process_msg_proc.accept_client; - - (*processProc) (iceConn, processMsgInfo->client_data, - header->minorOpcode, header->length, iceConn->swap); - } - else - { - IcePoProcessMsgProc processProc = - processMsgInfo->process_msg_proc.orig_client; - - (*processProc) (iceConn, - processMsgInfo->client_data, header->minorOpcode, - header->length, iceConn->swap, - useThisReplyWait, &replyReady); - } - } - } - - if (replyReady) - { - _IceSetReplyReady (iceConn, useThisReplyWait); - } - - - /* - * Now we check if the reply is ready for the replyWait passed - * into IceProcessMessages. The replyWait is removed from the - * replyWait list if it is ready. - */ - - if (replyWait) - *replyReadyRet = _IceCheckReplyReady (iceConn, replyWait); - - - /* - * Decrement the dispatch level. If we reach level 0, and the - * free_asap bit is set, free the connection now. Also check for - * possible bad IO status. - */ - - iceConn->dispatch_level--; - - if (iceConn->dispatch_level == 0 && iceConn->free_asap) - { - _IceFreeConnection (iceConn); - retStatus = IceProcessMessagesConnectionClosed; - } - else if (!iceConn->io_ok) - { - iceConn->connection_status = IceConnectIOError; - retStatus = IceProcessMessagesIOError; - } - - return (retStatus); -} - - - -static void -AuthRequired (iceConn, authIndex, authDataLen, authData) - -IceConn iceConn; -int authIndex; -int authDataLen; -IcePointer authData; - -{ - iceAuthRequiredMsg *pMsg; - - IceGetHeader (iceConn, 0, ICE_AuthRequired, - SIZEOF (iceAuthRequiredMsg), iceAuthRequiredMsg, pMsg); - - pMsg->authIndex = authIndex; - pMsg->authDataLength = authDataLen; - pMsg->length += WORD64COUNT (authDataLen); - - IceWriteData (iceConn, authDataLen, (char *) authData); - - if (PAD64 (authDataLen)) - IceWritePad (iceConn, PAD64 (authDataLen)); - - IceFlush (iceConn); -} - - - -static void -AuthReply (iceConn, authDataLen, authData) - -IceConn iceConn; -int authDataLen; -IcePointer authData; - -{ - iceAuthReplyMsg *pMsg; - - IceGetHeader (iceConn, 0, ICE_AuthReply, - SIZEOF (iceAuthReplyMsg), iceAuthReplyMsg, pMsg); - - pMsg->authDataLength = authDataLen; - pMsg->length += WORD64COUNT (authDataLen); - - IceWriteData (iceConn, authDataLen, (char *) authData); - - if (PAD64 (authDataLen)) - IceWritePad (iceConn, PAD64 (authDataLen)); - - IceFlush (iceConn); -} - - - -static void -AuthNextPhase (iceConn, authDataLen, authData) - -IceConn iceConn; -int authDataLen; -IcePointer authData; - -{ - iceAuthNextPhaseMsg *pMsg; - - IceGetHeader (iceConn, 0, ICE_AuthNextPhase, - SIZEOF (iceAuthNextPhaseMsg), iceAuthNextPhaseMsg, pMsg); - - pMsg->authDataLength = authDataLen; - pMsg->length += WORD64COUNT (authDataLen); - - IceWriteData (iceConn, authDataLen, (char *) authData); - - if (PAD64 (authDataLen)) - IceWritePad (iceConn, PAD64 (authDataLen)); - - IceFlush (iceConn); -} - - - -static void -AcceptConnection (iceConn, versionIndex) - -IceConn iceConn; -int versionIndex; - -{ - iceConnectionReplyMsg *pMsg; - char *pData; - int extra; - - extra = STRING_BYTES (IceVendorString) + STRING_BYTES (IceReleaseString); - - IceGetHeaderExtra (iceConn, 0, ICE_ConnectionReply, - SIZEOF (iceConnectionReplyMsg), WORD64COUNT (extra), - iceConnectionReplyMsg, pMsg, pData); - - pMsg->versionIndex = versionIndex; - - STORE_STRING (pData, IceVendorString); - STORE_STRING (pData, IceReleaseString); - - IceFlush (iceConn); - - iceConn->connection_status = IceConnectAccepted; -} - - - -static void -AcceptProtocol (iceConn, hisOpcode, myOpcode, versionIndex, vendor, release) - -IceConn iceConn; -int hisOpcode; -int myOpcode; -int versionIndex; -char *vendor; -char *release; - -{ - iceProtocolReplyMsg *pMsg; - char *pData; - int extra; - - extra = STRING_BYTES (vendor) + STRING_BYTES (release); - - IceGetHeaderExtra (iceConn, 0, ICE_ProtocolReply, - SIZEOF (iceProtocolReplyMsg), WORD64COUNT (extra), - iceProtocolReplyMsg, pMsg, pData); - - pMsg->protocolOpcode = myOpcode; - pMsg->versionIndex = versionIndex; - - STORE_STRING (pData, vendor); - STORE_STRING (pData, release); - - IceFlush (iceConn); - - - /* - * We may be using a different major opcode for this protocol - * than the other client. Whenever we get a message, we must - * map to our own major opcode. - */ - - _IceAddOpcodeMapping (iceConn, hisOpcode, myOpcode); -} - - - -static void -PingReply (iceConn) - -IceConn iceConn; - -{ - IceSimpleMessage (iceConn, 0, ICE_PingReply); - IceFlush (iceConn); -} - - - -static Bool -ProcessError (iceConn, length, swap, replyWait) - -IceConn iceConn; -unsigned long length; -Bool swap; -IceReplyWaitInfo *replyWait; - -{ - int invokeHandler; - Bool errorReturned = False; - iceErrorMsg *message; - char *pData, *pStart; - char severity; - - CHECK_AT_LEAST_SIZE (iceConn, ICE_Error, - length, SIZEOF (iceErrorMsg), - (iceConn->connect_to_you || iceConn->connect_to_me) ? - IceFatalToConnection : IceFatalToProtocol); - - IceReadCompleteMessage (iceConn, SIZEOF (iceErrorMsg), - iceErrorMsg, message, pStart); - - if (!IceValidIO (iceConn)) - { - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - severity = message->severity; - - if (severity != IceCanContinue && severity != IceFatalToProtocol && - severity != IceFatalToConnection) - { - _IceErrorBadValue (iceConn, 0, - ICE_Error, 9, 1, &severity); - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - pData = pStart; - - if (swap) - { - message->errorClass = lswaps (message->errorClass); - message->offendingSequenceNum = lswapl (message->offendingSequenceNum); - } - - if (!replyWait || - message->offendingSequenceNum != replyWait->sequence_of_request) - { - invokeHandler = 1; - } - else - { - if (iceConn->connect_to_you && - ((!iceConn->connect_to_you->auth_active && - message->offendingMinorOpcode == ICE_ConnectionSetup) || - (iceConn->connect_to_you->auth_active && - message->offendingMinorOpcode == ICE_AuthReply))) - { - _IceConnectionError *errorReply = - &(((_IceReply *) (replyWait->reply))->connection_error); - char *errorStr = NULL; - char *tempstr; - char *prefix, *temp; - - invokeHandler = 0; - errorReturned = True; - - switch (message->errorClass) - { - case IceNoVersion: - - tempstr = - "None of the ICE versions specified are supported"; - errorStr = (char *) malloc (strlen (tempstr) + 1); - strcpy (errorStr, tempstr); - break; - - case IceNoAuth: - - tempstr = - "None of the authentication protocols specified are supported"; - errorStr = (char *) malloc (strlen (tempstr) + 1); - strcpy (errorStr, tempstr); - break; - - case IceSetupFailed: - - prefix = "Connection Setup Failed, reason : "; - - EXTRACT_STRING (pData, swap, temp); - errorStr = (char *) malloc ( - strlen (prefix) + strlen (temp) + 1); - sprintf (errorStr, "%s%s", prefix, temp); - free (temp); - break; - - case IceAuthRejected: - - prefix = "Authentication Rejected, reason : "; - EXTRACT_STRING (pData, swap, temp); - errorStr = (char *) malloc ( - strlen (prefix) + strlen (temp) + 1); - sprintf (errorStr, "%s%s", prefix, temp); - free (temp); - break; - - case IceAuthFailed: - - prefix = "Authentication Failed, reason : "; - EXTRACT_STRING (pData, swap, temp); - errorStr = (char *) malloc ( - strlen (prefix) + strlen (temp) + 1); - sprintf (errorStr, "%s%s", prefix, temp); - free (temp); - break; - - default: - invokeHandler = 1; - } - - errorReply->type = ICE_CONNECTION_ERROR; - errorReply->error_message = errorStr; - } - else if (iceConn->protosetup_to_you && - ((!iceConn->protosetup_to_you->auth_active && - message->offendingMinorOpcode == ICE_ProtocolSetup) || - (iceConn->protosetup_to_you->auth_active && - message->offendingMinorOpcode == ICE_AuthReply))) - { - _IceProtocolError *errorReply = - &(((_IceReply *) (replyWait->reply))->protocol_error); - char *errorStr = ""; - char *prefix, *temp; - - invokeHandler = 0; - errorReturned = True; - - switch (message->errorClass) - { - case IceNoVersion: - - temp = - "None of the protocol versions specified are supported"; - errorStr = (char *) malloc (strlen (temp) + 1); - strcpy (errorStr, temp); - break; - - case IceNoAuth: - - temp = - "None of the authentication protocols specified are supported"; - errorStr = (char *) malloc (strlen (temp) + 1); - strcpy (errorStr, temp); - break; - - case IceSetupFailed: - - prefix = "Protocol Setup Failed, reason : "; - - EXTRACT_STRING (pData, swap, temp); - errorStr = (char *) malloc ( - strlen (prefix) + strlen (temp) + 1); - sprintf (errorStr, "%s%s", prefix, temp); - free (temp); - break; - - case IceAuthRejected: - - prefix = "Authentication Rejected, reason : "; - EXTRACT_STRING (pData, swap, temp); - errorStr = (char *) malloc ( - strlen (prefix) + strlen (temp) + 1); - sprintf (errorStr, "%s%s", prefix, temp); - free (temp); - break; - - case IceAuthFailed: - - prefix = "Authentication Failed, reason : "; - EXTRACT_STRING (pData, swap, temp); - errorStr = (char *) malloc ( - strlen (prefix) + strlen (temp) + 1); - sprintf (errorStr, "%s%s", prefix, temp); - free (temp); - break; - - case IceProtocolDuplicate: - - prefix = "Protocol was already registered : "; - EXTRACT_STRING (pData, swap, temp); - errorStr = (char *) malloc ( - strlen (prefix) + strlen (temp) + 1); - sprintf (errorStr, "%s%s", prefix, temp); - free (temp); - break; - - case IceMajorOpcodeDuplicate: - - prefix = "The major opcode was already used : "; - errorStr = (char *) malloc (strlen (prefix) + 2); - sprintf (errorStr, "%s%d", prefix, (int) *pData); - break; - - case IceUnknownProtocol: - - prefix = "Unknown Protocol : "; - EXTRACT_STRING (pData, swap, temp); - errorStr = (char *) malloc ( - strlen (prefix) + strlen (temp) + 1); - sprintf (errorStr, "%s%s", prefix, temp); - free (temp); - break; - - default: - invokeHandler = 1; - } - - errorReply->type = ICE_PROTOCOL_ERROR; - errorReply->error_message = errorStr; - } - - if (errorReturned == True) - { - /* - * If we tried to authenticate, tell the authentication - * procedure to clean up. - */ - - IcePoAuthProc authProc; - - if (iceConn->connect_to_you && - iceConn->connect_to_you->auth_active) - { - authProc = _IcePoAuthProcs[(int) - (iceConn->connect_to_you->my_auth_index)]; - - (*authProc) (iceConn, &iceConn->connect_to_you->my_auth_state, - True /* clean up */, False /* swap */, - 0, NULL, NULL, NULL, NULL); - } - else if (iceConn->protosetup_to_you && - iceConn->protosetup_to_you->auth_active) - { - _IcePoProtocol *protocol = _IceProtocols[ - iceConn->protosetup_to_you->my_opcode - 1].orig_client; - - authProc = protocol->auth_procs[(int)(iceConn-> - protosetup_to_you->my_auth_index)]; - - (*authProc) (iceConn, - &iceConn->protosetup_to_you->my_auth_state, - True /* clean up */, False /* swap */, - 0, NULL, NULL, NULL, NULL); - } - } - } - - if (invokeHandler) - { - (*_IceErrorHandler) (iceConn, swap, message->offendingMinorOpcode, - message->offendingSequenceNum, message->errorClass, - message->severity, (IcePointer) pData); - } - - IceDisposeCompleteMessage (iceConn, pStart); - - return (errorReturned); -} - - - -static int -ProcessConnectionSetup (iceConn, length, swap) - -IceConn iceConn; -unsigned long length; -Bool swap; - -{ - iceConnectionSetupMsg *message; - int myVersionCount, hisVersionCount; - int myVersionIndex, hisVersionIndex; - int hisMajorVersion, hisMinorVersion; - int myAuthCount, hisAuthCount; - int found, i, j; - char *myAuthName, **hisAuthNames; - char *pData, *pStart; - char *vendor = NULL; - char *release = NULL; - int myAuthIndex = 0; - int hisAuthIndex = 0; - int accept_setup_now = 0; - char mustAuthenticate; - int authUsableCount; - int authUsableFlags[MAX_ICE_AUTH_NAMES]; - int authIndices[MAX_ICE_AUTH_NAMES]; - - CHECK_AT_LEAST_SIZE (iceConn, ICE_ConnectionSetup, - length, SIZEOF (iceConnectionSetupMsg), IceFatalToConnection); - - IceReadCompleteMessage (iceConn, SIZEOF (iceConnectionSetupMsg), - iceConnectionSetupMsg, message, pStart); - - if (!IceValidIO (iceConn)) - { - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - pData = pStart; - - SKIP_STRING (pData, swap); /* vendor */ - SKIP_STRING (pData, swap); /* release */ - SKIP_LISTOF_STRING (pData, swap, (int) message->authCount);/* auth names */ - pData += (message->versionCount * 4); /* versions */ - - CHECK_COMPLETE_SIZE (iceConn, ICE_ConnectionSetup, - length, pData - pStart + SIZEOF (iceConnectionSetupMsg), - pStart, IceFatalToConnection); - - mustAuthenticate = message->mustAuthenticate; - if (mustAuthenticate != 0 && mustAuthenticate != 1) - { - _IceErrorBadValue (iceConn, 0, - ICE_ConnectionSetup, 8, 1, &mustAuthenticate); - iceConn->connection_status = IceConnectRejected; - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - pData = pStart; - - EXTRACT_STRING (pData, swap, vendor); - EXTRACT_STRING (pData, swap, release); - - if ((hisAuthCount = message->authCount) > 0) - { - hisAuthNames = (char **) malloc (hisAuthCount * sizeof (char *)); - EXTRACT_LISTOF_STRING (pData, swap, hisAuthCount, hisAuthNames); - } - - hisVersionCount = message->versionCount; - myVersionCount = _IceVersionCount; - - hisVersionIndex = myVersionIndex = found = 0; - - for (i = 0; i < hisVersionCount && !found; i++) - { - EXTRACT_CARD16 (pData, swap, hisMajorVersion); - EXTRACT_CARD16 (pData, swap, hisMinorVersion); - - for (j = 0; j < myVersionCount && !found; j++) - { - if (_IceVersions[j].major_version == hisMajorVersion && - _IceVersions[j].minor_version == hisMinorVersion) - { - hisVersionIndex = i; - myVersionIndex = j; - found = 1; - } - } - } - - if (!found) - { - _IceErrorNoVersion (iceConn, ICE_ConnectionSetup); - iceConn->connection_status = IceConnectRejected; - - free (vendor); - free (release); - - if (hisAuthCount > 0) - { - for (i = 0; i < hisAuthCount; i++) - free (hisAuthNames[i]); - - free ((char *) hisAuthNames); - } - - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - _IceGetPaValidAuthIndices ("ICE", iceConn->connection_string, - _IceAuthCount, _IceAuthNames, &authUsableCount, authIndices); - - for (i = 0; i < _IceAuthCount; i++) - { - authUsableFlags[i] = 0; - for (j = 0; j < authUsableCount && !authUsableFlags[i]; j++) - authUsableFlags[i] = (authIndices[j] == i); - } - - myAuthCount = _IceAuthCount; - - for (i = found = 0; i < myAuthCount && !found; i++) - { - if (authUsableFlags[i]) - { - myAuthName = _IceAuthNames[i]; - - for (j = 0; j < hisAuthCount && !found; j++) - if (strcmp (myAuthName, hisAuthNames[j]) == 0) - { - myAuthIndex = i; - hisAuthIndex = j; - found = 1; - } - } - } - - if (!found) - { - /* - * None of the authentication methods specified by the - * other client is supported. If the other client requires - * authentication, we must reject the connection now. - * Otherwise, we can invoke the host-based authentication callback - * to see if we can accept this connection. - */ - - if (mustAuthenticate || !iceConn->listen_obj->host_based_auth_proc) - { - _IceErrorNoAuthentication (iceConn, ICE_ConnectionSetup); - iceConn->connection_status = IceConnectRejected; - } - else - { - char *hostname = _IceGetPeerName (iceConn); - - if ((*iceConn->listen_obj->host_based_auth_proc) (hostname)) - { - accept_setup_now = 1; - } - else - { - _IceErrorAuthenticationRejected (iceConn, - ICE_ConnectionSetup, "None of the authentication protocols specified are supported and host-based authentication failed"); - - iceConn->connection_status = IceConnectRejected; - } - - if (hostname) - free (hostname); - } - - if (iceConn->connection_status == IceConnectRejected) - { - free (vendor); - free (release); - } - } - else - { - IcePaAuthStatus status; - int authDataLen; - IcePointer authData = NULL; - IcePointer authState; - char *errorString = NULL; - IcePaAuthProc authProc = _IcePaAuthProcs[myAuthIndex]; - - authState = NULL; - - status = (*authProc) (iceConn, &authState, - swap, 0, NULL, &authDataLen, &authData, &errorString); - - if (status == IcePaAuthContinue) - { - _IceConnectToMeInfo *setupInfo; - - AuthRequired (iceConn, hisAuthIndex, authDataLen, authData); - - iceConn->connect_to_me = setupInfo = (_IceConnectToMeInfo *) - malloc (sizeof (_IceConnectToMeInfo)); - - setupInfo->my_version_index = myVersionIndex; - setupInfo->his_version_index = hisVersionIndex; - setupInfo->his_vendor = vendor; - setupInfo->his_release = release; - setupInfo->my_auth_index = myAuthIndex; - setupInfo->my_auth_state = authState; - setupInfo->must_authenticate = mustAuthenticate; - } - else if (status == IcePaAuthAccepted) - { - accept_setup_now = 1; - } - - if (authData && authDataLen > 0) - free ((char *) authData); - - if (errorString) - free (errorString); - } - - if (accept_setup_now) - { - AcceptConnection (iceConn, hisVersionIndex); - - iceConn->vendor = vendor; - iceConn->release = release; - iceConn->my_ice_version_index = myVersionIndex; - } - - if (hisAuthCount > 0) - { - for (i = 0; i < hisAuthCount; i++) - free (hisAuthNames[i]); - - free ((char *) hisAuthNames); - } - - IceDisposeCompleteMessage (iceConn, pStart); - return (0); -} - - - -static Bool -ProcessAuthRequired (iceConn, length, swap, replyWait) - -IceConn iceConn; -unsigned long length; -Bool swap; -IceReplyWaitInfo *replyWait; - -{ - iceAuthRequiredMsg *message; - int authDataLen; - IcePointer authData; - int replyDataLen; - IcePointer replyData = NULL; - char *errorString = NULL; - IcePoAuthProc authProc; - IcePoAuthStatus status; - IcePointer authState; - int realAuthIndex; - - CHECK_AT_LEAST_SIZE (iceConn, ICE_AuthRequired, - length, SIZEOF (iceAuthRequiredMsg), - iceConn->connect_to_you ? IceFatalToConnection : IceFatalToProtocol); - - IceReadCompleteMessage (iceConn, SIZEOF (iceAuthRequiredMsg), - iceAuthRequiredMsg, message, authData); - - if (!IceValidIO (iceConn)) - { - IceDisposeCompleteMessage (iceConn, authData); - return (0); - } - - if (swap) - { - message->authDataLength = lswaps (message->authDataLength); - } - - CHECK_COMPLETE_SIZE (iceConn, ICE_AuthRequired, length, - message->authDataLength + SIZEOF (iceAuthRequiredMsg), authData, - iceConn->connect_to_you ? IceFatalToConnection : IceFatalToProtocol); - - if (iceConn->connect_to_you) - { - if ((int) message->authIndex >= _IceAuthCount) - { - _IceConnectionError *errorReply = - &(((_IceReply *) (replyWait->reply))->connection_error); - - char *tempstr = "Received bad authIndex in the AuthRequired message"; - char errIndex = (int) message->authIndex; - - errorString = (char *) malloc (strlen (tempstr) + 1); - strcpy (errorString, tempstr); - - errorReply->type = ICE_CONNECTION_ERROR; - errorReply->error_message = errorString; - - _IceErrorBadValue (iceConn, 0, - ICE_AuthRequired, 2, 1, &errIndex); - - IceDisposeCompleteMessage (iceConn, authData); - return (1); - } - else - { - authProc = _IcePoAuthProcs[message->authIndex]; - - iceConn->connect_to_you->auth_active = 1; - } - } - else if (iceConn->protosetup_to_you) - { - if ((int) message->authIndex >= - iceConn->protosetup_to_you->my_auth_count) - { - _IceProtocolError *errorReply = - &(((_IceReply *) (replyWait->reply))->protocol_error); - - char *tempstr = "Received bad authIndex in the AuthRequired message"; - char errIndex = (int) message->authIndex; - - errorString = (char *) malloc (strlen (tempstr) + 1); - strcpy (errorString, tempstr); - - errorReply->type = ICE_PROTOCOL_ERROR; - errorReply->error_message = errorString; - - _IceErrorBadValue (iceConn, 0, - ICE_AuthRequired, 2, 1, &errIndex); - - IceDisposeCompleteMessage (iceConn, authData); - return (1); - } - else - { - _IcePoProtocol *myProtocol = _IceProtocols[ - iceConn->protosetup_to_you->my_opcode - 1].orig_client; - - realAuthIndex = iceConn->protosetup_to_you-> - my_auth_indices[message->authIndex]; - - authProc = myProtocol->auth_procs[realAuthIndex]; - - iceConn->protosetup_to_you->auth_active = 1; - } - } - else - { - /* - * Unexpected message - */ - - _IceErrorBadState (iceConn, 0, ICE_AuthRequired, IceCanContinue); - - IceDisposeCompleteMessage (iceConn, authData); - return (0); - } - - authState = NULL; - authDataLen = message->authDataLength; - - status = (*authProc) (iceConn, &authState, False /* don't clean up */, - swap, authDataLen, authData, &replyDataLen, &replyData, &errorString); - - if (status == IcePoAuthHaveReply) - { - AuthReply (iceConn, replyDataLen, replyData); - - replyWait->sequence_of_request = iceConn->send_sequence; - replyWait->minor_opcode_of_request = ICE_AuthReply; - - if (iceConn->connect_to_you) - { - iceConn->connect_to_you->my_auth_state = authState; - iceConn->connect_to_you->my_auth_index = message->authIndex; - } - else if (iceConn->protosetup_to_you) - { - iceConn->protosetup_to_you->my_auth_state = authState; - iceConn->protosetup_to_you->my_auth_index = realAuthIndex; - } - } - else if (status == IcePoAuthRejected || status == IcePoAuthFailed) - { - char *prefix, *returnErrorString; - - if (status == IcePoAuthRejected) - { - _IceErrorAuthenticationRejected (iceConn, - ICE_AuthRequired, errorString); - - prefix = "Authentication Rejected, reason : "; - } - else - { - _IceErrorAuthenticationFailed (iceConn, - ICE_AuthRequired, errorString); - - prefix = "Authentication Failed, reason : "; - } - - returnErrorString = (char *) malloc (strlen (prefix) + - strlen (errorString) + 1); - sprintf (returnErrorString, "%s%s", prefix, errorString); - free (errorString); - - if (iceConn->connect_to_you) - { - _IceConnectionError *errorReply = - &(((_IceReply *) (replyWait->reply))->connection_error); - - errorReply->type = ICE_CONNECTION_ERROR; - errorReply->error_message = returnErrorString; - } - else - { - _IceProtocolError *errorReply = - &(((_IceReply *) (replyWait->reply))->protocol_error); - - errorReply->type = ICE_PROTOCOL_ERROR; - errorReply->error_message = returnErrorString; - } - } - - if (replyData && replyDataLen > 0) - free ((char *) replyData); - - IceDisposeCompleteMessage (iceConn, authData); - - return (status != IcePoAuthHaveReply); -} - - - -static int -ProcessAuthReply (iceConn, length, swap) - -IceConn iceConn; -unsigned long length; -Bool swap; - -{ - iceAuthReplyMsg *message; - int replyDataLen; - IcePointer replyData; - int authDataLen; - IcePointer authData = NULL; - char *errorString = NULL; - - CHECK_AT_LEAST_SIZE (iceConn, ICE_AuthReply, - length, SIZEOF (iceAuthReplyMsg), - iceConn->connect_to_me ? IceFatalToConnection : IceFatalToProtocol); - - IceReadCompleteMessage (iceConn, SIZEOF (iceAuthReplyMsg), - iceAuthReplyMsg, message, replyData); - - if (!IceValidIO (iceConn)) - { - IceDisposeCompleteMessage (iceConn, replyData); - return (0); - } - - if (swap) - { - message->authDataLength = lswaps (message->authDataLength); - } - - CHECK_COMPLETE_SIZE (iceConn, ICE_AuthReply, length, - message->authDataLength + SIZEOF (iceAuthReplyMsg), replyData, - iceConn->connect_to_me ? IceFatalToConnection : IceFatalToProtocol); - - replyDataLen = message->authDataLength; - - if (iceConn->connect_to_me) - { - IcePaAuthProc authProc = _IcePaAuthProcs[(int) - (iceConn->connect_to_me->my_auth_index)]; - IcePaAuthStatus status = - (*authProc) (iceConn, &iceConn->connect_to_me->my_auth_state, swap, - replyDataLen, replyData, &authDataLen, &authData, &errorString); - - if (status == IcePaAuthContinue) - { - AuthNextPhase (iceConn, authDataLen, authData); - } - else if (status == IcePaAuthRejected || status == IcePaAuthFailed) - { - /* - * Before we reject, invoke host-based authentication callback - * and give it a chance to accept the connection (only if the - * other client doesn't require authentication). - */ - - if (!iceConn->connect_to_me->must_authenticate && - iceConn->listen_obj->host_based_auth_proc) - { - char *hostname = _IceGetPeerName (iceConn); - - if ((*iceConn->listen_obj->host_based_auth_proc) (hostname)) - { - status = IcePaAuthAccepted; - } - - if (hostname) - free (hostname); - } - - if (status != IcePaAuthAccepted) - { - free (iceConn->connect_to_me->his_vendor); - free (iceConn->connect_to_me->his_release); - free ((char *) iceConn->connect_to_me); - iceConn->connect_to_me = NULL; - - iceConn->connection_status = IceConnectRejected; - - if (status == IcePaAuthRejected) - { - _IceErrorAuthenticationRejected (iceConn, - ICE_AuthReply, errorString); - } - else - { - _IceErrorAuthenticationFailed (iceConn, - ICE_AuthReply, errorString); - } - } - } - - if (status == IcePaAuthAccepted) - { - AcceptConnection (iceConn, - iceConn->connect_to_me->his_version_index); - - iceConn->vendor = iceConn->connect_to_me->his_vendor; - iceConn->release = iceConn->connect_to_me->his_release; - iceConn->my_ice_version_index = - iceConn->connect_to_me->my_version_index; - - free ((char *) iceConn->connect_to_me); - iceConn->connect_to_me = NULL; - } - } - else if (iceConn->protosetup_to_me) - { - _IcePaProtocol *myProtocol = _IceProtocols[iceConn->protosetup_to_me-> - my_opcode - 1].accept_client; - IcePaAuthProc authProc = myProtocol->auth_procs[(int) - (iceConn->protosetup_to_me->my_auth_index)]; - IcePaAuthStatus status = - (*authProc) (iceConn, &iceConn->protosetup_to_me->my_auth_state, - swap, replyDataLen, replyData, - &authDataLen, &authData, &errorString); - int free_setup_info = 1; - - if (status == IcePaAuthContinue) - { - AuthNextPhase (iceConn, authDataLen, authData); - free_setup_info = 0; - } - else if (status == IcePaAuthRejected || status == IcePaAuthFailed) - { - /* - * Before we reject, invoke host-based authentication callback - * and give it a chance to accept the Protocol Setup (only if the - * other client doesn't require authentication). - */ - - if (!iceConn->protosetup_to_me->must_authenticate && - myProtocol->host_based_auth_proc) - { - char *hostname = _IceGetPeerName (iceConn); - - if ((*myProtocol->host_based_auth_proc) (hostname)) - { - status = IcePaAuthAccepted; - } - - if (hostname) - free (hostname); - } - - if (status == IcePaAuthRejected) - { - _IceErrorAuthenticationRejected (iceConn, - ICE_AuthReply, errorString); - } - else - { - _IceErrorAuthenticationFailed (iceConn, - ICE_AuthReply, errorString); - } - } - - if (status == IcePaAuthAccepted) - { - IcePaProcessMsgProc processMsgProc; - IceProtocolSetupProc protocolSetupProc; - IceProtocolActivateProc protocolActivateProc; - _IceProcessMsgInfo *process_msg_info; - IcePointer clientData = NULL; - char *failureReason = NULL; - Status status = 1; - - protocolSetupProc = myProtocol->protocol_setup_proc; - protocolActivateProc = myProtocol->protocol_activate_proc; - - if (protocolSetupProc) - { - /* - * Notify the client of the Protocol Setup. - */ - - status = (*protocolSetupProc) (iceConn, - myProtocol->version_recs[iceConn->protosetup_to_me-> - my_version_index].major_version, - myProtocol->version_recs[iceConn->protosetup_to_me-> - my_version_index].minor_version, - iceConn->protosetup_to_me->his_vendor, - iceConn->protosetup_to_me->his_release, - &clientData, &failureReason); - - /* - * Set vendor and release pointers to NULL, so it won't - * get freed below. The ProtocolSetupProc should - * free it. - */ - - iceConn->protosetup_to_me->his_vendor = NULL; - iceConn->protosetup_to_me->his_release = NULL; - } - - if (status != 0) - { - /* - * Send the Protocol Reply - */ - - AcceptProtocol (iceConn, - iceConn->protosetup_to_me->his_opcode, - iceConn->protosetup_to_me->my_opcode, - iceConn->protosetup_to_me->his_version_index, - myProtocol->vendor, myProtocol->release); - - - /* - * Set info for this protocol. - */ - - processMsgProc = myProtocol->version_recs[ - iceConn->protosetup_to_me-> - my_version_index].process_msg_proc; - - process_msg_info = &iceConn->process_msg_info[ - iceConn->protosetup_to_me-> - his_opcode -iceConn->his_min_opcode]; - - process_msg_info->client_data = clientData; - process_msg_info->accept_flag = 1; - process_msg_info->process_msg_proc. - accept_client = processMsgProc; - - - /* - * Increase the reference count for the number - * of active protocols. - */ - - iceConn->proto_ref_count++; - - - /* - * Notify the client that the protocol is active. The reason - * we have this 2nd callback invoked is because the client - * may wish to immediately generate a message for this - * protocol, but it must wait until we send the Protocol Reply. - */ - - if (protocolActivateProc) - { - (*protocolActivateProc) (iceConn, - process_msg_info->client_data); - } - } - else - { - /* - * An error was encountered. - */ - - _IceErrorSetupFailed (iceConn, ICE_ProtocolSetup, - failureReason); - - if (failureReason) - free (failureReason); - } - } - - - if (free_setup_info) - { - if (iceConn->protosetup_to_me->his_vendor) - free (iceConn->protosetup_to_me->his_vendor); - if (iceConn->protosetup_to_me->his_release) - free (iceConn->protosetup_to_me->his_release); - free ((char *) iceConn->protosetup_to_me); - iceConn->protosetup_to_me = NULL; - } - } - else - { - /* - * Unexpected message - */ - - _IceErrorBadState (iceConn, 0, ICE_AuthReply, IceCanContinue); - } - - if (authData && authDataLen > 0) - free ((char *) authData); - - if (errorString) - free (errorString); - - IceDisposeCompleteMessage (iceConn, replyData); - return (0); -} - - - -static Bool -ProcessAuthNextPhase (iceConn, length, swap, replyWait) - -IceConn iceConn; -unsigned long length; -Bool swap; -IceReplyWaitInfo *replyWait; - -{ - iceAuthNextPhaseMsg *message; - int authDataLen; - IcePointer authData; - int replyDataLen; - IcePointer replyData = NULL; - char *errorString = NULL; - IcePoAuthProc authProc; - IcePoAuthStatus status; - IcePointer *authState; - - CHECK_AT_LEAST_SIZE (iceConn, ICE_AuthNextPhase, - length, SIZEOF (iceAuthNextPhaseMsg), - iceConn->connect_to_you ? IceFatalToConnection : IceFatalToProtocol); - - IceReadCompleteMessage (iceConn, SIZEOF (iceAuthNextPhaseMsg), - iceAuthNextPhaseMsg, message, authData); - - if (!IceValidIO (iceConn)) - { - IceDisposeCompleteMessage (iceConn, authData); - return (0); - } - - if (swap) - { - message->authDataLength = lswaps (message->authDataLength); - } - - CHECK_COMPLETE_SIZE (iceConn, ICE_AuthNextPhase, length, - message->authDataLength + SIZEOF (iceAuthNextPhaseMsg), authData, - iceConn->connect_to_you ? IceFatalToConnection : IceFatalToProtocol); - - if (iceConn->connect_to_you) - { - authProc = _IcePoAuthProcs[(int) - (iceConn->connect_to_you->my_auth_index)]; - - authState = &iceConn->connect_to_you->my_auth_state; - } - else if (iceConn->protosetup_to_you) - { - _IcePoProtocol *myProtocol = - _IceProtocols[iceConn->protosetup_to_you->my_opcode - 1].orig_client; - - authProc = myProtocol->auth_procs[(int) - (iceConn->protosetup_to_you->my_auth_index)]; - - authState = &iceConn->protosetup_to_you->my_auth_state; - } - else - { - /* - * Unexpected message - */ - - _IceErrorBadState (iceConn, 0, ICE_AuthNextPhase, IceCanContinue); - - IceDisposeCompleteMessage (iceConn, authData); - return (0); - } - - authDataLen = message->authDataLength; - - status = (*authProc) (iceConn, authState, False /* don't clean up */, - swap, authDataLen, authData, &replyDataLen, &replyData, &errorString); - - if (status == IcePoAuthHaveReply) - { - AuthReply (iceConn, replyDataLen, replyData); - - replyWait->sequence_of_request = iceConn->send_sequence; - } - else if (status == IcePoAuthRejected || status == IcePoAuthFailed) - { - char *prefix, *returnErrorString; - - if (status == IcePoAuthRejected) - { - _IceErrorAuthenticationRejected (iceConn, - ICE_AuthNextPhase, errorString); - - prefix = "Authentication Rejected, reason : "; - } - else if (status == IcePoAuthFailed) - { - _IceErrorAuthenticationFailed (iceConn, - ICE_AuthNextPhase, errorString); - - prefix = "Authentication Failed, reason : "; - } - - returnErrorString = (char *) malloc (strlen (prefix) + - strlen (errorString) + 1); - sprintf (returnErrorString, "%s%s", prefix, errorString); - free (errorString); - - if (iceConn->connect_to_you) - { - _IceConnectionError *errorReply = - &(((_IceReply *) (replyWait->reply))->connection_error); - - errorReply->type = ICE_CONNECTION_ERROR; - errorReply->error_message = returnErrorString; - } - else - { - _IceProtocolError *errorReply = - &(((_IceReply *) (replyWait->reply))->protocol_error); - - errorReply->type = ICE_PROTOCOL_ERROR; - errorReply->error_message = returnErrorString; - } - } - - if (replyData && replyDataLen > 0) - free ((char *) replyData); - - IceDisposeCompleteMessage (iceConn, authData); - - return (status != IcePoAuthHaveReply); -} - - - -static Bool -ProcessConnectionReply (iceConn, length, swap, replyWait) - -IceConn iceConn; -unsigned long length; -Bool swap; -IceReplyWaitInfo *replyWait; - -{ - iceConnectionReplyMsg *message; - char *pData, *pStart; - Bool replyReady; - - CHECK_AT_LEAST_SIZE (iceConn, ICE_ConnectionReply, - length, SIZEOF (iceConnectionReplyMsg), IceFatalToConnection); - - IceReadCompleteMessage (iceConn, SIZEOF (iceConnectionReplyMsg), - iceConnectionReplyMsg, message, pStart); - - if (!IceValidIO (iceConn)) - { - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - pData = pStart; - - SKIP_STRING (pData, swap); /* vendor */ - SKIP_STRING (pData, swap); /* release */ - - CHECK_COMPLETE_SIZE (iceConn, ICE_ConnectionReply, - length, pData - pStart + SIZEOF (iceConnectionReplyMsg), - pStart, IceFatalToConnection); - - pData = pStart; - - if (iceConn->connect_to_you) - { - if (iceConn->connect_to_you->auth_active) - { - /* - * Tell the authentication procedure to clean up. - */ - - IcePoAuthProc authProc = _IcePoAuthProcs[(int) - (iceConn->connect_to_you->my_auth_index)]; - - (*authProc) (iceConn, &iceConn->connect_to_you->my_auth_state, - True /* clean up */, False /* swap */, - 0, NULL, NULL, NULL, NULL); - } - - if ((int) message->versionIndex >= _IceVersionCount) - { - _IceConnectionError *errorReply = - &(((_IceReply *) (replyWait->reply))->connection_error); - char errIndex = message->versionIndex; - - _IceErrorBadValue (iceConn, 0, - ICE_ConnectionReply, 2, 1, &errIndex); - - errorReply->type = ICE_CONNECTION_ERROR; - errorReply->error_message = - "Received bad version index in Connection Reply"; - } - else - { - _IceReply *reply = (_IceReply *) (replyWait->reply); - - reply->type = ICE_CONNECTION_REPLY; - reply->connection_reply.version_index = message->versionIndex; - - EXTRACT_STRING (pData, swap, reply->connection_reply.vendor); - EXTRACT_STRING (pData, swap, reply->connection_reply.release); - } - - replyReady = True; - } - else - { - /* - * Unexpected message - */ - - _IceErrorBadState (iceConn, 0, ICE_ConnectionReply, IceCanContinue); - - replyReady = False; - } - - IceDisposeCompleteMessage (iceConn, pStart); - - return (replyReady); -} - - - -static int -ProcessProtocolSetup (iceConn, length, swap) - -IceConn iceConn; -unsigned long length; -Bool swap; - -{ - iceProtocolSetupMsg *message; - _IcePaProtocol *myProtocol; - int myVersionCount, hisVersionCount; - int myVersionIndex, hisVersionIndex; - int hisMajorVersion, hisMinorVersion; - int myAuthCount, hisAuthCount; - int myOpcode, hisOpcode; - int found, i, j; - char *myAuthName, **hisAuthNames; - char *protocolName; - char *pData, *pStart; - char *vendor = NULL; - char *release = NULL; - int accept_setup_now = 0; - int myAuthIndex = 0; - int hisAuthIndex = 0; - char mustAuthenticate; - int authUsableCount; - int authUsableFlags[MAX_ICE_AUTH_NAMES]; - int authIndices[MAX_ICE_AUTH_NAMES]; - - CHECK_AT_LEAST_SIZE (iceConn, ICE_ProtocolSetup, - length, SIZEOF (iceProtocolSetupMsg), IceFatalToProtocol); - - if (iceConn->want_to_close) - { - /* - * If we sent a WantToClose message, but just got a ProtocolSetup, - * we must cancel our WantToClose. It is the responsiblity of the - * other client to send a WantToClose later on. - */ - - iceConn->want_to_close = 0; - } - - IceReadCompleteMessage (iceConn, SIZEOF (iceProtocolSetupMsg), - iceProtocolSetupMsg, message, pStart); - - if (!IceValidIO (iceConn)) - { - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - pData = pStart; - - SKIP_STRING (pData, swap); /* proto name */ - SKIP_STRING (pData, swap); /* vendor */ - SKIP_STRING (pData, swap); /* release */ - SKIP_LISTOF_STRING (pData, swap, (int) message->authCount);/* auth names */ - pData += (message->versionCount * 4); /* versions */ - - CHECK_COMPLETE_SIZE (iceConn, ICE_ProtocolSetup, - length, pData - pStart + SIZEOF (iceProtocolSetupMsg), - pStart, IceFatalToProtocol); - - mustAuthenticate = message->mustAuthenticate; - - if (mustAuthenticate != 0 && mustAuthenticate != 1) - { - _IceErrorBadValue (iceConn, 0, - ICE_ProtocolSetup, 4, 1, &mustAuthenticate); - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - pData = pStart; - - if (iceConn->process_msg_info && - (int) message->protocolOpcode >= iceConn->his_min_opcode && - (int) message->protocolOpcode <= iceConn->his_max_opcode && - iceConn->process_msg_info[ - message->protocolOpcode - iceConn->his_min_opcode].in_use) - { - _IceErrorMajorOpcodeDuplicate (iceConn, message->protocolOpcode); - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - EXTRACT_STRING (pData, swap, protocolName); - - if (iceConn->process_msg_info) - { - for (i = 0; - i <= (iceConn->his_max_opcode - iceConn->his_min_opcode); i++) - { - if (iceConn->process_msg_info[i].in_use && strcmp (protocolName, - iceConn->process_msg_info[i].protocol->protocol_name) == 0) - { - _IceErrorProtocolDuplicate (iceConn, protocolName); - free (protocolName); - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - } - } - - for (i = 0; i < _IceLastMajorOpcode; i++) - if (strcmp (protocolName, _IceProtocols[i].protocol_name) == 0) - break; - - if (i < _IceLastMajorOpcode && - (myProtocol = _IceProtocols[i].accept_client) != NULL) - { - hisOpcode = message->protocolOpcode; - myOpcode = i + 1; - free (protocolName); - } - else - { - _IceErrorUnknownProtocol (iceConn, protocolName); - free (protocolName); - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - EXTRACT_STRING (pData, swap, vendor); - EXTRACT_STRING (pData, swap, release); - - if ((hisAuthCount = message->authCount) > 0) - { - hisAuthNames = (char **) malloc (hisAuthCount * sizeof (char *)); - EXTRACT_LISTOF_STRING (pData, swap, hisAuthCount, hisAuthNames); - } - - hisVersionCount = message->versionCount; - myVersionCount = myProtocol->version_count; - - hisVersionIndex = myVersionIndex = found = 0; - - for (i = 0; i < hisVersionCount && !found; i++) - { - EXTRACT_CARD16 (pData, swap, hisMajorVersion); - EXTRACT_CARD16 (pData, swap, hisMinorVersion); - - for (j = 0; j < myVersionCount && !found; j++) - { - if (myProtocol->version_recs[j].major_version == hisMajorVersion && - myProtocol->version_recs[j].minor_version == hisMinorVersion) - { - hisVersionIndex = i; - myVersionIndex = j; - found = 1; - } - } - } - - if (!found) - { - _IceErrorNoVersion (iceConn, ICE_ProtocolSetup); - - free (vendor); - free (release); - - if (hisAuthCount > 0) - { - for (i = 0; i < hisAuthCount; i++) - free (hisAuthNames[i]); - - free ((char *) hisAuthNames); - } - - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - myAuthCount = myProtocol->auth_count; - - _IceGetPaValidAuthIndices ( - _IceProtocols[myOpcode - 1].protocol_name, - iceConn->connection_string, myAuthCount, myProtocol->auth_names, - &authUsableCount, authIndices); - - for (i = 0; i < myAuthCount; i++) - { - authUsableFlags[i] = 0; - for (j = 0; j < authUsableCount && !authUsableFlags[i]; j++) - authUsableFlags[i] = (authIndices[j] == i); - } - - for (i = found = 0; i < myAuthCount && !found; i++) - { - if (authUsableFlags[i]) - { - myAuthName = myProtocol->auth_names[i]; - - for (j = 0; j < hisAuthCount && !found; j++) - if (strcmp (myAuthName, hisAuthNames[j]) == 0) - { - myAuthIndex = i; - hisAuthIndex = j; - found = 1; - } - } - } - - if (!found) - { - /* - * None of the authentication methods specified by the - * other client is supported. If the other client requires - * authentication, we must reject the Protocol Setup now. - * Otherwise, we can invoke the host-based authentication callback - * to see if we can accept this Protocol Setup. - */ - - if (mustAuthenticate || !myProtocol->host_based_auth_proc) - { - _IceErrorNoAuthentication (iceConn, ICE_ProtocolSetup); - } - else - { - char *hostname = _IceGetPeerName (iceConn); - - if ((*myProtocol->host_based_auth_proc) (hostname)) - { - accept_setup_now = 1; - } - else - { - _IceErrorAuthenticationRejected (iceConn, - ICE_ProtocolSetup, "None of the authentication protocols specified are supported and host-based authentication failed"); - } - - if (hostname) - free (hostname); - } - } - else - { - IcePaAuthStatus status; - int authDataLen; - IcePointer authData = NULL; - IcePointer authState; - char *errorString = NULL; - IcePaAuthProc authProc = - myProtocol->auth_procs[myAuthIndex]; - - authState = NULL; - - status = (*authProc) (iceConn, &authState, swap, 0, NULL, - &authDataLen, &authData, &errorString); - - if (status == IcePaAuthContinue) - { - _IceProtoSetupToMeInfo *setupInfo; - - AuthRequired (iceConn, hisAuthIndex, authDataLen, authData); - - iceConn->protosetup_to_me = setupInfo = - (_IceProtoSetupToMeInfo *) malloc ( - sizeof (_IceProtoSetupToMeInfo)); - - setupInfo->his_opcode = hisOpcode; - setupInfo->my_opcode = myOpcode; - setupInfo->my_version_index = myVersionIndex; - setupInfo->his_version_index = hisVersionIndex; - setupInfo->his_vendor = vendor; - setupInfo->his_release = release; - vendor = release = NULL; /* so we don't free it */ - setupInfo->my_auth_index = myAuthIndex; - setupInfo->my_auth_state = authState; - setupInfo->must_authenticate = mustAuthenticate; - } - else if (status == IcePaAuthAccepted) - { - accept_setup_now = 1; - } - - if (authData && authDataLen > 0) - free ((char *) authData); - - if (errorString) - free (errorString); - } - - if (accept_setup_now) - { - IcePaProcessMsgProc processMsgProc; - IceProtocolSetupProc protocolSetupProc; - IceProtocolActivateProc protocolActivateProc; - _IceProcessMsgInfo *process_msg_info; - IcePointer clientData = NULL; - char *failureReason = NULL; - Status status = 1; - - protocolSetupProc = myProtocol->protocol_setup_proc; - protocolActivateProc = myProtocol->protocol_activate_proc; - - if (protocolSetupProc) - { - /* - * Notify the client of the Protocol Setup. - */ - - status = (*protocolSetupProc) (iceConn, - myProtocol->version_recs[myVersionIndex].major_version, - myProtocol->version_recs[myVersionIndex].minor_version, - vendor, release, &clientData, &failureReason); - - vendor = release = NULL; /* so we don't free it */ - } - - if (status != 0) - { - /* - * Send the Protocol Reply - */ - - AcceptProtocol (iceConn, hisOpcode, myOpcode, hisVersionIndex, - myProtocol->vendor, myProtocol->release); - - - /* - * Set info for this protocol. - */ - - processMsgProc = myProtocol->version_recs[ - myVersionIndex].process_msg_proc; - - process_msg_info = &iceConn->process_msg_info[hisOpcode - - iceConn->his_min_opcode]; - - process_msg_info->client_data = clientData; - process_msg_info->accept_flag = 1; - process_msg_info->process_msg_proc.accept_client = processMsgProc; - - - /* - * Increase the reference count for the number of active protocols. - */ - - iceConn->proto_ref_count++; - - - /* - * Notify the client that the protocol is active. The reason - * we have this 2nd callback invoked is because the client - * may wish to immediately generate a message for this - * protocol, but it must wait until we send the Protocol Reply. - */ - - if (protocolActivateProc) - { - (*protocolActivateProc) (iceConn, - process_msg_info->client_data); - } - } - else - { - /* - * An error was encountered. - */ - - _IceErrorSetupFailed (iceConn, ICE_ProtocolSetup, failureReason); - - if (failureReason) - free (failureReason); - } - } - - if (vendor) - free (vendor); - - if (release) - free (release); - - if (hisAuthCount > 0) - { - for (i = 0; i < hisAuthCount; i++) - free (hisAuthNames[i]); - - free ((char *) hisAuthNames); - } - - IceDisposeCompleteMessage (iceConn, pStart); - return (0); -} - - - -static Bool -ProcessProtocolReply (iceConn, length, swap, replyWait) - -IceConn iceConn; -unsigned long length; -Bool swap; -IceReplyWaitInfo *replyWait; - -{ - iceProtocolReplyMsg *message; - char *pData, *pStart; - Bool replyReady; - - CHECK_AT_LEAST_SIZE (iceConn, ICE_ProtocolReply, - length, SIZEOF (iceProtocolReplyMsg), IceFatalToProtocol); - - IceReadCompleteMessage (iceConn, SIZEOF (iceProtocolReplyMsg), - iceProtocolReplyMsg, message, pStart); - - if (!IceValidIO (iceConn)) - { - IceDisposeCompleteMessage (iceConn, pStart); - return (0); - } - - pData = pStart; - - SKIP_STRING (pData, swap); /* vendor */ - SKIP_STRING (pData, swap); /* release */ - - CHECK_COMPLETE_SIZE (iceConn, ICE_ProtocolReply, - length, pData - pStart + SIZEOF (iceProtocolReplyMsg), - pStart, IceFatalToProtocol); - - pData = pStart; - - if (iceConn->protosetup_to_you) - { - if (iceConn->protosetup_to_you->auth_active) - { - /* - * Tell the authentication procedure to clean up. - */ - - _IcePoProtocol *myProtocol = _IceProtocols[ - iceConn->protosetup_to_you->my_opcode - 1].orig_client; - - IcePoAuthProc authProc = myProtocol->auth_procs[(int) - (iceConn->protosetup_to_you->my_auth_index)]; - -#ifdef SVR4 - -/* - * authProc is never NULL, but the cc compiler on UNIX System V/386 - * Release 4.2 Version 1 screws up an optimization. Unless there is - * some sort of reference to authProc before the function call, the - * function call will seg fault. - */ - if (authProc) -#endif - (*authProc) (iceConn, - &iceConn->protosetup_to_you->my_auth_state, - True /* clean up */, False /* swap */, - 0, NULL, NULL, NULL, NULL); - } - - if ((int) message->versionIndex >= _IceVersionCount) - { - _IceProtocolError *errorReply = - &(((_IceReply *) (replyWait->reply))->protocol_error); - char errIndex = message->versionIndex; - - _IceErrorBadValue (iceConn, 0, - ICE_ProtocolReply, 2, 1, &errIndex); - - errorReply->type = ICE_PROTOCOL_ERROR; - errorReply->error_message = - "Received bad version index in Protocol Reply"; - } - else - { - _IceProtocolReply *reply = - &(((_IceReply *) (replyWait->reply))->protocol_reply); - - reply->type = ICE_PROTOCOL_REPLY; - reply->major_opcode = message->protocolOpcode; - reply->version_index = message->versionIndex; - - EXTRACT_STRING (pData, swap, reply->vendor); - EXTRACT_STRING (pData, swap, reply->release); - } - - replyReady = True; - } - else - { - _IceErrorBadState (iceConn, 0, ICE_ProtocolReply, IceCanContinue); - - replyReady = False; - } - - IceDisposeCompleteMessage (iceConn, pStart); - - return (replyReady); -} - - - -static int -ProcessPing (iceConn, length) - -IceConn iceConn; -unsigned long length; - -{ - CHECK_SIZE_MATCH (iceConn, ICE_Ping, - length, SIZEOF (icePingMsg), IceFatalToConnection); - - PingReply (iceConn); - - return (0); -} - - - -static int -ProcessPingReply (iceConn, length) - -IceConn iceConn; -unsigned long length; - -{ - CHECK_SIZE_MATCH (iceConn, ICE_PingReply, - length, SIZEOF (icePingReplyMsg), IceFatalToConnection); - - if (iceConn->ping_waits) - { - _IcePingWait *next = iceConn->ping_waits->next; - - (*iceConn->ping_waits->ping_reply_proc) (iceConn, - iceConn->ping_waits->client_data); - - free ((char *) iceConn->ping_waits); - iceConn->ping_waits = next; - } - else - { - _IceErrorBadState (iceConn, 0, ICE_PingReply, IceCanContinue); - } - - return (0); -} - - - -static int -ProcessWantToClose (iceConn, length, connectionClosedRet) - -IceConn iceConn; -unsigned long length; -Bool *connectionClosedRet; - -{ - *connectionClosedRet = False; - - CHECK_SIZE_MATCH (iceConn, ICE_WantToClose, - length, SIZEOF (iceWantToCloseMsg), IceFatalToConnection); - - if (iceConn->want_to_close || iceConn->open_ref_count == 0) - { - /* - * We just received a WantToClose. Either we also sent a - * WantToClose, so we close the connection, or the iceConn - * is not being used, so we close the connection. This - * second case is possible if we sent a WantToClose because - * the iceConn->open_ref_count reached zero, but then we - * received a NoClose. - */ - - _IceConnectionClosed (iceConn); /* invoke watch procs */ - _IceFreeConnection (iceConn); - *connectionClosedRet = True; - } - else if (iceConn->proto_ref_count > 0) - { - /* - * We haven't shut down all of our protocols yet. We send a NoClose, - * and it's up to us to generate a WantToClose later on. - */ - - IceSimpleMessage (iceConn, 0, ICE_NoClose); - IceFlush (iceConn); - } - else - { - /* - * The reference count on this iceConn is zero. This means that - * there are no active protocols, but the client didn't explicitly - * close the connection yet. If we didn't just send a Protocol Setup, - * we send a NoClose, and it's up to us to generate a WantToClose - * later on. - */ - - if (!iceConn->protosetup_to_you) - { - IceSimpleMessage (iceConn, 0, ICE_NoClose); - IceFlush (iceConn); - } - } - - return (0); -} - - - -static int -ProcessNoClose (iceConn, length) - -IceConn iceConn; -unsigned long length; - -{ - CHECK_SIZE_MATCH (iceConn, ICE_NoClose, - length, SIZEOF (iceNoCloseMsg), IceFatalToConnection); - - if (iceConn->want_to_close) - { - /* - * The other side can't close now. We cancel our WantToClose, - * and we can expect a WantToClose from the other side. - */ - - iceConn->want_to_close = 0; - } - else - { - _IceErrorBadState (iceConn, 0, ICE_NoClose, IceCanContinue); - } - - return (0); -} - - - -void -_IceProcessCoreMessage (iceConn, opcode, length, swap, - replyWait, replyReadyRet, connectionClosedRet) - -IceConn iceConn; -int opcode; -unsigned long length; -Bool swap; -IceReplyWaitInfo *replyWait; -Bool *replyReadyRet; -Bool *connectionClosedRet; - -{ - Bool replyReady = False; - - *connectionClosedRet = False; - - switch (opcode) - { - case ICE_Error: - - replyReady = ProcessError (iceConn, length, swap, replyWait); - break; - - case ICE_ConnectionSetup: - - ProcessConnectionSetup (iceConn, length, swap); - break; - - case ICE_AuthRequired: - - replyReady = ProcessAuthRequired (iceConn, length, swap, replyWait); - break; - - case ICE_AuthReply: - - ProcessAuthReply (iceConn, length, swap); - break; - - case ICE_AuthNextPhase: - - replyReady = ProcessAuthNextPhase (iceConn, length, swap, replyWait); - break; - - case ICE_ConnectionReply: - - replyReady = ProcessConnectionReply (iceConn, length, swap, replyWait); - break; - - case ICE_ProtocolSetup: - - ProcessProtocolSetup (iceConn, length, swap); - break; - - case ICE_ProtocolReply: - - replyReady = ProcessProtocolReply (iceConn, length, swap, replyWait); - break; - - case ICE_Ping: - - ProcessPing (iceConn, length); - break; - - case ICE_PingReply: - - ProcessPingReply (iceConn, length); - break; - - case ICE_WantToClose: - - ProcessWantToClose (iceConn, length, connectionClosedRet); - break; - - case ICE_NoClose: - - ProcessNoClose (iceConn, length); - break; - - default: - - _IceErrorBadMinor (iceConn, 0, opcode, IceCanContinue); - _IceReadSkip (iceConn, length << 3); - break; - } - - if (replyWait) - *replyReadyRet = replyReady; -} - - -#ifdef MINIX -int -MNX_IceMessagesAvailable(iceConn) - -IceConn iceConn; -{ - BytesReadable_t bytes; - - _IceTransSetOption(iceConn->trans_conn, TRANS_NONBLOCKING, 1); - if (_IceTransBytesReadable(iceConn->trans_conn, &bytes) < 0) - bytes= -1; - _IceTransSetOption(iceConn->trans_conn, TRANS_NONBLOCKING, 0); - return (bytes != 0); -} -#endif diff --git a/xc/lib/ICE/protosetup.c b/xc/lib/ICE/protosetup.c deleted file mode 100644 index 0b1d86e3f..000000000 --- a/xc/lib/ICE/protosetup.c +++ /dev/null @@ -1,285 +0,0 @@ -/* $TOG: protosetup.c /main/20 1998/02/06 13:57:43 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#include -#include "ICElibint.h" - - -IceProtocolSetupStatus -IceProtocolSetup (iceConn, myOpcode, clientData, mustAuthenticate, - majorVersionRet, minorVersionRet, vendorRet, releaseRet, - errorLength, errorStringRet) - -IceConn iceConn; -int myOpcode; -IcePointer clientData; -Bool mustAuthenticate; -int *majorVersionRet; -int *minorVersionRet; -char **vendorRet; -char **releaseRet; -int errorLength; -char *errorStringRet; - -{ - iceProtocolSetupMsg *pMsg; - char *pData; - _IceProtocol *myProtocol; - int extra; - Bool gotReply, ioErrorOccured; - int accepted, i; - int hisOpcode; - unsigned long setup_sequence; - IceReplyWaitInfo replyWait; - _IceReply reply; - IcePoVersionRec *versionRec; - int authCount; - int *authIndices; - - if (errorStringRet && errorLength > 0) - *errorStringRet = '\0'; - - *majorVersionRet = 0; - *minorVersionRet = 0; - *vendorRet = NULL; - *releaseRet = NULL; - - if (myOpcode < 1 || myOpcode > _IceLastMajorOpcode) - { - strncpy (errorStringRet, "myOpcode out of range", errorLength); - return (IceProtocolSetupFailure); - } - - myProtocol = &_IceProtocols[myOpcode - 1]; - - if (myProtocol->orig_client == NULL) - { - strncpy (errorStringRet, - "IceRegisterForProtocolSetup was not called", errorLength); - return (IceProtocolSetupFailure); - } - - - /* - * Make sure this protocol hasn't been activated already. - */ - - if (iceConn->process_msg_info) - { - for (i = iceConn->his_min_opcode; i <= iceConn->his_max_opcode; i++) - { - if (iceConn->process_msg_info[ - i - iceConn->his_min_opcode].in_use && - iceConn->process_msg_info[ - i - iceConn->his_min_opcode ].my_opcode == myOpcode) - break; - } - - if (i <= iceConn->his_max_opcode) - { - return (IceProtocolAlreadyActive); - } - } - - /* - * Generate the message. - */ - - if (myProtocol->orig_client->auth_count > 0) - { - authIndices = (int *) malloc ( - myProtocol->orig_client->auth_count * sizeof (int)); - - _IceGetPoValidAuthIndices (myProtocol->protocol_name, - iceConn->connection_string, - myProtocol->orig_client->auth_count, - myProtocol->orig_client->auth_names, - &authCount, authIndices); - - } - else - { - authCount = 0; - authIndices = NULL; - } - - extra = STRING_BYTES (myProtocol->protocol_name) + - STRING_BYTES (myProtocol->orig_client->vendor) + - STRING_BYTES (myProtocol->orig_client->release); - - for (i = 0; i < authCount; i++) - { - extra += STRING_BYTES (myProtocol->orig_client->auth_names[ - authIndices[i]]); - } - - extra += (myProtocol->orig_client->version_count * 4); - - IceGetHeaderExtra (iceConn, 0, ICE_ProtocolSetup, - SIZEOF (iceProtocolSetupMsg), WORD64COUNT (extra), - iceProtocolSetupMsg, pMsg, pData); - - setup_sequence = iceConn->send_sequence; - - pMsg->protocolOpcode = myOpcode; - pMsg->versionCount = myProtocol->orig_client->version_count; - pMsg->authCount = authCount; - pMsg->mustAuthenticate = mustAuthenticate; - - STORE_STRING (pData, myProtocol->protocol_name); - STORE_STRING (pData, myProtocol->orig_client->vendor); - STORE_STRING (pData, myProtocol->orig_client->release); - - for (i = 0; i < authCount; i++) - { - STORE_STRING (pData, myProtocol->orig_client->auth_names[ - authIndices[i]]); - } - - for (i = 0; i < myProtocol->orig_client->version_count; i++) - { - STORE_CARD16 (pData, - myProtocol->orig_client->version_recs[i].major_version); - STORE_CARD16 (pData, - myProtocol->orig_client->version_recs[i].minor_version); - } - - IceFlush (iceConn); - - - /* - * Process messages until we get a Protocol Reply. - */ - - replyWait.sequence_of_request = setup_sequence; - replyWait.major_opcode_of_request = 0; - replyWait.minor_opcode_of_request = ICE_ProtocolSetup; - replyWait.reply = (IcePointer) &reply; - - iceConn->protosetup_to_you = (_IceProtoSetupToYouInfo *) malloc ( - sizeof (_IceProtoSetupToYouInfo)); - iceConn->protosetup_to_you->my_opcode = myOpcode; - iceConn->protosetup_to_you->my_auth_count = authCount; - iceConn->protosetup_to_you->auth_active = 0; - iceConn->protosetup_to_you->my_auth_indices = authIndices; - - gotReply = False; - ioErrorOccured = False; - accepted = 0; - - while (!gotReply && !ioErrorOccured) - { - ioErrorOccured = (IceProcessMessages ( - iceConn, &replyWait, &gotReply) == IceProcessMessagesIOError); - - if (ioErrorOccured) - { - strncpy (errorStringRet, - "IO error occured doing Protocol Setup on connection", - errorLength); - return (IceProtocolSetupIOError); - } - else if (gotReply) - { - if (reply.type == ICE_PROTOCOL_REPLY) - { - if (reply.protocol_reply.version_index >= - myProtocol->orig_client->version_count) - { - strncpy (errorStringRet, - "Got a bad version index in the Protocol Reply", - errorLength); - - free (reply.protocol_reply.vendor); - free (reply.protocol_reply.release); - } - else - { - versionRec = &(myProtocol->orig_client->version_recs[ - reply.protocol_reply.version_index]); - - accepted = 1; - } - } - else /* reply.type == ICE_PROTOCOL_ERROR */ - { - /* Protocol Setup failed */ - - strncpy (errorStringRet, reply.protocol_error.error_message, - errorLength); - - free (reply.protocol_error.error_message); - } - - if (iceConn->protosetup_to_you->my_auth_indices) - free ((char *) iceConn->protosetup_to_you->my_auth_indices); - free ((char *) iceConn->protosetup_to_you); - iceConn->protosetup_to_you = NULL; - } - } - - if (accepted) - { - _IceProcessMsgInfo *process_msg_info; - - *majorVersionRet = versionRec->major_version; - *minorVersionRet = versionRec->minor_version; - *vendorRet = reply.protocol_reply.vendor; - *releaseRet = reply.protocol_reply.release; - - - /* - * Increase the reference count for the number of active protocols. - */ - - iceConn->proto_ref_count++; - - - /* - * We may be using a different major opcode for this protocol - * than the other client. Whenever we get a message, we must - * map to our own major opcode. - */ - - hisOpcode = reply.protocol_reply.major_opcode; - - _IceAddOpcodeMapping (iceConn, hisOpcode, myOpcode); - - process_msg_info = &iceConn->process_msg_info[hisOpcode - - iceConn->his_min_opcode]; - - process_msg_info->client_data = clientData; - process_msg_info->accept_flag = 0; - - process_msg_info->process_msg_proc.orig_client = - versionRec->process_msg_proc; - - return (IceProtocolSetupSuccess); - } - else - { - return (IceProtocolSetupFailure); - } -} diff --git a/xc/lib/ICE/register.c b/xc/lib/ICE/register.c deleted file mode 100644 index cd392d1b1..000000000 --- a/xc/lib/ICE/register.c +++ /dev/null @@ -1,249 +0,0 @@ -/* $TOG: register.c /main/14 1998/02/06 13:57:48 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#include -#include "ICElibint.h" - -int -IceRegisterForProtocolSetup (protocolName, vendor, release, - versionCount, versionRecs, authCount, authNames, authProcs, IOErrorProc) - -char *protocolName; -char *vendor; -char *release; -int versionCount; -IcePoVersionRec *versionRecs; -int authCount; -char **authNames; -IcePoAuthProc *authProcs; -IceIOErrorProc IOErrorProc; - -{ - _IcePoProtocol *p; - int opcodeRet, i; - - for (i = 1; i <= _IceLastMajorOpcode; i++) - if (strcmp (protocolName, _IceProtocols[i - 1].protocol_name) == 0) - { - if (_IceProtocols[i - 1].orig_client != NULL) - { - /* - * We've already registered this protocol. - */ - - return (i); - } - else - { - break; - } - } - - if (i <= _IceLastMajorOpcode) - { - p = _IceProtocols[i - 1].orig_client = - (_IcePoProtocol *) malloc (sizeof (_IcePoProtocol)); - opcodeRet = i; - } - else if (_IceLastMajorOpcode == 255 || - versionCount < 1 || - strlen (protocolName) == 0) - { - return (-1); - } - else - { - char *name; - - _IceProtocols[_IceLastMajorOpcode].protocol_name = name = - (char *) malloc (strlen (protocolName) + 1); - strcpy (name, protocolName); - - p = _IceProtocols[_IceLastMajorOpcode].orig_client = - (_IcePoProtocol *) malloc (sizeof (_IcePoProtocol)); - - _IceProtocols[_IceLastMajorOpcode].accept_client = NULL; - - opcodeRet = ++_IceLastMajorOpcode; - } - - p->vendor = (char *) malloc (strlen (vendor) + 1); - strcpy (p->vendor, vendor); - - p->release = (char *) malloc (strlen (release) + 1); - strcpy (p->release, release); - - p->version_count = versionCount; - - p->version_recs = (IcePoVersionRec *) malloc ( - versionCount * sizeof (IcePoVersionRec)); - memcpy (p->version_recs, versionRecs, - versionCount * sizeof (IcePoVersionRec)); - - if ((p->auth_count = authCount) > 0) - { - p->auth_names = (char **) malloc ( - authCount * sizeof (char *)); - - p->auth_procs = (IcePoAuthProc *) malloc ( - authCount * sizeof (IcePoAuthProc)); - - for (i = 0; i < authCount; i++) - { - p->auth_names[i] = - (char *) malloc (strlen (authNames[i]) + 1); - strcpy (p->auth_names[i], authNames[i]); - - p->auth_procs[i] = authProcs[i]; - } - } - else - { - p->auth_names = NULL; - p->auth_procs = NULL; - } - - p->io_error_proc = IOErrorProc; - - return (opcodeRet); -} - - - -int -IceRegisterForProtocolReply (protocolName, vendor, release, - versionCount, versionRecs, authCount, authNames, authProcs, - hostBasedAuthProc, protocolSetupProc, protocolActivateProc, - IOErrorProc) - -char *protocolName; -char *vendor; -char *release; -int versionCount; -IcePaVersionRec *versionRecs; -int authCount; -char **authNames; -IcePaAuthProc *authProcs; -IceHostBasedAuthProc hostBasedAuthProc; -IceProtocolSetupProc protocolSetupProc; -IceProtocolActivateProc protocolActivateProc; -IceIOErrorProc IOErrorProc; - -{ - _IcePaProtocol *p; - int opcodeRet, i; - - for (i = 1; i <= _IceLastMajorOpcode; i++) - if (strcmp (protocolName, _IceProtocols[i - 1].protocol_name) == 0) - { - if (_IceProtocols[i - 1].accept_client != NULL) - { - /* - * We've already registered this protocol. - */ - - return (i); - } - else - { - break; - } - } - - - if (i <= _IceLastMajorOpcode) - { - p = _IceProtocols[i - 1].accept_client = - (_IcePaProtocol *) malloc (sizeof (_IcePaProtocol)); - opcodeRet = i; - } - else if (_IceLastMajorOpcode == 255 || - versionCount < 1 || - strlen (protocolName) == 0) - { - return (-1); - } - else - { - char *name; - - _IceProtocols[_IceLastMajorOpcode].protocol_name = name = - (char *) malloc (strlen (protocolName) + 1); - strcpy (name, protocolName); - - _IceProtocols[_IceLastMajorOpcode].orig_client = NULL; - - p = _IceProtocols[_IceLastMajorOpcode].accept_client = - (_IcePaProtocol *) malloc (sizeof (_IcePaProtocol)); - - opcodeRet = ++_IceLastMajorOpcode; - } - - p->vendor = (char *) malloc (strlen (vendor) + 1); - strcpy (p->vendor, vendor); - - p->release = (char *) malloc (strlen (release) + 1); - strcpy (p->release, release); - - p->version_count = versionCount; - - p->version_recs = (IcePaVersionRec *) malloc ( - versionCount * sizeof (IcePaVersionRec)); - memcpy (p->version_recs, versionRecs, - versionCount * sizeof (IcePaVersionRec)); - - p->protocol_setup_proc = protocolSetupProc; - p->protocol_activate_proc = protocolActivateProc; - - if ((p->auth_count = authCount) > 0) - { - p->auth_names = (char **) malloc ( - authCount * sizeof (char *)); - - p->auth_procs = (IcePaAuthProc *) malloc ( - authCount * sizeof (IcePaAuthProc)); - - for (i = 0; i < authCount; i++) - { - p->auth_names[i] = - (char *) malloc (strlen (authNames[i]) + 1); - strcpy (p->auth_names[i], authNames[i]); - - p->auth_procs[i] = authProcs[i]; - } - } - else - { - p->auth_names = NULL; - p->auth_procs = NULL; - } - - p->host_based_auth_proc = hostBasedAuthProc; - - p->io_error_proc = IOErrorProc; - - return (opcodeRet); -} - diff --git a/xc/lib/ICE/replywait.c b/xc/lib/ICE/replywait.c deleted file mode 100644 index 305eb905d..000000000 --- a/xc/lib/ICE/replywait.c +++ /dev/null @@ -1,154 +0,0 @@ -/* $TOG: replywait.c /main/5 1998/02/06 13:57:54 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#include -#include "ICElibint.h" - - -void -_IceAddReplyWait (iceConn, replyWait) - -IceConn iceConn; -IceReplyWaitInfo *replyWait; - -{ - /* - * Add this replyWait to the end of the list (only if the - * replyWait is not already in the list). - */ - - _IceSavedReplyWait *savedReplyWait; - _IceSavedReplyWait *prev, *last; - - prev = NULL; - last = iceConn->saved_reply_waits; - - while (last) - { - if (last->reply_wait == replyWait) - return; - - prev = last; - last = last->next; - } - - savedReplyWait = (_IceSavedReplyWait *) malloc ( - sizeof (_IceSavedReplyWait)); - - savedReplyWait->reply_wait = replyWait; - savedReplyWait->reply_ready = False; - savedReplyWait->next = NULL; - - if (prev == NULL) - iceConn->saved_reply_waits = savedReplyWait; - else - prev->next = savedReplyWait; -} - - - -IceReplyWaitInfo * -_IceSearchReplyWaits (iceConn, majorOpcode) - -IceConn iceConn; -int majorOpcode; - -{ - /* - * Return the first replyWait in the list with the given majorOpcode - */ - - _IceSavedReplyWait *savedReplyWait = iceConn->saved_reply_waits; - - while (savedReplyWait && !savedReplyWait->reply_ready && - savedReplyWait->reply_wait->major_opcode_of_request != majorOpcode) - { - savedReplyWait = savedReplyWait->next; - } - - return (savedReplyWait ? savedReplyWait->reply_wait : NULL); -} - - - -void -_IceSetReplyReady (iceConn, replyWait) - -IceConn iceConn; -IceReplyWaitInfo *replyWait; - -{ - /* - * The replyWait specified has a reply ready. - */ - - _IceSavedReplyWait *savedReplyWait = iceConn->saved_reply_waits; - - while (savedReplyWait && savedReplyWait->reply_wait != replyWait) - savedReplyWait = savedReplyWait->next; - - if (savedReplyWait) - savedReplyWait->reply_ready = True; -} - - - -Bool -_IceCheckReplyReady (iceConn, replyWait) - -IceConn iceConn; -IceReplyWaitInfo *replyWait; - -{ - _IceSavedReplyWait *savedReplyWait = iceConn->saved_reply_waits; - _IceSavedReplyWait *prev = NULL; - Bool found = False; - Bool ready; - - while (savedReplyWait && !found) - { - if (savedReplyWait->reply_wait == replyWait) - found = True; - else - { - prev = savedReplyWait; - savedReplyWait = savedReplyWait->next; - } - } - - ready = found && savedReplyWait->reply_ready; - - if (ready) - { - if (prev == NULL) - iceConn->saved_reply_waits = savedReplyWait->next; - else - prev->next = savedReplyWait->next; - - free ((char *) savedReplyWait); - } - - return (ready); -} diff --git a/xc/lib/ICE/setauth.c b/xc/lib/ICE/setauth.c deleted file mode 100644 index 5b9569f8b..000000000 --- a/xc/lib/ICE/setauth.c +++ /dev/null @@ -1,114 +0,0 @@ -/* $TOG: setauth.c /main/9 1998/02/06 13:57:59 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ -/* $XFree86: xc/lib/ICE/setauth.c,v 1.2 1998/12/20 11:56:50 dawes Exp $ */ - -#include -#include "ICElibint.h" -#include - - -/* - * IceSetPaAuthData is not a standard part of ICElib, it is specific - * to the sample implementation. - * - * For the client that initiates a Protocol Setup, we look in the - * .ICEauthority file to get authentication data. - * - * For the client accepting the Protocol Setup, we get the data - * from an in-memory database of authentication data (set by the - * application calling IceSetPaAuthData). We have to get the data - * from memory because getting it directly from the .ICEauthority - * file is not secure - someone can just modify the contents of the - * .ICEauthority file behind our back. - */ - -int _IcePaAuthDataEntryCount = 0; -#ifndef __EMX__ -IceAuthDataEntry _IcePaAuthDataEntries[ICE_MAX_AUTH_DATA_ENTRIES]; -#else -IceAuthDataEntry _IcePaAuthDataEntries[ICE_MAX_AUTH_DATA_ENTRIES] = {0}; -#endif - - -void -IceSetPaAuthData (numEntries, entries) - -int numEntries; -IceAuthDataEntry *entries; - -{ - /* - * _IcePaAuthDataEntries should really be a linked list. - * On my list of TO DO stuff. - */ - - int i, j; - - for (i = 0; i < numEntries; i++) - { - for (j = 0; j < _IcePaAuthDataEntryCount; j++) - if (strcmp (entries[i].protocol_name, - _IcePaAuthDataEntries[j].protocol_name) == 0 && - strcmp (entries[i].network_id, - _IcePaAuthDataEntries[j].network_id) == 0 && - strcmp (entries[i].auth_name, - _IcePaAuthDataEntries[j].auth_name) == 0) - break; - - if (j < _IcePaAuthDataEntryCount) - { - free (_IcePaAuthDataEntries[j].protocol_name); - free (_IcePaAuthDataEntries[j].network_id); - free (_IcePaAuthDataEntries[j].auth_name); - free (_IcePaAuthDataEntries[j].auth_data); - } - else - { - _IcePaAuthDataEntryCount++; - } - - _IcePaAuthDataEntries[j].protocol_name = (char *) malloc ( - strlen (entries[i].protocol_name) + 1); - strcpy (_IcePaAuthDataEntries[j].protocol_name, - entries[i].protocol_name); - - _IcePaAuthDataEntries[j].network_id = (char *) malloc ( - strlen (entries[i].network_id) + 1); - strcpy (_IcePaAuthDataEntries[j].network_id, - entries[i].network_id); - - _IcePaAuthDataEntries[j].auth_name = (char *) malloc ( - strlen (entries[i].auth_name) + 1); - strcpy (_IcePaAuthDataEntries[j].auth_name, - entries[i].auth_name); - - _IcePaAuthDataEntries[j].auth_data_length = - entries[i].auth_data_length; - _IcePaAuthDataEntries[j].auth_data = (char *) malloc ( - entries[i].auth_data_length); - memcpy (_IcePaAuthDataEntries[j].auth_data, - entries[i].auth_data, entries[i].auth_data_length); - } -} diff --git a/xc/lib/ICE/shutdown.c b/xc/lib/ICE/shutdown.c deleted file mode 100644 index 20768722a..000000000 --- a/xc/lib/ICE/shutdown.c +++ /dev/null @@ -1,321 +0,0 @@ -/* $TOG: shutdown.c /main/18 1998/02/06 13:58:05 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#include -#include "ICElibint.h" - - -Status -IceProtocolShutdown (iceConn, majorOpcode) - -IceConn iceConn; -int majorOpcode; - -{ - if (iceConn->proto_ref_count == 0 || iceConn->process_msg_info == NULL || - majorOpcode < 1 || majorOpcode > _IceLastMajorOpcode) - { - return (0); - } - else - { - /* - * Make sure this majorOpcode is really being used. - */ - - int i; - - for (i = iceConn->his_min_opcode; i <= iceConn->his_max_opcode; i++) - { - if (iceConn->process_msg_info[ - i - iceConn->his_min_opcode].in_use && - iceConn->process_msg_info[ - i - iceConn->his_min_opcode].my_opcode == majorOpcode) - break; - } - - if (i > iceConn->his_max_opcode) - { - return (0); - } - else - { - /* - * OK, we can shut down the protocol. - */ - - iceConn->process_msg_info[ - i - iceConn->his_min_opcode].in_use = False; - iceConn->proto_ref_count--; - - return (1); - } - } -} - - - -void -IceSetShutdownNegotiation (iceConn, negotiate) - -IceConn iceConn; -Bool negotiate; - -{ - iceConn->skip_want_to_close = negotiate ? False : True; -} - - - -Bool -IceCheckShutdownNegotiation (iceConn) - -IceConn iceConn; - -{ - return (iceConn->skip_want_to_close ? False : True); -} - - - -IceCloseStatus -IceCloseConnection (iceConn) - -IceConn iceConn; - -{ - int refCountReachedZero; - IceCloseStatus status; - - /* - * If this connection object was never valid, we can close - * it right now. This happens if IceAcceptConnection was - * called, but after calling IceProcessMessages several times - * the connection was rejected (because of authentication or - * some other reason). - */ - - if (iceConn->listen_obj && - iceConn->connection_status != IceConnectAccepted) - { - _IceConnectionClosed (iceConn); /* invoke watch procs */ - _IceFreeConnection (iceConn); - return (IceClosedNow); - } - - - /*--------------------------------------------------------------- - - ACTIONS: - - A = Invoke Watch Procedures - B = Set free-asap bit - C = Free connection - D = Initialize shutdown negotiation - N = do nothing - - - ACTION TABLE: - - IO free- dispatch protocol shutdown - error asap bit level refcount negotiation ACTION - occured set reached 0 reached 0 - - 0 0 0 0 0 N - 0 0 0 0 1 N - 0 0 0 1 0 AB - 0 0 0 1 1 N - 0 0 1 0 0 N - 0 0 1 0 1 N - 0 0 1 1 0 AC - 0 0 1 1 1 D - 0 1 0 0 0 N - 0 1 0 0 1 N - 0 1 0 1 0 N - 0 1 0 1 1 N - 0 1 1 0 0 C - 0 1 1 0 1 D - 0 1 1 1 0 C - 0 1 1 1 1 D - 1 0 0 0 0 AB - 1 0 0 0 1 AB - 1 0 0 1 0 AB - 1 0 0 1 1 AB - 1 0 1 0 0 AC - 1 0 1 0 1 AC - 1 0 1 1 0 AC - 1 0 1 1 1 AC - 1 1 0 0 0 N - 1 1 0 0 1 N - 1 1 0 1 0 N - 1 1 0 1 1 N - 1 1 1 0 0 C - 1 1 1 0 1 C - 1 1 1 1 0 C - 1 1 1 1 1 C - - ---------------------------------------------------------------*/ - - if (iceConn->open_ref_count > 0) - iceConn->open_ref_count--; - - refCountReachedZero = iceConn->open_ref_count == 0 && - iceConn->proto_ref_count == 0; - - status = IceConnectionInUse; - - if (!iceConn->free_asap && (!iceConn->io_ok || - (iceConn->io_ok && refCountReachedZero && - iceConn->skip_want_to_close))) - { - /* - * Invoke the watch procedures now. - */ - - _IceConnectionClosed (iceConn); - status = IceClosedNow; /* may be overwritten by IceClosedASAP */ - } - - if (!iceConn->free_asap && iceConn->dispatch_level != 0 && - (!iceConn->io_ok || - (iceConn->io_ok && refCountReachedZero && - iceConn->skip_want_to_close))) - { - /* - * Set flag so we free the connection as soon as possible. - */ - - iceConn->free_asap = True; - status = IceClosedASAP; - } - - if (iceConn->io_ok && iceConn->dispatch_level == 0 && - !iceConn->skip_want_to_close && refCountReachedZero) - { - /* - * Initiate shutdown negotiation. - */ - - IceSimpleMessage (iceConn, 0, ICE_WantToClose); - IceFlush (iceConn); - - iceConn->want_to_close = 1; - - status = IceStartedShutdownNegotiation; - } - else if (iceConn->dispatch_level == 0 && - (!iceConn->io_ok || (iceConn->io_ok && iceConn->skip_want_to_close && - (iceConn->free_asap || (!iceConn->free_asap && refCountReachedZero))))) - { - /* - * Free the connection. - */ - - _IceFreeConnection (iceConn); - - status = IceClosedNow; - } - - return (status); -} - - - -void -_IceFreeConnection (iceConn) - -IceConn iceConn; - -{ - if (iceConn->listen_obj == NULL) - { - /* - * This iceConn was created with IceOpenConnection. - * We keep track of all open IceConn's, so we need - * to remove it from the list. - */ - - int i; - - for (i = 0; i < _IceConnectionCount; i++) - if (_IceConnectionObjs[i] == iceConn) - break; - - if (i < _IceConnectionCount) - { - if (i < _IceConnectionCount - 1) - { - _IceConnectionObjs[i] = - _IceConnectionObjs[_IceConnectionCount - 1]; - _IceConnectionStrings[i] = - _IceConnectionStrings[_IceConnectionCount - 1]; - } - - _IceConnectionCount--; - } - } - - if (iceConn->trans_conn) - _IceTransClose (iceConn->trans_conn); - - if (iceConn->connection_string) - free (iceConn->connection_string); - - if (iceConn->vendor) - free (iceConn->vendor); - - if (iceConn->release) - free (iceConn->release); - - if (iceConn->inbuf) - free (iceConn->inbuf); - - if (iceConn->outbuf) - free (iceConn->outbuf); - - if (iceConn->scratch) - free (iceConn->scratch); - - if (iceConn->process_msg_info) - free ((char *) iceConn->process_msg_info); - - if (iceConn->connect_to_you) - free ((char *) iceConn->connect_to_you); - - if (iceConn->protosetup_to_you) - free ((char *) iceConn->protosetup_to_you); - - if (iceConn->connect_to_me) - free ((char *) iceConn->connect_to_me); - - if (iceConn->protosetup_to_me) - free ((char *) iceConn->protosetup_to_me); - - free ((char *) iceConn); -} - - - - diff --git a/xc/lib/ICE/watch.c b/xc/lib/ICE/watch.c deleted file mode 100644 index f5f3d52e7..000000000 --- a/xc/lib/ICE/watch.c +++ /dev/null @@ -1,199 +0,0 @@ -/* $TOG: watch.c /main/7 1998/02/06 13:58:11 kaleb $ */ -/****************************************************************************** - - -Copyright 1993, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#include -#include "ICElibint.h" - - -Status -IceAddConnectionWatch (watchProc, clientData) - -IceWatchProc watchProc; -IcePointer clientData; - -{ - /* - * watchProc will be called each time an ICE connection is - * created/destroyed by ICElib. - */ - - _IceWatchProc *ptr = _IceWatchProcs; - _IceWatchProc *newWatchProc; - int i; - - if ((newWatchProc = (_IceWatchProc *) malloc ( - sizeof (_IceWatchProc))) == NULL) - { - return (0); - } - - newWatchProc->watch_proc = watchProc; - newWatchProc->client_data = clientData; - newWatchProc->watched_connections = NULL; - newWatchProc->next = NULL; - - while (ptr && ptr->next) - ptr = ptr->next; - - if (ptr == NULL) - _IceWatchProcs = newWatchProc; - else - ptr->next = newWatchProc; - - - /* - * Invoke the watch proc with any previously opened ICE connections. - */ - - for (i = 0; i < _IceConnectionCount; i++) - { - _IceWatchedConnection *newWatchedConn = (_IceWatchedConnection *) - malloc (sizeof (_IceWatchedConnection)); - - newWatchedConn->iceConn = _IceConnectionObjs[i]; - newWatchedConn->next = NULL; - - newWatchProc->watched_connections = newWatchedConn; - - (*newWatchProc->watch_proc) (_IceConnectionObjs[i], - newWatchProc->client_data, True, &newWatchedConn->watch_data); - } - - return (1); -} - - - -void -IceRemoveConnectionWatch (watchProc, clientData) - -IceWatchProc watchProc; -IcePointer clientData; - -{ - _IceWatchProc *currWatchProc = _IceWatchProcs; - _IceWatchProc *prevWatchProc = NULL; - - while (currWatchProc && (currWatchProc->watch_proc != watchProc || - currWatchProc->client_data != clientData)) - { - prevWatchProc = currWatchProc; - currWatchProc = currWatchProc->next; - } - - if (currWatchProc) - { - _IceWatchProc *nextWatchProc = currWatchProc->next; - _IceWatchedConnection *watchedConn; - - watchedConn = currWatchProc->watched_connections; - while (watchedConn) - { - _IceWatchedConnection *nextWatchedConn = watchedConn->next; - free ((char *) watchedConn); - watchedConn = nextWatchedConn; - } - - if (prevWatchProc == NULL) - _IceWatchProcs = nextWatchProc; - else - prevWatchProc->next = nextWatchProc; - - free ((char *) currWatchProc); - } -} - - - -void -_IceConnectionOpened (iceConn) - -IceConn iceConn; - -{ - _IceWatchProc *watchProc = _IceWatchProcs; - - while (watchProc) - { - _IceWatchedConnection *newWatchedConn = (_IceWatchedConnection *) - malloc (sizeof (_IceWatchedConnection)); - _IceWatchedConnection *watchedConn; - - watchedConn = watchProc->watched_connections; - while (watchedConn && watchedConn->next) - watchedConn = watchedConn->next; - - newWatchedConn->iceConn = iceConn; - newWatchedConn->next = NULL; - - if (watchedConn == NULL) - watchProc->watched_connections = newWatchedConn; - else - watchedConn->next = newWatchedConn; - - (*watchProc->watch_proc) (iceConn, - watchProc->client_data, True, &newWatchedConn->watch_data); - - watchProc = watchProc->next; - } -} - - - -void -_IceConnectionClosed (iceConn) - -IceConn iceConn; - -{ - _IceWatchProc *watchProc = _IceWatchProcs; - - while (watchProc) - { - _IceWatchedConnection *watchedConn = watchProc->watched_connections; - _IceWatchedConnection *prev = NULL; - - while (watchedConn && watchedConn->iceConn != iceConn) - { - prev = watchedConn; - watchedConn = watchedConn->next; - } - - if (watchedConn) - { - (*watchProc->watch_proc) (iceConn, - watchProc->client_data, False, &watchedConn->watch_data); - - if (prev == NULL) - watchProc->watched_connections = watchedConn->next; - else - prev->next = watchedConn->next; - - free ((char *) watchedConn); - } - - watchProc = watchProc->next; - } -} diff --git a/xc/lib/Imakefile b/xc/lib/Imakefile index 4d600393a..62abe10b9 100644 --- a/xc/lib/Imakefile +++ b/xc/lib/Imakefile @@ -20,7 +20,7 @@ XAW6LIBDIR = Xaw6 BERKDIR = Xbsd #endif -#if BuildXKBlib +#if BuildXKBfilelib || BuildXKB XKBLIBDIR = xkbfile #endif diff --git a/xc/lib/PEX5/Imakefile b/xc/lib/PEX5/Imakefile deleted file mode 100644 index cf5f7967a..000000000 --- a/xc/lib/PEX5/Imakefile +++ /dev/null @@ -1,87 +0,0 @@ -XCOMM $XConsortium: Imakefile /main/18 1996/09/28 16:33:26 rws $ -XCOMM $XFree86: xc/lib/PEX5/Imakefile,v 1.3 1998/12/20 11:56:51 dawes Exp $ - -#define DoNormalLib NormalLibPex -#define DoSharedLib SharedLibPex -#define DoExtraLib SharedLibPex -#define DoDebugLib DebugLibPex -#define DoProfileLib ProfileLibPex -#define LibName PEX5 -#define SoRev SOPEXREV -#define IncSubdir X11 -#define IncSubSubdir PEX5 - -#include - -#ifdef SharedPexReqs -REQUIREDLIBS = SharedPexReqs -#endif - -#ifdef PexNativeFPFormat -NATIVE_FP_FORMAT = PexNativeFPFormat -FP_DEFINES = -DNATIVE_FP_FORMAT=$(NATIVE_FP_FORMAT) -#endif - -#if Malloc0ReturnsNull -ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL -#endif - -DEFINES = $(FP_DEFINES) $(ALLOC_DEFINES) - -HEADERS = PEXlib.h \ - PEXlibint.h \ - PEX.h \ - PEXproto.h \ - PEXprotost.h - -SRCS = pl_convert.c \ - pl_escape.c \ - pl_font.c \ - pl_free.c \ - pl_lut.c \ - pl_nameset.c \ - pl_oc_attr.c \ - pl_oc_dec.c \ - pl_oc_enc.c \ - pl_oc_prim.c \ - pl_oc_str.c \ - pl_oc_util.c \ - pl_pc.c \ - pl_pick.c \ - pl_rdr.c \ - pl_sc.c \ - pl_startup.c \ - pl_struct.c \ - pl_util.c \ - pl_wks.c - -OBJS = pl_convert.o \ - pl_escape.o \ - pl_font.o \ - pl_free.o \ - pl_lut.o \ - pl_nameset.o \ - pl_oc_attr.o \ - pl_oc_dec.o \ - pl_oc_enc.o \ - pl_oc_prim.o \ - pl_oc_str.o \ - pl_oc_util.o \ - pl_pc.o \ - pl_pick.o \ - pl_rdr.o \ - pl_sc.o \ - pl_startup.o \ - pl_struct.o \ - pl_util.o \ - pl_wks.o - - -#include - -/* Work around a problem with SunPro C 4.2 (ix86) */ -#ifdef HasSunC -SpecialCLibObjectRule(pl_util,,-g) -#endif - -DependTarget() diff --git a/xc/lib/PEX5/PEX.h b/xc/lib/PEX5/PEX.h deleted file mode 100644 index 1f98e3c44..000000000 --- a/xc/lib/PEX5/PEX.h +++ /dev/null @@ -1,1222 +0,0 @@ -#ifndef _PEX_H_ -#define _PEX_H_ - -/* $XConsortium: PEX.h,v 1.8 94/03/18 10:37:25 mor Exp $ */ - -/******************************************************************************/ -/* Copyright 1987,1991 by Digital Equipment Corporation, Maynard, Mass. */ -/* */ -/* (c) Copyright Hewlett-Packard Company, 1992, Fort Collins, Colorado */ -/* */ -/* All Rights Reserved */ -/* */ -/* Permission to use, copy, modify, and distribute this software and its */ -/* documentation for any purpose and without fee is hereby granted, */ -/* provided that the above copyright notices appear in all copies and that */ -/* both the copyright notices and this permission notice appear in */ -/* supporting documentation, and that the names of Digital or */ -/* Hewlett-Packard not be used in advertising or publicity pertaining to */ -/* distribution of the software without specific, written prior permission. */ -/* */ -/* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */ -/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL */ -/* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR */ -/* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, */ -/* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */ -/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS */ -/* SOFTWARE. */ -/* */ -/* HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS */ -/* SOFTWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard */ -/* shall not be liable for errors contained herein or direct, indirect, */ -/* special, incidental or consequential damages in connection with the */ -/* furnishing, performance or use of this software. */ -/* */ -/******************************************************************************/ - -/* - * PEX extension name - */ -#define PEX_NAME_STRING "X3D-PEX" - -/* - * PEX protocol major and minor numbers - */ -#define PEX_PROTO_MAJOR 5 /* 5.1 protocol */ -#define PEX_PROTO_MINOR 1 /* 5.1 protocol */ - -/* - * PEX standard subsets - */ -#define PEXCompleteImplementation 0 -#define PEXImmediateMode (1L<<0) -#define PEXWorkstationOnly (1L<<1) -#define PEXStructureMode (1L<<2) - -/* - * enumerated type information - */ -#define PEXETCounts 0 -#define PEXETIndex (1L<<0) -#define PEXETMnemonic (1L<<1) -#define PEXETAll (PEXETIndex | PEXETMnemonic) - -/* enumerated types */ -#define PEXETMarkerType 1 -#define PEXETATextStyle 2 -#define PEXETInteriorStyle 3 -#define PEXETHatchStyle 4 -#define PEXETLineType 5 -#define PEXETSurfaceEdgeType 6 -#define PEXETPickDeviceType 7 -#define PEXETPolylineInterpMethod 8 -#define PEXETCurveApproxMethod 9 -#define PEXETReflectionModel 10 -#define PEXETSurfaceInterpMethod 11 -#define PEXETSurfaceApproxMethod 12 -#define PEXETModelClipOperator 13 -#define PEXETLightType 14 -#define PEXETColorType 15 -#define PEXETFloatFormat 16 -#define PEXETHLHSRMode 17 -#define PEXETPromptEchoType 18 -#define PEXETDisplayUpdateMode 19 -#define PEXETColorApproxType 20 -#define PEXETColorApproxModel 21 -#define PEXETGDP2D 22 -#define PEXETGDP 23 -#define PEXETGSE 24 -#define PEXETTrimCurveApproxMethod 25 -#define PEXETRenderingColorModel 26 -#define PEXETParaSurfCharacteristics 27 -#define PEXETEscape 28 -#define PEXETPickOneMethod 29 -#define PEXETPickAllMethod 30 - -/* enumerated type values */ - -/* marker types */ -#define PEXMarkerDot 1 -#define PEXMarkerCross 2 -#define PEXMarkerAsterisk 3 -#define PEXMarkerCircle 4 -#define PEXMarkerX 5 - -/* marker type mnemonics */ -#define PEXETMMarkerDot "Dot" -#define PEXETMMarkerCross "Cross" -#define PEXETMMarkerAsterisk "Asterisk" -#define PEXETMMarkerCircle "Circle" -#define PEXETMMarkerX "X" - -/* annotation text styles */ -#define PEXATextNotConnected 1 -#define PEXATextConnected 2 - -/* annotation text style mnemonics */ -#define PEXETMATextNotConnected "NotConnected" -#define PEXETMATextConnected "Connected" - -/* interior styles */ -#define PEXInteriorStyleHollow 1 -#define PEXInteriorStyleSolid 2 -#define PEXInteriorStylePattern 3 -#define PEXInteriorStyleHatch 4 -#define PEXInteriorStyleEmpty 5 - -/* interior style mnemonics */ -#define PEXETMInteriorStyleHollow "Hollow" -#define PEXETMInteriorStyleSolid "Solid" -#define PEXETMInteriorStylePattern "Pattern" -#define PEXETMInteriorStyleHatch "Hatch" -#define PEXETMInteriorStyleEmpty "Empty" - -/* hatch style */ - -/* line types */ -#define PEXLineTypeSolid 1 -#define PEXLineTypeDashed 2 -#define PEXLineTypeDotted 3 -#define PEXLineTypeDashDot 4 - -/* line type mnemonics */ -#define PEXETMLineTypeSolid "Solid" -#define PEXETMLineTypeDashed "Dashed" -#define PEXETMLineTypeDotted "Dotted" -#define PEXETMLineTypeDashDot "DashDot" - -/* surface edge types */ -#define PEXSurfaceEdgeSolid 1 -#define PEXSurfaceEdgeDashed 2 -#define PEXSurfaceEdgeDotted 3 -#define PEXSurfaceEdgeDashDot 4 - -/* surface edge type mnemonics */ -#define PEXETMSurfaceEdgeSolid "Solid" -#define PEXETMSurfaceEdgeDashed "Dashed" -#define PEXETMSurfaceEdgeDotted "Dotted" -#define PEXETMSurfaceEdgeDashDot "DashDot" - -/* pick device types */ -#define PEXPickDeviceDCHitBox 1 -#define PEXPickDeviceNPCHitVolume 2 - -/* pick device type mnemonics */ -#define PEXETMPickDeviceDCHitBox "DC_HitBox" -#define PEXETMPickDeviceNPCHitVolume "NPC_HitVolume" - -/* polyline interpolation methods */ -#define PEXPolylineInterpNone 1 -#define PEXPolylineInterpColor 2 - -/* polyline interpolation method mnemonics */ -#define PEXETMPolylineInterpNone "None" -#define PEXETMPolylineInterpColor "Color" - -/* curve, surface and trim curve approximation methods */ -#define PEXApproxImpDep 1 -#define PEXApproxConstantBetweenKnots 2 -#define PEXApproxWCChordalSize 3 -#define PEXApproxNPCChordalSize 4 -#define PEXApproxDCChordalSize 5 -#define PEXCurveApproxWCChordalDev 6 -#define PEXCurveApproxNPCChordalDev 7 -#define PEXCurveApproxDCChordalDev 8 -#define PEXSurfaceApproxWCPlanarDev 6 -#define PEXSurfaceApproxNPCPlanarDev 7 -#define PEXSurfaceApproxDCPlanarDev 8 -#define PEXApproxWCRelative 9 -#define PEXApproxNPCRelative 10 -#define PEXApproxDCRelative 11 - -/* curve, surface and trim curve approximation method mnemonics */ - /* PEXApproxImpDep is an implementation-dependent string */ -#define PEXETMApproxConstantBetweenKnots "ConstantBetweenKnots" -#define PEXETMApproxWCChordalSize "WCS_ChordalSize" -#define PEXETMApproxNPCChordalSize "NPC_ChordalSize" -#define PEXETMApproxDCChordalSize "DC_ChordalSize" -#define PEXETMCurveApproxWCChordalDev "WCS_ChordalDev" -#define PEXETMCurveApproxNPCChordalDev "NPC_ChordalDev" -#define PEXETMCurveApproxDCChordalDev "DC_ChordalDev" -#define PEXETMSurfaceApproxWCPlanarDev "WCS_PlanarDev" -#define PEXETMSurfaceApproxNPCPlanarDev "NPC_PlanarDev" -#define PEXETMSurfaceApproxDCPlanarDev "DC_PlanarDev" -#define PEXETMApproxWCRelative "WCS_Relative" -#define PEXETMApproxNPCRelative "NPC_Relative" -#define PEXETMApproxDCRelative "DC_Relative" - -/* reflection models */ -#define PEXReflectionNone 1 -#define PEXReflectionAmbient 2 -#define PEXReflectionDiffuse 3 -#define PEXReflectionSpecular 4 - -/* reflection model mnemonics */ -#define PEXETMReflectionNone "NoShading" -#define PEXETMReflectionAmbient "Ambient" -#define PEXETMReflectionDiffuse "Diffuse" -#define PEXETMReflectionSpecular "Specular" - -/* surface interpolation methods */ -#define PEXSurfaceInterpNone 1 -#define PEXSurfaceInterpColor 2 -#define PEXSurfaceInterpDotProduct 3 -#define PEXSurfaceInterpNormal 4 - -/* surface interpolation method mnemonics */ -#define PEXETMSurfaceInterpNone "None" -#define PEXETMSurfaceInterpColor "Color" -#define PEXETMSurfaceInterpDotProduct "DotProduct" -#define PEXETMSurfaceInterpNormal "Normal" - -/* model clip operators */ -#define PEXModelClipReplace 1 -#define PEXModelClipIntersection 2 - -/* model clip operator mnemonics */ -#define PEXETMModelClipReplace "Replace" -#define PEXETMModelClipIntersection "Intersection" - -/* light types */ -#define PEXLightAmbient 1 -#define PEXLightWCVector 2 -#define PEXLightWCPoint 3 -#define PEXLightWCSpot 4 - -/* light type mnemonics */ -#define PEXETMLightAmbient "Ambient" -#define PEXETMLightWCVector "WCS_Vector" -#define PEXETMLightWCPoint "WCS_Point" -#define PEXETMLightWCSpot "WCS_Spot" - -/* color types */ -#define PEXColorTypeIndexed 0 -#define PEXColorTypeRGB 1 -#define PEXColorTypeCIE 2 -#define PEXColorTypeHSV 3 -#define PEXColorTypeHLS 4 -#define PEXColorTypeRGB8 5 -#define PEXColorTypeRGB16 6 - -/* color type mnemonics */ -#define PEXETMColorTypeIndexed "Indexed" -#define PEXETMColorTypeRGB "RGBFloat" -#define PEXETMColorTypeCIE "CIEFloat" -#define PEXETMColorTypeHSV "HSVFloat" -#define PEXETMColorTypeHLS "HLSFloat" -#define PEXETMColorTypeRGB8 "RGBInt8" -#define PEXETMColorTypeRGB16 "RGBInt16" - -/* float formats */ -#define PEXIEEE_754_32 1 -#define PEXDEC_F_Floating 2 -#define PEXIEEE_754_64 3 -#define PEXDEC_D_Floating 4 - -/* float format mnemonics */ -#define PEXETMIEEE_754_32 "IEEE_754_32" -#define PEXETMDEC_F_Floating "DEC_F_Floating" -#define PEXETMIEEE_754_64 "IEEE_754_64" -#define PEXETMDEC_D_Floating "DEC_D_Floating" - -/* HLHSR modes */ -#define PEXHLHSROff 1 -#define PEXHLHSRZBuffer 2 -#define PEXHLHSRPainters 3 -#define PEXHLHSRScanline 4 -#define PEXHLHSRHiddenLineOnly 5 -#define PEXHLHSRZBufferID 6 - -/* HLHSR mode mnemonics */ -#define PEXETMHLHSROff "Off" -#define PEXETMHLHSRZBuffer "ZBuffer" -#define PEXETMHLHSRPainters "Painters" -#define PEXETMHLHSRScanline "Scanline" -#define PEXETMHLHSRHiddenLineOnly "HiddenLineOnly" -#define PEXETMHLHSRZBufferID "ZBufferId" - -/* prompt echo types */ -#define PEXEchoPrimitive 1 -#define PEXEchoStructure 2 -#define PEXEchoNetwork 3 - -/* prompt echo type mnemonics */ -#define PEXETMEchoPrimitive "EchoPrimitive" -#define PEXETMEchoStructure "EchoStructure" -#define PEXETMEchoNetwork "EchoNetwork" - -/* display update methods */ -#define PEXVisualizeEach 1 -#define PEXVisualizeEasy 2 -#define PEXVisualizeNone 3 -#define PEXSimulateSome 4 -#define PEXVisualizeWhenever 5 - -/* display update method mnemonics */ -#define PEXETMVisualizeEach "VisualizeEach" -#define PEXETMVisualizeEasy "VisualizeEasy" -#define PEXETMVisualizeNone "VisualizeNone" -#define PEXETMSimulateSome "SimulateSome" -#define PEXETMVisualizeWhenever "VisualizeWhenever" - -/* color approximation types */ -#define PEXColorSpace 1 -#define PEXColorRange 2 - -/* color approximation type mnemonics */ -#define PEXETMColorSpace "ColorSpace" -#define PEXETMColorRange "ColorRange" - -/* color approximation models */ -#define PEXColorApproxRGB 1 -#define PEXColorApproxCIE 2 -#define PEXColorApproxHSV 3 -#define PEXColorApproxHLS 4 -#define PEXColorApproxYIQ 5 - -/* color approximation model mnemonics */ -#define PEXETMColorApproxRGB "RGB" -#define PEXETMColorApproxCIE "CIE" -#define PEXETMColorApproxHSV "HSV" -#define PEXETMColorApproxHLS "HLS" -#define PEXETMColorApproxYIQ "YIQ" - -/* rendering color models */ -#define PEXRenderingColorModelImpDep 0 -#define PEXRenderingColorModelRGB 1 -#define PEXRenderingColorModelCIE 2 -#define PEXRenderingColorModelHSV 3 -#define PEXRenderingColorModelHLS 4 - -/* rendering color model mnemonics */ - /* PEXETMRenderingColorModelImpDep is an implementation-dependent string */ -#define PEXETMRenderingColorModelRGB "RGB" -#define PEXETMRenderingColorModelCIE "CIE" -#define PEXETMRenderingColorModelHSV "HSV" -#define PEXETMRenderingColorModelHLS "HLS" - -/* parametric surface characteristics */ -#define PEXPSCNone 1 -#define PEXPSCImpDep 2 -#define PEXPSCIsoCurves 3 -#define PEXPSCMCLevelCurves 4 -#define PEXPSCWCLevelCurves 5 - -/* parametric surface characteristic mnemonics */ -#define PEXETMPSCNone "None" - /* PEXETMPSCImpDep is an implementation-dependent string */ -#define PEXETMPSCIsoCurves "IsoparametricCurves" -#define PEXETMPSCMCLevelCurves "MC_LevelCurves" -#define PEXETMPSCWCLevelCurves "WC_LevelCurves" - -/* standard escape identifiers */ -#define PEXEscapeSetEchoColor 1 - -/* standard escape identifier mnemonics */ -#define PEXETMEscapeSetEchoColor "SetEchoColor" - -/* pick one methods */ -#define PEXPickLast 1 -#define PEXPickClosestZ 2 -#define PEXPickVisibleAny 3 -#define PEXPickVisibleClosest 4 - -/* pick one method mnemonics */ -#define PEXETMPickLast "Last" -#define PEXETMPickClosestZ "ClosestZ" -#define PEXETMPickVisibleAny "VisibleAny" -#define PEXETMPickVisibleClosest "VisibleClosest" - -/* pick all methods */ -#define PEXPickAllAll 1 -#define PEXPickAllVisible 2 - -/* pick all method mnemonics */ -#define PEXETMPickAllAll "All" -#define PEXETMPickAllVisible "Visible" - - -/* - * implementation dependent constants - */ -#define PEXIDDitheringSupported 1 -#define PEXIDMaxEdgeWidth 2 -#define PEXIDMaxLineWidth 3 -#define PEXIDMaxMarkerSize 4 -#define PEXIDMaxModelClipPlanes 5 -#define PEXIDMaxNameSetNames 6 -#define PEXIDMaxNonAmbientLights 7 -#define PEXIDMaxNURBOrder 8 -#define PEXIDMaxTrimCurveOrder 9 -#define PEXIDMinEdgeWidth 10 -#define PEXIDMinLineWidth 11 -#define PEXIDMinMarkerSize 12 -#define PEXIDNominalEdgeWidth 13 -#define PEXIDNominalLineWidth 14 -#define PEXIDNominalMarkerSize 15 -#define PEXIDNumSupportedEdgeWidths 16 -#define PEXIDNumSupportedLineWidths 17 -#define PEXIDNumSupportedMarkerSizes 18 -#define PEXIDBestColorApprox 19 -#define PEXIDTransparencySupported 20 -#define PEXIDDoubleBufferingSupported 21 -#define PEXIDChromaticityRedU 22 -#define PEXIDChromaticityRedV 23 -#define PEXIDLuminanceRed 24 -#define PEXIDChromaticityGreenU 25 -#define PEXIDChromaticityGreenV 26 -#define PEXIDLuminanceGreen 27 -#define PEXIDChromaticityBlueU 28 -#define PEXIDChromaticityBlueV 29 -#define PEXIDLuminanceBlue 30 -#define PEXIDChromaticityWhiteU 31 -#define PEXIDChromaticityWhiteV 32 -#define PEXIDLuminanceWhite 33 -#define PEXIDMaxHitsEventSupported 34 - -/* values for PEXIDBestColorApprox */ -#define PEXColorApproxAnyValues 0 -#define PEXColorApproxPowersOf2 1 - -/* - * match rendering targets - */ -#define PEXAnyDrawable 0 -#define PEXWindowDrawable 1 -#define PEXPixmapDrawable 2 -#define PEXBufferDrawable 3 - - -/* - * output primitive and attribute values - */ - -/* shape hints */ -#define PEXShapeComplex 0 -#define PEXShapeNonConvex 1 -#define PEXShapeConvex 2 -#define PEXShapeUnknown 3 - -/* contour hints */ -#define PEXContourDisjoint 0 -#define PEXContourNested 1 -#define PEXContourIntersecting 2 -#define PEXContourUnknown 3 - -/* facet and vertex attributes bitmask */ -#define PEXGANone 0 -#define PEXGAColor (1L<<0) -#define PEXGANormal (1L<<1) -#define PEXGAEdges (1L<<2) - -/* flags (e.g., switches, visibility, and edges) */ -#define PEXOff 0 -#define PEXOn 1 - -/* HLHSR identifier for PEXHLHSRZBufferID HLHSR mode */ -#define PEXHLHSRIDDisable 0 -#define PEXHLHSRIDEnable 1 - -/* text path direction */ -#define PEXPathRight 0 -#define PEXPathLeft 1 -#define PEXPathUp 2 -#define PEXPathDown 3 - -/* text vertical alignment */ -#define PEXVAlignNormal 0 -#define PEXVAlignTop 1 -#define PEXVAlignCap 2 -#define PEXVAlignHalf 3 -#define PEXVAlignBase 4 -#define PEXVAlignBottom 5 - -/* text horizontal alignment */ -#define PEXHAlignNormal 0 -#define PEXHAlignLeft 1 -#define PEXHAlignCenter 2 -#define PEXHAlignRight 3 - -/* text precision */ -#define PEXStringPrecision 0 -#define PEXCharPrecision 1 -#define PEXStrokePrecision 2 - -/* character set width */ -#define PEXCSByte 0 -#define PEXCSShort 1 -#define PEXCSLong 2 - -/* curve and surface types */ -#define PEXRational 0 -#define PEXNonRational 1 - -/* clipping */ -#define PEXClipXY (1L<<0) -#define PEXClipBack (1L<<1) -#define PEXClipFront (1L<<2) -#define PEXClippingAll (PEXClipXY | PEXClipBack | PEXClipFront) - -#define PEXClip 0 -#define PEXNoClip 1 - -/* cull modes */ -#define PEXNone 0 -#define PEXBackFaces 1 -#define PEXFrontFaces 2 - -/* local transform composition types */ -#define PEXPreConcatenate 0 -#define PEXPostConcatenate 1 -#define PEXReplace 2 - -/* isoparametric curves placement types */ -#define PEXUniformPlacement 0 -#define PEXNonUniformPlacement 1 - -/* aspect source flags (ASFs) */ -#define PEXBundled 0 -#define PEXIndividual 1 - -/* mask values for setting ASFs */ -#define PEXASFMarkerType (1L<<0) -#define PEXASFMarkerScale (1L<<1) -#define PEXASFMarkerColor (1L<<2) -#define PEXASFTextFontIndex (1L<<3) -#define PEXASFTextPrec (1L<<4) -#define PEXASFCharExpansion (1L<<5) -#define PEXASFCharSpacing (1L<<6) -#define PEXASFTextColor (1L<<7) -#define PEXASFLineType (1L<<8) -#define PEXASFLineWidth (1L<<9) -#define PEXASFLineColor (1L<<10) -#define PEXASFCurveApprox (1L<<11) -#define PEXASFPolylineInterp (1L<<12) -#define PEXASFInteriorStyle (1L<<13) -#define PEXASFInteriorStyleIndex (1L<<14) -#define PEXASFSurfaceColor (1L<<15) -#define PEXASFSurfaceInterp (1L<<16) -#define PEXASFReflectionModel (1L<<17) -#define PEXASFReflectionAttr (1L<<18) -#define PEXASFBFInteriorStyle (1L<<19) -#define PEXASFBFInteriorStyleIndex (1L<<20) -#define PEXASFBFSurfaceColor (1L<<21) -#define PEXASFBFSurfaceInterp (1L<<22) -#define PEXASFBFReflectionModel (1L<<23) -#define PEXASFBFReflectionAttr (1L<<24) -#define PEXASFSurfaceApprox (1L<<25) -#define PEXASFSurfaceEdges (1L<<26) -#define PEXASFSurfaceEdgeType (1L<<27) -#define PEXASFSurfaceEdgeWidth (1L<<28) -#define PEXASFSurfaceEdgeColor (1L<<29) - - -/* - * resource identifier value when resource is referenced, but freed - */ -#define PEXAlreadyFreed 1 - - -/* - * pipeline context - */ - -/* pipeline context attributes bitmask shift values */ -#define PEXPCMarkerType 0 -#define PEXPCMarkerScale 1 -#define PEXPCMarkerColor 2 -#define PEXPCMarkerBundleIndex 3 -#define PEXPCTextFont 4 -#define PEXPCTextPrecision 5 -#define PEXPCCharExpansion 6 -#define PEXPCCharSpacing 7 -#define PEXPCTextColor 8 -#define PEXPCCharHeight 9 -#define PEXPCCharUpVector 10 -#define PEXPCTextPath 11 -#define PEXPCTextAlignment 12 -#define PEXPCATextHeight 13 -#define PEXPCATextUpVector 14 -#define PEXPCATextPath 15 -#define PEXPCATextAlignment 16 -#define PEXPCATextStyle 17 -#define PEXPCTextBundleIndex 18 -#define PEXPCLineType 19 -#define PEXPCLineWidth 20 -#define PEXPCLineColor 21 -#define PEXPCCurveApprox 22 -#define PEXPCPolylineInterp 23 -#define PEXPCLineBundleIndex 24 -#define PEXPCInteriorStyle 25 -#define PEXPCInteriorStyleIndex 26 -#define PEXPCSurfaceColor 27 -#define PEXPCReflectionAttr 28 -#define PEXPCReflectionModel 29 -#define PEXPCSurfaceInterp 30 -#define PEXPCBFInteriorStyle 31 - -#define PEXPCBFInteriorStyleIndex 32 -#define PEXPCBFSurfaceColor 33 -#define PEXPCBFReflectionAttr 34 -#define PEXPCBFReflectionModel 35 -#define PEXPCBFSurfaceInterp 36 -#define PEXPCSurfaceApprox 37 -#define PEXPCCullingMode 38 -#define PEXPCDistinguishFlag 39 -#define PEXPCPatternSize 40 -#define PEXPCPatternRefPoint 41 -#define PEXPCPatternRefVec1 42 -#define PEXPCPatternRefVec2 43 -#define PEXPCInteriorBundleIndex 44 -#define PEXPCSurfaceEdgeFlag 45 -#define PEXPCSurfaceEdgeType 46 -#define PEXPCSurfaceEdgeWidth 47 -#define PEXPCSurfaceEdgeColor 48 -#define PEXPCEdgeBundleIndex 49 -#define PEXPCLocalTransform 50 -#define PEXPCGlobalTransform 51 -#define PEXPCModelClip 52 -#define PEXPCModelClipVolume 53 -#define PEXPCViewIndex 54 -#define PEXPCLightState 55 -#define PEXPCDepthCueIndex 56 -#define PEXPCASFValues 57 -#define PEXPCPickID 58 -#define PEXPCHLHSRIdentifier 59 -#define PEXPCNameSet 60 -#define PEXPCColorApproxIndex 61 -#define PEXPCRenderingColorModel 62 -#define PEXPCParaSurfCharacteristics 63 -#define PEXPCMaxShift 63 - - -/* - * renderer and renderer picking - */ - -/* renderer state */ -#define PEXIdle 0 -#define PEXRendering 1 -#define PEXPicking 2 - -/* renderer dynamics */ -#define PEXDynamic 0 -#define PEXNotDynamic 1 - -/* renderer echo modes */ -#define PEXNoEcho 0 -#define PEXEcho 1 -#define PEXUnEcho 2 - -/* renderer attributes bitmask */ -#define PEXRAPipelineContext (1L<<0) -#define PEXRACurrentPath (1L<<1) -#define PEXRAMarkerBundle (1L<<2) -#define PEXRATextBundle (1L<<3) -#define PEXRALineBundle (1L<<4) -#define PEXRAInteriorBundle (1L<<5) -#define PEXRAEdgeBundle (1L<<6) -#define PEXRAViewTable (1L<<7) -#define PEXRAColorTable (1L<<8) -#define PEXRADepthCueTable (1L<<9) -#define PEXRALightTable (1L<<10) -#define PEXRAColorApproxTable (1L<<11) -#define PEXRAPatternTable (1L<<12) -#define PEXRATextFontTable (1L<<13) -#define PEXRAHighlightIncl (1L<<14) -#define PEXRAHighlightExcl (1L<<15) -#define PEXRAInvisibilityIncl (1L<<16) -#define PEXRAInvisibilityExcl (1L<<17) -#define PEXRARendererState (1L<<18) -#define PEXRAHLHSRMode (1L<<19) -#define PEXRANPCSubVolume (1L<<20) -#define PEXRAViewport (1L<<21) -#define PEXRAClipList (1L<<22) -#define PEXRAPickIncl (1L<<23) -#define PEXRAPickExcl (1L<<24) -#define PEXRAPickStartPath (1L<<25) -#define PEXRABackgroundColor (1L<<26) -#define PEXRAClearImage (1L<<27) -#define PEXRAClearZ (1L<<28) -#define PEXRAEchoMode (1L<<29) -#define PEXRAMaxShift 29 - -/* renderer dynamics bitmask */ -/* tables */ -#define PEXRDTMarkerBundle (1L<<0) -#define PEXRDTTextBundle (1L<<1) -#define PEXRDTLineBundle (1L<<2) -#define PEXRDTInteriorBundle (1L<<3) -#define PEXRDTEdgeBundle (1L<<4) -#define PEXRDTViewTable (1L<<5) -#define PEXRDTColorTable (1L<<6) -#define PEXRDTDepthCueTable (1L<<7) -#define PEXRDTLightTable (1L<<8) -#define PEXRDTColorApproxTable (1L<<9) -#define PEXRDTPatternTable (1L<<10) -#define PEXRDTTextFontTable (1L<<11) -#define PEXRDTMarkerBundleContents (1L<<16) -#define PEXRDTTextBundleContents (1L<<17) -#define PEXRDTLineBundleContents (1L<<18) -#define PEXRDTInteriorBundleContents (1L<<19) -#define PEXRDTEdgeBundleContents (1L<<20) -#define PEXRDTViewTableContents (1L<<21) -#define PEXRDTColorTableContents (1L<<22) -#define PEXRDTDepthCueTableContents (1L<<23) -#define PEXRDTLightTableContents (1L<<24) -#define PEXRDTColorApproxContents (1L<<25) -#define PEXRDTPatternTableContents (1L<<26) -#define PEXRDTTextFontTableContents (1L<<27) -/* name sets */ -#define PEXRDNHighlightNameSet (1L<<0) -#define PEXRDNInvisibilityNameSet (1L<<1) -#define PEXRDNPickNameSet (1L<<2) -#define PEXRDNHighlightNameSetContents (1L<<16) -#define PEXRDNInvisibilityNameSetContents (1L<<17) -#define PEXRDNPickNameSetContents (1L<<18) -/* attributes */ -#define PEXRDAHLHSRMode (1L<<0) -#define PEXRDANPCSubVolume (1L<<1) -#define PEXRDAViewport (1L<<2) -#define PEXRDAClipList (1L<<3) -#define PEXRDAEchoMode (1L<<4) - -/* renderer pick status */ -#define PEXNoPick 0 -#define PEXPick 1 -#define PEXAbortedPick 2 - - -/* - * name set - */ - -/* name set changes */ -#define PEXNSAdd 0 -#define PEXNSRemove 1 -#define PEXNSReplace 2 - - -/* - * look up table - */ - -/* table types */ -#define PEXLUTLineBundle 1 -#define PEXLUTMarkerBundle 2 -#define PEXLUTTextBundle 3 -#define PEXLUTInteriorBundle 4 -#define PEXLUTEdgeBundle 5 -#define PEXLUTPattern 6 -#define PEXLUTTextFont 7 -#define PEXLUTColor 8 -#define PEXLUTView 9 -#define PEXLUTLight 10 -#define PEXLUTDepthCue 11 -#define PEXLUTColorApprox 12 - -/* status in PEXGetTableEntry */ -#define PEXDefaultEntry 0 -#define PEXDefinedEntry 1 - -/* return type in PEXGetTableEntry and PEXGetTableEntries */ -#define PEXSetValue 0 -#define PEXRealizedValue 1 - - -/* - * structure - */ - -/* structure editing mode */ -#define PEXStructureInsert 0 -#define PEXStructureReplace 1 - -/* whence in structure element ranges */ -#define PEXBeginning 0 -#define PEXCurrent 1 -#define PEXEnd 2 - -/* structure info */ -#define PEXElementPtr (1L<<0) -#define PEXNumElements (1L<<1) -#define PEXLengthStructure (1L<<2) -#define PEXHasRefs (1L<<3) -#define PEXEditMode (1L<<4) - -/* structures in network */ -#define PEXAll 0 -#define PEXOrphans 1 - -/* ancestors and descendents*/ -#define PEXTopPart 0 -#define PEXBottomPart 1 - -/* element search */ -#define PEXForward 0 -#define PEXBackward 1 - -/* element info bitmask */ -#define PEXElementType (1L<<0) -#define PEXElementSize (1L<<1) -#define PEXElementData (1L<<2) - - -/* - * search context - */ - -/* element search status */ -#define PEXNotFound 1 -#define PEXFound 2 - -/* search context attributes bitmask */ -#define PEXSCPosition (1L<<0) -#define PEXSCDistance (1L<<1) -#define PEXSCCeiling (1L<<2) -#define PEXSCModelClipFlag (1L<<3) -#define PEXSCStartPath (1L<<4) -#define PEXSCNormalList (1L<<5) -#define PEXSCInvertedList (1L<<6) -#define PEXSCMaxShift 6 - - -/* - * PHIGS workstation - */ - -/* workstation update state */ -#define PEXNotPending 0 -#define PEXPending 1 - -/* workstation visual state */ -#define PEXCorrect 0 -#define PEXDeferred 1 -#define PEXSimulated 2 - -/* workstation display state */ -#define PEXEmpty 0 -#define PEXNotEmpty 1 - -/* workstation buffer mode */ -#define PEXSingleBuffered 0 -#define PEXDoubleBuffered 1 - -/* workstation dynamics */ -#define PEXIMM 0 -#define PEXIRG 1 -#define PEXCBS 2 - -/* workstation structure posting priorities */ -#define PEXHigher 0 -#define PEXLower 1 - -/* workstation attributes bitmask shift values */ -#define PEXPWDisplayUpdate 0 -#define PEXPWVisualState 1 -#define PEXPWDisplaySurface 2 -#define PEXPWViewUpdate 3 -#define PEXPWDefinedViews 4 -#define PEXPWWorkstationUpdate 5 -#define PEXPWReqNPCSubVolume 6 -#define PEXPWCurNPCSubVolume 7 -#define PEXPWReqViewport 8 -#define PEXPWCurViewport 9 -#define PEXPWHLHSRUpdate 10 -#define PEXPWReqHLHSRMode 11 -#define PEXPWCurHLHSRMode 12 -#define PEXPWDrawable 13 -#define PEXPWMarkerBundle 14 -#define PEXPWTextBundle 15 -#define PEXPWLineBundle 16 -#define PEXPWInteriorBundle 17 -#define PEXPWEdgeBundle 18 -#define PEXPWColorTable 19 -#define PEXPWDepthCueTable 20 -#define PEXPWLightTable 21 -#define PEXPWColorApproxTable 22 -#define PEXPWPatternTable 23 -#define PEXPWTextFontTable 24 -#define PEXPWHighlightIncl 25 -#define PEXPWHighlightExcl 26 -#define PEXPWInvisibilityIncl 27 -#define PEXPWInvisibilityExcl 28 -#define PEXPWPostedStructures 29 -#define PEXPWNumPriorities 30 -#define PEXPWBufferUpdate 31 - -#define PEXPWReqBufferMode 32 -#define PEXPWCurBufferMode 33 -#define PEXPWMaxShift 33 - -/* values for indices to returned workstation dynamics */ -#define PEXPWDViewRep 0 -#define PEXPWDMarkerBundle 1 -#define PEXPWDTextBundle 2 -#define PEXPWDLineBundle 3 -#define PEXPWDInteriorBundle 4 -#define PEXPWDEdgeBundle 5 -#define PEXPWDColorTable 6 -#define PEXPWDPatternTable 7 -#define PEXPWDWorkstationTransform 8 -#define PEXPWDHighlightFilter 9 -#define PEXPWDInvisibilityFilter 10 -#define PEXPWDHLHSRMode 11 -#define PEXPWDStructureModify 12 -#define PEXPWDPostStructure 13 -#define PEXPWDUnpostStructure 14 -#define PEXPWDDeleteStructure 15 -#define PEXPWDReferenceModify 16 -#define PEXPWDBufferModify 17 -#define PEXPWDLightTable 18 -#define PEXPWDDepthCueTable 19 -#define PEXPWDColorApproxTable 20 - - -/* - * workstation picking - */ - -/* workstation pick status */ - /* PEXNoPick defined the same as for renderer pick */ - /* PEXPick defined the same as for renderer pick */ - -/* pick echo modes */ - /* PEXNoEcho defined the same as for renderer echo */ - /* PEXEcho defined the same as for renderer echo */ - -/* pick path order */ -#define PEXTopFirst 0 -#define PEXBottomFirst 1 - -/* pick all, more hits flag */ -#define PEXMoreHits 0 -#define PEXNoMoreHits 1 -#define PEXMayBeMoreHits 2 - -/* workstation pick device attributes bitmask */ -#define PEXPDPickStatus (1L<<0) -#define PEXPDPickPath (1L<<1) -#define PEXPDPickPathOrder (1L<<2) -#define PEXPDPickIncl (1L<<3) -#define PEXPDPickExcl (1L<<4) -#define PEXPDPickDataRec (1L<<5) -#define PEXPDPromptEchoType (1L<<6) -#define PEXPDEchoVolume (1L<<7) -#define PEXPDEchoSwitch (1L<<8) -#define PEXPDMaxShift 8 - -/* workstation pick measure attributes bitmask */ -#define PEXPMStatus (1L<<0) -#define PEXPMPath (1L<<1) -#define PEXPMMaxShift 1 - -/* - * events - */ -#define PEXMaxHitsReached 0 -#define PEXMaxEvent 0 - - -/* - * errors - */ -#define BadPEXColorType 0 -#define BadPEXRendererState 1 -#define BadPEXFloatingPointFormat 2 -#define BadPEXLabel 3 -#define BadPEXLookupTable 4 -#define BadPEXNameSet 5 -#define BadPEXPath 6 -#define BadPEXFont 7 -#define BadPEXWorkstation 8 -#define BadPEXPickMeasure 9 -#define BadPEXPipelineContext 10 -#define BadPEXRenderer 11 -#define BadPEXSearchContext 12 -#define BadPEXStructure 13 -#define BadPEXOutputCommand 14 -#define PEXMaxError 14 - - -/* - * protocol output command codes - */ -#define PEXOCAll 0 -#define PEXOCMarkerType 1 -#define PEXOCMarkerScale 2 -#define PEXOCMarkerColorIndex 3 -#define PEXOCMarkerColor 4 -#define PEXOCMarkerBundleIndex 5 -#define PEXOCTextFontIndex 6 -#define PEXOCTextPrecision 7 -#define PEXOCCharExpansion 8 -#define PEXOCCharSpacing 9 -#define PEXOCTextColorIndex 10 -#define PEXOCTextColor 11 -#define PEXOCCharHeight 12 -#define PEXOCCharUpVector 13 -#define PEXOCTextPath 14 -#define PEXOCTextAlignment 15 -#define PEXOCATextHeight 16 -#define PEXOCATextUpVector 17 -#define PEXOCATextPath 18 -#define PEXOCATextAlignment 19 -#define PEXOCATextStyle 20 -#define PEXOCTextBundleIndex 21 -#define PEXOCLineType 22 -#define PEXOCLineWidth 23 -#define PEXOCLineColorIndex 24 -#define PEXOCLineColor 25 -#define PEXOCCurveApprox 26 -#define PEXOCPolylineInterpMethod 27 -#define PEXOCLineBundleIndex 28 -#define PEXOCInteriorStyle 29 -#define PEXOCInteriorStyleIndex 30 -#define PEXOCSurfaceColorIndex 31 -#define PEXOCSurfaceColor 32 -#define PEXOCReflectionAttributes 33 -#define PEXOCReflectionModel 34 -#define PEXOCSurfaceInterpMethod 35 -#define PEXOCBFInteriorStyle 36 -#define PEXOCBFInteriorStyleIndex 37 -#define PEXOCBFSurfaceColorIndex 38 -#define PEXOCBFSurfaceColor 39 -#define PEXOCBFReflectionAttributes 40 -#define PEXOCBFReflectionModel 41 -#define PEXOCBFSurfaceInterpMethod 42 -#define PEXOCSurfaceApprox 43 -#define PEXOCFacetCullingMode 44 -#define PEXOCFacetDistinguishFlag 45 -#define PEXOCPatternSize 46 -#define PEXOCPatternAttributes2D 47 -#define PEXOCPatternAttributes 48 -#define PEXOCInteriorBundleIndex 49 -#define PEXOCSurfaceEdgeFlag 50 -#define PEXOCSurfaceEdgeType 51 -#define PEXOCSurfaceEdgeWidth 52 -#define PEXOCSurfaceEdgeColorIndex 53 -#define PEXOCSurfaceEdgeColor 54 -#define PEXOCEdgeBundleIndex 55 -#define PEXOCIndividualASF 56 -#define PEXOCLocalTransform 57 -#define PEXOCLocalTransform2D 58 -#define PEXOCGlobalTransform 59 -#define PEXOCGlobalTransform2D 60 -#define PEXOCModelClipFlag 61 -#define PEXOCModelClipVolume 62 -#define PEXOCModelClipVolume2D 63 -#define PEXOCRestoreModelClipVolume 64 -#define PEXOCViewIndex 65 -#define PEXOCLightSourceState 66 -#define PEXOCDepthCueIndex 67 -#define PEXOCPickID 68 -#define PEXOCHLHSRID 69 -#define PEXOCColorApproxIndex 70 -#define PEXOCRenderingColorModel 71 -#define PEXOCParaSurfCharacteristics 72 -#define PEXOCAddToNameSet 73 -#define PEXOCRemoveFromNameSet 74 -#define PEXOCExecuteStructure 75 -#define PEXOCLabel 76 -#define PEXOCApplicationData 77 -#define PEXOCGSE 78 -#define PEXOCMarkers 79 -#define PEXOCMarkers2D 80 -#define PEXOCText 81 -#define PEXOCText2D 82 -#define PEXOCAnnotationText 83 -#define PEXOCAnnotationText2D 84 -#define PEXOCPolyline 85 -#define PEXOCPolyline2D 86 -#define PEXOCPolylineSetWithData 87 -#define PEXOCNURBCurve 88 -#define PEXOCFillArea 89 -#define PEXOCFillArea2D 90 -#define PEXOCFillAreaWithData 91 -#define PEXOCFillAreaSet 92 -#define PEXOCFillAreaSet2D 93 -#define PEXOCFillAreaSetWithData 94 -#define PEXOCTriangleStrip 95 -#define PEXOCQuadrilateralMesh 96 -#define PEXOCSetOfFillAreaSets 97 -#define PEXOCNURBSurface 98 -#define PEXOCCellArray 99 -#define PEXOCCellArray2D 100 -#define PEXOCExtendedCellArray 101 -#define PEXOCGDP 102 -#define PEXOCGDP2D 103 -#define PEXOCNoop 104 -#define PEXOCNil 0xffff - - -/* - * protocol request codes - */ -#define PEXRCGetExtensionInfo 1 -#define PEXRCGetEnumTypeInfo 2 -#define PEXRCGetImpDepConstants 3 -#define PEXRCCreateLookupTable 4 -#define PEXRCCopyLookupTable 5 -#define PEXRCFreeLookupTable 6 -#define PEXRCGetTableInfo 7 -#define PEXRCGetPredefinedEntries 8 -#define PEXRCGetDefinedIndices 9 -#define PEXRCGetTableEntry 10 -#define PEXRCGetTableEntries 11 -#define PEXRCSetTableEntries 12 -#define PEXRCDeleteTableEntries 13 -#define PEXRCCreatePipelineContext 14 -#define PEXRCCopyPipelineContext 15 -#define PEXRCFreePipelineContext 16 -#define PEXRCGetPipelineContext 17 -#define PEXRCChangePipelineContext 18 -#define PEXRCCreateRenderer 19 -#define PEXRCFreeRenderer 20 -#define PEXRCChangeRenderer 21 -#define PEXRCGetRendererAttributes 22 -#define PEXRCGetRendererDynamics 23 -#define PEXRCBeginRendering 24 -#define PEXRCEndRendering 25 -#define PEXRCBeginStructure 26 -#define PEXRCEndStructure 27 -#define PEXRCRenderOutputCommands 28 -#define PEXRCRenderNetwork 29 -#define PEXRCCreateStructure 30 -#define PEXRCCopyStructure 31 -#define PEXRCDestroyStructures 32 -#define PEXRCGetStructureInfo 33 -#define PEXRCGetElementInfo 34 -#define PEXRCGetStructuresInNetwork 35 -#define PEXRCGetAncestors 36 -#define PEXRCGetDescendants 37 -#define PEXRCFetchElements 38 -#define PEXRCSetEditingMode 39 -#define PEXRCSetElementPointer 40 -#define PEXRCSetElementPointerAtLabel 41 -#define PEXRCElementSearch 42 -#define PEXRCStoreElements 43 -#define PEXRCDeleteElements 44 -#define PEXRCDeleteElementsToLabel 45 -#define PEXRCDeleteBetweenLabels 46 -#define PEXRCCopyElements 47 -#define PEXRCChangeStructureRefs 48 -#define PEXRCCreateNameSet 49 -#define PEXRCCopyNameSet 50 -#define PEXRCFreeNameSet 51 -#define PEXRCGetNameSet 52 -#define PEXRCChangeNameSet 53 -#define PEXRCCreateSearchContext 54 -#define PEXRCCopySearchContext 55 -#define PEXRCFreeSearchContext 56 -#define PEXRCGetSearchContext 57 -#define PEXRCChangeSearchContext 58 -#define PEXRCSearchNetwork 59 -#define PEXRCCreateWorkstation 60 -#define PEXRCFreeWorkstation 61 -#define PEXRCGetWorkstationAttributes 62 -#define PEXRCGetWorkstationDynamics 63 -#define PEXRCGetWorkstationViewRep 64 -#define PEXRCRedrawAllStructures 65 -#define PEXRCUpdateWorkstation 66 -#define PEXRCRedrawClipRegion 67 -#define PEXRCExecuteDeferredActions 68 -#define PEXRCSetWorkstationViewPriority 69 -#define PEXRCSetWorkstationDisplayUpdateMode 70 -#define PEXRCMapDCtoWC 71 -#define PEXRCMapWCtoDC 72 -#define PEXRCSetWorkstationViewRep 73 -#define PEXRCSetWorkstationWindow 74 -#define PEXRCSetWorkstationViewport 75 -#define PEXRCSetWorkstationHLHSRMode 76 -#define PEXRCSetWorkstationBufferMode 77 -#define PEXRCPostStructure 78 -#define PEXRCUnpostStructure 79 -#define PEXRCUnpostAllStructures 80 -#define PEXRCGetWorkstationPostings 81 -#define PEXRCGetPickDevice 82 -#define PEXRCChangePickDevice 83 -#define PEXRCCreatePickMeasure 84 -#define PEXRCFreePickMeasure 85 -#define PEXRCGetPickMeasure 86 -#define PEXRCUpdatePickMeasure 87 -#define PEXRCLoadFont 88 -#define PEXRCUnloadFont 89 -#define PEXRCQueryFont 90 -#define PEXRCListFonts 91 -#define PEXRCListFontsWithInfo 92 -#define PEXRCQueryTextExtents 93 -#define PEXRCMatchRenderingTargets 94 -#define PEXRCEscape 95 -#define PEXRCEscapeWithReply 96 -#define PEXRCRenderElements 97 -#define PEXRCAccumulateState 98 -#define PEXRCBeginPickOne 99 -#define PEXRCEndPickOne 100 -#define PEXRCPickOne 101 -#define PEXRCBeginPickAll 102 -#define PEXRCEndPickAll 103 -#define PEXRCPickAll 104 - -#endif /* _PEX_H_ */ diff --git a/xc/lib/PEX5/PEX5-def.cpp b/xc/lib/PEX5/PEX5-def.cpp deleted file mode 100644 index af73ccd75..000000000 --- a/xc/lib/PEX5/PEX5-def.cpp +++ /dev/null @@ -1,283 +0,0 @@ -LIBRARY PEX5 -VERSION LIBRARY_VERSION -EXPORTS - PEXAccumulateState - PEXAddToNameSet - PEXAnnotationText - PEXAnnotationText2D - PEXApplicationData - PEXBeginPickAll - PEXBeginPickOne - PEXBeginRendering - PEXBeginStructure - PEXBuildTransform - PEXBuildTransform2D - PEXCellArray - PEXCellArray2D - PEXChangeNameSet - PEXChangePickDevice - PEXChangePipelineContext - PEXChangeRenderer - PEXChangeSearchContext - PEXChangeStructureRefs - PEXCopyBytesToOC - PEXCopyElements - PEXCopyLookupTable - PEXCopyNameSet - PEXCopyPipelineContext - PEXCopySearchContext - PEXCopyStructure - PEXCountOCs - PEXCreateLookupTable - PEXCreateNameSet - PEXCreatePickMeasure - PEXCreatePipelineContext - PEXCreateRenderer - PEXCreateSearchContext - PEXCreateStructure - PEXCreateWorkstation - PEXDecodeOCs - PEXDeleteBetweenLabels - PEXDeleteElements - PEXDeleteTableEntries - PEXDeleteToLabel - PEXDestroyStructures - PEXElementSearch - PEXEncodeOCs - PEXEncodedAnnoText - PEXEncodedAnnoText2D - PEXEncodedText - PEXEncodedText2D - PEXEndPickAll - PEXEndPickOne - PEXEndRendering - PEXEndStructure - PEXEscape - PEXEscapeWithReply - PEXExecuteDeferredActions - PEXExecuteStructure - PEXExtendedCellArray - PEXFetchElements - PEXFetchElementsAndSend - PEXFillArea - PEXFillArea2D - PEXFillAreaSet - PEXFillAreaSet2D - PEXFillAreaSetWithData - PEXFillAreaWithData - PEXFinishOCs - PEXFreeEnumInfo - PEXFreeFontInfo - PEXFreeFontNames - PEXFreeLookupTable - PEXFreeNameSet - PEXFreeOCData - PEXFreePCAttributes - PEXFreePDAttributes - PEXFreePMAttributes - PEXFreePickMeasure - PEXFreePickPaths - PEXFreePipelineContext - PEXFreeRenderer - PEXFreeRendererAttributes - PEXFreeSCAttributes - PEXFreeSearchContext - PEXFreeStructurePaths - PEXFreeTableEntries - PEXFreeWorkstation - PEXFreeWorkstationAttributes - PEXGDP - PEXGDP2D - PEXGSE - PEXGeoNormFillArea - PEXGeoNormFillAreaSet - PEXGeoNormQuadrilateralMesh - PEXGeoNormSetOfFillAreaSets - PEXGeoNormTriangleStrip - PEXGetAncestors - PEXGetDefinedIndices - PEXGetDescendants - PEXGetElementInfo - PEXGetEnumTypeInfo - PEXGetExtensionInfo - PEXGetImpDepConstants - PEXGetNameSet - PEXGetOCAddr - PEXGetPickDevice - PEXGetPickMeasure - PEXGetPipelineContext - PEXGetPredefinedEntries - PEXGetProtocolFloatFormat - PEXGetRendererAttributes - PEXGetRendererDynamics - PEXGetSearchContext - PEXGetSizeOCs - PEXGetStructureInfo - PEXGetStructuresInNetwork - PEXGetTableEntries - PEXGetTableEntry - PEXGetTableInfo - PEXGetWorkstationAttributes - PEXGetWorkstationDynamics - PEXGetWorkstationPostings - PEXGetWorkstationViewRep - PEXIdentityMatrix - PEXIdentityMatrix2D - PEXInitialize - PEXInvertMatrix - PEXInvertMatrix2D - PEXLabel - PEXListFonts - PEXListFontsWithInfo - PEXLoadFont - PEXLookAtViewMatrix - PEXMapDCToWC - PEXMapWCToDC - PEXMapXCToNPC - PEXMapXCToNPC2D - PEXMarkers - PEXMarkers2D - PEXMatchRenderingTargets - PEXMatrixMult - PEXMatrixMult2D - PEXNPCToXCTransform - PEXNPCToXCTransform2D - PEXNURBCurve - PEXNURBSurface - PEXNoop - PEXNormalizeVectors - PEXNormalizeVectors2D - PEXOrthoProjMatrix - PEXPerspProjMatrix - PEXPickAll - PEXPickOne - PEXPolarViewMatrix - PEXPolyline - PEXPolyline2D - PEXPolylineSetWithData - PEXPostStructure - PEXQuadrilateralMesh - PEXQueryEncodedTextExtents - PEXQueryFont - PEXQueryTextExtents - PEXRedrawAllStructures - PEXRedrawClipRegion - PEXRemoveFromNameSet - PEXRenderElements - PEXRenderNetwork - PEXRestoreModelClipVolume - PEXRotate - PEXRotate2D - PEXRotateGeneral - PEXScale - PEXScale2D - PEXSearchNetwork - PEXSendOCs - PEXSetATextAlignment - PEXSetATextHeight - PEXSetATextPath - PEXSetATextStyle - PEXSetATextUpVector - PEXSetBFInteriorStyle - PEXSetBFInteriorStyleIndex - PEXSetBFReflectionAttributes - PEXSetBFReflectionModel - PEXSetBFSurfaceColor - PEXSetBFSurfaceColorIndex - PEXSetBFSurfaceInterpMethod - PEXSetCharExpansion - PEXSetCharHeight - PEXSetCharSpacing - PEXSetCharUpVector - PEXSetColorApproxIndex - PEXSetCurveApprox - PEXSetDepthCueIndex - PEXSetEchoColor - PEXSetEdgeBundleIndex - PEXSetEditingMode - PEXSetElementPtr - PEXSetElementPtrAtLabel - PEXSetFacetCullingMode - PEXSetFacetDistinguishFlag - PEXSetGlobalTransform - PEXSetGlobalTransform2D - PEXSetHLHSRID - PEXSetIndividualASF - PEXSetInteriorBundleIndex - PEXSetInteriorStyle - PEXSetInteriorStyleIndex - PEXSetLightSourceState - PEXSetLineBundleIndex - PEXSetLineColor - PEXSetLineColorIndex - PEXSetLineType - PEXSetLineWidth - PEXSetLocalTransform - PEXSetLocalTransform2D - PEXSetMarkerBundleIndex - PEXSetMarkerColor - PEXSetMarkerColorIndex - PEXSetMarkerScale - PEXSetMarkerType - PEXSetModelClipFlag - PEXSetModelClipVolume - PEXSetModelClipVolume2D - PEXSetOfFillAreaSets - PEXSetParaSurfCharacteristics - PEXSetPatternAttributes - PEXSetPatternAttributes2D - PEXSetPatternSize - PEXSetPickID - PEXSetPolylineInterpMethod - PEXSetReflectionAttributes - PEXSetReflectionModel - PEXSetRenderingColorModel - PEXSetSurfaceApprox - PEXSetSurfaceColor - PEXSetSurfaceColorIndex - PEXSetSurfaceEdgeColor - PEXSetSurfaceEdgeColorIndex - PEXSetSurfaceEdgeFlag - PEXSetSurfaceEdgeType - PEXSetSurfaceEdgeWidth - PEXSetSurfaceInterpMethod - PEXSetTableEntries - PEXSetTextAlignment - PEXSetTextBundleIndex - PEXSetTextColor - PEXSetTextColorIndex - PEXSetTextFontIndex - PEXSetTextPath - PEXSetTextPrecision - PEXSetViewIndex - PEXSetWorkstationBufferMode - PEXSetWorkstationDisplayUpdateMode - PEXSetWorkstationHLHSRMode - PEXSetWorkstationViewPriority - PEXSetWorkstationViewRep - PEXSetWorkstationViewport - PEXSetWorkstationWindow - PEXStartOCs - PEXText - PEXText2D - PEXTransformPoints - PEXTransformPoints2D - PEXTransformPoints2DH - PEXTransformPoints4D - PEXTransformVectors - PEXTransformVectors2D - PEXTranslate - PEXTranslate2D - PEXTriangleStrip - PEXUnloadFont - PEXUnpostAllStructures - PEXUnpostStructure - PEXUpdatePickMeasure - PEXUpdateWorkstation - PEXViewMappingMatrix - PEXViewMappingMatrix2D - PEXViewOrientationMatrix - PEXViewOrientationMatrix2D - PEXXCToNPCTransform - PEXXCToNPCTransform2D -/* $XConsortium: PEX5-def.cpp /main/2 1996/05/07 13:15:18 kaleb $ */ diff --git a/xc/lib/PEX5/PEX5os2.def b/xc/lib/PEX5/PEX5os2.def deleted file mode 100644 index 6f2d74314..000000000 --- a/xc/lib/PEX5/PEX5os2.def +++ /dev/null @@ -1,429 +0,0 @@ -LIBRARY PEX5 -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/PEX5/PEX5os2.def,v 3.6 1999/04/29 09:13:27 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 65536 -EXPORTS - PEXAccumulateState @ 1 - PEXAddToNameSet @ 2 - PEXAnnotationText @ 3 - PEXAnnotationText2D @ 4 - PEXApplicationData @ 5 - PEXBeginPickAll @ 6 - PEXBeginPickOne @ 7 - PEXBeginRendering @ 8 - PEXBeginStructure @ 9 - PEXBuildTransform @ 10 - PEXBuildTransform2D @ 11 - PEXCellArray @ 12 - PEXCellArray2D @ 13 - PEXChangeNameSet @ 14 - PEXChangePickDevice @ 15 - PEXChangePipelineContext @ 16 - PEXChangeRenderer @ 17 - PEXChangeSearchContext @ 18 - PEXChangeStructureRefs @ 19 - PEXCopyBytesToOC @ 20 - PEXCopyElements @ 21 - PEXCopyLookupTable @ 22 - PEXCopyNameSet @ 23 - PEXCopyPipelineContext @ 24 - PEXCopySearchContext @ 25 - PEXCopyStructure @ 26 - PEXCountOCs @ 27 - PEXCreateLookupTable @ 28 - PEXCreateNameSet @ 29 - PEXCreatePickMeasure @ 30 - PEXCreatePipelineContext @ 31 - PEXCreateRenderer @ 32 - PEXCreateSearchContext @ 33 - PEXCreateStructure @ 34 - PEXCreateWorkstation @ 35 - PEXDecodeOCs @ 36 - PEXDeleteBetweenLabels @ 37 - PEXDeleteElements @ 38 - PEXDeleteTableEntries @ 39 - PEXDeleteToLabel @ 40 - PEXDestroyStructures @ 41 - PEXElementSearch @ 42 - PEXEncodeOCs @ 43 - PEXEncodedAnnoText @ 44 - PEXEncodedAnnoText2D @ 45 - PEXEncodedText @ 46 - PEXEncodedText2D @ 47 - PEXEndPickAll @ 48 - PEXEndPickOne @ 49 - PEXEndRendering @ 50 - PEXEndStructure @ 51 - PEXEscape @ 52 - PEXEscapeWithReply @ 53 - PEXExecuteDeferredActions @ 54 - PEXExecuteStructure @ 55 - PEXExtendedCellArray @ 56 - PEXFetchElements @ 57 - PEXFetchElementsAndSend @ 58 - PEXFillArea @ 59 - PEXFillArea2D @ 60 - PEXFillAreaSet @ 61 - PEXFillAreaSet2D @ 62 - PEXFillAreaSetWithData @ 63 - PEXFillAreaWithData @ 64 - PEXFinishOCs @ 65 - PEXFreeEnumInfo @ 66 - PEXFreeFontInfo @ 67 - PEXFreeFontNames @ 68 - PEXFreeLookupTable @ 69 - PEXFreeNameSet @ 70 - PEXFreeOCData @ 71 - PEXFreePCAttributes @ 72 - PEXFreePDAttributes @ 73 - PEXFreePMAttributes @ 74 - PEXFreePickMeasure @ 75 - PEXFreePickPaths @ 76 - PEXFreePipelineContext @ 77 - PEXFreeRenderer @ 78 - PEXFreeRendererAttributes @ 79 - PEXFreeSCAttributes @ 80 - PEXFreeSearchContext @ 81 - PEXFreeStructurePaths @ 82 - PEXFreeTableEntries @ 83 - PEXFreeWorkstation @ 84 - PEXFreeWorkstationAttributes @ 85 - PEXGDP @ 86 - PEXGDP2D @ 87 - PEXGSE @ 88 - PEXGeoNormFillArea @ 89 - PEXGeoNormFillAreaSet @ 90 - PEXGeoNormQuadrilateralMesh @ 91 - PEXGeoNormSetOfFillAreaSets @ 92 - PEXGeoNormTriangleStrip @ 93 - PEXGetAncestors @ 94 - PEXGetDefinedIndices @ 95 - PEXGetDescendants @ 96 - PEXGetElementInfo @ 97 - PEXGetEnumTypeInfo @ 98 - PEXGetExtensionInfo @ 99 - PEXGetImpDepConstants @ 100 - PEXGetNameSet @ 101 - PEXGetOCAddr @ 102 - PEXGetPickDevice @ 103 - PEXGetPickMeasure @ 104 - PEXGetPipelineContext @ 105 - PEXGetPredefinedEntries @ 106 - PEXGetProtocolFloatFormat @ 107 - PEXGetRendererAttributes @ 108 - PEXGetRendererDynamics @ 109 - PEXGetSearchContext @ 110 - PEXGetSizeOCs @ 111 - PEXGetStructureInfo @ 112 - PEXGetStructuresInNetwork @ 113 - PEXGetTableEntries @ 114 - PEXGetTableEntry @ 115 - PEXGetTableInfo @ 116 - PEXGetWorkstationAttributes @ 117 - PEXGetWorkstationDynamics @ 118 - PEXGetWorkstationPostings @ 119 - PEXGetWorkstationViewRep @ 120 - PEXIdentityMatrix @ 121 - PEXIdentityMatrix2D @ 122 - PEXInitialize @ 123 - PEXInvertMatrix @ 124 - PEXInvertMatrix2D @ 125 - PEXLabel @ 126 - PEXListFonts @ 127 - PEXListFontsWithInfo @ 128 - PEXLoadFont @ 129 - PEXLookAtViewMatrix @ 130 - PEXMapDCToWC @ 131 - PEXMapWCToDC @ 132 - PEXMapXCToNPC @ 133 - PEXMapXCToNPC2D @ 134 - PEXMarkers @ 135 - PEXMarkers2D @ 136 - PEXMatchRenderingTargets @ 137 - PEXMatrixMult @ 138 - PEXMatrixMult2D @ 139 - PEXNPCToXCTransform @ 140 - PEXNPCToXCTransform2D @ 141 - PEXNURBCurve @ 142 - PEXNURBSurface @ 143 - PEXNoop @ 144 - PEXNormalizeVectors @ 145 - PEXNormalizeVectors2D @ 146 - PEXOrthoProjMatrix @ 147 - PEXPerspProjMatrix @ 148 - PEXPickAll @ 149 - PEXPickOne @ 150 - PEXPolarViewMatrix @ 151 - PEXPolyline @ 152 - PEXPolyline2D @ 153 - PEXPolylineSetWithData @ 154 - PEXPostStructure @ 155 - PEXQuadrilateralMesh @ 156 - PEXQueryEncodedTextExtents @ 157 - PEXQueryFont @ 158 - PEXQueryTextExtents @ 159 - PEXRedrawAllStructures @ 160 - PEXRedrawClipRegion @ 161 - PEXRemoveFromNameSet @ 162 - PEXRenderElements @ 163 - PEXRenderNetwork @ 164 - PEXRestoreModelClipVolume @ 165 - PEXRotate @ 166 - PEXRotate2D @ 167 - PEXRotateGeneral @ 168 - PEXScale @ 169 - PEXScale2D @ 170 - PEXSearchNetwork @ 171 - PEXSendOCs @ 172 - PEXSetATextAlignment @ 173 - PEXSetATextHeight @ 174 - PEXSetATextPath @ 175 - PEXSetATextStyle @ 176 - PEXSetATextUpVector @ 177 - PEXSetBFInteriorStyle @ 178 - PEXSetBFInteriorStyleIndex @ 179 - PEXSetBFReflectionAttributes @ 180 - PEXSetBFReflectionModel @ 181 - PEXSetBFSurfaceColor @ 182 - PEXSetBFSurfaceColorIndex @ 183 - PEXSetBFSurfaceInterpMethod @ 184 - PEXSetCharExpansion @ 185 - PEXSetCharHeight @ 186 - PEXSetCharSpacing @ 187 - PEXSetCharUpVector @ 188 - PEXSetColorApproxIndex @ 189 - PEXSetCurveApprox @ 190 - PEXSetDepthCueIndex @ 191 - PEXSetEchoColor @ 192 - PEXSetEdgeBundleIndex @ 193 - PEXSetEditingMode @ 194 - PEXSetElementPtr @ 195 - PEXSetElementPtrAtLabel @ 196 - PEXSetFacetCullingMode @ 197 - PEXSetFacetDistinguishFlag @ 198 - PEXSetGlobalTransform @ 199 - PEXSetGlobalTransform2D @ 200 - PEXSetHLHSRID @ 201 - PEXSetIndividualASF @ 202 - PEXSetInteriorBundleIndex @ 203 - PEXSetInteriorStyle @ 204 - PEXSetInteriorStyleIndex @ 205 - PEXSetLightSourceState @ 206 - PEXSetLineBundleIndex @ 207 - PEXSetLineColor @ 208 - PEXSetLineColorIndex @ 209 - PEXSetLineType @ 210 - PEXSetLineWidth @ 211 - PEXSetLocalTransform @ 212 - PEXSetLocalTransform2D @ 213 - PEXSetMarkerBundleIndex @ 214 - PEXSetMarkerColor @ 215 - PEXSetMarkerColorIndex @ 216 - PEXSetMarkerScale @ 217 - PEXSetMarkerType @ 218 - PEXSetModelClipFlag @ 219 - PEXSetModelClipVolume @ 220 - PEXSetModelClipVolume2D @ 221 - PEXSetOfFillAreaSets @ 222 - PEXSetParaSurfCharacteristics @ 223 - PEXSetPatternAttributes @ 224 - PEXSetPatternAttributes2D @ 225 - PEXSetPatternSize @ 226 - PEXSetPickID @ 227 - PEXSetPolylineInterpMethod @ 228 - PEXSetReflectionAttributes @ 229 - PEXSetReflectionModel @ 230 - PEXSetRenderingColorModel @ 231 - PEXSetSurfaceApprox @ 232 - PEXSetSurfaceColor @ 233 - PEXSetSurfaceColorIndex @ 234 - PEXSetSurfaceEdgeColor @ 235 - PEXSetSurfaceEdgeColorIndex @ 236 - PEXSetSurfaceEdgeFlag @ 237 - PEXSetSurfaceEdgeType @ 238 - PEXSetSurfaceEdgeWidth @ 239 - PEXSetSurfaceInterpMethod @ 240 - PEXSetTableEntries @ 241 - PEXSetTextAlignment @ 242 - PEXSetTextBundleIndex @ 243 - PEXSetTextColor @ 244 - PEXSetTextColorIndex @ 245 - PEXSetTextFontIndex @ 246 - PEXSetTextPath @ 247 - PEXSetTextPrecision @ 248 - PEXSetViewIndex @ 249 - PEXSetWorkstationBufferMode @ 250 - PEXSetWorkstationDisplayUpdateMode @ 251 - PEXSetWorkstationHLHSRMode @ 252 - PEXSetWorkstationViewPriority @ 253 - PEXSetWorkstationViewRep @ 254 - PEXSetWorkstationViewport @ 255 - PEXSetWorkstationWindow @ 256 - PEXStartOCs @ 257 - PEXText @ 258 - PEXText2D @ 259 - PEXTransformPoints @ 260 - PEXTransformPoints2D @ 261 - PEXTransformPoints2DH @ 262 - PEXTransformPoints4D @ 263 - PEXTransformVectors @ 264 - PEXTransformVectors2D @ 265 - PEXTranslate @ 266 - PEXTranslate2D @ 267 - PEXTriangleStrip @ 268 - PEXUnloadFont @ 269 - PEXUnpostAllStructures @ 270 - PEXUnpostStructure @ 271 - PEXUpdatePickMeasure @ 272 - PEXUpdateWorkstation @ 273 - PEXViewMappingMatrix @ 274 - PEXViewMappingMatrix2D @ 275 - PEXViewOrientationMatrix @ 276 - PEXViewOrientationMatrix2D @ 277 - PEXXCToNPCTransform @ 278 - PEXXCToNPCTransform2D @ 279 - _PEXDecodeEnumType @ 280 - _PEXDecodeTableIndex @ 281 - _PEXDecodeColor @ 282 - _PEXDecodeFloat @ 283 - _PEXDecodeCARD16 @ 284 - _PEXDecodeVector2D @ 285 - _PEXDecodeTextAlignment @ 286 - _PEXDecodeCurveApprox @ 287 - _PEXDecodeReflectionAttr @ 288 - _PEXDecodeSurfaceApprox @ 289 - _PEXDecodeCullMode @ 290 - _PEXDecodeSwitch @ 291 - _PEXDecodePatternSize @ 292 - _PEXDecodePatternAttr2D @ 293 - _PEXDecodePatternAttr @ 294 - _PEXDecodeASF @ 295 - _PEXDecodeLocalTransform @ 296 - _PEXDecodeLocalTransform2D @ 297 - _PEXDecodeGlobalTransform @ 298 - _PEXDecodeGlobalTransform2D @ 299 - _PEXDecodeModelClipVolume @ 300 - _PEXDecodeModelClipVolume2D @ 301 - _PEXDecodeRestoreModelClip @ 302 - _PEXDecodeLightSourceState @ 303 - _PEXDecodeID @ 304 - _PEXDecodePSC @ 305 - _PEXDecodeNameSet @ 306 - _PEXDecodeExecuteStructure @ 307 - _PEXDecodeLabel @ 308 - _PEXDecodeApplicationData @ 309 - _PEXDecodeGSE @ 310 - _PEXDecodeMarkers @ 311 - _PEXDecodeMarkers2D @ 312 - _PEXDecodePolyline @ 313 - _PEXDecodePolyline2D @ 314 - _PEXDecodeText @ 315 - _PEXDecodeText2D @ 316 - _PEXDecodeAnnoText @ 317 - _PEXDecodeAnnoText2D @ 318 - _PEXDecodePolylineSet @ 319 - _PEXDecodeNURBCurve @ 320 - _PEXDecodeFillArea @ 321 - _PEXDecodeFillArea2D @ 322 - _PEXDecodeFillAreaWithData @ 323 - _PEXDecodeFillAreaSet @ 324 - _PEXDecodeFillAreaSet2D @ 325 - _PEXDecodeFillAreaSetWithData @ 326 - _PEXDecodeTriangleStrip @ 327 - _PEXDecodeQuadMesh @ 328 - _PEXDecodeSOFA @ 329 - _PEXDecodeNURBSurface @ 330 - _PEXDecodeCellArray @ 331 - _PEXDecodeCellArray2D @ 332 - _PEXDecodeExtendedCellArray @ 333 - _PEXDecodeGDP @ 334 - _PEXDecodeGDP2D @ 335 - _PEXDecodeNoop @ 336 - _PEXEncodeEnumType @ 337 - _PEXEncodeTableIndex @ 338 - _PEXEncodeColor @ 339 - _PEXEncodeFloat @ 340 - _PEXEncodeCARD16 @ 341 - _PEXEncodeVector2D @ 342 - _PEXEncodeTextAlignment @ 343 - _PEXEncodeCurveApprox @ 344 - _PEXEncodeReflectionAttr @ 345 - _PEXEncodeSurfaceApprox @ 346 - _PEXEncodeCullMode @ 347 - _PEXEncodeSwitch @ 348 - _PEXEncodePatternSize @ 349 - _PEXEncodePatternAttr2D @ 350 - _PEXEncodePatternAttr @ 351 - _PEXEncodeASF @ 352 - _PEXEncodeLocalTransform @ 353 - _PEXEncodeLocalTransform2D @ 354 - _PEXEncodeGlobalTransform @ 355 - _PEXEncodeGlobalTransform2D @ 356 - _PEXEncodeModelClipVolume @ 357 - _PEXEncodeModelClipVolume2D @ 358 - _PEXEncodeRestoreModelClip @ 359 - _PEXEncodeLightSourceState @ 360 - _PEXEncodeID @ 361 - _PEXEncodePSC @ 362 - _PEXEncodeNameSet @ 363 - _PEXEncodeExecuteStructure @ 364 - _PEXEncodeLabel @ 365 - _PEXEncodeApplicationData @ 366 - _PEXEncodeGSE @ 367 - _PEXEncodeMarkers @ 368 - _PEXEncodePolyline @ 369 - _PEXEncodeMarkers2D @ 370 - _PEXEncodePolyline2D @ 371 - _PEXEncodeText @ 372 - _PEXEncodeText2D @ 373 - _PEXEncodeAnnoText @ 374 - _PEXEncodeAnnoText2D @ 375 - _PEXEncodePolylineSet @ 376 - _PEXEncodeNURBCurve @ 377 - _PEXEncodeFillArea @ 378 - _PEXEncodeFillArea2D @ 379 - _PEXEncodeFillAreaWithData @ 380 - _PEXEncodeFillAreaSet @ 381 - _PEXEncodeFillAreaSet2D @ 382 - _PEXEncodeFillAreaSetWithData @ 383 - _PEXEncodeTriangleStrip @ 384 - _PEXEncodeQuadMesh @ 385 - _PEXEncodeSOFA @ 386 - _PEXEncodeNURBSurface @ 387 - _PEXEncodeCellArray @ 388 - _PEXEncodeCellArray2D @ 389 - _PEXEncodeExtendedCellArray @ 390 - _PEXEncodeGDP @ 391 - _PEXEncodeGDP2D @ 392 - _PEXEncodeNoop @ 393 - _PEXSendBytesToOC @ 394 - _PEXCopyPaddedBytesToOC @ 395 - _PEXGenOCBadLengthError @ 396 - _PEXConvertMaxHitsEvent @ 397 - _PEXConvertOCError @ 398 - _PEXPrintOCError @ 399 - _PEXCloseDisplay @ 400 - _PEXIEEE32toDECF @ 401 - _PEXDECFtoIEEE32 @ 402 - _PEXOCFacet @ 403 - _PEXOCListOfFacet @ 404 - _PEXOCListOfVertex @ 405 - _PEXOCListOfColor @ 406 - _PEXStoreFacet @ 407 - _PEXStoreListOfFacet @ 408 - _PEXStoreListOfVertex @ 409 - _PEXStoreListOfColor @ 410 - _PEXExtractFacet @ 411 - _PEXExtractListOfFacet @ 412 - _PEXExtractListOfVertex @ 413 - _PEXExtractListOfColor @ 414 - PEXDisplayInfoHeader @ 415 - PEXPickCache @ 416 - PEXPickCacheSize @ 417 - PEXPickCacheInUse @ 418 - PEX_encode_oc_funcs @ 419 - PEX_decode_oc_funcs @ 420 - PEX_fp_convert @ 421 diff --git a/xc/lib/PEX5/PEX5os2.rsp b/xc/lib/PEX5/PEX5os2.rsp deleted file mode 100644 index ded21cd14..000000000 --- a/xc/lib/PEX5/PEX5os2.rsp +++ /dev/null @@ -1,6 +0,0 @@ -pl_convert.obj pl_escape.obj pl_font.obj pl_free.obj pl_lut.obj+ -pl_nameset.obj pl_oc_attr.obj pl_oc_dec.obj pl_oc_enc.obj pl_oc_prim.obj+ -pl_oc_str.obj pl_oc_util.obj pl_pc.obj pl_pick.obj pl_rdr.obj pl_sc.obj+ -pl_startup.obj pl_struct.obj pl_util.obj pl_wks.obj /NOI /NOL /NOD /BAT -PEX5.dll -PEX5.map diff --git a/xc/lib/PEX5/PEXlib.h b/xc/lib/PEX5/PEXlib.h deleted file mode 100644 index b3e110555..000000000 --- a/xc/lib/PEX5/PEXlib.h +++ /dev/null @@ -1,4426 +0,0 @@ -#ifndef _PEXLIB_H_ -#define _PEXLIB_H_ - -/* $XConsortium: PEXlib.h,v 1.11 94/04/01 18:46:54 rws Exp $ */ - -/******************************************************************************/ -/* Copyright 1987,1991 by Digital Equipment Corporation, Maynard, Mass. */ -/* */ -/* (c) Copyright Hewlett-Packard Company, 1992, Fort Collins, Colorado */ -/* */ -/* All Rights Reserved */ -/* */ -/* Permission to use, copy, modify, and distribute this software and its */ -/* documentation for any purpose and without fee is hereby granted, */ -/* provided that the above copyright notices appear in all copies and that */ -/* both the copyright notices and this permission notice appear in */ -/* supporting documentation, and that the names of Digital or */ -/* Hewlett-Packard not be used in advertising or publicity pertaining to */ -/* distribution of the software without specific, written prior permission. */ -/* */ -/* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */ -/* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL */ -/* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR */ -/* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, */ -/* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */ -/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS */ -/* SOFTWARE. */ -/* */ -/* HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS */ -/* SOFTWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard */ -/* shall not be liable for errors contained herein or direct, indirect, */ -/* special, incidental or consequential damages in connection with the */ -/* furnishing, performance or use of this software. */ -/* */ -/******************************************************************************/ - -#include -#include -#include - -/* - * floating point min and max values - */ -#define PEXMinFloatIeee_754_32 1.40129846432481707e-45 -#define PEXMaxFloatIeee_754_32 3.40282346638528860e+38 -#define PEXMinFloatIeee_754_64 4.94065645841246544e-324 -#define PEXMaxFloatIeee_754_64 1.797693134862315708e+308 - -/* - * constants for PEXInitiliaze - failure return values and error string length - */ -#define PEXBadExtension 1 -#define PEXBadProtocolVersion 2 -#define PEXBadFloatConversion 3 -#define PEXBadLocalAlloc 4 - -#define PEXErrorStringLength 80 - - -/* - * type definitions - */ -typedef XID PEXFont; -typedef XID PEXLookupTable; -typedef XID PEXNameSet; -typedef XID PEXPickMeasure; -typedef XID PEXPipelineContext; -typedef XID PEXRenderer; -typedef XID PEXSearchContext; -typedef XID PEXStructure; -typedef XID PEXWorkstation; - -typedef unsigned long PEXBitmask; -typedef unsigned short PEXBitmaskShort; -typedef short PEXColorType; -typedef unsigned char PEXContourHint; -typedef unsigned short PEXCoordType; -typedef short PEXComposition; -typedef unsigned short PEXCullMode; -typedef unsigned char PEXDynamicType; -typedef short PEXEnumTypeIndex; -typedef float PEXMatrix[4][4]; -typedef float PEXMatrix3x3[3][3]; -typedef unsigned long PEXName; -typedef int PEXOCRequestType; -typedef unsigned short PEXShapeHint; -typedef unsigned char PEXSwitch; -typedef unsigned short PEXTableIndex; -typedef unsigned short PEXTypeOrTableIndex; - -#if NeedFunctionPrototypes -typedef void *PEXPointer; -#else -typedef char *PEXPointer; -#endif - - -/* - * PEX extension information - */ -typedef struct { - unsigned short major_version; - unsigned short minor_version; - unsigned long release; - unsigned long subset_info; - char *vendor_name; - int major_opcode; - int first_event; - int first_error; -} PEXExtensionInfo; - -/* - * enumerated type information - */ -typedef struct { - PEXEnumTypeIndex index; - char *descriptor; /* null terminated string */ -} PEXEnumTypeDesc; - -/* - * implementation dependent constants - */ -typedef union { - unsigned long integer; - float flt_point; -} PEXImpDepConstant; - -/* - * match rendering targets - */ -typedef struct { - int depth; - int type; - Visual *visual; -} PEXRenderingTarget; - - -/* - * output primitive and attribute - */ - -/* output command request types */ -#define PEXOCRender 0 -#define PEXOCStore 1 -#define PEXOCRenderSingle 2 -#define PEXOCStoreSingle 3 - -/* coordinates */ -typedef struct { - float x; - float y; - float z; -} PEXCoord; - -typedef struct { - float x; - float y; -} PEXCoord2D; - -typedef struct { - float x; - float y; - float z; - float w; -} PEXCoord4D; - -/* coordinate lists without data */ -typedef struct { - unsigned long count; /* number of points */ - PEXCoord2D *points; -} PEXListOfCoord2D; /* Pointer to an array of 2D points */ - -typedef struct { - unsigned long count; /* number of points */ - PEXCoord *points; -} PEXListOfCoord; /* Pointer to an array of 3D points */ - -typedef struct { - unsigned long count; /* number of points */ - PEXCoord4D *points; -} PEXListOfCoord4D; /* Pointer to an array of 4D points */ - -typedef union { - PEXCoord2D *point_2d; - PEXCoord *point; - PEXCoord4D *point_4d; -} PEXArrayOfCoord; /* Pointer to array of points */ - -/* colors */ -typedef struct { - float red; - float green; - float blue; -} PEXColorRGB; - -typedef struct { - float hue; - float saturation; - float value; -} PEXColorHSV; - -typedef struct { - float hue; - float lightness; - float saturation; -} PEXColorHLS; - -typedef struct { - float x; - float y; - float z; -} PEXColorCIE; - -typedef struct { - unsigned char red; - unsigned char green; - unsigned char blue; - unsigned char reserved; -} PEXColorRGB8; - -typedef struct { - unsigned short red; - unsigned short green; - unsigned short blue; - unsigned short reserved; -} PEXColorRGB16; - -typedef struct { - PEXTableIndex index; - unsigned short reserved; -} PEXColorIndexed; - -typedef union { - PEXColorIndexed indexed; - PEXColorRGB rgb; - PEXColorHSV hsv; - PEXColorHLS hls; - PEXColorCIE cie; - PEXColorRGB8 rgb8; - PEXColorRGB16 rgb16; -} PEXColor; - -typedef union { - PEXColorIndexed *indexed; - PEXColorRGB *rgb; - PEXColorHSV *hsv; - PEXColorHLS *hls; - PEXColorCIE *cie; - PEXColorRGB8 *rgb8; - PEXColorRGB16 *rgb16; -} PEXArrayOfColor; - -/* vectors */ -typedef struct { - float x; - float y; - float z; -} PEXVector; - -typedef struct { - float x; - float y; -} PEXVector2D; - -/* facet data */ -typedef struct { - PEXColorIndexed index; - PEXVector normal; -} PEXColorIndexedNormal; - -typedef struct { - PEXColorRGB rgb; - PEXVector normal; -} PEXColorRGBNormal; - -typedef struct { - PEXColorCIE cie; - PEXVector normal; -} PEXColorCIENormal; - -typedef struct { - PEXColorHSV hsv; - PEXVector normal; -} PEXColorHSVNormal; - -typedef struct { - PEXColorHLS hls; - PEXVector normal; -} PEXColorHLSNormal; - -typedef struct { - PEXColorRGB8 rgb8; - PEXVector normal; -} PEXColorRGB8Normal; - -typedef struct { - PEXColorRGB16 rgb16; - PEXVector normal; -} PEXColorRGB16Normal; - -typedef union { - PEXColorIndexed index; - PEXColorRGB rgb; - PEXColorHSV hsv; - PEXColorHLS hls; - PEXColorCIE cie; - PEXColorRGB8 rgb8; - PEXColorRGB16 rgb16; - PEXVector normal; - PEXColorIndexedNormal index_normal; - PEXColorRGBNormal rgb_normal; - PEXColorHSVNormal hsv_normal; - PEXColorHLSNormal hls_normal; - PEXColorCIENormal cie_normal; - PEXColorRGB8Normal rgb8_normal; - PEXColorRGB16Normal rgb16_normal; -} PEXFacetData; - -typedef union { - PEXColorIndexed *index; - PEXColorRGB *rgb; - PEXColorHSV *hsv; - PEXColorHLS *hls; - PEXColorCIE *cie; - PEXColorRGB8 *rgb8; - PEXColorRGB16 *rgb16; - PEXVector *normal; - PEXColorIndexedNormal *index_normal; - PEXColorRGBNormal *rgb_normal; - PEXColorCIENormal *cie_normal; - PEXColorHSVNormal *hsv_normal; - PEXColorHLSNormal *hls_normal; - PEXColorRGB8Normal *rgb8_normal; - PEXColorRGB16Normal *rgb16_normal; -} PEXArrayOfFacetData; - -/* vertex data */ -typedef struct { - PEXCoord point; - PEXColorIndexed index; -} PEXVertexIndexed; - -typedef struct { - PEXCoord point; - PEXColorRGB rgb; -} PEXVertexRGB; - -typedef struct { - PEXCoord point; - PEXColorHSV hsv; -} PEXVertexHSV; - -typedef struct { - PEXCoord point; - PEXColorHLS hls; -} PEXVertexHLS; - -typedef struct { - PEXCoord point; - PEXColorCIE cie; -} PEXVertexCIE; - -typedef struct { - PEXCoord point; - PEXColorRGB8 rgb8; -} PEXVertexRGB8; - -typedef struct { - PEXCoord point; - PEXColorRGB16 rgb16; -} PEXVertexRGB16; - -typedef struct { - PEXCoord point; - PEXVector normal; -} PEXVertexNormal; - -typedef struct { - PEXCoord point; - unsigned int edge; -} PEXVertexEdge; - -typedef struct { - PEXCoord point; - PEXColorIndexed index; - PEXVector normal; -} PEXVertexIndexedNormal; - -typedef struct { - PEXCoord point; - PEXColorRGB rgb; - PEXVector normal; -} PEXVertexRGBNormal; - -typedef struct { - PEXCoord point; - PEXColorHSV hsv; - PEXVector normal; -} PEXVertexHSVNormal; - -typedef struct { - PEXCoord point; - PEXColorHLS hls; - PEXVector normal; -} PEXVertexHLSNormal; - -typedef struct { - PEXCoord point; - PEXColorCIE cie; - PEXVector normal; -} PEXVertexCIENormal; - -typedef struct { - PEXCoord point; - PEXColorRGB8 rgb8; - PEXVector normal; -} PEXVertexRGB8Normal; - -typedef struct { - PEXCoord point; - PEXColorRGB16 rgb16; - PEXVector normal; -} PEXVertexRGB16Normal; - -typedef struct { - PEXCoord point; - PEXColorIndexed index; - unsigned int edge; -} PEXVertexIndexedEdge; - -typedef struct { - PEXCoord point; - PEXColorRGB rgb; - unsigned int edge; -} PEXVertexRGBEdge; - -typedef struct { - PEXCoord point; - PEXColorHSV hsv; - unsigned int edge; -} PEXVertexHSVEdge; - -typedef struct { - PEXCoord point; - PEXColorHLS hls; - unsigned int edge; -} PEXVertexHLSEdge; - -typedef struct { - PEXCoord point; - PEXColorCIE cie; - unsigned int edge; -} PEXVertexCIEEdge; - -typedef struct { - PEXCoord point; - PEXColorRGB8 rgb8; - unsigned int edge; -} PEXVertexRGB8Edge; - -typedef struct { - PEXCoord point; - PEXColorRGB16 rgb16; - unsigned int edge; -} PEXVertexRGB16Edge; - -typedef struct { - PEXCoord point; - PEXVector normal; - unsigned int edge; -} PEXVertexNormalEdge; - -typedef struct { - PEXCoord point; - PEXColorIndexed index; - PEXVector normal; - unsigned int edge; -} PEXVertexIndexedNormalEdge; - -typedef struct { - PEXCoord point; - PEXColorRGB rgb; - PEXVector normal; - unsigned int edge; -} PEXVertexRGBNormalEdge; - -typedef struct { - PEXCoord point; - PEXColorHSV hsv; - PEXVector normal; - unsigned int edge; -} PEXVertexHSVNormalEdge; - -typedef struct { - PEXCoord point; - PEXColorHLS hls; - PEXVector normal; - unsigned int edge; -} PEXVertexHLSNormalEdge; - -typedef struct { - PEXCoord point; - PEXColorCIE cie; - PEXVector normal; - unsigned int edge; -} PEXVertexCIENormalEdge; - -typedef struct { - PEXCoord point; - PEXColorRGB8 rgb8; - PEXVector normal; - unsigned int edge; -} PEXVertexRGB8NormalEdge; - -typedef struct { - PEXCoord point; - PEXColorRGB16 rgb16; - PEXVector normal; - unsigned int edge; -} PEXVertexRGB16NormalEdge; - -typedef union { - PEXCoord *no_data; - PEXVertexIndexed *index; - PEXVertexRGB *rgb; - PEXVertexHSV *hsv; - PEXVertexHLS *hls; - PEXVertexCIE *cie; - PEXVertexRGB8 *rgb8; - PEXVertexRGB16 *rgb16; - PEXVertexNormal *normal; - PEXVertexEdge *edge; - PEXVertexIndexedNormal *index_normal; - PEXVertexRGBNormal *rgb_normal; - PEXVertexHSVNormal *hsv_normal; - PEXVertexHLSNormal *hls_normal; - PEXVertexCIENormal *cie_normal; - PEXVertexRGB8Normal *rgb8_normal; - PEXVertexRGB16Normal *rgb16_normal; - PEXVertexIndexedEdge *index_edge; - PEXVertexRGBEdge *rgb_edge; - PEXVertexHSVEdge *hsv_edge; - PEXVertexHLSEdge *hls_edge; - PEXVertexCIEEdge *cie_edge; - PEXVertexRGB8Edge *rgb8_edge; - PEXVertexRGB16Edge *rgb16_edge; - PEXVertexNormalEdge *normal_edge; - PEXVertexIndexedNormalEdge *index_normal_edge; - PEXVertexRGBNormalEdge *rgb_normal_edge; - PEXVertexHSVNormalEdge *hsv_normal_edge; - PEXVertexHLSNormalEdge *hls_normal_edge; - PEXVertexCIENormalEdge *cie_normal_edge; - PEXVertexRGB8NormalEdge *rgb8_normal_edge; - PEXVertexRGB16NormalEdge *rgb16_normal_edge; -} PEXArrayOfVertex; - -typedef struct { - unsigned long count; /* number of vertices */ - PEXArrayOfVertex vertices; /* pointer to vertices */ -} PEXListOfVertex; - -/* connectivity list for set of fill area sets */ -typedef struct { - unsigned short count; /* number of shorts */ - unsigned short *shorts; -} PEXListOfUShort; - -typedef struct { - unsigned short count; /* number of lists */ - PEXListOfUShort *lists; -} PEXConnectivityData; - -/* encoded text */ -typedef struct { - unsigned short character_set; - unsigned char character_set_width; - unsigned char encoding_state; - unsigned short reserved; - unsigned short length; - char *ch; -} PEXEncodedTextData; - -typedef struct { - unsigned short count; /* number of encodings */ - PEXEncodedTextData *encoded_text; -} PEXListOfEncodedText; - -/* trimming curves */ -typedef struct { - unsigned short count; /* number of floats */ - float *floats; -} PEXListOfFloat; - -typedef struct { - PEXSwitch visibility; - unsigned char reserved; - unsigned short order; - PEXCoordType rationality; - PEXEnumTypeIndex approx_method; - float tolerance; - float tmin, tmax; - PEXListOfFloat knots; - unsigned short count; /* number of control points */ - PEXArrayOfCoord control_points; -} PEXTrimCurve; - -typedef struct { - unsigned short count; /* number of curves */ - PEXTrimCurve *curves; -} PEXListOfTrimCurve; - -/* half spaces */ -typedef struct { - PEXCoord point; - PEXVector vector; -} PEXHalfSpace; - -typedef struct { - PEXCoord2D point; - PEXVector2D vector; -} PEXHalfSpace2D; - -/* parametric surface characteristics */ -typedef struct { - unsigned short placement_type; - unsigned short reserved; - unsigned short u_count; - unsigned short v_count; -} PEXPSCIsoparametricCurves; - -typedef struct { - PEXCoord origin; - PEXVector direction; - unsigned short count; /* number of parameters */ - unsigned short reserved; - float *parameters; -} PEXPSCLevelCurves; - -typedef struct { - unsigned short length; - char *data; -} PEXPSCImpDepData; - -typedef union { - PEXPSCIsoparametricCurves iso_curves; - PEXPSCLevelCurves level_curves; - PEXPSCImpDepData imp_dep; -} PEXPSCData; - - -/* - * pipeline context - */ -typedef struct { - PEXColorType type; - unsigned short reserved; - PEXColor value; -} PEXColorSpecifier; - -typedef struct { - unsigned short vertical; - unsigned short horizontal; -} PEXTextAlignment; - -typedef struct { - PEXEnumTypeIndex method; - unsigned short reserved; - float tolerance; -} PEXCurveApprox; - -typedef struct { - float ambient; - float diffuse; - float specular; - float specular_conc; - float transmission; - PEXColorSpecifier specular_color; -} PEXReflectionAttributes; - -typedef struct { - PEXEnumTypeIndex method; - unsigned short reserved; - float u_tolerance; - float v_tolerance; -} PEXSurfaceApprox; - -typedef struct { - unsigned short count; /* number of half spaces */ - PEXHalfSpace *half_spaces; -} PEXModelClipVolume; - -typedef struct { - unsigned short count; /* number of lights */ - PEXTableIndex *indices; -} PEXListOfLight; - -typedef struct { - short type; - PEXPSCData psc; -} PEXPSCSpecifier; - -typedef struct { - PEXEnumTypeIndex marker_type; - float marker_scale; - PEXColorSpecifier marker_color; - PEXTableIndex marker_bundle_index; - PEXTableIndex text_font; - unsigned short text_precision; - float char_expansion; - float char_spacing; - PEXColorSpecifier text_color; - float char_height; - PEXVector2D char_up_vector; - unsigned short text_path; - PEXTextAlignment text_alignment; - float atext_height; - PEXVector2D atext_up_vector; - unsigned short atext_path; - PEXTextAlignment atext_alignment; - PEXEnumTypeIndex atext_style; - PEXTableIndex text_bundle_index; - PEXEnumTypeIndex line_type; - float line_width; - PEXColorSpecifier line_color; - PEXCurveApprox curve_approx; - PEXEnumTypeIndex polyline_interp; - PEXTableIndex line_bundle_index; - PEXEnumTypeIndex interior_style; - PEXTypeOrTableIndex interior_style_index; - PEXColorSpecifier surface_color; - PEXReflectionAttributes reflection_attr; - PEXEnumTypeIndex reflection_model; - PEXEnumTypeIndex surface_interp; - PEXEnumTypeIndex bf_interior_style; - PEXTypeOrTableIndex bf_interior_style_index; - PEXColorSpecifier bf_surface_color; - PEXReflectionAttributes bf_reflection_attr; - PEXEnumTypeIndex bf_reflection_model; - PEXEnumTypeIndex bf_surface_interp; - PEXSurfaceApprox surface_approx; - unsigned short culling_mode; - Bool distinguish; - PEXCoord2D pattern_size; - PEXCoord pattern_ref_point; - PEXVector pattern_ref_vec1; - PEXVector pattern_ref_vec2; - PEXTableIndex interior_bundle_index; - PEXSwitch surface_edges; - PEXEnumTypeIndex surface_edge_type; - float surface_edge_width; - PEXColorSpecifier surface_edge_color; - PEXTableIndex edge_bundle_index; - PEXMatrix local_transform; - PEXMatrix global_transform; - unsigned short model_clip; - PEXModelClipVolume model_clip_volume; - PEXTableIndex view_index; - PEXListOfLight light_state; - PEXTableIndex depth_cue_index; - PEXBitmask asf_enables; - PEXBitmask asf_values; - long pick_id; - unsigned long hlhsr_id; - PEXNameSet name_set; - PEXTableIndex color_approx_index; - PEXEnumTypeIndex rendering_color_model; - PEXPSCSpecifier para_surf_char; -} PEXPCAttributes; - -/* macros for setting bits in a PC attribute bitmask */ - -#define PEXSetPCAttributeMask(mask, attr) \ - mask[((attr)) >> 5] |= (unsigned long) 1 << ( ((attr)) & 0x1f) - -#define PEXSetPCAttributeMaskAll(mask) \ - mask[0] = 0xffffffff; \ - mask[1] = 0xffffffff; \ - mask[2] = 0x0 - - -/* - * renderer - */ -typedef struct { - short xmin; - short ymin; - short xmax; - short ymax; -} PEXDeviceRect; - -typedef struct { - unsigned short count; /* number of device rectangles */ - PEXDeviceRect *rectangles; -} PEXListOfClipRect; - -typedef struct { - PEXCoord min; - PEXCoord max; -} PEXNPCSubVolume; - -typedef struct { - short x; - short y; - float z; -} PEXDeviceCoord; - -typedef struct { - short x; - short y; -} PEXDeviceCoord2D; - -typedef struct { - PEXDeviceCoord min; - PEXDeviceCoord max; - PEXSwitch use_drawable; - unsigned char reserved[3]; -} PEXViewport; - -typedef struct { - PEXStructure structure; - unsigned long offset; -} PEXElementRef; - -typedef struct { - unsigned long count; /* number of elements */ - PEXElementRef *elements; -} PEXStructurePath; - -typedef struct { - PEXStructure sid; - unsigned long offset; - unsigned long pick_id; -} PEXPickElementRef; - -typedef struct { - unsigned long count; /* number of elements */ - PEXPickElementRef *elements; -} PEXPickPath; - -typedef struct { - PEXPipelineContext pipeline_context; - PEXStructurePath current_path; - PEXLookupTable marker_bundle; - PEXLookupTable text_bundle; - PEXLookupTable line_bundle; - PEXLookupTable interior_bundle; - PEXLookupTable edge_bundle; - PEXLookupTable view_table; - PEXLookupTable color_table; - PEXLookupTable depth_cue_table; - PEXLookupTable light_table; - PEXLookupTable color_approx_table; - PEXLookupTable pattern_table; - PEXLookupTable text_font_table; - PEXNameSet highlight_incl; - PEXNameSet highlight_excl; - PEXNameSet invisibility_incl; - PEXNameSet invisibility_excl; - int renderer_state; - PEXEnumTypeIndex hlhsr_mode; - PEXNPCSubVolume npc_subvolume; - PEXViewport viewport; - PEXListOfClipRect clip_list; - PEXNameSet pick_incl; - PEXNameSet pick_excl; - PEXStructurePath pick_start_path; - PEXColorSpecifier background_color; - Bool clear_image; - Bool clear_z; - int echo_mode; -} PEXRendererAttributes; - -/* renderer picking */ -typedef PEXNPCSubVolume PEXPDNPCHitVolume; - -typedef struct { - PEXDeviceCoord2D position; - float distance; -} PEXPDDCHitBox; - -typedef struct { - unsigned short length; /* number of bytes in record */ - char *record; -} PEXPickDataRecord; - -typedef union { - PEXPDNPCHitVolume volume; - PEXPDDCHitBox box; - PEXPickDataRecord data; -} PEXPickRecord; - - -/* - * name set - */ -typedef struct { - PEXNameSet inclusion; - PEXNameSet exclusion; -} PEXNameSetPair; - -typedef struct { - unsigned short count; /* number of pairs */ - PEXNameSetPair *pairs; -} PEXListOfNameSetPair; - - -/* - * font - */ -typedef struct { - Atom name; - unsigned long value; -} PEXFontProp; - -typedef struct { - unsigned long first_glyph; - unsigned long last_glyph; - unsigned long default_glyph; - Bool all_exist; - Bool stroke; - unsigned short count; /* number of properties */ - PEXFontProp *props; -} PEXFontInfo; - -typedef struct { - unsigned short length; - char *ch; -} PEXStringData; - -typedef struct { - PEXCoord2D lower_left; - PEXCoord2D upper_right; - PEXCoord2D concat_point; -} PEXTextExtent; - - -/* - * look up table - */ -typedef struct { - unsigned short definable_entries; - unsigned short predefined_count; - unsigned short predefined_min; - unsigned short predefined_max; -} PEXTableInfo; - -typedef struct { - PEXEnumTypeIndex type; - PEXEnumTypeIndex interp_method; - PEXCurveApprox curve_approx; - float width; - PEXColorSpecifier color; -} PEXLineBundleEntry; - -typedef struct { - PEXEnumTypeIndex type; - short reserved; - float scale; - PEXColorSpecifier color; -} PEXMarkerBundleEntry; - -typedef struct { - PEXTableIndex font_index; - PEXEnumTypeIndex precision; - float char_expansion; - float char_spacing; - PEXColorSpecifier color; -} PEXTextBundleEntry; - -typedef struct { - PEXEnumTypeIndex style; - PEXTypeOrTableIndex style_index; - PEXEnumTypeIndex reflection_model; - PEXEnumTypeIndex interp_method; - PEXEnumTypeIndex bf_style; - PEXTypeOrTableIndex bf_style_index; - PEXEnumTypeIndex bf_reflection_model; - PEXEnumTypeIndex bf_interp_method; - PEXSurfaceApprox surface_approx; - PEXColorSpecifier color; - PEXReflectionAttributes reflection_attr; - PEXColorSpecifier bf_color; - PEXReflectionAttributes bf_reflection_attr; -} PEXInteriorBundleEntry; - -typedef struct { - PEXSwitch edge_flag; - unsigned char reserved; - PEXEnumTypeIndex type; - float width; - PEXColorSpecifier color; -} PEXEdgeBundleEntry; - -typedef struct { - PEXColorType color_type; - unsigned short row_count; - unsigned short col_count; - PEXArrayOfColor colors; /* pointer to 2D array of colors */ -} PEXPatternEntry; - -typedef PEXColorSpecifier PEXColorEntry; - -typedef struct { - unsigned short count; /* number of fonts */ - PEXFont *fonts; -} PEXTextFontEntry; - -typedef struct { - PEXEnumTypeIndex type; - unsigned short reserved; - PEXVector direction; - PEXCoord point; - float concentration; - float spread_angle; - float attenuation1; - float attenuation2; - PEXColorSpecifier color; -} PEXLightEntry; - -typedef struct { - PEXSwitch mode; - unsigned char reserved[3]; - float front_plane; - float back_plane; - float front_scaling; - float back_scaling; - PEXColorSpecifier color; -} PEXDepthCueEntry; - -typedef struct { - PEXEnumTypeIndex type; - PEXEnumTypeIndex model; - unsigned short max1; - unsigned short max2; - unsigned short max3; - PEXSwitch dither; - unsigned char reserved; - unsigned long mult1; - unsigned long mult2; - unsigned long mult3; - float weight1; - float weight2; - float weight3; - unsigned long base_pixel; -} PEXColorApproxEntry; - -typedef struct { - unsigned short clip_flags; - unsigned short reserved; - PEXNPCSubVolume clip_limits; - PEXMatrix orientation; - PEXMatrix mapping; -} PEXViewEntry; - - -/* - * structure - */ -typedef struct { - unsigned long element_count; - unsigned long size; - Bool has_refs; - unsigned short edit_mode; - unsigned long element_pointer; -} PEXStructureInfo; - -typedef struct { - unsigned short type; - unsigned short length; -} PEXElementInfo; - - -/* - * search context - */ -typedef struct { - PEXCoord position; - float distance; - unsigned short ceiling; - Bool model_clip_flag; - PEXStructurePath start_path; - PEXListOfNameSetPair normal; - PEXListOfNameSetPair inverted; -} PEXSCAttributes; - - -/* - * PHIGS workstation - */ -typedef struct { - PEXTableIndex index; - unsigned short reserved; - PEXViewEntry view; -} PEXViewRep; - -typedef struct { - unsigned short count; /* number of views */ - PEXTableIndex *views; -} PEXListOfView; - -typedef struct { - PEXStructure sid; - float priority; -} PEXPostedStructure; - -typedef struct { - unsigned long count; /* number of posted structures*/ - PEXPostedStructure *structures; -} PEXListOfPostedStructure; - -typedef struct { - short drawable_update; - int visual_state; - int drawable_surface; - int view_update; - PEXListOfView defined_views; - int wks_update; - PEXNPCSubVolume req_npc_subvolume; - PEXNPCSubVolume cur_npc_subvolume; - PEXViewport req_workstation_viewport; - PEXViewport cur_workstation_viewport; - int hlhsr_update; - PEXEnumTypeIndex req_hlhsr_mode; - PEXEnumTypeIndex cur_hlhsr_mode; - Drawable drawable; - PEXLookupTable marker_bundle; - PEXLookupTable text_bundle; - PEXLookupTable line_bundle; - PEXLookupTable interior_bundle; - PEXLookupTable edge_bundle; - PEXLookupTable color_table; - PEXLookupTable depth_cue_table; - PEXLookupTable light_table; - PEXLookupTable color_approx_table; - PEXLookupTable pattern_table; - PEXLookupTable text_font_table; - PEXNameSet highlight_incl; - PEXNameSet highlight_excl; - PEXNameSet invisibility_incl; - PEXNameSet invisibility_excl; - PEXListOfPostedStructure posted_structures; - unsigned long count_priorities; - int buffer_update; - int req_buffer_mode; - int cur_buffer_mode; -} PEXWorkstationAttributes; - -/* macros for setting bits in a workstation attribute bitmask */ - -#define PEXSetPWAttributeMask(mask, attr) \ - mask[((attr)) >> 5] |= (unsigned long) 1 << ( ((attr)) & 0x1f) - -#define PEXSetPWAttributeMaskAll(mask) \ - mask[0] = 0xffffffff; \ - mask[1] = 0x00000003 - -typedef struct { - unsigned char view_rep; - unsigned char marker_bundle; - unsigned char text_bundle; - unsigned char line_bundle; - unsigned char interior_bundle; - unsigned char edge_bundle; - unsigned char color_table; - unsigned char pattern_table; - unsigned char wks_transform; - unsigned char highlight_filter; - unsigned char invisibility_filter; - unsigned char hlhsr_mode; - unsigned char structure_modify; - unsigned char post_structure; - unsigned char unpost_structure; - unsigned char delete_structure; - unsigned char reference_modify; - unsigned char buffer_modify; - unsigned char light_table; - unsigned char depth_cue_table; - unsigned char color_approx_table; -} PEXWorkstationDynamics; - - -/* - * workstation picking - */ -typedef struct { - unsigned short status; - PEXPickPath pick_path; -} PEXPMAttributes; - -typedef struct { - unsigned short status; - PEXPickPath path; - int path_order; - PEXNameSet inclusion; - PEXNameSet exclusion; - PEXPickRecord pick_record; - PEXEnumTypeIndex prompt_echo_type; - PEXViewport echo_volume; - int echo_switch; -} PEXPDAttributes; - - -/* - * errors - */ -/* similar to XErrorEvent - use to access additional info in OC error */ -typedef struct { - int type; - Display *display; /* Display the event was read from */ - XID resourceid; /* resource id of renderer or structure */ - unsigned long serial; /* serial number of failed request */ - unsigned char error_code; /* error code of failed request */ - unsigned char request_code; /* Major op-code of failed request */ - unsigned char minor_code; /* Minor op-code of failed request */ - unsigned short op_code; /* op-code of failed output command */ - unsigned short count; /* number of output commands successfully */ - /* executed before error */ -} PEXOCErrorEvent; - - -/* - * events - */ -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - PEXRenderer renderer; -} PEXMaxHitsReachedEvent; - - -/* - * encode and decode - */ -typedef struct { - unsigned short oc_type; - union { - struct { - unsigned long count; - PEXName *names; - } AddToNameSet; - struct { - int length; - char *data; - } ApplicationData; - struct { - PEXCoord point1; - PEXCoord point2; - PEXCoord point3; - unsigned int col_count; - unsigned int row_count; - PEXTableIndex *color_indices; - } CellArray; - struct { - PEXCoord2D point1; - PEXCoord2D point2; - unsigned int col_count; - unsigned int row_count; - PEXTableIndex *color_indices; - } CellArray2D; - struct { - PEXCoord origin; - PEXCoord offset; - unsigned int count; - PEXEncodedTextData *encoded_text; - } EncodedAnnoText; - struct { - PEXCoord2D origin; - PEXCoord2D offset; - unsigned int count; - PEXEncodedTextData *encoded_text; - } EncodedAnnoText2D; - struct { - PEXCoord origin; - PEXVector vector1; - PEXVector vector2; - unsigned int count; - PEXEncodedTextData *encoded_text; - } EncodedText; - struct { - PEXCoord2D origin; - unsigned int count; - PEXEncodedTextData *encoded_text; - } EncodedText2D; - struct { - PEXStructure structure; - } ExecuteStructure; - struct { - PEXCoord point1; - PEXCoord point2; - PEXCoord point3; - unsigned int col_count; - unsigned int row_count; - int color_type; - PEXArrayOfColor colors; - } ExtendedCellArray; - struct { - int shape_hint; - int ignore_edges; - unsigned int count; - PEXCoord *points; - } FillArea; - struct { - int shape_hint; - int ignore_edges; - unsigned int count; - PEXCoord2D *points; - } FillArea2D; - struct { - int shape_hint; - int ignore_edges; - int contour_hint; - unsigned int count; - PEXListOfCoord *point_lists; - } FillAreaSet; - struct { - int shape_hint; - int ignore_edges; - int contour_hint; - unsigned int count; - PEXListOfCoord2D *point_lists; - } FillAreaSet2D; - struct { - int shape_hint; - int ignore_edges; - int contour_hint; - unsigned int facet_attributes; - unsigned int vertex_attributes; - int color_type; - unsigned int count; - PEXFacetData facet_data; - PEXListOfVertex *vertex_lists; - } FillAreaSetWithData; - struct { - int shape_hint; - int ignore_edges; - unsigned int facet_attributes; - unsigned int vertex_attributes; - int color_type; - PEXFacetData facet_data; - unsigned int count; - PEXArrayOfVertex vertices; - } FillAreaWithData; - struct { - long gdp_id; - unsigned int count; - PEXCoord *points; - unsigned long length; - char *data; - } GDP; - struct { - long gdp_id; - unsigned int count; - PEXCoord2D *points; - unsigned long length; - char *data; - } GDP2D; - struct { - long id; - int length; - char *data; - } GSE; - struct { - long label; - } Label; - struct { - unsigned int count; - PEXCoord *points; - } Markers; - struct { - unsigned int count; - PEXCoord2D *points; - } Markers2D; - struct { - int rationality; - int order; - float *knots; - unsigned int count; - PEXArrayOfCoord points; - double tmin; - double tmax; - } NURBCurve; - struct { - int rationality; - int uorder; - int vorder; - float *uknots; - float *vknots; - unsigned int col_count; - unsigned int row_count; - PEXArrayOfCoord points; - unsigned int curve_count; - PEXListOfTrimCurve *trim_curves; - } NURBSurface; - struct { - unsigned int count; - PEXCoord *points; - } Polyline; - struct { - unsigned int count; - PEXCoord2D *points; - } Polyline2D; - struct { - unsigned int vertex_attributes; - int color_type; - unsigned int count; - PEXListOfVertex *vertex_lists; - } PolylineSetWithData; - struct { - int shape_hint; - unsigned int facet_attributes; - unsigned int vertex_attributes; - int color_type; - PEXArrayOfFacetData facet_data; - unsigned int col_count; - unsigned int row_count; - PEXArrayOfVertex vertices; - } QuadrilateralMesh; - struct { - unsigned long count; - PEXName *names; - } RemoveFromNameSet; - struct { - int halignment; - int valignment; - } SetATextAlignment; - struct { - double height; - } SetATextHeight; - struct { - int path; - } SetATextPath; - struct { - int style; - } SetATextStyle; - struct { - PEXVector2D vector; - } SetATextUpVector; - struct { - int style; - } SetBFInteriorStyle; - struct { - int index; - } SetBFInteriorStyleIndex; - struct { - PEXReflectionAttributes attributes; - } SetBFReflectionAttributes; - struct { - int model; - } SetBFReflectionModel; - struct { - int color_type; - PEXColor color; - } SetBFSurfaceColor; - struct { - unsigned int index; - } SetBFSurfaceColorIndex; - struct { - int method; - } SetBFSurfaceInterpMethod; - struct { - double expansion; - } SetCharExpansion; - struct { - double height; - } SetCharHeight; - struct { - double spacing; - } SetCharSpacing; - struct { - PEXVector2D vector; - } SetCharUpVector; - struct { - unsigned int index; - } SetColorApproxIndex; - struct { - int method; - double tolerance; - } SetCurveApprox; - struct { - unsigned int index; - } SetDepthCueIndex; - struct { - unsigned int index; - } SetEdgeBundleIndex; - struct { - int mode; - } SetFacetCullingMode; - struct { - int flag; - } SetFacetDistinguishFlag; - struct { - PEXMatrix transform; - } SetGlobalTransform; - struct { - PEXMatrix3x3 transform; - } SetGlobalTransform2D; - struct { - unsigned long hlhsr_id; - } SetHLHSRID; - struct { - unsigned long attribute; - int asf; - } SetIndividualASF; - struct { - unsigned int index; - } SetInteriorBundleIndex; - struct { - int style; - } SetInteriorStyle; - struct { - int index; - } SetInteriorStyleIndex; - struct { - unsigned int enable_count; - PEXTableIndex *enable; - unsigned int disable_count; - PEXTableIndex *disable; - } SetLightSourceState; - struct { - unsigned int index; - } SetLineBundleIndex; - struct { - int color_type; - PEXColor color; - } SetLineColor; - struct { - unsigned int index; - } SetLineColorIndex; - struct { - int line_type; - } SetLineType; - struct { - double width; - } SetLineWidth; - struct { - int composition; - PEXMatrix transform; - } SetLocalTransform; - struct { - int composition; - PEXMatrix3x3 transform; - } SetLocalTransform2D; - struct { - unsigned int index; - } SetMarkerBundleIndex; - struct { - int color_type; - PEXColor color; - } SetMarkerColor; - struct { - unsigned int index; - } SetMarkerColorIndex; - struct { - double scale; - } SetMarkerScale; - struct { - int marker_type; - } SetMarkerType; - struct { - int flag; - } SetModelClipFlag; - struct { - int op; - unsigned int count; - PEXHalfSpace *half_spaces; - } SetModelClipVolume; - struct { - int op; - unsigned int count; - PEXHalfSpace2D *half_spaces; - } SetModelClipVolume2D; - struct { - int shape_hint; - unsigned int facet_attributes; - unsigned int vertex_attributes; - unsigned int edge_attributes; - int contour_hint; - int contours_all_one; - int color_type; - unsigned int set_count; - PEXArrayOfFacetData facet_data; - unsigned int vertex_count; - PEXArrayOfVertex vertices; - unsigned int index_count; - PEXSwitch *edge_flags; - PEXConnectivityData *connectivity; - } SetOfFillAreaSets; - struct { - int psc_type; - PEXPSCData characteristics; - } SetParaSurfCharacteristics; - struct { - PEXCoord ref_point; - PEXVector vector1; - PEXVector vector2; - } SetPatternAttributes; - struct { - PEXCoord2D ref_point; - } SetPatternAttributes2D; - struct { - double width; - double height; - } SetPatternSize; - struct { - unsigned long pick_id; - } SetPickID; - struct { - int method; - } SetPolylineInterpMethod; - struct { - PEXReflectionAttributes attributes; - } SetReflectionAttributes; - struct { - int model; - } SetReflectionModel; - struct { - int model; - } SetRenderingColorModel; - struct { - int method; - double utolerance; - double vtolerance; - } SetSurfaceApprox; - struct { - int color_type; - PEXColor color; - } SetSurfaceColor; - struct { - unsigned int index; - } SetSurfaceColorIndex; - struct { - int color_type; - PEXColor color; - } SetSurfaceEdgeColor; - struct { - unsigned int index; - } SetSurfaceEdgeColorIndex; - struct { - int flag; - } SetSurfaceEdgeFlag; - struct { - int edge_type; - } SetSurfaceEdgeType; - struct { - double width; - } SetSurfaceEdgeWidth; - struct { - int method; - } SetSurfaceInterpMethod; - struct { - int halignment; - int valignment; - } SetTextAlignment; - struct { - unsigned int index; - } SetTextBundleIndex; - struct { - int color_type; - PEXColor color; - } SetTextColor; - struct { - unsigned int index; - } SetTextColorIndex; - struct { - unsigned int index; - } SetTextFontIndex; - struct { - int path; - } SetTextPath; - struct { - int precision; - } SetTextPrecision; - struct { - unsigned int index; - } SetViewIndex; - struct { - unsigned int facet_attributes; - unsigned int vertex_attributes; - int color_type; - PEXArrayOfFacetData facet_data; - unsigned int count; - PEXArrayOfVertex vertices; - } TriangleStrip; - } data; -} PEXOCData; - - -/* - * encoded output commands - */ - -/* macro for inquiring max length for PEXGetOCAddr */ - -#define PEXGetOCAddrMaxSize(_display) \ - ((_display)->bufmax - (_display)->buffer) /* this macro returns the */ - /* maximum allowable size (in */ - /* bytes) for PEXGetOCAddr */ - /* individual implementations */ - /* can modify the value, but */ - /* the minimum allowed is 1024*/ - - -/* - * constants for utilities - */ - -/* constants for PEXRotate */ -#define PEXXAxis 1 -#define PEXYAxis 2 -#define PEXZAxis 3 - -/* constants for utilities error return status */ -#define PEXBadVector 1 -#define PEXBadVectors 2 -#define PEXBadLimits 3 -#define PEXBadViewport 4 -#define PEXBadPlanes 5 -#define PEXBadPRP 6 -#define PEXBadMatrix 7 -#define PEXBadPrimitive 8 -#define PEXBadDistance 9 -#define PEXBadAxis 10 -#define PEXBadHomoCoord 11 -#define PEXBadSubVolume 12 - -_XFUNCPROTOBEGIN - -/* - * function declarations - */ - -extern void PEXAccumulateState( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */, - unsigned long /* count */, - PEXElementRef * /* elements */ -#endif -); - -extern void PEXAddToNameSet( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned long /* count */, - PEXName * /* names */ -#endif -); - -extern void PEXAnnotationText( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord * /* origin */, - PEXCoord * /* offset */, - int /* length */, - char * /* string */ -#endif -); - -extern void PEXAnnotationText2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord2D * /* origin */, - PEXCoord2D * /* offset */, - int /* length */, - char * /* string */ -#endif -); - -extern void PEXApplicationData( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* length */, - char * /* data */ -#endif -); - -extern void PEXBeginPickAll( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - PEXRenderer /* renderer */, - long /* structure_id */, - int /* method */, - int /* send_event */, - int /* max_hits */, - int /* pick_device_type */, - PEXPickRecord * /* pick_record */ -#endif -); - -extern void PEXBeginPickOne( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - PEXRenderer /* renderer */, - long /* structure_id */, - int /* method */, - int /* pick_device_type */, - PEXPickRecord * /* pick_record */ -#endif -); - -extern void PEXBeginRendering( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - PEXRenderer /* renderer */ -#endif -); - -extern void PEXBeginStructure( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */, - long /* structure_id */ -#endif -); - -extern void PEXBuildTransform( -#if NeedFunctionPrototypes - PEXCoord * /* fixed_point */, - PEXVector * /* trans_vector */, - double /* angle_x */, - double /* angle_y */, - double /* angle_z */, - PEXVector * /* scale_vector */, - PEXMatrix /* matrix_return */ -#endif -); - -extern void PEXBuildTransform2D( -#if NeedFunctionPrototypes - PEXCoord2D * /* fixed_point */, - PEXVector2D * /* trans_vector */, - double /* angle_z */, - PEXVector2D * /* scale_vector */, - PEXMatrix3x3 /* matrix_return */ -#endif -); - -extern void PEXCellArray( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord * /* point1 */, - PEXCoord * /* point2 */, - PEXCoord * /* point3 */, - unsigned int /* col_count */, - unsigned int /* row_count */, - PEXTableIndex * /* color_indices */ -#endif -); - -extern void PEXCellArray2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord2D * /* point1 */, - PEXCoord2D * /* point2 */, - unsigned int /* col_count */, - unsigned int /* row_count */, - PEXTableIndex * /* color_indices */ -#endif -); - -extern void PEXChangeNameSet( -#if NeedFunctionPrototypes - Display * /* display */, - PEXNameSet /* nameset */, - int /* action */, - unsigned long /* count */, - PEXName * /* names */ -#endif -); - -extern void PEXChangePickDevice( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - int /* pick_device_type */, - unsigned long /* value_mask */, - PEXPDAttributes * /* values */ -#endif -); - -extern void PEXChangePipelineContext( -#if NeedFunctionPrototypes - Display * /* display */, - PEXPipelineContext /* context */, - unsigned long * /* value_mask */, - PEXPCAttributes * /* values */ -#endif -); - -extern void PEXChangeRenderer( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */, - unsigned long /* value_mask */, - PEXRendererAttributes * /* values */ -#endif -); - -extern void PEXChangeSearchContext( -#if NeedFunctionPrototypes - Display * /* display */, - PEXSearchContext /* context */, - unsigned long /* value_mask */, - PEXSCAttributes * /* values */ -#endif -); - -extern void PEXChangeStructureRefs( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* old_structure */, - PEXStructure /* new_structure */ -#endif -); - -extern void PEXCopyBytesToOC( -#if NeedFunctionPrototypes - Display * /* display */, - int /* length */, - char * /* data */ -#endif -); - -extern void PEXCopyElements( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* src_structure */, - int /* src_whence1 */, - long /* src_offset1 */, - int /* src_whence2 */, - long /* src_offset2 */, - PEXStructure /* dst_structure */, - int /* dst_whence */, - long /* dst_offset */ -#endif -); - -extern void PEXCopyLookupTable( -#if NeedFunctionPrototypes - Display * /* display */, - PEXLookupTable /* src_table */, - PEXLookupTable /* dst_table */ -#endif -); - -extern void PEXCopyNameSet( -#if NeedFunctionPrototypes - Display * /* display */, - PEXNameSet /* src_nameset */, - PEXNameSet /* dst_nameset */ -#endif -); - -extern void PEXCopyPipelineContext( -#if NeedFunctionPrototypes - Display * /* display */, - unsigned long * /* value_mask */, - PEXPipelineContext /* src_context */, - PEXPipelineContext /* dst_context */ -#endif -); - -extern void PEXCopySearchContext( -#if NeedFunctionPrototypes - Display * /* display */, - unsigned long /* value_mask */, - PEXSearchContext /* src_context */, - PEXSearchContext /* dst_context */ -#endif -); - -extern void PEXCopyStructure( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* src_structure */, - PEXStructure /* dst_structure */ -#endif -); - -extern PEXLookupTable PEXCreateLookupTable( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - int /* table_type */ -#endif -); - -extern PEXNameSet PEXCreateNameSet( -#if NeedFunctionPrototypes - Display * /* display */ -#endif -); - -extern PEXPickMeasure PEXCreatePickMeasure( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - int /* pick_device_type */ -#endif -); - -extern PEXPipelineContext PEXCreatePipelineContext( -#if NeedFunctionPrototypes - Display * /* display */, - unsigned long * /* value_mask */, - PEXPCAttributes * /* values */ -#endif -); - -extern PEXRenderer PEXCreateRenderer( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - unsigned long /* value_mask */, - PEXRendererAttributes * /* values */ -#endif -); - -extern PEXSearchContext PEXCreateSearchContext( -#if NeedFunctionPrototypes - Display * /* display */, - unsigned long /* value_mask */, - PEXSCAttributes * /* values */ -#endif -); - -extern PEXStructure PEXCreateStructure( -#if NeedFunctionPrototypes - Display * /* display */ -#endif -); - -extern PEXWorkstation PEXCreateWorkstation( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - PEXLookupTable /* line_bundle */, - PEXLookupTable /* marker_bundle */, - PEXLookupTable /* text_bundle */, - PEXLookupTable /* interior_bundle */, - PEXLookupTable /* edge_bundle */, - PEXLookupTable /* color_table */, - PEXLookupTable /* pattern_table */, - PEXLookupTable /* font_table */, - PEXLookupTable /* depth_cue_table */, - PEXLookupTable /* light_table */, - PEXLookupTable /* color_approx_table */, - PEXNameSet /* highlight_incl */, - PEXNameSet /* highlight_excl */, - PEXNameSet /* invisibility_incl */, - PEXNameSet /* invisibility_excl */, - int /* buffer_mode */ -#endif -); - -extern PEXOCData *PEXDecodeOCs( -#if NeedFunctionPrototypes - int /* float_format */, - unsigned long /* oc_count */, - unsigned long /* length */, - char * /* encoded_ocs */ -#endif -); - -extern void PEXDeleteBetweenLabels( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - long /* label1 */, - long /* label2 */ -#endif -); - -extern void PEXDeleteElements( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* whence1 */, - long /* offset1 */, - int /* whence2 */, - long /* offset2 */ -#endif -); - -extern void PEXDeleteTableEntries( -#if NeedFunctionPrototypes - Display * /* display */, - PEXLookupTable /* table */, - unsigned int /* start */, - unsigned int /* count */ -#endif -); - -extern void PEXDeleteToLabel( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* whence */, - long /* offset */, - long /* label */ -#endif -); - -extern void PEXDestroyStructures( -#if NeedFunctionPrototypes - Display * /* display */, - unsigned long /* count */, - PEXStructure * /* structures */ -#endif -); - -extern Status PEXElementSearch( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* whence */, - long /* offset */, - int /* direction */, - unsigned long /* incl_count */, - unsigned short * /* incl_list */, - unsigned long /* excl_count */, - unsigned short * /* excl_list */, - unsigned long * /* elem_offset_return */ -#endif -); - -extern char *PEXEncodeOCs( -#if NeedFunctionPrototypes - int /* float_format */, - unsigned long /* oc_count */, - PEXOCData * /* oc_data */, - unsigned long * /* length_return */ -#endif -); - -extern void PEXEncodedAnnoText( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord * /* origin */, - PEXCoord * /* offset */, - unsigned int /* count */, - PEXEncodedTextData * /* encoded_text */ -#endif -); - -extern void PEXEncodedAnnoText2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord2D * /* origin */, - PEXCoord2D * /* offset */, - unsigned int /* count */, - PEXEncodedTextData * /* encoded_text */ -#endif -); - -extern void PEXEncodedText( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord * /* origin */, - PEXVector * /* vector1 */, - PEXVector * /* vector2 */, - unsigned int /* count */, - PEXEncodedTextData * /* encoded_text */ -#endif -); - -extern void PEXEncodedText2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord2D * /* origin */, - unsigned int /* count */, - PEXEncodedTextData * /* encoded_text */ -#endif -); - -extern PEXPickPath *PEXEndPickAll( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */, - int * /* status_return */, - int * /* more_return */, - unsigned long * /* count_return */ -#endif -); - -extern PEXPickPath *PEXEndPickOne( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */, - int * /* status_return */, - int * /* undetectable_return */ -#endif -); - -extern void PEXEndRendering( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */, - int /* flush */ -#endif -); - -extern void PEXEndStructure( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */ -#endif -); - -extern void PEXEscape( -#if NeedFunctionPrototypes - Display * /* display */, - unsigned long /* escape_id */, - int /* length */, - char * /* escape_data */ -#endif -); - -extern char *PEXEscapeWithReply( -#if NeedFunctionPrototypes - Display * /* display */, - unsigned long /* escape_id */, - int /* length */, - char * /* escape_data */, - unsigned long * /* reply_length_return */ -#endif -); - -extern void PEXExecuteDeferredActions( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */ -#endif -); - -extern void PEXExecuteStructure( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXStructure /* structure */ -#endif -); - -extern void PEXExtendedCellArray( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord * /* point1 */, - PEXCoord * /* point2 */, - PEXCoord * /* point3 */, - unsigned int /* col_count */, - unsigned int /* row_count */, - int /* color_type */, - PEXArrayOfColor /* colors */ -#endif -); - -extern Status PEXFetchElements( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* whence1 */, - long /* offset1 */, - int /* whence2 */, - long /* offset2 */, - int /* float_format */, - unsigned long * /* count_return */, - unsigned long * /* length_return */, - char ** /* ocs_return */ -#endif -); - -extern Status PEXFetchElementsAndSend( -#if NeedFunctionPrototypes - Display * /* src_display */, - PEXStructure /* structure */, - int /* whence1 */, - long /* offset1 */, - int /* whence2 */, - long /* offset2 */, - Display * /* dst_display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */ -#endif -); - -extern void PEXFillArea( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* shape_hint */, - int /* ignore_edges */, - unsigned int /* count */, - PEXCoord * /* points */ -#endif -); - -extern void PEXFillArea2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* shape_hint */, - int /* ignore_edges */, - unsigned int /* count */, - PEXCoord2D * /* points */ -#endif -); - -extern void PEXFillAreaSet( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* shape_hint */, - int /* ignore_edges */, - int /* contour_hint */, - unsigned int /* count */, - PEXListOfCoord * /* point_lists */ -#endif -); - -extern void PEXFillAreaSet2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* shape_hint */, - int /* ignore_edges */, - int /* contour_hint */, - unsigned int /* count */, - PEXListOfCoord2D * /* point_lists */ -#endif -); - -extern void PEXFillAreaSetWithData( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* shape_hint */, - int /* ignore_edges */, - int /* contour_hint */, - unsigned int /* facet_attributes */, - unsigned int /* vertex_attributes */, - int /* color_type */, - unsigned int /* count */, - PEXFacetData * /* facet_data */, - PEXListOfVertex * /* vertex_lists */ -#endif -); - -extern void PEXFillAreaWithData( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* shape_hint */, - int /* ignore_edges */, - unsigned int /* facet_attributes */, - unsigned int /* vertex_attributes */, - int /* color_type */, - PEXFacetData * /* facet_data */, - unsigned int /* count */, - PEXArrayOfVertex /* vertices */ -#endif -); - -extern void PEXFinishOCs( -#if NeedFunctionPrototypes - Display * /* display */ -#endif -); - -extern void PEXFreeEnumInfo( -#if NeedFunctionPrototypes - unsigned long /* count */, - unsigned long * /* info_count */, - PEXEnumTypeDesc * /* enum_info */ -#endif -); - -extern void PEXFreeFontInfo( -#if NeedFunctionPrototypes - unsigned long /* count */, - PEXFontInfo * /* font_info */ -#endif -); - -extern void PEXFreeFontNames( -#if NeedFunctionPrototypes - unsigned long /* count */, - char ** /* font_names */ -#endif -); - -extern void PEXFreeLookupTable( -#if NeedFunctionPrototypes - Display * /* display */, - PEXLookupTable /* table */ -#endif -); - -extern void PEXFreeNameSet( -#if NeedFunctionPrototypes - Display * /* display */, - PEXNameSet /* nameset */ -#endif -); - -extern void PEXFreeOCData( -#if NeedFunctionPrototypes - unsigned long /* count */, - PEXOCData * /* oc_data */ -#endif -); - -extern void PEXFreePCAttributes( -#if NeedFunctionPrototypes - PEXPCAttributes * /* values */ -#endif -); - -extern void PEXFreePDAttributes( -#if NeedFunctionPrototypes - PEXPDAttributes * /* values */ -#endif -); - -extern void PEXFreePMAttributes( -#if NeedFunctionPrototypes - PEXPMAttributes * /* values */ -#endif -); - -extern void PEXFreePickMeasure( -#if NeedFunctionPrototypes - Display * /* display */, - PEXPickMeasure /* pick_measure */ -#endif -); - -extern void PEXFreePickPaths( -#if NeedFunctionPrototypes - unsigned long /* count */, - PEXPickPath * /* pick_paths */ -#endif -); - -extern void PEXFreePipelineContext( -#if NeedFunctionPrototypes - Display * /* display */, - PEXPipelineContext /* context */ -#endif -); - -extern void PEXFreeRenderer( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */ -#endif -); - -extern void PEXFreeRendererAttributes( -#if NeedFunctionPrototypes - PEXRendererAttributes * /* values */ -#endif -); - -extern void PEXFreeSCAttributes( -#if NeedFunctionPrototypes - PEXSCAttributes * /* values */ -#endif -); - -extern void PEXFreeSearchContext( -#if NeedFunctionPrototypes - Display * /* display */, - PEXSearchContext /* context */ -#endif -); - -extern void PEXFreeStructurePaths( -#if NeedFunctionPrototypes - unsigned long /* count */, - PEXStructurePath * /* paths */ -#endif -); - -extern void PEXFreeTableEntries( -#if NeedFunctionPrototypes - int /* table_type */, - unsigned int /* count */, - PEXPointer /* entries */ -#endif -); - -extern void PEXFreeWorkstation( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */ -#endif -); - -extern void PEXFreeWorkstationAttributes( -#if NeedFunctionPrototypes - PEXWorkstationAttributes * /* values */ -#endif -); - -extern void PEXGDP( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - long /* gdp_id */, - unsigned int /* count */, - PEXCoord * /* points */, - unsigned long /* length */, - char * /* data */ -#endif -); - -extern void PEXGDP2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - long /* gdp_id */, - unsigned int /* count */, - PEXCoord2D * /* points */, - unsigned long /* length */, - char * /* data */ -#endif -); - -extern void PEXGSE( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - long /* id */, - int /* length */, - char * /* data */ -#endif -); - -extern int PEXGeoNormFillArea( -#if NeedFunctionPrototypes - unsigned int /* facet_attributes */, - unsigned int /* vertex_attributes */, - int /* color_type */, - PEXFacetData * /* facet_data */, - unsigned int /* count */, - PEXArrayOfVertex /* vertices */ -#endif -); - -extern int PEXGeoNormFillAreaSet( -#if NeedFunctionPrototypes - unsigned int /* facet_attributes */, - unsigned int /* vertex_attributes */, - int /* color_type */, - unsigned int /* count */, - PEXFacetData * /* facet_data */, - PEXListOfVertex * /* vertex_lists */ -#endif -); - -extern int PEXGeoNormQuadrilateralMesh( -#if NeedFunctionPrototypes - unsigned int /* facet_attributes */, - unsigned int /* vertex_attributes */, - int /* color_type */, - PEXArrayOfFacetData /* facet_data */, - unsigned int /* col_count */, - unsigned int /* row_count */, - PEXArrayOfVertex /* vertices */ -#endif -); - -extern int PEXGeoNormSetOfFillAreaSets( -#if NeedFunctionPrototypes - unsigned int /* facet_attributes */, - unsigned int /* vertex_attributes */, - int /* color_type */, - unsigned int /* set_count */, - PEXArrayOfFacetData /* facet_data */, - unsigned int /* vertex_count */, - PEXArrayOfVertex /* vertices */, - unsigned int /* index_count */, - PEXConnectivityData * /* connectivity */ -#endif -); - -extern int PEXGeoNormTriangleStrip( -#if NeedFunctionPrototypes - unsigned int /* facet_attributes */, - unsigned int /* vertex_attributes */, - int /* color_type */, - PEXArrayOfFacetData /* facet_data */, - unsigned int /* count */, - PEXArrayOfVertex /* vertices */ -#endif -); - -extern PEXStructurePath *PEXGetAncestors( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* path_part */, - unsigned long /* path_depth */, - unsigned long * /* count_return */ -#endif -); - -extern Status PEXGetDefinedIndices( -#if NeedFunctionPrototypes - Display * /* display */, - PEXLookupTable /* table */, - unsigned long * /* count_return */, - PEXTableIndex ** /* indices_return */ -#endif -); - -extern PEXStructurePath *PEXGetDescendants( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* path_part */, - unsigned long /* path_depth */, - unsigned long * /* count_return */ -#endif -); - -extern Status PEXGetElementInfo( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* whence1 */, - long /* offset1 */, - int /* whence2 */, - long /* offset2 */, - int /* float_format */, - unsigned long * /* count_return */, - PEXElementInfo ** /* info_return */ -#endif -); - -extern Status PEXGetEnumTypeInfo( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - unsigned long /* count */, - int * /* enum_types */, - unsigned long /* item_mask */, - unsigned long ** /* info_count_return */, - PEXEnumTypeDesc ** /* enum_info_return */ -#endif -); - -extern PEXExtensionInfo *PEXGetExtensionInfo( -#if NeedFunctionPrototypes - Display * /* display */ -#endif -); - -extern Status PEXGetImpDepConstants( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - unsigned long /* count */, - unsigned short * /* names */, - PEXImpDepConstant ** /* constants_return */ -#endif -); - -extern Status PEXGetNameSet( -#if NeedFunctionPrototypes - Display * /* display */, - PEXNameSet /* nameset */, - unsigned long * /* count_return */, - PEXName ** /* names_return */ -#endif -); - -extern char *PEXGetOCAddr( -#if NeedFunctionPrototypes - Display * /* display */, - int /* length */ -#endif -); - -extern PEXPDAttributes *PEXGetPickDevice( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - int /* pick_device_type */, - unsigned long /* value_mask */ -#endif -); - -extern PEXPMAttributes *PEXGetPickMeasure( -#if NeedFunctionPrototypes - Display * /* display */, - PEXPickMeasure /* pick_measure */, - unsigned long /* value_mask */ -#endif -); - -extern PEXPCAttributes *PEXGetPipelineContext( -#if NeedFunctionPrototypes - Display * /* display */, - PEXPipelineContext /* context */, - unsigned long * /* value_mask */ -#endif -); - -extern Status PEXGetPredefinedEntries( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - int /* table_type */, - unsigned int /* start */, - unsigned int /* count */, - PEXPointer * /* entries_return */ -#endif -); - -extern int PEXGetProtocolFloatFormat( -#if NeedFunctionPrototypes - Display * /* display */ -#endif -); - -extern PEXRendererAttributes *PEXGetRendererAttributes( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */, - unsigned long /* value_mask */ -#endif -); - -extern Status PEXGetRendererDynamics( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */, - unsigned long * /* tables_return */, - unsigned long * /* name_sets_return */, - unsigned long * /* attributes_return */ -#endif -); - -extern PEXSCAttributes *PEXGetSearchContext( -#if NeedFunctionPrototypes - Display * /* display */, - PEXSearchContext /* context */, - unsigned long /* value_mask */ -#endif -); - -extern int PEXGetSizeOCs( -#if NeedFunctionPrototypes - int /* float_format */, - int /* oc_count */, - PEXOCData * /* oc_data */ -#endif -); - -extern Status PEXGetStructureInfo( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* float_format */, - unsigned long /* value_mask */, - PEXStructureInfo * /* info_return */ -#endif -); - -extern PEXStructure *PEXGetStructuresInNetwork( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* which */, - unsigned long * /* count_return */ -#endif -); - -extern Status PEXGetTableEntries( -#if NeedFunctionPrototypes - Display * /* display */, - PEXLookupTable /* table */, - unsigned int /* start */, - unsigned int /* count */, - int /* value_type */, - int * /* table_type_return */, - PEXPointer * /* entries_return */ -#endif -); - -extern PEXPointer PEXGetTableEntry( -#if NeedFunctionPrototypes - Display * /* display */, - PEXLookupTable /* table */, - unsigned int /* index */, - int /* value_type */, - int * /* status_return */, - int * /* table_type_return */ -#endif -); - -extern Status PEXGetTableInfo( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - int /* table_type */, - PEXTableInfo * /* info_return */ -#endif -); - -extern PEXWorkstationAttributes *PEXGetWorkstationAttributes( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - unsigned long * /* value_mask */ -#endif -); - -extern Status PEXGetWorkstationDynamics( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - PEXWorkstationDynamics * /* dynamics_return */ -#endif -); - -extern Status PEXGetWorkstationPostings( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - unsigned long * /* count_return */, - PEXWorkstation ** /* postings_return */ -#endif -); - -extern Status PEXGetWorkstationViewRep( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - unsigned int /* index */, - int * /* update_return */, - PEXViewRep * /* req_view_return */, - PEXViewRep * /* cur_view_return */ -#endif -); - -extern void PEXIdentityMatrix( -#if NeedFunctionPrototypes - PEXMatrix /* transform_return */ -#endif -); - -extern void PEXIdentityMatrix2D( -#if NeedFunctionPrototypes - PEXMatrix3x3 /* transform_return */ -#endif -); - -extern int PEXInitialize( -#if NeedFunctionPrototypes - Display * /* display */, - PEXExtensionInfo ** /* info_return */, - int /* length */, - char * /* error_string */ -#endif -); - -extern int PEXInvertMatrix( -#if NeedFunctionPrototypes - PEXMatrix /* transform */, - PEXMatrix /* transform_return */ -#endif -); - -extern int PEXInvertMatrix2D( -#if NeedFunctionPrototypes - PEXMatrix3x3 /* transform */, - PEXMatrix3x3 /* transform_return */ -#endif -); - -extern void PEXLabel( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - long /* label */ -#endif -); - -extern char **PEXListFonts( -#if NeedFunctionPrototypes - Display * /* display */, - char * /* pattern */, - unsigned int /* max_names */, - unsigned long * /* count_return */ -#endif -); - -extern char **PEXListFontsWithInfo( -#if NeedFunctionPrototypes - Display * /* display */, - char * /* pattern */, - unsigned int /* max_names */, - unsigned long * /* count_return */, - PEXFontInfo ** /* info_return */ -#endif -); - -extern PEXFont PEXLoadFont( -#if NeedFunctionPrototypes - Display * /* display */, - char * /* font_name */ -#endif -); - -extern int PEXLookAtViewMatrix( -#if NeedFunctionPrototypes - PEXCoord * /* from */, - PEXCoord * /* to */, - PEXVector * /* up */, - PEXMatrix /* matrix_return */ -#endif -); - -extern Status PEXMapDCToWC( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - unsigned long /* dc_count */, - PEXDeviceCoord * /* dc_points */, - unsigned int * /* view_index_return */, - unsigned long * /* wc_count_return */, - PEXCoord ** /* wc_points_return */ -#endif -); - -extern Status PEXMapWCToDC( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - unsigned long /* wc_count */, - PEXCoord * /* wc_points */, - unsigned int /* view_index */, - unsigned long * /* dc_count_return */, - PEXDeviceCoord ** /* dc_points_return */ -#endif -); - -extern int PEXMapXCToNPC( -#if NeedFunctionPrototypes - int /* point_count */, - PEXDeviceCoord2D * /* points */, - unsigned int /* window_height */, - double /* z_dc */, - PEXDeviceCoord * /* viewport */, - PEXNPCSubVolume * /* npc_sub_volume */, - int /* view_count */, - PEXViewEntry * /* views */, - int * /* view_return */, - int * /* count_return */, - PEXCoord * /* points_return */ -#endif -); - -extern int PEXMapXCToNPC2D( -#if NeedFunctionPrototypes - int /* point_count */, - PEXDeviceCoord2D * /* points */, - unsigned int /* window_height */, - PEXDeviceCoord2D * /* viewport */, - PEXNPCSubVolume * /* npc_sub_volume */, - int /* view_count */, - PEXViewEntry * /* views */, - int * /* view_return */, - int * /* count_return */, - PEXCoord2D * /* points_return */ -#endif -); - -extern void PEXMarkers( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* count */, - PEXCoord * /* points */ -#endif -); - -extern void PEXMarkers2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* count */, - PEXCoord2D * /* points */ -#endif -); - -extern Status PEXMatchRenderingTargets( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - int /* depth */, - int /* type */, - Visual * /* visual */, - unsigned long /* max_targets */, - unsigned long * /* count_return */, - PEXRenderingTarget ** /* targets_return */ -#endif -); - -extern void PEXMatrixMult( -#if NeedFunctionPrototypes - PEXMatrix /* matrix1 */, - PEXMatrix /* matrix2 */, - PEXMatrix /* matrix_return */ -#endif -); - -extern void PEXMatrixMult2D( -#if NeedFunctionPrototypes - PEXMatrix3x3 /* matrix1 */, - PEXMatrix3x3 /* matrix2 */, - PEXMatrix3x3 /* matrix_return */ -#endif -); - -extern int PEXNPCToXCTransform( -#if NeedFunctionPrototypes - PEXNPCSubVolume * /* npc_sub_volume */, - PEXDeviceCoord * /* viewport */, - unsigned int /* window_height */, - PEXMatrix /* transform_return */ -#endif -); - -extern int PEXNPCToXCTransform2D( -#if NeedFunctionPrototypes - PEXNPCSubVolume * /* npc_sub_volume */, - PEXDeviceCoord2D * /* viewport */, - unsigned int /* window_height */, - PEXMatrix3x3 /* transform_return */ -#endif -); - -extern void PEXNURBCurve( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* rationality */, - int /* order */, - float * /* knots */, - unsigned int /* count */, - PEXArrayOfCoord /* points */, - double /* tmin */, - double /* tmax */ -#endif -); - -extern void PEXNURBSurface( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* rationality */, - int /* uorder */, - int /* vorder */, - float * /* uknots */, - float * /* vknots */, - unsigned int /* col_count */, - unsigned int /* row_count */, - PEXArrayOfCoord /* points */, - unsigned int /* curve_count */, - PEXListOfTrimCurve * /* trim_curves */ -#endif -); - -extern void PEXNoop( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */ -#endif -); - -extern int PEXNormalizeVectors( -#if NeedFunctionPrototypes - int /* count */, - PEXVector * /* vectors */, - PEXVector * /* vectors_return */ -#endif -); - -extern int PEXNormalizeVectors2D( -#if NeedFunctionPrototypes - int /* count */, - PEXVector2D * /* vectors */, - PEXVector2D * /* vectors_return */ -#endif -); - -extern int PEXOrthoProjMatrix( -#if NeedFunctionPrototypes - double /* height */, - double /* aspect */, - double /* near */, - double /* far */, - PEXMatrix /* matrix_return */ -#endif -); - -extern int PEXPerspProjMatrix( -#if NeedFunctionPrototypes - double /* fovy */, - double /* distance */, - double /* aspect */, - double /* near */, - double /* far */, - PEXMatrix /* matrix_return */ -#endif -); - -extern PEXPickPath *PEXPickAll( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - PEXRenderer /* renderer */, - int /* method */, - int /* max_hits */, - int /* pick_device_type */, - PEXPickRecord * /* pick_record */, - int * /* status_return */, - int * /* more_return */, - unsigned long * /* count_return */ -#endif -); - -extern PEXPickPath *PEXPickOne( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - PEXRenderer /* renderer */, - PEXStructure /* structure */, - int /* method */, - int /* pick_device_type */, - PEXPickRecord * /* pick_record */, - int * /* status_return */, - int * /* undetectable_return */ -#endif -); - -extern int PEXPolarViewMatrix( -#if NeedFunctionPrototypes - PEXCoord * /* from */, - double /* distance */, - double /* azimuth */, - double /* altitude */, - double /* twist */, - PEXMatrix /* matrix_return */ -#endif -); - -extern void PEXPolyline( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* count */, - PEXCoord * /* points */ -#endif -); - -extern void PEXPolyline2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* count */, - PEXCoord2D * /* points */ -#endif -); - -extern void PEXPolylineSetWithData( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* vertex_attributes */, - int /* color_type */, - unsigned int /* count */, - PEXListOfVertex * /* vertex_lists */ -#endif -); - -extern void PEXPostStructure( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - PEXStructure /* structure */, - double /* priority */ -#endif -); - -extern void PEXQuadrilateralMesh( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* shape_hint */, - unsigned int /* facet_attributes */, - unsigned int /* vertex_attributes */, - int /* color_type */, - PEXArrayOfFacetData /* facet_data */, - unsigned int /* col_count */, - unsigned int /* row_count */, - PEXArrayOfVertex /* vertices */ -#endif -); - -extern PEXTextExtent *PEXQueryEncodedTextExtents( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - unsigned int /* font_table_index */, - int /* path */, - double /* expansion */, - double /* spacing */, - double /* height */, - int /* halign */, - int /* valign */, - unsigned long /* count */, - PEXListOfEncodedText * /* encoded_text */ -#endif -); - -extern PEXFontInfo *PEXQueryFont( -#if NeedFunctionPrototypes - Display * /* display */, - PEXFont /* font */ -#endif -); - -extern PEXTextExtent *PEXQueryTextExtents( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - unsigned int /* font_table_index */, - int /* path */, - double /* expansion */, - double /* spacing */, - double /* height */, - int /* halign */, - int /* valign */, - unsigned long /* count */, - PEXStringData * /* text */ -#endif -); - -extern void PEXRedrawAllStructures( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */ -#endif -); - -extern void PEXRedrawClipRegion( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - unsigned long /* count */, - PEXDeviceRect * /* clip_rectangles */ -#endif -); - -extern void PEXRemoveFromNameSet( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned long /* count */, - PEXName * /* names */ -#endif -); - -extern void PEXRenderElements( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */, - PEXStructure /* structure */, - int /* whence1 */, - long /* offset1 */, - int /* whence2 */, - long /* offset2 */ -#endif -); - -extern void PEXRenderNetwork( -#if NeedFunctionPrototypes - Display * /* display */, - Drawable /* drawable */, - PEXRenderer /* renderer */, - PEXStructure /* structure */ -#endif -); - -extern void PEXRestoreModelClipVolume( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */ -#endif -); - -extern int PEXRotate( -#if NeedFunctionPrototypes - int /* axis */, - double /* angle */, - PEXMatrix /* matrix_return */ -#endif -); - -extern void PEXRotate2D( -#if NeedFunctionPrototypes - double /* angle */, - PEXMatrix3x3 /* matrix_return */ -#endif -); - -extern int PEXRotateGeneral( -#if NeedFunctionPrototypes - PEXCoord * /* point1 */, - PEXCoord * /* point2 */, - double /* angle */, - PEXMatrix /* matrix_return */ -#endif -); - -extern void PEXScale( -#if NeedFunctionPrototypes - PEXVector * /* scale_vector */, - PEXMatrix /* matrix_return */ -#endif -); - -extern void PEXScale2D( -#if NeedFunctionPrototypes - PEXVector2D * /* scale_vector */, - PEXMatrix3x3 /* matrix_return */ -#endif -); - -extern Status PEXSearchNetwork( -#if NeedFunctionPrototypes - Display * /* display */, - PEXSearchContext /* context */, - PEXStructurePath ** /* path_return */ -#endif -); - -extern void PEXSendOCs( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* float_format */, - unsigned long /* oc_count */, - unsigned int /* length */, - char * /* encoded_ocs */ -#endif -); - -extern void PEXSetATextAlignment( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* halignment */, - int /* valignment */ -#endif -); - -extern void PEXSetATextHeight( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - double /* height */ -#endif -); - -extern void PEXSetATextPath( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* path */ -#endif -); - -extern void PEXSetATextStyle( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* style */ -#endif -); - -extern void PEXSetATextUpVector( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXVector2D * /* vector */ -#endif -); - -extern void PEXSetBFInteriorStyle( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* style */ -#endif -); - -extern void PEXSetBFInteriorStyleIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* index */ -#endif -); - -extern void PEXSetBFReflectionAttributes( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXReflectionAttributes * /* attributes */ -#endif -); - -extern void PEXSetBFReflectionModel( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* model */ -#endif -); - -extern void PEXSetBFSurfaceColor( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* color_type */, - PEXColor * /* color */ -#endif -); - -extern void PEXSetBFSurfaceColorIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetBFSurfaceInterpMethod( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* method */ -#endif -); - -extern void PEXSetCharExpansion( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - double /* expansion */ -#endif -); - -extern void PEXSetCharHeight( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - double /* height */ -#endif -); - -extern void PEXSetCharSpacing( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - double /* spacing */ -#endif -); - -extern void PEXSetCharUpVector( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXVector2D * /* vector */ -#endif -); - -extern void PEXSetColorApproxIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetCurveApprox( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* method */, - double /* tolerance */ -#endif -); - -extern void PEXSetDepthCueIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetEchoColor( -#if NeedFunctionPrototypes - Display * /* display */, - PEXRenderer /* renderer */, - int /* color_type */, - PEXColor * /* color */ -#endif -); - -extern void PEXSetEdgeBundleIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetEditingMode( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* mode */ -#endif -); - -extern void PEXSetElementPtr( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - int /* whence */, - long /* offset */ -#endif -); - -extern void PEXSetElementPtrAtLabel( -#if NeedFunctionPrototypes - Display * /* display */, - PEXStructure /* structure */, - long /* label */, - long /* offset */ -#endif -); - -extern void PEXSetFacetCullingMode( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* mode */ -#endif -); - -extern void PEXSetFacetDistinguishFlag( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* flag */ -#endif -); - -extern void PEXSetGlobalTransform( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXMatrix /* transform */ -#endif -); - -extern void PEXSetGlobalTransform2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXMatrix3x3 /* transform */ -#endif -); - -extern void PEXSetHLHSRID( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned long /* hlhsr_id */ -#endif -); - -extern void PEXSetIndividualASF( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned long /* attribute */, - int /* asf */ -#endif -); - -extern void PEXSetInteriorBundleIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetInteriorStyle( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* style */ -#endif -); - -extern void PEXSetInteriorStyleIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* index */ -#endif -); - -extern void PEXSetLightSourceState( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* enable_count */, - PEXTableIndex * /* enable */, - unsigned int /* disable_count */, - PEXTableIndex * /* disable */ -#endif -); - -extern void PEXSetLineBundleIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetLineColor( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* color_type */, - PEXColor * /* color */ -#endif -); - -extern void PEXSetLineColorIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetLineType( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* line_type */ -#endif -); - -extern void PEXSetLineWidth( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - double /* width */ -#endif -); - -extern void PEXSetLocalTransform( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* composition */, - PEXMatrix /* transform */ -#endif -); - -extern void PEXSetLocalTransform2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* composition */, - PEXMatrix3x3 /* transform */ -#endif -); - -extern void PEXSetMarkerBundleIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetMarkerColor( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* color_type */, - PEXColor * /* color */ -#endif -); - -extern void PEXSetMarkerColorIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetMarkerScale( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - double /* scale */ -#endif -); - -extern void PEXSetMarkerType( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* marker_type */ -#endif -); - -extern void PEXSetModelClipFlag( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* flag */ -#endif -); - -extern void PEXSetModelClipVolume( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* op */, - unsigned int /* count */, - PEXHalfSpace * /* half_spaces */ -#endif -); - -extern void PEXSetModelClipVolume2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* op */, - unsigned int /* count */, - PEXHalfSpace2D * /* half_spaces */ -#endif -); - -extern void PEXSetOfFillAreaSets( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* shape_hint */, - unsigned int /* facet_attributes */, - unsigned int /* vertex_attributes */, - unsigned int /* edge_attributes */, - int /* contour_hint */, - int /* contours_all_one */, - int /* color_type */, - unsigned int /* set_count */, - PEXArrayOfFacetData /* facet_data */, - unsigned int /* vertex_count */, - PEXArrayOfVertex /* vertices */, - unsigned int /* index_count */, - PEXSwitch * /* edge_flags */, - PEXConnectivityData * /* connectivity */ -#endif -); - -extern void PEXSetParaSurfCharacteristics( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* psc_type */, - PEXPSCData * /* characteristics */ -#endif -); - -extern void PEXSetPatternAttributes( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord * /* ref_point */, - PEXVector * /* vector1 */, - PEXVector * /* vector2 */ -#endif -); - -extern void PEXSetPatternAttributes2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord2D * /* ref_point */ -#endif -); - -extern void PEXSetPatternSize( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - double /* width */, - double /* height */ -#endif -); - -extern void PEXSetPickID( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned long /* pick_id */ -#endif -); - -extern void PEXSetPolylineInterpMethod( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* method */ -#endif -); - -extern void PEXSetReflectionAttributes( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXReflectionAttributes * /* attributes */ -#endif -); - -extern void PEXSetReflectionModel( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* model */ -#endif -); - -extern void PEXSetRenderingColorModel( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* model */ -#endif -); - -extern void PEXSetSurfaceApprox( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* method */, - double /* utolerance */, - double /* vtolerance */ -#endif -); - -extern void PEXSetSurfaceColor( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* color_type */, - PEXColor * /* color */ -#endif -); - -extern void PEXSetSurfaceColorIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetSurfaceEdgeColor( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* color_type */, - PEXColor * /* color */ -#endif -); - -extern void PEXSetSurfaceEdgeColorIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetSurfaceEdgeFlag( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* flag */ -#endif -); - -extern void PEXSetSurfaceEdgeType( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* edge_type */ -#endif -); - -extern void PEXSetSurfaceEdgeWidth( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - double /* width */ -#endif -); - -extern void PEXSetSurfaceInterpMethod( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* method */ -#endif -); - -extern void PEXSetTableEntries( -#if NeedFunctionPrototypes - Display * /* display */, - PEXLookupTable /* table */, - unsigned int /* start */, - unsigned int /* count */, - int /* table_type */, - PEXPointer /* entries */ -#endif -); - -extern void PEXSetTextAlignment( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* halignment */, - int /* valignment */ -#endif -); - -extern void PEXSetTextBundleIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetTextColor( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* color_type */, - PEXColor * /* color */ -#endif -); - -extern void PEXSetTextColorIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetTextFontIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetTextPath( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* path */ -#endif -); - -extern void PEXSetTextPrecision( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* precision */ -#endif -); - -extern void PEXSetViewIndex( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* index */ -#endif -); - -extern void PEXSetWorkstationBufferMode( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - int /* buffer_mode */ -#endif -); - -extern void PEXSetWorkstationDisplayUpdateMode( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - int /* update_mode */ -#endif -); - -extern void PEXSetWorkstationHLHSRMode( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - int /* hlhsr_mode */ -#endif -); - -extern void PEXSetWorkstationViewPriority( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - unsigned int /* index1 */, - unsigned int /* index2 */, - int /* priority */ -#endif -); - -extern void PEXSetWorkstationViewRep( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - unsigned int /* view_index */, - PEXViewEntry * /* values */ -#endif -); - -extern void PEXSetWorkstationViewport( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - PEXViewport * /* viewport */ -#endif -); - -extern void PEXSetWorkstationWindow( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - PEXNPCSubVolume * /* workstation_window */ -#endif -); - -extern Status PEXStartOCs( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - int /* float_format */, - int /* oc_count */, - int /* word_count */ -#endif -); - -extern void PEXText( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord * /* origin */, - PEXVector * /* vector1 */, - PEXVector * /* vector2 */, - int /* length */, - char * /* string */ -#endif -); - -extern void PEXText2D( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - PEXCoord2D * /* origin */, - int /* length */, - char * /* string */ -#endif -); - -extern int PEXTransformPoints( -#if NeedFunctionPrototypes - PEXMatrix /* transform */, - int /* count */, - PEXCoord * /* points */, - PEXCoord * /* points_return */ -#endif -); - -extern int PEXTransformPoints2D( -#if NeedFunctionPrototypes - PEXMatrix3x3 /* transform */, - int /* count */, - PEXCoord2D * /* points */, - PEXCoord2D * /* points_return */ -#endif -); - -extern void PEXTransformPoints2DH( -#if NeedFunctionPrototypes - PEXMatrix3x3 /* transform */, - int /* count */, - PEXCoord * /* points */, - PEXCoord * /* points_return */ -#endif -); - -extern void PEXTransformPoints4D( -#if NeedFunctionPrototypes - PEXMatrix /* transform */, - int /* count */, - PEXCoord4D * /* points */, - PEXCoord4D * /* points_return */ -#endif -); - -extern void PEXTransformVectors( -#if NeedFunctionPrototypes - PEXMatrix /* transform */, - int /* count */, - PEXVector * /* vectors */, - PEXVector * /* vectors_return */ -#endif -); - -extern void PEXTransformVectors2D( -#if NeedFunctionPrototypes - PEXMatrix3x3 /* transform */, - int /* count */, - PEXVector2D * /* vectors */, - PEXVector2D * /* vectors_return */ -#endif -); - -extern void PEXTranslate( -#if NeedFunctionPrototypes - PEXVector * /* trans_vector */, - PEXMatrix /* matrix_return */ -#endif -); - -extern void PEXTranslate2D( -#if NeedFunctionPrototypes - PEXVector2D * /* trans_vector */, - PEXMatrix3x3 /* matrix_return */ -#endif -); - -extern void PEXTriangleStrip( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */, - unsigned int /* facet_attributes */, - unsigned int /* vertex_attributes */, - int /* color_type */, - PEXArrayOfFacetData /* facet_data */, - unsigned int /* count */, - PEXArrayOfVertex /* vertices */ -#endif -); - -extern void PEXUnloadFont( -#if NeedFunctionPrototypes - Display * /* display */, - PEXFont /* font */ -#endif -); - -extern void PEXUnpostAllStructures( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */ -#endif -); - -extern void PEXUnpostStructure( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */, - PEXStructure /* structure */ -#endif -); - -extern void PEXUpdatePickMeasure( -#if NeedFunctionPrototypes - Display * /* display */, - PEXPickMeasure /* pick_measure */, - int /* pick_device_type */, - PEXPickRecord * /* pick_record */ -#endif -); - -extern void PEXUpdateWorkstation( -#if NeedFunctionPrototypes - Display * /* display */, - PEXWorkstation /* workstation */ -#endif -); - -extern int PEXViewMappingMatrix( -#if NeedFunctionPrototypes - PEXCoord2D * /* frame */, - PEXNPCSubVolume * /* viewport */, - int /* perspective */, - PEXCoord * /* prp */, - double /* view_plane */, - double /* back_plane */, - double /* front_plane */, - PEXMatrix /* matrix_return */ -#endif -); - -extern int PEXViewMappingMatrix2D( -#if NeedFunctionPrototypes - PEXCoord2D * /* frame */, - PEXCoord2D * /* viewport */, - PEXMatrix3x3 /* matrix_return */ -#endif -); - -extern int PEXViewOrientationMatrix( -#if NeedFunctionPrototypes - PEXCoord * /* vrp */, - PEXVector * /* vpn */, - PEXVector * /* vup */, - PEXMatrix /* matrix_return */ -#endif -); - -extern int PEXViewOrientationMatrix2D( -#if NeedFunctionPrototypes - PEXCoord2D * /* vrp */, - PEXVector2D * /* vup */, - PEXMatrix3x3 /* matrix_return */ -#endif -); - -extern int PEXXCToNPCTransform( -#if NeedFunctionPrototypes - PEXNPCSubVolume * /* npc_sub_volume */, - PEXDeviceCoord * /* viewport */, - unsigned int /* window_height */, - PEXMatrix /* transform_return */ -#endif -); - -extern int PEXXCToNPCTransform2D( -#if NeedFunctionPrototypes - PEXNPCSubVolume * /* npc_sub_volume */, - PEXDeviceCoord2D * /* viewport */, - unsigned int /* window_height */, - PEXMatrix3x3 /* transform_return */ -#endif -); - -extern unsigned long PEXCountOCs( -#if NeedFunctionPrototypes - int /* float_format */, - unsigned long /* length */, - char * /* encoded_ocs */ -#endif -); - -_XFUNCPROTOEND - -#endif /* _PEXLIB_H_ */ diff --git a/xc/lib/PEX5/PEXlibint.h b/xc/lib/PEX5/PEXlibint.h deleted file mode 100644 index 2d3f46391..000000000 --- a/xc/lib/PEX5/PEXlibint.h +++ /dev/null @@ -1,1052 +0,0 @@ -/* $TOG: PEXlibint.h /main/19 1998/02/06 16:09:05 kaleb $ */ - -/****************************************************************************** - -Copyright 1992, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1987,1991 by Digital Equipment Corporation, Maynard, Massachusetts - - All Rights Reserved - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting documentation, and that -the name of Digital not be used in advertising or publicity -pertaining to distribution of the software without specific, written prior -permission. Digital make no representations about the suitability -of this software for any purpose. It is provided "as is" without express or -implied warranty. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************************/ - -#ifndef _PEXLIBINT_H_ -#define _PEXLIBINT_H_ - -#define NEED_REPLIES -#include -#include -#include "PEXproto.h" -#include "pl_convert.h" -#include "pl_store.h" -#include "pl_extract.h" -#include "pl_xdata.h" - - -/* ------------------------------------------------------------------------- - * Display extension data structures and macros. - * ------------------------------------------------------------------------- */ - -/* - * For each display initialized by PEXInitialize(), a record is allocated - * which holds various information about that display. These records are - * maintained in a linked list. The record for the most recently referenced - * display is always kept at the beginning of the list (for quick access). - */ - -typedef struct PEXDisplayInfo -{ - Display *display; /* pointer to X display structure */ - XExtCodes *extCodes; /* extension codes */ - PEXExtensionInfo *extInfo; /* extension info */ - unsigned char extOpcode; /* opcode for pex extension */ - unsigned short fpFormat; /* floating point format */ - char fpConvert; /* flag for floating point conversion */ - PEXEnumTypeDesc *fpSupport; /* float formats supported by server */ - int fpCount; /* number of float formats supported */ - XID lastResID; /* renderer/structure ID of last OC */ - int lastReqType; /* request type (store/rend) of last OC */ - int lastReqNum; /* request number of last OC */ - struct PEXDisplayInfo *next; /* next in list */ -} PEXDisplayInfo; - - -/* - * Insert a new record in the beginning of the linked list. - */ - -#define PEXAddDisplayInfo(_display, _info) \ -\ -{ \ - _info->display = _display; \ -\ - _info->next = PEXDisplayInfoHeader; \ - PEXDisplayInfoHeader = _info; \ -} - - -/* - * Remove the record assosicated with '_display' from the linked list - * and return a pointer to it in '_info'. - */ - -#define PEXRemoveDisplayInfo(_display, _info) \ -\ -{ \ - PEXDisplayInfo *prev = NULL; \ -\ - _info = PEXDisplayInfoHeader; \ -\ - while (_info && _info->display != _display) \ - { \ - prev = _info; \ - _info = _info->next; \ - } \ -\ - if (_info) \ - if (!prev) \ - PEXDisplayInfoHeader = _info->next; \ - else \ - prev->next = _info->next; \ -} - - -/* - * Return the info assosicated with '_display' in '_info'. - * If the info is not the first in the list, move it to the front. - */ - -#define PEXGetDisplayInfo(_display, _info) \ -\ -{ \ - if (_info = PEXDisplayInfoHeader) \ - { \ - if (PEXDisplayInfoHeader->display != _display) \ - { \ - PEXDisplayInfo *prev = PEXDisplayInfoHeader; \ -\ - _info = _info->next; \ - while (_info && _info->display != _display) \ - { \ - prev = _info; \ - _info = _info->next; \ - } \ -\ - if (_info) \ - { \ - prev->next = _info->next; \ - _info->next = PEXDisplayInfoHeader; \ - PEXDisplayInfoHeader = _info; \ - } \ - } \ - } \ -} - - - -/* ------------------------------------------------------------------------- - * Memory related macros. - * ------------------------------------------------------------------------- */ - -#define PAD(_size) (3 - (((_size) + 3) & 0x3)) - -#define PADDED_BYTES(_bytes) (_bytes + PAD (_bytes)) - -#define NUMWORDS(_size) (((unsigned int) ((_size) + 3)) >> 2) - -#define NUMBYTES(_len) (((unsigned int) (_len)) << 2) - -#define LENOF(_ctype) (SIZEOF (_ctype) >> 2) - - -/* - * Count the number of ones in a longword. - */ - -#define CountOnes(_mask, _countReturn) \ - _countReturn = ((_mask) - (((_mask)>>1)&0x77777777) \ - - (((_mask)>>2)&0x33333333) - (((_mask)>>3)&0x11111111)); \ - _countReturn = ((((_countReturn)+((_countReturn)>>4)) & 0x0F0F0F0F) % 255) - - - -/* ------------------------------------------------------------------------- - * Macros for dealing with the transport buffer. - * ------------------------------------------------------------------------- */ - -/* - * The maximum protocol request size. - */ - -#define MAX_REQUEST_SIZE ((1<<16) - 1) - - -/* - * Has the X transport buffer been flushed? - */ - -#define XBufferFlushed(_display) \ - ((_display)->buffer == (_display)->bufptr) - - -/* - * The number of bytes left in the X transport buffer. - */ - -#define BytesLeftInXBuffer(_display) \ - ((_display)->bufmax - (_display)->bufptr) - - -/* - * The number of words left in the X transport buffer. - */ - -#define WordsLeftInXBuffer(_display) \ - (((_display)->bufmax - (_display)->bufptr) >> 2) - - -/* - * See if XSynchronize has been called. If so, send request right away. - */ - -#define PEXSyncHandle(_display)\ - if ((_display)->synchandler) (*(_display)->synchandler) (_display) - - -/* - * Read a reply into a scratch buffer. - */ - -#define XREAD_INTO_SCRATCH(_display, _pBuf, _numBytes) \ - _pBuf = (char *) _XAllocTemp (_display, (unsigned long) (_numBytes)); \ - _XRead (_display, _pBuf, (long) (_numBytes)); - -#define FINISH_WITH_SCRATCH(_display, _pBuf, _numBytes) \ - _XFreeTemp (_display, _pBuf, (unsigned long) (_numBytes)); - - -/* ------------------------------------------------------------------------- - * Output Command request header. The pexOpCode field specifies the type - * of request - Render Output Commands or Store Elements. - * ------------------------------------------------------------------------- */ - -typedef struct pexOCRequestHeader -{ - CARD8 extOpcode; - CARD8 pexOpcode; - CARD16 reqLength B16; - INT16 fpFormat B16; - CARD16 pad B16; - CARD32 target B32; - CARD32 numCommands B32; -} pexOCRequestHeader; - - - -/* ------------------------------------------------------------------------- - * Macros for setting up requests. - * ------------------------------------------------------------------------- */ - -/* - * Request names and opcodes. - */ - -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) -#define REQNAME(_name_) pex##_name_##Req -#define REQOPCODE(_name_) PEXRC##_name_ -#define REQSIZE(_name_) sz_pex##_name_##Req -#else -#define REQNAME(_name_) pex/**/_name_/**/Req -#define REQOPCODE(_name_) PEXRC/**/_name_ -#define REQSIZE(_name_) sz_pex/**/_name_/**/Req -#endif - - -/* - * PEXGetReq sets up a request to be sent to the X server. If there isn't - * enough room left in the X buffer, it is flushed before the new request - * is started. - */ - -#define PEXGetReq(_name, _req) \ - if ((display->bufptr + REQSIZE(_name)) > display->bufmax) \ - _XFlush (display); \ - _req = (char *) (display->last_req = display->bufptr); \ - display->bufptr += REQSIZE(_name); \ - display->request++ - - -/* - * PEXGetReqExtra is the same as PEXGetReq and except that an additional - * "n" bytes are allocated after the request. "n" will be padded to a word - * boundary. - */ - -#define PEXGetReqExtra(_name, _n, _req) \ - if ((display->bufptr + REQSIZE(_name) + \ - PADDED_BYTES (_n)) > display->bufmax) _XFlush (display); \ - _req = (char *) (display->last_req = display->bufptr); \ - display->bufptr += (REQSIZE(_name) + PADDED_BYTES (_n)); \ - display->request++ - - -/* - * BEGIN_REQUEST_HEADER and END_REQUEST_HEADER are used to hide - * the extra work that has to be done on 64 bit clients. On such - * machines, all structure pointers must point to an 8 byte boundary. - * As a result, we must first store the request header info in - * a static data stucture, then bcopy it into the transport buffer. - */ - -#ifndef WORD64 - -#define BEGIN_REQUEST_HEADER(_name, _pBuf, _pReq) \ -{ \ - PEXDisplayInfo *pexDisplayInfo; \ - PEXGetDisplayInfo (display, pexDisplayInfo); \ - _pReq = (REQNAME(_name) *) _pBuf; - -#define END_REQUEST_HEADER(_name, _pBuf, _pReq) \ - _pBuf += REQSIZE(_name); \ -} - -#else /* WORD64 */ - -#define BEGIN_REQUEST_HEADER(_name, _pBuf, _pReq) \ -{ \ - PEXDisplayInfo *pexDisplayInfo; \ - REQNAME(_name) tReq; \ - PEXGetDisplayInfo (display, pexDisplayInfo); \ - _pReq = &tReq; - -#define END_REQUEST_HEADER(_name, _pBuf, _pReq) \ - memcpy (_pBuf, _pReq, REQSIZE(_name)); \ - _pBuf += REQSIZE(_name); \ -} - -#endif /* WORD64 */ - - -/* - * Macros used to store the request header info. - */ - -#define PEXStoreReqHead(_name, _req) \ - _req->reqType = pexDisplayInfo->extOpcode; \ - _req->opcode = REQOPCODE(_name); \ - _req->length = (REQSIZE(_name)) >> 2; - - -#define PEXStoreFPReqHead(_name, _fpFormat, _req) \ - _req->reqType = pexDisplayInfo->extOpcode; \ - _req->opcode = REQOPCODE(_name); \ - _req->length = (REQSIZE(_name)) >> 2; \ - _req->fpFormat = _fpFormat; - -#define PEXStoreReqExtraHead(_name, _extraBytes, _req) \ - _req->reqType = pexDisplayInfo->extOpcode; \ - _req->opcode = REQOPCODE(_name); \ - _req->length = (REQSIZE(_name) + PADDED_BYTES (_extraBytes)) >> 2; - -#define PEXStoreFPReqExtraHead(_name, _fpFormat, _extraBytes, _req) \ - _req->reqType = pexDisplayInfo->extOpcode; \ - _req->opcode = REQOPCODE(_name); \ - _req->length = (REQSIZE(_name) + PADDED_BYTES (_extraBytes)) >> 2; \ - _req->fpFormat = _fpFormat; - - - -/* - * Return flag for floating point conversion, as well as the - * float format to convert to. The call to this macro must come - * after BEGIN_REQUEST_HEADER and before END_REQUEST_HEADER. - */ - -#define CHECK_FP(_fpConvert, _fpFormat) \ - _fpConvert = pexDisplayInfo->fpConvert; \ - _fpFormat = pexDisplayInfo->fpFormat; - - - -/* ------------------------------------------------------------------------- - * Get pointer to a structure in a buffer stream. On 64 bit clients, - * all structure pointers must point to an 8 byte boundary. As a result, - * we must first bcopy into a static data structure, then return a pointer - * to this static data structure. - * - * Note: GET_STRUCT_PTR must be used in the declaration section of a block. - * ------------------------------------------------------------------------- */ - -#ifndef WORD64 - -#define GET_STRUCT_PTR(_name, _pBuf, _pStruct) \ - _pStruct = (_name *) _pBuf; - -#else /* WORD64 */ - -#define GET_STRUCT_PTR(_name, _pBuf, _pStruct) \ - _name tStruct; \ - memcpy (&tStruct, _pBuf, SIZEOF (_name)); \ - _pStruct = &tStruct; - -#endif /* WORD64 */ - - - -/* ------------------------------------------------------------------------- - * Color related macros. - * ------------------------------------------------------------------------- */ - -/* - * Protocol color size based on color type (in bytes). - */ - -#define GetColorSize(_type) \ - ((_type) == PEXColorTypeIndexed ? SIZEOF (pexIndexedColor) : \ - ((_type) == PEXColorTypeRGB8 ? SIZEOF (pexRgb8Color) : \ - ((_type) == PEXColorTypeRGB16 ? SIZEOF (pexRgb16Color) : \ - SIZEOF (pexRgbFloatColor)))) - -/* - * Protocol color size based on color type (in words). - */ - -#define GetColorLength(_type)\ - ((_type) == PEXColorTypeIndexed ? LENOF (pexIndexedColor) :\ - ((_type) == PEXColorTypeRGB8 ? LENOF (pexRgb8Color) :\ - ((_type) == PEXColorTypeRGB16 ? LENOF (pexRgb16Color) : \ - LENOF (pexRgbFloatColor)))) - -/* - * Client color size based on color type (in bytes). - */ - -#define GetClientColorSize(_type) \ - ((_type) == PEXColorTypeIndexed ? sizeof (PEXColorIndexed) : \ - ((_type) == PEXColorTypeRGB8 ? sizeof (PEXColorRGB8) : \ - ((_type) == PEXColorTypeRGB16 ? sizeof (PEXColorRGB16) : \ - sizeof (PEXColorRGB)))) - - - -/* ------------------------------------------------------------------------- - * Constants - * ------------------------------------------------------------------------- */ - -/* - * IEEE-754-32 is the most common floating point type. Vendors who have - * a different native floating point format should define NATIVE_FP_FORMAT - * at compile time via the -D switch (this is done by modifying the vendors - * config file to include a "#define PexNativeFPFormat your_format". - */ - -#ifndef NATIVE_FP_FORMAT -#define NATIVE_FP_FORMAT PEXIEEE_754_32 -#endif - - -/* - * The PEXlib SI supports Cray floating point format, but this constant - * is not a registered float format, so it's not found in PEX.h. We define - * it here. - * - * If a vendor wants to add support for his own float format in PEXlib, he - * should add a consant here for the format, and bump up NUM_FP_FORMATS. - * Then he must modify the fp conversion function table found in the file - * pl_global_def.h to include his format. - * - * Note : Floating point formats 1-4 are registered with PEX at this time. - */ - -#define PEXCRAY_Floating 5 - -#define NUM_FP_FORMATS 5 - - -/* - * Maximum size of pick cache in bytes. - */ - -#define MAX_PICK_CACHE_SIZE 2048 - - -/* - * Protocol data structure sizes. SIZEOF (rec) == sz_rec. - */ - -#define sz_pexAccumulateStateReq 12 -#define sz_pexAddToNameSet 4 -#define sz_pexRemoveFromNameSet 4 -#define sz_pexAnnotationText 32 -#define sz_pexAnnotationText2D 24 -#define sz_pexApplicationData 8 -#define sz_pexATextStyle 8 -#define sz_pexBeginPickAllReq 28 -#define sz_pexBeginPickOneReq 20 -#define sz_pexBeginRenderingReq 12 -#define sz_pexBeginStructureReq 12 -#define sz_pexCellArray 48 -#define sz_pexCellArray2D 28 -#define sz_pexChangeNameSetReq 12 -#define sz_pexChangePickDeviceReq 20 -#define sz_pexChangePipelineContextReq 24 -#define sz_pexChangeRendererReq 16 -#define sz_pexChangeSearchContextReq 16 -#define sz_pexChangeStructureRefsReq 12 -#define sz_pexCharExpansion 8 -#define sz_pexCharHeight 8 -#define sz_pexATextHeight 8 -#define sz_pexCharSpacing 8 -#define sz_pexCharUpVector 12 -#define sz_pexATextUpVector 12 -#define sz_pexCopyElementsReq 36 -#define sz_pexCopyLookupTableReq 12 -#define sz_pexCopyNameSetReq 12 -#define sz_pexCopyPipelineContextReq 24 -#define sz_pexCopySearchContextReq 16 -#define sz_pexCopyStructureReq 12 -#define sz_pexCreateLookupTableReq 16 -#define sz_pexCreatePickMeasureReq 16 -#define sz_pexCreatePipelineContextReq 24 -#define sz_pexCreateRendererReq 20 -#define sz_pexCreateSearchContextReq 16 -#define sz_pexCreateWorkstationReq 76 -#define sz_pexFacetCullingMode 8 -#define sz_pexCurveApprox 12 -#define sz_pexDeleteBetweenLabelsReq 16 -#define sz_pexDeleteElementsReq 24 -#define sz_pexDeleteElementsToLabelReq 20 -#define sz_pexDeleteTableEntriesReq 12 -#define sz_pexDestroyStructuresReq 8 -#define sz_pexFacetDistinguishFlag 8 -#define sz_pexElementSearchReply 32 -#define sz_pexElementSearchReq 28 -#define sz_pexEndPickAllReply 32 -#define sz_pexEndPickAllReq 8 -#define sz_pexEndPickOneReply 32 -#define sz_pexEndPickOneReq 8 -#define sz_pexEndRenderingReq 12 -#define sz_pexEscapeReq 8 -#define sz_pexEscapeWithReplyReq sz_pexEscapeReq -#define sz_pexEscapeWithReplyReply 32 -#define sz_pexExecuteStructure 8 -#define sz_pexExtendedCellArray 52 -#define sz_pexFillAreaWithData 16 -#define sz_pexFillAreaSetWithData 20 -#define sz_pexFetchElementsReply 32 -#define sz_pexFetchElementsReq 28 -#define sz_pexFillArea 8 -#define sz_pexFillArea2D 8 -#define sz_pexFillAreaSet 12 -#define sz_pexFillAreaSet2D 12 -#define sz_pexGDP 16 -#define sz_pexGDP2D 16 -#define sz_pexGetAncestorsReply 32 -#define sz_pexGetAncestorsReq 16 -#define sz_pexGetDescendantsReq sz_pexGetAncestorsReq -#define sz_pexGetDefinedIndicesReply 32 -#define sz_pexGetElementInfoReply 32 -#define sz_pexGetElementInfoReq 28 -#define sz_pexGetEnumTypeInfoReply 32 -#define sz_pexGetEnumTypeInfoReq 16 -#define sz_pexGetExtensionInfoReply 32 -#define sz_pexGetExtensionInfoReq 8 -#define sz_pexGetImpDepConstantsReply 32 -#define sz_pexGetImpDepConstantsReq 16 -#define sz_pexGetNameSetReply 32 -#define sz_pexGetPickDeviceReply 32 -#define sz_pexGetPickDeviceReq 16 -#define sz_pexGetPickMeasureReply 32 -#define sz_pexGetPickMeasureReq 12 -#define sz_pexGetPipelineContextReply 32 -#define sz_pexGetPipelineContextReq 24 -#define sz_pexGetPredefinedEntriesReply 32 -#define sz_pexGetPredefinedEntriesReq 20 -#define sz_pexGetRendererAttributesReply 32 -#define sz_pexGetRendererAttributesReq 16 -#define sz_pexGetRendererDynamicsReply 32 -#define sz_pexGetSearchContextReply 32 -#define sz_pexGetSearchContextReq 16 -#define sz_pexGetStructureInfoReply 32 -#define sz_pexGetStructureInfoReq 12 -#define sz_pexGetStructuresInNetworkRepl 32 -#define sz_pexGetStructuresInNetworkReq 12 -#define sz_pexGetTableEntriesReply 32 -#define sz_pexGetTableEntriesReq 16 -#define sz_pexGetTableEntryReply 32 -#define sz_pexGetTableEntryReq 16 -#define sz_pexGetTableInfoReply 32 -#define sz_pexGetTableInfoReq 12 -#define sz_pexGetWorkstationAttributesReply 32 -#define sz_pexGetWorkstationAttributesReq 20 -#define sz_pexGetWorkstationDynamicsReply 32 -#define sz_pexGetWorkstationDynamicsReq 8 -#define sz_pexGetWorkstationPostingsReply 32 -#define sz_pexGetWorkstationViewRepReply 32 -#define sz_pexGetWorkstationViewRepReq 12 -#define sz_pexGlobalTransform 68 -#define sz_pexGlobalTransform2D 40 -#define sz_pexGSE 12 -#define sz_pexHLHSRID 8 -#define sz_pexInteriorStyle 8 -#define sz_pexBFInteriorStyle 8 -#define sz_pexLabel 8 -#define sz_pexLightSourceState 8 -#define sz_pexLineType 8 -#define sz_pexLineWidth 8 -#define sz_pexSurfaceEdgeWidth 8 -#define sz_pexListFontsReply 32 -#define sz_pexListFontsReq 8 -#define sz_pexListFontsWithInfoReply 32 -#define sz_pexListFontsWithInfoReq 12 -#define sz_pexLoadFontReq 12 -#define sz_pexLocalTransform 72 -#define sz_pexLocalTransform2D 44 -#define sz_pexLookupTable 4 -#define sz_pexMapDCtoWCReply 32 -#define sz_pexMapDCtoWCReq 16 -#define sz_pexMapWCtoDCReply 32 -#define sz_pexMapWCtoDCReq 16 -#define sz_pexMarkers 4 -#define sz_pexMarkers2D 4 - -#define sz_pexMarkerBundleIndex 8 -#define sz_pexTextBundleIndex 8 -#define sz_pexLineBundleIndex 8 -#define sz_pexInteriorBundleIndex 8 -#define sz_pexInteriorStyleIndex 8 -#define sz_pexBFInteriorStyleIndex 8 -#define sz_pexEdgeBundleIndex 8 -#define sz_pexViewIndex 8 -#define sz_pexDepthCueIndex 8 -#define sz_pexColorApproxIndex 8 - -#define sz_pexMarkerColorIndex 8 -#define sz_pexTextColorIndex 8 -#define sz_pexLineColorIndex 8 -#define sz_pexSurfaceColorIndex 8 -#define sz_pexBFSurfaceColorIndex 8 -#define sz_pexSurfaceEdgeColorIndex 8 - -#define sz_pexMarkerColor 8 -#define sz_pexTextColor 8 -#define sz_pexLineColor 8 -#define sz_pexSurfaceColor 8 -#define sz_pexBFSurfaceColor 8 -#define sz_pexSurfaceEdgeColor 8 - -#define sz_pexTextFontIndex 8 - -#define sz_pexMarkerScale 8 -#define sz_pexMarkerType 8 -#define sz_pexMatchRenderingTargetsReply 32 -#define sz_pexMatchRenderingTargetsReq 20 -#define sz_pexMaxHitsReachedEvent 32 -#define sz_pexModelClipFlag 8 -#define sz_pexModelClipVolume 8 -#define sz_pexModelClipVolume2D 8 -#define sz_pexNoop 4 -#define sz_pexNURBCurve 24 -#define sz_pexNURBSurface 28 -#define sz_pexParaSurfCharacteristics 8 -#define sz_pexPatternAttributes 40 -#define sz_pexPatternAttributes2D 12 -#define sz_pexPatternSize 12 -#define sz_pexPickAllReply 32 -#define sz_pexPickAllReq 20 -#define sz_pexPickID 8 -#define sz_pexPickOneReply 32 -#define sz_pexPickOneReq 20 -#define sz_pexPolyline 4 -#define sz_pexPolyline2D 4 -#define sz_pexPolylineInterpMethod 8 -#define sz_pexPolylineSetWithData 12 -#define sz_pexPostStructureReq 20 -#define sz_pexQuadrilateralMesh 16 -#define sz_pexQueryFontReply 32 -#define sz_pexQueryFontReq 8 -#define sz_pexQueryTextExtentsReply 32 -#define sz_pexQueryTextExtentsReq 36 -#define sz_pexRedrawClipRegionReq 12 -#define sz_pexRenderElementsReq 28 -#define sz_pexRenderNetworkReq 16 -#define sz_pexRenderOutputCommandsReq 16 -#define sz_pexRenderingColorModel 8 -#define sz_pexReq 4 -#define sz_pexResourceReq 8 -#define sz_pexFreeLookupTableReq sz_pexResourceReq -#define sz_pexGetDefinedIndicesReq sz_pexResourceReq -#define sz_pexFreePipelineContextReq sz_pexResourceReq -#define sz_pexFreeRendererReq sz_pexResourceReq -#define sz_pexGetRendererDynamicsReq sz_pexResourceReq -#define sz_pexEndStructureReq sz_pexResourceReq -#define sz_pexCreateStructureReq sz_pexResourceReq -#define sz_pexCreateNameSetReq sz_pexResourceReq -#define sz_pexFreeNameSetReq sz_pexResourceReq -#define sz_pexGetNameSetReq sz_pexResourceReq -#define sz_pexFreeSearchContextReq sz_pexResourceReq -#define sz_pexFreeWorkstationReq sz_pexResourceReq -#define sz_pexRedrawAllStructuresReq sz_pexResourceReq -#define sz_pexUpdateWorkstationReq sz_pexResourceReq -#define sz_pexExecuteDeferredActionsReq sz_pexResourceReq -#define sz_pexUnpostAllStructuresReq sz_pexResourceReq -#define sz_pexGetWorkstationPostingsReq sz_pexResourceReq -#define sz_pexFreePickMeasureReq sz_pexResourceReq -#define sz_pexUnloadFontReq sz_pexResourceReq -#define sz_pexSearchNetworkReq sz_pexResourceReq -#define sz_pexRestoreModelClipVolume 4 -#define sz_pexSetOfFillAreaSets 24 -#define sz_pexSearchNetworkReply 32 -#define sz_pexIndividualASF 12 -#define sz_pexSetEditingModeReq 12 -#define sz_pexSetElementPointerAtLabelReq 16 -#define sz_pexSetElementPointerReq 16 -#define sz_pexSetTableEntriesReq 16 -#define sz_pexSetWorkstationBufferModeReq 12 -#define sz_pexSetWorkstationDisplayUpdateModeReq 12 -#define sz_pexSetWorkstationHLHSRModeReq 12 -#define sz_pexSetWorkstationViewPriorityReq 16 -#define sz_pexSetWorkstationViewRepReq 172 -#define sz_pexSetWorkstationViewportReq 32 -#define sz_pexSetWorkstationWindowReq 36 -#define sz_pexStoreElementsReq 16 -#define sz_pexSurfaceApprox 16 -#define sz_pexSurfaceEdgeFlag 8 -#define sz_pexSurfaceEdgeType 8 -#define sz_pexSurfaceInterpMethod 8 -#define sz_pexBFSurfaceInterpMethod 8 -#define sz_pexReflectionAttributes 28 -#define sz_pexBFReflectionAttributes 28 -#define sz_pexReflectionModel 8 -#define sz_pexBFReflectionModel 8 -#define sz_pexText 44 -#define sz_pexText2D 16 -#define sz_pexTextAlignment 8 -#define sz_pexATextAlignment 8 -#define sz_pexTextPath 8 -#define sz_pexATextPath 8 -#define sz_pexTextPrecision 8 -#define sz_pexTriangleStrip 16 -#define sz_pexUnpostStructureReq 12 -#define sz_pexUpdatePickMeasureReq 12 -#define sz_pexCieColor 12 -#define sz_pexColor 12 -#define sz_pexColorApproxEntry 40 -#define sz_pexColorSpecifier 4 -#define sz_pexColorEntry sz_pexColorSpecifier -#define sz_pexCoord2D 8 -#define sz_pexCoord3D 12 -#define sz_pexCoord4D 16 -#define sz_pexCullMode 2 -#define sz_pexCurveApproxData 8 -#define sz_pexDepthCueEntry 24 -#define sz_pexDeviceCoord 8 -#define sz_pexDeviceCoord2D 4 -#define sz_pexDeviceRect 8 -#define sz_pexEdgeBundleEntry 12 -#define sz_pexElementInfo 4 -#define sz_pexElementPos 8 -#define sz_pexElementRange 16 -#define sz_pexElementRef 8 -#define sz_pexEnumTypeDesc 4 -#define sz_pexEnumTypeIndex 4 -#define sz_pexEscapeSetEchoColorData 8 -#define sz_pexExtentInfo 24 -#define sz_pexFloatColor 12 -#define sz_pexFont 4 -#define sz_pexFontInfo 20 -#define sz_pexFontProp 8 -#define sz_pexHalfSpace 24 -#define sz_pexHalfSpace2D 16 -#define sz_pexHlsColor 12 -#define sz_pexHsvColor 12 -#define sz_pexIndexedColor 4 -#define sz_pexInteriorBundleEntry 28 -#define sz_pexLightEntry 48 -#define sz_pexLineBundleEntry 20 -#define sz_pexLocalTransform2DData 40 -#define sz_pexLocalTransform3DData 68 -#define sz_pexMarkerBundleEntry 12 -#define sz_pexMatrix 64 -#define sz_pexMatrix3X3 36 -#define sz_pexMonoEncoding 8 -#define sz_pexName 4 -#define sz_pexNameSet 4 -#define sz_pexNameSetPair 8 -#define sz_pexNpcSubvolume 24 -#define sz_pexPD_NPC_HitVolume sz_pexNpcSubvolume -#define sz_pexOutputCommandError 32 -#define sz_pexPD_DC_HitBox 8 -#define sz_pexPSC_IsoparametricCurves 8 -#define sz_pexPSC_LevelCurves 28 -#define sz_pexPatternEntry 8 -#define sz_pexPickElementRef 12 -#define sz_pexPickRecord 4 -#define sz_pexReflectionAttr 24 -#define sz_pexRendererTarget 8 -#define sz_pexRgb16Color 8 -#define sz_pexRgb8Color 4 -#define sz_pexRgbFloatColor 12 -#define sz_pexString 2 -#define sz_pexStructure 4 -#define sz_pexStructureInfo 8 -#define sz_pexSurfaceApproxData 12 -#define sz_pexSwitch 1 -#define sz_pexTableInfo 8 -#define sz_pexTableIndex 2 -#define sz_pexTextAlignmentData 4 -#define sz_pexTextBundleEntry 16 -#define sz_pexTextFontEntry 4 -#define sz_pexTrimCurve 28 -#define sz_pexVector2D 8 -#define sz_pexVector3D 12 -#define sz_pexVertex 12 -#define sz_pexViewEntry 156 -#define sz_pexViewRep 160 -#define sz_pexViewport 20 - -/* from PEXlibint.h */ -#define sz_pexOCRequestHeader 16 - -/* for X-Window system protocol elements */ -#define sz_CARD32 4 -#define sz_CARD16 2 -#define sz_CARD8 1 -#define sz_INT32 4 -#define sz_INT16 2 - -/* for other things */ -#define sz_char 1 -#define sz_short 2 -#define sz_long 4 -#define sz_float 4 - - - -/* ------------------------------------------------------------------------- - * Externally defined globals. - * ------------------------------------------------------------------------- */ - -/* - * Linked list of open displays. - */ - -extern PEXDisplayInfo *PEXDisplayInfoHeader; - - -/* - * Pick path cache. - */ - -extern PEXPickPath *PEXPickCache; -extern unsigned int PEXPickCacheSize; -extern int PEXPickCacheInUse; - - -/* - * Floating point conversion function table. - */ - -extern void (*(PEX_fp_convert[NUM_FP_FORMATS][NUM_FP_FORMATS]))(); - - - -/* ------------------------------------------------------------------------- - * Function prototypes for PEXlib internal functions. - * ------------------------------------------------------------------------- */ - -extern void _PEXCopyPaddedBytesToOC( -#if NeedFunctionPrototypes - Display * /* display */, - int /* numBytes */, - char * /* data */ -#endif -); - -extern void _PEXSendBytesToOC( -#if NeedFunctionPrototypes - Display * /* display */, - int /* numBytes */, - char * /* data */ -#endif -); - -extern void _PEXOCFacet( -#if NeedFunctionPrototypes - Display * /* display */, - int /* colorType */, - unsigned int /* facetAttr */, - PEXFacetData * /* facetData */, - int /* fpFormat */ -#endif -); - -extern void _PEXOCListOfFacet( -#if NeedFunctionPrototypes - Display * /* display */, - int /* count */, - int /* colorType */, - unsigned int /* facetAttr */, - PEXArrayOfFacetData /* facetData */, - int /* fpFormat */ -#endif -); - -extern void _PEXOCListOfVertex( -#if NeedFunctionPrototypes - Display * /* display */, - int /* count */, - int /* colorType */, - unsigned int /* vertAttr */, - PEXArrayOfVertex /* vertData */, - int /* fpFormat */ -#endif -); - -extern void _PEXOCListOfColor( -#if NeedFunctionPrototypes - Display * /* display */, - int /* count */, - int /* colorType */, - PEXArrayOfColor /* colors */, - int /* fpFormat */ -#endif -); - -extern void _PEXStoreFacet( -#if NeedFunctionPrototypes - int /* colorType */, - unsigned int /* facetAttr */, - PEXFacetData * /* facetData */, - char ** /* bufPtr */, - int /* fpFormat */ -#endif -); - -extern void _PEXStoreListOfFacet( -#if NeedFunctionPrototypes - int /* count */, - int /* colorType */, - unsigned int /* facetAttr */, - PEXArrayOfFacetData /* facetData */, - char ** /* bufPtr */, - int /* fpFormat */ -#endif -); - -extern void _PEXStoreListOfVertex( -#if NeedFunctionPrototypes - int /* count */, - int /* colorType */, - unsigned int /* vertAttr */, - PEXArrayOfVertex /* vertData */, - char ** /* bufPtr */, - int /* fpFormat */ -#endif -); - -extern void _PEXStoreListOfColor( -#if NeedFunctionPrototypes - int /* count */, - int /* colorType */, - PEXArrayOfColor /* colors */, - char ** /* bufPtr */, - int /* fpFormat */ -#endif -); - -extern void _PEXExtractFacet( -#if NeedFunctionPrototypes - char ** /* bufPtr */, - int /* colorType */, - unsigned int /* facetAttr */, - PEXFacetData * /* facetData */, - int /* fpFormat */ -#endif -); - -extern void _PEXExtractListOfFacet( -#if NeedFunctionPrototypes - int /* count */, - char ** /* bufPtr */, - int /* colorType */, - unsigned int /* facetAttr */, - PEXArrayOfFacetData /* facetData */, - int /* fpFormat */ -#endif -); - -extern void _PEXExtractListOfVertex( -#if NeedFunctionPrototypes - int /* count */, - char ** /* bufPtr */, - int /* colorType */, - unsigned int /* vertAttr */, - PEXArrayOfVertex /* vertData */, - int /* fpFormat */ -#endif -); - -extern void _PEXExtractListOfColor( -#if NeedFunctionPrototypes - int /* count */, - char ** /* bufPtr */, - int /* colorType */, - PEXArrayOfColor /* colors */, - int /* fpFormat */ -#endif -); - -extern void _PEXGenOCBadLengthError( -#if NeedFunctionPrototypes - Display * /* display */, - XID /* resource_id */, - PEXOCRequestType /* req_type */ -#endif -); - - - -/* ------------------------------------------------------------------------- - * Miscellaneous. - * ------------------------------------------------------------------------- */ - -/* - * Argument types in function definitions. - */ - -#define INPUT -#define OUTPUT -#define INOUT - - -/* - * Xlib defines min and max as macros; Must undef since min and max - * are field names in PEXlib data structures. - */ - -#ifdef min -#undef min -#endif - -#ifdef max -#undef max -#endif - -#endif /* _PEXLIBINT_H_ */ - - diff --git a/xc/lib/PEX5/PEXproto.h b/xc/lib/PEX5/PEXproto.h deleted file mode 100644 index c6ede2c70..000000000 --- a/xc/lib/PEX5/PEXproto.h +++ /dev/null @@ -1,2241 +0,0 @@ -/* $TOG: PEXproto.h /main/10 1998/02/06 16:09:31 kaleb $ */ -/* - -Copyright 1992, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ - -/****************************************************************************** -Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. - - All Rights Reserved - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting documentation, and that -the name of Sun Microsystems not be used in advertising or publicity -pertaining to distribution of the software without specific, written prior -permission. Sun Microsystems makes no representations about the -suitability of this software for any purpose. It is provided "as is" without -express or implied warranty. - -SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT -SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************************/ - -/* Definitions for the PEX used by server and c bindings */ - -/* - * This packet-construction scheme makes the following assumptions: - * - * 1. The compiler is able to generate code which addresses one- and two-byte - * quantities. In the worst case, this would be done with bit-fields. If - * bit-fields are used it may be necessary to reorder the request fields in - * this file, depending on the order in which the machine assigns bit fields - * to machine words. There may also be a problem with sign extension, as K+R - * specify that bitfields are always unsigned. - * - * 2. 2- and 4-byte fields in packet structures must be ordered by hand such - * that they are naturally-aligned, so that no compiler will ever insert - * padding bytes. - * - * 3. All packets are hand-padded to a multiple of 4 bytes, for the same reason. - */ - -#ifndef _PEXPROTO_H_ -#define _PEXPROTO_H_ - -/* In the following typedefs, comments appear that say "LISTof Foo( numItems )", - * "CLIST of Foo()", and "SINGLE Foo()". These are used when the protocol - * specifies that a request or reply contains a variable length list of - * (possibly variable types of) objects. - * - * A LISTof list is one for which we have already been given the length. - * The items in the list are of type "Foo". The number of items in the list - * appears parenthetically after the type. ("numItems" in our example.) - * Any other information needed to parse the list is also passed in the - * parentheses. (E.g., "tableType" in a list of table entries.) - * - * A CLISTof list is the same, except that the first 4 bytes of the list - * indicate the number of items in the list. The length may need to be - * byte-swapped. - * - * A SINGLE item of an indeterminate length is indicated in the same - * manner. (E.g., a "SINGLE TableEntry()".) Any other information - * needed to parse the item is also passed in the parentheses. - * (E.g., "itemMask" in a set of pipeline context attributes.) - * - * If no information is given in the parentheses, then the size is - * implicit. - * - * Variable length padding is noted with a comment, with the number - * of bytes of padding required as calculated from the value in - * the parentheses. (number of bytes of padding = n?(3-((n-1)%4):0 , where - * n is the parenthetical value.) - */ - -#define XID CARD32 -#define Drawable CARD32 - -#include - -/* Matches revision 5.1C */ - -/**************************************************************** - * REPLIES * - ****************************************************************/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD16 majorVersion B16; - CARD16 minorVersion B16; - CARD32 release B32; - CARD32 lengthName B32; - CARD32 subsetInfo B32; - BYTE pad[8]; - /* LISTof CARD8 follows -- Don't swap */ - /* pad */ - } pexGetExtensionInfoReply; - - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* NOT 0; this is an extra-large reply*/ - CARD32 numLists B32; - BYTE pad[20]; /* lists of lists begin afterwards */ - /* LISTof CLISTof pexEnumTypeDesc( numLists ) */ - /* pad */ - } pexGetEnumTypeInfoReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - BYTE pad[24]; - /* LISTof VALUE() */ - } pexGetImpDepConstantsReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 escapeID B32; - CARD8 escape_specific[20]; - /* more escape specific data, treat as */ - /* LISTof CARD8( length ) */ - } pexEscapeWithReplyReply; - - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; - BYTE pad[24]; - /* LISTof RENDERER_TARGET( ) */ - } pexMatchRenderingTargetsReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - CARD16 unused B16; - CARD16 definableEntries B16; - CARD16 numPredefined B16; - CARD16 predefinedMin B16; - CARD16 predefinedMax B16; - BYTE pad[14]; - } pexGetTableInfoReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 unused B32; - CARD32 numEntries B32; - BYTE pad[16]; - /* LISTof TableEntry( numEntries, tableType ) */ - } pexGetPredefinedEntriesReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 numIndices B32; - BYTE pad[20]; - /* LISTof pexTableIndex( numIndices ) */ - /* pad( numIndices ) */ - } pexGetDefinedIndicesReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD16 status B16; - CARD16 tableType B16; - BYTE pad[20]; - /* SINGLE TableEntry( tableType ) */ - } pexGetTableEntryReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD16 tableType B16; - CARD16 unused B16; - CARD32 numEntries B32; - BYTE pad[16]; - /* LISTof TableEntry( numEntries, tableType ) */ - } pexGetTableEntriesReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - BYTE pad[24]; - /* SINGLE PipelineContextAttributes( itemMask ) */ - } pexGetPipelineContextReply; - - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - BYTE pad[24]; - /* SINGLE RendererAttributes( itemMask ) */ - } pexGetRendererAttributesReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - pexBitmask tables B32; - pexBitmask namesets B32; - pexBitmask attributes B32; - BYTE pad[12]; -} pexGetRendererDynamicsReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - CARD16 editMode B16; - CARD16 unused B16; - CARD32 elementPtr B32; - CARD32 numElements B32; - CARD32 lengthStructure B32; - CARD16 hasRefs B16; - BYTE pad[6]; - } pexGetStructureInfoReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 numInfo B32; - BYTE pad[20]; - /* LISTof pexElementInfo( numInfo ) */ - } pexGetElementInfoReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD8 unused[8]; - CARD32 numStructures B32; - BYTE pad[12]; - /* LISTof pexStructure( numStructures ) */ - } pexGetStructuresInNetworkReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD8 unused[12]; - CARD32 numPaths B32; - BYTE pad[8]; - /* LISTof CLISTof pexElementRef( numPaths ) */ - } pexGetAncestorsReply; - -typedef pexGetAncestorsReply pexGetDescendantsReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 numElements B32; - BYTE pad[20]; - /* LISTof OutputCommand( numElements ) */ - } pexFetchElementsReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - CARD16 status B16; - CARD16 unused B16; - CARD32 foundOffset B32; - BYTE pad[16]; - } pexElementSearchReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 numNames B32; - BYTE pad[20]; - /* LISTof pexName( numNames ) */ - } pexGetNameSetReply; - - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - BYTE pad[24]; - /* SINGLE SearchContextAttributes( itemMask ) */ - } pexGetSearchContextReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 unused B32; - CARD32 numItems B32; - BYTE pad[16]; - /* LISTof pexElementRef( numItems ) */ - } pexSearchNetworkReply; - - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - BYTE pad[24]; - /* SINGLE WksInfo( itemMask ) */ - } pexGetWorkstationAttributesReply; - - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - pexDynamicType viewRep; - pexDynamicType markerBundle; - pexDynamicType textBundle; - pexDynamicType lineBundle; - pexDynamicType interiorBundle; - pexDynamicType edgeBundle; - pexDynamicType colorTable; - pexDynamicType patternTable; - pexDynamicType wksTransform; - pexDynamicType highlightFilter; - pexDynamicType invisibilityFilter; - pexDynamicType HlhsrMode; - pexDynamicType structureModify; - pexDynamicType postStructure; - pexDynamicType unpostStructure; - pexDynamicType deleteStructure; - pexDynamicType referenceModify; - pexDynamicType bufferModify; - pexDynamicType lightTable; - pexDynamicType depthCueTable; - pexDynamicType colorApproxTable; - CARD8 pad[3]; - } pexGetWorkstationDynamicsReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* 4 + 76*fp/4 */ - CARD16 viewUpdate B16; /* Pending, NotPending */ - BYTE pad[22]; - /* SINGLE pexViewRep() requested */ - /* SINGLE pexViewRep() current */ - } pexGetWorkstationViewRepReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD16 viewIndex B16; - CARD16 unused B16; - CARD32 numCoords B32; - BYTE pad[16]; - /* LISTof pexCoord3D( numCoords ) */ - } pexMapDCtoWCReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 unused B32; - CARD32 numCoords B32; - BYTE pad[16]; - /* LISTof pexDeviceCoord( numCoords ) */ - } pexMapWCtoDCReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - BYTE pad[24]; - /* LISTof pexPhigsWksID() */ - } pexGetWorkstationPostingsReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - BYTE pad[24]; - /* SINGLE PickDeviceAttributes( itemMask ) */ - } pexGetPickDeviceReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - BYTE pad[24]; - /* SINGLE pexPickMeasureAttributes( itemMask ) */ - } pexGetPickMeasureReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 numPickElRefs B32; - pexEnumTypeIndex pickStatus B16; - CARD8 betterPick; - BYTE pad[17]; - /* LISTof pexPickElementRef ( numPickElRefs ) */ - } pexEndPickOneReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 numPickElRefs B32; - pexEnumTypeIndex pickStatus B16; - CARD8 betterPick; - BYTE pad[17]; - /* LISTof pexPickElementRef ( numPickElRefs ) */ - } pexPickOneReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 numPicked B32; - pexEnumTypeIndex pickStatus B16; - pexEnumTypeIndex morePicks B16; - BYTE pad[16]; - /* LISTof CLISTof pexPickElementRef ( numPicked ) */ - } pexEndPickAllReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 numPicked B32; - pexEnumTypeIndex pickStatus B16; - pexEnumTypeIndex morePicks B16; - BYTE pad[16]; - /* LISTof CLISTof pexPickElementRef ( numPicked ) */ - } pexPickAllReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 lengthFontInfo B32; - CARD8 pad[20]; - /* SINGLE pexFontInfo() */ - } pexQueryFontReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 numStrings B32; - BYTE pad[20]; - /* LISTof pexString( numStrings ) */ - } pexListFontsReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - CARD32 numStrings B32; - BYTE pad[20]; - /* LISTof pexString( numStrings ) */ - /* CLISTof pexFontInfo() */ - } pexListFontsWithInfoReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not 0 */ - BYTE pad[24]; - /* LISTof ExtentInfo() */ - } pexQueryTextExtentsReply; - -/**************************************************************** - * REQUESTS * - ****************************************************************/ -/* Request structure */ - -typedef struct { - CARD8 reqType; - CARD8 opcode; /* meaning depends on request type */ - CARD16 length B16; - /* length in 4 bytes quantities */ - /* of whole request, including this header */ -} pexReq; - -/***************************************************************** - * structures that follow request. - *****************************************************************/ - -/* ResourceReq is used for any request which has a resource ID - ( or Atom or Time ) as its one and only argument. */ - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 2 */ - CARD32 id B32; /* a Structure, Renderer, Font, LUT, etc. */ - } pexResourceReq; - - -/***************************************************************** - * Specific Requests - *****************************************************************/ - - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 2 */ - CARD16 clientProtocolMajor B16; - CARD16 clientProtocolMinor B16; -} pexGetExtensionInfoReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - Drawable drawable B32; - pexBitmask itemMask B32; - CARD32 numEnums B32; - /* LISTof CARD16( numEnums ) */ - /* pad( numEnums*2 ) */ -} pexGetEnumTypeInfoReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - Drawable drawable B32; - CARD32 numNames B32; - /* LISTof pexImpDepConstantNames ( numNames ) */ - /* pad */ -} pexGetImpDepConstantsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 5 */ - Drawable drawable B32; - CARD8 depth; - CARD8 unused; - CARD16 type B16; - CARD32 visualID B32; - CARD32 maxTriplets B32; -} pexMatchRenderingTargetsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 2 + n */ - CARD32 escapeID B32; - /* 4n bytes of additional escape data to skip */ -} pexEscapeReq; - -typedef pexEscapeReq pexEscapeWithReplyReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - Drawable drawableExample B32; - pexLookupTable lut B32; - pexTableType tableType B16; - CARD16 unused B16; -} pexCreateLookupTableReq; - - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexLookupTable src B32; - pexLookupTable dst B32; -} pexCopyLookupTableReq; - -typedef pexResourceReq pexFreeLookupTableReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - Drawable drawableExample B32; - pexTableType tableType B16; - CARD16 unused B16; -} pexGetTableInfoReq; - - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 5 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - Drawable drawableExample B32; - pexTableType tableType B16; - pexTableIndex start B16; - CARD16 count B16; - CARD16 pad B16; -} pexGetPredefinedEntriesReq; - -typedef pexResourceReq pexGetDefinedIndicesReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexEnumTypeIndex fpFormat B16; - CARD16 valueType B16; - pexLookupTable lut B32; - pexTableIndex index B16; - CARD16 pad B16; -} pexGetTableEntryReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexEnumTypeIndex fpFormat B16; - CARD16 valueType B16; - pexLookupTable lut B32; - pexTableIndex start B16; - CARD16 count B16; -} pexGetTableEntriesReq; - - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexLookupTable lut B32; - pexTableIndex start B16; - CARD16 count B16; -/* LISTof TableEntry( count ) */ -} pexSetTableEntriesReq; - - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexLookupTable lut B32; - pexTableIndex start B16; - CARD16 count B16; -} pexDeleteTableEntriesReq; - - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 6 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexPC pc B32; - pexBitmask itemMask0 B32; - pexBitmask itemMask1 B32; - pexBitmask itemMask2 B32; - /* SINGLE PipelineContextAttributes( itemMask ) */ -} pexCreatePipelineContextReq; - - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 6 */ - pexPC src B32; - pexPC dst B32; - pexBitmask itemMask0 B32; - pexBitmask itemMask1 B32; - pexBitmask itemMask2 B32; -} pexCopyPipelineContextReq; - -typedef pexResourceReq pexFreePipelineContextReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 6 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexPC pc B32; - pexBitmask itemMask0 B32; - pexBitmask itemMask1 B32; - pexBitmask itemMask2 B32; -} pexGetPipelineContextReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexPC pc B32; - pexBitmask itemMask0 B32; - pexBitmask itemMask1 B32; - pexBitmask itemMask2 B32; - /* SINGLE PipelineContextAttributes( itemMask ) */ -} pexChangePipelineContextReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexRenderer rdr B32; - Drawable drawable B32; - pexBitmask itemMask B32; - /* SINGLE RendererAttributes( itemMask ) */ -} pexCreateRendererReq; - -typedef pexResourceReq pexFreeRendererReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexRenderer rdr B32; - pexBitmask itemMask B32; - /* SINGLE RendererAttributes( itemMask ) */ -} pexChangeRendererReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexRenderer rdr B32; - pexBitmask itemMask B32; -} pexGetRendererAttributesReq; - -typedef pexResourceReq pexGetRendererDynamicsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexRenderer rdr B32; - Drawable drawable B32; -} pexBeginRenderingReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexRenderer rdr B32; - pexSwitch flushFlag; - BYTE pad[3]; -} pexEndRenderingReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexRenderer rdr B32; - pexStructure sid B32; -} pexBeginStructureReq; - -typedef pexResourceReq pexEndStructureReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexRenderer rdr B32; - CARD32 numCommands B32; - /* LISTof OutputCommand( numCommands ) */ -} pexRenderOutputCommandsReq; -/* individual output commands may be found in the section "Output Commands" */ - - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 7 */ - pexRenderer rdr B32; - pexStructure sid B32; - CARD16 position1_whence B16; - CARD16 unused1 B16; - INT32 position1_offset B32; - CARD16 position2_whence B16; - CARD16 unused2 B16; - INT32 position2_offset B32; -} pexRenderElementsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 + 2n */ - pexRenderer rdr B32; - CARD32 numElRefs B32; - /* LISTof pexElementRef( numElRefs ) */ -} pexAccumulateStateReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexRenderer rdr B32; - Drawable drawable B32; - pexStructure sid B32; -} pexRenderNetworkReq; - -typedef pexResourceReq pexCreateStructureReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexStructure src B32; - pexStructure dst B32; -} pexCopyStructureReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - CARD32 numStructures B32; - /* LISTof pexStructure( numStructures ) */ -} pexDestroyStructuresReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexEnumTypeIndex fpFormat B16; - CARD16 itemMask B16; - pexStructure sid B32; -} pexGetStructureInfoReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 7 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexStructure sid B32; - CARD16 position1_whence B16; - CARD16 unused1 B16; - INT32 position1_offset B32; - CARD16 position2_whence B16; - CARD16 unused2 B16; - INT32 position2_offset B32; -} pexGetElementInfoReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexStructure sid B32; - CARD16 which B16; - CARD16 pad B16; -} pexGetStructuresInNetworkReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexStructure sid B32; - CARD16 pathOrder B16; - CARD16 unused B16; - CARD32 pathDepth B32; -} pexGetAncestorsReq; - -typedef pexGetAncestorsReq pexGetDescendantsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 7 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexStructure sid B32; - CARD16 position1_whence B16; - CARD16 unused1 B16; - INT32 position1_offset B32; - CARD16 position2_whence B16; - CARD16 unused2 B16; - INT32 position2_offset B32; -} pexFetchElementsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexStructure sid B32; - CARD16 mode B16; - CARD16 pad B16; -} pexSetEditingModeReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexStructure sid B32; - CARD16 position_whence B16; - CARD16 unused B16; - INT32 position_offset B32; -} pexSetElementPointerReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexStructure sid B32; - INT32 label B32; - INT32 offset B32; -} pexSetElementPointerAtLabelReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexStructure sid B32; - CARD16 position_whence B16; - CARD16 unused B16; - INT32 position_offset B32; - CARD32 direction B32; - CARD32 numIncls B32; - CARD32 numExcls B32; - /* LISTof CARD16( numIncls ) */ - /* pad( numIncls*2 ) */ - /* LISTof CARD16( numExcls ) */ - /* pad( numExcls*2 ) */ -} pexElementSearchReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexStructure sid B32; - CARD32 numCommands B32; - /* LISTof OutputCommand( numCommands ) */ -} pexStoreElementsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 6 */ - pexStructure sid B32; - CARD16 position1_whence B16; - CARD16 unused1 B16; - INT32 position1_offset B32; - CARD16 position2_whence B16; - CARD16 unused2 B16; - INT32 position2_offset B32; -} pexDeleteElementsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 5 */ - pexStructure sid B32; - CARD16 position_whence B16; - CARD16 unused B16; - INT32 position_offset B32; - INT32 label B32; -} pexDeleteElementsToLabelReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexStructure sid B32; - INT32 label1 B32; - INT32 label2 B32; -} pexDeleteBetweenLabelsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 9 */ - pexStructure src B32; - CARD16 srcPosition1_whence B16; - CARD16 unused1 B16; - INT32 srcPosition1_offset B32; - CARD16 srcPosition2_whence B16; - CARD16 unused2 B16; - INT32 srcPosition2_offset B32; - pexStructure dst B32; - CARD16 dstPosition_whence B16; - CARD16 unused3 B16; - INT32 dstPosition_offset B32; -} pexCopyElementsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexStructure old_id B32; - pexStructure new_id B32; -} pexChangeStructureRefsReq; - -typedef pexResourceReq pexCreateNameSetReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexNameSet src B32; - pexNameSet dst B32; -} pexCopyNameSetReq; - -typedef pexResourceReq pexFreeNameSetReq; - -typedef pexResourceReq pexGetNameSetReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexNameSet ns B32; - CARD16 action B16; - CARD16 unused B16; - /* LISTof pexName() */ -} pexChangeNameSetReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexSC sc B32; - pexBitmask itemMask B32; - /* SINGLE SearchContextAttributes( itemMask ) */ -} pexCreateSearchContextReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexSC src B32; - pexSC dst B32; - pexBitmask itemMask B32; -} pexCopySearchContextReq; - -typedef pexResourceReq pexFreeSearchContextReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexSC sc B32; - pexBitmask itemMask B32; -} pexGetSearchContextReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexSC sc B32; - pexBitmask itemMask B32; - /* SINGLE SearchContextAttributes( itemMask ) */ -} pexChangeSearchContextReq; - -typedef pexResourceReq pexSearchNetworkReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 19 */ - pexPhigsWks wks B32; - Drawable drawable B32; - pexLookupTable markerBundle B32; - pexLookupTable textBundle B32; - pexLookupTable lineBundle B32; - pexLookupTable interiorBundle B32; - pexLookupTable edgeBundle B32; - pexLookupTable colorTable B32; - pexLookupTable depthCueTable B32; - pexLookupTable lightTable B32; - pexLookupTable colorApproxTable B32; - pexLookupTable patternTable B32; - pexLookupTable textFontTable B32; - pexNameSet highlightIncl B32; - pexNameSet highlightExcl B32; - pexNameSet invisIncl B32; - pexNameSet invisExcl B32; - CARD16 bufferMode B16; - CARD16 pad B16; -} pexCreateWorkstationReq; - -typedef pexResourceReq pexFreeWorkstationReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 5 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexPhigsWks wks B32; - pexBitmask itemMask0 B32; - pexBitmask itemMask1 B32; -} pexGetWorkstationAttributesReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 2 */ - Drawable drawable B32; -} pexGetWorkstationDynamicsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexEnumTypeIndex fpFormat B16; - pexTableIndex index B16; - pexPhigsWks wks B32; -} pexGetWorkstationViewRepReq; - -typedef pexResourceReq pexRedrawAllStructuresReq; - -typedef pexResourceReq pexUpdateWorkstationReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexPhigsWks wks B32; - CARD32 numRects B32; - /* LISTof pexDeviceRect( numRects ) */ -} pexRedrawClipRegionReq; - -typedef pexResourceReq pexExecuteDeferredActionsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexPhigsWks wks B32; - pexTableIndex index1 B16; - pexTableIndex index2 B16; - CARD16 priority B16; - CARD16 pad B16; -} pexSetWorkstationViewPriorityReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexPhigsWks wks B32; - pexEnumTypeIndex displayUpdate B16; - CARD16 pad B16; -} pexSetWorkstationDisplayUpdateModeReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexPhigsWks wks B32; - CARD32 numCoords B32; - /* LISTof pexDeviceCoord( numCoords ) */ -} pexMapDCtoWCReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 index B16; - pexPhigsWks wks B32; - CARD32 numCoords B32; - /* LISTof pexCoord3D( numCoords ) */ -} pexMapWCtoDCReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 43 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused1 B16; - pexPhigsWks wks B32; - pexTableIndex index B16; - CARD16 unused2 B16; - CARD16 clipFlags B16; - CARD16 unused3 B16; - PEXFLOAT clipLimits_xmin B32; - PEXFLOAT clipLimits_ymin B32; - PEXFLOAT clipLimits_zmin B32; - PEXFLOAT clipLimits_xmax B32; - PEXFLOAT clipLimits_ymax B32; - PEXFLOAT clipLimits_zmax B32; - pexMatrix view_orientation; - pexMatrix view_mapping; -} pexSetWorkstationViewRepReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 9 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexPhigsWks wks B32; - PEXFLOAT npcSubvolume_xmin B32; - PEXFLOAT npcSubvolume_ymin B32; - PEXFLOAT npcSubvolume_zmin B32; - PEXFLOAT npcSubvolume_xmax B32; - PEXFLOAT npcSubvolume_ymax B32; - PEXFLOAT npcSubvolume_zmax B32; -} pexSetWorkstationWindowReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 8 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexPhigsWks wks B32; - INT16 viewport_xmin B16; - INT16 viewport_ymin B16; - PEXFLOAT viewport_zmin B32; - INT16 viewport_xmax B16; - INT16 viewport_ymax B16; - PEXFLOAT viewport_zmax B32; - pexSwitch useDrawable; - BYTE pad[3]; -} pexSetWorkstationViewportReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexPhigsWks wks B32; - pexEnumTypeIndex mode B16; - CARD16 pad B16; -} pexSetWorkstationHLHSRModeReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexPhigsWks wks B32; - CARD16 bufferMode B16; - CARD16 pad B16; -} pexSetWorkstationBufferModeReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 5 */ - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexPhigsWks wks B32; - pexStructure sid B32; - PEXFLOAT priority B32; -} pexPostStructureReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexPhigsWks wks B32; - pexStructure sid B32; -} pexUnpostStructureReq; - -typedef pexResourceReq pexUnpostAllStructuresReq; - -typedef pexResourceReq pexGetWorkstationPostingsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexEnumTypeIndex fpFormat B16; - pexEnumTypeIndex devType B16; - pexPhigsWks wks B32; - pexBitmask itemMask B32; -} pexGetPickDeviceReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 unused B16; - pexPhigsWks wks B32; - pexEnumTypeIndex devType B16; - CARD16 unused2 B16; - pexBitmask itemMask B32; - /* SINGLE PickDeviceAttributes( itemMask ) */ -} pexChangePickDeviceReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 4 */ - pexPhigsWks wks B32; - pexPickMeasure pm B32; - pexEnumTypeIndex devType B16; - CARD16 pad B16; -} pexCreatePickMeasureReq; - -typedef pexResourceReq pexFreePickMeasureReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 3 */ - pexPickMeasure pm B32; - pexBitmask itemMask B32; -} pexGetPickMeasureReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexPickMeasure pm B32; - CARD32 numBytes B32; - /* LISTof CARD8( numBytes ) */ - /* pad( numBytes ) */ -} pexUpdatePickMeasureReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 6 + n */ - pexEnumTypeIndex fpFormat B16; - pexEnumTypeIndex method B16; - pexRenderer rdr B32; - Drawable drawable B32; - INT32 sid B32; - /* SINGLE PickRecord () */ -} pexBeginPickOneReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 2 */ - pexRenderer rdr B32; -} pexEndPickOneReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 6 + n */ - pexEnumTypeIndex fpFormat B16; - pexEnumTypeIndex method B16; - pexRenderer rdr B32; - Drawable drawable B32; - pexStructure sid B32; - /* SINGLE PickRecord () */ -} pexPickOneReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 7 + n */ - pexEnumTypeIndex fpFormat B16; - pexEnumTypeIndex method B16; - CARD8 sendEvent; - CARD8 unused[3]; - pexRenderer rdr B32; - Drawable drawable B32; - INT32 sid B32; - CARD32 pickMaxHits B32; - /* SINGLE PickRecord () */ -} pexBeginPickAllReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 2 */ - pexRenderer rdr B32; -} pexEndPickAllReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; /* 6 + n */ - pexEnumTypeIndex fpFormat B16; - pexEnumTypeIndex method B16; - pexRenderer rdr B32; - Drawable drawable B32; - CARD32 pickMaxHits B32; - /* SINGLE RendererPickRecord () */ -} pexPickAllReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexFont font B32; - CARD32 numBytes B32; - /* LISTof CARD8( numBytes ) -- don't swap */ - /* pad( numBytes ) */ -} pexLoadFontReq; - -typedef pexResourceReq pexUnloadFontReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexFont font B32; -} pexQueryFontReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - CARD16 maxNames B16; - CARD16 numChars B16; - /* LISTof CARD8( numChars ) -- don't swap */ - /* pad( numBytes ) */ -} pexListFontsReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - CARD16 unused B16; - CARD16 maxNames B16; - CARD16 numChars B16; - CARD16 pad B16; - /* LISTof CARD8( numChars ) */ - /* pad( numBytes ) */ -} pexListFontsWithInfoReq; - -typedef struct { - CARD8 reqType; - CARD8 opcode; - CARD16 length B16; - pexEnumTypeIndex fpFormat B16; - CARD16 textPath B16; - pexTableIndex fontGroupIndex B16; - CARD16 unused B16; - XID id B32; /* renderer, wks, or text font lut */ - PEXFLOAT charExpansion B32; - PEXFLOAT charSpacing B32; - PEXFLOAT charHeight B32; - CARD16 alignment_vertical B16; - CARD16 alignment_horizontal B16; - CARD32 numStrings B32; - /* LISTof LISTof MONO_ENCODINGS() */ - /* pad() */ -} pexQueryTextExtentsReq; - -/***************************************************************** - * Output Commands - *****************************************************************/ - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex markerType B16; - CARD16 pad B16; -} pexMarkerType; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT scale B32; -} pexMarkerScale; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexTableIndex index B16; - CARD16 pad B16; -} pexMarkerBundleIndex; - -typedef pexMarkerBundleIndex pexMarkerColorIndex; -typedef pexMarkerBundleIndex pexTextColorIndex; -typedef pexMarkerBundleIndex pexLineColorIndex; -typedef pexMarkerBundleIndex pexSurfaceColorIndex; -typedef pexMarkerBundleIndex pexBFSurfaceColorIndex; -typedef pexMarkerBundleIndex pexSurfaceEdgeColorIndex; - -typedef pexMarkerBundleIndex pexTextFontIndex; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexColorType colorType B16; - CARD16 unused B16; - /* SINGLE COLOR(colorType) */ -} pexMarkerColor; - -typedef pexMarkerColor pexTextColor; -typedef pexMarkerColor pexLineColor; -typedef pexMarkerColor pexSurfaceColor; -typedef pexMarkerColor pexBFSurfaceColor; -typedef pexMarkerColor pexSurfaceEdgeColor; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex style B16; - CARD16 pad B16; -} pexATextStyle; - -typedef pexMarkerBundleIndex pexTextBundleIndex; -typedef pexMarkerBundleIndex pexLineBundleIndex; -typedef pexMarkerBundleIndex pexInteriorBundleIndex; -typedef pexMarkerBundleIndex pexInteriorStyleIndex; -typedef pexMarkerBundleIndex pexBFInteriorStyleIndex; -typedef pexMarkerBundleIndex pexEdgeBundleIndex; -typedef pexMarkerBundleIndex pexViewIndex; -typedef pexMarkerBundleIndex pexDepthCueIndex; -typedef pexMarkerBundleIndex pexColorApproxIndex; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 precision B16; - CARD16 pad B16; -} pexTextPrecision; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT expansion B32; -} pexCharExpansion; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT spacing B32; -} pexCharSpacing; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT height B32; -} pexCharHeight; -typedef pexCharHeight pexATextHeight; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT up_x B32; - PEXFLOAT up_y B32; -} pexCharUpVector; -typedef pexCharUpVector pexATextUpVector; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 path B16; - CARD16 pad B16; -} pexTextPath; -typedef pexTextPath pexATextPath; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 alignment_vertical B16; - CARD16 alignment_horizontal B16; -} pexTextAlignment; -typedef pexTextAlignment pexATextAlignment; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex lineType B16; - CARD16 pad B16; -} pexLineType; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT width B32; -} pexLineWidth; -typedef pexLineWidth pexSurfaceEdgeWidth; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex approxMethod B16; - CARD16 unused B16; - PEXFLOAT tolerance B32; -} pexCurveApprox; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex polylineInterp B16; - CARD16 pad B16; -} pexPolylineInterpMethod; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex interiorStyle B16; - CARD16 pad B16; -} pexInteriorStyle; -typedef pexInteriorStyle pexBFInteriorStyle; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT ambient B32; - PEXFLOAT diffuse B32; - PEXFLOAT specular B32; - PEXFLOAT specularConc B32; - PEXFLOAT transmission B32; - pexColorType specular_colorType B16; - CARD16 unused B16; - /* SINGLE COLOR(specular_colorType) */ -} pexReflectionAttributes; -typedef pexReflectionAttributes pexBFReflectionAttributes; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex reflectionModel B16; - CARD16 pad B16; -} pexReflectionModel; -typedef pexReflectionModel pexBFReflectionModel; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex surfaceInterp B16; - CARD16 pad B16; -} pexSurfaceInterpMethod; -typedef pexSurfaceInterpMethod pexBFSurfaceInterpMethod; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex approxMethod B16; - CARD16 unused B16; - PEXFLOAT uTolerance B32; - PEXFLOAT vTolerance B32; -} pexSurfaceApprox; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexCullMode cullMode B16; - CARD16 pad B16; -} pexFacetCullingMode; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexSwitch distinguish; - BYTE pad[3]; -} pexFacetDistinguishFlag; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT size_x B32; - PEXFLOAT size_y B32; -} pexPatternSize; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT point_x B32; - PEXFLOAT point_y B32; -} pexPatternAttributes2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT refPt_x B32; - PEXFLOAT refPt_y B32; - PEXFLOAT refPt_z B32; - PEXFLOAT vector1_x B32; - PEXFLOAT vector1_y B32; - PEXFLOAT vector1_z B32; - PEXFLOAT vector2_x B32; - PEXFLOAT vector2_y B32; - PEXFLOAT vector2_z B32; -} pexPatternAttributes; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexSwitch onoff; - BYTE pad[3]; -} pexSurfaceEdgeFlag; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex edgeType B16; - CARD16 pad B16; -} pexSurfaceEdgeType; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexAsfAttribute attribute B32; - pexAsfValue source; - BYTE pad[3]; -} pexIndividualASF; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexComposition compType B16; - CARD16 unused B16; - pexMatrix matrix; -} pexLocalTransform; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexComposition compType B16; - CARD16 unused B16; - pexMatrix3X3 matrix3X3; -} pexLocalTransform2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexMatrix matrix; -} pexGlobalTransform; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexMatrix3X3 matrix3X3; -} pexGlobalTransform2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexSwitch onoff; - BYTE pad[3]; -} pexModelClipFlag; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex modelClipOperator B16; - CARD16 numHalfSpaces B16; - /* LISTof pexHalfSpace( numHalfSpaces ) */ -} pexModelClipVolume; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex modelClipOperator B16; - CARD16 numHalfSpaces B16; - /* LISTof pexHalfSpace2D( numHalfSpaces ) */ -} pexModelClipVolume2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; -} pexRestoreModelClipVolume; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 numEnable B16; - CARD16 numDisable B16; - /* LISTof pexTableIndex( numEnable ) */ - /* pad( ( numEnable )*2 ) */ - /* LISTof pexTableIndex( numDisable ) */ - /* pad( ( numDisable )*2 ) */ -} pexLightSourceState; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD32 pickId B32; -} pexPickID; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD32 hlhsrID B32; -} pexHLHSRID; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex model B16; - CARD16 pad B16; -} pexRenderingColorModel; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexEnumTypeIndex characteristics B16; - CARD16 length B16; - /* SINGLEof PARAMETRIC_SURFACE_CHARACTERISTICS */ -} pexParaSurfCharacteristics; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - /* LISTof pexName() */ -} pexAddToNameSet; -typedef pexAddToNameSet pexRemoveFromNameSet; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexStructure id B32; -} pexExecuteStructure; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - INT32 label B32; -} pexLabel; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 numElements B16; - CARD16 unused B16; - /* LISTof CARD8( numElements ) -- don't swap */ - /* pad( numElements ) */ -} pexApplicationData; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD32 id B32; - CARD16 numElements B16; - CARD16 unused B16; - /* LISTof CARD8( numElements ) -- don't swap */ - /* pad( numElements ) */ -} pexGSE; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - /* LISTof pexCoord3D() */ -} pexMarkers; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - /* LISTof pexCoord2D() */ -} pexMarkers2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT origin_x B32; - PEXFLOAT origin_y B32; - PEXFLOAT origin_z B32; - PEXFLOAT vector1_x B32; - PEXFLOAT vector1_y B32; - PEXFLOAT vector1_z B32; - PEXFLOAT vector2_x B32; - PEXFLOAT vector2_y B32; - PEXFLOAT vector2_z B32; - CARD16 numEncodings B16; - CARD16 unused B16; - /* LISTof pexMonoEncoding( numEncodings ) */ -} pexText; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT origin_x B32; - PEXFLOAT origin_y B32; - CARD16 numEncodings B16; - CARD16 unused B16; - /* LISTof pexMonoEncoding( numEncodings ) */ -} pexText2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT origin_x B32; - PEXFLOAT origin_y B32; - PEXFLOAT origin_z B32; - PEXFLOAT offset_x B32; - PEXFLOAT offset_y B32; - PEXFLOAT offset_z B32; - CARD16 numEncodings B16; - CARD16 unused B16; - /* LISTof pexMonoEncoding( numEncodings ) */ -} pexAnnotationText; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT origin_x B32; - PEXFLOAT origin_y B32; - PEXFLOAT offset_x B32; - PEXFLOAT offset_y B32; - CARD16 numEncodings B16; - CARD16 unused B16; - /* LISTof pexMonoEncoding( numEncodings ) */ -} pexAnnotationText2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - /* LISTof pexCoord3D() */ -} pexPolyline; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - /* LISTof pexCoord2D() */ -} pexPolyline2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexColorType colorType B16; - pexBitmaskShort vertexAttribs B16; - CARD32 numLists B32; - /* LISTof CLISTof pexVertex( numLists, vertexAttribs, colorType ) */ -} pexPolylineSetWithData; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 curveOrder B16; - pexCoordType coordType B16; - PEXFLOAT tmin B32; - PEXFLOAT tmax B32; - CARD32 numKnots B32; - CARD32 numPoints B32; - /* LISTof FLOAT( numKnots ) */ - /* LISTof {pexCoord3D|pexCoord4D}( numPoints, coordType ) */ -} pexNURBCurve; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 shape B16; - pexSwitch ignoreEdges; - CARD8 pad; - /* LISTof pexCoord3D() */ -} pexFillArea; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 shape B16; - pexSwitch ignoreEdges; - CARD8 unused; - /* LISTof pexCoord2D() */ -} pexFillArea2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 shape B16; - pexSwitch ignoreEdges; - CARD8 unused; - pexColorType colorType B16; - pexBitmaskShort facetAttribs B16; - pexBitmaskShort vertexAttribs B16; - CARD16 unused2 B16; - /* SINGLE Facet( facetAttribs, vertexAttribs, colorType ) */ -} pexFillAreaWithData; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 shape B16; - pexSwitch ignoreEdges; - CARD8 contourHint; - CARD32 numLists B32; - /* LISTof CLISTof Coord3D( numLists ) */ -} pexFillAreaSet; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 shape B16; - pexSwitch ignoreEdges; - CARD8 contourHint; - CARD32 numLists B32; - /* LISTof CLISTof Coord2D( numLists ) */ -} pexFillAreaSet2D; - - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 shape B16; - pexSwitch ignoreEdges; - CARD8 contourHint; - pexColorType colorType B16; - pexBitmaskShort facetAttribs B16; - pexBitmaskShort vertexAttribs B16; - CARD16 unused2 B16; - CARD32 numLists B32; - /* pexOptData( facetAttribs ) */ - /* LISTof CLISTof pexVertex( numLists, vertexAttribs, colorType ) */ -} pexFillAreaSetWithData; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexColorType colorType B16; - pexBitmaskShort facetAttribs B16; - pexBitmaskShort vertexAttribs B16; - CARD16 unused B16; - CARD32 numVertices B32; - /* number of OptData is numVert - 2 */ - /* LISTof pexOptData( facetAttribs, colorType ) */ - /* LISTof pexVertex( numVertices, vertexAttribs, colorType ) */ -} pexTriangleStrip; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexColorType colorType B16; - CARD16 mPts B16; - CARD16 nPts B16; - pexBitmaskShort facetAttribs B16; - pexBitmaskShort vertexAttribs B16; - CARD16 shape B16; - /* actually, there are (mPts-1)*(nPts-1) opt data entries */ - /* LISTof pexOptData( facetAttribs, colorType ) */ - /* LISTof pexVertex( mPts, nPts, vertexAttribs, colorType ) */ -} pexQuadrilateralMesh; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - CARD16 shape B16; - pexColorType colorType B16; - CARD16 FAS_Attributes B16; - CARD16 vertexAttributes B16; - CARD16 edgeAttributes B16; - CARD8 contourHint; - pexSwitch contourCountsFlag; - CARD16 numFAS B16; - CARD16 numVertices B16; - CARD16 numEdges B16; - CARD16 numContours B16; - /* LISTof OPT_DATA( numFAS ) */ - /* LISTof pexVertex( numVertices ) */ - /* LISTof CARD8( numEdges ) */ - /* pad( numEdges ) */ - /* LISTof CLISTof CLISTof CARD16( numFAS, numContours, numEdges ) */ - /* pad */ -} pexSetOfFillAreaSets; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexCoordType type B16; - CARD16 uOrder B16; - CARD16 vOrder B16; - CARD16 unused B16; - CARD32 numUknots B32; - CARD32 numVknots B32; - CARD16 mPts B16; - CARD16 nPts B16; - CARD32 numLists B32; - /* LISTof FLOAT( numUknots ) */ - /* LISTof FLOAT( numVKnots ) */ - /* LISTof {pexCoord3D|pexCoord4D}( mPts, nPts, surfaceType ) */ - /* LISTof CLISTof pexTrimCurve( numLists ) */ -} pexNURBSurface; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT point1_x B32; - PEXFLOAT point1_y B32; - PEXFLOAT point1_z B32; - PEXFLOAT point2_x B32; - PEXFLOAT point2_y B32; - PEXFLOAT point2_z B32; - PEXFLOAT point3_x B32; - PEXFLOAT point3_y B32; - PEXFLOAT point3_z B32; - CARD32 dx B32; - CARD32 dy B32; - /* LISTof pexTableIndex( dx, dy ) */ - /* pad( 2*dx*dy ) */ -} pexCellArray; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - PEXFLOAT point1_x B32; - PEXFLOAT point1_y B32; - PEXFLOAT point2_x B32; - PEXFLOAT point2_y B32; - CARD32 dx B32; - CARD32 dy B32; - /* LISTof pexTableIndex( dx, dy ) */ - /* pad( 2*dx*dy ) */ -} pexCellArray2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - pexColorType colorType B16; - CARD16 unused B16; - PEXFLOAT point1_x B32; - PEXFLOAT point1_y B32; - PEXFLOAT point1_z B32; - PEXFLOAT point2_x B32; - PEXFLOAT point2_y B32; - PEXFLOAT point2_z B32; - PEXFLOAT point3_x B32; - PEXFLOAT point3_y B32; - PEXFLOAT point3_z B32; - CARD32 dx B32; - CARD32 dy B32; - /* LISTof pexColorSpecifier( dx, dy ) */ -} pexExtendedCellArray; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - INT32 gdpId B32; - CARD32 numPoints B32; - CARD32 numBytes B32; - /* LISTof pexCoord3D( numPoints ) */ - /* LISTof CARD8( numBytes ) -- don't swap */ - /* pad( numBytes ) */ -} pexGDP; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; - INT32 gdpId B32; - CARD32 numPoints B32; - CARD32 numBytes B32; - /* LISTof pexCoord2D( numPoints ) */ - /* LISTof CARD8( numBytes ) -- don't swap */ - /* pad( numBytes ) */ -} pexGDP2D; - -typedef struct { - CARD16 oc_opcode B16; - CARD16 oc_length B16; -} pexNoop; - -/**************************************************************** - * EVENTS * - ****************************************************************/ -/* Event structure */ - -typedef struct { - BYTE type; /* X_Event */ - CARD8 what; /* unused */ - CARD16 sequenceNumber B16; - CARD32 rdr B32; - BYTE pad[24]; -} pexMaxHitsReachedEvent; - -#undef XID -#undef Drawable - -#endif /* _PEXPROTO_H_ */ - diff --git a/xc/lib/PEX5/PEXprotost.h b/xc/lib/PEX5/PEXprotost.h deleted file mode 100644 index a7670f147..000000000 --- a/xc/lib/PEX5/PEXprotost.h +++ /dev/null @@ -1,678 +0,0 @@ -/* $TOG: PEXprotost.h /main/8 1998/02/06 16:09:26 kaleb $ */ -/* - -Copyright 1992, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ - - -/****************************************************************************** -Copyright 1989, 1990, 1991 by Sun Microsystems, Inc. - - All Rights Reserved - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting documentation, and that -the name of Sun Microsystems not be used in advertising or publicity -pertaining to distribution of the software without specific, written prior -permission. Sun Microsystems makes no representations about the -suitability of this software for any purpose. It is provided "as is" without -express or implied warranty. - -SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT -SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. -******************************************************************************/ - -#ifndef _PEXPROTOST_H_ -#define _PEXPROTOST_H_ - -/* Matches revision 5.1C */ - -#include /* defines things like CARD32 */ - - -/* This is FLOAT as defined and used by the Protocol Encoding */ -#ifndef WORD64 -typedef float PEXFLOAT; -#else -typedef CARD32 PEXFLOAT; -#endif - - -typedef CARD32 pexAsfAttribute; -typedef CARD8 pexAsfValue; -typedef CARD32 pexBitmask; -typedef CARD16 pexBitmaskShort; -typedef CARD16 pexCoordType; /* rational, nonrational */ -typedef CARD16 pexComposition; -typedef CARD16 pexCullMode; -typedef BYTE pexDynamicType; -typedef INT16 pexEnumTypeIndex; -typedef XID pexLookupTable; -typedef CARD32 pexName; -typedef XID pexNameSet; -typedef XID pexPC; -typedef XID pexFont; - -#ifndef WORD64 -typedef PEXFLOAT pexMatrix[4][4]; -typedef PEXFLOAT pexMatrix3X3[3][3]; -#else -typedef CARD8 pexMatrix[64]; -typedef CARD8 pexMatrix3X3[36]; -#endif - -typedef XID pexPhigsWks; -typedef XID pexPickMeasure; -typedef XID pexRenderer; -typedef XID pexSC; -typedef XID pexStructure; -typedef CARD8 pexSwitch; -typedef CARD16 pexTableIndex; -typedef CARD16 pexTableType; /* could be smaller if it ever helps */ -typedef CARD16 pexTextHAlignment; -typedef CARD16 pexTextVAlignment; -typedef CARD16 pexTypeOrTableIndex; -typedef pexEnumTypeIndex pexColorType; /* ColorType */ - -/* included in others */ -typedef struct { - CARD16 length B16; - /* list of CARD8 -- don't swap */ -} pexString; - -typedef struct { - pexStructure sid B32; - PEXFLOAT priority B32; -} pexStructureInfo; - -typedef struct { - PEXFLOAT x B32; - PEXFLOAT y B32; -} pexVector2D; - -typedef struct { - PEXFLOAT x B32; - PEXFLOAT y B32; - PEXFLOAT z B32; -} pexVector3D; - -/* Coord structures */ - -typedef struct { - PEXFLOAT x B32; - PEXFLOAT y B32; -} pexCoord2D; - -typedef struct { - PEXFLOAT x B32; - PEXFLOAT y B32; - PEXFLOAT z B32; -} pexCoord3D; - -typedef struct { - PEXFLOAT x B32; - PEXFLOAT y B32; - PEXFLOAT z B32; - PEXFLOAT w B32; -} pexCoord4D; - - -/* Color structures */ -typedef struct { - PEXFLOAT red B32; - PEXFLOAT green B32; - PEXFLOAT blue B32; -} pexRgbFloatColor; - -typedef struct { - PEXFLOAT hue B32; - PEXFLOAT saturation B32; - PEXFLOAT value B32; -} pexHsvColor; - -typedef struct { - PEXFLOAT hue B32; - PEXFLOAT lightness B32; - PEXFLOAT saturation B32; -} pexHlsColor; - -typedef struct { - PEXFLOAT x B32; - PEXFLOAT y B32; - PEXFLOAT z B32; -} pexCieColor; - -typedef struct { - CARD8 red; - CARD8 green; - CARD8 blue; - CARD8 pad; -} pexRgb8Color; - -typedef struct { - CARD16 red B16; - CARD16 green B16; - CARD16 blue B16; - CARD16 pad B16; -} pexRgb16Color; - -typedef struct { - pexTableIndex index B16; - CARD16 pad B16; -} pexIndexedColor; - -typedef struct { - union { - pexIndexedColor indexed; - pexRgb8Color rgb8; - pexRgb16Color rgb16; - pexRgbFloatColor rgbFloat; - pexHsvColor hsvFloat; - pexHlsColor hlsFloat; - pexCieColor cieFloat; - } format; -} pexColor; - -typedef struct { - PEXFLOAT first B32; - PEXFLOAT second B32; - PEXFLOAT third B32; -} pexFloatColor; - -typedef struct { - pexColorType colorType B16; /* ColorType enumerated type */ - CARD16 unused B16; - /* SINGLE COLOR(colorType) */ -} pexColorSpecifier; - - -typedef struct { - pexEnumTypeIndex approxMethod B16; - CARD16 unused B16; - PEXFLOAT tolerance B32; -} pexCurveApproxData; - -typedef struct { - INT16 x B16; - INT16 y B16; - PEXFLOAT z B32; -} pexDeviceCoord; - -typedef struct { - INT16 x B16; - INT16 y B16; -} pexDeviceCoord2D; - -typedef struct { - INT16 xmin B16; - INT16 ymin B16; - INT16 xmax B16; - INT16 ymax B16; -} pexDeviceRect; - -typedef struct { - CARD16 elementType B16; - CARD16 length B16; -} pexElementInfo; - -typedef struct { - CARD16 whence B16; - CARD16 unused B16; - INT32 offset B32; -} pexElementPos; - -typedef struct { - pexElementPos position1; /* pexElementPos is 8 bytes long */ - pexElementPos position2; -} pexElementRange; - -typedef struct { - pexStructure structure B32; - CARD32 offset B32; -} pexElementRef; - -typedef struct { - PEXFLOAT lowerLeft_x B32; - PEXFLOAT lowerLeft_y B32; - PEXFLOAT upperRight_x B32; - PEXFLOAT upperRight_y B32; - PEXFLOAT concatpoint_x B32; - PEXFLOAT concatpoint_y B32; -} pexExtentInfo; - -typedef struct { - pexEnumTypeIndex index B16; - CARD16 descriptor_length B16; -} pexEnumTypeDesc; - -typedef struct { - PEXFLOAT point_x B32; - PEXFLOAT point_y B32; - PEXFLOAT point_z B32; - PEXFLOAT vector_x B32; - PEXFLOAT vector_y B32; - PEXFLOAT vector_z B32; -} pexHalfSpace; - -typedef struct { - pexNameSet incl B32; - pexNameSet excl B32; -} pexNameSetPair; - -typedef struct { - PEXFLOAT point_x B32; - PEXFLOAT point_y B32; - PEXFLOAT vector_x B32; - PEXFLOAT vector_y B32; -} pexHalfSpace2D; - -typedef struct { - CARD16 composition B16; - CARD16 unused B16; - pexMatrix matrix; -} pexLocalTransform3DData; - -typedef struct { - CARD16 composition B16; - CARD16 unused B16; - pexMatrix3X3 matrix; -} pexLocalTransform2DData; - -typedef struct { - PEXFLOAT xmin B32; - PEXFLOAT ymin B32; - PEXFLOAT zmin B32; - PEXFLOAT xmax B32; - PEXFLOAT ymax B32; - PEXFLOAT zmax B32; -} pexNpcSubvolume; - -/* an OPT_DATA structure cannot be defined because it has variable content - * and size. An union structure could be used to define a template for - * the data. However, since unions pad to a fixed amount of space and the - * protocol uses variable lengths, this is not appropriate for protocol - * data types. The most correct way of defining this data is to define - * one data structure for every possible combination of color, normal and - * edge data that could be given with a vertex or facet. - */ - -typedef struct { - pexStructure sid B32; - CARD32 offset B32; - CARD32 pickid B32; -} pexPickElementRef; - -/* pexPickPath is the old name of the above strucutre. - This is wrong, since the above is a Pick Element Ref - a Pick Path is a list of Pick Element Refs so naming - this structure pexPickPath was wrong, but it can't just - be changed without effecting lots of other code....... */ - -typedef pexPickElementRef pexPickPath; - -typedef struct { - pexTextVAlignment vertical B16; - pexTextHAlignment horizontal B16; -} pexTextAlignmentData; - -typedef struct { - pexSwitch visibility; - CARD8 unused; - CARD16 order B16; - pexCoordType type B16; - INT16 approxMethod B16; - PEXFLOAT tolerance B32; - PEXFLOAT tMin B32; - PEXFLOAT tMax B32; - CARD32 numKnots B32; - CARD32 numCoord B32; - /* LISTof FLOAT(numKnots) -- length = order + number of coords */ - /* LISTof {pexCoord3D|pexCoord4D}(numCoord) */ -} pexTrimCurve; - -typedef struct { - CARD8 depth; - CARD8 unused; - CARD16 type B16; - CARD32 visualID B32; -} pexRendererTarget; - -typedef struct { - pexEnumTypeIndex pickType B16; - CARD16 unused B16; - /* SINGLE HITBOX() */ -} pexPickRecord; - -typedef struct { - PEXFLOAT ambient B32; - PEXFLOAT diffuse B32; - PEXFLOAT specular B32; - PEXFLOAT specularConc B32; - PEXFLOAT transmission B32; /* 0.0 = opaque, 1.0 = transparent */ - pexColorType specular_colorType B16; - CARD16 unused B16; - /* SINGLE COLOR() */ -} pexReflectionAttr; - -typedef struct { - pexEnumTypeIndex approxMethod B16; - CARD16 unused B16; - PEXFLOAT uTolerance B32; - PEXFLOAT vTolerance B32; -} pexSurfaceApproxData; - - -typedef struct { - PEXFLOAT point_x B32; - PEXFLOAT point_y B32; - PEXFLOAT point_z B32; - /* SINGLE OPT_DATA() */ -} pexVertex; - - -typedef struct { - INT16 xmin B16; - INT16 ymin B16; - PEXFLOAT zmin B32; - INT16 xmax B16; - INT16 ymax B16; - PEXFLOAT zmax B32; - pexSwitch useDrawable; - BYTE pad[3]; -} pexViewport; - -typedef struct { - CARD16 clipFlags B16; - CARD16 unused B16; - PEXFLOAT clipLimits_xmin B32; - PEXFLOAT clipLimits_ymin B32; - PEXFLOAT clipLimits_zmin B32; - PEXFLOAT clipLimits_xmax B32; - PEXFLOAT clipLimits_ymax B32; - PEXFLOAT clipLimits_zmax B32; - pexMatrix orientation; - pexMatrix mapping; -} pexViewEntry; - -typedef struct { - pexTableIndex index B16; - CARD16 unused1 B16; - CARD16 clipFlags B16; - CARD16 unused2 B16; - PEXFLOAT clipLimits_xmin B32; - PEXFLOAT clipLimits_ymin B32; - PEXFLOAT clipLimits_zmin B32; - PEXFLOAT clipLimits_xmax B32; - PEXFLOAT clipLimits_ymax B32; - PEXFLOAT clipLimits_zmax B32; - pexMatrix orientation; - pexMatrix mapping; -} pexViewRep; - -/* - * typedefs for lookup tables - */ - -typedef struct { - CARD16 definableEntries B16; - CARD16 numPredefined B16; - CARD16 predefinedMin B16; - CARD16 predefinedMax B16; -} pexTableInfo; - -typedef struct { - pexEnumTypeIndex lineType B16; - pexEnumTypeIndex polylineInterp B16; - pexEnumTypeIndex curveApprox_method B16; - CARD16 unused1 B16; - PEXFLOAT curveApprox_tolerance B32; - PEXFLOAT lineWidth B32; - pexColorType lineColorType B16; - CARD16 unused2 B16; - /* SINGLE COLOR(lineColorType) */ -} pexLineBundleEntry; - -typedef struct { - pexEnumTypeIndex markerType B16; - INT16 unused1 B16; - PEXFLOAT markerScale B32; - pexColorType markerColorType B16; - CARD16 unused2 B16; - /* SINGLE COLOR(markerColorType) */ -} pexMarkerBundleEntry; - -typedef struct { - CARD16 textFontIndex B16; - CARD16 textPrecision B16; - PEXFLOAT charExpansion B32; - PEXFLOAT charSpacing B32; - pexColorType textColorType B16; - CARD16 unused B16; - /* SINGLE COLOR(textColorType) */ -} pexTextBundleEntry; - - -/* - Note that since an InteriorBundleEntry contains 4 embedded instances of - pexColorSpecifier, a variable-sized item, a data structure cannot be - defined for it. -*/ -typedef struct { - pexEnumTypeIndex interiorStyle B16; - INT16 interiorStyleIndex B16; - pexEnumTypeIndex reflectionModel B16; - pexEnumTypeIndex surfaceInterp B16; - pexEnumTypeIndex bfInteriorStyle B16; - INT16 bfInteriorStyleIndex B16; - pexEnumTypeIndex bfReflectionModel B16; - pexEnumTypeIndex bfSurfaceInterp B16; - pexEnumTypeIndex surfaceApprox_method B16; - CARD16 unused B16; - PEXFLOAT surfaceApproxuTolerance B32; - PEXFLOAT surfaceApproxvTolerance B32; - /* SINGLE pexColorSpecifier surfaceColor */ - /* SINGLE pexReflectionAttr reflectionAttr */ - /* SINGLE pexColorSpecifier bfSurfaceColor */ - /* SINGLE pexReflectionAttr bfReflectionAttr */ -} pexInteriorBundleEntry; - -typedef struct { - pexSwitch edges; - CARD8 unused1; - pexEnumTypeIndex edgeType B16; - PEXFLOAT edgeWidth B32; - pexColorType edgeColorType B16; - CARD16 unused2 B16; - /* SINGLE COLOR(edgeColorType) */ -} pexEdgeBundleEntry; - -typedef struct { - pexColorType colorType B16; - CARD16 numx B16; - CARD16 numy B16; - CARD16 unused B16; - /* LISTof Color(numx, numy) 2D array of colors */ -} pexPatternEntry; - -/* a pexColorEntry is just a pexColorSpecifier -*/ - -typedef struct { - CARD32 numFonts B32; - /* LISTof pexFont( numFonts ) */ -} pexTextFontEntry; - -/* a pexViewEntry is defined above */ - -typedef struct { - pexEnumTypeIndex lightType B16; - INT16 unused1 B16; - PEXFLOAT direction_x B32; - PEXFLOAT direction_y B32; - PEXFLOAT direction_z B32; - PEXFLOAT point_x B32; - PEXFLOAT point_y B32; - PEXFLOAT point_z B32; - PEXFLOAT concentration B32; - PEXFLOAT spreadAngle B32; - PEXFLOAT attenuation1 B32; - PEXFLOAT attenuation2 B32; - pexColorType lightColorType B16; - CARD16 unused2 B16; - /* SINGLE COLOR(lightColorType) */ -} pexLightEntry; - -typedef struct { - pexSwitch mode; - CARD8 unused1; - CARD16 unused2 B16; - PEXFLOAT frontPlane B32; - PEXFLOAT backPlane B32; - PEXFLOAT frontScaling B32; - PEXFLOAT backScaling B32; - pexColorType depthCueColorType B16; - CARD16 unused3 B16; - /* SINGLE COLOR(depthCueColorType) */ -} pexDepthCueEntry; - -typedef struct { - INT16 approxType B16; - INT16 approxModel B16; - CARD16 max1 B16; - CARD16 max2 B16; - CARD16 max3 B16; - CARD8 dither; - CARD8 unused; - CARD32 mult1 B32; - CARD32 mult2 B32; - CARD32 mult3 B32; - PEXFLOAT weight1 B32; - PEXFLOAT weight2 B32; - PEXFLOAT weight3 B32; - CARD32 basePixel B32; -} pexColorApproxEntry; - - -/* Font structures */ - -typedef struct { - Atom name B32; - CARD32 value B32; -} pexFontProp; - -typedef struct { - CARD32 firstGlyph B32; - CARD32 lastGlyph B32; - CARD32 defaultGlyph B32; - pexSwitch allExist; - pexSwitch strokeFont; - CARD16 unused B16; - CARD32 numProps B32; - /* LISTof pexFontProp(numProps) */ -} pexFontInfo; - - -/* Text Structures */ - -typedef struct { - INT16 characterSet B16; - CARD8 characterSetWidth; - CARD8 encodingState; - CARD16 unused B16; - CARD16 numChars B16; - /* LISTof CHARACTER( numChars ) */ - /* pad */ -} pexMonoEncoding; - -/* CHARACTER is either a CARD8, a CARD16, or a CARD32 */ - - -/* Parametric Surface Characteristics types */ - -/* type 1 None */ - -/* type 2 Implementation Dependent */ - -typedef struct { - CARD16 placementType B16; - CARD16 unused B16; - CARD16 numUcurves B16; - CARD16 numVcurves B16; -} pexPSC_IsoparametricCurves; /* type 3 */ - -typedef struct { - PEXFLOAT origin_x B32; - PEXFLOAT origin_y B32; - PEXFLOAT origin_z B32; - PEXFLOAT direction_x B32; - PEXFLOAT direction_y B32; - PEXFLOAT direction_z B32; - CARD16 numberIntersections B16; - CARD16 pad B16; - /* LISTof pexCoord3D( numIntersections ) */ -} pexPSC_LevelCurves; /* type 4: MC - type 5: WC */ - -/* Pick Device data records */ - -typedef struct { - INT16 position_x B16; - INT16 position_y B16; - PEXFLOAT distance B32; -} pexPD_DC_HitBox; /* pick device 1 */ - -typedef pexNpcSubvolume pexPD_NPC_HitVolume; /* pick device 2 */ - - -/* Output Command errors */ - -typedef struct { - CARD8 type; /* 0 */ - CARD8 errorCode; /* 14 */ - CARD16 sequenceNumber B16; - CARD32 resourceId B32; /* renderer or structure */ - CARD16 minorCode B16; - CARD8 majorCode; - CARD8 unused; - CARD16 opcode B16; /* opcode of failed output command */ - CARD16 numCommands B16; /* number successfully done before error */ - BYTE pad[16]; -} pexOutputCommandError; - - -/* Registered PEX Escapes */ - -typedef struct { - INT16 fpFormat B16; - CARD8 unused[2]; - CARD32 rdr B32; /* renderer ID */ - /* SINGLE ColorSpecifier() */ -} pexEscapeSetEchoColorData; - -#endif /* _PEXPROTOST_H_ */ diff --git a/xc/lib/PEX5/jump_funcs b/xc/lib/PEX5/jump_funcs deleted file mode 100644 index 4afa711ac..000000000 --- a/xc/lib/PEX5/jump_funcs +++ /dev/null @@ -1,417 +0,0 @@ -# $XConsortium: jump_funcs,v 1.2 94/12/07 10:48:56 kaleb Exp $ -# $XFree86: xc/lib/PEX5/jump_funcs,v 3.1 1995/01/28 15:42:19 dawes Exp $ -# -00000000 T _PEXEscape libPEX5 pl_escape -00000000 T _PEXEscapeWithReply libPEX5 pl_escape -00000000 T _PEXSetEchoColor libPEX5 pl_escape -00000000 T _PEXLoadFont libPEX5 pl_font -00000000 T _PEXUnloadFont libPEX5 pl_font -00000000 T _PEXQueryFont libPEX5 pl_font -00000000 T _PEXListFonts libPEX5 pl_font -00000000 T _PEXListFontsWithInfo libPEX5 pl_font -00000000 T _PEXQueryTextExtents libPEX5 pl_font -00000000 T _PEXQueryEncodedTextExtents libPEX5 pl_font -00000000 T _PEXFreeEnumInfo libPEX5 pl_free -00000000 T _PEXFreeFontInfo libPEX5 pl_free -00000000 T _PEXFreeFontNames libPEX5 pl_free -00000000 T _PEXFreePCAttributes libPEX5 pl_free -00000000 T _PEXFreePDAttributes libPEX5 pl_free -00000000 T _PEXFreePMAttributes libPEX5 pl_free -00000000 T _PEXFreePickPaths libPEX5 pl_free -00000000 T _PEXFreeRendererAttributes libPEX5 pl_free -00000000 T _PEXFreeSCAttributes libPEX5 pl_free -00000000 T _PEXFreeStructurePaths libPEX5 pl_free -00000000 T _PEXFreeTableEntries libPEX5 pl_free -00000000 T _PEXFreeWorkstationAttributes libPEX5 pl_free -00000000 T _PEXFreeOCData libPEX5 pl_free -00000000 T _PEXCreateLookupTable libPEX5 pl_lut -00000000 T _PEXFreeLookupTable libPEX5 pl_lut -00000000 T _PEXCopyLookupTable libPEX5 pl_lut -00000000 T _PEXGetTableInfo libPEX5 pl_lut -00000000 T _PEXGetPredefinedEntries libPEX5 pl_lut -00000000 T _PEXGetDefinedIndices libPEX5 pl_lut -00000000 T _PEXGetTableEntry libPEX5 pl_lut -00000000 T _PEXGetTableEntries libPEX5 pl_lut -00000000 T _PEXSetTableEntries libPEX5 pl_lut -00000000 T _PEXDeleteTableEntries libPEX5 pl_lut -00000000 T _PEXCreateNameSet libPEX5 pl_nameset -00000000 T _PEXFreeNameSet libPEX5 pl_nameset -00000000 T _PEXCopyNameSet libPEX5 pl_nameset -00000000 T _PEXGetNameSet libPEX5 pl_nameset -00000000 T _PEXChangeNameSet libPEX5 pl_nameset -00000000 T _PEXSetMarkerType libPEX5 pl_oc_attr -00000000 T _PEXSetMarkerScale libPEX5 pl_oc_attr -00000000 T _PEXSetMarkerColorIndex libPEX5 pl_oc_attr -00000000 T _PEXSetMarkerColor libPEX5 pl_oc_attr -00000000 T _PEXSetMarkerBundleIndex libPEX5 pl_oc_attr -00000000 T _PEXSetTextFontIndex libPEX5 pl_oc_attr -00000000 T _PEXSetTextPrecision libPEX5 pl_oc_attr -00000000 T _PEXSetCharExpansion libPEX5 pl_oc_attr -00000000 T _PEXSetCharSpacing libPEX5 pl_oc_attr -00000000 T _PEXSetTextColorIndex libPEX5 pl_oc_attr -00000000 T _PEXSetTextColor libPEX5 pl_oc_attr -00000000 T _PEXSetCharHeight libPEX5 pl_oc_attr -00000000 T _PEXSetCharUpVector libPEX5 pl_oc_attr -00000000 T _PEXSetTextPath libPEX5 pl_oc_attr -00000000 T _PEXSetTextAlignment libPEX5 pl_oc_attr -00000000 T _PEXSetATextHeight libPEX5 pl_oc_attr -00000000 T _PEXSetATextUpVector libPEX5 pl_oc_attr -00000000 T _PEXSetATextPath libPEX5 pl_oc_attr -00000000 T _PEXSetATextAlignment libPEX5 pl_oc_attr -00000000 T _PEXSetATextStyle libPEX5 pl_oc_attr -00000000 T _PEXSetTextBundleIndex libPEX5 pl_oc_attr -00000000 T _PEXSetLineType libPEX5 pl_oc_attr -00000000 T _PEXSetLineWidth libPEX5 pl_oc_attr -00000000 T _PEXSetLineColorIndex libPEX5 pl_oc_attr -00000000 T _PEXSetLineColor libPEX5 pl_oc_attr -00000000 T _PEXSetCurveApprox libPEX5 pl_oc_attr -00000000 T _PEXSetPolylineInterpMethod libPEX5 pl_oc_attr -00000000 T _PEXSetLineBundleIndex libPEX5 pl_oc_attr -00000000 T _PEXSetInteriorStyle libPEX5 pl_oc_attr -00000000 T _PEXSetInteriorStyleIndex libPEX5 pl_oc_attr -00000000 T _PEXSetSurfaceColorIndex libPEX5 pl_oc_attr -00000000 T _PEXSetSurfaceColor libPEX5 pl_oc_attr -00000000 T _PEXSetReflectionAttributes libPEX5 pl_oc_attr -00000000 T _PEXSetReflectionModel libPEX5 pl_oc_attr -00000000 T _PEXSetSurfaceInterpMethod libPEX5 pl_oc_attr -00000000 T _PEXSetBFInteriorStyle libPEX5 pl_oc_attr -00000000 T _PEXSetBFInteriorStyleIndex libPEX5 pl_oc_attr -00000000 T _PEXSetBFSurfaceColorIndex libPEX5 pl_oc_attr -00000000 T _PEXSetBFSurfaceColor libPEX5 pl_oc_attr -00000000 T _PEXSetBFReflectionAttributes libPEX5 pl_oc_attr -00000000 T _PEXSetBFReflectionModel libPEX5 pl_oc_attr -00000000 T _PEXSetBFSurfaceInterpMethod libPEX5 pl_oc_attr -00000000 T _PEXSetSurfaceApprox libPEX5 pl_oc_attr -00000000 T _PEXSetFacetCullingMode libPEX5 pl_oc_attr -00000000 T _PEXSetFacetDistinguishFlag libPEX5 pl_oc_attr -00000000 T _PEXSetPatternSize libPEX5 pl_oc_attr -00000000 T _PEXSetPatternAttributes2D libPEX5 pl_oc_attr -00000000 T _PEXSetPatternAttributes libPEX5 pl_oc_attr -00000000 T _PEXSetInteriorBundleIndex libPEX5 pl_oc_attr -00000000 T _PEXSetSurfaceEdgeFlag libPEX5 pl_oc_attr -00000000 T _PEXSetSurfaceEdgeType libPEX5 pl_oc_attr -00000000 T _PEXSetSurfaceEdgeWidth libPEX5 pl_oc_attr -00000000 T _PEXSetSurfaceEdgeColorIndex libPEX5 pl_oc_attr -00000000 T _PEXSetSurfaceEdgeColor libPEX5 pl_oc_attr -00000000 T _PEXSetEdgeBundleIndex libPEX5 pl_oc_attr -00000000 T _PEXSetIndividualASF libPEX5 pl_oc_attr -00000000 T _PEXSetLocalTransform libPEX5 pl_oc_attr -00000000 T _PEXSetLocalTransform2D libPEX5 pl_oc_attr -00000000 T _PEXSetGlobalTransform libPEX5 pl_oc_attr -00000000 T _PEXSetGlobalTransform2D libPEX5 pl_oc_attr -00000000 T _PEXSetModelClipFlag libPEX5 pl_oc_attr -00000000 T _PEXSetModelClipVolume libPEX5 pl_oc_attr -00000000 T _PEXSetModelClipVolume2D libPEX5 pl_oc_attr -00000000 T _PEXRestoreModelClipVolume libPEX5 pl_oc_attr -00000000 T _PEXSetViewIndex libPEX5 pl_oc_attr -00000000 T _PEXSetLightSourceState libPEX5 pl_oc_attr -00000000 T _PEXSetDepthCueIndex libPEX5 pl_oc_attr -00000000 T _PEXSetPickID libPEX5 pl_oc_attr -00000000 T _PEXSetHLHSRID libPEX5 pl_oc_attr -00000000 T _PEXSetColorApproxIndex libPEX5 pl_oc_attr -00000000 T _PEXSetParaSurfCharacteristics libPEX5 pl_oc_attr -00000000 T _PEXSetRenderingColorModel libPEX5 pl_oc_attr -00000000 T _PEXAddToNameSet libPEX5 pl_oc_attr -00000000 T _PEXRemoveFromNameSet libPEX5 pl_oc_attr -00000000 T _PEXDecodeOCs libPEX5 pl_oc_dec -00000000 T __PEXDecodeEnumType libPEX5 pl_oc_dec -00000000 T __PEXDecodeTableIndex libPEX5 pl_oc_dec -00000000 T __PEXDecodeColor libPEX5 pl_oc_dec -00000000 T __PEXDecodeFloat libPEX5 pl_oc_dec -00000000 T __PEXDecodeCARD16 libPEX5 pl_oc_dec -00000000 T __PEXDecodeVector2D libPEX5 pl_oc_dec -00000000 T __PEXDecodeTextAlignment libPEX5 pl_oc_dec -00000000 T __PEXDecodeCurveApprox libPEX5 pl_oc_dec -00000000 T __PEXDecodeReflectionAttr libPEX5 pl_oc_dec -00000000 T __PEXDecodeSurfaceApprox libPEX5 pl_oc_dec -00000000 T __PEXDecodeCullMode libPEX5 pl_oc_dec -00000000 T __PEXDecodeSwitch libPEX5 pl_oc_dec -00000000 T __PEXDecodePatternSize libPEX5 pl_oc_dec -00000000 T __PEXDecodePatternAttr2D libPEX5 pl_oc_dec -00000000 T __PEXDecodePatternAttr libPEX5 pl_oc_dec -00000000 T __PEXDecodeASF libPEX5 pl_oc_dec -00000000 T __PEXDecodeLocalTransform libPEX5 pl_oc_dec -00000000 T __PEXDecodeLocalTransform2D libPEX5 pl_oc_dec -00000000 T __PEXDecodeGlobalTransform libPEX5 pl_oc_dec -00000000 T __PEXDecodeGlobalTransform2D libPEX5 pl_oc_dec -00000000 T __PEXDecodeModelClipVolume libPEX5 pl_oc_dec -00000000 T __PEXDecodeModelClipVolume2D libPEX5 pl_oc_dec -00000000 T __PEXDecodeRestoreModelClip libPEX5 pl_oc_dec -00000000 T __PEXDecodeLightSourceState libPEX5 pl_oc_dec -00000000 T __PEXDecodeID libPEX5 pl_oc_dec -00000000 T __PEXDecodePSC libPEX5 pl_oc_dec -00000000 T __PEXDecodeNameSet libPEX5 pl_oc_dec -00000000 T __PEXDecodeExecuteStructure libPEX5 pl_oc_dec -00000000 T __PEXDecodeLabel libPEX5 pl_oc_dec -00000000 T __PEXDecodeApplicationData libPEX5 pl_oc_dec -00000000 T __PEXDecodeGSE libPEX5 pl_oc_dec -00000000 T __PEXDecodeMarkers libPEX5 pl_oc_dec -00000000 T __PEXDecodeMarkers2D libPEX5 pl_oc_dec -00000000 T __PEXDecodePolyline libPEX5 pl_oc_dec -00000000 T __PEXDecodePolyline2D libPEX5 pl_oc_dec -00000000 T __PEXDecodeText libPEX5 pl_oc_dec -00000000 T __PEXDecodeText2D libPEX5 pl_oc_dec -00000000 T __PEXDecodeAnnoText libPEX5 pl_oc_dec -00000000 T __PEXDecodeAnnoText2D libPEX5 pl_oc_dec -00000000 T __PEXDecodePolylineSet libPEX5 pl_oc_dec -00000000 T __PEXDecodeNURBCurve libPEX5 pl_oc_dec -00000000 T __PEXDecodeFillArea libPEX5 pl_oc_dec -00000000 T __PEXDecodeFillArea2D libPEX5 pl_oc_dec -00000000 T __PEXDecodeFillAreaWithData libPEX5 pl_oc_dec -00000000 T __PEXDecodeFillAreaSet libPEX5 pl_oc_dec -00000000 T __PEXDecodeFillAreaSet2D libPEX5 pl_oc_dec -00000000 T __PEXDecodeFillAreaSetWithData libPEX5 pl_oc_dec -00000000 T __PEXDecodeTriangleStrip libPEX5 pl_oc_dec -00000000 T __PEXDecodeQuadMesh libPEX5 pl_oc_dec -00000000 T __PEXDecodeSOFA libPEX5 pl_oc_dec -00000000 T __PEXDecodeNURBSurface libPEX5 pl_oc_dec -00000000 T __PEXDecodeCellArray libPEX5 pl_oc_dec -00000000 T __PEXDecodeCellArray2D libPEX5 pl_oc_dec -00000000 T __PEXDecodeExtendedCellArray libPEX5 pl_oc_dec -00000000 T __PEXDecodeGDP libPEX5 pl_oc_dec -00000000 T __PEXDecodeGDP2D libPEX5 pl_oc_dec -00000000 T __PEXDecodeNoop libPEX5 pl_oc_dec -00000000 T _PEXEncodeOCs libPEX5 pl_oc_enc -00000000 T __PEXEncodeEnumType libPEX5 pl_oc_enc -00000000 T __PEXEncodeTableIndex libPEX5 pl_oc_enc -00000000 T __PEXEncodeColor libPEX5 pl_oc_enc -00000000 T __PEXEncodeFloat libPEX5 pl_oc_enc -00000000 T __PEXEncodeCARD16 libPEX5 pl_oc_enc -00000000 T __PEXEncodeVector2D libPEX5 pl_oc_enc -00000000 T __PEXEncodeTextAlignment libPEX5 pl_oc_enc -00000000 T __PEXEncodeCurveApprox libPEX5 pl_oc_enc -00000000 T __PEXEncodeReflectionAttr libPEX5 pl_oc_enc -00000000 T __PEXEncodeSurfaceApprox libPEX5 pl_oc_enc -00000000 T __PEXEncodeCullMode libPEX5 pl_oc_enc -00000000 T __PEXEncodeSwitch libPEX5 pl_oc_enc -00000000 T __PEXEncodePatternSize libPEX5 pl_oc_enc -00000000 T __PEXEncodePatternAttr2D libPEX5 pl_oc_enc -00000000 T __PEXEncodePatternAttr libPEX5 pl_oc_enc -00000000 T __PEXEncodeASF libPEX5 pl_oc_enc -00000000 T __PEXEncodeLocalTransform libPEX5 pl_oc_enc -00000000 T __PEXEncodeLocalTransform2D libPEX5 pl_oc_enc -00000000 T __PEXEncodeGlobalTransform libPEX5 pl_oc_enc -00000000 T __PEXEncodeGlobalTransform2D libPEX5 pl_oc_enc -00000000 T __PEXEncodeModelClipVolume libPEX5 pl_oc_enc -00000000 T __PEXEncodeModelClipVolume2D libPEX5 pl_oc_enc -00000000 T __PEXEncodeRestoreModelClip libPEX5 pl_oc_enc -00000000 T __PEXEncodeLightSourceState libPEX5 pl_oc_enc -00000000 T __PEXEncodeID libPEX5 pl_oc_enc -00000000 T __PEXEncodePSC libPEX5 pl_oc_enc -00000000 T __PEXEncodeNameSet libPEX5 pl_oc_enc -00000000 T __PEXEncodeExecuteStructure libPEX5 pl_oc_enc -00000000 T __PEXEncodeLabel libPEX5 pl_oc_enc -00000000 T __PEXEncodeApplicationData libPEX5 pl_oc_enc -00000000 T __PEXEncodeGSE libPEX5 pl_oc_enc -00000000 T __PEXEncodeMarkers libPEX5 pl_oc_enc -00000000 T __PEXEncodePolyline libPEX5 pl_oc_enc -00000000 T __PEXEncodeMarkers2D libPEX5 pl_oc_enc -00000000 T __PEXEncodePolyline2D libPEX5 pl_oc_enc -00000000 T __PEXEncodeText libPEX5 pl_oc_enc -00000000 T __PEXEncodeText2D libPEX5 pl_oc_enc -00000000 T __PEXEncodeAnnoText libPEX5 pl_oc_enc -00000000 T __PEXEncodeAnnoText2D libPEX5 pl_oc_enc -00000000 T __PEXEncodePolylineSet libPEX5 pl_oc_enc -00000000 T __PEXEncodeNURBCurve libPEX5 pl_oc_enc -00000000 T __PEXEncodeFillArea libPEX5 pl_oc_enc -00000000 T __PEXEncodeFillArea2D libPEX5 pl_oc_enc -00000000 T __PEXEncodeFillAreaWithData libPEX5 pl_oc_enc -00000000 T __PEXEncodeFillAreaSet libPEX5 pl_oc_enc -00000000 T __PEXEncodeFillAreaSet2D libPEX5 pl_oc_enc -00000000 T __PEXEncodeFillAreaSetWithData libPEX5 pl_oc_enc -00000000 T __PEXEncodeTriangleStrip libPEX5 pl_oc_enc -00000000 T __PEXEncodeQuadMesh libPEX5 pl_oc_enc -00000000 T __PEXEncodeSOFA libPEX5 pl_oc_enc -00000000 T __PEXEncodeNURBSurface libPEX5 pl_oc_enc -00000000 T __PEXEncodeCellArray libPEX5 pl_oc_enc -00000000 T __PEXEncodeCellArray2D libPEX5 pl_oc_enc -00000000 T __PEXEncodeExtendedCellArray libPEX5 pl_oc_enc -00000000 T __PEXEncodeGDP libPEX5 pl_oc_enc -00000000 T __PEXEncodeGDP2D libPEX5 pl_oc_enc -00000000 T __PEXEncodeNoop libPEX5 pl_oc_enc -00000000 T _PEXMarkers libPEX5 pl_oc_prim -00000000 T _PEXMarkers2D libPEX5 pl_oc_prim -00000000 T _PEXText libPEX5 pl_oc_prim -00000000 T _PEXText2D libPEX5 pl_oc_prim -00000000 T _PEXAnnotationText libPEX5 pl_oc_prim -00000000 T _PEXAnnotationText2D libPEX5 pl_oc_prim -00000000 T _PEXEncodedText libPEX5 pl_oc_prim -00000000 T _PEXEncodedText2D libPEX5 pl_oc_prim -00000000 T _PEXEncodedAnnoText libPEX5 pl_oc_prim -00000000 T _PEXEncodedAnnoText2D libPEX5 pl_oc_prim -00000000 T _PEXPolyline libPEX5 pl_oc_prim -00000000 T _PEXPolyline2D libPEX5 pl_oc_prim -00000000 T _PEXPolylineSetWithData libPEX5 pl_oc_prim -00000000 T _PEXNURBCurve libPEX5 pl_oc_prim -00000000 T _PEXFillArea libPEX5 pl_oc_prim -00000000 T _PEXFillArea2D libPEX5 pl_oc_prim -00000000 T _PEXFillAreaWithData libPEX5 pl_oc_prim -00000000 T _PEXFillAreaSet libPEX5 pl_oc_prim -00000000 T _PEXFillAreaSet2D libPEX5 pl_oc_prim -00000000 T _PEXFillAreaSetWithData libPEX5 pl_oc_prim -00000000 T _PEXSetOfFillAreaSets libPEX5 pl_oc_prim -00000000 T _PEXTriangleStrip libPEX5 pl_oc_prim -00000000 T _PEXQuadrilateralMesh libPEX5 pl_oc_prim -00000000 T _PEXNURBSurface libPEX5 pl_oc_prim -00000000 T _PEXCellArray libPEX5 pl_oc_prim -00000000 T _PEXCellArray2D libPEX5 pl_oc_prim -00000000 T _PEXExtendedCellArray libPEX5 pl_oc_prim -00000000 T _PEXGDP libPEX5 pl_oc_prim -00000000 T _PEXGDP2D libPEX5 pl_oc_prim -00000000 T _PEXExecuteStructure libPEX5 pl_oc_struct -00000000 T _PEXLabel libPEX5 pl_oc_struct -00000000 T _PEXNoop libPEX5 pl_oc_struct -00000000 T _PEXApplicationData libPEX5 pl_oc_struct -00000000 T _PEXGSE libPEX5 pl_oc_struct -00000000 T _PEXStartOCs libPEX5 pl_oc_util -00000000 T _PEXFinishOCs libPEX5 pl_oc_util -00000000 T __PEXSendBytesToOC libPEX5 pl_oc_util -00000000 T _PEXCopyBytesToOC libPEX5 pl_oc_util -00000000 T __PEXCopyPaddedBytesToOC libPEX5 pl_oc_util -00000000 T _PEXGetOCAddr libPEX5 pl_oc_util -00000000 T _PEXSendOCs libPEX5 pl_oc_util -00000000 T __PEXGenOCBadLengthError libPEX5 pl_oc_util -00000000 T _PEXGetSizeOCs libPEX5 pl_oc_util -00000000 T _PEXCountOCs libPEX5 pl_oc_util -00000000 T _PEXCreatePipelineContext libPEX5 pl_pc -00000000 T _PEXFreePipelineContext libPEX5 pl_pc -00000000 T _PEXCopyPipelineContext libPEX5 pl_pc -00000000 T _PEXGetPipelineContext libPEX5 pl_pc -00000000 T _PEXChangePipelineContext libPEX5 pl_pc -00000000 T _PEXCreatePickMeasure libPEX5 pl_pick -00000000 T _PEXFreePickMeasure libPEX5 pl_pick -00000000 T _PEXGetPickMeasure libPEX5 pl_pick -00000000 T _PEXUpdatePickMeasure libPEX5 pl_pick -00000000 T _PEXGetPickDevice libPEX5 pl_pick -00000000 T _PEXChangePickDevice libPEX5 pl_pick -00000000 T __PEXConvertMaxHitsEvent libPEX5 pl_pick -00000000 T _PEXBeginPickOne libPEX5 pl_pick -00000000 T _PEXEndPickOne libPEX5 pl_pick -00000000 T _PEXPickOne libPEX5 pl_pick -00000000 T _PEXBeginPickAll libPEX5 pl_pick -00000000 T _PEXEndPickAll libPEX5 pl_pick -00000000 T _PEXPickAll libPEX5 pl_pick -00000000 T _PEXCreateRenderer libPEX5 pl_rdr -00000000 T _PEXFreeRenderer libPEX5 pl_rdr -00000000 T _PEXGetRendererAttributes libPEX5 pl_rdr -00000000 T _PEXGetRendererDynamics libPEX5 pl_rdr -00000000 T _PEXChangeRenderer libPEX5 pl_rdr -00000000 T _PEXBeginRendering libPEX5 pl_rdr -00000000 T _PEXEndRendering libPEX5 pl_rdr -00000000 T _PEXBeginStructure libPEX5 pl_rdr -00000000 T _PEXEndStructure libPEX5 pl_rdr -00000000 T _PEXRenderNetwork libPEX5 pl_rdr -00000000 T _PEXRenderElements libPEX5 pl_rdr -00000000 T _PEXAccumulateState libPEX5 pl_rdr -00000000 T _PEXCreateSearchContext libPEX5 pl_sc -00000000 T _PEXFreeSearchContext libPEX5 pl_sc -00000000 T _PEXCopySearchContext libPEX5 pl_sc -00000000 T _PEXGetSearchContext libPEX5 pl_sc -00000000 T _PEXChangeSearchContext libPEX5 pl_sc -00000000 T _PEXSearchNetwork libPEX5 pl_sc -00000000 T _PEXInitialize libPEX5 pl_startup -00000000 T _PEXGetExtensionInfo libPEX5 pl_startup -00000000 T _PEXGetProtocolFloatFormat libPEX5 pl_startup -00000000 T _PEXGetEnumTypeInfo libPEX5 pl_startup -00000000 T _PEXGetImpDepConstants libPEX5 pl_startup -00000000 T _PEXMatchRenderingTargets libPEX5 pl_startup -00000000 T __PEXConvertOCError libPEX5 pl_startup -00000000 T __PEXPrintOCError libPEX5 pl_startup -00000000 T __PEXCloseDisplay libPEX5 pl_startup -00000000 T _PEXCreateStructure libPEX5 pl_struct -00000000 T _PEXDestroyStructures libPEX5 pl_struct -00000000 T _PEXCopyStructure libPEX5 pl_struct -00000000 T _PEXGetStructureInfo libPEX5 pl_struct -00000000 T _PEXGetElementInfo libPEX5 pl_struct -00000000 T _PEXGetStructuresInNetwork libPEX5 pl_struct -00000000 T _PEXGetAncestors libPEX5 pl_struct -00000000 T _PEXGetDescendants libPEX5 pl_struct -00000000 T _PEXFetchElements libPEX5 pl_struct -00000000 T _PEXFetchElementsAndSend libPEX5 pl_struct -00000000 T _PEXSetEditingMode libPEX5 pl_struct -00000000 T _PEXSetElementPtr libPEX5 pl_struct -00000000 T _PEXSetElementPtrAtLabel libPEX5 pl_struct -00000000 T _PEXElementSearch libPEX5 pl_struct -00000000 T _PEXDeleteElements libPEX5 pl_struct -00000000 T _PEXDeleteToLabel libPEX5 pl_struct -00000000 T _PEXDeleteBetweenLabels libPEX5 pl_struct -00000000 T _PEXCopyElements libPEX5 pl_struct -00000000 T _PEXChangeStructureRefs libPEX5 pl_struct -00000000 T _PEXRotate libPEX5 pl_util -00000000 T _PEXRotate2D libPEX5 pl_util -00000000 T _PEXRotateGeneral libPEX5 pl_util -00000000 T _PEXScale libPEX5 pl_util -00000000 T _PEXScale2D libPEX5 pl_util -00000000 T _PEXTranslate libPEX5 pl_util -00000000 T _PEXTranslate2D libPEX5 pl_util -00000000 T _PEXMatrixMult libPEX5 pl_util -00000000 T _PEXMatrixMult2D libPEX5 pl_util -00000000 T _PEXBuildTransform libPEX5 pl_util -00000000 T _PEXBuildTransform2D libPEX5 pl_util -00000000 T _PEXViewOrientationMatrix libPEX5 pl_util -00000000 T _PEXViewOrientationMatrix2D libPEX5 pl_util -00000000 T _PEXViewMappingMatrix libPEX5 pl_util -00000000 T _PEXViewMappingMatrix2D libPEX5 pl_util -00000000 T _PEXLookAtViewMatrix libPEX5 pl_util -00000000 T _PEXPolarViewMatrix libPEX5 pl_util -00000000 T _PEXOrthoProjMatrix libPEX5 pl_util -00000000 T _PEXPerspProjMatrix libPEX5 pl_util -00000000 T _PEXTransformPoints libPEX5 pl_util -00000000 T _PEXTransformPoints2D libPEX5 pl_util -00000000 T _PEXTransformPoints4D libPEX5 pl_util -00000000 T _PEXTransformPoints2DH libPEX5 pl_util -00000000 T _PEXTransformVectors libPEX5 pl_util -00000000 T _PEXTransformVectors2D libPEX5 pl_util -00000000 T _PEXNormalizeVectors libPEX5 pl_util -00000000 T _PEXNormalizeVectors2D libPEX5 pl_util -00000000 T _PEXNPCToXCTransform libPEX5 pl_util -00000000 T _PEXNPCToXCTransform2D libPEX5 pl_util -00000000 T _PEXXCToNPCTransform libPEX5 pl_util -00000000 T _PEXXCToNPCTransform2D libPEX5 pl_util -00000000 T _PEXMapXCToNPC libPEX5 pl_util -00000000 T _PEXMapXCToNPC2D libPEX5 pl_util -00000000 T _PEXInvertMatrix libPEX5 pl_util -00000000 T _PEXInvertMatrix2D libPEX5 pl_util -00000000 T _PEXIdentityMatrix libPEX5 pl_util -00000000 T _PEXIdentityMatrix2D libPEX5 pl_util -00000000 T _PEXGeoNormFillArea libPEX5 pl_util -00000000 T _PEXGeoNormFillAreaSet libPEX5 pl_util -00000000 T _PEXGeoNormTriangleStrip libPEX5 pl_util -00000000 T _PEXGeoNormQuadrilateralMesh libPEX5 pl_util -00000000 T _PEXGeoNormSetOfFillAreaSets libPEX5 pl_util -00000000 T _PEXCreateWorkstation libPEX5 pl_wks -00000000 T _PEXFreeWorkstation libPEX5 pl_wks -00000000 T _PEXGetWorkstationAttributes libPEX5 pl_wks -00000000 T _PEXGetWorkstationDynamics libPEX5 pl_wks -00000000 T _PEXGetWorkstationViewRep libPEX5 pl_wks -00000000 T _PEXGetWorkstationPostings libPEX5 pl_wks -00000000 T _PEXSetWorkstationViewPriority libPEX5 pl_wks -00000000 T _PEXSetWorkstationDisplayUpdateMode libPEX5 pl_wks -00000000 T _PEXSetWorkstationBufferMode libPEX5 pl_wks -00000000 T _PEXSetWorkstationViewRep libPEX5 pl_wks -00000000 T _PEXSetWorkstationWindow libPEX5 pl_wks -00000000 T _PEXSetWorkstationViewport libPEX5 pl_wks -00000000 T _PEXSetWorkstationHLHSRMode libPEX5 pl_wks -00000000 T _PEXRedrawAllStructures libPEX5 pl_wks -00000000 T _PEXUpdateWorkstation libPEX5 pl_wks -00000000 T _PEXExecuteDeferredActions libPEX5 pl_wks -00000000 T _PEXMapDCToWC libPEX5 pl_wks -00000000 T _PEXMapWCToDC libPEX5 pl_wks -00000000 T _PEXPostStructure libPEX5 pl_wks -00000000 T _PEXUnpostStructure libPEX5 pl_wks -00000000 T _PEXUnpostAllStructures libPEX5 pl_wks -00000000 T _PEXRedrawClipRegion libPEX5 pl_wks -00000000 T __PEXIEEE32toDECF libPEX5 pl_convert -00000000 T __PEXDECFtoIEEE32 libPEX5 pl_convert -00000000 T __PEXOCFacet libPEX5 pl_oc_util -00000000 T __PEXOCListOfFacet libPEX5 pl_oc_util -00000000 T __PEXOCListOfVertex libPEX5 pl_oc_util -00000000 T __PEXOCListOfColor libPEX5 pl_oc_util -00000000 T __PEXStoreFacet libPEX5 pl_oc_util -00000000 T __PEXStoreListOfFacet libPEX5 pl_oc_util -00000000 T __PEXStoreListOfVertex libPEX5 pl_oc_util -00000000 T __PEXStoreListOfColor libPEX5 pl_oc_util -00000000 T __PEXExtractFacet libPEX5 pl_oc_util -00000000 T __PEXExtractListOfFacet libPEX5 pl_oc_util -00000000 T __PEXExtractListOfVertex libPEX5 pl_oc_util -00000000 T __PEXExtractListOfColor libPEX5 pl_oc_util diff --git a/xc/lib/PEX5/jump_ignore b/xc/lib/PEX5/jump_ignore deleted file mode 100644 index e31c55f51..000000000 --- a/xc/lib/PEX5/jump_ignore +++ /dev/null @@ -1,3 +0,0 @@ -# $XConsortium: jump_ignore,v 1.2 94/12/07 10:48:56 kaleb Exp $ -# $XFree86: xc/lib/PEX5/jump_ignore,v 3.1 1995/01/28 15:42:20 dawes Exp $ -# jump_ignore diff --git a/xc/lib/PEX5/jump_vars b/xc/lib/PEX5/jump_vars deleted file mode 100644 index 9a8e46e41..000000000 --- a/xc/lib/PEX5/jump_vars +++ /dev/null @@ -1,10 +0,0 @@ -# $XConsortium: jump_vars,v 1.2 94/12/07 10:48:56 kaleb Exp $ -# $XFree86: xc/lib/PEX5/jump_vars,v 3.1 1995/01/28 15:42:22 dawes Exp $ -# -00000004 D _PEXDisplayInfoHeader libPEX5 pl_startup -00000004 D _PEXPickCache libPEX5 pl_startup -00000004 D _PEXPickCacheSize libPEX5 pl_startup -00000004 D _PEXPickCacheInUse libPEX5 pl_startup -00000260 D _PEX_encode_oc_funcs libPEX5 pl_startup -00000260 D _PEX_decode_oc_funcs libPEX5 pl_startup -00000100 D _PEX_fp_convert libPEX5 pl_startup diff --git a/xc/lib/PEX5/pl_convert.c b/xc/lib/PEX5/pl_convert.c deleted file mode 100644 index c3344b9d1..000000000 --- a/xc/lib/PEX5/pl_convert.c +++ /dev/null @@ -1,234 +0,0 @@ -/* $TOG: pl_convert.c /main/3 1998/02/06 16:09:48 kaleb $ */ -/* - -Copyright 1992, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ - -/****************************************************************************** -FOR VAX/IEEE conversions: - -Copyright 1988-1991 -Center for Information Technology Integration (CITI) -Information Technology Division -University of Michigan -Ann Arbor, Michigan - All Rights Reserved -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that copyright notice and this permission -notice appear in supporting documentation, and that the names of -CITI or THE UNIVERSITY OF MICHIGAN not be used in advertising or -publicity pertaining to distribution of the software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS." CITI AND THE UNIVERSITY OF -MICHIGAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN -NO EVENT SHALL CITI OR THE UNIVERSITY OF MICHIGAN BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN -AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************************/ - -#include "PEXlib.h" -#include "PEXlibint.h" - - -void _PEXIEEE32toDECF (srcVal, dstVal) - -INPUT char *srcVal; -OUTPUT char *dstVal; - -{ - register CARD32 IEEEnum = *(CARD32 *) srcVal; - CARD32 *IEEEnumP = (CARD32 *) dstVal; - CARD32 result; - - if ((IEEE_SIGN_MASK & IEEEnum) == MAX_IEEE_POSITIVE) - { - *IEEEnumP = MAX_VAX_POSITIVE | (0x80000000&IEEEnum)>>16; - return; - }; - - if ((IEEE_SIGN_MASK & IEEEnum) == MIN_IEEE_POSITIVE) - { - *IEEEnumP = MIN_VAX_POSITIVE; - return; - }; - - /* - * these bitfields should OR into mutually exclusive fields in - * result field. - */ - - result = ((((BITMASK(8)<<23) & IEEEnum)>>23)+IEEE_TO_VAX_BIAS)<<7; - result |= ((BITMASK(7)<<16)&IEEEnum)>>16; - result |= (BITMASK(16)&IEEEnum)<<16; - result |= (0x80000000&IEEEnum)>>16; - *IEEEnumP = result; -} - - - -void _PEXDECFtoIEEE32 (srcVal, dstVal) - -INPUT char *srcVal; -OUTPUT char *dstVal; - -{ - register CARD32 Vaxnum = *(CARD32 *) srcVal; - CARD32 *VaxnumP = (CARD32 *) dstVal; - CARD32 result; - - if ((VAX_SIGN_MASK & Vaxnum) == MAX_VAX_POSITIVE) - { - *VaxnumP = MAX_IEEE_POSITIVE | - (((0x00008000)&Vaxnum) ? 0x80000000 : 0L); - return; - } - - if ((VAX_SIGN_MASK & Vaxnum) == MIN_VAX_POSITIVE) - { - *VaxnumP = MIN_IEEE_POSITIVE; - return; - } - - /* - * these bitfields should OR into mutually exclusive fields in - * result field. - */ - - result = ((((BITMASK(8)<<7) & Vaxnum)>>7)+VAX_TO_IEEE_BIAS)<<23; - result |= (((BITMASK(7) & Vaxnum)<<16) | - (((BITMASK(16)<<16) & Vaxnum)>>16)); - result |= ( (0x00008000 & Vaxnum) ? 0x80000000 : 0L); - *VaxnumP = result; -} - - - -#ifdef CRAY - -void _PEXIEEE32toCRAY (srcVal, dstVal) - -INPUT char *srcVal; -OUTPUT char *dstVal; - -{ - unsigned char *PC = (unsigned char *) srcVal; - float *result = (float *) dstVal; - - union { - struct ieee_single is; - long l; - } c; - - union { - struct cray_single vc; - float iis; - } ieee; - - - c.l = PC[0] << 24 | PC[1] << 16 | PC[2] << 8 | PC[3]; - if (PC[0] & 0x80) - c.l |= ~0xffffffff; - - if (c.is.exp == 0) - { - ieee.iis = 0.0; - } - else if (c.is.exp == 0xff) - { - /* - * If the IEEE float we are decoding indicates - * an IEEE overflow condition, we manufacture - * a Cray overflow condition. - */ - - SET_MAX_SNG_CRAY (ieee.vc); - } - else - { - ieee.vc.sign = c.is.sign; - ieee.vc.exp = c.is.exp - IEEE_SNG_BIAS + CRAY_BIAS; - ieee.vc.mantissa = c.is.mantissa | (1 << 23); - ieee.vc.mantissa2 = 0; - } - - *result = ieee.iis; -} - - - -void _PEXCRAYtoIEEE32 (srcVal, dstVal) - -INPUT char *srcVal; -OUTPUT char *dstVal; - -{ - unsigned char *PC = (unsigned char *) dstVal; - struct cray_single vc; - float *fptr; - - struct ieee_single ais; - union { - struct ieee_single is; - unsigned iis; - } ieee; - - fptr = (float *) &vc; - *fptr = *((float *) srcVal); - - if (vc.exp >= MAX_CRAY_SNG) - { - SET_MAX_SNG_IEEE (ieee.is); - } - else if (vc.exp < MIN_CRAY_SNG || - (vc.mantissa == 0 && vc.mantissa2 == 0)) - { - /* - * On the Cray, there is no hidden mantissa bit. - * So, if the mantissa is zero, the number is zero. - */ - - SET_MIN_SNG_IEEE (ieee.is); - } - else - { - ieee.is.exp = vc.exp - CRAY_BIAS + IEEE_SNG_BIAS; - ieee.is.mantissa = vc.mantissa; - /* Hidden bit removed by truncation */ - } - - ieee.is.sign = vc.sign; - - PC[0] = ieee.iis >> 24; - PC[1] = ieee.iis >> 16; - PC[2] = ieee.iis >> 8; - PC[3] = ieee.iis; -} - -#endif /* CRAY */ diff --git a/xc/lib/PEX5/pl_convert.h b/xc/lib/PEX5/pl_convert.h deleted file mode 100644 index 34ad4e4c5..000000000 --- a/xc/lib/PEX5/pl_convert.h +++ /dev/null @@ -1,345 +0,0 @@ -/* $TOG: pl_convert.h /main/4 1998/02/06 16:09:53 kaleb $ */ -/* - -Copyright 1992, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ - -/* ------------------------------------------------------------------------- - * Structures for fiddling with 16 and 32 bit data on 64 bit machines - * ------------------------------------------------------------------------- */ - -#ifdef WORD64 - -typedef struct { - int value :32; -} Long; - -typedef struct { - int value :16; - int pad :16; -} Short; - -typedef struct { - int value :8; - int pad :24; -} Char; - -typedef struct { - unsigned int value :32; -} ULong; - -typedef struct { - unsigned int value :16; -} UShort; - -typedef struct { - unsigned char value; -} UChar; - -#endif /* WORD64 */ - - - -/* ------------------------------------------------------------------------- - * Floating point conversion macros - * ------------------------------------------------------------------------- */ - -/* - * Host->Network - * _srcVal = host floating point value - * _dstBuf = buffer to store network float - */ - -#define FP_CONVERT_HTON_BUFF(_srcVal, _dstBuf, _fpFormat) \ -{ \ - PEX_fp_convert[NATIVE_FP_FORMAT-1][_fpFormat-1](&(_srcVal), _dstBuf); \ -} - - -/* - * Host->Network - * _srcVal = host floating point value - * _dstVal = store network float in this value (on 64 bit machines, - * _dstVal is most probably a bitfield, so we can't take &_dstVal. - */ - -#ifndef WORD64 - -#define FP_CONVERT_HTON(_srcVal, _dstVal, _fpFormat) \ -{ \ - FP_CONVERT_HTON_BUFF (_srcVal, &(_dstVal), _fpFormat); \ -} - -#define FP_CONVERT_DHTON(_srcVal, _dstVal, _fpFormat) \ -{ \ - float single = _srcVal; \ - FP_CONVERT_HTON_BUFF (single, &(_dstVal), _fpFormat); \ -} - -#else /* WORD64 */ - -#define FP_CONVERT_HTON(_srcVal, _dstVal, _fpFormat) \ -{ \ - Long temp; \ - FP_CONVERT_HTON_BUFF (_srcVal, &temp, _fpFormat); \ - _dstVal = temp.value; \ -} - -#define FP_CONVERT_DHTON(_srcVal, _dstVal, _fpFormat) \ -{ \ - float single = _srcVal; \ - Long temp; \ - FP_CONVERT_HTON_BUFF (single, &temp, _fpFormat); \ - _dstVal = temp.value; \ -} - -#endif /* WORD64 */ - - -/* - * Network->Host - * _srcBuf = buffer containing network floating point value - * _dstVal = store host float in this value - */ - -#define FP_CONVERT_NTOH_BUFF(_srcBuf, _dstVal, _fpFormat) \ -{ \ - PEX_fp_convert[_fpFormat-1][NATIVE_FP_FORMAT-1](_srcBuf, &_dstVal); \ -} - - -/* - * Network->Host - * _srcVal = network floating point value - * _dstVal = store host float in this value - */ - -#ifndef WORD64 - -#define FP_CONVERT_NTOH(_srcVal, _dstVal, _fpFormat) \ -{ \ - FP_CONVERT_NTOH_BUFF (&(_srcVal), _dstVal, _fpFormat); \ -} - -#else /* WORD64 */ - -#define FP_CONVERT_NTOH(_srcVal, _dstVal, _fpFormat) \ -{ \ - Long temp; \ - temp.value = _srcVal; \ - FP_CONVERT_NTOH_BUFF (&temp, _dstVal, _fpFormat); \ -} - -#endif /* WORD64 */ - - - -/* ------------------------------------------------------------------------- - * Macros for 64 bit conversion - * ------------------------------------------------------------------------- */ - -#ifdef WORD64 - -#define CARD64_TO_32(_val, _pBuf) \ -{ \ - Long _d; \ - _d.value = _val; \ - memcpy (_pBuf, &_d, SIZEOF (CARD32)); \ -} - -#define CARD64_TO_16(_val, _pBuf) \ -{ \ - Short _d; \ - _d.value = _val; \ - memcpy (_pBuf, &_d, SIZEOF (CARD16)); \ -} - -#define INT64_TO_32(_val, _pBuf) \ -{ \ - Long _d; \ - _d.value = _val; \ - memcpy (_pBuf, &_d, SIZEOF (INT32)); \ -} - -#define INT64_TO_16(_val, _pBuf) \ -{ \ - Short _d; \ - _d.value = _val; \ - memcpy (_pBuf, &_d, SIZEOF (INT16)); \ -} - - -#define CARD32_TO_64(_pBuf, _val) \ -{ \ - _val = *(_pBuf + 0) & 0xff; /* 0xff incase _pBuf is signed */ \ - _val <<= 8; \ - _val |= *(_pBuf + 1) & 0xff;\ - _val <<= 8; \ - _val |= *(_pBuf + 2) & 0xff;\ - _val <<= 8; \ - _val |= *(_pBuf + 3) & 0xff;\ -} - -#define CARD16_TO_64(_pBuf, _val) \ -{ \ - _val = *(_pBuf + 0) & 0xff; /* 0xff incase _pBuf is signed */ \ - _val <<= 8; \ - _val |= *(_pBuf + 1) & 0xff;\ -} - -#define INT32_TO_64(_pBuf, _val) \ -{ \ - _val = *(_pBuf + 0) & 0xff; /* 0xff incase _pBuf is signed */ \ - _val <<= 8; \ - _val |= *(_pBuf + 1) & 0xff;\ - _val <<= 8; \ - _val |= *(_pBuf + 2) & 0xff;\ - _val <<= 8; \ - _val |= *(_pBuf + 3) & 0xff;\ -} - -#define INT16_TO_64(_pBuf, _val) \ -{ \ - _val = *(_pBuf + 0) & 0xff; /* 0xff incase _pBuf is signed */ \ - _val <<= 8; \ - _val |= *(_pBuf + 1) & 0xff;\ -} - -#endif /* WORD64 */ - - - -/* ------------------------------------------------------------------------- - * DEC/IEEE float conversions - * ------------------------------------------------------------------------- */ - -/* - * Copyright 1988-1991 - * Center for Information Technology Integration (CITI) - * Information Technology Division - * University of Michigan - * Ann Arbor, Michigan - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby - * granted, provided that the above copyright notice appear in all - * copies and that both that copyright notice and this permission - * notice appear in supporting documentation, and that the names of - * CITI or THE UNIVERSITY OF MICHIGAN not be used in advertising or - * publicity pertaining to distribution of the software without - * specific, written prior permission. - * - * THE SOFTWARE IS PROVIDED "AS IS." CITI AND THE UNIVERSITY OF - * MICHIGAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN - * NO EVENT SHALL CITI OR THE UNIVERSITY OF MICHIGAN BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#define BITMASK(n) ((((unsigned long)1)<