Beispiel #1
0
void
puttext(char *s, char *fn, char *size)
{
if (point(s))
	{
	putfont(fn);
	putsize(size);
	fprintf(tabout, "%s",s);
	if (*fn>0) fprintf(tabout, "\\f\\n(%2d", S1);
	if (size!=0) putsize("0");
	}
}
Beispiel #2
0
void
wide(char *s, char *fn, char *size)
{
	char space[40];
	if (point((intptr_t)s))
	{
		fprintf(tabout, "\\w%c", F1);
		if (*fn>0) putfont(fn);
		if (*size) putsize(size);
		fprintf(tabout, "%s", s);
		if (*fn>0) putfont("P");
		if (*size) putsize("0");
		fprintf(tabout, "%c",F1);
	}
	else
		fprintf(tabout, "%s", nreg(space, sizeof(space), s, '-'));
}
Beispiel #3
0
void
wide(char *s, char *fn, char *size)
{
	if (point(s)) {
		Bprint(&tabout, "\\w%c", F1);
		if (*fn > 0) 
			putfont(fn);
		if (*size) 
			putsize(size);
		Bprint(&tabout, "%s", s);
		if (*fn > 0) 
			putfont("P");
		if (*size) 
			putsize("0");
		Bprint(&tabout, "%c", F1);
	} else
		Bprint(&tabout, "\\n(%c-", (int)(uintptr)s);
}
/* Append the concrete representation of SKEL to the string STR.
   Grow S with new space from POOL as necessary.  */
static svn_stringbuf_t *
unparse(const svn_skel_t *skel, svn_stringbuf_t *str, apr_pool_t *pool)
{
  if (skel->is_atom)
    {
      /* Append an atom to STR.  */
      if (use_implicit(skel))
        svn_stringbuf_appendbytes(str, skel->data, skel->len);
      else
        {
          /* Append the length to STR.  */
          char buf[200];
          int length_len;

          length_len = putsize(buf, sizeof(buf), skel->len);

          SVN_ERR_ASSERT_NO_RETURN(length_len > 0);

          /* Make sure we have room for the length, the space, and the
             atom's contents.  */
          svn_stringbuf_ensure(str, str->len + length_len + 1 + skel->len);
          svn_stringbuf_appendbytes(str, buf, length_len);
          str->data[str->len++] = ' ';
          svn_stringbuf_appendbytes(str, skel->data, skel->len);
        }
    }
  else
    {
      /* Append a list to STR.  */
      svn_skel_t *child;

      /* Emit an opening parenthesis.  */
      svn_stringbuf_ensure(str, str->len + 1);
      str->data[str->len++] = '(';

      /* Append each element.  Emit a space between each pair of elements.  */
      for (child = skel->children; child; child = child->next)
        {
          unparse(child, str, pool);
          if (child->next)
            {
              svn_stringbuf_ensure(str, str->len + 1);
              str->data[str->len++] = ' ';
            }
        }

      /* Emit a closing parenthesis.  */
      svn_stringbuf_appendbyte(str, ')');
    }

  return str;
}