2018-06-23 22:35:51 +00:00
|
|
|
#include "lib.h"
|
1984-11-29 14:22:02 +00:00
|
|
|
|
2016-12-12 20:16:32 +00:00
|
|
|
String* _mki(long i)
|
1984-11-29 14:22:02 +00:00
|
|
|
{
|
2016-12-12 20:16:32 +00:00
|
|
|
char* buffer = " ";
|
|
|
|
String* s;
|
1984-11-29 14:22:02 +00:00
|
|
|
|
2016-12-12 20:16:32 +00:00
|
|
|
s = _newstr(buffer);
|
|
|
|
*((long*)s->strval) = i;
|
|
|
|
return (s);
|
1984-11-29 14:22:02 +00:00
|
|
|
}
|
2016-12-12 20:16:32 +00:00
|
|
|
String* _mkd(double d)
|
1984-11-29 14:22:02 +00:00
|
|
|
{
|
2016-12-12 20:16:32 +00:00
|
|
|
char* buffer = " ";
|
|
|
|
String* s;
|
1984-11-29 14:22:02 +00:00
|
|
|
|
2016-12-12 20:16:32 +00:00
|
|
|
s = _newstr(buffer);
|
|
|
|
*((double*)s->strval) = d;
|
|
|
|
return (s);
|
1984-11-29 14:22:02 +00:00
|
|
|
}
|
2016-12-12 20:15:25 +00:00
|
|
|
long _cvi(String* s)
|
1984-11-29 14:22:02 +00:00
|
|
|
{
|
2016-12-12 20:16:32 +00:00
|
|
|
return *((long*)s->strval);
|
1984-11-29 14:22:02 +00:00
|
|
|
}
|
2016-12-12 20:15:25 +00:00
|
|
|
double _cvd(String* s)
|
1984-11-29 14:22:02 +00:00
|
|
|
{
|
2016-12-12 20:16:32 +00:00
|
|
|
return *((double*)s->strval);
|
1984-11-29 14:22:02 +00:00
|
|
|
}
|