This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include <ase/utl/stdio.h>
|
||||
#include <ase/utl/main.h>
|
||||
#include <ase/utl/getopt.h>
|
||||
#include <ase/utl/stdlib.h>
|
||||
#include <ase/cmn/mem.h>
|
||||
|
||||
#include <string.h>
|
||||
@ -283,11 +284,24 @@ static int handle_args (int argc, ase_char_t* argv[])
|
||||
break;
|
||||
|
||||
case ASE_T('?'):
|
||||
ase_fprintf (ASE_STDERR, ASE_T("Error: illegal option - %c\n"), opt.opt);
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
|
||||
case ASE_T(':'):
|
||||
ase_fprintf (ASE_STDERR, ASE_T("Error: missing argument for %c\n"), opt.opt);
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (opt.ind < argc)
|
||||
{
|
||||
ase_printf (ASE_T("Error: redundant argument - %s\n"), argv[opt.ind]);
|
||||
print_usage (argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (opt_memsize <= 0)
|
||||
{
|
||||
ase_printf (ASE_T("Error: invalid memory size given\n"));
|
||||
@ -305,7 +319,6 @@ int lsp_main (int argc, ase_char_t* argv[])
|
||||
prmfns_data_t prmfns_data;
|
||||
#endif
|
||||
|
||||
|
||||
if (handle_args (argc, argv) == -1) return -1;
|
||||
|
||||
ase_memset (&prmfns, 0, ASE_SIZEOF(prmfns));
|
||||
|
@ -12,7 +12,7 @@ OUT_DIR = ../../$(MODE)/bin
|
||||
|
||||
all: $(OUT_DIR)/aselsp
|
||||
|
||||
$(OUT_DIR)/aselsp: $(OUT_DIR)
|
||||
$(OUT_DIR)/aselsp: $(OUT_DIR) lsp.c
|
||||
$(CC) $(CFLAGS) -o $@ lsp.c $(LDFLAGS) $(LIBS)
|
||||
|
||||
$(OUT_DIR):
|
||||
|
Reference in New Issue
Block a user