File: autoclass.c

package info (click to toggle)
gerris 20131206+dfsg-18
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,732 kB
  • sloc: ansic: 66,593; sh: 15,922; f90: 1,513; makefile: 1,150; fortran: 696; python: 484; awk: 104; lisp: 89; xml: 27
file content (32 lines) | stat: -rw-r--r-- 752 bytes parent folder | download | duplicates (4)
1
2
3
4
5
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
#include <string.h>
#include "init.h"

int main (int argc, char * argv[])
{
  GtsObjectClass ** klass;
  int status = 0;

  klass = gfs_classes ();

  printf ("/** \\file\n"
	  " * \\brief Class hierarchy definition for doxygen */\n");

  char s[80];
  while (fgets (s, 80, stdin)) {
    char * file = strtok (s, " ");
    char * name = strtok (NULL, "\n");
    GtsObjectClass * klass = gts_object_class_from_name (name);
    if (klass == NULL) {
      fprintf (stderr, "autoclass:%s: unknown class '%s'\n", file, name);
      status = 1;
    }
    else
      printf ("/** \n"
	      " * \\defgroup %s %s\n"
	      " * \\ingroup %s\n"
	      " */\n", 
	      klass->info.name, klass->info.name, klass->parent_class->info.name);
  }

  return status;
}