File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1
1
Version 6.2.0
2
2
- Made `virtual` a reserved keyword in C++
3
+ - Reduced memory usage of default printf
3
4
4
5
Version 6.1.6
5
6
- Added ability to double quote to include quotes in literal BASIC strings
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ static vfs_file_t __filetab[_MAX_FILES] = {
56
56
0 , /* close function */
57
57
& _rxtxioctl ,
58
58
& __dummy_flush , /* flush function */
59
+ 0 , /* lseek */
60
+ 0 , 0 , /* pointer cache */
59
61
},
60
62
/* stdout */
61
63
{
@@ -71,6 +73,8 @@ static vfs_file_t __filetab[_MAX_FILES] = {
71
73
0 , /* close function */
72
74
& _rxtxioctl ,
73
75
& __dummy_flush , /* flush function */
76
+ 0 , /* lseek */
77
+ 0 , 0 , /* pointer cache */
74
78
},
75
79
/* stderr */
76
80
{
@@ -86,6 +90,8 @@ static vfs_file_t __filetab[_MAX_FILES] = {
86
90
0 , /* close function */
87
91
& _rxtxioctl ,
88
92
& __dummy_flush , /* flush function */
93
+ 0 , /* lseek */
94
+ 0 , 0 , /* pointer cache */
89
95
},
90
96
};
91
97
Original file line number Diff line number Diff line change @@ -909,13 +909,19 @@ TxFunc _gettxfunc(unsigned h) {
909
909
vfs_file_t * v ;
910
910
v = __getftab (h );
911
911
if (!v || !v -> state ) return 0 ;
912
- return (TxFunc )& v -> putchar ;
912
+ if (!v -> putchar_ptr ) {
913
+ v -> putchar_ptr = & v -> putchar ;
914
+ }
915
+ return (TxFunc )v -> putchar_ptr ;
913
916
}
914
917
RxFunc _getrxfunc (unsigned h ) {
915
918
vfs_file_t * v ;
916
919
v = __getftab (h );
917
920
if (!v || !v -> state ) return 0 ;
918
- return (RxFunc )& v -> getchar ;
921
+ if (!v -> getchar_ptr ) {
922
+ v -> getchar_ptr = & v -> getchar ;
923
+ }
924
+ return (RxFunc )v -> getchar_ptr ;
919
925
}
920
926
static int * _getiolock (unsigned h ) {
921
927
vfs_file_t * v ;
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ struct s_vfs_file_t {
62
62
/* internal functions for formatting routines */
63
63
int putchar (int c ) __fromfile ("libsys /vfs .c ");
64
64
int getchar (void ) __fromfile ("libsys /vfs .c ");
65
+
66
+ /* cache for pointers of the above functions */
67
+ int (* putchar_ptr )(int c );
68
+ int (* getchar_ptr )(void );
65
69
};
66
70
67
71
typedef int (* putcfunc_t )(int c , vfs_file_t * fil );
You can’t perform that action at this time.
0 commit comments