Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit388008c

Browse files
author
Michael Meskes
committed
Fixed dumping of structs without indicators.
1 parentb7579d6 commit388008c

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,5 +1150,9 @@ Fri Nov 2 16:16:25 CET 2001
11501150
Wed Nov 14 11:50:27 CET 2001
11511151

11521152
- Added several patches by Christof Petig <christof.petig@wtal.de>.
1153+
1154+
Tue Dec 4 13:30:32 CET 2001
1155+
1156+
- Fixed dumping of structures without indicators.
11531157
- Set ecpg version to 2.9.0.
11541158
- Set library version to 3.3.0.

‎src/interfaces/ecpg/preproc/type.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#include"extern.h"
44

5+
structECPGstruct_memberstruct_no_indicator= {"no_indicator",&ecpg_no_indicator,NULL};
6+
57
/* malloc + error check */
68
void*
79
mm_alloc(size_tsize)
@@ -374,15 +376,21 @@ ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, long arrsiz,
374376
sprintf(pbuf,"%s%s.",prefix ?prefix :"",name);
375377
prefix=pbuf;
376378

377-
sprintf(ind_pbuf,"%s%s.",ind_prefix ?ind_prefix :"",ind_name);
378-
ind_prefix=ind_pbuf;
379-
380-
if (ind_typ!=NULL)
379+
if (ind_typ==&ecpg_no_indicator)
380+
{
381+
ind_p=&struct_no_indicator;
382+
}
383+
elseif (ind_typ!=NULL)
384+
{
385+
sprintf(ind_pbuf,"%s%s.",ind_prefix ?ind_prefix :"",ind_name);
386+
ind_prefix=ind_pbuf;
381387
ind_p=ind_typ->u.members;
388+
}
389+
382390
for (p=typ->u.members;p;p=p->next)
383391
{
384392
ECPGdump_a_type(o,p->name,p->typ, (ind_p!=NULL) ?ind_p->name :NULL, (ind_p!=NULL) ?ind_p->typ :NULL,prefix,ind_prefix);
385-
if (ind_p!=NULL)
393+
if (ind_p!=NULL&&ind_p!=&struct_no_indicator)
386394
ind_p=ind_p->next;
387395
}
388396
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp