*** empty log message ***
This commit is contained in:
parent
10f51cc517
commit
a70e9a0f76
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: func.c,v 1.12 2006-07-17 06:19:35 bacon Exp $
|
||||
* $Id: func.c,v 1.13 2006-07-17 14:27:09 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <xp/awk/awk_i.h>
|
||||
@ -226,7 +226,13 @@ static int __bfn_sin (void* run)
|
||||
|
||||
if (n == 0) rv = (xp_real_t)lv;
|
||||
|
||||
#if (XP_SIZEOF_LONG_DOUBLE != 0)
|
||||
v = xp_awk_makerealval (run, (xp_real_t)sinl(rv));
|
||||
#elif (XP_SIZEOF_DOUBLE != 0)
|
||||
v = xp_awk_makerealval (run, (xp_real_t)sin(rv));
|
||||
#else
|
||||
#error unsupported floating-point data type
|
||||
#endif
|
||||
if (v == XP_NULL)
|
||||
{
|
||||
xp_awk_seterrnum (run, XP_AWK_ENOMEM);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: rex.c,v 1.1 2006-07-17 06:21:39 bacon Exp $
|
||||
* $Id: rex.c,v 1.2 2006-07-17 14:27:09 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <xp/awk/awk_i.h>
|
||||
@ -9,6 +9,37 @@
|
||||
#include <xp/bas/assert.h>
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
CMD_ORD_CHAR,
|
||||
CMD_ANY_CHAR,
|
||||
CMD_CHAR_RANGE,
|
||||
CMD_CHAR_CLASS
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CMD_CHAR_CLASS_PUNCT,
|
||||
CMD_CHAR_CLASS_SPACE,
|
||||
CMD_CHAR_CLASS_DIGIT,
|
||||
CMD_CHAR_CLASS_ALNUM
|
||||
};
|
||||
|
||||
struct __code
|
||||
{
|
||||
unsigned char cmd;
|
||||
unsigned char bflag; /* bound flag */
|
||||
xp_char_t lbound;
|
||||
xp_char_t ubound;
|
||||
};
|
||||
|
||||
#define PC_CMD(rex,base) (rex)->code[(base)].dc.cmd
|
||||
#define PC_BFLAG(rex,base) (rex)->code[(base)].dc.bflag
|
||||
#define PC_LBOUND(rex,base) (rex)->code[(base)].dc.lbound
|
||||
#define PC_UBOUND(rex,base) (rex)->code[(base)].dc.ubound
|
||||
#define PC_VALUE(rex,base) (rex)->code[(base)].cc
|
||||
|
||||
|
||||
xp_awk_rex_t* xp_awk_rex_open (xp_awk_rex_t* rex)
|
||||
{
|
||||
if (rex == XP_NULL)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: val.c,v 1.43 2006-07-17 06:19:35 bacon Exp $
|
||||
* $Id: val.c,v 1.44 2006-07-17 14:27:09 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <xp/awk/awk_i.h>
|
||||
@ -440,7 +440,7 @@ xp_char_t* xp_awk_valtostr (
|
||||
tbuf, xp_countof(tbuf), XP_T("%f"),
|
||||
(double)((xp_awk_val_real_t*)v)->val);
|
||||
#else
|
||||
#error Unsupported floating-point data type
|
||||
#error unsupported floating-point data type
|
||||
#endif
|
||||
|
||||
if (buf == XP_NULL)
|
||||
|
@ -22,4 +22,4 @@ global x, y;
|
||||
print "====================";
|
||||
}
|
||||
|
||||
END { system ("dir /w/p"); print sin(90.0); }
|
||||
END { system ("dir /w/p"); print sin(270); }
|
||||
|
Loading…
Reference in New Issue
Block a user