Debian Codegraph @

external/gsl/gsl_vector__file_source.c

raw
1 /* vector/file_source.c
2 *
3 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20 int
21 FUNCTION (gsl_vector, fread) (FILE * stream, TYPE (gsl_vector) * v)
22 {
23 int status = FUNCTION (gsl_block, raw_fread) (stream,
24 v->data,
25 v->size,
26 v->stride);
27 return status;
28 }
29
30 int
31 FUNCTION (gsl_vector, fwrite) (FILE * stream, const TYPE (gsl_vector) * v)
32 {
33 int status = FUNCTION (gsl_block, raw_fwrite) (stream,
34 v->data,
35 v->size,
36 v->stride);
37 return status;
38 }
39
40 #if !(USES_LONGDOUBLE && !HAVE_PRINTF_LONGDOUBLE)
41 int
42 FUNCTION (gsl_vector, fprintf) (FILE * stream, const TYPE (gsl_vector) * v,
43 const char *format)
44 {
45 int status = FUNCTION (gsl_block, raw_fprintf) (stream,
46 v->data,
47 v->size,
48 v->stride,
49 format);
50 return status;
51 }
52
53 int
54 FUNCTION (gsl_vector, fscanf) (FILE * stream, TYPE (gsl_vector) * v)
55 {
56 int status = FUNCTION (gsl_block, raw_fscanf) (stream,
57 v->data,
58 v->size,
59 v->stride);
60 return status;
61 }
62 #endif
63