This file is part of experix.
Copyright (C) 2004-2016 William Bayard McConnaughey
experix is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3 of the Licence, or (at your option)
any later version.
experix is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public Licence for more
details.
You should have received a copy of the GNU General Public Licence along
with experix. If not, see <http://www.gnu.org/licenses/>.
Author:
William Bayard McConnaughey
Washington University Biochemistry Department (retired)
mcconnaughey@jeffnet.org
The phrase "Copyright (C) 2004-2017" as used in this file and in all files
that are part of experix has exactly the same meaning as "Copyright (C)
2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015,
2016, 2017"
This file discusses: experix_release_r15.1 1 JAN 2016
I have updated my files with new copyright dates and author contact info,
and will make that available on request. There are not yet enough real
changes to justify uploading it.
---------------------------- In this file ----------------------------
Major additions/changes relative to experix_r15 15 JUN 2015
Introduction what is experix?
Quick installation just to get started
General stuff auxiliary programs and experix setup
System setup stuff some things needed for experix to work well
Trying the program how to get started
Author contact
Dist and Book trees of this distribution
Changelog relative to experix_release_r15
--------------------- Major additions and changes ---------------------
LZMA data compression/decompression can be applied to stack objects and
to files sent via file/x.
Help system is revised to make the editor 'cd' to the directory of the
desired help file, for convenience in loading other help files that it
might refer to.
book/performance has been updated with benchmarks on the Raspberry Pi 2.
---------------------------- Introduction ----------------------------
The experix program is a general-purpose configurable laboratory device
interface written in C to run on GNU-Linux systems. It has been used to
operate the "cell poker" (like a primitive atomic force microscope); to
run a two-color fluorescence experiment using a laser modulator and photon
counters implemented on a programmable logic device; for analyzing
fluorescence intensity distributions in Zeiss Confocor data; and doing
miscellaneous other tasks that arise.
The source archive (about 1 MB) contains source files and documentation
for experix and its graphics server and a few auxiliary programs, and help
files for the commands and operators. There is also a book started (about
0.8 megabytes of text plus some figures) and a computational application
(FIDA, about 50K, not included in the distribution but will be provided on
request).
The user interface presents a command prompt and accepts a command string
of arbitrary length. The command string contains commands and operators
which are executed sequentially except when branch operators are
encountered. Commands and operators use objects in a stack which includes
numbers, arrays, strings, and various control blocks. The stack provides a
mechanism for commands and operators to obtain arguments and pass results
on to the the next command or operator.
Data objects held by experix stacks and in command variables are of many
types: integer, floating-point, complex and polar numbers and arrays with
multiple dimensions; strings used as commands, filenames, filepaths,
command names and messages; and file control objects, device control
objects and thread control objects. Operators and command functions are
coded in C and overloaded to the extent that makes sense, so that they
work on different kinds of numerical or string data. They do calculations
in binary data types, which gives a speed advantage relative to systems
that use string numerical represention. Support at the user command level
for numerous binary numerical data types facilitates the interface to data
acquisition hardware.
Command input is obtained in a thread separate from the execution loop, so
that commands activated by timers, signals and devices can be put into the
queues asynchronously with respect to user command execution. In graphic
mode, stdout is directed to a thread that packages characters into graphic
display commands, and these are written to a fifo which is consumed by the
graphics server process.
Help is available by typing a command name or an operator preceeded by '?'.
This displays the relevant section of the help file for that item, and
subsequent sections of the file can then be viewed at any time by typing
<space><enter>. With '??' preceeding the name or operator, the help system
execs an editor in a separate console with the relevant file loaded and
opened to the place of interest. The help files make use of the "embedded
highlighting" feature in xnano, the extended version of the GNU nano text
editor (modified nano source files and instructions are in xnano.tgz2;
find the most recent one in the experix download area).
In case of error, execution of the command string stops and an error
message is given, with a display showing the execution point in the
command that caused the error and the execution points in all suspended
commands. User input, stack displays and diagnostic messages are recorded
in a log file. Together with recall and editing of previous input, this
gives experix a significant advantage over mouse-and-icon-based command
input, because the user is encouraged to think things through and is
provided a record of the session.
The interface for legacy devices such as PCMCIA data acquisition cards has
fallen into disuse mainly because USB devices are a better choice now. This
paragraph describes the legacy device interface, which could be restored
with some difficulty. The hardware is operated by device drivers (loadable
kernel modules) that conform to a model in which the data is shared by the
mmap method, and the read method is used more like an ioctl. A set of
generic driver commands is defined, such as start, stop, configure the data
page, define the signal delivery time, and others. A command and supporting
parameters is prepared as a short array that is passed to the driver in a
read call. The driver writes results back to the array. The driver signal
handler scans the registered drivers to find out which ones need service,
and for those drivers it queues the experix command strings that have been
assigned to them. These commands would typically perform device operation
and data acquisition, display and storage. They run atomically between
tokens of a user command, and so do not wait on whatever the user is doing.
All device data and actions are accessible by the experix command line, so
an expert user is able to do things that the programmer may not have
considered.
USB operations and command threading enable experix to utilize the
tremendous variety of USB-connected devices that have made their appearance
in recent years. These are operated through the 'usb' command, which
executes arbitrarily constructed control transfers and bulk transfers.
It is also possible to make user-space device drivers which are linked by
fifo's to experix and accessed via the 'file' command. When this technique
can get the job done, it saves the very considerable difficulties
associated with kernel device driver construction.
Data can be transferred between files and stack objects in either binary or
formatted form. This uses the 'file' command together with a stack object
which contains the file descriptor, file path and status information. This
can be used to create complicated data archiving and retrieval commands
taylored to each experimental situation.
------------------------- Quick installation -------------------------
This discussion is for a system that does not yet have experix. The
procedure sets up the experix directory, downloads and unpacks the
distribution files, and builds experix and its graphics server frbfserv.
Then experix will work in text mode. Getting it to work in graphics mode
should not be any more complicated, but for some screen geometries you might
want to tinker with the fonts and vdr sizes. See book/install,
help/in.experix/hlp and contact the author. This all assumes you are using
a not-too-old GNU-Linux system.
See the program building instructions in help/in.experix.hlp. That is to be
considered the authority in program building and it also includes the
single-process option in which the graphics server is built into experix.
Also, see information on system setup in the dist/hardware directory.
# Construct the experix directory tree.
cd <the directory that is to contain the experix tree>
mkdir experix
cd experix
# download the following from Sourceforge:
# The latest versions of experix_r???_dist.tgz2 experix_r???_helpers.tgz2
# experix_r???_book.tgz2
tar -xjf experix_r???_dist.tgz2
tar -xjf experix_r???_book.tgz2
mkdir bin
cd bin
# Build experixXG. This is the variant that uses an external graphics
# server (frbfserv). But first, see the more detailed instructions in
# help/in.experix.hlp, which also discusses some compilation options.
gcc -c -g -O -pthread -Wall ../dist/source/xpx_local/zdhist.c
gcc -c -g -O -pthread -Wall ../dist/source/xpx_local/stretcher.c
gcc -c -g -O -pthread -Wall ../dist/source/xpx_local/webcam.c
gcc -c -g -O -pthread -Wall ../dist/source/xpx_local/gpioRPi.c
gcc -c -g -O -pthread -Wall ../dist/source/frbflib/exp_frbf.c
gcc -c -g -O -pthread -Wall ../dist/source/*.c &> errs; cat errs
# Inspect the errs file to ensure there are no compilation errors.
# There will be warnings. See help/compile_warn, and contact the author
# about problems that are not discussed there.
# Link the program:
gcc -o experixXG *.o -L /usr/local/lib \
-lpthread -lm -lreadline -lcurses -lrt -lusb -lcap -lv4l2
# Give it capabilities that it needs:
sudo setcap cap_sys_resource,cap_sys_rawio,cap_dac_override=p experixXG
# Build the graphics server frbfserv.
gcc -g -O -Wall -o frbfserv \
../dist/source/frbflib/frbfserv.c ../dist/source/frbflib/frbffunc.c \
../dist/source/frbflib/frbffont.c ../dist/source/frbflib/frbflib.c -lm
# After building experixXG, build experixIG. This is the variant in which
# the graphics server functionality is integrated into experix, rather
# than being a separate process. (in.experix.hlp also shows how to build
# this without first building experixXG)
gcc -D_G_IN_X -c -g -O -pthread -Wall ../dist/source/graphx.c
gcc -D_G_IN_X -c -g -O -pthread -Wall ../dist/source/threads.c
rm -f exp_frbf.o
gcc -c -g -O -pthread -Wall ../dist/source/frbflib/exp_frbf_G_IN_X.c
gcc -c -g -O -pthread -Wall ../dist/source/frbflib/frbfserv_G_IN_X.c
gcc -D_G_IN_X -c -g -O -pthread -Wall ../dist/source/frbflib/frbffunc.c
gcc -c -g -O -pthread -Wall ../dist/source/frbflib/frbffont.c
gcc -D_G_IN_X -c -g -O -pthread -Wall ../dist/source/frbflib/frbflib.c
gcc -o experixIG *.o -L /usr/local/lib \
-lpthread -lm -lreadline -lcurses -lrt -lusb -lcap -lv4l2
sudo setcap cap_sys_resource,cap_sys_rawio,cap_dac_override=p experixIG
Help files (in the experix/dist/help directory and a few in other places)
use ANSI color escape sequences. View these by using 'cat filename' or
'less -R filename'. For editing them you will want the extended nano
editor. This is based on nano-1.2.5, and if that is no longer available
from the nano project, contact the experix maintainer for a copy. The
changed files for nano, and details and instruactions for it, are in
experix_r???/xnano.tgz2 (older versions are called nano-wbm.tgz2).
----------------------- Updating an installation ----------------------
The recommended way is to save any of your own work in the dist/ tree that
you want to keep, then delete the whole dist/ tree and all objects in the
bin directory, and go through the installation steps listed above.
---------------------------- General stuff ----------------------------
My main building/testing platforms are a ThinkPad X60 running Trisquel
3.13.0-51-generic #84+7.0trisquel2 SMP), and a Raspberry Pi (Linux
raspberrypi 3.6.11+ #538 PREEMPT) I am also using a Toshiba Satellite with
a Fedora Core 16 (kernel 3.1.0-7.fc16.i686.PAE), a Dell Latitude with a
Fedora Core 6 (kernel 2.6.18), a Compaq Presario with a Fedora Core 17
(kernel 3.3.4), and other systems from time to time. For details and
installation help, contact me.
My preferred editor is GNU nano with my "embedded highlighting" extension,
and I have used that in the help system. Other editors can be used, but the
help files will be difficult to read if the highlighting escape sequences
are printed out rather than interpreted. The source files for the extended
nano (xnano) are available from the same archive website that hosts experix.
If the source files seem to lack comments, especially discussion of
functions and variables, look in help/keywords.index and the other keywords
files that it lists. Also see source/structs.h.
Installation is not automated by a makefile. As long as only one OS is
supported, the extra burden of maintaining a makefile does not seem to be
justified. More notes on installation are found in the file 'install' in
the book section of the archive. The authoritative up-to-date source on
program building is near the end of help/in.experix.hlp.
-------------------------- System setup stuff --------------------------
See files in dist/hardware for notes on system setup on a few different
systems. Usually a new system will need installation of a few libraries
and some adjustements in the /etc tree.
The present version of frbfserv assumes that a single line of print is
being used for the command prompt and input, so readline should be in
scrolling mode, i.e. the statements
set horizontal-scroll-mode on
print-completions-horizontally ON
should be in the file that is indicated by the environment variable
INPUTRC, or the file ~/.inputrc if there is no such environment variable.
Also, due to the partial implementation of console codes in frbfserv, and
unresolved problems with readline, there may be confusing results when
scrolling a long input line and especially when using <CTRL-R> to recall a
previous command (but a recent bug fix has probably corrected this). The
readline "redraw-current-line" command can be used in this situation.
Readline docs don't mention a key binding for that, so it is useful to put
one in inputrc, for example this to use control-F:
\C-F: redraw-current-line
The double-? help requests attempt to exec xnano in another virtual terminal.
This requires permission on the /dev/tty files that are involved. This is
described better in book/install, but the main point is that root must do a
series of commands like
chmod a+rw /dev/tty7
-------------------------- Trying the program --------------------------
Build experix and frbfserv as described above, then cd to the experix/bin
directory and use one of these commands to start the program (see the help
file dist/help/gh.experix.hlp for details on program starting arguments;
access this from experix by typing ?? ) Here, "experix" means either
"experixXG" or "experixIG". (People who worry about wear and tear on the SD
card of the Raspberry Pi might add the -q option to suppress the log files.)
./experix -g- (text mode, without running frbfserv)
./experix (text mode)
./experix -g# where # is a digit, starts in graphics mode with
screen setup as defined by the file screen#
(at this point, # could be 0, 1 or 2, and screen0
is a link to screen1 or screen2) **NOTE** This will
not work in an xterm. Use a text terminal, not an
X graphics screen.
./experix -h (show a help message and exit)
./experix -p run in headless mode: see headless.hlp about this.
There are notes in book/install on use of svgalib, but we are not really
supporting that any more. We use a framebuffer-based partial imitation of
svgalib, sources in in source/frbflib/frbflib.c.
Debugging experix requires giving these commands to gdb:
break breakfunc
handle SIGTTIN SIGTTOU SIGWINCH SIGCHLD SIGUSR1 SIGUSR2 nostop noprint pass
handle SIGALRM SIGINT SIGQUIT SIGTERM SIGIO SIGABRT nostop noprint pass
handle SIGUNUSED nostop noprint pass
This is most conveniently done by placing these commands in experix/bin/gdbc
and then using
gdb experix -x gdbc
to start.
A running experixXG session in graphics mode can be intercepted by using
gdb experixXG <pid> -x gdbc
(probably needs 'sudo' on more modern GNU-linux distributions)
in another terminal, where <pid> is the
experixXG process ID. The breakpoint at "breakfunc" is reached by using the
experix command "debug".
This method does not work well with experixIG because stopping experixIG
also stops the graphics server (because it is just a function in the
experixIG process), and then the terminal switching signals do not work.
You can do this:
gdb experixIG -x gdbcIG
where gdbcIG has the additional line
handle SIGSYS SIGPROF nostop noprint pass
then set the startup arguments and run it. Unfortunately, every time you
hit a breakpoint, the graphics screen gets overwritten by the underlying
text. But the big frustration is that while experix is stopped you cannot
switch to other terminals to edit files and so on.
----------------------- Author/Maintainer contact ---------------------
William McConnaughey 314-362-3345
Biochemistry Dept., Campus Box 8231
Washington University
660 So. Euclid Av.
St. Louis MO 63110
mcconnau@biochem.wustl.edu
------------------------ the experix directories -----------------------
This is the latest experix/dist tree (tree -afF):
.
|-- checkfile*
|-- COPYING
|-- drivers/
| |-- drivers/README
| |-- drivers/usb/
| | |-- drivers/usb/get_usb_dev_file.c
| | `-- drivers/usb/poker.xpx*
| `-- drivers/userspace/
| |-- drivers/userspace/fifo1.c
| |-- drivers/userspace/fifo2.c
| `-- drivers/userspace/statfiles.c
|-- experix_icon.gif
|-- experix_icon.ppm.gz
|-- experix_icon.xpx*
|-- experix_logo.gif
|-- experix_logo.ppm.gz
|-- hardware/
| |-- hardware/iron_setup
| |-- hardware/pi2_setup
| |-- hardware/tpad_setup
| `-- hardware/XO
|-- help/
| |-- help/abin.hlp
| |-- help/amoeba.hlp
| |-- help/app/
| | |-- help/app/poker_card.hlp
| | `-- help/app/poker_usb.hlp
| |-- help/capabilities
| |-- help/compile_warn
| |-- help/COPYING -> .COPYING
| |-- help/def.hlp
| |-- help/demolist
| |-- help/errors
| |-- help/exec.hlp
| |-- help/file.hlp
| |-- help/fourier.hlp
| |-- help/frbfplot.hlp
| |-- help/gh.experix.hlp
| |-- help/globalints.hlp
| |-- help/graph_ae.hlp
| |-- help/graph.hlp
| |-- help/gsmin.hlp
| |-- help/headless.hlp
| |-- help/histogram.hlp
| |-- help/in.experix.hlp
| |-- help/interp.hlp
| |-- help/issues
| |-- help/keywords.ac
| |-- help/keywords.dh
| |-- help/keywords.index
| |-- help/keywords.ir
| |-- help/keywords.ss
| |-- help/keywords.tz
| |-- help/mandel.hlp
| |-- help/miscellaneous.hlp
| |-- help/mod_nano.hlp
| |-- help/nocolor.c
| |-- help/Pfit.hlp
| |-- help/print.hlp
| |-- help/segfunc.hlp
| |-- help/sign_on.message
| |-- help/sock.hlp
| |-- help/sort.hlp
| |-- help/ss.arblocks.hlp
| |-- help/ss.arelemnt.hlp
| |-- help/ss.binaryop.hlp
| |-- help/ss.cmndtail.hlp
| |-- help/ss.comfiles.hlp
| |-- help/ss.comjumps.hlp
| |-- help/ss.comquote.hlp
| |-- help/ss.constant.hlp
| |-- help/ss.defercom.hlp
| |-- help/ss.localvar.hlp
| |-- help/ss.logicops.hlp
| |-- help/ss.misclops.hlp
| |-- help/ss.nouseyet.hlp
| |-- help/ss.numerals.hlp
| |-- help/ss.stackman.hlp
| |-- help/ss.statsops.hlp
| |-- help/ss.threads.hlp
| |-- help/ss.tilde.hlp
| |-- help/ss.unaryops.hlp
| |-- help/ss.valuecmp.hlp
| |-- help/structs.doc
| |-- help/thread.hlp
| |-- help/time.hlp
| |-- help/tthread_mon.hlp
| |-- help/tu.experix.hlp
| |-- help/usb.hlp
| |-- help/xnanorc
| `-- help/xpxdif
|-- into_bin/
| |-- into_bin/gdbc
| |-- into_bin/gdbcIG
| `-- into_bin/readme
|-- maintainance.xpx
|-- maybe_u_need/
| |-- maybe_u_need/bitops.h
| `-- maybe_u_need/config.h
|-- mm_dump_decode.c
|-- obsolete/
| |-- obsolete/mapper.c
| |-- obsolete/readme
| `-- obsolete/xpxdtest.c
|-- readme_r15
|-- source/
| |-- source/amoeba.c
| |-- source/amoeba.h
| |-- source/array2.c
| |-- source/array.c
| |-- source/command1.c
| |-- source/command.c
| |-- source/defines.h
| |-- source/display.c
| |-- source/errors.c
| |-- source/errors.h
| |-- source/files.c
| |-- source/frbflib/
| | |-- source/frbflib/altcolortest
| | |-- source/frbflib/altcolorwrite
| | |-- source/frbflib/colors.00
| | |-- source/frbflib/colors.xpx
| | |-- source/frbflib/experix_head.c
| | |-- source/frbflib/exp_frbf.c
| | |-- source/frbflib/exp_frbf_G_IN_X.c
| | |-- source/frbflib/filter0.c
| | |-- source/frbflib/font11.1
| | |-- source/frbflib/font11.1bak
| | |-- source/frbflib/font16.0
| | |-- source/frbflib/font16.0bak
| | |-- source/frbflib/font16c8
| | |-- source/frbflib/font16c8bak
| | |-- source/frbflib/font18.1
| | |-- source/frbflib/font18.1bak
| | |-- source/frbflib/font18.2
| | |-- source/frbflib/font18.2bak
| | |-- source/frbflib/font24.0
| | |-- source/frbflib/font24.0bak
| | |-- source/frbflib/font24.1
| | |-- source/frbflib/font24.1bak
| | |-- source/frbflib/font24.2
| | |-- source/frbflib/font24.2bak
| | |-- source/frbflib/font24.3
| | |-- source/frbflib/font24.3bak
| | |-- source/frbflib/font24c12
| | |-- source/frbflib/font24c12bak
| | |-- source/frbflib/font7.1
| | |-- source/frbflib/font7.1bak
| | |-- source/frbflib/frbfdefs.h
| | |-- source/frbflib/frbffont.c
| | |-- source/frbflib/frbffunc.c
| | |-- source/frbflib/frbf.h
| | |-- source/frbflib/frbflib.c
| | |-- source/frbflib/frbfserv.c
| | |-- source/frbflib/frbfserv_G_IN_X.c
| | |-- source/frbflib/frbfserv_valid_modes
| | |-- source/frbflib/notes
| | |-- source/frbflib/read_stdopipe.c
| | |-- source/frbflib/rltest.c
| | |-- source/frbflib/screen0 -> screen1
| | |-- source/frbflib/screen1
| | |-- source/frbflib/screen1.1280x1024
| | |-- source/frbflib/screen2
| | |-- source/frbflib/screen2.1280x1024
| | |-- source/frbflib/screen.hlp
| | |-- source/frbflib/spectra.xpx
| | |-- source/frbflib/ssfgen.c
| | |-- source/frbflib/stdcolortest
| | `-- source/frbflib/stdcolorwrite
| |-- source/functions.h
| |-- source/globals.c
| |-- source/graph.c
| |-- source/graphx.c
| |-- source/help.c
| |-- source/math.c
| |-- source/math.cx
| |-- source/mm.c
| |-- source/numbers.c
| |-- source/opclist.h
| |-- source/sockets.c
| |-- source/stack.c
| |-- source/structs.h
| |-- source/threads.c
| |-- source/try1.c
| |-- source/updown.c
| |-- source/usb.c
| |-- source/vars.c
| |-- source/xpx_local/
| | |-- source/xpx_local/fpr.c
| | |-- source/xpx_local/fprs.hlp
| | |-- source/xpx_local/fpr.xpx
| | |-- source/xpx_local/gpioRPi.c
| | |-- source/xpx_local/gpioRPi_demos/
| | | |-- source/xpx_local/gpioRPi_demos/blink12.xpx
| | | `-- source/xpx_local/gpioRPi_demos/gertbot.xpx
| | |-- source/xpx_local/gpioRPi.hlp
| | |-- source/xpx_local/ppm.hlp
| | |-- source/xpx_local/stretcher.c
| | |-- source/xpx_local/stretcher.hlp
| | |-- source/xpx_local/vgrab.c
| | |-- source/xpx_local/webcam.c
| | |-- source/xpx_local/webcam.hlp
| | |-- source/xpx_local/zdhist.c
| | `-- source/xpx_local/zdhist.xpx
| `-- source/xpx_local.h
`-- xpx/
|-- xpx/arraytrix.xpx
|-- xpx/bm_ts.xpx
|-- xpx/bm.xpx
|-- xpx/calculus.xpx*
|-- xpx/colorsets.xpx
|-- xpx/daq.xpx
|-- xpx/example1.xpx*
|-- xpx/example2.xpx*
|-- xpx/funcshell.xpx
|-- xpx/graftrix.xpx*
|-- xpx/gtest.xpx
|-- xpx/ideas.xpx
|-- xpx/math1.xpx
|-- xpx/mathtrix.xpx
|-- xpx/rgb.txt
`-- xpx/threadwait.xpx
The book directory:
amoeba
arrays
booktodo
cellpokercartoon.odg
circuit_DAS16.pscan
circuit_PCM308.gz
circuit_PCM308.pscan
circuit_poke.gz
command
compare
da_demo.xpx
debugging
errno.list
exec
experix.manual
files
graphs
help
install
LICENSE
localvars
makedata.c
mandel
mathops
miscellaneous
numbers
performance
pictures
poker
poker.pscan
ptune
simul1.pscan
specialfunctions
stack
starting
strings
svgalibnotes
time
userspace_daq
variables
writing_code
Contents of xnano.tgz2 with size, date and cksum:
color.c 4997 Feb 21 2014 3097594171
config.h 5611 Jun 30 2014 3734121952
files.c 87989 Dec 9 2015 3570562122
global.c 32630 Feb 21 2014 2947916656
nano.c 105194 Dec 9 2015 1602938137
nano.h 14665 Jun 30 2014 3030708626
nanorc.wbm 14250 Feb 21 2014 643261434
proto.h 15803 Dec 9 2015 1562615013
rcfile.c 17226 Jun 30 2014 3196946926
readme-nano-wbm 15618 Dec 9 2015 3533827708
search.c 28762 Feb 21 2014 663364382
winio.c 56690 Jun 30 2014 3274277486
xnanorc.wbm 14253 Jul 1 2014 3678073743
manifest (this list) Dec 29 2015
------------------------------------------------------------------------
changes since experix_release_r15 15 APR 2015:
------------------------------------------------------------------------
------------------------ experix policy changes ------------------------
experix stderr is redirected to the log file so that error messages will be
preserved and they will not mess up the graphics screen. When experix is
started with -q (suppress the log file), /dev/null is opened in place of a log
file. (updown.c try1.c mm.c experix_head.c frbfserv_G_IN_X.c)
-------------------------- experix api changes -------------------------
LZMA data compression/decompression on data objects and files is available
thru file/z and file/Z (files.c file.hlp headless.hlp in.experix.hlp
functions.h mm.c keywords.index keywords.ac)
LZMA data compression can be applied in the file/x command by putting a
"z;" prefix on the remote filepath. (sockets.c experix_head.c headless.hlp)
New program start options:
-w=string sets the path prefix for screen, help, xpx files
-b=filepath sets the path to the graphics server and other binary stuff
(graph.c frbfplot.hlp defines.h globals.c functions.h updown.c exp_frbf.c
exp_frbf_G_IN_X.c experix_head.c )
New operator: ?&&w sets the path prefix (same as -w startup option)
The fblg> commands (changing display mode and layout) have been revised:
fblg>g### (### is alphanumeric string up to 32 char) changes the screen
file path to experix/dist/source/frbflib/screen### and goes to graphics mode
fblg>g=path and "path" fblg>g= set the screen file path to that given
(limit 128 char) and go to graphics mode
(see changed file list under "New program start options:" above)
The help filepath operators ?&&0 ?&&1 ?&&2 are removed. Help filepaths are
now formed by concatenating the general prefix (set by -w startup option)
plus one of the four help path prefixes plus the help filename.
(in.experix.hlp def.hlp gh.experix.hlp globals.c help.c updown.c book/help)
Default path to a command file is now made by concatenating the general
prefix (set by -w startup option) with "xpx/" and the filename. (command.c
The '??' help requests, when the help message begins with '&0', '&1', '&2'
or '&3', open an editing session with the working directory set to
"<pre>help/", "<pre>help/app/", "<pre>source/xpx_local/", or "<pre>xpx/"
respectively, where <pre> is the string in mainstartup.prefix (defaults to
"../dist" and can be set by a commandline argument and by the ?&&w operator).
(But note this does not happen unless the last option letter in the help
editor path/argument string, set by the ?&&? operator, is 'o' or 'd').
To take advantage of this, numerous help files have references to other help
files in the same directory, giving only the name of the file, which can
be used in an editor file-load command, since the working directory is
already correct.
(help.c globals.c zdhist.c gh.experix.hlp and most of the help and xpx files)
New command: n fblg:x sets the number of screen columns: for n<0, it calls
rl_set_screen_size; for n>0 it performs a TIOCSWINSZ ioctl (but see notes
under 'issues) (graph.c frbfplot.hlp)
------------------------- created file changes ------------------------
frbfserv 'M' command does not make the /tmp/frbfservPPPPPPPPPPMnnnn return
file, except for the special cases described in the comment there. Failure
will have to be deduced from display behavior. (We were not using the return
file except for checking it in exp_frbf.c; and scrambled fifo data, such as
when the 6-thread demo in thread.hlp runs to fast, resulted in creating a lot
of these files.)
(frbfserv.c exp_frbf.c)
------------------------------ bug fixes -------------------------------
stack.c: 'struct' got left off of Stack *sptr in StackPush function head
previously reported non-function of '??' help request on RPi has been fixed
by chmod-ing the tty devices (hardware/pi2_setup, help/issues)
The help-editing system (help sessions opened by '??' requests) has been
improved so that when the terminal that it tries turns out to be in use (or
openvt fails for some reason), it tries other terminals until it finds one it
can use or exhausts all possibilities. When successful, it shows the terminal
number and help filename as a help-line display. Multiple experix sessions and
an X session can be used together without getting confused over help terminal
availability.
(help.c gh.experix.hlp)
--------------------- supported interface matters ----------------------
A Raspberry Pi B model 2 has been educated in the ways of experix, and the
setup and software installation is detailed in hardware/pi2_setup.
---------------------------- driver issues -----------------------------
help file poker_card.hlp (for running cell poker with PCMCIA card via xpxdif
interface) is moved into experix/xpxdif
---------------------------- non-api changes ---------------------------
There is a realloC function to go along with malloC (mm.c keywords.index)
New functions bbcompress and bbdecompress provide the LZMA algorithm.
(files.c structs.h keywords.index keywords.ac)
Variables related to program startup options are reorganized into a struct
defined in structs.h (structs.h defines.h globals.c command.c graph.c
help.c try1.c updown.c exp_frbf.c exp_frbf_G_IN_X.c)
Screen mode setup, including graphics server process exec and related
fifo, etc. is all reorganized. Several functions and variables are
eliminated or consolidated into screen_setup.
A new font has been made for use on the command input line, in order to
crowd the characters into the terminal width so the line scrolls properly.
The new font (font24.3) is number 9 and the one that was there (font24.0)
is moved to number 10. VDRs for command line (#0), help (#26) and info
(#27) have been changed to use font 10.
(font24.3bak font24.3 frbffont.c frbfdefs.h screen*)
Font numbers for 'help' and 'info' have been changed from 9 to 10 in all
the screen setup files.
In text mode, experix output was written to STDOUT_FILENO. This is changed to
gf_STDOUT, which is the dup of STDOUT_FILENO made in commandinit.
(try1.c)
------------------------------ xpx changes -----------------------------
New file xpx/rgb.txt demonstrates setting the palette
Removed extra ";;+" and added discussion, example for confrac in math1.xpx
------------------------- documentation changes ------------------------
some updating of help/demolist
new file book/localvars discusses local variables and local pointers
improved explanations (I hope) in ss.localvar.hlp
book/performance has been updated with data for raspberry pi 2.
Significant speed increases.
fixed comment for case 'O' in frbfserv.c, in order to describe better what
it does
fixed and improved some comments in font files and auxiliary programs in
the frbflib directory
----------------------------- demo changes -----------------------------
source/frbflib/frbfdemo.c has been moved to testfrbf.c, and updated.
----------------------------- trivial fixes ----------------------------
updown.c: removed unused 'extern help0path...' decl
--------------------------------- xnano --------------------------------
New commandline option '-d' or '--basedir' is like '-o' but it does not
restrict file loads and writeouts to the given directory.
((xnano files) proto.c nano.c files.c readme-nano-wbm (experix) mod-nano.hlp)
-------------------------------- issues --------------------------------
There was a hasty, not well thought out attempt at allowing for on-the-fly
change between graphics and text modes and different graphics layouts. This
all needs to be re-designed. Switching beween 'local' and 'headless' modes
could be useful, and local display while in headless mode could be useful.
On my trisquel thinkpad, experixXG -p gives the message
Error opening file for reading: Permission denied
and then works normally. The message has been found to come before the main
function begins execution and its origin is not known.
Often there is a spurious character, usually '*', printed after the prompt
in graphics mode. When running the multi-graph demo in thread.hlp, many
different spurious characters appeared on the prompt line. Origin of this
has not been found. It's a nuisance, but it doesn't affect what is "really"
on the command line.
In threads.c, warnings of the type 'assignment discards volatile' and
'passing arg discards volatile' are eliminated by removing 'volatile' from
the local variables involved. This should be valid since the code is in
sections where the relevant mutex is locked.
The command input line scrolls when it has number of characters = terminal
width. In graphic mode the displayed length of a line will exceed terminal
width if the average character width is too great. The new command
"n fblg:x" was introduced to deal with this.
For n < 0 it calls rl_set_screen_size to change readline's idea of screen
width. This is the recommended way to adjust scrolling on the command input
line. For n > 0 it performs TIOCSWINSZ ioctl. This does not fix the problem
because readline continues to behave according to the original terminal width,
but if you then quit and restart experix, the new session's command line
scrolls where you tried to set it in the previous session. And changing the
terminal width is not really a good solution because it affects everything
in that terminal.
Problems when a command line is recalled by the <ctrl-R> method:
(thinkpad/trisquel system)
Using the left- or right-arrow key makes the displayed line disappear, but
characters can still be inserted properly. Work-around: Any time after
recalling the desired line, type <ctrl-L>. Then edit as desired. Note: this
issue is the same in a bash shell as in experix, except that in the shell,
<ctrl-L> erases the whole screen.
----------------------------- trivial fixes ----------------------------
updown.c: removed some stray no-effect lines about command prompt handling
globals.c: Somehow this line:
char comprompt1[] = "^[[7mexperix> ^[[0m";
compiled as I wanted, with ^[ turned into the ESC character. I could not
reproduce this in a test program, so I have replaced ^[ with \e .
removed 'volatile' from local var. toprec in signal_thread_r (threads.c):
it is believed to be meaningless