|
C code
Here are some C programs and modules for you to download.
|
alloc.c
|
a module to make debugging malloc, calloc and
free simpler. These 3 calls cause much grief in C programs,
especially for the novice, because of overwriting the allocated size
and freeing things twice. This module should help with debugging these
problems.
|
|
child.c
|
a module to make handling child processes under Unix much easier.
|
|
default.c
|
a module to access a defaults file, similar in construction to those used
in X-Windows.
|
|
dmpf.c
|
a program that dumps any type of file in both hex and ASCII.
|
|
timer.c
|
a module to allow multiple timers to coexist in a single Unix program.
The code utilises a single realtime itimer to do this.
|
Java
- classes.zip
- This is a Zip file containing all the class files (and their
sources) that have been used in this site. In the file are
a bunch of others that are not used here, but I hope you find
useful. I have used them elsewhere. Included are:
- treeView
- tabPanel
- a whole bunch of AWT components
- some utility classes
- a progress / meter bar
- the applets shown on the applets
page
Perl
|
code_lines
|
a script that counts real lines of C code, that is, ones that
aren't blank or comments. Gives some interesting results.
|
|
fusr
|
this is one that you system administrators might find useful. I wrote
it to help me quickly get information out of the passwd and
printcap files. Works well on SunOS but might require some
modifications elsewhere.
|
|
show_jobs
|
a handy little script to help digest the E-Mail job lists delivered by
the JobServe service. It works
interactively allowning you to apply filtering and save the jobs of
interest to a file.
|
|
uujoin
|
one of my first bits of perl. It attempts to decode a UU encoded file,
handling multi-parts transparently, saving the contents to a file.
|
|
build_file.pl
|
a very useful bit of Perl if your ISP does not support server-side include.
Allows you to write template Web pages and have them pre-expanded on your
your machine prior to uploading them in the normal manner. See the feature
page here.
|
|
Persister.pm
|
it is often useful to be able to see the structure of a complex Perl variable
that is made up of hashes and arrays and so on. This is a handy static module
to save, or presist, the contents of a variable, simple or complex in
structure, to a file. The file can either be in Perl eval format
or in XML. See the details here.
|
JavaScript
|
Floating Layers
|
a JavaScript file that defines an object interface to help with
floating divs on a page.
|
MQSeries
|
config.zip
|
This zip file contains lex and yacc module code to enable the following
example programs to read an ASCII file that contains configuration
information and have it presented as a global structure.
|
|
write_to_q.c
|
This program reads an ASCII file, line by line, turning each line into an
MQSeries message. Each message is put onto the same queue. It demonstrates
how to connect to a queue manager, open a queue, and put messages on a
queue using the MQPUT call, and collect any replies generated. It uses the
synchronous reply approach for simplicity.
|
|
read_from_q.c
|
This program reads messages from a queue and optionally prints the contents.
It can also be used to time how long it takes to read a given number of
messages from a queue. It demonstrates the configuration file, the
MQRC_NO_MSG_AVAILABLE constant, and the use of the MsgId and CorrelId message
descriptor fields.
|
|
read_from_oracle.c
|
This program periodically reads a hypothetical Oracle table and transfers
the contents, row by row, as individual messages, to a queue. It demonstrates
the configuration file, how to put messages on a queue, and how to mix
embedded SQL and MQI calls in the same program.
|
|
write_to_oracle.c
|
This program is started by a trigger manager. It gets messages from a queue
and inserts them into a hypothetical Oracle table, each message being
representing as a row in the table. It demonstrates the configuration file,
the MQSET call to disable and re-enable triggering, the MQCMIT and MQBACK
calls for unit of work control, how to wait for messages, and how to mix
embedded SQL and MQI calls in the same program.
|
|