ack/lang/basic/lib/oct.c
David Given d5f0107746 Build the Basic run-time library (after some modernisation).
--HG--
branch : dtrg-buildsystem
2013-05-14 16:11:29 +01:00

32 lines
397 B
C

#include <stdlib.h>
#include <stdio.h>
#include "bc_string.h"
/* $Id$ */
String *_oct(i)
int i;
{
char buffer[30];
sprintf(buffer,"%o",i);
return( (String *)_newstr(buffer));
}
String *_hex(i)
int i;
{
char buffer[30];
sprintf(buffer,"%x",i);
return( (String *)_newstr(buffer));
}
String *_nstr(f)
double f;
{
char buffer[80];
_str(f, buffer);
return (String *) _newstr(buffer);
}