the output format of Dia has changed && evidently causes issues with dia2code. Attached new dia file created from same diagram.
-rw-r--r-- 1 rthompso rthompso 15810 2001-10-09 15:40 diagrams/example1.dia
-rw-r--r-- 1 rthompso rthompso 30264 2006-11-29 13:09 example1.dia
The example code generated with the examples:
rthompso@jhereg:/tmp/dia2code$ cat base.c
static int dummy = ;
int Base_foo ( Base *this, int a ){
this->foo(this, a);
}
int Base_bar ( Base *this, int xint y ){
this->bar(this, x, y);
}
rthompso@jhereg:/tmp/dia2code$ cat base.h
// Abstract
typedef struct _Base Base;
struct _Base {
/ Attributes /
/private/
int x;
/ Associations /
/ Operations /
/public/
int (foo) ( Base this, int a );
/protected/
int (bar) ( Base this, int x, int y );
};
/ Operations /
/public/
int Base_foo ( Base this, int a );
/protected/
int Base_bar ( Base this, int x, int y );
The same code generated from a duplicate diagram from dia 0.95.rthompso@jhereg:/tmp/dia2code$ cat base.c
static int dummy = ;
int Base_foo ( Base *this, int a ){
}
int Base_bar ( Base *this, int x, int y ){
}
rthompso@jhereg:/tmp/dia2code$ cat base.h
// Abstract
typedef struct _Base Base;
struct _Base {
/ Attributes /
/private/
in x;
/ Associations /
/ Operations /
};
/ Operations /
/public/
int Base_foo ( Base this, int a );
/protected/
int Base_bar ( Base this, int x, int y );
New dia file based off of old example diagram
Please consider contributing a fix - I don't know generate_code_c.c very well (I've never used it)