WSTS Software Utilities

The software listed below is free and downloadable. No warranty is implied or assumed for use of any of this software. Any of the software may be re-distributed freely, provided that it is attributed to Wessex Scientific and Technical Services Ltd and this disclaimer is included.

Unless stated otherwise, Linux executables are for Intel PCs running under ELF.

Input file utilities

Expand input file, removing comments: expandec

Input data for many scientific programs can be kept most conveniently in data files. In some circumstances, it can be helpful to keep certain types of data separate, and copy them into the appropriate places in the input as a program is run. (Our continuum mechanics and atomic programs can be used in this way, keeping e.g. material and geometrical data in separate files from the control data.) Many programs (including many of our own) do not attempt to filter out comments included to make the data more readable.

expandec expands inline files and removes comments. It operates on the standard input stream, discarding lines or the ends of lines containing the comment character #, and expanding inline files, denoted by ++ at the start of a line followed by the path reference of the file to be inlined. The program is recursive: inlined files may contain other file names to be expanded, and comments in inlined files are also removed.

Example of use (command line, e.g. DOS or Unix)

   expandec < master_input_file > temporary_complete_input_file
or
   expandec < master_input_file | program_using_input_file > output_file
On operating systems without a command-line interface (Mac), running the program should pop up a dialogue box allowing the file names to be specified or chosen.

Example of input data:

# a comment
data more_data yet_more_data # an end-of-line comment

# a file to be inlined, name below:
++file_to_insert
++another_file_to_insert

even_more_data

Programsource codeDOS/WindowsLinuxPower Mac
expandec expandec.c expandec.exe expandec.x expandec

File format conversion

These programs change betweem the formats used for text files by different operating systems. On operating systems with a command-line interface (Unix, DOS), they should be used like:
   a2b < a_file > b_file
On operating systems without a command-line interface (Mac), running the program should pop up a dialogue box allowing the file names to be specified or chosen.

FromTosource codeDOS/WindowsLinuxPower Mac
DOSUnix dos2unix.c dos2unix.exe dos2unix.x dos2unix
UnixDOS unix2dos.c unix2dos.exe unix2dos.x unix2dos
MS-WindowsUnix win2unix.c win2unix.exe win2unix.x win2unix
MacUnix mac2unix.c mac2unix.exe mac2unix.x mac2unix
UnixMac unix2mac.c unix2mac.exe unix2mac.x unix2mac