/* Copyright 1997 Acorn Computers Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "encpriv.h" #include "koi8r.h" #include "acorn.h" /* * Routines for encoding Macintosh (Mac Roman) * Number: 5001 * Names: x-acorn-latin1 */ static UCS2 *acorn_latin1_table; static int acorn_latin1_reset(Encoding *e, int for_encoding) { EightBit_Encoding *ee = (EightBit_Encoding *) e; if (!acorn_latin1_table) acorn_latin1_table = encoding_load_map_file("Acorn.Latin1"); ee->table = acorn_latin1_table; return ee->table != NULL; } EncodingPriv enc_acorn_latin1 = { eightbit_read, acorn_latin1_reset, sizeof(EightBit_Encoding) - sizeof(EncodingPriv), eightbit_delete, 0, eightbit_write };