Rev 698 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 698 | Rev 727 | ||
---|---|---|---|
Line 42... | Line 42... | ||
42 | #include "fileacc.h" |
42 | #include "fileacc.h" |
43 | #include "rtcheck.h" |
43 | #include "rtcheck.h" |
44 | #include "rtdata.h" |
44 | #include "rtdata.h" |
45 | #include "seterrno.h" |
45 | #include "seterrno.h" |
46 | #include "lseek.h" |
46 | #include "lseek.h" |
- | 47 | #include "kolibri.h" |
|
Line 47... | Line 48... | ||
47 | 48 | ||
48 | /* |
49 | /* |
Line 49... | Line 50... | ||
49 | The _lwrite function writes data to the specified file. |
50 | The _lwrite function writes data to the specified file. |
Line 140... | Line 141... | ||
140 | { |
141 | { |
141 | char *name; |
142 | char *name; |
142 | unsigned int offset; |
143 | unsigned int offset; |
143 | }__file_handle; |
144 | }__file_handle; |
Line 144... | Line -... | ||
144 | - | ||
145 | int _stdcall write_file (const char *name,const void* buff,unsigned offset, unsigned count,unsigned *reads); |
- | |
146 | 145 | ||
147 | static int os_write( int handle, const void *buffer, unsigned len, unsigned *amt ) |
146 | static int os_write( int handle, const void *buffer, unsigned len, unsigned *amt ) |
148 | /********************************************************************************/ |
147 | /********************************************************************************/ |
149 | { |
148 | { |
150 | __file_handle *fh; |
149 | __file_handle *fh; |
Line 151... | Line 150... | ||
151 | int rc; |
150 | int rc; |
Line 152... | Line 151... | ||
152 | 151 | ||
Line 153... | Line 152... | ||
153 | rc = 0; |
152 | rc = 0; |
154 | - | ||
155 | fh = (__file_handle*) __getOSHandle( handle ); |
153 | |
156 | - | ||
157 | if(write_file(fh->name,buffer,fh->offset,len,amt)) |
- | |
Line 158... | Line 154... | ||
158 | { |
154 | fh = (__file_handle*) __getOSHandle( handle ); |
159 | rc = __set_errno_nt(); |
155 | |
160 | }; |
156 | rc = write_file(fh->name,buffer,fh->offset,len,amt); |
161 | 157 | fh->offset+= *amt; |