fix compilation with latest aversive
[protos/xbee-avr.git] / parse_atcmd.c
index 78e28ba..2e6f4c0 100644 (file)
 #include "parse_atcmd.h"
 
 static int8_t
-parse_atcmd(parse_pgm_token_hdr_t *tk, const char *buf, void *res)
+parse_atcmd(PGM_P tk, const char *buf, void *res)
 {
        struct xbee_atcmd copy;
        struct token_atcmd_data ad;
-       struct xbee_atcmd_pgm *cmd;
+       const struct xbee_atcmd *cmd;
        char bufcopy[32];
        uint8_t token_len = 0;
 
@@ -67,15 +67,15 @@ parse_atcmd(parse_pgm_token_hdr_t *tk, const char *buf, void *res)
                return -1;
        /* store the address of object in structure */
        if (res)
-               *(struct xbee_atcmd_pgm **)res = cmd;
+               *(const struct xbee_atcmd **)res = cmd;
 
        return token_len;
 }
 
-static int8_t complete_get_nb_atcmd(parse_pgm_token_hdr_t *tk)
+static int8_t complete_get_nb_atcmd(PGM_P tk)
 {
        struct token_atcmd_data ad;
-       struct xbee_atcmd_pgm *cmd;
+       const struct xbee_atcmd *cmd;
        struct xbee_atcmd copy;
        int8_t cnt = 0;
 
@@ -91,11 +91,11 @@ static int8_t complete_get_nb_atcmd(parse_pgm_token_hdr_t *tk)
        return cnt;
 }
 
-static int8_t complete_get_elt_atcmd(parse_pgm_token_hdr_t *tk, int8_t idx,
+static int8_t complete_get_elt_atcmd(PGM_P tk, int8_t idx,
                              char *dstbuf, uint8_t size)
 {
        struct token_atcmd_data ad;
-       struct xbee_atcmd_pgm *cmd;
+       const struct xbee_atcmd *cmd;
        struct xbee_atcmd copy;
        int8_t cnt = 0;
 
@@ -119,9 +119,9 @@ static int8_t complete_get_elt_atcmd(parse_pgm_token_hdr_t *tk, int8_t idx,
 }
 
 static int8_t
-help_atcmd(parse_pgm_token_hdr_t *tk, char *dstbuf,
-                  uint8_t size)
+help_atcmd(PGM_P tk, char *dstbuf, uint8_t size)
 {
+       (void)tk;
        snprintf(dstbuf, size, "ATCMD");
        return 0;
 }