From d19fab7e3ff937f3fafd4fdf24a36bd398ab04f3 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 29 Jan 2021 08:40:10 +0000 Subject: [PATCH] renamed hcl_read2() and hcl_compile2() to hcl_read() and hcl_compile() respectively --- bin/main.c | 4 ++-- lib/Makefile.am | 4 ++-- lib/Makefile.in | 45 ++++++++++++++++++++--------------------- lib/{comp2.c => comp.c} | 2 +- lib/hcl-s.c | 4 ++-- lib/hcl.h | 4 ++-- lib/{read2.c => read.c} | 2 +- 7 files changed, 32 insertions(+), 33 deletions(-) rename lib/{comp2.c => comp.c} (99%) rename lib/{read2.c => read.c} (99%) diff --git a/bin/main.c b/bin/main.c index 0ebb184..3d9f1a5 100644 --- a/bin/main.c +++ b/bin/main.c @@ -1183,7 +1183,7 @@ static int count = 0; if (count %5 == 0) hcl_reset (hcl); count++; */ - obj = hcl_read2(hcl); + obj = hcl_read(hcl); if (!obj) { if (hcl->errnum == HCL_EFINIS) @@ -1217,7 +1217,7 @@ count++; if (verbose) hcl_prbfmt (hcl, "\n"); /* flush the output buffer by hcl_print above */ - n = hcl_compile2(hcl, obj); + n = hcl_compile(hcl, obj); hcl_freecnode (hcl, obj); /* not needed any more */ if (n <= -1) diff --git a/lib/Makefile.am b/lib/Makefile.am index 3b8ad46..e93498e 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -65,7 +65,7 @@ libhcl_la_SOURCES = \ hcl-prv.h \ bigint.c \ cnode.c \ - comp2.c \ + comp.c \ debug.c \ decode.c \ dic.c \ @@ -83,7 +83,7 @@ libhcl_la_SOURCES = \ prim.c \ print.c \ rbt.c \ - read2.c \ + read.c \ sym.c \ utf8.c \ utl.c \ diff --git a/lib/Makefile.in b/lib/Makefile.in index ca99f16..fb15ffc 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -151,12 +151,12 @@ am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) libhcl_la_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__append_6) am_libhcl_la_OBJECTS = libhcl_la-bigint.lo libhcl_la-cnode.lo \ - libhcl_la-comp2.lo libhcl_la-debug.lo libhcl_la-decode.lo \ + libhcl_la-comp.lo libhcl_la-debug.lo libhcl_la-decode.lo \ libhcl_la-dic.lo libhcl_la-err.lo libhcl_la-exec.lo \ libhcl_la-fmt.lo libhcl_la-gc.lo libhcl_la-hcl.lo \ libhcl_la-heap.lo libhcl_la-number.lo libhcl_la-obj.lo \ libhcl_la-opt.lo libhcl_la-prim.lo libhcl_la-print.lo \ - libhcl_la-rbt.lo libhcl_la-read2.lo libhcl_la-sym.lo \ + libhcl_la-rbt.lo libhcl_la-read.lo libhcl_la-sym.lo \ libhcl_la-utf8.lo libhcl_la-utl.lo libhcl_la-xma.lo libhcl_la_OBJECTS = $(am_libhcl_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -196,8 +196,7 @@ DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/ac/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libhcl_la-bigint.Plo \ - ./$(DEPDIR)/libhcl_la-cnode.Plo \ - ./$(DEPDIR)/libhcl_la-comp2.Plo \ + ./$(DEPDIR)/libhcl_la-cnode.Plo ./$(DEPDIR)/libhcl_la-comp.Plo \ ./$(DEPDIR)/libhcl_la-debug.Plo \ ./$(DEPDIR)/libhcl_la-decode.Plo ./$(DEPDIR)/libhcl_la-dic.Plo \ ./$(DEPDIR)/libhcl_la-err.Plo ./$(DEPDIR)/libhcl_la-exec.Plo \ @@ -206,7 +205,7 @@ am__depfiles_remade = ./$(DEPDIR)/libhcl_la-bigint.Plo \ ./$(DEPDIR)/libhcl_la-number.Plo ./$(DEPDIR)/libhcl_la-obj.Plo \ ./$(DEPDIR)/libhcl_la-opt.Plo ./$(DEPDIR)/libhcl_la-prim.Plo \ ./$(DEPDIR)/libhcl_la-print.Plo ./$(DEPDIR)/libhcl_la-rbt.Plo \ - ./$(DEPDIR)/libhcl_la-read2.Plo ./$(DEPDIR)/libhcl_la-sym.Plo \ + ./$(DEPDIR)/libhcl_la-read.Plo ./$(DEPDIR)/libhcl_la-sym.Plo \ ./$(DEPDIR)/libhcl_la-utf8.Plo ./$(DEPDIR)/libhcl_la-utl.Plo \ ./$(DEPDIR)/libhcl_la-xma.Plo \ ./$(DEPDIR)/libhclx_la-cb-impl.Plo \ @@ -438,7 +437,7 @@ libhcl_la_SOURCES = \ hcl-prv.h \ bigint.c \ cnode.c \ - comp2.c \ + comp.c \ debug.c \ decode.c \ dic.c \ @@ -456,7 +455,7 @@ libhcl_la_SOURCES = \ prim.c \ print.c \ rbt.c \ - read2.c \ + read.c \ sym.c \ utf8.c \ utl.c \ @@ -575,7 +574,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-bigint.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-cnode.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-comp2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-comp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-debug.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-decode.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-dic.Plo@am__quote@ # am--include-marker @@ -591,7 +590,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-prim.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-print.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-rbt.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-read2.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-read.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-sym.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-utf8.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhcl_la-utl.Plo@am__quote@ # am--include-marker @@ -647,12 +646,12 @@ libhcl_la-cnode.lo: cnode.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhcl_la-cnode.lo `test -f 'cnode.c' || echo '$(srcdir)/'`cnode.c -libhcl_la-comp2.lo: comp2.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhcl_la-comp2.lo -MD -MP -MF $(DEPDIR)/libhcl_la-comp2.Tpo -c -o libhcl_la-comp2.lo `test -f 'comp2.c' || echo '$(srcdir)/'`comp2.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhcl_la-comp2.Tpo $(DEPDIR)/libhcl_la-comp2.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='comp2.c' object='libhcl_la-comp2.lo' libtool=yes @AMDEPBACKSLASH@ +libhcl_la-comp.lo: comp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhcl_la-comp.lo -MD -MP -MF $(DEPDIR)/libhcl_la-comp.Tpo -c -o libhcl_la-comp.lo `test -f 'comp.c' || echo '$(srcdir)/'`comp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhcl_la-comp.Tpo $(DEPDIR)/libhcl_la-comp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='comp.c' object='libhcl_la-comp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhcl_la-comp2.lo `test -f 'comp2.c' || echo '$(srcdir)/'`comp2.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhcl_la-comp.lo `test -f 'comp.c' || echo '$(srcdir)/'`comp.c libhcl_la-debug.lo: debug.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhcl_la-debug.lo -MD -MP -MF $(DEPDIR)/libhcl_la-debug.Tpo -c -o libhcl_la-debug.lo `test -f 'debug.c' || echo '$(srcdir)/'`debug.c @@ -759,12 +758,12 @@ libhcl_la-rbt.lo: rbt.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhcl_la-rbt.lo `test -f 'rbt.c' || echo '$(srcdir)/'`rbt.c -libhcl_la-read2.lo: read2.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhcl_la-read2.lo -MD -MP -MF $(DEPDIR)/libhcl_la-read2.Tpo -c -o libhcl_la-read2.lo `test -f 'read2.c' || echo '$(srcdir)/'`read2.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhcl_la-read2.Tpo $(DEPDIR)/libhcl_la-read2.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='read2.c' object='libhcl_la-read2.lo' libtool=yes @AMDEPBACKSLASH@ +libhcl_la-read.lo: read.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhcl_la-read.lo -MD -MP -MF $(DEPDIR)/libhcl_la-read.Tpo -c -o libhcl_la-read.lo `test -f 'read.c' || echo '$(srcdir)/'`read.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhcl_la-read.Tpo $(DEPDIR)/libhcl_la-read.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='read.c' object='libhcl_la-read.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhcl_la-read2.lo `test -f 'read2.c' || echo '$(srcdir)/'`read2.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhcl_la-read.lo `test -f 'read.c' || echo '$(srcdir)/'`read.c libhcl_la-sym.lo: sym.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhcl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhcl_la-sym.lo -MD -MP -MF $(DEPDIR)/libhcl_la-sym.Tpo -c -o libhcl_la-sym.lo `test -f 'sym.c' || echo '$(srcdir)/'`sym.c @@ -993,7 +992,7 @@ clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ distclean: distclean-am -rm -f ./$(DEPDIR)/libhcl_la-bigint.Plo -rm -f ./$(DEPDIR)/libhcl_la-cnode.Plo - -rm -f ./$(DEPDIR)/libhcl_la-comp2.Plo + -rm -f ./$(DEPDIR)/libhcl_la-comp.Plo -rm -f ./$(DEPDIR)/libhcl_la-debug.Plo -rm -f ./$(DEPDIR)/libhcl_la-decode.Plo -rm -f ./$(DEPDIR)/libhcl_la-dic.Plo @@ -1009,7 +1008,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/libhcl_la-prim.Plo -rm -f ./$(DEPDIR)/libhcl_la-print.Plo -rm -f ./$(DEPDIR)/libhcl_la-rbt.Plo - -rm -f ./$(DEPDIR)/libhcl_la-read2.Plo + -rm -f ./$(DEPDIR)/libhcl_la-read.Plo -rm -f ./$(DEPDIR)/libhcl_la-sym.Plo -rm -f ./$(DEPDIR)/libhcl_la-utf8.Plo -rm -f ./$(DEPDIR)/libhcl_la-utl.Plo @@ -1068,7 +1067,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libhcl_la-bigint.Plo -rm -f ./$(DEPDIR)/libhcl_la-cnode.Plo - -rm -f ./$(DEPDIR)/libhcl_la-comp2.Plo + -rm -f ./$(DEPDIR)/libhcl_la-comp.Plo -rm -f ./$(DEPDIR)/libhcl_la-debug.Plo -rm -f ./$(DEPDIR)/libhcl_la-decode.Plo -rm -f ./$(DEPDIR)/libhcl_la-dic.Plo @@ -1084,7 +1083,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libhcl_la-prim.Plo -rm -f ./$(DEPDIR)/libhcl_la-print.Plo -rm -f ./$(DEPDIR)/libhcl_la-rbt.Plo - -rm -f ./$(DEPDIR)/libhcl_la-read2.Plo + -rm -f ./$(DEPDIR)/libhcl_la-read.Plo -rm -f ./$(DEPDIR)/libhcl_la-sym.Plo -rm -f ./$(DEPDIR)/libhcl_la-utf8.Plo -rm -f ./$(DEPDIR)/libhcl_la-utl.Plo diff --git a/lib/comp2.c b/lib/comp.c similarity index 99% rename from lib/comp2.c rename to lib/comp.c index 535f5a5..83ba883 100644 --- a/lib/comp2.c +++ b/lib/comp.c @@ -3153,7 +3153,7 @@ static HCL_INLINE int emit_set (hcl_t* hcl) /* ========================================================================= */ -int hcl_compile2 (hcl_t* hcl, hcl_cnode_t* obj) +int hcl_compile (hcl_t* hcl, hcl_cnode_t* obj) { hcl_oow_t saved_bc_len, saved_lit_len; hcl_bitmask_t log_default_type_mask; diff --git a/lib/hcl-s.c b/lib/hcl-s.c index eae881e..ba6978f 100644 --- a/lib/hcl-s.c +++ b/lib/hcl-s.c @@ -1457,7 +1457,7 @@ int hcl_server_proto_handle_request (hcl_server_proto_t* proto) if (proto->req.state == HCL_SERVER_PROTO_REQ_IN_TOP_LEVEL) hcl_reset(proto->hcl); proto->worker->opstate = HCL_SERVER_WORKER_OPSTATE_READ; - obj = hcl_read2(proto->hcl); + obj = hcl_read(proto->hcl); if (!obj) { if (hcl_geterrnum(proto->hcl) == HCL_ESYNERR) reformat_synerr (proto->hcl); @@ -1477,7 +1477,7 @@ int hcl_server_proto_handle_request (hcl_server_proto_t* proto) } proto->worker->opstate = HCL_SERVER_WORKER_OPSTATE_COMPILE; - n = hcl_compile2(proto->hcl, obj); + n = hcl_compile(proto->hcl, obj); hcl_freecnode (proto->hcl, obj); if (n <= -1) { diff --git a/lib/hcl.h b/lib/hcl.h index 024e6bc..b0d22e6 100644 --- a/lib/hcl.h +++ b/lib/hcl.h @@ -1992,7 +1992,7 @@ HCL_EXPORT void hcl_flushio ( hcl_t* hcl ); -HCL_EXPORT hcl_cnode_t* hcl_read2 ( +HCL_EXPORT hcl_cnode_t* hcl_read ( hcl_t* hcl ); @@ -2016,7 +2016,7 @@ HCL_EXPORT hcl_ooi_t hcl_proutufmt ( ... ); -HCL_EXPORT int hcl_compile2 ( +HCL_EXPORT int hcl_compile ( hcl_t* hcl, hcl_cnode_t* obj ); diff --git a/lib/read2.c b/lib/read.c similarity index 99% rename from lib/read2.c rename to lib/read.c index ecc5fc1..c0620bd 100644 --- a/lib/read2.c +++ b/lib/read.c @@ -2054,7 +2054,7 @@ oops: return HCL_NULL; } -hcl_cnode_t* hcl_read2 (hcl_t* hcl) +hcl_cnode_t* hcl_read (hcl_t* hcl) { HCL_ASSERT (hcl, hcl->c && hcl->c->reader); if (get_token(hcl) <= -1) return HCL_NULL;