mirror of
https://github.com/siemens-mobile-hacks/sieelf.git
synced 2026-11-25 22:27:29 +00:00
42 lines
803 B
C
42 lines
803 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdarg.h>
|
|
|
|
#include "fwork.h"
|
|
|
|
|
|
void fpclear(char *filename)
|
|
{
|
|
DeleteFile(filename);
|
|
}
|
|
|
|
void fprintf(char *filename, char *format, ...)
|
|
{
|
|
char out_buf[FILE_PRINTF_SIZE];
|
|
|
|
va_list arg_ptr;
|
|
va_start(arg_ptr, format);
|
|
vsprintf(out_buf, format, arg_ptr);
|
|
va_end(arg_ptr);
|
|
|
|
DoSaveFile(filename, out_buf, strlen(out_buf));
|
|
}
|
|
|
|
void fbprintf(char *filename, char *format, ...)
|
|
{
|
|
char out_buf[FILE_PRINTF_SIZE];
|
|
|
|
va_list arg_ptr;
|
|
va_start(arg_ptr, format);
|
|
vsprintf(out_buf, format, arg_ptr);
|
|
va_end(arg_ptr);
|
|
|
|
DoSaveFileWithBuffer(filename, out_buf, strlen(out_buf));
|
|
}
|
|
|
|
void fbflush(char *filename)
|
|
{
|
|
DoSaveFileFromBuffer(filename);
|
|
}
|
|
|