#! /bin/sh

# generate from ISO 8859-1 to Network IBM Codepage 850
transtab -c ../tables/iso8859.1 ../tables/cp850.net isox850
compile isox850.c

# generate from Network IBM Codepage 850 to ISO 8859-1
transtab -c ../tables/cp850.net ../tables/iso8859.1 850xiso
compile 850xiso.c

# make a working copy of the binary data (0x00 .. 0xFF)
cp binary.dat binary.iso

# convert back and forth
isox850 binary.iso binary.850
850xiso binary.850 binary.iso

# compare the result with the original data
echo comparing data...
cmp binary.dat binary.iso

# delete temporarily created data files
rm binary.iso
rm binary.850

# delete temporarily created program files
rm isox850*
rm 850xiso*
