Esempio n. 1
0
File: lwrite.c Progetto: Dbelsa/coft
lwrt_L(ftnint n, ftnlen len)
#endif
{
	if(f__recpos+LLOGW>=L_len)
		donewrec();
	wrt_L((Uint *)&n,LLOGW, len);
}
Esempio n. 2
0
static void
lwrt_L(ftnint n, ftnlen len)
{
  if ((f__recpos + LLOGW) >= L_len)
    donewrec();
  wrt_L((Uint *) &n, LLOGW, len);
}
Esempio n. 3
0
File: lwrite.c Progetto: Dbelsa/coft
lwrt_C(double a, double b)
#endif
{
	char *ba, *bb, bufa[LEFBL], bufb[LEFBL];
	int al, bl;

	al = l_g(bufa, a);
	for(ba = bufa; *ba == ' '; ba++)
		--al;
	bl = l_g(bufb, b) + 1;	/* intentionally high by 1 */
	for(bb = bufb; *bb == ' '; bb++)
		--bl;
	if(f__recpos + al + bl + 3 >= L_len)
		donewrec();
#ifdef OMIT_BLANK_CC
	else
#endif
	PUT(' ');
	PUT('(');
	l_put(ba);
	PUT(',');
	if (f__recpos + bl >= L_len) {
		(*f__donewrec)();
#ifndef OMIT_BLANK_CC
		PUT(' ');
#endif
		}
	l_put(bb);
	PUT(')');
}
Esempio n. 4
0
File: lwrite.c Progetto: Dbelsa/coft
lwrt_F(double n)
#endif
{
	char buf[LEFBL];

	if(f__recpos + l_g(buf,n) >= L_len)
		donewrec();
	l_put(buf);
}
Esempio n. 5
0
static void
lwrt_F(double n)
{
  char buf[LEFBL];

  if ((f__recpos + l_g(buf, n)) >= L_len)
    donewrec();
  l_put(buf);
}
Esempio n. 6
0
File: lwrite.c Progetto: Dbelsa/coft
lwrt_I(longint n)
#endif
{
	char *p;
	int ndigit, sign;

	p = f__icvt(n, &ndigit, &sign, 10);
	if(f__recpos + ndigit >= L_len)
		donewrec();
	PUT(' ');
	if (sign)
		PUT('-');
	while(*p)
		PUT(*p++);
}
Esempio n. 7
0
static void
lwrt_A (char *p, ftnlen len)
{
  int a;
  char *p1, *pe;

  a = 0;
  pe = p + len;
  if (f__Aquote)
    {
      a = 3;
      if (len > 1 && p[len - 1] == ' ')
	{
	  while (--len > 1 && p[len - 1] == ' ');
	  pe = p + len;
	}
      p1 = p;
      while (p1 < pe)
	if (*p1++ == '\'')
	  a++;
    }
  if (f__recpos + len + a >= L_len)
    donewrec ();
  if (a
#ifndef OMIT_BLANK_CC
      || !f__recpos
#endif
    )
    PUT (' ');
  if (a)
    {
      PUT ('\'');
      while (p < pe)
	{
	  if (*p == '\'')
	    PUT ('\'');
	  PUT (*p++);
	}
      PUT ('\'');
    }
  else
    while (p < pe)
      PUT (*p++);
}
Esempio n. 8
0
static void
lwrt_I(longint n)
{
  char *p;
  int ndigit;
  int sign;

  p = f__icvt(n, &ndigit, &sign, 10);
  if ((f__recpos + ndigit) >= L_len)
    donewrec();

  PUT(' ');

  if (sign)
    PUT('-');

  while(*p)
    PUT(*p++);
}