X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flanguage%2Fxforms%2Frecode.c;h=aa051fee01545e453729dc56059d03a3595dc357;hb=535b3ff175221bf40a3e009930e4121e6d093f24;hp=62b03ba073b9a5f6f6a1c5b282d9c26b0ce286b9;hpb=bd17d2af982332ee1791998361b1ac6731fe14fa;p=pspp diff --git a/src/language/xforms/recode.c b/src/language/xforms/recode.c index 62b03ba073..aa051fee01 100644 --- a/src/language/xforms/recode.c +++ b/src/language/xforms/recode.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2009, 2010 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 @@ -20,24 +20,25 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "xalloc.h" +#include "data/case.h" +#include "data/data-in.h" +#include "data/dictionary.h" +#include "data/format.h" +#include "data/procedure.h" +#include "data/transformations.h" +#include "data/variable.h" +#include "language/command.h" +#include "language/lexer/lexer.h" +#include "language/lexer/value-parser.h" +#include "language/lexer/variable-parser.h" +#include "libpspp/assertion.h" +#include "libpspp/cast.h" +#include "libpspp/compiler.h" +#include "libpspp/message.h" +#include "libpspp/pool.h" +#include "libpspp/str.h" + +#include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) @@ -373,7 +374,8 @@ set_map_in_str (struct map_in *in, struct pool *pool, in->type = MAP_SINGLE; value_init_pool (pool, &in->x, width); value_copy_buf_rpad (&in->x, width, - ds_data (string), ds_length (string), ' '); + CHAR_CAST_BUG (uint8_t *, ds_data (string)), + ds_length (string), ' '); } /* Parses a mapping output value into OUT, allocating memory from @@ -629,8 +631,9 @@ find_src_string (struct recode_trns *trns, const uint8_t *value, union value uv; msg_disable (); - match = data_in (ss_buffer (value, width), LEGACY_NATIVE, - FMT_F, 0, 0, 0, trns->dst_dict, &uv, 0); + match = data_in (ss_buffer (CHAR_CAST_BUG (char *, value), width), + LEGACY_NATIVE, FMT_F, 0, 0, 0, trns->dst_dict, + &uv, 0); msg_enable (); out->value.f = uv.f; break; @@ -678,7 +681,7 @@ recode_trns_proc (void *trns_, struct ccase **c, casenumber case_idx UNUSED) } else { - char *dst = case_str_rw (*c, dst_var); + char *dst = CHAR_CAST_BUG (char *, case_str_rw (*c, dst_var)); if (out != NULL) { if (!out->copy_input)