Note that there are some explanatory texts on larger screens.

plurals
  1. POOpening Macro definitions: tdfx_span.c: lvalue required as left operand of assignment
    primarykey
    data
    text
    <p>I'm trying to compile X11R6-7.0 under Ubuntu maverick and got some weird compilation errors I'm unable to resolve myself.</p> <p>I needed X11R6-7.0 as ati catalyst drivers don't support newer xorg and oss drivers don't support 3d acceleration of my hardware.</p> <p>Anyone know what this error message means? I know some <strong>C</strong> but I got a bit confused. Does it mean <code>GET_FB_DATA</code> macro returned <code>NULL</code> or some method/property not set?</p> <p>Any further insight how to "debug" preprocessor definitions at this point would be great. I don't think I can print anything useful with <code>#error</code>.</p> <p>The error I get:</p> <blockquote> <p>tdfx_span.c: In function ‘tdfxDDWriteDepthPixels’:<br> tdfx_span.c:976: error: lvalue required as left operand of assignment<br> tdfx_span.c:1008: error: lvalue required as left operand of assignment<br> tdfx_span.c: In function ‘write_stencil_pixels’:<br> tdfx_span.c:1242: error: lvalue required as left operand of assignment </p> </blockquote> <p>the Code:</p> <pre><code>958- switch (depth_size) { 959- case 16: 960- GetBackBufferInfo(fxMesa, &amp;backBufferInfo); 961- /* 962- * Note that the _LOCK macro adds a curly brace, 963- * and the UNLOCK macro removes it. 964- */ 965- WRITE_FB_SPAN_LOCK(fxMesa, info, 966- GR_BUFFER_AUXBUFFER, GR_LFBWRITEMODE_ANY); 967- { 968- LFBParameters ReadParams; 969- GetFbParams(fxMesa, &amp;info, &amp;backBufferInfo, 970- &amp;ReadParams, sizeof(GLushort)); 971- for (i = 0; i &lt; n; i++) { 972- if (mask[i] &amp;&amp; visible_pixel(fxMesa, x[i], y[i])) { 973- xpos = x[i] + fxMesa-&gt;x_offset; 974- ypos = bottom - y[i]; 975- d16 = depth[i]; 976: PUT_FB_DATA(&amp;ReadParams, GLushort, xpos, ypos, d16); 977- } 978- } 979- } 980- WRITE_FB_SPAN_UNLOCK(fxMesa, GR_BUFFER_AUXBUFFER); 981- break; 982- case 24: </code></pre> <p>And relative macros:</p> <pre><code>#define GET_FB_DATA(ReadParamsp, type, x, y) \ (((x) &lt; (ReadParamsp)-&gt;firstWrappedX) \ ? (((type *)((ReadParamsp)-&gt;lfbPtr)) \ [(y) * ((ReadParamsp)-&gt;LFBStrideInElts) \ + (x)]) \ : (((type *)((ReadParamsp)-&gt;lfbWrapPtr)) \ [((y)) * ((ReadParamsp)-&gt;LFBStrideInElts) \ + ((x) - (ReadParamsp)-&gt;firstWrappedX)])) #define GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) \ (((type *)((ReadParamsp)-&gt;lfbPtr)) \ [(y) * ((ReadParamsp)-&gt;LFBStrideInElts) \ + (x)]) #define GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) \ (((type *)((ReadParamsp)-&gt;lfbWrapPtr)) \ [((y)) * ((ReadParamsp)-&gt;LFBStrideInElts) \ + ((x) - (ReadParamsp)-&gt;firstWrappedX)]) #define PUT_FB_DATA(ReadParamsp, type, x, y, value) \ (GET_FB_DATA(ReadParamsp, type, x, y) = (type)(value)) #define PUT_ORDINARY_FB_DATA(ReadParamsp, type, x, y, value) \ (GET_ORDINARY_FB_DATA(ReadParamsp, type, x, y) = (type)(value)) #define PUT_WRAPPED_FB_DATA(ReadParamsp, type, x, y, value) \ (GET_WRAPPED_FB_DATA(ReadParamsp, type, x, y) = (type)(value)) </code></pre> <p>The LFBParameters Struct</p> <pre><code>483-typedef struct 484-{ 485- void *lfbPtr; 486- void *lfbWrapPtr; 487- FxU32 LFBStrideInElts; 488- GLint firstWrappedX; 489-} 490:LFBParameters; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload