<html><head></head><body><div class="ydpa71e9637yahoo-style-wrap" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px;"><div></div>
<div dir="ltr" data-setdir="false">What is the value of rep.length after the call XReply at line 85? Is it (height of screen * width of screen) or (the passed parameter height * the passed parameter width)? </div><div dir="ltr" data-setdir="false"><br></div><div><br></div>
</div><div id="ydpf1b317e1yahoo_quoted_8690378318" class="ydpf1b317e1yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Friday, July 30, 2021, 10:31:22 AM PDT, Alan Coopersmith <alan.coopersmith@oracle.com> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">Questions about X11 are better handled on the X.Org mailing lists at<br clear="none"><a shape="rect" href="https://www.x.org/wiki/XorgMailingLists/ " rel="nofollow" target="_blank">https://www.x.org/wiki/XorgMailingLists/ </a>than the generic freedesktop<br clear="none">list.<br clear="none"><br clear="none">On 7/29/21 3:08 PM, Chuanlong Du wrote:<br clear="none">> I read the source code of the file GetImage.c in libX11 <br clear="none">> <<a shape="rect" href="https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/master/src/GetImage.c" rel="nofollow" target="_blank">https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/master/src/GetImage.c</a>> but got <br clear="none">> confused by line 66 <br clear="none">> <<a shape="rect" href="https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/master/src/GetImage.c#L66" rel="nofollow" target="_blank">https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/master/src/GetImage.c#L66</a>> (see <br clear="none">> screenshot below for convenience). I couldn't find the definition of <br clear="none">> xGetImageReply anywhere in the code. <br clear="none"><br clear="none">Since the xGetImageReply structure is part of the protocol between<br clear="none">the client and server, it's defined in the separate xorgproto package<br clear="none">so both libX11 and the Xserver can share the definition and ensure<br clear="none">it's always in sync between both sides. You can see its definition at:<br clear="none"><br clear="none"><a shape="rect" href="https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/blob/master/include/X11/Xproto.h#L713-724" rel="nofollow" target="_blank">https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/blob/master/include/X11/Xproto.h#L713-724</a><div class="ydpf1b317e1yqt4661076131" id="ydpf1b317e1yqtfd01684"><br clear="none"><br clear="none">> What is the value of rep.length after execution of line 66?</div><br clear="none"><br clear="none">Undefined, as that just declares the variable without initializing it.<br clear="none">It won't be set until the XReply call at line 85 writes the reply<br clear="none">received from the X server into that structure.<br clear="none"><br clear="none">-- <br clear="none"> -Alan Coopersmith- <a shape="rect" href="mailto:alan.coopersmith@oracle.com" rel="nofollow" target="_blank">alan.coopersmith@oracle.com</a><br clear="none"> Oracle Solaris Engineering - <a shape="rect" href="https://blogs.oracle.com/alanc" rel="nofollow" target="_blank">https://blogs.oracle.com/alanc</a><div class="ydpf1b317e1yqt4661076131" id="ydpf1b317e1yqtfd29548"><br clear="none"></div></div></div>
</div>
</div></body></html>