source: trunk/MagicSoft/Simulation/Detector/ReflectorII/attach.c@ 1711

Last change on this file since 1711 was 1536, checked in by bigongia, 22 years ago
New file to attach ascii files at the end of reflector output file.
File size: 425 bytes
Line 
1/* Function attach:
2 *
3 * Attaches the ascii file pointed to by f2 to the file pointed to by f1.
4 *
5 * Warning: maximum length of the ascii file lines is MAX_CHAR characters
6 *
7 */
8
9#include<stdio.h>
10
11#define MAX_CHAR 1024
12
13void attach (FILE *f1, FILE *f2)
14{
15 char string[MAX_CHAR];
16
17 fputc('\n',f1);
18
19 for(;;)
20 {
21 fgets(string,MAX_CHAR,f2);
22 if (feof(f2))
23 break;
24 fputs(string,f1);
25 }
26
27 return;
28}
Note: See TracBrowser for help on using the repository browser.