Re: [xml] TestC14N patch (standard C output)
- From: Aleksey Sanin <aleksey aleksey com>
- To: Justin Fletcher <justin fletcher ntlworld com>
- Cc: xml gnome org
- Subject: Re: [xml] TestC14N patch (standard C output)
- Date: Sat, 09 Mar 2002 18:29:51 -0800
Then it probably also a good idea to remove
#include <unistd.h>
from this file. I do not remember exactly why I used write() instead of
fwrite() here. Probably because I recently had problems with Solaris
struct _FILE because it is declared as follows:
struct _FILE {
....
unsinged char fd;
....
};
and this effectevly limits the number of files opened with FILE* fopen() to
256 per process. After this I am trying to avoid any FILE* usage as much
as possible. Of course, there is nothing to do with this particular case,
just automatic reaction to f<something> :)
Aleksey.
Justin Fletcher wrote:
Hiya,
Tiny patch for testC14N to use standard C fwrite, rather than write :
--8<--------
*** Original.c.testC14N Mon Mar 4 17:09:34 2002
--- RISCOS.c.testC14N Sat Mar 9 16:01:00 2002
***************
*** 101,107 ****
with_comments, &result);
if(ret >= 0) {
if(result != NULL) {
! write(1, result, ret);
xmlFree(result);
}
} else {
--- 101,107 ----
with_comments, &result);
if(ret >= 0) {
if(result != NULL) {
! fwrite(result, 1, ret, stderr); /* JRF: was write(1, result, ret); */
xmlFree(result);
}
} else {
--8<--------
Other than that, nothing else in the file uses read/write.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]