Rev 333 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 333 | Rev 550 | ||
---|---|---|---|
Line 27... | Line 27... | ||
27 | static const char |
27 | static const char |
28 | rcsid[] = "$Id: m_misc.c,v 1.6 1997/02/03 22:45:10 b1 Exp $"; |
28 | rcsid[] = "$Id: m_misc.c,v 1.6 1997/02/03 22:45:10 b1 Exp $"; |
Line 29... | Line 29... | ||
29 | 29 | ||
30 | #include |
30 | #include |
31 | #include |
- | |
Line 32... | Line 31... | ||
32 | //#include "//kolibc.h" |
31 | #include |
Line 33... | Line 32... | ||
33 | 32 | ||
Line 104... | Line 103... | ||
104 | // |
103 | // |
105 | #ifndef O_BINARY |
104 | #ifndef O_BINARY |
106 | #define O_BINARY 0 |
105 | #define O_BINARY 0 |
107 | #endif |
106 | #endif |
Line -... | Line 107... | ||
- | 107 | ||
- | 108 | int write_once(const char *name, void *buffer, unsigned len); |
|
108 | 109 | ||
109 | boolean |
110 | boolean |
110 | M_WriteFile |
111 | M_WriteFile |
111 | ( char const* name, |
112 | ( char const* name, |
112 | void* source, |
113 | void* source, |
113 | int length ) |
114 | int length ) |
114 | { |
115 | { |
115 | FILE *handle; |
116 | // FILE *handle; |
Line 116... | Line 117... | ||
116 | int count; |
117 | int count; |
Line 117... | Line 118... | ||
117 | 118 | ||
118 | handle = fopen ( name, "wb"); |
119 | // handle = fopen ( name, "wb"); |
- | 120 | ||
- | 121 | // if (handle == NULL) |
|
- | 122 | // return false; |
|
- | 123 | ||
- | 124 | // printf("writeFile %s, &s, %d \n\r", name, source, length); |
|
Line 119... | Line 125... | ||
119 | 125 | count = write_once(name, source, length); |
|
120 | if (handle == NULL) |
126 | |
Line 121... | Line 127... | ||
121 | return false; |
127 | // printf("%d \n\r", count); |
122 | 128 | ||
Line 123... | Line 129... | ||
123 | // count = fwrite (source, 1, length, handle); |
129 | // count = fwrite (source, 1, length, handle); |