CalculiX  2.8
A Free Software Three-Dimensional Structural Finite Element Program
 All Classes Files Functions Variables Macros
writeheading.c File Reference
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "CalculiX.h"
Include dependency graph for writeheading.c:

Go to the source code of this file.

Functions

void writeheading (char *jobnamec, char *heading, ITG *nheading_)
 

Function Documentation

void writeheading ( char *  jobnamec,
char *  heading,
ITG nheading_ 
)

Definition at line 24 of file writeheading.c.

24  {
25 
26  /* writes the headers in the frd-file */
27 
28  FILE *f1;
29 
30  char p1[6]=" 1",fneig[132]="",c[2]="C",
31  text[67]=" ";
32 
33  ITG i;
34 
35  strcpy(fneig,jobnamec);
36  strcat(fneig,".frd");
37 
38  if((f1=fopen(fneig,"ab"))==NULL){
39  printf("*ERROR in frd: cannot open frd file for writing...");
40  exit(0);
41  }
42 
43  /* first line */
44 
45  fprintf(f1,"%5s%1s\n",p1,c);
46 
47  /* header lines */
48 
49  for(i=0;i<*nheading_;i++){
50  strcpy1(text,&heading[66*i],66);
51  fprintf(f1,"%5sU%66s\n",p1,text);
52  }
53 
54  fclose(f1);
55 
56  return;
57 }
ITG strcpy1(char *s1, const char *s2, ITG length)
Definition: strcpy1.c:24
#define ITG
Definition: CalculiX.h:51
Hosted by OpenAircraft.com, (Michigan UAV, LLC)