10 #include "osmbinary.h"
12 void writenode(int bi
, node_t
*this) {
14 write(bi
, &this->id
, sizeof(this->id
));
15 write(bi
, &this->lat
, sizeof(this->lat
));
16 write(bi
, &this->lon
, sizeof(this->lon
));
17 write(bi
, &this->stamp
, sizeof(this->stamp
));
18 write(bi
, &this->userlen
, sizeof(this->userlen
));
19 write(bi
, this->user
, this->userlen
);
22 void writetag(int bi
, tag_t
*this) {
24 write(bi
, &this->klen
, sizeof(this->klen
));
25 write(bi
, this->k
, this->klen
);
26 write(bi
, &this->vlen
, sizeof(this->vlen
));
27 write(bi
, this->v
, this->vlen
);
30 void writeother(int bi
, other_t
*this, char type
) {
32 write(bi
, &this->id
, sizeof(this->id
));
33 write(bi
, &this->stamp
, sizeof(this->stamp
));
34 write(bi
, &this->userlen
, sizeof(this->userlen
));
35 write(bi
, this->user
, this->userlen
);
38 void writend(int bi
, nd_t
*this) {
40 write(bi
, &this->id
, sizeof(this->id
));
43 void writemember(int bi
, member_t
*this) {
45 write(bi
, &this->typelen
, sizeof(this->typelen
));
46 write(bi
, this->type
, this->typelen
);
47 write(bi
, &this->reflen
, sizeof(this->reflen
));
48 write(bi
, this->ref
, this->reflen
);
49 write(bi
, &this->rolelen
, sizeof(this->rolelen
));
50 write(bi
, this->role
, this->rolelen
);