Ejemplo n.º 1
0
long
ptsizer ()
{
  register short pp;
  register long nb;

  nb = 0L;

  if (pp = find1st ())
    {

      while (pp)
	{

	  nb += (ptsizes[PE_SPEC & patches[pp].paspec] + 4);
	  pp = findnxt (pp);
	}
    }

  if (nb)
    ++nb;			/* ... and one for the terminator */

#if	DEBUGPW
  if (debugsw AND debugpw)
    printf ("ptsizer():  %ld bytes required\n", nb);
#endif

  return (nb);
}
Ejemplo n.º 2
0
char *
LineFwd ()
{
  register short j, k;

  for (j = 0; j < 48; j++)
    TheBuf[j] = ' ';

  TheBuf[0] = '\260';
  TheBuf[48] = '\0';

  if (0 == ptecpos)
    return ((char *) NULL);

  if (0 == (j = findnxt (ptecpos)))
    return ((char *) NULL);

  ptecpos = j;

  memcpyw (&ptebuf.defnum, &patches[ptecpos].defnum, 6);
  pteset = TRUE;
  pte2buf ();

  k = ptecpos;

  for (j = 0; j < 8; j++)
    if (0 == (k = findnxt (k)))
      return (TheBuf);

  dspdfst (&TheBuf[2], patches[k].defnum);
  dspdfst (&TheBuf[15], patches[k].stmnum);
  dspdest (&TheBuf[28], &patches[k]);

  for (j = 0; j < 50; j++)
    if (TheBuf[j] == '\0')
      TheBuf[j] = ' ';

  TheBuf[48] = '\0';
  return (TheBuf);
}