Browse Source

Rename fpos_t to avoid libc conflict

Scott Lahteine 8 years ago
parent
commit
b83e472bd3
2 changed files with 8 additions and 8 deletions
  1. 3
    3
      Marlin/SdBaseFile.cpp
  2. 5
    5
      Marlin/SdBaseFile.h

+ 3
- 3
Marlin/SdBaseFile.cpp View File

@@ -291,7 +291,7 @@ bool SdBaseFile::getFilename(char* name) {
291 291
   return true;
292 292
 }
293 293
 //------------------------------------------------------------------------------
294
-void SdBaseFile::getpos(fpos_t* pos) {
294
+void SdBaseFile::getpos(filepos_t* pos) {
295 295
   pos->position = curPosition_;
296 296
   pos->cluster = curCluster_;
297 297
 }
@@ -923,7 +923,7 @@ fail:
923 923
  * \return The byte if no error and not at eof else -1;
924 924
  */
925 925
 int SdBaseFile::peek() {
926
-  fpos_t pos;
926
+  filepos_t pos;
927 927
   getpos(&pos);
928 928
   int c = read();
929 929
   if (c >= 0) setpos(&pos);
@@ -1479,7 +1479,7 @@ fail:
1479 1479
   return false;
1480 1480
 }
1481 1481
 //------------------------------------------------------------------------------
1482
-void SdBaseFile::setpos(fpos_t* pos) {
1482
+void SdBaseFile::setpos(filepos_t* pos) {
1483 1483
   curPosition_ = pos->position;
1484 1484
   curCluster_ = pos->cluster;
1485 1485
 }

+ 5
- 5
Marlin/SdBaseFile.h View File

@@ -31,16 +31,16 @@
31 31
 #include "SdVolume.h"
32 32
 //------------------------------------------------------------------------------
33 33
 /**
34
- * \struct fpos_t
34
+ * \struct filepos_t
35 35
  * \brief internal type for istream
36 36
  * do not use in user apps
37 37
  */
38
-struct fpos_t {
38
+struct filepos_t {
39 39
   /** stream position */
40 40
   uint32_t position;
41 41
   /** cluster for position */
42 42
   uint32_t cluster;
43
-  fpos_t() : position(0), cluster(0) {}
43
+  filepos_t() : position(0), cluster(0) {}
44 44
 };
45 45
 
46 46
 // use the gnu style oflag in open()
@@ -196,11 +196,11 @@ class SdBaseFile {
196 196
   /** get position for streams
197 197
    * \param[out] pos struct to receive position
198 198
    */
199
-  void getpos(fpos_t* pos);
199
+  void getpos(filepos_t* pos);
200 200
   /** set position for streams
201 201
    * \param[out] pos struct with value for new position
202 202
    */
203
-  void setpos(fpos_t* pos);
203
+  void setpos(filepos_t* pos);
204 204
   //----------------------------------------------------------------------------
205 205
   bool close();
206 206
   bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);

Loading…
Cancel
Save