Subversion Repositories public

Rev

Rev 93 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 93 Rev 136
Line 64... Line 64...
64
*/
64
*/
65
 
65
 
66
char *
66
char *
67
get_string ( garmin_packet * p, int * offset )
67
get_string ( garmin_packet * p, int * offset )
68
{
68
{
69
  char * start  = p->packet.data + *offset;
69
  char * start  = (char *)(p->packet.data + *offset);
70
  char * cursor = start;
70
  char * cursor = start;
71
  int    allow  = garmin_packet_size(p) - *offset;
71
  int    allow  = garmin_packet_size(p) - *offset;
72
  char * ret    = NULL;
72
  char * ret    = NULL;
73
  int    bytes  = 0;
73
  int    bytes  = 0;
74
 
74
 
Line 115... Line 115...
115
 
115
 
116
void
116
void
117
put_vstring ( uint8 ** buf, const char * x )
117
put_vstring ( uint8 ** buf, const char * x )
118
{
118
{
119
  if ( x != NULL ) {
119
  if ( x != NULL ) {
120
    strcpy(*buf,x);
120
    strcpy((char *)*buf,x);
121
    *buf += strlen(x)+1;
121
    *buf += strlen(x)+1;
122
  }
122
  }
123
}
123
}
124
 
124
 
125
 
125
 
Line 129... Line 129...
129
*/
129
*/
130
 
130
 
131
char **
131
char **
132
get_strings ( garmin_packet * p, int * offset )
132
get_strings ( garmin_packet * p, int * offset )
133
{
133
{
134
  char *  start  = p->packet.data + *offset;
134
  char *  start  = (char *)(p->packet.data + *offset);
135
  char *  cursor = start;
135
  char *  cursor = start;
136
  int     allow  = garmin_packet_size(p) - *offset;
136
  int     allow  = garmin_packet_size(p) - *offset;
137
  char ** ret    = NULL;
137
  char ** ret    = NULL;
138
  char *  elem   = NULL;
138
  char *  elem   = NULL;
139
  int     nstr   = 0;
139
  int     nstr   = 0;