X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Flegacy-encoding.h;h=c6ae0ab4aa2bb25faf9f074436aa3bd9637bb137;hb=97f9b8ad137e333af9b3c767556d28dfda93a461;hp=096ed38c03636abdeddd1b83d100cd2bb8e4224a;hpb=480a0746507ce73d26f528b56dc3ed80195096e0;p=pspp
diff --git a/src/libpspp/legacy-encoding.h b/src/libpspp/legacy-encoding.h
index 096ed38c03..c6ae0ab4aa 100644
--- a/src/libpspp/legacy-encoding.h
+++ b/src/libpspp/legacy-encoding.h
@@ -1,48 +1,34 @@
-/* PSPP - computes sample statistics.
+/* PSPP - a program for statistical analysis.
Copyright (C) 2006 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- This program 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
- General Public License for more details.
+ This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with this program. If not, see . */
#ifndef LIBPSPP_LEGACY_ENCODING
#define LIBPSPP_LEGACY_ENCODING 1
-#include
#include
-/* A legacy character encoding.
- This exists only to handle the specific legacy EBCDIC-to-ASCII
- recoding that MODE=360 file handles perform. */
-enum legacy_encoding
- {
- LEGACY_ASCII, /* ASCII or similar character set. */
- LEGACY_EBCDIC, /* IBM EBCDIC character set. */
-
- /* Native character set. */
#if 'A' == 0x41
- LEGACY_NATIVE = LEGACY_ASCII
+#define LEGACY_NATIVE "ASCII"
#elif 'A' == 0xc1
- LEGACY_NATIVE = LEGACY_EBCDIC
+#define LEGACY_NATIVE "EBCDIC-US"
#else
#error Cannot detect native character set.
#endif
- };
-void legacy_recode (enum legacy_encoding, const char *src,
- enum legacy_encoding, char *dst, size_t);
-char legacy_to_native (enum legacy_encoding from, char) PURE_FUNCTION;
-char legacy_from_native (enum legacy_encoding to, char) PURE_FUNCTION;
+char legacy_to_native (const char *from, char) PURE_FUNCTION;
+char legacy_from_native (const char *to, char) PURE_FUNCTION;
+
#endif /* libpspp/legacy-encoding.h */