Fork of Smoothie to port to mbed non-LPC targets.
Fork of Smoothie by
libs/AppendFileStream.h@2:1df0b61d3b5a, 2014-02-28 (annotated)
- Committer:
- Michael J. Spencer
- Date:
- Fri Feb 28 18:52:52 2014 -0800
- Revision:
- 2:1df0b61d3b5a
- Child:
- 3:f151d08d335c
Update to latest Smoothie.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Michael J. Spencer |
2:1df0b61d3b5a | 1 | #ifndef _APPENDFILESTREAM_H_ |
Michael J. Spencer |
2:1df0b61d3b5a | 2 | #define _APPENDFILESTREAM_H_ |
Michael J. Spencer |
2:1df0b61d3b5a | 3 | |
Michael J. Spencer |
2:1df0b61d3b5a | 4 | #include "StreamOutput.h" |
Michael J. Spencer |
2:1df0b61d3b5a | 5 | #include "string.h" |
Michael J. Spencer |
2:1df0b61d3b5a | 6 | #include "stdlib.h" |
Michael J. Spencer |
2:1df0b61d3b5a | 7 | |
Michael J. Spencer |
2:1df0b61d3b5a | 8 | class AppendFileStream : public StreamOutput { |
Michael J. Spencer |
2:1df0b61d3b5a | 9 | public: |
Michael J. Spencer |
2:1df0b61d3b5a | 10 | AppendFileStream(const char *filename) { fn= strdup(filename); } |
Michael J. Spencer |
2:1df0b61d3b5a | 11 | virtual ~AppendFileStream(){ free(fn); } |
Michael J. Spencer |
2:1df0b61d3b5a | 12 | int puts(const char*); |
Michael J. Spencer |
2:1df0b61d3b5a | 13 | |
Michael J. Spencer |
2:1df0b61d3b5a | 14 | private: |
Michael J. Spencer |
2:1df0b61d3b5a | 15 | char *fn; |
Michael J. Spencer |
2:1df0b61d3b5a | 16 | }; |
Michael J. Spencer |
2:1df0b61d3b5a | 17 | |
Michael J. Spencer |
2:1df0b61d3b5a | 18 | #endif |