ack/lang/basic/lib/mki.c

38 lines
425 B
C
Raw Normal View History

#include "bc_string.h"
1984-11-29 14:22:02 +00:00
1985-01-21 12:47:04 +00:00
/* $Header$ */
1984-11-29 14:22:02 +00:00
String *_mki(i)
int i;
{
char *buffer =" ";
String *s;
s= _newstr(buffer);
1984-11-29 14:22:02 +00:00
strncpy(s->strval,&i,2);
return(s);
}
String *_mkd(d)
double d;
{
char *buffer =" ";
String *s;
s= _newstr(buffer);
1984-11-29 14:22:02 +00:00
strncpy(s->strval,&d,8);
return(s);
}
_cvi(s)
String *s;
{
int i;
strncpy(&i,s->strval,2);
return(i);
}
double _cvd(s)
String *s;
{
double d;
strncpy(&d,s->strval,8);
}