Subversion Repositories tendra.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
Line -... Line 1...
-
 
1
/*
-
 
2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
-
 
3
 * All rights reserved.
-
 
4
 *
-
 
5
 * Redistribution and use in source and binary forms, with or without
-
 
6
 * modification, are permitted provided that the following conditions are met:
-
 
7
 *
-
 
8
 * 1. Redistributions of source code must retain the above copyright notice,
-
 
9
 *    this list of conditions and the following disclaimer.
-
 
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
-
 
11
 *    this list of conditions and the following disclaimer in the documentation
-
 
12
 *    and/or other materials provided with the distribution.
-
 
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
-
 
14
 *    may be used to endorse or promote products derived from this software
-
 
15
 *    without specific, prior written permission.
-
 
16
 *
-
 
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
-
 
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-
 
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-
 
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
-
 
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-
 
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-
 
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-
 
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
 
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-
 
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-
 
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
28
 *
-
 
29
 * $Id$
-
 
30
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
 
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
Line 81... Line 111...
81
/* VARIABLES */
111
/* VARIABLES */
82
/* All variables initialised */
112
/* All variables initialised */
83
 
113
 
84
static int crt_proc_start;
114
static int crt_proc_start;
85
static int last_line_no;
115
static int last_line_no;
86
static char * main_filename;	/* init by diagnose_prelude */
116
static char *main_filename;	/* init by diagnose_prelude */
87
static int filename_space = 0;	/* init by diagnose_prelude */
117
static int filename_space = 0;	/* init by diagnose_prelude */
88
static long filename_pos;
118
static long filename_pos;
89
static int filename_gate = 0;	/* init by diagnose_prelude */
119
static int filename_gate = 0;	/* init by diagnose_prelude */
90
 
120
 
91
/* PROCEDURES */
121
/* PROCEDURES */
92
 
122
 
93
static int check_filename
123
static int
94
    PROTO_N ( (sm) )
-
 
95
    PROTO_T ( sourcemark sm )
124
check_filename(sourcemark sm)
96
{
125
{
97
  if (main_filename)
126
  if (main_filename) {
98
    {
-
 
99
      if (!strcmp(main_filename, sm.file->file.ints.chars))
127
      if (!strcmp(main_filename, sm.file->file.ints.chars)) {
100
        return 1;
128
        return 1;
-
 
129
      }
101
      return 0;
130
      return 0;
102
    }
-
 
103
  else
131
  } else {
104
    {
-
 
105
      main_filename = sm.file->file.ints.chars;
132
      main_filename = sm.file->file.ints.chars;
106
      return 1;
133
      return 1;
107
    };
134
  }
108
}
135
}
109
 
136
 
-
 
137
void
110
void out_diagnose_prelude
138
out_diagnose_prelude(void)
111
    PROTO_Z ()
-
 
112
{
139
{
113
  main_filename = (char*)0;
140
  main_filename = (char *)0;
114
  filename_space = 0;
141
  filename_space = 0;
115
  filename_gate = 0;
142
  filename_gate = 0;
116
  return;
143
  return;
117
}
144
}
118
 
145
 
-
 
146
void
119
void out_diagnose_postlude
147
out_diagnose_postlude(void)
120
    PROTO_Z ()
-
 
121
{
148
{
122
  return;
149
  return;
123
}
150
}
124
 
151
 
125
 
152
 
126
#ifdef NEWDIAGS
153
#ifdef NEWDIAGS
127
 
154
 
128
void code_diag_info
155
void
129
    PROTO_N ( (d, proc_no, mcode, args) )
-
 
130
    PROTO_T ( diag_info * d X int proc_no X void (*mcode)(void *) X void * args )
156
code_diag_info(diag_info *d, int proc_no, void(*mcode)(void *), void *args)
131
{
157
{
132
  if (d == nildiag) {
158
  if (d == nildiag) {
133
    (*mcode)(args);
159
   (*mcode)(args);
134
    return;
160
    return;
135
  }
161
  }
136
  switch (d->key) {
162
  switch (d->key) {
137
    case DIAG_INFO_SCOPE: {
163
    case DIAG_INFO_SCOPE: {
138
	fprintf(fpout, " .def .bb; .val .; .scl 100;  .line %d; .endef\n",
164
	fprintf(fpout, " .def .bb; .val .; .scl 100;  .line %d; .endef\n",
139
           last_line_no);
165
		last_line_no);
140
	code_diag_info (d->more, proc_no, mcode, args);
166
	code_diag_info(d->more, proc_no, mcode, args);
141
	fprintf(fpout, " .def .eb; .val .; .scl 100; .line %d; .endef\n",
167
	fprintf(fpout, " .def .eb; .val .; .scl 100; .line %d; .endef\n",
142
             last_line_no);
168
		last_line_no);
143
	return;
169
	return;
144
    }
170
    }
145
    case DIAG_INFO_SOURCE: {
171
    case DIAG_INFO_SOURCE: {
146
	int l = (int)d -> data.source.beg.line_no.nat_val.small_nat -
172
	int l = (int)d->data.source.beg.line_no.nat_val.small_nat -
147
                       crt_proc_start + 1;
173
	    crt_proc_start + 1;
148
	if (check_filename(d -> data.source.beg) && l != last_line_no) {
174
	if (check_filename(d -> data.source.beg) && l != last_line_no) {
149
	  last_line_no = l;
175
	  last_line_no = l;
150
	  if (l > 0)
176
	  if (l > 0) {
151
	    fprintf(fpout, " .ln %d\n", l);
177
	    fprintf(fpout, " .ln %d\n", l);
-
 
178
	  }
152
	}
179
	}
153
	code_diag_info (d->more, proc_no, mcode, args);
180
	code_diag_info(d->more, proc_no, mcode, args);
154
	return;
181
	return;
155
    }
182
    }
156
    case DIAG_INFO_ID: {
183
    case DIAG_INFO_ID: {
157
	exp acc = d -> data.id_scope.access;
184
	exp acc = d->data.id_scope.access;
158
	ot ty;
185
	ot ty;
159
	int p, param_dec;
186
	int p, param_dec;
160
	if (name(acc) != hold_tag && name(acc) != hold2_tag)
187
	if (name(acc)!= hold_tag && name(acc) != hold2_tag) {
161
	  failer("not hold_tag");
188
	  failer("not hold_tag");
-
 
189
	}
162
	acc = son(acc);
190
	acc = son(acc);
163
	if (name(acc) == cont_tag && name(son(acc)) == name_tag && isvar(son(son(acc))))
191
	if (name(acc) == cont_tag && name(son(acc)) == name_tag &&
-
 
192
	    isvar(son(son(acc)))) {
164
	  acc = son(acc);
193
	  acc = son(acc);
-
 
194
	}
165
	if ( name(acc) == name_tag && !isdiscarded(acc) && !isglob(son(acc)) ) {
195
	if (name(acc) == name_tag && !isdiscarded(acc) && !isglob(son(acc))) {
166
	  p = (no(acc) + no(son(acc))) / 8;
196
	  p = (no(acc) + no(son(acc))) / 8;
167
	  param_dec = isparam(son(acc));
197
	  param_dec = isparam(son(acc));
168
	  fprintf(fpout, " .def %s; .val ", d -> data.id_scope.nme.ints.chars);
198
	  fprintf(fpout, " .def %s; .val ", d->data.id_scope.nme.ints.chars);
169
	  if (param_dec)
199
	  if (param_dec) {
170
	    fprintf(fpout, "%d", p+8);
200
	    fprintf(fpout, "%d", p + 8);
171
	  else
201
	  } else {
172
	    fprintf(fpout, "%d-.Ldisp%d", p, proc_no);
202
	    fprintf(fpout, "%d-.Ldisp%d", p, proc_no);
-
 
203
	  }
173
	  fprintf(fpout, "; .scl %d; ", (param_dec) ? 9 : 1);
204
	  fprintf(fpout, "; .scl %d; ",(param_dec) ? 9 : 1);
174
	  ty = out_type(d -> data.id_scope.typ, 0);
205
	  ty = out_type(d->data.id_scope.typ, 0);
175
	  fprintf(fpout, ".type 0%o; .endef\n", ty.type + (ty.modifier<<4));
206
	  fprintf(fpout, ".type 0%o; .endef\n", ty.type + (ty.modifier << 4));
176
	}
207
	}
177
	code_diag_info (d->more, proc_no, mcode, args);
208
	code_diag_info(d->more, proc_no, mcode, args);
178
    }
209
    }
179
  };
210
  }
180
  return;
211
  return;
181
}
212
}
182
 
213
 
183
#else
214
#else
184
 
215
 
185
void output_diag
216
void
186
    PROTO_N ( (d, proc_no, e) )
-
 
187
    PROTO_T ( diag_info * d X int proc_no X exp e )
217
output_diag(diag_info *d, int proc_no, exp e)
188
{
218
{
189
  if (d -> key == DIAG_INFO_SOURCE)
219
  if (d->key == DIAG_INFO_SOURCE) {
190
   {
-
 
191
     int l = (int)d -> data.source.beg.line_no.nat_val.small_nat -
220
     int l = (int)d->data.source.beg.line_no.nat_val.small_nat -
192
                       crt_proc_start + 1;
221
	 crt_proc_start + 1;
193
     if (!check_filename(d -> data.source.beg))
222
     if (!check_filename(d -> data.source.beg)) {
194
       return;
223
       return;
-
 
224
     }
195
 
225
 
196
     if (l == last_line_no)
226
     if (l == last_line_no) {
197
       return;
227
       return;
-
 
228
     }
198
     last_line_no = l;
229
     last_line_no = l;
199
     if (l > 0)
230
     if (l > 0) {
200
       fprintf(fpout, " .ln %d\n", l);
231
       fprintf(fpout, " .ln %d\n", l);
-
 
232
     }
201
     return;
233
     return;
202
   };
234
  }
203
  if (d -> key == DIAG_INFO_ID)
235
  if (d -> key == DIAG_INFO_ID) {
204
   {
-
 
205
     ot ty;
236
     ot ty;
206
     exp acc = d -> data.id_scope.access;
237
     exp acc = d -> data.id_scope.access;
207
     int p = (no(acc) + no(son(acc))) / 8;
238
     int p = (no(acc) + no(son(acc))) / 8;
208
     int param_dec = isparam(son(acc));
239
     int param_dec = isparam(son(acc));
209
 
240
 
210
     mark_scope(e);
241
     mark_scope(e);
211
 
242
 
212
     if (props(e) & 0x80)
243
     if (props(e) & 0x80) {
213
      {
-
 
214
       fprintf(fpout, " .def .bb; .val .; .scl 100;  .line %d; .endef\n",
244
       fprintf(fpout, " .def .bb; .val .; .scl 100;  .line %d; .endef\n",
215
           last_line_no);
245
	       last_line_no);
216
      };
246
     }
217
 
247
 
218
     fprintf(fpout, " .def %s; .val ", d -> data.id_scope.nme.ints.chars);
248
     fprintf(fpout, " .def %s; .val ", d->data.id_scope.nme.ints.chars);
219
     if (param_dec)
249
     if (param_dec) {
220
       fprintf(fpout, "%d", p+8);
250
       fprintf(fpout, "%d", p + 8);
221
     else
251
     } else {
222
       fprintf(fpout, "%d-.Ldisp%d", p, proc_no);
252
       fprintf(fpout, "%d-.Ldisp%d", p, proc_no);
-
 
253
     }
223
     fprintf(fpout, "; .scl %d; ", (param_dec) ? 9 : 1);
254
     fprintf(fpout, "; .scl %d; ",(param_dec) ? 9 : 1);
224
     ty = out_type(d -> data.id_scope.typ, 0);
255
     ty = out_type(d -> data.id_scope.typ, 0);
225
     fprintf(fpout, ".type 0%o; .endef\n", ty.type + (ty.modifier<<4));
256
     fprintf(fpout, ".type 0%o; .endef\n", ty.type + (ty.modifier<<4));
226
 
257
 
227
     return;
258
     return;
228
   };
259
   }
229
 
260
 
230
  return;
261
  return;
231
}
262
}
232
#endif
263
#endif
233
 
264
 
234
void output_end_scope
265
void
235
    PROTO_N ( (d, e) )
-
 
236
    PROTO_T ( diag_info * d X exp e )
266
output_end_scope(diag_info *d, exp e)
237
{
267
{
238
  if (d -> key == DIAG_INFO_ID && props(e) & 0x80)
268
  if (d -> key == DIAG_INFO_ID && props(e) & 0x80) {
239
    fprintf(fpout, " .def .eb; .val .; .scl 100; .line %d; .endef\n",
269
    fprintf(fpout, " .def .eb; .val .; .scl 100; .line %d; .endef\n",
240
             last_line_no);
270
	    last_line_no);
-
 
271
  }
241
  return;
272
  return;
242
}
273
}
243
 
274
 
244
void diag_val_begin
275
void
245
    PROTO_N ( (d, global, cname, pname) )
-
 
246
    PROTO_T ( diag_global * d X int global X int cname X char * pname )
276
diag_val_begin(diag_global *d, int global, int cname, char *pname)
247
{
277
{
248
  ot typ;
278
  ot typ;
249
 
279
 
250
  outs(" .def ");
280
  outs(" .def ");
251
  outs(d -> data.id.nme.ints.chars);
281
  outs(d->data.id.nme.ints.chars);
252
  outs("; .val ");
282
  outs("; .val ");
253
  if (cname == -1) {
283
  if (cname == -1) {
254
    outs (pname);
284
    outs(pname);
-
 
285
  } else {
-
 
286
    outs(local_prefix);
-
 
287
    outn((long)cname);
255
  }
288
  }
256
  else {
-
 
257
    outs(local_prefix);
-
 
258
    outn ((long)cname);
-
 
259
  };
-
 
260
  outs("; .scl ");
289
  outs("; .scl ");
261
  outn((long)(global ? 2 : 3));
290
  outn((long)(global ? 2 : 3));
262
  outs("; ");
291
  outs("; ");
263
  typ = out_type(d -> data.id.new_type, 0);
292
  typ = out_type(d->data.id.new_type, 0);
264
  fprintf(fpout, ".type 0%o; .endef\n", typ.type + (typ.modifier << 4));
293
  fprintf(fpout, ".type 0%o; .endef\n", typ.type + (typ.modifier << 4));
265
  return;
294
  return;
266
}
295
}
267
 
296
 
268
void diag_val_end
297
void
269
    PROTO_N ( (d) )
-
 
270
    PROTO_T ( diag_global * d )
298
diag_val_end(diag_global *d)
271
{
-
 
272
  UNUSED(d);
-
 
273
  return;
-
 
274
}
-
 
275
 
-
 
276
void diag_proc_begin
-
 
277
    PROTO_N ( (d, global, cname, pname) )
-
 
278
    PROTO_T ( diag_global * d X int global X int cname X char * pname )
-
 
279
{
299
{
-
 
300
  UNUSED(d);
-
 
301
  return;
-
 
302
}
-
 
303
 
-
 
304
void
-
 
305
diag_proc_begin(diag_global *d, int global, int cname, char *pname)
-
 
306
{
280
  ot typ;
307
  ot typ;
281
  UNUSED(cname);
308
  UNUSED(cname);
282
 
309
 
283
  if (!d)
310
  if (!d) {
284
    return;
311
    return;
-
 
312
  }
285
 
313
 
286
  check_filename(d -> data.id.whence);
314
  check_filename(d->data.id.whence);
287
 
315
 
288
  outs(" .def ");
316
  outs(" .def ");
289
  outs(d -> data.id.nme.ints.chars);
317
  outs(d->data.id.nme.ints.chars);
290
  outs("; .val ");
318
  outs("; .val ");
291
  outs(pname);
319
  outs(pname);
292
  outs("; .scl ");
320
  outs("; .scl ");
293
  outn((long)(global ? 2 : 3));
321
  outn((long)(global ? 2 : 3));
294
  outs("; ");
322
  outs("; ");
295
  typ = out_type(d -> data.id.new_type->data.proc.result_type, 0);
323
  typ = out_type(d->data.id.new_type->data.proc.result_type, 0);
296
  fprintf(fpout, ".type 0%o; .endef\n",
-
 
297
           typ.type + (typ.modifier << 6) + 32);
324
  fprintf(fpout, ".type 0%o; .endef\n", typ.type + (typ.modifier << 6) + 32);
298
 
325
 
299
  crt_proc_start = d -> data.id.whence.line_no.nat_val.small_nat;
326
  crt_proc_start = d->data.id.whence.line_no.nat_val.small_nat;
300
  last_line_no = 1;
327
  last_line_no = 1;
301
  fprintf(fpout, " .def .bf; .val .; .scl 101; .line %d; .endef\n",
328
  fprintf(fpout, " .def .bf; .val .; .scl 101; .line %d; .endef\n",
302
            crt_proc_start);
329
	  crt_proc_start);
303
  fprintf(fpout, " .ln 1\n");
330
  fprintf(fpout, " .ln 1\n");
304
  return;
331
  return;
305
}
332
}
306
 
333
 
307
void diag_proc_end
334
void
308
    PROTO_N ( (d) )
-
 
309
    PROTO_T ( diag_global * d )
335
diag_proc_end(diag_global *d)
310
{
336
{
311
  if (!d)
337
  if (!d) {
312
    return;
338
    return;
-
 
339
  }
313
  fprintf(fpout, " .def .ef; .val .; .scl 101; .line %d; .endef\n",
340
  fprintf(fpout, " .def .ef; .val .; .scl 101; .line %d; .endef\n",
314
            last_line_no + 1);
341
	  last_line_no + 1);
315
  fprintf(fpout, " .def %s; .val .; .scl -1; .endef\n",
342
  fprintf(fpout, " .def %s; .val .; .scl -1; .endef\n",
316
            d -> data.id.nme.ints.chars);
343
	  d->data.id.nme.ints.chars);
317
  return;
344
  return;
318
}
345
}
319
 
346
 
320
 
347
 
-
 
348
void
321
void OUTPUT_GLOBALS_TAB
349
OUTPUT_GLOBALS_TAB(void)
322
    PROTO_Z ()
-
 
323
{
350
{
324
  diag_descriptor *di = unit_diagvar_tab.array;
351
  diag_descriptor *di = unit_diagvar_tab.array;
325
  int n = unit_diagvar_tab.lastused;
352
  int n = unit_diagvar_tab.lastused;
326
  int i;
353
  int i;
327
  ot typ;
354
  ot typ;
328
 
355
 
329
  for (i=0; i<n; i++)
356
  for (i=0; i<n; i++) {
330
   {
-
 
331
     if ( di[i].key == DIAG_TYPEDEF_KEY )
357
     if (di[i].key == DIAG_TYPEDEF_KEY) {
332
      {
-
 
333
	fprintf (fpout, " .def %s; .scl 13; ", di[i].data.typ.nme.ints.chars);
358
	fprintf(fpout, " .def %s; .scl 13; ", di[i].data.typ.nme.ints.chars);
334
	typ = out_type (di[i].data.typ.new_type, 0);
359
	typ = out_type(di[i].data.typ.new_type, 0);
335
	fprintf(fpout, ".type 0%o; .endef\n", typ.type + (typ.modifier << 4));
360
	fprintf(fpout, ".type 0%o; .endef\n", typ.type + (typ.modifier << 4));
336
      };
361
     }
337
   };
362
  }
338
  return;
363
  return;
339
}
364
}
340
 
365
 
-
 
366
void
341
void OUTPUT_DIAG_TAGS
367
OUTPUT_DIAG_TAGS(void)
342
    PROTO_Z ()
-
 
343
{
368
{
344
  diag_tagdef ** di = unit_ind_diagtags;
369
  diag_tagdef **di = unit_ind_diagtags;
345
  int n = unit_no_of_diagtags;
370
  int n = unit_no_of_diagtags;
346
  int i;
371
  int i;
347
 
372
 
348
  if (!filename_space)
373
  if (!filename_space) {
349
   {
-
 
350
     filename_pos = ftell(fpout);
374
     filename_pos = ftell(fpout);
351
     outs ("                                                                                                                      ");
375
     outs("                                                                                                                      ");
352
     outnl ();
376
     outnl();
353
     filename_space = 1;
377
     filename_space = 1;
354
   };
378
   }
355
 
379
 
356
  for (i=0; i<n; ++i)
380
  for (i=0; i<n; ++i) {
357
   {
-
 
358
     diag_type d = di[i]->d_type;
381
     diag_type d = di[i] ->d_type;
359
     switch (d -> key)
382
     switch (d -> key)
360
      {
383
      {
361
        case DIAG_TYPE_STRUCT:
384
        case DIAG_TYPE_STRUCT:
362
        case DIAG_TYPE_UNION:
385
        case DIAG_TYPE_UNION:
363
        case DIAG_TYPE_ENUM:
386
        case DIAG_TYPE_ENUM:
364
            out_tagged(d);
387
            out_tagged(d);
365
            break;
388
            break;
366
        default: break;
389
        default: break;
367
      };
390
      }
368
   };
391
   }
369
  return;
392
  return;
370
}
393
}
371
 
394
 
372
void INSPECT_FILENAME
395
void
373
    PROTO_N ( (fn) )
-
 
374
    PROTO_T ( filename fn )
396
INSPECT_FILENAME(filename fn)
375
{
397
{
376
  long here;
398
  long here;
377
  char * nm = fn -> file.ints.chars;
399
  char *nm = fn->file.ints.chars;
378
  char * f;
400
  char *f;
379
  int len = (int)strlen(fn -> file.ints.chars);
401
  int len = (int)strlen(fn->file.ints.chars);
380
 
402
 
381
  if (filename_gate || len < 4 || len > 120 || nm[len-1] == 'h' ||
403
  if (filename_gate || len < 4 || len > 120 || nm[len-1] == 'h' ||
382
           nm[len-2] != '.')
404
      nm[len-2]!= '.') {
383
    return;
405
    return;
-
 
406
  }
384
 
407
 
385
  f = &nm[len-2];
408
  f = &nm[len-2];
386
 
409
 
387
  while (f != nm && f[-1] != '/')
410
  while (f != nm && f[-1]!= '/') {
388
    --f;
411
    --f;
-
 
412
  }
389
 
413
 
390
  filename_gate = 1;
414
  filename_gate = 1;
391
 
415
 
392
  if (!filename_space)
416
  if (!filename_space) {
393
    fprintf(fpout, " .file \"%s\"\n", f);
417
    fprintf(fpout, " .file \"%s\"\n", f);
394
  else
418
  } else {
395
   {
-
 
396
      here = ftell(fpout);
419
    here = ftell(fpout);
397
      fseek (fpout, filename_pos, 0);
420
    fseek(fpout, filename_pos, 0);
398
      fprintf(fpout, " .file \"%s\"\n", f);
421
    fprintf(fpout, " .file \"%s\"\n", f);
399
      fseek(fpout, here, 0);
422
    fseek(fpout, here, 0);
400
   };
423
  }
401
  return;
424
  return;
402
}
425
}
403
 
-