Other micro-computer charsets
-* Apple-Mac:: Apple's Macintosh code
+* Mac OS:: Apple's Macintosh code
* AtariST:: Atari ST code
Various other charsets
@chapter Other micro-computer charsets
@menu
-* Apple-Mac:: Apple's Macintosh code
+* Mac OS:: Apple's Macintosh code
* AtariST:: Atari ST code
@end menu
-@node Apple-Mac, AtariST, Micros, Micros
+@node Mac OS, AtariST, Micros, Micros
@section Apple's Macintosh code
-@tindex Apple-Mac
-@cindex Macintosh charset
-This charset is available in Recode under the name @code{Apple-Mac}.
-The shortest way of specifying it in Recode is @code{ap}.
-
-The charset is aimed towards a Macintosh micro-computer from Apple.
-This is an eight bit code. The file is the data fork only. This charset
-is fairly old in Recode, its tables were produced a long while ago
-by mere inspection of a printed chart of the Macintosh codes and glyph.
-
-@cindex CR surface, in Macintosh charsets
-It has @code{CR} as its implied surface. This means that, if the original
-end of lines have to be preserved while going out of @code{Apple-Mac}, they
-should currently be added back through the usage of a surface on the other
-charset, or better, just never removed. Here are examples for both cases:
-
-@example
-recode ap..l2/cr < @var{input} > @var{output}
-recode ap/..l2 < @var{input} > @var{output}
-@end example
-
-@w{RFC 1345} brings into Recode 2 other Macintosh charsets. You can
+@w{RFC 1345} brings 2 Macintosh charsets. You can
discover them by using @code{grep} over the output of @samp{recode -l}:
@example
@tindex mac
@tindex macce
Charsets @code{macintosh} and @code{macintosh_ce}, as well as their aliases
-@code{mac} and @code{macce} also have @code{CR} as their implied surface.
-
-There are a few discrepancies between the @code{Apple-Mac} charset and
-the very similar @w{RFC 1345} charset @code{macintosh}, which have not been
-analysed yet, so the charsets are being kept separate for now. This might
-change in the future, and the @code{Apple-Mac} charset might disappear.
-Wizards would be interested in comparing the output of these two commands:
-
-@example
-recode -vh Apple-Mac..Latin-1
-recode -vh macintosh..Latin-1
-@end example
-
-@noindent
-The first command use the charset prior to @w{RFC 1345} introduction.
-Both methods give different recodings. These differences are annoying,
-the fuzziness will have to be explained and settle down one day.
+@code{mac} and @code{macce} have @code{CR} as their implied surface.
-@node AtariST, , Apple-Mac, Micros
+@node AtariST, , Mac OS, Micros
@section Atari ST code
@tindex AtariST
+++ /dev/null
-/* Conversion of files between different charsets and surfaces.
- Copyright © 1990, 93, 97, 98, 99, 00 Free Software Foundation, Inc.
- Contributed by François Pinard <pinard@iro.umontreal.ca>, 1993.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License
- as published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the Recode Library; see the file `COPYING.LIB'.
- If not, write to the Free Software Foundation, Inc., 59 Temple Place -
- Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "common.h"
-#include "decsteps.h"
-
-/* Previously, the LF surface was built-in. It is now handled through a
- separate, optional step. An optimisation might use a flag to trigger old
- built-in code. For now, depend on a variable preset to false. */
-static const bool auto_cr = false;
-
-/* Data for Apple Macintosh to ISO Latin-1 code conversions. */
-
-static struct recode_known_pair known_pairs[] =
- {
- { 13, 10}, /* (recoding end of lines for Unix) */
- /* The previous pair should be first, for being skippable. */
-
- {128, 196}, /* capital letter A diaeresis */
- {129, 197}, /* capital letter A with ring above */
- {130, 199}, /* capital letter C with cedilla */
- {131, 201}, /* capital letter E with acute accent */
- {132, 209}, /* capital letter N with tilde */
- {133, 214}, /* capital letter O with diaeresis */
- {134, 220}, /* capital letter U with diaeresis */
- {135, 225}, /* small letter a with acute accent */
- {136, 224}, /* small letter a with grave accent */
- {137, 226}, /* small letter a with circumflex accent */
- {138, 228}, /* small letter a with diaeresis */
- {139, 227}, /* small letter a with tilde */
- {140, 229}, /* small letter a with ring above */
- {141, 231}, /* small letter c with cedilla */
- {142, 233}, /* small letter e with acute accent */
- {143, 232}, /* small letter e with grave accent */
- {144, 234}, /* small letter e with circumflex accent */
- {145, 235}, /* small letter e with diaeresis */
- {146, 237}, /* small letter i with acute accent */
- {147, 236}, /* small letter i with grave accent */
- {148, 238}, /* small letter i with circumflex accent */
- {149, 239}, /* small letter i with diaeresis */
- {150, 241}, /* small letter n with tilde */
- {151, 243}, /* small letter o with acute accent */
- {152, 242}, /* small letter o with grave accent */
- {153, 244}, /* small letter o with circumflex accent */
- {154, 246}, /* small letter o with diaeresis */
- {155, 245}, /* small letter o with tilde */
- {156, 250}, /* small letter u with acute accent */
- {157, 249}, /* small letter u with grave accent */
- {158, 251}, /* small letter u with circumflex accent */
- {159, 252}, /* small letter u with diaeresis */
-
- {161, 176}, /* degree sign */
- {162, 162}, /* cent sign */
- {163, 163}, /* pound sign */
- {164, 167}, /* paragraph sign, section sign */
-
- {166, 182}, /* pilcrow sign */
- {167, 223}, /* small german letter sharp s */
- {168, 174}, /* registered trade mark sign */
- {169, 169}, /* copyright sign */
-
- {174, 198}, /* capital diphthong A with E */
- {175, 216}, /* capital letter O with oblique stroke */
-
- {177, 177}, /* plus-minus sign */
-
- {180, 165}, /* yen sign */
- {181, 181}, /* small greek letter mu, micro sign */
-
- {187, 170}, /* feminine ordinal indicator */
- {188, 186}, /* masculine ordinal indicator */
-
- {190, 230}, /* small diphthong a with e */
- {191, 248}, /* small letter o with oblique stroke */
- {192, 191}, /* inverted question mark */
- {193, 161}, /* inverted exclamation mark */
- {194, 172}, /* not sign */
-
- {199, 171}, /* left angle quotation mark */
- {200, 187}, /* right angle quotation mark */
-
- {203, 192}, /* capital letter A with grave accent */
- {204, 195}, /* capital letter A with tilde */
- {205, 213}, /* capital letter O with tilde */
-
- {214, 247}, /* division sign */
-
- {216, 255}, /* small letter y with diaeresis */
- {217, 221}, /* capital letter Y with acute accent */
-
- {229, 194}, /* capital letter A with circumflex accent */
- {230, 202}, /* capital letter E with circumflex accent */
- {231, 193}, /* capital letter A with acute accent */
- {232, 203}, /* capital letter E with diaeresis */
- {233, 200}, /* capital letter E with grave accent */
- {234, 205}, /* capital letter I with acute accent */
- {235, 206}, /* capital letter I with circumflex accent */
- {236, 207}, /* capital letter I with diaeresis */
- {237, 204}, /* capital letter I with grave accent */
- {238, 211}, /* capital letter O with acute accent */
- {239, 212}, /* capital letter O with circumflex accent */
-
- {241, 210}, /* capital letter O with grave accent */
- {242, 218}, /* capital letter U with acute accent */
- {243, 219}, /* capital letter U with circumflex accent */
- {244, 217}, /* capital letter U with grave accent */
- };
-#define NUMBER_OF_PAIRS (sizeof (known_pairs) / sizeof (struct recode_known_pair))
-
-static bool
-init_latin1_applemac (RECODE_STEP step,
- RECODE_CONST_REQUEST request,
- RECODE_CONST_OPTION_LIST before_options,
- RECODE_CONST_OPTION_LIST after_options)
-{
- if (before_options || after_options)
- return false;
-
- return auto_cr
- ? complete_pairs (request->outer, step,
- known_pairs, NUMBER_OF_PAIRS, true, true)
- : complete_pairs (request->outer, step,
- known_pairs + 1, NUMBER_OF_PAIRS - 1, true, true);
-}
-
-static bool
-init_applemac_latin1 (RECODE_STEP step,
- RECODE_CONST_REQUEST request,
- RECODE_CONST_OPTION_LIST before_options,
- RECODE_CONST_OPTION_LIST after_options)
-{
- if (before_options || after_options)
- return false;
-
- return auto_cr
- ? complete_pairs (request->outer, step,
- known_pairs, NUMBER_OF_PAIRS, true, false)
- : complete_pairs (request->outer, step,
- known_pairs + 1, NUMBER_OF_PAIRS - 1, true, false);
-}
-
-bool
-module_applemac (RECODE_OUTER outer)
-{
- RECODE_ALIAS alias;
-
- if (!declare_single (outer, "Latin-1", "Apple-Mac",
- outer->quality_byte_to_variable,
- init_latin1_applemac, NULL))
- return false;
- if (!declare_single (outer, "Apple-Mac", "Latin-1",
- outer->quality_byte_to_variable,
- init_applemac_latin1, NULL))
- return false;
-
- if (alias = declare_alias (outer, "Apple-Mac", "Apple-Mac"), !alias)
- return false;
- if (!declare_implied_surface (outer, alias, outer->cr_surface))
- return false;
-#if 0
- /* FIXME! */
- if (!declare_alias (outer, "Apple-Mac", "macintosh"))
- return false;
-#endif
- return true;
-}
-
-_GL_ATTRIBUTE_CONST void
-delmodule_applemac (RECODE_OUTER outer _GL_UNUSED_PARAMETER)
-{
-}