Rev 647 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
647 | andrew_pro | 1 | #include |
6412 | siemargl | 2 | #include |
647 | andrew_pro | 3 | |
4 | int format_print(char *dest, size_t maxlen, const char *fmt,va_list argp); |
||
5 | |||
6 | int fprintf(FILE* file, const char* format, ...) |
||
7 | { |
||
8 | va_list arg; |
||
9 | char *buf; |
||
10 | int printed; |
||
11 | //int data[4]; |
||
12 | |||
13 | va_start (arg, format); |
||
14 | buf=malloc(4096*2); //8kb max |
||
15 | //data[0]=(int)&arg-(int)&format; |
||
16 | |||
17 | printed=format_print(buf,8191, format,arg); |
||
18 | fwrite(buf,printed,1,file); |
||
19 | free(buf); |
||
20 | |||
21 | return(printed); |
||
22 | } |