*** empty log message ***
This commit is contained in:
parent
ca336dbd9e
commit
53ddf5477d
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: func.c,v 1.32 2006-08-26 15:28:08 bacon Exp $
|
||||
* $Id: func.c,v 1.33 2006-08-26 16:30:53 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <xp/awk/awk_i.h>
|
||||
@ -826,9 +826,9 @@ static int __bfn_sin (xp_awk_t* awk, void* run)
|
||||
|
||||
if (n == 0) rv = (xp_real_t)lv;
|
||||
|
||||
#if (XP_SIZEOF_LONG_DOUBLE != 0)
|
||||
#if (XP_SIZEOF_REAL == XP_SIZEOF_LONG_DOUBLE)
|
||||
v = xp_awk_makerealval (run, (xp_real_t)sinl(rv));
|
||||
#elif (XP_SIZEOF_DOUBLE != 0)
|
||||
#elif (XP_SIZEOF_REAL == XP_SIZEOF_DOUBLE)
|
||||
v = xp_awk_makerealval (run, (xp_real_t)sin(rv));
|
||||
#else
|
||||
#error unsupported floating-point data type
|
||||
|
@ -1,4 +1,4 @@
|
||||
SRCS = awk.c err.c tree.c tab.c map.c parse.c run.c sa.c val.c misc.c
|
||||
SRCS = awk.c err.c tree.c tab.c map.c parse.c run.c sa.c val.c misc.c extio.c rex.c
|
||||
OBJS = $(SRCS:.c=.obj)
|
||||
OUT = xpawk.lib
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: awk.c,v 1.76 2006-08-26 15:28:08 bacon Exp $
|
||||
* $Id: awk.c,v 1.77 2006-08-26 16:30:53 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <xp/awk/awk.h>
|
||||
@ -169,7 +169,7 @@ static xp_ssize_t process_source (
|
||||
static xp_ssize_t dump_source (
|
||||
int cmd, void* arg, xp_char_t* data, xp_size_t size)
|
||||
{
|
||||
struct src_io* src_io = (struct src_io*)arg;
|
||||
/*struct src_io* src_io = (struct src_io*)arg;*/
|
||||
|
||||
if (cmd == XP_AWK_IO_OPEN || cmd == XP_AWK_IO_CLOSE) return 0;
|
||||
else if (cmd == XP_AWK_IO_WRITE)
|
||||
@ -528,7 +528,7 @@ static void __on_run_end (xp_awk_t* awk, void* handle, int errnum, void* arg)
|
||||
{
|
||||
xp_printf (XP_T("AWK PRORAM ABOUT TO END WITH AN ERROR - %d - %s\n"), errnum, xp_awk_geterrstr (errnum));
|
||||
}
|
||||
else xp_printf (XP_T("AWK PRORAM ENDED SUCCESSFUL\n"));
|
||||
else xp_printf (XP_T("AWK PRORAM ENDED SUCCESSFULLY\n"));
|
||||
|
||||
app_awk = NULL;
|
||||
app_run = NULL;
|
||||
@ -557,6 +557,13 @@ static int __main (int argc, xp_char_t* argv[])
|
||||
XP_AWK_SHADING | XP_AWK_IMPLICIT | XP_AWK_SHIFT |
|
||||
XP_AWK_EXTIO | XP_AWK_BLOCKLESS | XP_AWK_STRINDEXONE;
|
||||
|
||||
if (argc <= 1)
|
||||
{
|
||||
xp_awk_close (awk);
|
||||
xp_printf (XP_T("Usage: %s [-m] source_file [data_file]\n"), argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
#if defined(__STAND_ALONE) && !defined(_WIN32)
|
||||
|
@ -1,5 +1,4 @@
|
||||
BEGIN
|
||||
{
|
||||
BEGIN {
|
||||
local a, b;
|
||||
|
||||
a = 12;
|
||||
|
@ -1 +1 @@
|
||||
{ $0=" "; print NF; print "a" $0 "b"; x = $1; }
|
||||
{ /*$0=" "; */ print NF; print "a" $0 "b"; x = $1; }
|
||||
|
@ -1,2 +1,2 @@
|
||||
BEGIN { /*RS="";*/ }
|
||||
BEGIN { RS=""; }
|
||||
{ print $0; }
|
||||
|
11
ase/types.h
11
ase/types.h
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: types.h,v 1.53 2006-08-26 15:28:08 bacon Exp $
|
||||
* $Id: types.h,v 1.54 2006-08-26 16:30:52 bacon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _XP_TYPES_H_
|
||||
@ -190,9 +190,16 @@ typedef xp_int_t xp_ssize_t;
|
||||
typedef xp_uint_t xp_word_t;
|
||||
|
||||
/* floating-point number */
|
||||
#if XP_SIZEOF_LONG_DOUBLE > XP_SIZEOF_DOUBLE
|
||||
#if defined(__FreeBSD__)
|
||||
/* TODO: check if the support for long double is complete.
|
||||
* if so, use long double for xp_real_t */
|
||||
#define XP_SIZEOF_REAL XP_SIZEOF_DOUBLE
|
||||
typedef double xp_real_t;
|
||||
#elif XP_SIZEOF_LONG_DOUBLE > XP_SIZEOF_DOUBLE
|
||||
#define XP_SIZEOF_REAL XP_SIZEOF_LONG_DOUBLE
|
||||
typedef long double xp_real_t;
|
||||
#else
|
||||
#define XP_SIZEOF_REAL XP_SIZEOF_DOUBLE
|
||||
typedef double xp_real_t;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user