/* info */
-void usage(void)
+static void usage(void)
{
printf("Usage: fnt2bdf [-t] [-c charset] [-o basename] [input file]\n");
printf(" -c charset\tcharset name for OEM_CHARSET fonts\n");
/* convert little-endian value to the local format */
-int return_data_value(enum data_types dtype, void * pChr)
+static int return_data_value(enum data_types dtype, void * pChr)
{
int ret_val = 0;
return ret_val;
}
-int make_bdf_filename(char* name, fnt_fontS* cpe_font_struct, unsigned char* file_buffer)
+static int make_bdf_filename(char* name, fnt_fontS* cpe_font_struct, unsigned char* file_buffer)
{
long l_nameoffset = return_data_value(dfLong, &cpe_font_struct->hdr.fi.dfFace);
char* lpChar;
/* parse FONT resource and write .bdf file */
-int parse_fnt_data(unsigned char* file_buffer, int length)
+static int parse_fnt_data(unsigned char* file_buffer, int length)
{
fnt_fontS cpe_font_struct;
int ic=0, t;
-void parse_options(int argc, char **argv)
+static void parse_options(int argc, char **argv)
{
int i;
/* read file data and return file type */
-int get_resource_table(int fd, unsigned char** lpdata, int fsize)
+static int get_resource_table(int fd, unsigned char** lpdata, int fsize)
{
IMAGE_DOS_HEADER mz_header;
IMAGE_OS2_HEADER ne_header;
return (char*)ptr - (char*)PE_base;
}
-void* RVA(unsigned long rva, unsigned long len)
+static void* RVA(unsigned long rva, unsigned long len)
{
IMAGE_SECTION_HEADER* sectHead;
int i;
return sig;
}
-int pe_analysis(const char* name, void (*fn)(enum FileSig), enum FileSig wanted_sig)
+static int pe_analysis(const char* name, void (*fn)(enum FileSig), enum FileSig wanted_sig)
{
int fd;
enum FileSig effective_sig;
exit(1); /* this will call the atexit functions */
}
-char* get_temp_file(const char* prefix, const char* suffix)
+static char* get_temp_file(const char* prefix, const char* suffix)
{
int fd;
sigset_t old_set;
* Remarks : No codepage translation is done.
*****************************************************************************
*/
-char *strncpyWtoA(char *cs, const short *ws, int maxlen)
+static char *strncpyWtoA(char *cs, const short *ws, int maxlen)
{
char *cptr = cs;
const short *wsMax = ws + maxlen - 1;
* Remarks :
*****************************************************************************
*/
-void print_string(const string_t *str)
+static void print_string(const string_t *str)
{
char buffer[512];
if(!str)
res->size += sizeof(DWORD);
}
-void put_pad(res_t *res)
+static void put_pad(res_t *res)
{
while(res->size & 0x3)
put_byte(res, 0);
* Remarks :
*****************************************************************************
*/
-void set_word(res_t *res, int ofs, unsigned w)
+static void set_word(res_t *res, int ofs, unsigned w)
{
switch(byteorder)
{
}
}
-void set_dword(res_t *res, int ofs, unsigned d)
+static void set_dword(res_t *res, int ofs, unsigned d)
{
switch(byteorder)
{
* Remarks :
*****************************************************************************
*/
-WORD get_word(res_t *res, int ofs)
+static WORD get_word(res_t *res, int ofs)
{
switch(byteorder)
{
}
}
-DWORD get_dword(res_t *res, int ofs)
+static DWORD get_dword(res_t *res, int ofs)
{
switch(byteorder)
{
* Remarks :
*****************************************************************************
*/
-void put_raw_data(res_t *res, raw_data_t *raw, int offset)
+static void put_raw_data(res_t *res, raw_data_t *raw, int offset)
{
int wsize = raw->size - offset;
if(res->allocsize - res->size < wsize)
* Remarks :
*****************************************************************************
*/
-int put_res_header(res_t *res, int type, name_id_t *ntype, name_id_t *name,
- DWORD memopt, lvc_t *lvc)
+static int put_res_header(res_t *res, int type, name_id_t *ntype, name_id_t *name,
+ DWORD memopt, lvc_t *lvc)
{
if(win32)
{
* Remarks :
*****************************************************************************
*/
-int read_data(FILE *fp, size_t size, void *buf)
+static int read_data(FILE *fp, size_t size, void *buf)
{
unsigned int r;
int pos = ftell(fp);
* Remarks :
*****************************************************************************
*/
-enum res_e res_type_from_id(const name_id_t *nid)
+static enum res_e res_type_from_id(const name_id_t *nid)
{
if(nid->type == name_str)
return res_usr;