Sfoglia il codice sorgente

Merge branch 'xiaoxiang781216-pr-68'

Kosma Moczek 3 anni fa
parent
commit
296c71cbc0
4 ha cambiato i file con 5 aggiunte e 7 eliminazioni
  1. 0 1
      example.c
  2. 0 1
      minmea.c
  3. 5 4
      minmea.h
  4. 0 1
      tests.c

+ 0 - 1
example.c

@@ -8,7 +8,6 @@
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <string.h>
 #include <string.h>
-#include <ctype.h>
 
 
 #include "minmea.h"
 #include "minmea.h"
 
 

+ 0 - 1
minmea.c

@@ -12,7 +12,6 @@
 #include <string.h>
 #include <string.h>
 #include <ctype.h>
 #include <ctype.h>
 #include <stdarg.h>
 #include <stdarg.h>
-#include <time.h>
 
 
 #define boolstr(s) ((s) ? "true" : "false")
 #define boolstr(s) ((s) ? "true" : "false")
 
 

+ 5 - 4
minmea.h

@@ -13,10 +13,8 @@
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
-#include <stdio.h>
 #include <stdint.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdbool.h>
-#include <errno.h>
 #include <time.h>
 #include <time.h>
 #include <math.h>
 #include <math.h>
 #ifdef MINMEA_INCLUDE_COMPAT
 #ifdef MINMEA_INCLUDE_COMPAT
@@ -201,11 +199,14 @@ enum minmea_sentence_id minmea_sentence_id(const char *sentence, bool strict);
  * Scanf-like processor for NMEA sentences. Supports the following formats:
  * Scanf-like processor for NMEA sentences. Supports the following formats:
  * c - single character (char *)
  * c - single character (char *)
  * d - direction, returned as 1/-1, default 0 (int *)
  * d - direction, returned as 1/-1, default 0 (int *)
- * f - fractional, returned as value + scale (int *, int *)
+ * f - fractional, returned as value + scale (struct minmea_float *)
  * i - decimal, default zero (int *)
  * i - decimal, default zero (int *)
  * s - string (char *)
  * s - string (char *)
  * t - talker identifier and type (char *)
  * t - talker identifier and type (char *)
- * T - date/time stamp (int *, int *, int *)
+ * D - date (struct minmea_date *)
+ * T - time stamp (struct minmea_time *)
+ * _ - ignore this field
+ * ; - following fields are optional
  * Returns true on success. See library source code for details.
  * Returns true on success. See library source code for details.
  */
  */
 bool minmea_scan(const char *sentence, const char *format, ...);
 bool minmea_scan(const char *sentence, const char *format, ...);

+ 0 - 1
tests.c

@@ -11,7 +11,6 @@
 
 
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
-#include <math.h>
 #include <check.h>
 #include <check.h>
 
 
 #include "minmea.h"
 #include "minmea.h"