update uwproj and ucx default tip

Wed, 31 Dec 2025 17:43:11 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 31 Dec 2025 17:43:11 +0100
changeset 101
265545607063
parent 100
714fbd1391a2

update uwproj and ucx

configure file | annotate | diff | comparison | revisions
make/configure.vm file | annotate | diff | comparison | revisions
make/project.xml file | annotate | diff | comparison | revisions
src/c2html.c file | annotate | diff | comparison | revisions
src/frontend.c file | annotate | diff | comparison | revisions
--- a/configure	Sun Nov 30 22:16:31 2025 +0100
+++ b/configure	Wed Dec 31 17:43:11 2025 +0100
@@ -85,7 +85,10 @@
 printhelp()
 {
     echo "Usage: $0 [OPTIONS]..."
-    echo 'Configuration:'
+    if [ $has_overridable_config_vars__ -eq 1 ] ; then
+        echo
+        echo "Configuration:"
+    fi
 if true \
       ; then
     :
@@ -114,22 +117,23 @@
 touch "$TEMP_DIR/features"
 
 # config variables
+has_overridable_config_vars__=0
 if true \
       ; then
     :
-    if test -z "$RMDIR__initialized__"; then
+    if [ -z "$RMDIR__initialized__" ] ; then
         RMDIR__initialized__=1
         RMDIR='rm -fR'
     fi
-    if test -z "$MKDIR__initialized__"; then
+    if [ -z "$MKDIR__initialized__" ] ; then
         MKDIR__initialized__=1
         MKDIR='mkdir -p'
     fi
-    if test -z "$COPYFILE__initialized__"; then
+    if [ -z "$COPYFILE__initialized__" ] ; then
         COPYFILE__initialized__=1
         COPYFILE='cp'
     fi
-    if test -z "$AR__initialized__"; then
+    if [ -z "$AR__initialized__" ] ; then
         AR__initialized__=1
         AR='ar cr'
     fi
@@ -247,20 +251,17 @@
 
 
 # generate vars.mk
-cat > "$TEMP_DIR/vars.mk" << __EOF__
-RMDIR=$RMDIR
-MKDIR=$MKDIR
-COPYFILE=$COPYFILE
-AR=$AR
-__EOF__
-
+echo '# configuration' > "$TEMP_DIR/vars.mk"
+echo "RMDIR=$RMDIR" >> "$TEMP_DIR/vars.mk"
+echo "MKDIR=$MKDIR" >> "$TEMP_DIR/vars.mk"
+echo "COPYFILE=$COPYFILE" >> "$TEMP_DIR/vars.mk"
+echo "AR=$AR" >> "$TEMP_DIR/vars.mk"
+echo >> "$TEMP_DIR/vars.mk"
 
 #
 # DEPENDENCIES
 #
 
-
-
 # create buffer for make variables required by dependencies
 echo > "$TEMP_DIR/make.mk"
 
@@ -294,7 +295,7 @@
         if [ -z "$PKG_CONFIG" ]; then
             break
         fi
-        if test_pkg_config "ucx" "3.2" "" "" ; then
+        if test_pkg_config "ucx" "4.0" "" "" ; then
             TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags ucx`"
             TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs ucx`"
         else
@@ -413,8 +414,10 @@
 if [ -n "$TOOLCHAIN_CSTD" ]; then
     echo "  default C std:  $TOOLCHAIN_CSTD"
 fi
-echo
-echo "Config:"
+if [ $has_overridable_config_vars__ -eq 1 ]; then
+    echo
+    echo "Config:"
+fi
 echo
 
 # generate the config.mk file
--- a/make/configure.vm	Sun Nov 30 22:16:31 2025 +0100
+++ b/make/configure.vm	Wed Dec 31 17:43:11 2025 +0100
@@ -86,7 +86,10 @@
 printhelp()
 {
     echo "Usage: $0 [OPTIONS]..."
-    echo 'Configuration:'
+    if [ $has_overridable_config_vars__ -eq 1 ] ; then
+        echo
+        echo "Configuration:"
+    fi
 #foreach( $cfg in $config )
 if true \
 #if( $cfg.platform )
@@ -99,7 +102,7 @@
     :
     #foreach( $var in $cfg.vars )
     #if( $var.overridable )
-    if test -z "${D}${var.varName}__described__"; then
+    if [ -z "${D}${var.varName}__described__" ] ; then
         ${var.varName}__described__=1
         cat << '__EOF__'
 ${var.helpText}
@@ -147,6 +150,7 @@
 touch "$TEMP_DIR/features"
 
 # config variables
+has_overridable_config_vars__=0
 #foreach( $cfg in $config )
 if true \
 #if( $cfg.platform )
@@ -158,7 +162,10 @@
       ; then
     :
     #foreach( $var in $cfg.vars )
-    if test -z "${D}${var.varName}__initialized__"; then
+    if [ -z "${D}${var.varName}__initialized__" ] ; then
+        #if( $var.overridable )
+        has_overridable_config_vars__=1
+        #end
         ${var.varName}__initialized__=1
         #if( $var.exec )
         ${var.varName}=`${var.value}`
@@ -304,19 +311,16 @@
 ## End of unparsed content **
 
 # generate vars.mk
-cat > "$TEMP_DIR/vars.mk" << __EOF__
+echo '# configuration' > "$TEMP_DIR/vars.mk"
 #foreach( $var in $vars )
-${var.varName}=${D}${var.varName}
+echo "${var.varName}=${D}${var.varName}" >> "$TEMP_DIR/vars.mk"
 #end
-__EOF__
-
+echo >> "$TEMP_DIR/vars.mk"
 
 #
 # DEPENDENCIES
 #
 
-
-
 # create buffer for make variables required by dependencies
 echo > "$TEMP_DIR/make.mk"
 
@@ -714,14 +718,18 @@
 if [ -n "$TOOLCHAIN_CSTD" ]; then
     echo "  default C std:  $TOOLCHAIN_CSTD"
 fi
-echo
-echo "Config:"
+if [ ${D}has_overridable_config_vars__ -eq 1 ]; then
+    echo
+    echo "Config:"
 #foreach( $var in $vars )
 #if ($var.overridable)
-    printf '  %-16s' '${var.arg}:'
-    echo "${D}${var.varName}"
+    if [ -n "${D}${var.varName}__initialized__" ]; then
+        printf '  %-16s' '${var.arg}:'
+        echo "${D}${var.varName}"
+    fi
 #end
 #end
+fi
 #if ( $options.size() > 0 )
 echo
 echo "Options:"
--- a/make/project.xml	Sun Nov 30 22:16:31 2025 +0100
+++ b/make/project.xml	Wed Dec 31 17:43:11 2025 +0100
@@ -10,7 +10,7 @@
 		<lang>c</lang>
 	</dependency>
 	<dependency name="ucx">
-		<pkgconfig atleast="3.2">ucx</pkgconfig>
+		<pkgconfig atleast="4.0">ucx</pkgconfig>
 	</dependency>
 </project>
 
--- a/src/c2html.c	Sun Nov 30 22:16:31 2025 +0100
+++ b/src/c2html.c	Wed Dec 31 17:43:11 2025 +0100
@@ -56,10 +56,10 @@
     /* process lines */
     int lineno = 0;
     c2html_highlighter_data hd = {0};
-    cxBufferInit(&hd.primary_buffer, NULL, 256, NULL, CX_BUFFER_AUTO_EXTEND);
-    cxBufferInit(&hd.secondary_buffer, NULL, 32, NULL, CX_BUFFER_AUTO_EXTEND);
+    cxBufferInit(&hd.primary_buffer, NULL, NULL, 256, CX_BUFFER_AUTO_EXTEND);
+    cxBufferInit(&hd.secondary_buffer, NULL, NULL, 32, CX_BUFFER_AUTO_EXTEND);
     CxBuffer out_line;
-    cxBufferInit(&out_line, NULL, 128, NULL, CX_BUFFER_AUTO_EXTEND);
+    cxBufferInit(&out_line, NULL, NULL, 128, CX_BUFFER_AUTO_EXTEND);
 
     CxIterator in_lines = cxListIterator(lines);
     cx_foreach(char*, in_line, in_lines) {
@@ -116,7 +116,7 @@
     size_t est_cap = 16 + insize / 40;
 
     /* create the line pointer array */
-    CxList *lines = cxArrayListCreateSimple(CX_STORE_POINTERS, est_cap);
+    CxList *lines = cxArrayListCreate(NULL, CX_STORE_POINTERS, est_cap);
     cxListAdd(lines, inbuf);
     for (size_t i = 0; i < insize; i++) {
         if (inbuf[i] == '\n' && i + 1 < insize) {
--- a/src/frontend.c	Sun Nov 30 22:16:31 2025 +0100
+++ b/src/frontend.c	Wed Dec 31 17:43:11 2025 +0100
@@ -148,7 +148,7 @@
         FILE *inputfile = fopen(settings.infilename, "r");
         if (inputfile) {
             CxBuffer fbuf;
-            cxBufferInit(&fbuf, NULL, 4096, NULL, CX_BUFFER_AUTO_EXTEND);
+            cxBufferInit(&fbuf, NULL, NULL, 4096, CX_BUFFER_AUTO_EXTEND);
             cx_stream_copy(inputfile, &fbuf, (cx_read_func) fread,
                            cxBufferWriteFunc);
             cxBufferPut(&fbuf, 0);

mercurial