+/* add "<pfx> called <sfx>" to end of buf, truncating if necessary */
+STATIC_OVL void
+xcalled(buf, siz, pfx, sfx)
+char *buf; /* eos(obuf) or eos(&obuf[PREFIX]) */
+int siz; /* BUFSZ or BUFSZ-PREFIX */
+const char *pfx; /* usually class string, sometimes more specific */
+const char *sfx; /* user assigned type name */
+{
+ int bufsiz = siz - 1 - (int) strlen(buf),
+/*JP
+ pfxlen = (int) (strlen(pfx) + sizeof " called " - sizeof "");
+*/
+ pfxlen = (int) (strlen(pfx) + sizeof "\82Æ\8cÄ\82Î\82ê\82é" - sizeof "");
+
+ if (pfxlen > bufsiz)
+ panic("xcalled: not enough room for prefix (%d > %d)",
+ pfxlen, bufsiz);
+
+#if 0 /*JP*/
+ Sprintf(eos(buf), "%s called %.*s", pfx, bufsiz - pfxlen, sfx);
+#else
+ {
+ int sfxlen = bufsiz - pfxlen;
+ /* \91S\8ap\82Ì\93r\92\86\82Å\90Ø\82ê\82»\82¤\82È\82Æ\82«\82É\82Í\82»\82Ì\8e\9a\82Ì\90æ\93ª\82Ü\82Å\96ß\82é */
+ sfxlen = sfxlen - offset_in_kanji(sfx, sfxlen);
+ /* \95Ï\90\94\96¼\82ð\95Ï\82¦\82é\82±\82Æ\82Í\82µ\82È\82¢\82ª\81Asfx\82ª\91O\81Apfx\82ª\8cã\82ë\82É\82È\82é */
+ Sprintf(eos(buf), "%.*s\82Æ\8cÄ\82Î\82ê\82é%s", sfxlen, sfx, pfx);
+ }
+#endif
+}
+