make_fint.c 14.4 KB
Newer Older
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
1
2
3
4
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
Uwe Schulzweida's avatar
Uwe Schulzweida committed
5
#include <time.h>
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

#include "config.h"

typedef struct
{
  int naline;
  char *fname;
  char *aline[99];
  char *text;
}
Docu;

Docu cdoc[9999], fdoc[9999];
int   ncdoc = 0, nfdoc = 0;

int doccmp(const void *s1, const void *s2)
{
  Docu *x = (Docu *) s1;
  Docu *y = (Docu *) s2;

  return (strcmp(x->fname, y->fname));
}

int strcompare(const char **s1, const char **s2)
{
  printf(">%s< >%s<\n", *s1, *s2);
  return (strcmp(*s1, *s2));
}

void doctotex(FILE *fp, Docu *doc, int ndoc)
{
  int i, k;

  for ( i = 0; i < ndoc; i++ )
    {
      fprintf(fp, "\\section*{\\tt \\htmlref{%s}{%s}}\n\n", doc[i].fname, doc[i].fname);
      fprintf(fp, "\\begin{verbatim}\n");
      for ( k = 0; k < doc[i].naline; k++ )
	fprintf(fp, "    %s\n", doc[i].aline[k]);
      fprintf(fp, "\\end{verbatim}\n");
      fprintf(fp, "\n%s.\n\n\n", doc[i].text);
    }
}

void doctotxt(FILE *fp, Docu *doc, int ndoc)
{
  int i, k;

  for ( i = 0; i < ndoc; i++ )
    {
      fprintf(fp, "%s\n\n", doc[i].fname);
      for ( k = 0; k < doc[i].naline; k++ )
	fprintf(fp, "    %s\n", doc[i].aline[k]);
      fprintf(fp, "\n  %s.\n\n", doc[i].text);
    }
}

void fortran_interface(char *fname, char *fnameinc, char *fnameint)
{
  FILE *fpin, *fpinc, *fpint;
  FILE *fp;
  char line[1024], *pline;
  char sname[128], *parname, *comment;
  char xname[128], xdes[128];
  int parvalue;
  int functype;
  int i, ii;
  int lineno = 0;
  size_t linelen, len;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
75
76
77
  enum              {ISVOID, ISSTRING,        ISSTRINGP,       ISINT,     ISINTP,     ISREAL, ISDOUBLE, ISDOUBLEP, ISCONSTSTRING};
  char *f77name[] = {"",     "CHARACTER*(*)", "CHARACTER*(*)", "INTEGER", "INTEGER", "REAL", "DOUBLEPRECISION", "DOUBLEPRECISION", "CHARACTER*80"};
  char *cfint[] =   {"",     "STRING",        "PSTRING",       "INT",     "PINT",    "FLOAT", "DOUBLE", "PDOUBLE",  "STRING"};
78
  char *cname[] =   {"void", "char *",        "char *",        "int",     "int *",   "float", "double", "double *", "char *"};
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
79
80
81
82
83
  char funcname[128];
  char *funcargname[20];
  int  funcargtype[20];
  int  funcargc;
  char *strsort[99999];
Uwe Schulzweida's avatar
Uwe Schulzweida committed
84
85
86
87
88
89
90
91
92
93
94
95
  char timestr[30];
  time_t date_and_time_in_sec;
  struct tm *date_and_time;

  date_and_time_in_sec = time(NULL);
  timestr[0] = 0;

  if ( date_and_time_in_sec != -1 )
    {
      date_and_time = localtime(&date_and_time_in_sec);
      (void) strftime(timestr, sizeof(timestr), "%B %Y", date_and_time);
    }
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

  /*
  for ( i = 0; i < 8; i++ ) strsort[i] = cname[i];
  for ( i = 0; i < 8; i++ ) printf("%d %d >%s<\n", i, &strsort[i], strsort[i]);
  qsort(strsort, 8, sizeof(char *), strcompare);
  for ( i = 0; i < 8; i++ ) printf("%d %d >%s<\n", i, &strsort[i], strsort[i]);

  return;
  */

  fpin = fopen(fname, "r");
  if ( fpin == NULL ) { perror(fname); return; }

  fpinc = fopen(fnameinc, "w");
  if ( fpinc == NULL ) { perror(fnameinc); return; }

  fpint = fopen(fnameint, "w");
  if ( fpint == NULL ) { perror(fnameint); return; }

  /* fortran include */

Uwe Schulzweida's avatar
Uwe Schulzweida committed
117
  fprintf(fpinc, "! This file was automatically generated, don't edit!\n");
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
118
119
  fprintf(fpinc, "!\n");
  fprintf(fpinc, "! Fortran interface for CDI library version %s\n", VERSION);
Uwe Schulzweida's avatar
Uwe Schulzweida committed
120
121
122
123
  fprintf(fpinc, "!\n");
  fprintf(fpinc, "! Author:\n");
  fprintf(fpinc, "! -------\n");
  fprintf(fpinc, "! Uwe Schulzweida, MPI-MET, Hamburg,   %s\n", timestr);
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
124
125
126
127
  fprintf(fpinc, "!\n\n");

  /* fortran interface */

Uwe Schulzweida's avatar
Uwe Schulzweida committed
128
  fprintf(fpint, "/* Automatically generated by make_fint.c, don't edit! */\n");
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
129
130
131
132
133
  fprintf(fpint, "\n");
  fprintf(fpint, "#if defined (HAVE_CONFIG_H)\n");
  fprintf(fpint, "#  include \"config.h\"\n");
  fprintf(fpint, "#endif\n");
  fprintf(fpint, "\n");
Uwe Schulzweida's avatar
Uwe Schulzweida committed
134
135
136
137
  fprintf(fpint, "#if ! defined (_CDI_H)\n");
  fprintf(fpint, "#  include \"cdi.h\"\n");
  fprintf(fpint, "#endif\n");
  fprintf(fpint, "\n");
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
  fprintf(fpint, "#if defined (HAVE_CF_INTERFACE)\n");
  fprintf(fpint, "\n");
  fprintf(fpint, "#if ! defined (__CFORTRAN_LOADED)\n");
  fprintf(fpint, "#  include \"cfortran.h\"\n");
  fprintf(fpint, "#endif\n");
  fprintf(fpint, "\n");

  while ( fgets(line, 1023, fpin) )
    {
      lineno++;
      linelen = strlen(line);
      line[linelen-1] = 0;
      linelen -= 1;
      functype = ISVOID;
      funcargc = 0;
153
154
155
156
157
      if ( memcmp(line, "int", 3)    == 0 || 
	   memcmp(line, "void", 4)   == 0 ||
	   memcmp(line, "char", 4)   == 0 ||
	   memcmp(line, "const", 5)  == 0 ||
	   memcmp(line, "double", 6) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
158
159
160
161
162
163
164
165
166
167
168
169
	{
	  /* printf("%s\n", line); */
	  ii = 0;
	  for ( i = 0; i < linelen; i++ )
	    {
	      if ( isspace((int) line[i]) ) continue;
	      if ( line[i] == '\n' ) continue;
	      line[ii++] = line[i];
	    }
	  line[ii] = 0;
	  /* printf("%s\n", line); */
	  pline = line;
170
	  if ( memcmp(line, "int", 3) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
171
172
173
174
	    {
	      functype = ISINT;
	      pline += 3;
	    }
175
	  else if ( memcmp(line, "void", 4) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
176
177
178
179
	    {
	      functype = ISVOID;
	      pline += 4;
	    }
180
	  else if ( memcmp(line, "double*", 7) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
181
182
183
184
	    {
	      printf("skip: line %3d double *\n", lineno);
	      continue;
	    }
185
	  else if ( memcmp(line, "double", 6) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
186
187
188
189
	    {
	      functype = ISDOUBLE;
	      pline += 6;
	    }
190
	  else if ( memcmp(line, "char*", 5) == 0 )
191
192
193
194
	    {
	      functype = ISCONSTSTRING;
	      pline += 5;
	    }
195
	  else if ( memcmp(line, "constchar*", 10) == 0 )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
196
197
198
199
	    {
	      functype = ISCONSTSTRING;
	      pline += 10;
	    }
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
200
201
202
203
204
205
206
207
	  else
	    {
	      printf("%s not implemented\n", line);
	      continue;
	    }

	  len = 0;
	  while ( isalnum((int) pline[len]) ) len++;
208
	  memcpy(funcname, pline, len);
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
	  funcname[len] = 0;
	  /* printf("%s\n", funcname);*/
	  pline += len;
	  if ( *pline != '(' )
	    {
	      printf("%s\n>(< not found!", line);
	      return;
	    }
	  pline++;

	  linelen = strlen(pline);
	  funcargname[funcargc] = pline;
	  for ( i = 0; i < linelen; i++ )
	    {
	      if ( pline[i] == ',' )
		{
		  pline[i] = 0;
		  funcargc++;
		  funcargname[funcargc] = &pline[i+1];
		}
	      if ( pline[i] == ')' )
		{
		  pline[i] = 0;
		  funcargc++;
		  break;
		}
	    }

	  /*  printf("funcargc = %d\n", funcargc);*/

	  for ( i = 0; i < funcargc; i++ )
	    {
	      pline = funcargname[i];
242
243
	      if ( memcmp(pline, "const", 5) == 0 &&
		   memcmp(pline, "constchar*", 10) != 0 ) pline += 5;
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
244

245
	      if ( memcmp(pline, "void", 4) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
246
247
248
249
250
		{
		  pline += 4;
		  funcargtype[i] = ISVOID;
		  funcargname[i] = pline;
		}
251
	      else if ( memcmp(pline, "constchar*", 10) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
252
253
254
255
256
		{
		  pline += 10;
		  funcargtype[i] = ISSTRING;
		  funcargname[i] = pline;
		}
257
	      else if ( memcmp(pline, "char*", 5) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
258
259
260
261
262
		{
		  pline += 5;
		  funcargtype[i] = ISSTRINGP;
		  funcargname[i] = pline;
		}
263
	      else if ( memcmp(pline, "int*", 4) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
264
265
266
267
268
		{
		  pline += 4;
		  funcargtype[i] = ISINTP;
		  funcargname[i] = pline;
		}
269
	      else if ( memcmp(pline, "int", 3) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
270
271
272
273
274
		{
		  pline += 3;
		  funcargtype[i] = ISINT;
		  funcargname[i] = pline;
		}
275
	      else if ( memcmp(pline, "double*", 7) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
276
277
278
279
280
		{
		  pline += 7;
		  funcargtype[i] = ISDOUBLEP;
		  funcargname[i] = pline;
		}
281
	      else if ( memcmp(pline, "double", 6) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
		{
		  pline += 6;
		  funcargtype[i] = ISDOUBLE;
		  funcargname[i] = pline;
		}
	      else 
		{
		  printf("%s not implemented\n", funcargname[i]);
		  break;
		}
	    }
	  if ( i != funcargc ) continue;

	  strcpy(sname, funcname);
	  len = strlen(sname);
	  /*
	  ii = 0;
	  for ( i = 0; i < len; i++ )
	    {
	      if ( isupper((int) sname[i]) ) break;
	      if ( islower((int) sname[i]) ) sname[i] = toupper((int) sname[i]);
	    }
	  sname[len+1] = 0;
	  for ( ii = len; ii > i; ii-- )
	    {
	      sname[ii] = sname[ii-1];
	    }
	  sname[i] = '_';
	  len++;
	  */
	  
	  /* fortran include */

	  if ( functype == ISVOID )
	    fprintf(fpinc, "!     %-16s", "");
	  else
	    fprintf(fpinc, "      %-16s", f77name[functype]);

          fprintf(fpinc, "%s", sname);
	  fprintf(fpinc, "\n");
	  if ( (funcargc == 1 && funcargtype[0] == ISVOID) ) funcargc = 0;
	  for ( i = 0; i < funcargc; i++ )
	    {
	      if ( i == 0 )
		fprintf(fpinc, "!%36s(", "");
	      else
		fprintf(fpinc, ",\n!%36s ", "");
	      fprintf(fpinc, "%-16s%s", f77name[funcargtype[i]], funcargname[i]);
	    }
	  if ( funcargc )
	    fprintf(fpinc, ")\n");
	  fprintf(fpinc, "      %-16s%s\n\n", "EXTERNAL", sname);

	  /* fortran interface */

	  if ( functype == ISVOID )
	    fprintf(fpint, "FCALLSCSUB");
	  else
	    fprintf(fpint, "FCALLSCFUN");
	  fprintf(fpint, "%d ", funcargc);
	  fprintf(fpint, "(");
	  if ( functype != ISVOID )
	    fprintf(fpint, "%s, ", cfint[functype]);
	  fprintf(fpint, "%s, ", funcname);
	  for ( i = 0; i < len; i++ ) sname[i] = toupper((int) sname[i]);
	  fprintf(fpint, "%s, ", sname);
	  for ( i = 0; i < len; i++ ) sname[i] = tolower((int) sname[i]);
	  fprintf(fpint, "%s", sname);
	  for ( i = 0; i < funcargc; i++ )
	    {
	      fprintf(fpint, ", %s", cfint[funcargtype[i]]);
	    } 
	  fprintf(fpint, ")\n");


	  if ( strcmp(funcname, xname) == 0 ) 
	    {
	      char xline[128];
	      char farg[128];
	      int nch, ncha = 0, nchn;
	      
	      /* C Quick Guide */

	      cdoc[ncdoc].naline = 0;
	      cdoc[ncdoc].text   = NULL;
	      cdoc[ncdoc].fname  = strdup(funcname);

	      nch = sprintf(xline, "%s %s (", cname[functype], xname);

	      if ( (funcargc == 1 && funcargtype[0] == ISVOID) ) funcargc = 0;

	      for ( i = 0; i < funcargc; i++ )
		{
		  if ( i ) strcat(xline, ", ");

		  nchn  = sprintf(farg, "%s%s", cname[funcargtype[i]], funcargname[i]);
		  if ( (strlen(xline)+nchn) > 80 )
		    {
		      cdoc[ncdoc].aline[cdoc[ncdoc].naline++] = strdup(xline);
		      sprintf(xline, "%*s", nch, "");
		    }
		  strcat(xline, farg);
		}
	      if ( funcargc ) strcat(xline, ");");
	      cdoc[ncdoc].aline[cdoc[ncdoc].naline++] = strdup(xline);
	      cdoc[ncdoc].text  = strdup(xdes);

	      ncdoc++;

	      /* Fortran Quick Guide */

	      ncha = 0;
	      fdoc[nfdoc].naline = 0;
	      fdoc[nfdoc].text   = NULL;
	      fdoc[nfdoc].fname  = strdup(funcname);

	      if ( functype == ISVOID )
		nch = sprintf(xline, "SUBROUTINE %s (", xname);
	      else
		nch = sprintf(xline, "%s FUNCTION %s (", f77name[functype], xname);

	      if ( (funcargc == 1 && funcargtype[0] == ISVOID) ) funcargc = 0;

	      for ( i = 0; i < funcargc; i++ )
		{
		  if ( i ) strcat(xline, ", ");

		  nchn  = sprintf(farg, "%s %s", f77name[funcargtype[i]], funcargname[i]);
		  if ( (strlen(xline)+nchn) > 80 )
		    {
		      fdoc[nfdoc].aline[fdoc[nfdoc].naline++] = strdup(xline);
		      sprintf(xline, "%*s", nch, "");
		    }
		  strcat(xline, farg);
		}
	      if ( funcargc ) strcat(xline, ")");
	      fdoc[nfdoc].aline[fdoc[nfdoc].naline++] = strdup(xline);
	      fdoc[nfdoc].text  = strdup(xdes);

	      nfdoc++;
	    }
	}
424
      else if ( memcmp(line, "#define", 7) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
	{
	  pline = line;
	  pline += 7;
	  while ( isspace((int) *pline) ) pline++;
	  parname = pline;
	  len = strlen(pline);
	  for ( i = 0; i < len; i++ )
	    {
	      if ( isspace((int) pline[i]) ) break;
	    }
	  if ( i == len ) continue;
	  parname[i] = 0;
	  pline += i+1;
	  while ( isspace((int) *pline) ) pline++;
	  if ( ! (isdigit((int) *pline) || *pline == '-') ) continue;
	  parvalue = atoi(pline);

	  /* fortran include */
	  
	  fprintf(fpinc, "      INTEGER    %-22s\n", parname);
	  fprintf(fpinc, "      PARAMETER (%-22s = %2d)\n", parname, parvalue);
	}
447
      else if ( memcmp(line, "/*", 2) == 0 )
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
	{
	  int dpos = 0;
	  pline = line;
	  pline += 2;
	  while ( isspace((int) *pline) ) pline++;
	  comment = pline;
	  len = strlen(pline);
	  if ( len == 0 ) continue;
	  for ( i = len-1; i > 0; i-- )
	    if ( pline[i-1] == '*' && pline[i] == '/' ) break;

	  if ( i == 0 ) continue;
	  pline[i-1] = 0;

	  len -= 2;
	  for ( i = len-1; i > 0; i-- )
	    if ( pline[i] != ' ' ) break;
	  pline[i+1] = 0;

	  for ( i = 0; i < len ; i++ )
	    if ( pline[i] == ':' ) dpos = i;

	  xname[0] = 0;
	  xdes[0]  = 0;
	  if ( dpos )
	    {
	      for ( i = dpos-1; i > 0; i-- )
		if ( pline[i] != ' ' ) break;
	      pline[i+1] = 0;
	      strcpy(xname, pline);
	      pline += dpos+1;
	      while ( isspace((int) *pline) ) pline++;
	      strcpy(xdes, pline);
	    }
	  else
	    {
	      /* fortran include */
	  
	      fprintf(fpinc, "!\n!  %s\n!\n", comment);

	      /* fortran interface */

	      fprintf(fpint, "\n/*  %s  */\n\n", comment);
	    }
	}
      else
	{
	  if ( linelen > 1 )
	    printf("skip: line %3d  size %3d  %s\n", lineno, linelen, line);
	}
    }

  fprintf(fpint, "\n");
  fprintf(fpint, "#endif\n");

  fclose(fpin);
  fclose(fpinc);
  fclose(fpint);

  qsort(cdoc, ncdoc, sizeof(Docu), doccmp);
  qsort(fdoc, nfdoc, sizeof(Docu), doccmp);

  fp = fopen("../doc/c_quick_ref.txt", "w");
  if ( fp )
    {
      fprintf(fp, "C Quick Reference\n");
      fprintf(fp, "-----------------\n\n");

      doctotxt(fp, cdoc, ncdoc);
      fclose(fp);
    }

  fp = fopen("../doc/f_quick_ref.txt", "w");
  if ( fp )
    {
      fprintf(fp, "Fortran Quick Reference\n");
      fprintf(fp, "-----------------------\n\n");

      doctotxt(fp, fdoc, nfdoc);
      fclose(fp);
    }

  fp = fopen("../doc/tex/c_quick_ref.tex", "w");
  if ( fp )
    {
      fprintf(fp, "\\chapter*{Quick Reference}\n");
      fprintf(fp, "\\addcontentsline{toc}{chapter}{Quick Reference}\n");
      fprintf(fp, "\n");
      fprintf(fp, "This appendix provide a brief listing of the C language bindings of the\n");
      fprintf(fp, "CDI library routines:\n");
      fprintf(fp, "\n");

      doctotex(fp, cdoc, ncdoc);
      fclose(fp);
    }

  fp = fopen("../doc/tex/f_quick_ref.tex", "w");
  if ( fp )
    {
      fprintf(fp, "\\chapter*{Quick Reference}\n");
      fprintf(fp, "\\addcontentsline{toc}{chapter}{Quick Reference}\n");
      fprintf(fp, "\n");
      fprintf(fp, "This appendix provide a brief listing of the Fortran language bindings of the\n");
      fprintf(fp, "CDI library routines:\n");
      fprintf(fp, "\n");

      doctotex(fp, fdoc, nfdoc);
      fclose(fp);
    }
}

int main(int argc, char *argv[])
{
  char *fname;
  char *cp;
  char fnameinc[128], fnameint[128];
  size_t len;

  if ( argc != 2 )
    {
      printf("Usage:  %s  includefile\n", argv[0]);
      return (1);
    }

  fname = argv[1];

  cp = strrchr(fname, '.');
  if ( cp == NULL ) len = strlen(fname);
  else              len = cp - fname;
  
578
579
  memcpy(fnameinc, fname, len);
  memcpy(fnameint, fname, len);
Uwe Schulzweida's avatar
Cleanup  
Uwe Schulzweida committed
580
581
582
583
584
585
586
587

  strcpy(fnameinc+len, ".inc");
  strcpy(fnameint+len, "Fortran.c");
  
  fortran_interface(fname, fnameinc, fnameint);

  return (0);
}
588
589
590
591
592
593
594
595
596
/*
 * Local Variables:
 * c-file-style: "Java"
 * c-basic-offset: 2
 * indent-tabs-mode: nil
 * show-trailing-whitespace: t
 * require-trailing-newline: t
 * End:
 */