%infile and CMask

Hi,
i downloaded today the cmask version from GitHub - kunstmusik/cmask: Cmask by Andre Bartetzki
i built it and it did a fine job at that:
menno@mennoASUSZ170 ~ $ cd /home/menno/bin/CMaskSteven/cmask-master/source
menno@mennoASUSZ170 ~/bin/CMaskSteven/cmask-master/source $ make
g++ -O -c cmask.cpp
g++ -O -c event.cpp
g++ -O -c field.cpp
g++ -O -c fileio.cpp
g++ -O -c gen.cpp
g++ -O -c mask.cpp
g++ -O -c parser.cpp
parser.cpp: In member function ‘void scanner::calc(long int, paramliste&, long int)’:
parser.cpp:1384:20: warning: ‘%ld’ directive writing between 1 and 19 bytes into a region of size 3 [-Wformat-overflow=]
1384 | sprintf(pstr,"\tp%ld",i);
| ^~~
parser.cpp:1384:16: note: directive argument in the range [4, 9223372036854775807]
1384 | sprintf(pstr,"\tp%ld",i);
| ^~~~~~~~
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from parser.cpp:3:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 4 and 22 bytes into a destination of size 5
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
parser.cpp:1387:85: warning: ‘%s’ directive writing up to 1023 bytes into a region of size between 325 and 964 [-Wformat-overflow=]
1387 | ------ begin of field %ld — seconds: %.2f - %.2f --------%s%s%s%s",NL,fn,p.beginn,p.ende,NL,dummy,NL,NL);
| ^~ ~~~~~

In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from parser.cpp:3:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 63 and 1725 bytes into a destination of size 1024
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -O -c quant.cpp
g++ -O -c items.cpp
items.cpp: In member function ‘double itemlist::folder()’:
items.cpp:116:2: warning: no return statement in function returning non-void [-Wreturn-type]
116 | }
| ^
g++ -O -c tables.cpp
g++ -O -c utils.cpp
g++ -v -O -o cmask cmask.o event.o field.o fileio.o gen.o mask.o parser.o quant.o items.o tables.o utils.o -lm
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: …/src/configure -v --with-pkgversion=‘Ubuntu 9.3.0-17ubuntu1~20.04’ --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/…/…/…/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/…/…/…/…/lib/:/lib/x86_64-linux-gnu/:/lib/…/lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/…/lib/:/usr/lib/gcc/x86_64-linux-gnu/9/…/…/…/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS=’-v’ ‘-O’ ‘-o’ ‘cmask’ ‘-shared-libgcc’ ‘-mtune=generic’ ‘-march=x86-64’
/usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccJewpWt.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmask /usr/lib/gcc/x86_64-linux-gnu/9/…/…/…/x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/…/…/…/x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/…/…/…/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/…/…/…/…/lib -L/lib/x86_64-linux-gnu -L/lib/…/lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/…/lib -L/usr/lib/gcc/x86_64-linux-gnu/9/…/…/… cmask.o event.o field.o fileio.o gen.o mask.o parser.o quant.o items.o tables.o utils.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/…/…/…/x86_64-linux-gnu/crtn.o
COLLECT_GCC_OPTIONS=’-v’ ‘-O’ ‘-o’ ‘cmask’ ‘-shared-libgcc’ ‘-mtune=generic’ ‘-march=x86-64’
menno@mennoASUSZ170 ~/bin/CMaskSteven/cmask-master/source $

When i run cmask from the terminal, it works:
menno@mennoASUSZ170 ~/bin/CMaskSteven/cmask-master/source $ ./cmask SimpleTest
-------- CMask 0.31 --------
----- Modified Version -----
-------- Feb 28 2021 -------

parameter file: SimpleTest
Score file: SimpleTest.sco

===== Field: 1 ==================

Duration from 0 to 10

pfields: p1 p2 p3

10 events generated.

score file OK


The input file i used (SimpleTest) was super simple:

f 0 10

p1 const 1

p2 const 1

p3 const 1

Also, the testfiles included in this cmask version worked okay.
Next thing i wanted to do is to run this cmask version from within Blue:

/home/menno/bin/CMaskSteven/cmask-master/source/cmask %infile %outfile

using the External Object.
but got an empty window.
Can it be that there is an issue with %infile?

I think it might be a simple problem to change from %infile %outfile to $infile $outfile?

Could it be so simple? Yes, it is.
My mistake- all works.

1 Like