lekernel.net - scrapbook » frontpage ~ forums ~ about

electronics

software

ti89 projects

inside electronics

chemistry !

lekernel.net - scrapbook

Simple calculus library

This piece of code can parse a math expression and give a tree-based representation of it. Variables and user functions (calls to C code) are supported.
It can of course evaluate the expression, but also compile a function directly callable from C code that computes it (using the 8087 FPU instruction set) and put out a pretty-printed image of the expression (using libgd).

Excerpt from test.c in the archive:
node = calctree_parse("addtest(sin(3.14*time)+3.0, 2, 7.2)");

im = calctree_prettyprint(node);
gdImagePng(im, fd);

f = calctree_compile_x86(node, &identifiers, &size);
for(x=0.0;x<10.0;x++)
   printf("%f\t%f\n", f(), calctree_eval(node, &identifiers));

> Download

Laptop (Gericom Hummer 2430) shortcut keys under FreeBSD

description

This program was obtained by trial and error and analysing the Winshit drivers shipped with my laptop.
It was made for the Gericom Hummer 2430 but it may work with other laptops (try it). I developed it under FreeBSD 5.2.1-RELEASE ; it should work under other BSD flavors or even Linux, perhaps with slight modifications. This software is released under the GNU GPL.
> Download

installation instructions

These instructions are also in the README file which comes along with the archive.
  1. Type make to compile. This should produce the binary qkeysd.
  2. Move it into a convenient place i.e. /usr/local/bin
  3. Set it setuid root. This shouldn't represent a security risk as the program will drop root privileges as soon as it has obtained the I/O port permissions.
  4. Run 'qkeysd -showcodes' as normal user. Press some shortcut keys : the program should display the associated codes. Press Ctrl-C to stop the program.
  5. Use a text editor to create a .qkeys file in your home directory which will contain the shell commands you want to associate with the shortcut keys. Use a line per key, according to the following format :
    [key code]:[shell command]
    The key code is what is displayed by 'qkeysd -showcodes' when you press the key. Don't forget to add a '&' at the end of every shell command, otherwise the program will stop processing keys until the command terminates (unless that's what you want). You must also add a blank line at the end of the configuration file. Have a look at the qkeys.sample file.
  6. Run 'qkeysd' (as normal user). The shortcut keys should work :-) Make it start automatically when you login, for example add a link in ~/.kde/Autostart.

Cutslayer

Small program to merge files split by Cutkiller under Unix.
> Download

Firmwareagent

description

This software is obsolete and no longer supported. The FreeBSD project is developing a more complete system.
Firmwareagent allows FreeBSD device drivers to easily load firmware images, instead of including them in their code. For the moment, only loading from the filesystem (from the /boot/firmware directory) is supported.
Firmwareagent was used by some early p54u versions.

> Download version 0.2

installation instructions

Just type "make" and "make install" (as root). This will build and install the "firmwareagent.ko" module, as well as the "sys/firmware.h" include file.