First attempt to clean stuff ; highly not working yet…

This commit is contained in:
Némo 2017-02-10 22:31:11 +01:00
parent 29721f0555
commit e5bfd92b36
280 changed files with 3683 additions and 1377 deletions

View File

@ -1,12 +0,0 @@
//------------------------------------------------------------------
// Addin-Application header control file, created with the CASIO SDK
//------------------------------------------------------------------
[OUTPUT] : "ALGEBRA.G1A"
[BINDATA] : "FXADDINror.bin"
[DISPNAME] : "Algebra"
[APPNAME] : "@ALGEBRA"
[VERSION] : "02.14.0710"
[APL_ICON] : "MainIcon.bmp"
[MODULE_NUM] : 1
[MOD1_TITLE] : "CAS"
[MOD1_ICON] : "eActivityIcon.bmp"

176
Eigen.g1w
View File

@ -1,176 +0,0 @@
[DLSimProject]
Name=Algebra
Version=02.14.0710
Model=:fx-9860G.dlm
MemoryPath=INIT
MemCardPath=SDCard
[Program1]
Program=Algebra.G1A
Debug=Debug\FXADDINror.dbg
LoadAddress=80000000:90100000
[Files]
SourceFile=:abs.cpp
SourceFile=:add.cpp
SourceFile=:adj.cpp
SourceFile=:alloc.cpp
SourceFile=:append.cpp
SourceFile=:arccos.cpp
SourceFile=:arccosh.cpp
SourceFile=:arcsin.cpp
SourceFile=:arcsinh.cpp
SourceFile=:arctan.cpp
SourceFile=:arctanh.cpp
SourceFile=:arg.cpp
SourceFile=:atomize.cpp
SourceFile=:bake.cpp
SourceFile=:bignum.cpp
SourceFile=:binomial.cpp
SourceFile=:ceiling.cpp
SourceFile=:choose.cpp
SourceFile=:circexp.cpp
SourceFile=:clear.cpp
SourceFile=:clock.cpp
SourceFile=:cofactor.cpp
SourceFile=:condense.cpp
SourceFile=:conj.cpp
SourceFile=:cons.cpp
SourceFile=:contract.cpp
SourceFile=:cos.cpp
SourceFile=:cosh.cpp
SourceFile=:data.cpp
SourceFile=:decomp.cpp
SourceFile=:define.cpp
SourceFile=:defint.cpp
SourceFile=:degree.cpp
SourceFile=:denominator.cpp
SourceFile=:derivative.cpp
SourceFile=:det.cpp
SourceFile=:dirac.cpp
SourceFile=:distill.cpp
SourceFile=:divisors.cpp
SourceFile=:dpow.cpp
SourceFile=:dsolve.cpp
SourceFile=:eigen.cpp
SourceFile=:erf.cpp
SourceFile=:erfc.cpp
SourceFile=:eval.cpp
SourceFile=:expand.cpp
SourceFile=:expcos.cpp
SourceFile=:expsin.cpp
SourceFile=:factor.cpp
SourceFile=:factorial.cpp
SourceFile=:factorpoly.cpp
SourceFile=:factors.cpp
SourceFile=:filter.cpp
SourceFile=:find.cpp
SourceFile=:float.cpp
SourceFile=:floor.cpp
SourceFile=:for.cpp
SourceFile=:gamma.cpp
SourceFile=:gcd.cpp
SourceFile=:guess.cpp
SourceFile=:hermite.cpp
SourceFile=:hilbert.cpp
SourceFile=:imag.cpp
SourceFile=:index.cpp
SourceFile=:init.cpp
SourceFile=:inner.cpp
SourceFile=:integral.cpp
SourceFile=:inv.cpp
SourceFile=:is.cpp
SourceFile=:isprime.cpp
SourceFile=:itab.cpp
SourceFile=:itest.cpp
SourceFile=:laguerre.cpp
SourceFile=:laplace.cpp
SourceFile=:lcm.cpp
SourceFile=:leading.cpp
SourceFile=:legendre.cpp
SourceFile=:list.cpp
SourceFile=:log.cpp
SourceFile=:madd.cpp
SourceFile=:mag.cpp
SourceFile=:mcmp.cpp
SourceFile=:mfactor.cpp
SourceFile=:mgcd.cpp
SourceFile=:misc.cpp
SourceFile=:mmodpow.cpp
SourceFile=:mmul.cpp
SourceFile=:mod.cpp
SourceFile=:mpow.cpp
SourceFile=:mprime.cpp
SourceFile=:mroot.cpp
SourceFile=:mscan.cpp
SourceFile=:msqrt.cpp
SourceFile=:mstr.cpp
SourceFile=:multiply.cpp
SourceFile=:nroots.cpp
SourceFile=:numerator.cpp
SourceFile=:outer.cpp
SourceFile=:partition.cpp
SourceFile=:polar.cpp
SourceFile=:pollard.cpp
SourceFile=:power.cpp
SourceFile=:prime.cpp
SourceFile=:primetab.cpp
SourceFile=:product.cpp
SourceFile=:qadd.cpp
SourceFile=:qdiv.cpp
SourceFile=:qmul.cpp
SourceFile=:qpow.cpp
SourceFile=:qsub.cpp
SourceFile=:quickfactor.cpp
SourceFile=:quotient.cpp
SourceFile=:rationalize.cpp
SourceFile=:real.cpp
SourceFile=:rect.cpp
SourceFile=:rewrite.cpp
SourceFile=:roots.cpp
SourceFile=:run.cpp
SourceFile=:scan.cpp
SourceFile=:sgn.cpp
SourceFile=:simfac.cpp
SourceFile=:simplify.cpp
SourceFile=:sin.cpp
SourceFile=:sinh.cpp
SourceFile=:stack.cpp
SourceFile=:subst.cpp
SourceFile=:sum.cpp
SourceFile=:symbol.cpp
SourceFile=:tan.cpp
SourceFile=:tanh.cpp
SourceFile=:Taumath.cpp
SourceFile=:taylor.cpp
SourceFile=:tensor.cpp
SourceFile=:transform.cpp
SourceFile=:transpose.cpp
SourceFile=:userfunc.cpp
SourceFile=:variables.cpp
SourceFile=:vectorize.cpp
SourceFile=:zero.cpp
SourceFile=:display.cpp
SourceFile=:main.cpp
SourceFile=:test.cpp
SourceFile=:console.c
SourceFile=:syscalls_.src
SourceFile=:memory.c
SourceFile=:tex\debug.c
SourceFile=:tex\disp.src
SourceFile=:tex\libText.c
SourceFile=:tex\math.c
SourceFile=:print.cpp
SourceFile=:config.c
SourceFile=:coeff.cpp
HeaderFile=:defs.h
HeaderFile=:prototypes.h
HeaderFile=:setjmp.h
HeaderFile=:stdafx.h
HeaderFile=:console.h
HeaderFile=:syscalls.h
HeaderFile=:memory.h
HeaderFile=:tex\TeX.h
HeaderFile=:tex\debug.h
HeaderFile=:tex\libText.h
HeaderFile=:config.h

143
Makefile Normal file
View File

@ -0,0 +1,143 @@
prefix = sh3eb-elf-
as = $(prefix)as
cc = $(prefix)gcc
cxx = $(prefix)g++
objcopy = $(prefix)objcopy
wrapper = g1a-wrapper
flags = -m3 -mb -Os -nostdlib
cflags = -std=c11 -W -Wall -Wno-main -pedantic
cxxflags= -std=c++11 -W -Wall -Wno-main -pedantic
include = -Iinclude/fx -Iinclude
libs = -Llib -lfx -lgcc
name = eigenmath
target-g1a = $(name).g1a
# Various files
# besselj and bessely good bye
file-src = $(addprefix src/, \
main.cpp \
engine/abs.cpp engine/add.cpp engine/adj.cpp \
engine/alloc.cpp \
engine/arccos.cpp engine/arccosh.cpp \
engine/arcsin.cpp engine/arcsinh.cpp \
engine/arctan.cpp engine/arctanh.cpp \
engine/arg.cpp engine/atomize.cpp \
engine/bake.cpp \
engine/bignum.cpp \
engine/binomial.cpp engine/ceiling.cpp \
engine/choose.cpp engine/circexp.cpp \
engine/clear.cpp engine/clock.cpp \
engine/coeff.cpp engine/cofactor.cpp \
engine/condense.cpp engine/conj.cpp \
engine/cons.cpp engine/contract.cpp \
engine/cos.cpp engine/cosh.cpp \
engine/data.cpp engine/decomp.cpp \
engine/define.cpp engine/defint.cpp \
engine/degree.cpp engine/denominator.cpp \
engine/denominator.cpp engine/derivative.cpp \
engine/det.cpp engine/dirac.cpp \
engine/display.cpp engine/distill.cpp \
engine/divisors.cpp engine/dpow.cpp \
engine/dsolve.cpp engine/eigen.cpp \
engine/erf.cpp engine/erfc.cpp \
engine/eval.cpp engine/expand.cpp \
engine/expcos.cpp engine/expsin.cpp \
engine/factor.cpp engine/factorial.cpp \
engine/factorpoly.cpp engine/factors.cpp \
engine/factors.cpp engine/filter.cpp \
engine/find.cpp engine/float.cpp \
engine/floor.cpp engine/for.cpp \
engine/gamma.cpp engine/gcd.cpp \
engine/guess.cpp engine/hermite.cpp \
engine/hilbert.cpp engine/history.cpp \
engine/imag.cpp engine/index.cpp \
engine/index.cpp engine/init.cpp \
engine/inner.cpp engine/integral.cpp \
engine/inv.cpp engine/is.cpp \
engine/isprime.cpp engine/itab.cpp \
engine/itest.cpp engine/laguerre.cpp \
engine/laplace.cpp engine/lcm.cpp \
engine/leading.cpp engine/legendre.cpp \
engine/list.cpp engine/log.cpp \
engine/madd.cpp engine/mag.cpp \
engine/main_engine.cpp engine/mcmp.cpp \
engine/mfactor.cpp engine/mgcd.cpp \
engine/misc.cpp engine/mmodpow.cpp \
engine/mmul.cpp engine/mod.cpp \
engine/mprime.cpp engine/mroot.cpp \
engine/mscan.cpp engine/msqrt.cpp \
engine/mstr.cpp engine/multiply.cpp \
engine/nroots.cpp engine/numerator.cpp \
engine/outer.cpp engine/partition.cpp \
engine/polar.cpp engine/pollard.cpp \
engine/power.cpp engine/prime.cpp \
engine/primetab.cpp engine/print.cpp \
engine/product.cpp engine/qadd.cpp \
engine/qdiv.cpp engine/qmul.cpp \
engine/qpow.cpp engine/qsub.cpp \
engine/quickfactor.cpp engine/quotient.cpp \
engine/rationalize.cpp engine/real.cpp \
engine/rect.cpp engine/rewrite.cpp \
engine/roots.cpp engine/run.cpp \
engine/scan.cpp engine/sgn.cpp \
engine/simfac.cpp engine/simplify.cpp \
engine/sin.cpp engine/sinh.cpp \
engine/stack.cpp engine/subst.cpp \
engine/sum.cpp engine/symbol.cpp \
engine/tan.cpp engine/tanh.cpp \
engine/taylor.cpp engine/tensor.cpp \
engine/test.cpp engine/transform.cpp \
engine/transpose.cpp engine/userfunc.cpp \
engine/variables.cpp engine/vectorize.cpp \
engine/zero.cpp )
file-obj = $(patsubst src/%,build/%.o,$(file-src) $(file-res))
file-ld = addin.ld
file-icon = icon.bmp
#---
# Building.
#---
# Generic rules
all: build $(target-g1a)
@echo "[ \033[32;1mOK\033[0m ] All done!"
build:
mkdir -p $@
$(target-g1a): $(file-obj)
$(cc) -o build/$(name).elf $(cflags) -T $(file-ld) $^ $(libs)
$(ob) -R .comment -R .bss -O binary build/$(name).elf build/$(name).bin
g1a-wrapper build/$(name).bin -o $@ $(wrap)
@echo "[ \033[32;1mOK\033[0m ] demo app: `stat -c %s $@` bytes"
build/%.c.o: src/%.c $(file-dep)
$(cc) -c $< -o $@ $(cflags) $(include)
build/%.cpp.o: src/%.cpp $(file-dep)
$(cxx) -c $< -o $@ $(cxxflags) $(include)
build/font_%.bmp.o: res/font_%.bmp
fxconv $< -o $@ --font -n $(<:res/%.bmp=res_%)
build/map_%.bmp.o: res/map_%.bmp
fxconv $< -o $@ --map -n $(<:res/%.bmp=res_%) $(map-options)
build/%.bmp.o: res/%.bmp
fxconv $< -o $@ -n $(<:res/%.bmp=res_%)
#---
# Cleaning and others.
#---
clean:
@ rm -rf build/*
mrproper: clean
@ rm -f $(target-g1a)
@ rm -rf build
distclean: mrproper

View File

@ -1,91 +0,0 @@
#include <stdio.h>
#include <setjmp.h>
#include "defs.h"
extern "C"{
#include "console.h"
#include "fxlib.h"
#define EXPR_BUF_SIZE 256
extern U ** mem;
extern unsigned int **free_stack;
int
initialize_tuamath()
{
// modified by anderain
free_stack = (unsigned int**) calloc(500,sizeof(unsigned int*));
mem = (U**) calloc(100,sizeof(U*));
stack = (U**) calloc(TOS,sizeof(U*));
symtab = (U*) calloc(NSYM,sizeof(U));
binding = (U**) calloc(NSYM,sizeof(U*));
arglist = (U**) calloc(NSYM,sizeof(U*));
logbuf = (char*) calloc(256,1);
}
const unsigned char *Setup[]={
"logab(a,b)=log(b)/log(a)",
"log10(x)=log(x)/log(10)",
"ln(x)=log(x)",
"cis(x)=cos(x)+i*sin(x)",
"cot(x)=1/tan(x)",
"coth(x)=cosh(x)/sinh(x)",
"arccot(x)=arctan(1/x)",
"arccoth(x)=arctanh(1/x)",
"sec(x)=1/cos(x)",
"sech(x)=1/cosh(x)",
"arcsec(x)=arccos(1/x)",
"arcsech(x)=arccosh(1/x)",
"csc(x)=1/sin(x)",
"csch(x)=1/sinh(x)",
"arccsc(x)=arcsin(1/x)",
"arccsch(x)=arcsinh(1/x)",
"npr(n,r)=(n!)/(n-r)!",
"ncr(n,r)=n!/(r!(n-r)!)",
"xor(x,y)=or(and(x,not(y)),and(not(x),y))",
NULL,
}
int AddIn_main(int isAppli, unsigned short OptionNum)
{
unsigned int key;
unsigned char *expr;
initialize_tuamath();
// initialize failed ?
if (!(free_stack && mem && stack && symtab && binding && arglist && logbuf))
return 0;
int i = 0;
while(Setup[i] != NULL)
{
run((char *)Setup[i++]);
}
Console_Init();
Console_Disp();
while(1)
{
if((expr=Console_GetLine())==NULL) stop("memory error");
run((char *)expr);
Console_NewLine(LINE_TYPE_OUTPUT,1);
Console_Disp();
}
for(;;)GetKey(&key);
return 1;
}
#pragma section _BR_Size
unsigned long BR_Size;
#pragma section
#pragma section _TOP
int InitializeSystem(int isAppli, unsigned short OptionNum)
{
return INIT_ADDIN_APPLICATION(isAppli, OptionNum);
}
#pragma section
}

BIN
build/engine/abs.cpp.o Normal file

Binary file not shown.

BIN
build/engine/add.cpp.o Normal file

Binary file not shown.

BIN
build/engine/adj.cpp.o Normal file

Binary file not shown.

BIN
build/engine/alloc.cpp.o Normal file

Binary file not shown.

BIN
build/engine/arccos.cpp.o Normal file

Binary file not shown.

BIN
build/engine/arccosh.cpp.o Normal file

Binary file not shown.

BIN
build/engine/arcsin.cpp.o Normal file

Binary file not shown.

BIN
build/engine/arcsinh.cpp.o Normal file

Binary file not shown.

BIN
build/engine/arctan.cpp.o Normal file

Binary file not shown.

BIN
build/engine/arctanh.cpp.o Normal file

Binary file not shown.

BIN
build/engine/arg.cpp.o Normal file

Binary file not shown.

BIN
build/engine/atomize.cpp.o Normal file

Binary file not shown.

BIN
build/engine/bake.cpp.o Normal file

Binary file not shown.

BIN
build/engine/bignum.cpp.o Normal file

Binary file not shown.

BIN
build/engine/binomial.cpp.o Normal file

Binary file not shown.

BIN
build/engine/ceiling.cpp.o Normal file

Binary file not shown.

BIN
build/engine/choose.cpp.o Normal file

Binary file not shown.

BIN
build/engine/circexp.cpp.o Normal file

Binary file not shown.

BIN
build/engine/clear.cpp.o Normal file

Binary file not shown.

BIN
build/engine/clock.cpp.o Normal file

Binary file not shown.

BIN
build/engine/coeff.cpp.o Normal file

Binary file not shown.

BIN
build/engine/cofactor.cpp.o Normal file

Binary file not shown.

BIN
build/engine/condense.cpp.o Normal file

Binary file not shown.

BIN
build/engine/conj.cpp.o Normal file

Binary file not shown.

BIN
build/engine/cons.cpp.o Normal file

Binary file not shown.

BIN
build/engine/contract.cpp.o Normal file

Binary file not shown.

BIN
build/engine/cos.cpp.o Normal file

Binary file not shown.

BIN
build/engine/cosh.cpp.o Normal file

Binary file not shown.

BIN
build/engine/data.cpp.o Normal file

Binary file not shown.

BIN
build/engine/decomp.cpp.o Normal file

Binary file not shown.

BIN
build/engine/define.cpp.o Normal file

Binary file not shown.

BIN
build/engine/defint.cpp.o Normal file

Binary file not shown.

BIN
build/engine/degree.cpp.o Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
build/engine/det.cpp.o Normal file

Binary file not shown.

BIN
build/engine/dirac.cpp.o Normal file

Binary file not shown.

BIN
build/engine/display.cpp.o Normal file

Binary file not shown.

BIN
build/engine/distill.cpp.o Normal file

Binary file not shown.

BIN
build/engine/divisors.cpp.o Normal file

Binary file not shown.

BIN
build/engine/dpow.cpp.o Normal file

Binary file not shown.

BIN
build/engine/dsolve.cpp.o Normal file

Binary file not shown.

BIN
build/engine/eigen.cpp.o Normal file

Binary file not shown.

BIN
build/engine/erf.cpp.o Normal file

Binary file not shown.

BIN
build/engine/erfc.cpp.o Normal file

Binary file not shown.

BIN
build/engine/eval.cpp.o Normal file

Binary file not shown.

BIN
build/engine/expand.cpp.o Normal file

Binary file not shown.

BIN
build/engine/expcos.cpp.o Normal file

Binary file not shown.

BIN
build/engine/expsin.cpp.o Normal file

Binary file not shown.

BIN
build/engine/factor.cpp.o Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
build/engine/factors.cpp.o Normal file

Binary file not shown.

BIN
build/engine/filter.cpp.o Normal file

Binary file not shown.

BIN
build/engine/find.cpp.o Normal file

Binary file not shown.

BIN
build/engine/float.cpp.o Normal file

Binary file not shown.

BIN
build/engine/floor.cpp.o Normal file

Binary file not shown.

BIN
build/engine/for.cpp.o Normal file

Binary file not shown.

BIN
build/engine/gamma.cpp.o Normal file

Binary file not shown.

BIN
build/engine/gcd.cpp.o Normal file

Binary file not shown.

BIN
build/engine/guess.cpp.o Normal file

Binary file not shown.

BIN
build/engine/hermite.cpp.o Normal file

Binary file not shown.

BIN
build/engine/hilbert.cpp.o Normal file

Binary file not shown.

BIN
build/main.cpp.o Normal file

Binary file not shown.

View File

@ -12,7 +12,7 @@ extern "C"{
#include <stdlib.h>
#include <string.h>
#include "fxlib.h"
#include "libfx.h"
enum CONSOLE_SCREEN_SPEC{
LINE_MAX = 32,
@ -98,4 +98,4 @@ extern "C"{
#ifdef __cplusplus
}
#endif
#endif
#endif

BIN
include/fx/.string.h.swp Normal file

Binary file not shown.

29
include/fx/_h_c_lib.h Normal file
View File

@ -0,0 +1,29 @@
/*------------------------------------------------------*/
/* SH SERIES C/C++ Compiler Ver. 6.0 */
/* Copyright (c) 1992,2000 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/***********************************************************************/
/* SPEC; */
/* NAME = _h_c_lib.h : */
/* */
/* FUNC = Include file for SH SERIES C/C++ Compiler environment */
/* */
/* CLAS = UNIT; */
/* */
/* END; */
/***********************************************************************/
#ifndef _H_C_LIB
#define _H_C_LIB
#ifdef __cplusplus
extern "C"{
#endif
extern void _CALL_INIT(void); /* for global class object initial processing */
extern void _CALL_END(void); /* for global class object post-processing */
#ifdef __cplusplus
}
#endif /* #ifdef __cplusplus */
#endif /* #ifndef _H_C_LIB */

39
include/fx/assert.h Normal file
View File

@ -0,0 +1,39 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/***********************************************************************/
/* SPEC; */
/* NAME = assert.h : debug macro define ; */
/* */
/* FUNC = this module do the following functions; */
/* (1) if NDEBUG defined assert(x) = (void)0; */
/* CLAS = UNIT; */
/* */
/* END; */
/***********************************************************************/
#ifndef _ASSERT
#define _ASSERT
#include <stdio.h>
#ifdef NDEBUG
#ifdef assert
#undef assert
#endif
#define assert(x) ((void)0)
#else
#ifdef assert
#undef assert
#endif
#define assert(x) ( x ? (void) 0 : (fprintf(stderr,\
"ASSERTION FAILED: "#x" FILE %s,LINE %d \n", \
__FILE__,__LINE__),abort(),(void)0))
#endif
#ifdef __cplusplus
extern "C" {
void abort(void);
}
#endif
#endif

84
include/fx/builtin.h Normal file
View File

@ -0,0 +1,84 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 6.0 */
/* Copyright (c) 1992, 2000 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = builtin : */
/* */
/* FUNC = this header file do the following functions; */
/* (1)builtin function prototype define; */
/* */
/* CLAS = UNIT ; */
/* */
/* END ; */
/*****************************************************************/
#ifndef _BUILTIN
#define _BUILTIN
#ifdef __cplusplus
extern "C" {
/* follow math.h & mathf.h */
extern float _builtin_fabsf(float);
extern double _builtin_fabs(double);
extern float _builtin_sqrtf(float);
extern double _builtin_sqrt(double);
/* follow private.h */
extern void _builtin_fsca(long ,float *,float *);
extern float _builtin_fsrra(float);
/* follow smachine.h */
extern void _builtin_set_imask(int);
extern int _builtin_get_imask(void);
extern void _builtin_set_cr(int);
extern int _builtin_get_cr(void);
extern void _builtin_set_vbr(void *);
extern void *_builtin_get_vbr(void);
extern void _builtin_sleep(void);
/* follow string.h */
extern char *_builtin_strcpy(char *, const char *);
extern int _builtin_strcmp(const char *, const char *);
/* follow umachine.h */
extern void _builtin_set_gbr(void *);
extern void *_builtin_get_gbr(void);
extern unsigned char _builtin_gbr_read_byte(int);
extern unsigned short _builtin_gbr_read_word(int);
extern unsigned long _builtin_gbr_read_long(int);
extern void _builtin_gbr_write_byte(int, unsigned char);
extern void _builtin_gbr_write_word(int, unsigned short);
extern void _builtin_gbr_write_long(int, unsigned long);
extern void _builtin_gbr_and_byte(int, unsigned char);
extern void _builtin_gbr_or_byte(int, unsigned char);
extern void _builtin_gbr_xor_byte(int, unsigned char);
extern int _builtin_gbr_tst_byte(int, unsigned char);
extern int _builtin_tas(char *);
extern int _builtin_trapa(int);
extern int _builtin_macw(short *, short *, unsigned int);
extern int _builtin_macwl(short *, short *, unsigned int, unsigned int);
extern int _builtin_macl(int *, int *, unsigned int);
extern int _builtin_macll(int *, int *, unsigned int, unsigned int);
extern int _builtin_trapa_svc(...);
extern void _builtin_prefetch(void *);
extern void _builtin_set_fpscr(int);
extern int _builtin_get_fpscr(void);
extern float _builtin_fipr(float a1[], float b1[]);
extern void _builtin_ftrv(float a1[], float b1[]);
extern void _builtin_ftrvadd(float a1[], float b1[], float c1[]);
extern void _builtin_ftrvsub(float a1[], float b1[], float c1[]);
extern void _builtin_mtrx4mul(float [][4], float [][4]);
extern void _builtin_mtrx4muladd(float [][4], float [][4], float [][4]);
extern void _builtin_mtrx4mulsub(float [][4], float [][4], float [][4]);
extern void _builtin_ld_ext(float [][4]);
extern void _builtin_st_ext(float [][4]);
extern void _builtin_add4(float a1[], float b1[], float c1[]);
extern void _builtin_sub4(float a1[], float b1[], float c1[]);
extern void _builtin_trace(int);
}
#endif /* #ifdef __cplusplus */
#endif /* #ifndef _BUILTIN */

189
include/fx/complex Normal file
View File

@ -0,0 +1,189 @@
//Embedded C++ Library
//Copyright (c) Hitachi,Ltd. 1997
//Licensed material of Hitachi,Ltd
//====================================================================
// File: complex
// Purpose: Numerics library / Complex numbers
// Header <complex>
// Create: 1997.09.20 Rev. 1.0
//====================================================================
#ifndef _COMPLEX_
#define _COMPLEX_
#include <istream>
#include <ostream>
class float_complex; // based on float
class double_complex; // based on double
// complex specialization
class float_complex {
public:
typedef float value_type;
float_complex(float re = 0.0f, float im = 0.0f){
_re = re; _im = im; return; }
float_complex(const double_complex&);
float real() const{ return (_re);}
float imag() const{ return (_im);}
float_complex& operator= (float rhs){
_re = rhs; _im = 0.0; return *this; }
float_complex& operator+=(float rhs){ _re += rhs; return *this; }
float_complex& operator-=(float rhs){ _re -= rhs; return *this; }
float_complex& operator*=(float rhs){
_re *= rhs; _im *= rhs; return *this; }
float_complex& operator/=(float rhs){
_re /= rhs; _im /= rhs; return *this; }
float_complex& operator=(const float_complex&rhs){
_re = rhs.real(); _im = rhs.imag(); return *this; }
float_complex& operator+=(const float_complex&rhs){
_re += rhs.real(); _im += rhs.imag(); return *this; }
float_complex& operator-=(const float_complex&rhs){
_re -= rhs.real(); _im -= rhs.imag(); return *this; }
float_complex& operator*=(const float_complex&);
float_complex& operator/=(const float_complex&);
private:
float _re, _im;
};
class double_complex {
public:
typedef double value_type;
double_complex(double re = 0.0, double im = 0.0){
_re = re; _im = im; return; }
double_complex(const float_complex&rhs){
_re = (double)rhs.real(); _im = (double)rhs.imag(); return; }
double real() const{ return (_re);}
double imag() const{ return (_im);}
double_complex& operator= (double rhs){
_re = rhs; _im = 0.0; return *this; }
double_complex& operator+=(double rhs){ _re += rhs; return *this; }
double_complex& operator-=(double rhs){ _re -= rhs; return *this; }
double_complex& operator*=(double rhs){
_re *= rhs; _im *= rhs; return *this; }
double_complex& operator/=(double rhs){
_re /= rhs; _im /= rhs; return *this; }
double_complex& operator=(const double_complex&rhs){
_re = rhs.real(); _im = rhs.imag(); return *this; }
double_complex& operator+=(const double_complex&rhs){
_re += rhs.real(); _im += rhs.imag(); return *this; }
double_complex& operator-=(const double_complex&rhs){
_re -= rhs.real(); _im -= rhs.imag(); return *this; }
double_complex& operator*=(const double_complex&);
double_complex& operator/=(const double_complex&);
private:
double _re, _im;
};
// complex non-member functions
float_complex operator+(const float_complex&);
float_complex operator-(const float_complex&);
float_complex operator+(const float_complex&, const float_complex&);
float_complex operator+(const float_complex&, const float&);
float_complex operator+(const float&, const float_complex&);
float_complex operator-(const float_complex&, const float_complex&);
float_complex operator-(const float_complex&, const float&);
float_complex operator-(const float&, const float_complex&);
float_complex operator*(const float_complex&, const float_complex&);
float_complex operator*(const float_complex&, const float&);
float_complex operator*(const float&, const float_complex&);
float_complex operator/(const float_complex&, const float_complex&);
float_complex operator/(const float_complex&, const float&);
float_complex operator/(const float&, const float_complex&);
bool operator==(const float_complex&, const float_complex&);
bool operator==(const float_complex&, const float&);
bool operator==(const float&, const float_complex&);
bool operator!=(const float_complex&, const float_complex&);
bool operator!=(const float_complex&, const float&);
bool operator!=(const float&, const float_complex&);
istream& operator>>(istream&, float_complex&);
ostream& operator<<(ostream&, const float_complex&);
double_complex operator+(const double_complex&);
double_complex operator-(const double_complex&);
double_complex operator+(const double_complex&, const double_complex&);
double_complex operator+(const double_complex&, const double&);
double_complex operator+(const double&, const double_complex&);
double_complex operator-(const double_complex&, const double_complex&);
double_complex operator-(const double_complex&, const double&);
double_complex operator-(const double&, const double_complex&);
double_complex operator*(const double_complex&, const double_complex&);
double_complex operator*(const double_complex&, const double&);
double_complex operator*(const double&, const double_complex&);
double_complex operator/(const double_complex&, const double_complex&);
double_complex operator/(const double_complex&, const double&);
double_complex operator/(const double&, const double_complex&);
bool operator==(const double_complex&, const double_complex&);
bool operator==(const double_complex&, const double&);
bool operator==(const double&, const double_complex&);
bool operator!=(const double_complex&, const double_complex&);
bool operator!=(const double_complex&, const double&);
bool operator!=(const double&, const double_complex&);
istream& operator>>(istream&, double_complex&);
ostream& operator<<(ostream&, const double_complex&);
// complex value operations
float real(const float_complex&);
float imag(const float_complex&);
float abs(const float_complex&);
float arg(const float_complex&);
float norm(const float_complex&);
float_complex conj(const float_complex&);
float_complex polar(const float&, const float&);
double real(const double_complex&);
double imag(const double_complex&);
double abs(const double_complex&);
double arg(const double_complex&);
double norm(const double_complex&);
double_complex conj(const double_complex&);
double_complex polar(const double&, const double&);
// complex transcendentals
#ifdef sqrt
#undef sqrt
extern "C" double sqrt(double);
#endif
float_complex cos (const float_complex&);
float_complex cosh (const float_complex&);
float_complex exp (const float_complex&);
float_complex log (const float_complex&);
float_complex log10(const float_complex&);
float_complex pow(const float_complex&, int);
float_complex pow(const float_complex&, const float&);
float_complex pow(const float_complex&, const float_complex&);
float_complex pow(const float&, const float_complex&);
float_complex sin (const float_complex&);
float_complex sinh (const float_complex&);
float_complex sqrt (const float_complex&);
float_complex tan (const float_complex&);
float_complex tanh (const float_complex&);
double_complex cos (const double_complex&);
double_complex cosh (const double_complex&);
double_complex exp (const double_complex&);
double_complex log (const double_complex&);
double_complex log10(const double_complex&);
double_complex pow(const double_complex&, int);
double_complex pow(const double_complex&, const double&);
double_complex pow(const double_complex&, const double_complex&);
double_complex pow(const double&, const double_complex&);
double_complex sin (const double_complex&);
double_complex sinh (const double_complex&);
double_complex sqrt (const double_complex&);
double_complex tan (const double_complex&);
double_complex tanh (const double_complex&);
#endif

66
include/fx/ctype.h Normal file
View File

@ -0,0 +1,66 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = ctype : */
/* FUNC = */
/* ; */
/* */
/* */
/* */
/* CLAS = UNIT ; */
/* END ; */
/*****************************************************************/
#ifndef _CTYPE
#define _CTYPE
#ifdef __cplusplus
extern "C" {
#endif
extern unsigned char _ctype[];
extern int isalnum(int);
extern int isalpha(int);
extern int iscntrl(int);
extern int isdigit(int);
extern int isgraph(int);
extern int islower(int);
extern int isprint(int);
extern int ispunct(int);
extern int isspace(int);
extern int isupper(int);
extern int isxdigit(int);
extern int tolower(int);
extern int toupper(int);
#ifdef __cplusplus
}
#endif
#define _UPPER 0x01
#define _LOWER 0x02
#define _DIGIT 0x04
#define _SPACE 0x08
#define _PUNCT 0x10
#define _CNTRL 0x20
#define _WHITE 0x40
#define _HEX 0x80
#define isalnum(c) (_ctype[(c) & 0xff] & (_UPPER | _LOWER | _DIGIT))
#define isalpha(c) (_ctype[(c) & 0xff] & (_UPPER | _LOWER))
#define iscntrl(c) (_ctype[(c) & 0xff] & _CNTRL)
#define isdigit(c) (_ctype[(c) & 0xff] & _DIGIT)
#define isgraph(c) (_ctype[(c) & 0xff] & (_UPPER | _LOWER | _DIGIT | _PUNCT))
#define islower(c) (_ctype[(c) & 0xff] & _LOWER)
#define isprint(c) (_ctype[(c) & 0xff] & (_UPPER|_LOWER|_DIGIT|_PUNCT|_SPACE))
#define ispunct(c) (_ctype[(c) & 0xff] & _PUNCT)
#define isspace(c) (_ctype[(c) & 0xff] & _WHITE)
#define isupper(c) (_ctype[(c) & 0xff] & _UPPER)
#define isxdigit(c) (_ctype[(c) & 0xff] & _HEX)
#define tolower(c) (isupper(c) ? ((c)-'A'+'a') : (c))
#define toupper(c) (islower(c) ? ((c)-'a'+'A') : (c))
#endif

257
include/fx/ensigdsp.h Normal file
View File

@ -0,0 +1,257 @@
/*
*SHDSP Library
*Copyright (c) Hitachi,Ltd. 1998
*Licensed material of Hitachi,Ltd
*/
/***********************************************************
* File: ensigdsp.h
* Purpose: Common
* Create: 1998.03.20 Rev. 1.0
***********************************************************/
/*
** Copyright Ensigma Ltd. 1995
**
** Unauthorised copying or distribution of this software is prohibited.
**
** Version 1.0.
**
*/
/*
** ENSIGMA DSP Library
*/
/* Constants */
#ifndef _ENSIGDSP
#define _ENSIGDSP
#define BIQUAD_SIZE 6 /* no. coefficients in an IIR biquad */
#define EDSP_OK 0
#define EDSP_BAD_ARG 1
#define EDSP_NO_HEAP 2
#define EFFTALLSCALE (-1L)
#define EFFTMIDSCALE 0x55555555L
#define EFFTNOSCALE 0x00000000L
#ifdef __cplusplus /*A-10-014-01*/
extern"C"{ /*A-10-014-01*/
#endif /*A-10-014-01*/
/*
** Fourier transforms
*/
int FftComplex(short op_x[],
short op_y[],
const short ip_x[],
const short ip_y[],
long size,
long scale);
int FftInComplex(short data_x[],
short data_y[],
long size,
long scale);
int FftReal(short op_x[],
short op_y[],
const short ip[],
long size,
long scale);
/* int ip_is_x);*/
int FftInReal(short data_x[],
short data_y[],
long size,
long scale,
int not_sure_about_ip_format);
int IfftComplex(short op_x[],
short op_y[],
const short ip_x[],
const short ip_y[],
long size,
long scale);
int IfftInComplex(short data_x[],
short data_y[],
long size,
long scale);
int IfftReal(short op_x[],
short op_y[],
const short ip_x[],
const short ip_y[],
long size,
long scale,
int op_is_x_scratch_is_y);
int IfftInReal(short data_x[],
short data_y[],
long size,
long scale,
int not_sure_about_op_format);
int InitFft(long max_size);
void FreeFft(void); /*A-10-015-01*/
int LogMagnitude(short output[],
const short ip_x[],
const short ip_y[],
long no_elements,
float fscale);
/*
** These three variables are for the internal use of the library FFT
** functions only. They should not be accessed by user programs.
*/
extern long max_fft_size;
extern short *twtble;
/*
** Window functions
*/
int GenBlackman(short data[], long N);
int GenHamming(short data[], long N);
int GenHanning(short data[], long N);
int GenTriangle(short data[], long N);
/*
** Filters. The coefficients must be supplied in X and the workspace in Y.
** If it is straightforward we can support the opposite, ie Xworkspace and
** Ycoeff.
*/
int FreeFir(short **Yworkspace, long order);
int InitFir(short **Yworkspace, long order);
int InitIir(short **Yworkspace, long no_sections);
int FreeIir(short **Yworkspace, long no_sections); /*A-10-015-01*/
int InitDIir(long **Yworkspace, long no_sections);
int FreeDIir(long **Yworkspace, long no_sections); /*A-10-015-01*/
int InitLms(short **Yworkspace, long order);
int FreeLms(short **Yworkspace, long order); /*A-10-015-01*/
int Fir(short op[],
const short ip[],
long no_samples,
const short Xcoeff[],
long order,
int res_shift,
short *Yworkspace);
int Fir1(short *op_ptr,
short input,
const short Xcoeff[],
long order,
int res_shift,
short *Yworkspace);
int Iir(short op[],
const short ip[],
long no_samples,
const short Xcoeff[],
long no_sections,
short *Yworkspace);
int Iir1(short *op_ptr,
short input,
const short Xcoeff[],
long no_sections,
short *Yworkspace);
int DIir(short op[],
const short ip[],
long no_samples,
const long Xcoeff[],
long no_sections,
long *Yworkspace);
int DIir1(short *op_ptr,
const short input, /*98.01.09 C-10-005-01 */
/* short input, 98.01.09 D-10-005-01 */
const long Xcoeff[],
long no_sections,
long *Yworkspace);
int Lms(short op[],
const short ip[],
const short ref[],
long no_samples,
short Xcoeff[],
long order,
int res_shift,
short mu,
short *Yworkspace);
int Lms1(short *op_ptr,
short input,
short ref_op,
short Xcoeff[],
long order,
int res_shift,
short mu,
short *Yworkspace);
/*
** Convolution and Correlation
*/
int ConvComplete(short op[],
const short ix[],
const short iy[],
long ix_size,
long iy_size,
int res_shift);
int ConvCyclic(short op[],
const short ix[],
const short iy[],
long size,
int res_shift);
int ConvPartial(short op[],
const short ix[],
const short iy[],
long ix_size,
long iy_size,
int res_shift);
int Correlate(short op[],
const short ix[],
const short iy[],
long ix_size,
long iy_size,
long no_corr,
int x_is_larger,
int res_shift);
int CorrCyclic(short op[],
const short ix[],
const short iy[],
long size,
int reverse,
int res_shift);
/*
** Miscellaneous
*/
int GenGWnoise(short output[], long no_samples, float variance);
int MinI(short **min_ptr, short buffer[], long buff_len, int src_is_x);
int MaxI(short **max_ptr, short buffer[], long buff_len, int src_is_x);
int PeakI(short **peak_ptr, short buffer[], long buff_len, int src_is_x);
int Mean(short *mean_ptr, const short buffer[], long buff_len, int src_is_x);
int Variance(long *variance_ptr,
short *mean_ptr,
const short buffer[],
long buff_len, int src_is_x);
int VectorMult(short dest[],
const short matrixX[],
const short matrixY[],
long length,
int res_shift);
int MatrixMult(void *matrix3,
const void *matrixX,
const void *matrixY,
long m,
long n,
long p,
int res_shift, int dest_is_x);
int MsPower(long *pow_ptr, const short input[], long buff_size, int src_is_x);
int CopyXtoY(short y[], const short x[], long n);
int CopyYtoX(short x[], const short y[], long n);
int CopyToX(short x[], const short src[], long n);
int CopyToY(short y[], const short src[], long n);
int CopyFromX(short src[], const short x[], long n);
int CopyFromY(short src[], const short y[], long n);
int Limit(short data[], long no_elements, int data_is_x);
#ifdef __cplusplus /*A-10-014-01*/
} /*A-10-014-01*/
#endif /*A-10-014-01*/
#endif

114
include/fx/errno.h Normal file
View File

@ -0,0 +1,114 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = errno : */
/* FUNC = */
/* ; */
/* */
/* */
/* */
/* CLAS = UNIT ; */
/* END ; */
/*****************************************************************/
#ifndef _ERRNO
#define _ERRNO
#ifndef ERANGE
#define ERANGE 1100
#endif
#ifndef EDOM
#define EDOM 1101
#endif
#ifndef EDIV
#define EDIV 1102
#endif
#ifndef ESTRN
#define ESTRN 1104
#endif
#ifndef PTRERR
#define PTRERR 1106
#endif
#ifndef SEQERR
#define SEQERR 1108
#endif
#ifndef ECBASE
#define ECBASE 1200
#endif
#ifndef ETLN
#define ETLN 1202
#endif
#ifndef EEXP
#define EEXP 1204
#endif
#ifndef EEXPN
#define EEXPN 1206
#endif
#ifndef ENUM
#define ENUM 1208
#endif
#ifndef EFLOATO
#define EFLOATO 1210
#endif
#ifndef EFLOATU
#define EFLOATU 1220
#endif
#ifndef EDBLO
#define EDBLO 1250
#endif
#ifndef EDBLU
#define EDBLU 1260
#endif
#ifndef ELDBLO
#define ELDBLO 1270
#endif
#ifndef ELDBLU
#define ELDBLU 1280
#endif
#ifndef NOTOPN
#define NOTOPN 1300
#endif
#ifndef EBADF
#define EBADF 1302
#endif
#ifndef ECSPEC
#define ECSPEC 1304
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern volatile int _errno;
#ifdef __cplusplus
}
#endif
#ifndef errno
#define errno _errno
#endif
#endif

74
include/fx/exception.h Normal file
View File

@ -0,0 +1,74 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/***********************************************************************/
/* SPEC; */
/* NAME = exception.h : */
/* */
/* FUNC = Include file for exception handling (see 18.6) */
/* */
/* CLAS = UNIT; */
/* */
/* END; */
/***********************************************************************/
#ifndef _EXCEPTION_H
#define _EXCEPTION_H
/* This lets users disable the EDG supplied exception classes. */
#ifndef __NO_EDG_EXCEPTION_CLASSES
#include <stdexcept.h>
#ifdef __EDG_RUNTIME_USES_NAMESPACES
namespace std {
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
/*
If bool is not supported, use a typedef for bool.
*/
#ifdef _BOOL
typedef bool __bool;
#else /* ifndef _BOOL */
typedef int __bool;
#endif /* ifdef _BOOL */
class bad_exception : public exception {
public:
bad_exception() throw();
bad_exception(const bad_exception&) throw();
bad_exception& operator=(const bad_exception&) throw();
virtual ~bad_exception() throw();
virtual const char* what() const throw();
};
typedef void (*terminate_handler)();
extern terminate_handler set_terminate(terminate_handler);
typedef void (*unexpected_handler)();
extern unexpected_handler set_unexpected(unexpected_handler);
/* unexpected and terminate are in the WP definition of exception.h.
It is not clear why. */
void terminate();
void unexpected();
extern __bool uncaught_exception();
#ifdef __EDG_RUNTIME_USES_NAMESPACES
} /* namespace */
#ifdef __EDG_IMPLICIT_USING_STD
/* Implicitly include a using directive for the STD namespace when this
preprocessing flag is TRUE. */
using namespace std;
#endif /* ifdef __EDG_IMPLICIT_USING_STD */
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
#endif /* ifndef __NO_EDG_EXCEPTION_CLASSES */
#endif /* _EXCEPTION_H */

26
include/fx/filt_ws.h Normal file
View File

@ -0,0 +1,26 @@
/*
*SHDSP Library
*Copyright (c) Hitachi,Ltd. 1998
*Licensed material of Hitachi,Ltd
*/
/***********************************************************
* File: filt_ws.h
* Purpose: Filter
* Create: 1998.03.20 Rev. 1.0
***********************************************************/
#ifndef FILT_WS
#define FILT_WS
#ifndef WS_SIZE
#define WS_SIZE 1024 /* Set Global workspace buffer size=1024 shorts (2048 bytes) */
#endif
#define MEMSIZE WS_SIZE*sizeof(short)
#pragma section Y /*need to equate DYRAM with link.cmd file*/
short ws_mem[WS_SIZE];
short * ws_ptr=ws_mem;
long ws_left=MEMSIZE;
#pragma section
#endif

208
include/fx/float.h Normal file
View File

@ -0,0 +1,208 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = float : */
/* FUNC = limit about float type and double type ; */
/* */
/* */
/* END ; */
/*****************************************************************/
#ifndef _FLOAT
#define _FLOAT
extern const float _FLT_MAX_VAL;
extern const float _FLT_MIN_VAL;
extern const double _DBL_MAX_VAL;
extern const double _DBL_MIN_VAL;
extern const long double _LDBL_MAX_VAL;
extern const long double _LDBL_MIN_VAL;
#ifndef _FPD
#define FLT_RADIX 2
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_RON))
#define FLT_ROUNDS 0
#define FLT_GUARD 0
#else
#define FLT_ROUNDS 1
#define FLT_GUARD 1
#endif
#define FLT_NORMALIZE 1
#define FLT_MAX _FLT_MAX_VAL
#define FLT_MIN _FLT_MIN_VAL
#define FLT_MAX_EXP 127
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_DON))
#define FLT_MIN_EXP (-126)
#else
#define FLT_MIN_EXP (-149)
#endif
#define FLT_MAX_10_EXP 38
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_DON))
#define FLT_MIN_10_EXP (-38)
#else
#define FLT_MIN_10_EXP (-44)
#endif
#define FLT_DIG 6
#define FLT_MANT_DIG 24
#define FLT_EXP_DIG 8
#if defined(_SH2E)|defined(_SH3E)|(defined(_SH4)&!defined(_RON))
#define FLT_POS_EPS 1.1920928955078125e-7f
#if defined(_DON)
#define FLT_NEG_EPS 1.4012984643248171e-45f
#else
#define FLT_NEG_EPS 1.1754943508222876e-38f
#endif
#else
#define FLT_POS_EPS 5.9604648328104311e-8f
#define FLT_NEG_EPS 2.9802324164052156e-8f
#endif
#define FLT_POS_EPS_EXP (-23)
#if defined(_SH2E)|defined(_SH3E)|defined(_SH4)
#define FLT_NEG_EPS_EXP (-126)
#else
#define FLT_NEG_EPS_EXP (-24)
#endif
#endif
#if defined(_FLT)|defined(_FPS)
#define DBL_RADIX FLT_RADIX
#define DBL_ROUNDS FLT_ROUNDS
#define DBL_GUARD FLT_GUARD
#define DBL_NORMALIZE FLT_NORMALIZE
#define DBL_MAX _FLT_MAX_VAL
#define DBL_MIN _FLT_MIN_VAL
#define DBL_MAX_EXP FLT_MAX_EXP
#define DBL_MIN_EXP FLT_MIN_EXP
#define DBL_MAX_10_EXP FLT_MAX_10_EXP
#define DBL_MIN_10_EXP FLT_MIN_10_EXP
#define DBL_DIG FLT_DIG
#define DBL_MANT_DIG FLT_MANT_DIG
#define DBL_EXP_DIG FLT_EXP_DIG
#define DBL_POS_EPS FLT_POS_EPS
#define DBL_NEG_EPS FLT_NEG_EPS
#define DBL_POS_EPS_EXP FLT_POS_EPS_EXP
#define DBL_NEG_EPS_EXP FLT_NEG_EPS_EXP
#else
#define DBL_RADIX 2
#if defined(_SH4)&!defined(_RON)
#define DBL_ROUNDS 0
#define DBL_GUARD 0
#else
#define DBL_ROUNDS 1
#define DBL_GUARD 1
#endif
#define DBL_NORMALIZE 1
#define DBL_MAX _DBL_MAX_VAL
#define DBL_MIN _DBL_MIN_VAL
#define DBL_MAX_EXP 1023
#if defined(_SH4)&!defined(_DON)
#define DBL_MIN_EXP (-1022)
#else
#define DBL_MIN_EXP (-1074)
#endif
#define DBL_MAX_10_EXP 308
#if defined(_SH4)&!defined(_DON)
#define DBL_MIN_10_EXP (-308)
#else
#define DBL_MIN_10_EXP (-323)
#endif
#define DBL_DIG 15
#define DBL_MANT_DIG 53
#define DBL_EXP_DIG 11
#if defined(_SH4)&!defined(_RON)
#define DBL_POS_EPS 2.2204460492503131e-16
#if defined(_DON)
#define DBL_NEG_EPS 4.9406564584124655e-324
#else
#define DBL_NEG_EPS 2.2250738585072014e-308
#endif
#else
#define DBL_POS_EPS 1.1102230246251567e-16
#define DBL_NEG_EPS 5.5511151231257834e-17
#endif
#define DBL_POS_EPS_EXP (-52)
#ifdef _SH4
#ifdef _RON
#define DBL_NEG_EPS_EXP (-53)
#else
#ifdef _DON
#define DBL_NEG_EPS_EXP (-1023)
#else
#define DBL_NEG_EPS_EXP (-1022)
#endif
#endif
#else
#define DBL_NEG_EPS_EXP (-53)
#endif
#ifdef _FPD
#define FLT_RADIX DBL_RADIX
#define FLT_ROUNDS DBL_ROUNDS
#define FLT_GUARD DBL_GUARD
#define FLT_NORMALIZE DBL_NORMALIZE
#define FLT_MAX _DBL_MAX_VAL
#define FLT_MIN _DBL_MIN_VAL
#define FLT_MAX_EXP DBL_MAX_EXP
#define FLT_MIN_EXP DBL_MIN_EXP
#define FLT_MAX_10_EXP DBL_MAX_10_EXP
#define FLT_MIN_10_EXP DBL_MIN_10_EXP
#define FLT_DIG DBL_DIG
#define FLT_MANT_DIG DBL_MANT_DIG
#define FLT_EXP_DIG DBL_EXP_DIG
#define FLT_POS_EPS DBL_POS_EPS
#define FLT_NEG_EPS DBL_NEG_EPS
#define FLT_POS_EPS_EXP DBL_POS_EPS_EXP
#define FLT_NEG_EPS_EXP DBL_NEG_EPS_EXP
#endif
#endif
#ifdef _FLT
#define LDBL_RADIX 2
#define LDBL_ROUNDS 1
#define LDBL_GUARD 1
#define LDBL_NORMALIZE 1
#define LDBL_MAX _LDBL_MAX_VAL
#define LDBL_MIN _LDBL_MIN_VAL
#define LDBL_MAX_EXP 1023
#define LDBL_MIN_EXP (-1074)
#define LDBL_MAX_10_EXP 308
#define LDBL_MIN_10_EXP (-323)
#define LDBL_DIG 15
#define LDBL_MANT_DIG 53
#define LDBL_EXP_DIG 11
#define LDBL_POS_EPS 1.1102230246251567e-16
#define LDBL_NEG_EPS 5.5511151231257834e-17
#define LDBL_POS_EPS_EXP (-52)
#define LDBL_NEG_EPS_EXP (-53)
#else
#define LDBL_RADIX DBL_RADIX
#define LDBL_ROUNDS DBL_ROUNDS
#define LDBL_GUARD DBL_GUARD
#define LDBL_NORMALIZE DBL_NORMALIZE
#define LDBL_MAX DBL_MAX
#define LDBL_MIN DBL_MIN
#define LDBL_MAX_EXP DBL_MAX_EXP
#define LDBL_MIN_EXP DBL_MIN_EXP
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
#define LDBL_DIG DBL_DIG
#define LDBL_MANT_DIG DBL_MANT_DIG
#define LDBL_EXP_DIG DBL_EXP_DIG
#define LDBL_POS_EPS DBL_POS_EPS
#define LDBL_NEG_EPS DBL_NEG_EPS
#define LDBL_POS_EPS_EXP DBL_POS_EPS_EXP
#define LDBL_NEG_EPS_EXP DBL_NEG_EPS_EXP
#endif
#endif

60
include/fx/iomanip Normal file
View File

@ -0,0 +1,60 @@
//Embedded C++ Library
//Copyright (c) Hitachi,Ltd. 1997
//Licensed material of Hitachi,Ltd
//
// Embeded C++ Library Header <iomanip>
//
//====================================================================
// File: iomanip
// Purpose: Definition of class iomanip
// Create: 1997.09.20 Rev. 1.0
//====================================================================
#ifndef _IOMANIP_
#define _IOMANIP_
#include <istream>
#include <ostream>
//Class
class smanip{
private:
union{
int val_i;
char val_c;
ios_base::fmtflags val_f;
};
union{
ios_base& (*pfi)(ios_base&,int);
ios_base& (*pfc)(ios_base&,char);
ios_base& (*pff)(ios_base&,ios_base::fmtflags);
};
enum _ec2p_smanip_t{
_ec2p_smanip_i,_ec2p_smanip_c ,_ec2p_smanip_f
}_ec2p_smanip_data;
public:
smanip(ios_base& (*pf)(ios_base&,int),int arg)
:pfi(pf),val_i(arg),_ec2p_smanip_data(_ec2p_smanip_i){}
smanip(ios_base& (*pf)(ios_base&,char),char arg)
:pfc(pf),val_c(arg),_ec2p_smanip_data(_ec2p_smanip_c){}
smanip(ios_base& (*pf)(ios_base&,ios_base::fmtflags),ios_base::fmtflags arg)
:pff(pf),val_f(arg),_ec2p_smanip_data(_ec2p_smanip_f){}
friend ostream& operator << (ostream&,smanip);
friend istream& operator >> (istream&,smanip);
};
//Manipulators
smanip resetiosflags(ios_base::fmtflags);
smanip setiosflags(ios_base::fmtflags);
smanip setbase(int);
smanip setfill(char);
smanip setprecision(int);
smanip setw(int);
#endif

192
include/fx/ios Normal file
View File

@ -0,0 +1,192 @@
//Embedded C++ Library
//Copyright (c) Hitachi,Ltd. 1997
//Licensed material of Hitachi,Ltd
//
// Embeded C++ Class Library Header <ios>
//
//====================================================================
// File: ios
// Purpose: Definition of class ios
// Create: 1997.09.20 Rev. 1.0
//====================================================================
#ifndef _IOS_
#define _IOS_
class streambuf;
class ostream;
typedef long POS_T;
typedef long INT_T;
typedef long SZ_T;
typedef long OFF_T;
typedef OFF_T streamoff;
typedef SZ_T streamsize;
typedef INT_T int_type;
typedef POS_T pos_type;
typedef OFF_T off_type;
class ios_base {
public:
typedef long fmtflags;
static const fmtflags boolalpha;
static const fmtflags dec;
static const fmtflags fixed;
static const fmtflags hex;
static const fmtflags internal;
static const fmtflags left;
static const fmtflags oct;
static const fmtflags right;
static const fmtflags scientific;
static const fmtflags showbase;
static const fmtflags showpoint;
static const fmtflags showpos;
static const fmtflags skipws;
static const fmtflags unitbuf;
static const fmtflags uppercase;
static const fmtflags adjustfield;
static const fmtflags basefield;
static const fmtflags floatfield;
typedef int iostate;
static const iostate badbit;
static const iostate eofbit;
static const iostate failbit;
static const iostate goodbit;
typedef int openmode;
static const openmode app;
static const openmode ate;
static const openmode binary;
static const openmode in;
static const openmode out;
static const openmode trunc;
typedef int seekdir;
static const seekdir beg;
static const seekdir cur;
static const seekdir end;
class Init;
fmtflags flags() const {return (fmtflags)fmtfl;}
fmtflags flags(fmtflags);
fmtflags setf(fmtflags) ;
fmtflags setf(fmtflags, fmtflags);
void unsetf(fmtflags);
char fill() const {
return (char)fillch;
}
char fill(char);
int precision() const {
return prec;
}
streamsize precision(streamsize);
streamsize width() const {return wide;}
streamsize width(streamsize);
// static int xalloc() {return index++;} // Not implemented
// long & ipword(int); // Not implemented
// long * &pword(int); // Not implemented
~ios_base(){} // destructor
// callbacks -- exposition only
enum event {
erase_event,
imbue_event,
copyfmt_event
};
typedef void (*event_callback)(event, ios_base&, int index);
void register_callback(event_callback fn, int index);
static bool sync_with_stdio(bool sync = true){ return true; }
class Init{
public:
Init(){init_cnt++;}
~Init(){init_cnt--;}
private:
static int init_cnt;
};
protected:
ios_base(){Init::Init();}
void _ec2p_init_base();
void _ec2p_copy_base(ios_base &);
static const fmtflags _fmtmask;
static const iostate _statemask;
private:
fmtflags fmtfl; // format flag
streamsize prec; // number of after floating point
streamsize wide; // field width
char fillch; // fill charactor
// static int index; // exposition only
// long *iarray; // exposition only
// void **parray; // exposition only
};
class ios : public ios_base {
public:
// Types:
// typedef INT_T int_type;
// typedef POS_T pos_type;
// typedef OFF_T off_type;
operator void*() const {
return (void*)!fail();
}
bool operator!() const{return (bool)fail();}
iostate rdstate () const{return (iostate)state;}
void clear(iostate = goodbit);
void setstate(iostate);
bool good() const {return (bool)(state==goodbit);}
bool eof() const {return (bool)(state&eofbit);}
bool fail() const {return (bool)(state&(badbit|failbit));}
bool bad() const {return (bool)(state&badbit);}
iostate exceptions() const; // exposition only
void exceptions(iostate); // exposition only
ios(streambuf *sbptr){ // Constructor
init(sbptr);
}
virtual ~ios(){}; // Destructor
ostream *tie() const {return tiestr;}
ostream *tie(ostream*);
streambuf *rdbuf() const{return sb;}
streambuf *rdbuf(streambuf*);
ios & copyfmt(const ios &);
ios(){init(0);}
void init(streambuf*);
private:
streambuf *sb; // pointer to streambuf object
ostream *tiestr; // pointer to ostream object
int state; // status
};
//Manipulators
ios_base & boolalpha(ios_base&);
ios_base & noboolalpha(ios_base&);
ios_base & showbase(ios_base&);
ios_base & noshowbase(ios_base&);
ios_base & showpoint(ios_base&);
ios_base & noshowpoint(ios_base&);
ios_base & showpos(ios_base&);
ios_base & noshowpos(ios_base&);
ios_base & skipws(ios_base&);
ios_base & noskipws(ios_base&);
ios_base & uppercase(ios_base&);
ios_base & nouppercase(ios_base&);
//Adjustfield
ios_base & internal(ios_base&);
ios_base & left(ios_base&);
ios_base & right(ios_base&);
//Basefield
ios_base & dec(ios_base&);
ios_base & hex(ios_base&);
ios_base & oct(ios_base&);
//floatfield
ios_base & fixed(ios_base&);
ios_base & scientific(ios_base&);
#endif

27
include/fx/iostream Normal file
View File

@ -0,0 +1,27 @@
//Embedded C++ Library
//Copyright (c) Hitachi,Ltd. 1997
//Licensed material of Hitachi,Ltd
//
// Standard iostream objects
// Embeded C++ Library Header <iostream>
//
//====================================================================
// File: iostream
// Purpose: Definition of class iostream
// Create: 1997.09.20 Rev. 1.0
//====================================================================
#ifndef _IOSTREAM_
#define _IOSTREAM_
#include <mystrbuf>
#include <istream>
#include <ostream>
extern istream cin;
extern ostream cout;
// extern ostream cerr; // EC++, not implemented
#endif

112
include/fx/istream Normal file
View File

@ -0,0 +1,112 @@
//Embedded C++ Library
//Copyright (c) Hitachi,Ltd. 1997
//Licensed material of Hitachi,Ltd
//====================================================================
// File: istream
// Purpose: Definition of class istream
// Create: 1997.09.20 Rev. 1.0
//====================================================================
#ifndef _ISTREAM_
#define _ISTREAM_
#include <streambuf>
class istream : public ios {
public:
// Types (inherited from ios):
// typedef INT_T int_type;
// typedef POS_T pos_type;
// typedef OFF_T off_type;
istream(streambuf *sb)
:chcount(0),ios(sb){} // Constructor
virtual ~istream(){} // Destructor
class sentry; // Prefix/Suffix
// Formatted input
istream& operator >>(istream& (*pf)(istream&)){
return ((*pf)(*this)); }
istream& operator >>(ios& (*pf)(ios&)){
(*pf)(* (ios *)this); return (*this); }
istream& operator>> (ios_base& (*pf)(ios_base&)){
(*pf)(* (ios*)this); return (*this); }
istream & operator >>(bool &n);
istream & operator >>(short &n);
istream & operator >>(unsigned short &n);
istream & operator >>(int &n);
istream & operator >>(unsigned int &n);
istream & operator >>(long &n);
istream & operator >>(unsigned long &n);
istream & operator >>(float &f);
istream & operator >>(double &f);
istream & operator >>(long double &f);
istream & operator >>(void * &p);
istream & operator >>(streambuf *sb);
// Unformatted input
streamsize gcount() const{return chcount;}
int_type get();
istream & get( char& c );
istream & get( signed char& c );
istream & get( unsigned char& c );
istream & get( char* s, streamsize n);
istream & get( char* s, streamsize n, char delim );
istream & get( signed char* s, streamsize n);
istream & get( signed char* s, streamsize n, char delim );
istream & get( unsigned char* s, streamsize n);
istream & get( unsigned char* s, streamsize n, char delim );
istream & get( streambuf& sb);
istream & get( streambuf& sb, char delim );
istream & getline( char* s, streamsize n);
istream & getline( char* s, streamsize n, char delim );
istream & getline( signed char* s, streamsize n );
istream & getline( signed char* s, streamsize n, char delim );
istream & getline( unsigned char* s, streamsize n );
istream & getline( unsigned char* s, streamsize n, char delim );
istream & ignore( streamsize n=1, int_type delim=streambuf::eof );
int_type peek();
istream & read( char* s, streamsize n );
istream & read( signed char* s, streamsize n );
istream & read( unsigned char* s, streamsize n );
streamsize readsome( char* s, streamsize n );
streamsize readsome( signed char* s, streamsize n );
streamsize readsome( unsigned char* s, streamsize n );
istream & putback( char c );
istream & unget();
int sync();
pos_type tellg();
istream & seekg( pos_type pos );
istream & seekg( off_type off, ios_base::seekdir dir );
private:
streamsize chcount;
streamsize _ec2p_gets( char* s, streamsize n, char delim, int mode );
int _ec2p_getistr(char* str, unsigned int dig, int mode);
int _ec2p_getfstr(char* str, unsigned int dig);
unsigned long _ec2p_strtoul(char *nptr, char **endptr, int base);
long _ec2p_extlong();
unsigned long _ec2p_extulong();
};
class istream::sentry {
public:
sentry(istream& is, bool noskipws = false);
~sentry(){}
operator bool() { return ok_; }
private:
bool ok_;
};
// character extraction templates:
istream& operator>>(istream&, char&);
istream& operator>>(istream&, unsigned char&);
istream& operator>>(istream&, signed char&);
istream& operator>>(istream&, char*);
istream& operator>>(istream&, unsigned char*);
istream& operator>>(istream&, signed char*);
// Manipulator
istream& ws(istream& is );
#endif

97
include/fx/libfx.h Normal file
View File

@ -0,0 +1,97 @@
/*****************************************************************/
/* */
/* CASIO fx-9860G SDK Library */
/* */
/* File name : fxlib.h */
/* */
/* Copyright (c) 2006 CASIO COMPUTER CO., LTD. */
/* */
/*****************************************************************/
#ifndef __FXLIB_H__
#define __FXLIB_H__
#include <libfx/dispbios.h>
#include <libfx/filebios.h>
#include <libfx/keybios.h>
#ifdef __cplusplus
extern "C" {
#endif
// Prototypes
void Bdisp_AllClr_DD(void);
void Bdisp_AllClr_VRAM(void);
void Bdisp_AllClr_DDVRAM(void);
void Bdisp_AreaClr_DD(const DISPBOX *pArea);
void Bdisp_AreaClr_VRAM(const DISPBOX *pArea);
void Bdisp_AreaClr_DDVRAM(const DISPBOX *pArea);
void Bdisp_AreaReverseVRAM(int x1, int y1, int x2, int y2);
void Bdisp_GetDisp_DD(unsigned char *pData);
void Bdisp_GetDisp_VRAM(unsigned char *pData);
void Bdisp_PutDisp_DD(void);
void Bdisp_PutDispArea_DD(const DISPBOX *PutDispArea);
void Bdisp_SetPoint_DD(int x, int y, unsigned char point);
void Bdisp_SetPoint_VRAM(int x, int y, unsigned char point);
void Bdisp_SetPoint_DDVRAM(int x, int y, unsigned char point);
int Bdisp_GetPoint_VRAM(int x, int y);
void Bdisp_WriteGraph_DD(const DISPGRAPH *WriteGraph);
void Bdisp_WriteGraph_VRAM(const DISPGRAPH *WriteGraph);
void Bdisp_WriteGraph_DDVRAM(const DISPGRAPH *WriteGraph);
void Bdisp_ReadArea_DD(const DISPBOX *ReadArea, unsigned char *ReadData);
void Bdisp_ReadArea_VRAM(const DISPBOX *ReadArea, unsigned char *ReadData);
void Bdisp_DrawLineVRAM(int x1, int y1, int x2, int y2);
void Bdisp_ClearLineVRAM(int x1, int y1, int x2, int y2);
void locate(int x, int y);
void Print(const unsigned char *str);
void PrintRev(const unsigned char *str);
void PrintC(const unsigned char *c);
void PrintRevC(const unsigned char *str);
void PrintLine(const unsigned char *str, int max);
void PrintRLine(const unsigned char *str, int max);
void PrintXY(int x, int y, const unsigned char *str, int type);
int PrintMini(int x, int y, const unsigned char *str, int type);
void SaveDisp(unsigned char num);
void RestoreDisp(unsigned char num);
void PopUpWin(int n);
int Bfile_OpenFile(const FONTCHARACTER *filename, int mode);
int Bfile_OpenMainMemory(const unsigned char *name);
int Bfile_ReadFile(int HANDLE, void *buf, int size, int readpos);
int Bfile_WriteFile(int HANDLE, const void *buf, int size);
int Bfile_SeekFile(int HANDLE, int pos);
int Bfile_CloseFile(int HANDLE);
int Bfile_GetMediaFree(enum DEVICE_TYPE devicetype, int *freebytes);
int Bfile_GetFileSize(int HANDLE);
int Bfile_CreateFile(const FONTCHARACTER *filename, int size);
int Bfile_CreateDirectory(const FONTCHARACTER *pathname);
int Bfile_CreateMainMemory(const unsigned char *name);
int Bfile_RenameMainMemory(const unsigned char *oldname, const unsigned char *newname);
int Bfile_DeleteFile(const FONTCHARACTER *filename);
int Bfile_DeleteDirectory(const FONTCHARACTER *pathname);
int Bfile_DeleteMainMemory(const unsigned char *name);
int Bfile_FindFirst(const FONTCHARACTER *pathname, int *FindHandle, FONTCHARACTER *foundfile, FILE_INFO *fileinfo);
int Bfile_FindNext(int FindHandle, FONTCHARACTER *foundfile, FILE_INFO *fileinfo);
int Bfile_FindClose(int FindHandle);
void Bkey_Set_RepeatTime(long FirstCount, long NextCount);
void Bkey_Get_RepeatTime(long *FirstCount, long *NextCount);
void Bkey_Set_RepeatTime_Default(void);
int GetKeyWait(int sel, int time, int menu, unsigned int *keycode);
int IsKeyDown(int keycode);
int IsKeyUp(int keycode);
int GetKey(unsigned int *keycode);
int SetTimer(int ID, int elapse, void (*hander)(void));
int KillTimer(int ID);
void Sleep(int millisecond);
void SetQuitHandler(void (*callback)(void));
int INIT_ADDIN_APPLICATION(int isAppli, unsigned short OptionNum);
# ifdef __cplusplus
}
# endif
#endif

View File

@ -0,0 +1,94 @@
/*****************************************************************/
/* */
/* CASIO fx-9860G SDK Library */
/* */
/* File name : dispbios.h */
/* */
/* Copyright (c) 2006 CASIO COMPUTER CO., LTD. */
/* */
/*****************************************************************/
#ifndef __DISPBIOS_H__
#define __DISPBIOS_H__
// Defines
#define IM_VRAM_WIDTH 128
#define IM_VRAM_HEIGHT 64
#define IM_VRAM_SIZE 1024
#define IM_CHARACTERS_MAX_LINE 21
#define IM_BYTES_MAX_LINE (IM_CHARACTERS_MAX_LINE*2)
#define SAVEDISP_PAGE1 1
#define SAVEDISP_PAGE2 5
#define SAVEDISP_PAGE3 6
#define MINI_OVER 0x10
#define MINI_OR 0x11
#define MINI_REV 0x12
#define MINI_REVOR 0x13
#define IM_BIOS_DD_WIDTH IM_VRAM_WIDTH
#define IM_BIOS_DD_HEIGHT IM_VRAM_HEIGHT
#define WRITEKIND unsigned char
#define IMB_WRITEKIND_OVER 0x01
#define IMB_WRITEKIND_OR 0x02
#define IMB_WRITEKIND_AND 0x03
#define IMB_WRITEKIND_XOR 0x04
#define WRITEMODIFY unsigned char
#define IMB_WRITEMODIFY_NORMAL 0x01
#define IMB_WRITEMODIFY_REVERCE 0x02
#define IMB_WRITEMODIFY_MESH 0x03
#define AREAKIND unsigned char
#define IMB_AREAKIND_OVER 0x01
#define IMB_AREAKIND_MESH 0x02
#define IMB_AREAKIND_CLR 0x03
#define IMB_AREAKIND_REVERSE 0x04
#define EFFECTWIN unsigned char
#define IMB_EFFECTWIN_OK 0x01
#define IMB_EFFECTWIN_NG 0x02
#ifdef __cplusplus
extern "C" {
#endif
// Structs
typedef struct tag_DISPBOX{
int left;
int top;
int right;
int bottom;
} DISPBOX;
typedef struct tag_GRAPHDATA{
int width;
int height;
unsigned char *pBitmap;
} GRAPHDATA;
typedef struct tag_RECTANGLE{
DISPBOX LineArea;
AREAKIND AreaKind;
EFFECTWIN EffectWin;
} RECTANGLE;
typedef struct tag_DISPGRAPH{
int x;
int y;
GRAPHDATA GraphData;
WRITEMODIFY WriteModify;
WRITEKIND WriteKind;
} DISPGRAPH;
# ifdef __cplusplus
}
# endif
#endif

22
include/fx/libfx/endian.h Normal file
View File

@ -0,0 +1,22 @@
/*****************************************************************/
/* */
/* CASIO fx-9860G SDK Library */
/* */
/* File name : endian.h */
/* */
/* Copyright (c) 2006 CASIO COMPUTER CO., LTD. */
/* */
/*****************************************************************/
#ifndef __ENDIAN_H__
#define __ENDIAN_H__
// Macros
#define UtlSwapWord(w) (unsigned short)((((w) & 0x00ff) << 8) | (((w) & 0xff00) >> 8))
#define UtlSwapDword(l) (unsigned long)((((l) & 0x000000ff) << 24) | (((l) & 0x0000ff00) << 8) | (((l) & 0xff000000) >> 24) | (((l) & 0x00ff0000) >> 8))
#define UtlSwapInteger(i) UtlSwapDword(i)
#define UtlSwapPointer(p) (void*)((((unsigned long)(p) & 0x000000ff) << 24) | (((unsigned long)(p) & 0x0000ff00) << 8) | (((unsigned long)(p) & 0xff000000) >> 24) | (((unsigned long)(p) & 0x00ff0000) >> 8))
#endif

113
include/fx/libfx/filebios.h Normal file
View File

@ -0,0 +1,113 @@
/*****************************************************************/
/* */
/* CASIO fx-9860G SDK Library */
/* */
/* File name : filebios.h */
/* */
/* Copyright (c) 2006 CASIO COMPUTER CO., LTD. */
/* */
/*****************************************************************/
#ifndef __FILEBIOS_H__
#define __FILEBIOS_H__
#ifdef __cplusplus
extern "C" {
#endif
// Defines
#define FONTCHARACTER unsigned short
#define _OPENMODE_READ 0x01
#define _OPENMODE_READ_SHARE 0x80
#define _OPENMODE_WRITE 0x02
#define _OPENMODE_READWRITE 0x03
#define _OPENMODE_READWRITE_SHARE 0x83
#define _CREATEMODE_BINARY 1
#define _CREATEMODE_DIRECTORY 5
enum DEVICE_TYPE{
DEVICE_MAIN_MEMORY,
DEVICE_STORAGE,
DEVICE_SD_CARD, // only fx-9860G SD model
};
// File system standard error code
#define IML_FILEERR_NOERROR 0
#define IML_FILEERR_ENTRYNOTFOUND -1
#define IML_FILEERR_ILLEGALPARAM -2
#define IML_FILEERR_ILLEGALPATH -3
#define IML_FILEERR_DEVICEFULL -4
#define IML_FILEERR_ILLEGALDEVICE -5
#define IML_FILEERR_ILLEGALFILESYS -6
#define IML_FILEERR_ILLEGALSYSTEM -7
#define IML_FILEERR_ACCESSDENYED -8
#define IML_FILEERR_ALREADYLOCKED -9
#define IML_FILEERR_ILLEGALTASKID -10
#define IML_FILEERR_PERMISSIONERROR -11
#define IML_FILEERR_ENTRYFULL -12
#define IML_FILEERR_ALREADYEXISTENTRY -13
#define IML_FILEERR_READONLYFILE -14
#define IML_FILEERR_ILLEGALFILTER -15
#define IML_FILEERR_ENUMRATEEND -16
#define IML_FILEERR_DEVICECHANGED -17
//#define IML_FILEERR_NOTRECORDFILE -18 // Not used
#define IML_FILEERR_ILLEGALSEEKPOS -19
#define IML_FILEERR_ILLEGALBLOCKFILE -20
//#define IML_FILEERR_DEVICENOTEXIST -21 // Not used
//#define IML_FILEERR_ENDOFFILE -22 // Not used
#define IML_FILEERR_NOTMOUNTDEVICE -23
#define IML_FILEERR_NOTUNMOUNTDEVICE -24
#define IML_FILEERR_CANNOTLOCKSYSTEM -25
#define IML_FILEERR_RECORDNOTFOUND -26
//#define IML_FILEERR_NOTDUALRECORDFILE -27 // Not used
#define IML_FILEERR_NOTALARMSUPPORT -28
#define IML_FILEERR_CANNOTADDALARM -29
#define IML_FILEERR_FILEFINDUSED -30
#define IML_FILEERR_DEVICEERROR -31
#define IML_FILEERR_SYSTEMNOTLOCKED -32
#define IML_FILEERR_DEVICENOTFOUND -33
#define IML_FILEERR_FILETYPEMISMATCH -34
#define IML_FILEERR_NOTEMPTY -35
#define IML_FILEERR_BROKENSYSTEMDATA -36
#define IML_FILEERR_MEDIANOTREADY -37
#define IML_FILEERR_TOOMANYALARMITEM -38
#define IML_FILEERR_SAMEALARMEXIST -39
#define IML_FILEERR_ACCESSSWAPAREA -40
#define IML_FILEERR_MULTIMEDIACARD -41
#define IML_FILEERR_COPYPROTECTION -42
#define IML_FILEERR_ILLEGALFILEDATA -43
// FILE_INFO.type
#define DT_DIRECTORY 0x0000 // Directory
#define DT_FILE 0x0001 // File
#define DT_ADDIN_APP 0x0002 // Add-In application
#define DT_EACT 0x0003 // eActivity
#define DT_LANGUAGE 0x0004 // Language
#define DT_BITMAP 0x0005 // Bitmap
#define DT_MAINMEM 0x0006 // Main Memory data
#define DT_TEMP 0x0007 // Temporary data
#define DT_DOT 0x0008 // . (Current directory)
#define DT_DOTDOT 0x0009 // .. (Parent directory)
#define DT_VOLUME 0x000A // Volume label
// Structs
typedef struct tag_FILE_INFO
{
unsigned short id;
unsigned short type;
unsigned long fsize; // File size
unsigned long dsize; // Data size
unsigned int property; // The file has not been completed, except when property is 0.
unsigned long address;
} FILE_INFO;
# ifdef __cplusplus
}
# endif
#endif

155
include/fx/libfx/keybios.h Normal file
View File

@ -0,0 +1,155 @@
/*****************************************************************/
/* */
/* CASIO fx-9860G SDK Library */
/* */
/* File name : keybios.h */
/* */
/* Copyright (c) 2006 CASIO COMPUTER CO., LTD. */
/* */
/*****************************************************************/
#ifndef __KEYBIOS_H__
#define __KEYBIOS_H__
#ifdef __cplusplus
extern "C" {
#endif
// Defines
// Character codes
#define KEY_CHAR_0 0x30
#define KEY_CHAR_1 0x31
#define KEY_CHAR_2 0x32
#define KEY_CHAR_3 0x33
#define KEY_CHAR_4 0x34
#define KEY_CHAR_5 0x35
#define KEY_CHAR_6 0x36
#define KEY_CHAR_7 0x37
#define KEY_CHAR_8 0x38
#define KEY_CHAR_9 0x39
#define KEY_CHAR_DP 0x2e
#define KEY_CHAR_EXP 0x0f
#define KEY_CHAR_PMINUS 0x87
#define KEY_CHAR_PLUS 0x89
#define KEY_CHAR_MINUS 0x99
#define KEY_CHAR_MULT 0xa9
#define KEY_CHAR_DIV 0xb9
#define KEY_CHAR_FRAC 0xbb
#define KEY_CHAR_LPAR 0x28
#define KEY_CHAR_RPAR 0x29
#define KEY_CHAR_COMMA 0x2c
#define KEY_CHAR_STORE 0x0e
#define KEY_CHAR_LOG 0x95
#define KEY_CHAR_LN 0x85
#define KEY_CHAR_SIN 0x81
#define KEY_CHAR_COS 0x82
#define KEY_CHAR_TAN 0x83
#define KEY_CHAR_SQUARE 0x8b
#define KEY_CHAR_POW 0xa8
#define KEY_CHAR_IMGNRY 0x7f50
#define KEY_CHAR_LIST 0x7f51
#define KEY_CHAR_MAT 0x7f40
#define KEY_CHAR_EQUAL 0x3d
#define KEY_CHAR_PI 0xd0
#define KEY_CHAR_ANS 0xc0
#define KEY_CHAR_LBRCKT 0x5b
#define KEY_CHAR_RBRCKT 0x5d
#define KEY_CHAR_LBRACE 0x7b
#define KEY_CHAR_RBRACE 0x7d
#define KEY_CHAR_CR 0x0d
#define KEY_CHAR_CUBEROOT 0x96
#define KEY_CHAR_RECIP 0x9b
#define KEY_CHAR_ANGLE 0x7f54
#define KEY_CHAR_EXPN10 0xb5
#define KEY_CHAR_EXPN 0xa5
#define KEY_CHAR_ASIN 0x91
#define KEY_CHAR_ACOS 0x92
#define KEY_CHAR_ATAN 0x93
#define KEY_CHAR_ROOT 0x86
#define KEY_CHAR_POWROOT 0xb8
#define KEY_CHAR_SPACE 0x20
#define KEY_CHAR_DQUATE 0x22
#define KEY_CHAR_VALR 0xcd
#define KEY_CHAR_THETA 0xce
#define KEY_CHAR_A 0x41
#define KEY_CHAR_B 0x42
#define KEY_CHAR_C 0x43
#define KEY_CHAR_D 0x44
#define KEY_CHAR_E 0x45
#define KEY_CHAR_F 0x46
#define KEY_CHAR_G 0x47
#define KEY_CHAR_H 0x48
#define KEY_CHAR_I 0x49
#define KEY_CHAR_J 0x4a
#define KEY_CHAR_K 0x4b
#define KEY_CHAR_L 0x4c
#define KEY_CHAR_M 0x4d
#define KEY_CHAR_N 0x4e
#define KEY_CHAR_O 0x4f
#define KEY_CHAR_P 0x50
#define KEY_CHAR_Q 0x51
#define KEY_CHAR_R 0x52
#define KEY_CHAR_S 0x53
#define KEY_CHAR_T 0x54
#define KEY_CHAR_U 0x55
#define KEY_CHAR_V 0x56
#define KEY_CHAR_W 0x57
#define KEY_CHAR_X 0x58
#define KEY_CHAR_Y 0x59
#define KEY_CHAR_Z 0x5a
// Control codes
#define KEY_CTRL_NOP 0
#define KEY_CTRL_EXE 30004
#define KEY_CTRL_DEL 30025
#define KEY_CTRL_AC 30015
#define KEY_CTRL_FD 30046
#define KEY_CTRL_XTT 30001
#define KEY_CTRL_EXIT 30002
#define KEY_CTRL_SHIFT 30006
#define KEY_CTRL_ALPHA 30007
#define KEY_CTRL_OPTN 30008
#define KEY_CTRL_VARS 30016
#define KEY_CTRL_UP 30018
#define KEY_CTRL_DOWN 30023
#define KEY_CTRL_LEFT 30020
#define KEY_CTRL_RIGHT 30021
#define KEY_CTRL_F1 30009
#define KEY_CTRL_F2 30010
#define KEY_CTRL_F3 30011
#define KEY_CTRL_F4 30012
#define KEY_CTRL_F5 30013
#define KEY_CTRL_F6 30014
#define KEY_CTRL_CATALOG 30100
#define KEY_CTRL_CAPTURE 30055
#define KEY_CTRL_CLIP 30050
#define KEY_CTRL_PASTE 30036
#define KEY_CTRL_INS 30033
#define KEY_CTRL_MIXEDFRAC 30054
#define KEY_CTRL_FRACCNVRT 30026
#define KEY_CTRL_QUIT 30029
#define KEY_CTRL_PRGM 30028
#define KEY_CTRL_SETUP 30037
#define KEY_CTRL_PAGEUP 30052
#define KEY_CTRL_PAGEDOWN 30053
#define KEY_CTRL_MENU 30003
#define KEY_CTRL_RESERVE1 30060
#define KEY_CTRL_RESERVE2 30061
#define KEY_CTRL_RESERVE3 30062
// in Bkey_GetKeyWait function
#define KEYWAIT_HALTON_TIMEROFF 0
#define KEYWAIT_HALTOFF_TIMEROFF 1
#define KEYWAIT_HALTON_TIMERON 2
#define KEYREP_NOEVENT 0
#define KEYREP_KEYEVENT 1
#define KEYREP_TIMEREVENT 2
# ifdef __cplusplus
}
# endif
#endif

23
include/fx/libfx/timer.h Normal file
View File

@ -0,0 +1,23 @@
/*****************************************************************/
/* */
/* CASIO fx-9860G SDK Library */
/* */
/* File name : timer.h */
/* */
/* Copyright (c) 2006 CASIO COMPUTER CO., LTD. */
/* */
/*****************************************************************/
#ifndef __TIMER_H__
#define __TIMER_H__
// Defines
#define ID_USER_TIMER1 1
#define ID_USER_TIMER2 2
#define ID_USER_TIMER3 3
#define ID_USER_TIMER4 4
#define ID_USER_TIMER5 5
#endif

35
include/fx/limits.h Normal file
View File

@ -0,0 +1,35 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/***********************************************************************/
/* SPEC; */
/* NAME = limits.h : */
/* */
/* FUNC = this module do the following functions */
/* */
/* CLAS = UNIT; */
/* */
/* END; */
/***********************************************************************/
#ifndef _LIMITS
#define _LIMITS
#define CHAR_BIT 8
#define CHAR_MAX 127
#define CHAR_MIN (-128)
#define SCHAR_MAX 127
#define SCHAR_MIN (-128)
#define UCHAR_MAX 255
#define SHRT_MAX 32767
#define SHRT_MIN (-32768)
#define USHRT_MAX 65535
#define INT_MAX 2147483647
#define INT_MIN (-2147483647-1)
#define UINT_MAX 4294967295u
#define LONG_MAX 2147483647
#define LONG_MIN (-2147483647L-1L)
#define ULONG_MAX 4294967295u
#endif

23
include/fx/machine.h Normal file
View File

@ -0,0 +1,23 @@
/*------------------------------------------------------*/
/* SH C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = machine.h : */
/* FUNC = */
/* ; */
/* */
/* */
/* */
/* CLAS = UNIT ; */
/* END ; */
/*****************************************************************/
#ifndef _MACHINE
#define _MACHINE
#include <smachine.h>
#include <umachine.h>
#endif

111
include/fx/math.h Normal file
View File

@ -0,0 +1,111 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.0 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = math : */
/* FUNC = */
/* ; */
/* */
/* */
/* */
/* CLAS = UNIT ; */
/* END ; */
/*****************************************************************/
#ifndef _MATH
#define _MATH
#ifdef __cplusplus
#include <builtin.h>
#endif
#ifndef ERANGE
#define ERANGE 1100
#endif
#ifndef EDOM
#define EDOM 1101
#endif
#ifndef ENUM
#define ENUM 1208
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern volatile int _errno;
extern const double _HUGE_VAL;
#define HUGE_VAL _HUGE_VAL
extern double frexp(double, int *);
extern double ldexp(double, int );
extern double modf(double, double *);
extern double ceil(double);
#ifdef _SH4
#ifdef _FPS
#define fabs _builtin_fabsf
#else
#define fabs _builtin_fabs
#endif
#else
#if defined(_SH2E)|defined(_SH3E)
#ifdef _FLT
#define fabs _builtin_fabsf
#else
extern double fabs(double);
#endif
#else
extern double fabs(double);
#endif
#endif
extern double floor(double);
extern double fmod(double, double);
extern double acos(double);
extern double asin(double);
extern double atan(double);
extern double atan2(double,double);
extern double cos(double);
extern double sin(double);
extern double tan(double);
extern double cosh(double);
extern double tanh(double);
extern double sinh(double);
extern double exp(double);
extern double log(double);
extern double log10(double);
extern double pow(double,double);
#ifdef _COMPLEX_
extern double sqrt(double);
#else
#ifdef _SH4
#ifdef _FPS
#define sqrt _builtin_sqrtf
#else
#define sqrt _builtin_sqrt
#endif
#else
#ifdef _SH3E
#ifdef _FLT
#define sqrt _builtin_sqrtf
#else
extern double sqrt(double);
#endif
#else
extern double sqrt(double);
#endif
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif

66
include/fx/mathf.h Normal file
View File

@ -0,0 +1,66 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 1.1 */
/* Copyright (c) 1992 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/*****************************************************************/
/* SPEC ; */
/* NAME = mathf */
/* FUNC = */
/* ; */
/* */
/* */
/* */
/* CLAS = UNIT ; */
/* END ; */
/*****************************************************************/
#ifndef _MATHF
#define _MATHF
#ifdef __cplusplus
extern "C" {
#include <builtin.h>
#endif
extern float frexpf(float, int *);
extern float ldexpf(float, int);
extern float modff(float, float *);
extern float ceilf(float);
#if defined(_SH2E)|defined(_SH3E)|defined(_SH4)
#ifdef _FPD
#define fabsf _builtin_fabs
#else
#define fabsf _builtin_fabsf
#endif
#else
extern float fabsf(float);
#endif
extern float floorf(float);
extern float fmodf(float, float);
extern float acosf(float);
extern float asinf(float);
extern float atanf(float);
extern float atan2f(float,float);
extern float cosf(float);
extern float sinf(float);
extern float tanf(float);
extern float coshf(float);
extern float tanhf(float);
extern float sinhf(float);
extern float expf(float);
extern float logf(float);
extern float log10f(float);
extern float powf(float,float);
#if defined(_SH3E)|defined(_SH4)
#ifdef _FPD
#define sqrtf _builtin_sqrt
#else
#define sqrtf _builtin_sqrtf
#endif
#else
extern float sqrtf(float);
#endif
#ifdef __cplusplus
}
#endif
#endif

53
include/fx/mystrbuf Normal file
View File

@ -0,0 +1,53 @@
//Embedded C++ Library
//Copyright (c) Hitachi,Ltd. 1997
//Licensed material of Hitachi,Ltd
//
// Embeded C++ Library <mystrbuf>
//
//====================================================================
// File: mystrbuf
// Purpose: Definition of class mystrbuf
// Create: 1997.09.20 Rev. 1.0
//====================================================================
#ifndef _MYSTRBUF_
#define _MYSTRBUF_
#ifdef _EC2P_GPP
#define _bufbase _base
#define _bufptr _ptr
#define _bufcnt _cnt
// #define _buflen _bufsiz
#define _ioflag1 _flag
#endif
#include <streambuf>
struct _f_type;
class mystrbuf : public streambuf {
public:
mystrbuf(){_file_Ptr = 0;}
mystrbuf(void *_fp){_Init((_f_type*)_fp);}
virtual ~mystrbuf(){close();}
void *myfptr() const{return _file_Ptr;}
mystrbuf *open(const char *, int);
mystrbuf *close();
protected:
virtual streambuf *setbuf(char *, streamsize);
virtual pos_type seekoff(off_type, ios_base::seekdir,
ios_base::openmode=(ios_base::openmode)(ios_base::in|ios_base::out));
virtual pos_type seekpos(pos_type sp,
ios_base::openmode=(ios_base::openmode)(ios_base::in|ios_base::out));
virtual int sync();
virtual int showmanyc(){return 0;}
virtual int_type underflow();
virtual int_type pbackfail(int_type=streambuf::eof);
virtual int_type overflow(int_type=streambuf::eof);
private:
void _Init(_f_type *);
_f_type *_file_Ptr;
#ifdef _EC2P_GPP
long _buflen_wk;
#endif
};
#endif

31
include/fx/new Normal file
View File

@ -0,0 +1,31 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 6.0 */
/* Copyright (c) 1992, 2000 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/***********************************************************************/
/* SPEC; */
/* NAME = new : */
/* */
/* FUNC = Include file for C++ default operator new . */
/* */
/* CLAS = UNIT; */
/* */
/* END; */
/***********************************************************************/
#ifndef __NEW__
#define __NEW__
#ifdef __embedded_cplusplus
#include <new_ecpp.h> // include Embeded C++ Library Header
#else
#include <new_edg.h> // include ANSI C++ Library Header
#endif /* ifdef __embedded_cplusplus */
#endif /* ifndef __NEW__ */

41
include/fx/new_ecpp.h Normal file
View File

@ -0,0 +1,41 @@
//Embedded C++ Library
//Copyright (c) Hitachi,Ltd. 1997
//Licensed material of Hitachi,Ltd
//
// Dynamic memory management
// Embeded C++ Library Header <new>
//
//====================================================================
// File: new
// Purpose: Definition of class new
// Create: 1997.09.20 Rev. 1.0
//====================================================================
#ifndef _NEW_
#define _NEW_
#include <stdlib.h>
// Storage allocation and deallocation
void *operator new(size_t);
void *operator new[] (size_t);
void *operator new(size_t,void *);
void *operator new[](size_t,void *);
void operator delete(void *);
void operator delete[](void *);
// void operator delete(void *, void *); // Not implemented
// void operator delete[](void *, void *); // Not implemented
// Type new_handler
typedef void (*new_handler)();
// set_new_handler
new_handler set_new_handler(new_handler new_P);
// new_handler
extern new_handler _ec2p_new_handler;
#endif

122
include/fx/new_edg.h Normal file
View File

@ -0,0 +1,122 @@
/*------------------------------------------------------*/
/* SH SERIES C Compiler Ver. 6.0 */
/* Copyright (c) 1992, 2000 Hitachi,Ltd. */
/* Licensed material of Hitachi,Ltd. */
/*------------------------------------------------------*/
/***********************************************************************/
/* SPEC; */
/* NAME = new_edg.h : */
/* */
/* FUNC = Include file for C++ default operator new . */
/* */
/* CLAS = UNIT; */
/* */
/* END; */
/***********************************************************************/
#ifndef __NEW_H
#define __NEW_H
#ifndef _STDDEF
#include <stddef.h>
#endif /* ifndef _STDDEF */
#ifndef _EXCEPTION_H
#include <exception.h>
#endif /* _EXCEPTION_H */
#ifndef __EDG_STD_NAMESPACE
/* If not already defined, define a macro that expands to the namespace
containing the standard library. */
#ifdef __EDG_RUNTIME_USES_NAMESPACES
#define __EDG_STD_NAMESPACE std
#else /* ifndef __EDG_RUNTIME_USES_NAMESPACES */
#define __EDG_STD_NAMESPACE /* nothing */
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
#endif /* ifdef __EDG_STD_NAMESPACE */
#ifdef __EDG_RUNTIME_USES_NAMESPACES
namespace std {
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
/* This lets users disable the EDG supplied exception classes. */
#ifndef __NO_EDG_EXCEPTION_CLASSES
class bad_alloc : public exception {
public:
bad_alloc() throw();
bad_alloc(const bad_alloc&) throw();
bad_alloc& operator=(const bad_alloc&) throw();
virtual ~bad_alloc() throw();
virtual const char* what() const throw();
};
#endif /* ifndef __NO_EDG_EXCEPTION_CLASSES */
typedef void (*new_handler)();
new_handler set_new_handler(new_handler);
struct nothrow_t { };
// Declaration of object nothrow to permit the use of the placement new
// syntax: new (nothrow) T;
const nothrow_t nothrow = {};
#ifdef __EDG_RUNTIME_USES_NAMESPACES
} /* namespace std */
#ifdef __EDG_IMPLICIT_USING_STD
/* Implicitly include a using directive for the STD namespace when this
preprocessing flag is TRUE. */
using namespace std;
#endif /* ifdef __EDG_IMPLICIT_USING_STD */
#endif /* ifdef __EDG_RUNTIME_USES_NAMESPACES */
/* Normal operator new. */
void *operator new(size_t) throw(__EDG_STD_NAMESPACE::bad_alloc);
/* Normal operator delete. */
void operator delete(void*) throw ();
/* Nothrow version of operator new. */
void *operator new(size_t, const __EDG_STD_NAMESPACE::nothrow_t&) throw();
/* Nothrow version of operator delete. */
void operator delete(void*, const __EDG_STD_NAMESPACE::nothrow_t&) throw();
/* Placement new. */
void *operator new(size_t, void*) throw();
/* Placement delete. */
#ifdef __PLACEMENT_DELETE
void operator delete(void*, void*) throw();
#endif /* ifdef __PLACEMENT_DELETE */
#ifdef __ARRAY_OPERATORS
/* Array new. */
void *operator new[](size_t) throw(__EDG_STD_NAMESPACE::bad_alloc);
/* Array delete. */
void operator delete[](void*) throw ();
/* Placement array new. */
void *operator new[](size_t, void*) throw();
/* Placement array delete. */
#ifdef __PLACEMENT_DELETE
void operator delete[](void*, void*) throw();
#endif /* ifdef __PLACEMENT_DELETE */
/* Nothrow version of array new. */
void *operator new[](size_t,
const __EDG_STD_NAMESPACE::nothrow_t&) throw();
/* Nothrow version of array delete. */
void operator delete[](void*,
const __EDG_STD_NAMESPACE::nothrow_t&) throw();
#endif /* __ARRAY_OPERATORS */
// EC++ use new_handler
extern __EDG_STD_NAMESPACE::new_handler _ec2p_new_handler;
#endif /* ifndef __NEW_H */

Some files were not shown because too many files have changed in this diff Show More