Browse Source

Rename fpos_t to avoid libc conflict

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

+ 5
- 5
Marlin/SdBaseFile.h View File

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

Loading…
Cancel
Save