view arch/ebcdic.h @ 12:40af39d064fa

Refactor the arch code Note: the code, as it is now, does not run even though it compiles
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Thu, 07 Apr 2011 22:07:20 -0400
parents
children
line wrap: on
line source

#ifndef __EBCDIC_H
#define __EBCDIC_H

extern u8 ascii2ebcdic_table[256];
extern u8 ebcdic2ascii_table[256];

extern void __translate(u8 *buf, int len, const u8 *table);

#define ascii2ebcdic(buf, len)	\
			__translate((buf), (len), ascii2ebcdic_table)
#define ebcdic2ascii(buf, len)  \
			__translate((buf), (len), ebcdic2ascii_table)

#endif