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

Commitc50b8a4

Browse files
author
Michael Meskes
committed
Applied patch by Chen Huajun <chenhj@cn.fujitsu.com> to make ecpg able to cope
with very long structs.
1 parent455b888 commitc50b8a4

File tree

1 file changed

+5
-2
lines changed
  • src/interfaces/ecpg/preproc

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,8 @@ ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsiz,
506506
*/
507507
structECPGstruct_member*p,
508508
*ind_p=NULL;
509-
charpbuf[BUFSIZ],
510-
ind_pbuf[BUFSIZ];
509+
char*pbuf= (char*)mm_alloc(strlen(name)+ ((prefix==NULL) ?0 :strlen(prefix))+3);
510+
char*ind_pbuf= (char*)mm_alloc(strlen(ind_name)+ ((ind_prefix==NULL) ?0 :strlen(ind_prefix))+3);
511511

512512
if (atoi(arrsiz)==1)
513513
sprintf(pbuf,"%s%s.",prefix ?prefix :"",name);
@@ -540,6 +540,9 @@ ECPGdump_a_struct(FILE *o, const char *name, const char *ind_name, char *arrsiz,
540540
if (ind_p!=NULL&&ind_p!=&struct_no_indicator)
541541
ind_p=ind_p->next;
542542
}
543+
544+
free(pbuf);
545+
free(ind_pbuf);
543546
}
544547

545548
void

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp