~ubuntu-branches/ubuntu/utopic/libice/utopic

« back to all changes in this revision

Viewing changes to include/X11/ICE/ICEmsg.h

  • Committer: Package Import Robot
  • Author(s): Julien Cristau
  • Date: 2014-07-13 01:38:11 UTC
  • mfrom: (1.1.8) (0.2.10 sid)
  • Revision ID: package-import@ubuntu.com-20140713013811-qtofhjeux1mfmx2j
Tags: 2:1.0.9-1
* New upstream release.
* Remove Cyril from Uploaders.
* Rewrite debian/rules using dh.  Switch to compat level 9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
    IceGetHeader (_iceConn, _offendingMajorOpcode, ICE_Error, \
162
162
        SIZEOF (iceErrorMsg), iceErrorMsg, _pMsg); \
163
163
    _pMsg->length += (_dataLength); \
164
 
    _pMsg->offendingMinorOpcode = _offendingMinorOpcode; \
165
 
    _pMsg->severity = _severity; \
166
 
    _pMsg->offendingSequenceNum = _offendingSequenceNum; \
167
 
    _pMsg->errorClass = _errorClass; \
 
164
    _pMsg->offendingMinorOpcode = (CARD8) _offendingMinorOpcode; \
 
165
    _pMsg->severity = (CARD8) _severity; \
 
166
    _pMsg->offendingSequenceNum = (CARD32) _offendingSequenceNum; \
 
167
    _pMsg->errorClass = (CARD16) _errorClass; \
168
168
}
169
169
 
170
170
 
186
186
    } \
187
187
}
188
188
 
189
 
#ifndef WORD64
190
 
 
191
189
#define IceWriteData16(_iceConn, _bytes, _data) \
192
190
    IceWriteData (_iceConn, _bytes, (char *) _data)
193
191
 
194
192
#define IceWriteData32(_iceConn, _bytes, _data) \
195
193
    IceWriteData (_iceConn, _bytes, (char *) _data)
196
194
 
197
 
#else /* WORD64 */
198
 
 
199
 
/* IceWriteData16 and IceWriteData32 defined in misc.c for WORD64 */
200
 
 
201
 
#endif /* WORD64 */
202
 
 
203
195
 
204
196
/*
205
197
 * The IceSendData macro bypasses copying the data to the
252
244
    } \
253
245
    else \
254
246
    { \
255
 
        _pData = (char *) malloc ((unsigned) _bytes); \
 
247
        _pData = malloc (_bytes); \
256
248
        if (_pData) \
257
249
            _IceRead (_iceConn, _bytes, _pData); \
258
250
        else \
263
255
#define IceDisposeCompleteMessage(_iceConn, _pData) \
264
256
    if ((char *) _pData < _iceConn->inbuf || \
265
257
        (char *) _pData >= _iceConn->inbufmax) \
266
 
        free ((char *) _pData);
 
258
        free (_pData);
267
259
 
268
260
 
269
261
#define IceReadSimpleMessage(_iceConn, _msgType, _pMsg) \
281
273
#define IceReadData(_iceConn, _bytes, _pData) \
282
274
    _IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
283
275
 
284
 
#ifndef WORD64
285
 
 
286
276
#define IceReadData16(_iceConn, _swap, _bytes, _pData) \
287
277
{ \
288
278
    _IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
293
283
    _IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
294
284
}
295
285
 
296
 
#else /* WORD64 */
297
 
 
298
 
/* IceReadData16 and IceReadData32 defined in misc.c for WORD64 */
299
 
 
300
 
#endif /* WORD64 */
301
 
 
302
286
 
303
287
/*
304
288
 * Read pad bytes (for 32 or 64 bit alignment).