X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Flegacy-encoding.h;h=ec889efbc9044b9bdc3626249900f2dba47172ba;hb=9254d30d06a0565c89daccedd93a94c4c6086004;hp=096ed38c03636abdeddd1b83d100cd2bb8e4224a;hpb=480a0746507ce73d26f528b56dc3ed80195096e0;p=pspp-builds.git diff --git a/src/libpspp/legacy-encoding.h b/src/libpspp/legacy-encoding.h index 096ed38c..ec889efb 100644 --- a/src/libpspp/legacy-encoding.h +++ b/src/libpspp/legacy-encoding.h @@ -1,20 +1,18 @@ -/* 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 @@ -22,27 +20,20 @@ #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 "PSPP-LEGACY-ASCII" #elif 'A' == 0xc1 - LEGACY_NATIVE = LEGACY_EBCDIC +#define LEGACY_NATIVE "PSPP-LEGACY-EBCDIC" #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; + + +void legacy_recode (const char *from, const char *src, + const char *to, char *dst, size_t); +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 */