Debian Codegraph @

external/gsl/gsl_block__fprintf_source.c

raw symbols SCIP
1 /* block/fprintf_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 #if !(USES_LONGDOUBLE && !HAVE_PRINTF_LONGDOUBLEcxx . . $ `external/gsl/gsl__config.h:120:9`!)
21
22 int
23 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_block, fprintf) (FILEcxx . . $ FILE# * stream, const TYPEcxx . . $ `./templates_on.h:234:9`!(gsl_block) * b, const char *format)
24 {
25 size_t n = b->sizecxx . . $ gsl_block_float_struct#size. ;
26
27 ATOMICcxx . . $ `./templates_on.h:80:9`! * data = b->datacxx . . $ gsl_block_float_struct#data. ;
28
29 size_t i;
30
31 for (i = 0; i < n; i++)
32 {
33 int k;
34 int status;
35
36 for (k = 0; k < MULTIPLICITYcxx . . $ `./templates_on.h:81:9`!; k++)
37 {
38 if (k > 0)
39 {
40 status = putccxx . . $ putc(b1cd03d6c470d1bd). (' ', stream);
41
42 if (status == EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!)
43 {
44 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("putc failed", GSL_EFAILED);
45 }
46 }
47 status = fprintfcxx . . $ fprintf(bc216f8e5b1ebeac). (stream,
48 format,
49 data[MULTIPLICITYcxx . . $ `./templates_on.h:81:9`! * i + k]);
50 if (status < 0)
51 {
52 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("fprintf failed", GSL_EFAILED);
53 }
54 }
55
56 status = putccxx . . $ putc(b1cd03d6c470d1bd). ('\n', stream);
57
58 if (status == EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!)
59 {
60 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("putc failed", GSL_EFAILED);
61 }
62 }
63
64 return 0;
65 }
66
67 int
68 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_block, fscanf) (FILEcxx . . $ FILE# * stream, TYPEcxx . . $ `./templates_on.h:234:9`!(gsl_block) * b)
69 {
70 size_t n = b->sizecxx . . $ gsl_block_float_struct#size. ;
71
72 ATOMICcxx . . $ `./templates_on.h:80:9`! * data = b->datacxx . . $ gsl_block_float_struct#data. ;
73
74 size_t i;
75
76 for (i = 0; i < n; i++)
77 {
78 int k;
79 for (k = 0; k < MULTIPLICITYcxx . . $ `./templates_on.h:81:9`!; k++)
80 {
81 ATOMIC_IOcxx . . $ `./templates_on.h:85:9`! tmp ;
82
83 int status = fscanfcxx . . $ fscanf(bc216f8e5b1ebeac). (stream, IN_FORMATcxx . . $ `./templates_on.h:83:9`!, &tmp) ;
84
85 data [MULTIPLICITYcxx . . $ `./templates_on.h:81:9`! * i + k] = tmp;
86
87
88 if (status != 1)
89 {
90 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("fscanf failed", GSL_EFAILED);
91 }
92 }
93 }
94
95 return GSL_SUCCESScxx . . $ GSL_SUCCESS.;
96 }
97
98
99 int
100 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_block, raw_fprintf) (FILEcxx . . $ FILE# * stream,
101 const ATOMICcxx . . $ `./templates_on.h:80:9`! * data,
102 const size_t n,
103 const size_t stride,
104 const char *format)
105 {
106 size_t i;
107
108 for (i = 0; i < n; i++)
109 {
110 int k;
111 int status;
112
113 for (k = 0; k < MULTIPLICITYcxx . . $ `./templates_on.h:81:9`!; k++)
114 {
115 if (k > 0)
116 {
117 status = putccxx . . $ putc(b1cd03d6c470d1bd). (' ', stream);
118
119 if (status == EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!)
120 {
121 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("putc failed", GSL_EFAILED);
122 }
123 }
124 status = fprintfcxx . . $ fprintf(bc216f8e5b1ebeac). (stream,
125 format,
126 data[MULTIPLICITYcxx . . $ `./templates_on.h:81:9`! * i * stride + k]);
127 if (status < 0)
128 {
129 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("fprintf failed", GSL_EFAILED);
130 }
131 }
132
133 status = putccxx . . $ putc(b1cd03d6c470d1bd). ('\n', stream);
134
135 if (status == EOFcxx . . $ `<external>/232824719582829767/stdio.h:105:9`!)
136 {
137 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("putc failed", GSL_EFAILED);
138 }
139 }
140
141 return 0;
142 }
143
144 int
145 FUNCTIONcxx . . $ `./templates_on.h:233:9`! (gsl_block, raw_fscanf) (FILEcxx . . $ FILE# * stream,
146 ATOMICcxx . . $ `./templates_on.h:80:9`! * data,
147 const size_t n,
148 const size_t stride)
149 {
150 size_t i;
151
152 for (i = 0; i < n; i++)
153 {
154 int k;
155 for (k = 0; k < MULTIPLICITYcxx . . $ `./templates_on.h:81:9`!; k++)
156 {
157 ATOMIC_IOcxx . . $ `./templates_on.h:85:9`! tmp;
158
159 int status = fscanfcxx . . $ fscanf(bc216f8e5b1ebeac). (stream, IN_FORMATcxx . . $ `./templates_on.h:83:9`!, &tmp) ;
160
161 data [MULTIPLICITYcxx . . $ `./templates_on.h:81:9`! * i * stride + k] = tmp;
162
163 if (status != 1)
164 GSL_ERRORcxx . . $ `external/gsl/gsl_errno.h:104:9`! ("fscanf failed", GSL_EFAILED);
165 }
166 }
167
168 return GSL_SUCCESScxx . . $ GSL_SUCCESS.;
169 }
170
171 #endif