Refactor and reimplement dtudcfonted
This commit is contained in:
@@ -37,16 +37,16 @@
|
||||
#include "bdfgpf.h"
|
||||
#include "udcutil.h"
|
||||
|
||||
static void put_error();
|
||||
static void put_help() ;
|
||||
static void Usage() ;
|
||||
static int CnvGPFtoBDF() ;
|
||||
static void sigint_out() ;
|
||||
static void put_error(struct ptobhead *head, int er_no, char *prog_name);
|
||||
static void put_help(char *prog_name);
|
||||
static void Usage(char *prog_name);
|
||||
static int CnvGPFtoBDF(struct ptobhead *head) ;
|
||||
static void sigint_out(void) ;
|
||||
|
||||
static struct ptobhead Head;
|
||||
|
||||
static void
|
||||
sigint_out()
|
||||
sigint_out(void)
|
||||
{
|
||||
if ( Head.out_file ) {
|
||||
unlink( Head.out_file );
|
||||
@@ -54,9 +54,7 @@ sigint_out()
|
||||
exit( 0 );
|
||||
}
|
||||
|
||||
main( argc, argv )
|
||||
int argc;
|
||||
char *argv[];
|
||||
int main( int argc, char *argv[])
|
||||
{
|
||||
int rtn, i;
|
||||
char *GetTmpPath();
|
||||
@@ -184,8 +182,7 @@ char *argv[];
|
||||
}
|
||||
|
||||
static
|
||||
CnvGPFtoBDF( head )
|
||||
struct ptobhead *head;
|
||||
CnvGPFtoBDF(struct ptobhead *head)
|
||||
{
|
||||
char textbuf[BUFSIZE] ;
|
||||
int rtn ;
|
||||
@@ -226,10 +223,7 @@ struct ptobhead *head;
|
||||
}
|
||||
|
||||
static void
|
||||
put_error( head, er_no, prog_name )
|
||||
struct ptobhead *head;
|
||||
int er_no;
|
||||
char *prog_name;
|
||||
put_error(struct ptobhead *head, int er_no, char *prog_name)
|
||||
{
|
||||
switch( er_no ) {
|
||||
case FATAL_ERROR:
|
||||
@@ -274,16 +268,14 @@ char *prog_name;
|
||||
}
|
||||
|
||||
static void
|
||||
put_help( prog_name )
|
||||
char *prog_name;
|
||||
put_help( char *prog_name)
|
||||
{
|
||||
USAGE1("Usage: %s [-bdf BDF_file_name] [-p chracter_pattern_file_name]\n", prog_name);
|
||||
USAGE("\t\t[-g user_defined_character_file_name] [-help]\n");
|
||||
}
|
||||
|
||||
static void
|
||||
Usage( prog_name )
|
||||
char *prog_name;
|
||||
Usage( char *prog_name)
|
||||
{
|
||||
put_help( prog_name );
|
||||
exit( PARAM_ERROR * (-1) );
|
||||
|
||||
Reference in New Issue
Block a user