*** va_decl.c 1999/11/11 16:54:45 1.1 --- va_decl.c 2001/10/11 19:46:27 *************** *** 190,195 **** --- 190,197 ---- bool hide_ptr, want_typedefs; short *ul_start; { + # define MAX_NAME_LEN 100 /* Truncate names at this length */ + # define MAX_TYPE_LEN 15 /* Truncate types at this length */ static char bufs[2][256]; typecode_t deriv, last, bt; int cur, level, fake_array; *************** *** 197,203 **** bitfield_t *bf; cur = 0; ! strcpy(bufs[cur], name); if (ul_start) /* RGA */ bufs[cur][0] = MARKER_CH; last = TY_NOTYPE; --- 199,207 ---- bitfield_t *bf; cur = 0; ! strncpy(bufs[cur], name, MAX_NAME_LEN); ! if ( strlen(name) > MAX_NAME_LEN) ! strcpy(bufs[cur]+MAX_NAME_LEN,"..."); if (ul_start) /* RGA */ bufs[cur][0] = MARKER_CH; last = TY_NOTYPE; *************** *** 264,270 **** btname = ci_basetype_name(type); } ! sprintf(bufs[1 - cur], "%s %s", btname, bufs[cur]); } cur = 1 - cur; --- 268,280 ---- btname = ci_basetype_name(type); } ! if ( strlen(btname) > MAX_TYPE_LEN) ! { ! strncpy(bufs[1 - cur],btname,MAX_TYPE_LEN); ! sprintf(bufs[1 - cur]+MAX_TYPE_LEN, "... %s", bufs[cur]); ! } ! else ! sprintf(bufs[1 - cur], "%s %s", btname, bufs[cur]); } cur = 1 - cur;