Commit 30635842 authored by claes's avatar claes

*** empty log message ***

parent fbb5cc4b
......@@ -14,7 +14,7 @@ extern "C" {
#define CNV__UNKNOWN_LINETYPE 2
int ClassRead::read( char *filename)
int ClassRead::read( char *filename)
{
int sts;
int return_sts = 1;
......@@ -22,12 +22,14 @@ int ClassRead::read( char *filename)
char line_part[4][80];
int nr;
int object_level = 0;
int classdef_level = 0;
char *s;
char line_cnt = 0;
int line_cnt = 0;
doc_init();
// Get source directory
strcpy( current_file, filename);
strcpy( source_dir, filename);
if ( (s = strrchr( source_dir, '/')))
*(s+1) = 0;
......@@ -232,6 +234,7 @@ int ClassRead::read( char *filename)
break;
case cread_eLine_ClassDef:
state |= cread_mState_ClassDef;
classdef_level = object_level;
object_state = cread_mState_ClassDef;
class_init();
if ( line_part[1][0] == '$')
......@@ -382,9 +385,9 @@ int ClassRead::read( char *filename)
}
else if ( state & cread_mState_ClassDef) {
state &= ~cread_mState_ClassDef;
if ( generate_html && html_class_open)
if ( generate_html && html_class_open && classdef_level == object_level)
html_class_close();
if ( generate_struct && struct_class_open)
if ( generate_struct && struct_class_open && classdef_level == object_level)
struct_class_close();
}
else if ( state & cread_mState_TypeDef) {
......
......@@ -109,6 +109,7 @@ class ClassRead {
int state;
int object_state;
char source_dir[200];
char current_file[200];
char attr_name[80];
char attr_flags[200];
char attr_type[80];
......
......@@ -40,7 +40,7 @@ int ClassRead::src_read( char *filename)
if ( strcmp( line, "") == 0)
continue;
if ( strncmp( line, "/**", 3) != 0 &&
if ( strncmp( line, "/*_*", 4) != 0 &&
!(state & cread_mState_Doc))
{
src_html_line( orig_line);
......@@ -51,7 +51,7 @@ int ClassRead::src_read( char *filename)
sizeof( line_part) / sizeof( line_part[0]),
sizeof( line_part[0]), 0);
if ( strcmp( low( line_part[0]), "/**") == 0)
if ( strcmp( low( line_part[0]), "/*_*") == 0)
linetype = cread_eLine_Doc;
else if ( strcmp( low( line_part[0]), "*/") == 0)
linetype = cread_eLine_DocEnd;
......
......@@ -180,7 +180,7 @@ endl;
}
fp_struct <<
"/** Class: " << class_name << endl <<
"/*_* Class: " << class_name << endl <<
" Body: " << body_name << endl <<
" @Aref " << class_name << " " << struct_name << endl <<
"*/" << endl;
......@@ -571,17 +571,11 @@ int ClassRead::struct_volname_to_id()
fp = fopen( fname, "r");
if ( !fp) {
strcpy( fname, source_dir);
strcat( fname, "usertypes.wb_load");
strcpy( fname, current_file);
fp = fopen( fname, "r");
if ( !fp) {
strcpy( fname, source_dir);
strcat( fname, "userclasses.wb_load");
fp = fopen( fname, "r");
if ( !fp) {
printf( "** Unable to open volume wb_load file\n");
return 0;
}
printf( "** Unable to find Volume declaration\n");
return 0;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment