~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzleclient/pack.c

  • Committer: Monty Taylor
  • Date: 2009-03-04 02:16:28 UTC
  • mto: (917.1.2 mordred)
  • mto: This revision was merged to the branch mainline in revision 912.
  • Revision ID: mordred@inaugust.com-20090304021628-rfq0b16uoi09g8tx
Fix to make VPATH builds work again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "libdrizzle.h"
 
20
#include "libdrizzle_priv.h"
 
21
#include "pack.h"
 
22
 
21
23
#include <stdint.h>
22
24
 
23
25
/* Get the length of next field. Change parameter to point at fieldstart */
24
 
uint32_t net_field_length(unsigned char **packet)
 
26
uint32_t drizzleclient_net_field_length(unsigned char **packet)
25
27
{
26
28
  register unsigned char *pos= (unsigned char *)*packet;
27
29
  if (*pos < 251)
49
51
}
50
52
 
51
53
/* The same as above but returns int64_t */
52
 
uint64_t net_field_length_ll(unsigned char **packet)
 
54
uint64_t drizzleclient_drizzleclient_net_field_length_ll(unsigned char **packet)
53
55
{
54
56
  register unsigned char *pos= *packet;
55
57
  if (*pos < 251)
84
86
  Store an integer with simple packing into a output package
85
87
 
86
88
  SYNOPSIS
87
 
    net_store_length()
 
89
    drizzleclient_net_store_length()
88
90
    pkg      Store the packed integer here
89
91
    length    integers to store
90
92
 
97
99
   Position in 'pkg' after the packed length
98
100
*/
99
101
 
100
 
unsigned char *net_store_length(unsigned char *packet, uint64_t length)
 
102
unsigned char *drizzleclient_net_store_length(unsigned char *packet, uint64_t length)
101
103
{
102
104
  if (length < (uint64_t) 251LL)
103
105
  {