This commit is contained in:
parent
dd55a09215
commit
092eeacafd
@ -237,7 +237,7 @@ static int handle_args (int argc, ase_char_t* argv[])
|
|||||||
ase_cint_t c;
|
ase_cint_t c;
|
||||||
|
|
||||||
ase_memset (&opt, 0, ASE_SIZEOF(opt));
|
ase_memset (&opt, 0, ASE_SIZEOF(opt));
|
||||||
opt.str = ASE_T("m:i:");
|
opt.str = ASE_T("hm:i:");
|
||||||
|
|
||||||
while ((c = ase_getopt (argc, argv, &opt)) != ASE_CHAR_EOF)
|
while ((c = ase_getopt (argc, argv, &opt)) != ASE_CHAR_EOF)
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ sbindir = @sbindir@
|
|||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
SUBDIRS = awk lsp
|
SUBDIRS = awk lsp tgp
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
all: all-recursive
|
all: all-recursive
|
||||||
|
|
||||||
|
@ -5,5 +5,5 @@ bin_PROGRAMS = asetgp
|
|||||||
|
|
||||||
asetgp_SOURCES = tgp.c
|
asetgp_SOURCES = tgp.c
|
||||||
asetgp_LDFLAGS = -L../../lib/tgp -L../../lib/utl
|
asetgp_LDFLAGS = -L../../lib/tgp -L../../lib/utl
|
||||||
asetgp_LDADD = -laseutl -lasetgp $(LIBM)
|
asetgp_LDADD = -laseutl -lasetgp
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <ase/utl/getopt.h>
|
#include <ase/utl/getopt.h>
|
||||||
#include <ase/cmn/mem.h>
|
#include <ase/cmn/mem.h>
|
||||||
#include <ase/cmn/str.h>
|
#include <ase/cmn/str.h>
|
||||||
|
//#include <ase/utl/helper.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#include <ase/std/io.h>
|
#include <ase/std/io.h>
|
||||||
@ -36,6 +37,7 @@
|
|||||||
#include <mcheck.h>
|
#include <mcheck.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
static ase_ssize_t get_input (
|
static ase_ssize_t get_input (
|
||||||
int cmd, void* arg, ase_char_t* data, ase_size_t size)
|
int cmd, void* arg, ase_char_t* data, ase_size_t size)
|
||||||
{
|
{
|
||||||
@ -112,28 +114,7 @@ static void custom_tgp_free (void* custom, void* ptr)
|
|||||||
free (ptr);
|
free (ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int custom_tgp_sprintf (
|
#endif
|
||||||
void* custom, ase_char_t* buf, ase_size_t size,
|
|
||||||
const ase_char_t* fmt, ...)
|
|
||||||
{
|
|
||||||
int n;
|
|
||||||
|
|
||||||
va_list ap;
|
|
||||||
va_start (ap, fmt);
|
|
||||||
n = ase_vsprintf (buf, size, fmt, ap);
|
|
||||||
va_end (ap);
|
|
||||||
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void custom_tgp_dprintf (void* custom, const ase_char_t* fmt, ...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
va_start (ap, fmt);
|
|
||||||
ase_vfprintf (stderr, fmt, ap);
|
|
||||||
va_end (ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void print_usage (const ase_char_t* argv0)
|
static void print_usage (const ase_char_t* argv0)
|
||||||
{
|
{
|
||||||
@ -141,10 +122,15 @@ static void print_usage (const ase_char_t* argv0)
|
|||||||
ASE_T("Usage: %s [options]\n"), argv0);
|
ASE_T("Usage: %s [options]\n"), argv0);
|
||||||
ase_fprintf (ASE_STDERR,
|
ase_fprintf (ASE_STDERR,
|
||||||
ASE_T(" -h print this message\n"));
|
ASE_T(" -h print this message\n"));
|
||||||
|
|
||||||
ase_fprintf (ASE_STDERR,
|
ase_fprintf (ASE_STDERR,
|
||||||
ASE_T(" -m integer number of memory cells\n"));
|
ASE_T(" -u user id\n"));
|
||||||
ase_fprintf (ASE_STDERR,
|
ase_fprintf (ASE_STDERR,
|
||||||
ASE_T(" -i integer number of memory cell increments\n"));
|
ASE_T(" -g group id\n"));
|
||||||
|
ase_fprintf (ASE_STDERR,
|
||||||
|
ASE_T(" -r chroot\n"));
|
||||||
|
ase_fprintf (ASE_STDERR,
|
||||||
|
ASE_T(" -U enable upload\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int handle_args (int argc, ase_char_t* argv[])
|
static int handle_args (int argc, ase_char_t* argv[])
|
||||||
@ -153,7 +139,7 @@ static int handle_args (int argc, ase_char_t* argv[])
|
|||||||
ase_cint_t c;
|
ase_cint_t c;
|
||||||
|
|
||||||
ase_memset (&opt, 0, ASE_SIZEOF(opt));
|
ase_memset (&opt, 0, ASE_SIZEOF(opt));
|
||||||
opt.str = ASE_T("m:i:");
|
opt.str = ASE_T("hu:g:r:");
|
||||||
|
|
||||||
while ((c = ase_getopt (argc, argv, &opt)) != ASE_CHAR_EOF)
|
while ((c = ase_getopt (argc, argv, &opt)) != ASE_CHAR_EOF)
|
||||||
{
|
{
|
||||||
@ -163,14 +149,6 @@ static int handle_args (int argc, ase_char_t* argv[])
|
|||||||
print_usage (argv[0]);
|
print_usage (argv[0]);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
case ASE_T('m'):
|
|
||||||
opt_memsize = ase_strtoi(opt.arg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ASE_T('i'):
|
|
||||||
opt_meminc = ase_strtoi(opt.arg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ASE_T('?'):
|
case ASE_T('?'):
|
||||||
ase_fprintf (ASE_STDERR, ASE_T("Error: illegal option - %c\n"), opt.opt);
|
ase_fprintf (ASE_STDERR, ASE_T("Error: illegal option - %c\n"), opt.opt);
|
||||||
print_usage (argv[0]);
|
print_usage (argv[0]);
|
||||||
@ -180,6 +158,19 @@ static int handle_args (int argc, ase_char_t* argv[])
|
|||||||
ase_fprintf (ASE_STDERR, ASE_T("Error: missing argument for %c\n"), opt.opt);
|
ase_fprintf (ASE_STDERR, ASE_T("Error: missing argument for %c\n"), opt.opt);
|
||||||
print_usage (argv[0]);
|
print_usage (argv[0]);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
case ASE_T('u'):
|
||||||
|
//opt.arg;
|
||||||
|
break;
|
||||||
|
case ASE_T('g'):
|
||||||
|
//opt.arg;
|
||||||
|
break;
|
||||||
|
case ASE_T('r'):
|
||||||
|
//opt.arg;
|
||||||
|
break;
|
||||||
|
case ASE_T('U'):
|
||||||
|
//opt.arg;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,11 +181,6 @@ static int handle_args (int argc, ase_char_t* argv[])
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_memsize <= 0)
|
|
||||||
{
|
|
||||||
ase_printf (ASE_T("Error: invalid memory size given\n"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,8 +198,8 @@ int tgp_main (int argc, ase_char_t* argv[])
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ase_tgp_attinput (tgp, get_input, ASE_NULL);
|
//ase_tgp_attinput (tgp, get_input, ASE_NULL);
|
||||||
ase_tgp_attoutput (tgp, put_output, ASE_NULL);
|
//ase_tgp_attoutput (tgp, put_output, ASE_NULL);
|
||||||
|
|
||||||
ase_tgp_close (tgp);
|
ase_tgp_close (tgp);
|
||||||
return 0;
|
return 0;
|
||||||
|
3
ase/configure
vendored
3
ase/configure
vendored
@ -26837,7 +26837,7 @@ CJFLAGS=$CJFLAGS
|
|||||||
BUILD_CJ=$BUILD_CJ
|
BUILD_CJ=$BUILD_CJ
|
||||||
|
|
||||||
|
|
||||||
ac_config_files="$ac_config_files makefile include/makefile include/ase/makefile include/ase/cmn/makefile include/ase/awk/makefile include/ase/lsp/makefile include/ase/tgp/makefile include/ase/utl/makefile lib/makefile lib/cmn/makefile lib/awk/makefile lib/lsp/makefile lib/tgp/makefile lib/utl/makefile cmd/makefile cmd/awk/makefile cmd/lsp/makefile"
|
ac_config_files="$ac_config_files makefile include/makefile include/ase/makefile include/ase/cmn/makefile include/ase/awk/makefile include/ase/lsp/makefile include/ase/tgp/makefile include/ase/utl/makefile lib/makefile lib/cmn/makefile lib/awk/makefile lib/lsp/makefile lib/tgp/makefile lib/utl/makefile cmd/makefile cmd/awk/makefile cmd/lsp/makefile cmd/tgp/makefile"
|
||||||
|
|
||||||
cat >confcache <<\_ACEOF
|
cat >confcache <<\_ACEOF
|
||||||
# This file is a shell script that caches the results of configure
|
# This file is a shell script that caches the results of configure
|
||||||
@ -27441,6 +27441,7 @@ do
|
|||||||
"cmd/makefile") CONFIG_FILES="$CONFIG_FILES cmd/makefile" ;;
|
"cmd/makefile") CONFIG_FILES="$CONFIG_FILES cmd/makefile" ;;
|
||||||
"cmd/awk/makefile") CONFIG_FILES="$CONFIG_FILES cmd/awk/makefile" ;;
|
"cmd/awk/makefile") CONFIG_FILES="$CONFIG_FILES cmd/awk/makefile" ;;
|
||||||
"cmd/lsp/makefile") CONFIG_FILES="$CONFIG_FILES cmd/lsp/makefile" ;;
|
"cmd/lsp/makefile") CONFIG_FILES="$CONFIG_FILES cmd/lsp/makefile" ;;
|
||||||
|
"cmd/tgp/makefile") CONFIG_FILES="$CONFIG_FILES cmd/tgp/makefile" ;;
|
||||||
|
|
||||||
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
|
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
|
||||||
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
|
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
|
||||||
|
@ -307,5 +307,6 @@ AC_CONFIG_FILES([
|
|||||||
lib/utl/makefile
|
lib/utl/makefile
|
||||||
cmd/makefile
|
cmd/makefile
|
||||||
cmd/awk/makefile
|
cmd/awk/makefile
|
||||||
cmd/lsp/makefile])
|
cmd/lsp/makefile
|
||||||
|
cmd/tgp/makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
Loading…
Reference in New Issue
Block a user