HPGCC3 Documentation 3.0 R003

sat3.h

Go to the documentation of this file.
00001 //& *** (c) 2006-2011 The HPGCC3 Team ***
00002 //& Claudio Lapilli
00003 //& Ingo Blank
00004 //&
00005 //& This file is licensed under the terms and conditions of the
00006 //& HPGCC3 license that is included with the source distribution.
00007 //& *** (c) 2006-2011 The HPGCC3 Team ***
00008 
00009 
00010 // $Id: sat3.h 578 2008-08-04 23:59:44Z claudio $
00011 
00012 #ifndef __SAT3_H
00013 #define __SAT3_H
00014 
00015 #ifndef DECNUMBER
00016 #include <decNumber.h>
00017 #endif
00018 
00019 #ifndef _XREAL_H
00020 #include <extreal.h>
00021 #endif
00022 
00023 
00024 #ifndef _LONGLONG_DEF
00025 typedef unsigned long long ULONGLONG;
00026 typedef long long LONGLONG;
00027 #define _LONGLONG_DEF
00028 #endif
00029 
00030 
00278 #define SWAP4(x) (((x) << 4) | ((x) >> 4))
00279 
00284 #define ALIGN(x,a) (((unsigned)(x)+(a)-1) & (~((unsigned)(a)-1)))
00285 
00290 #ifndef BOOL
00291 #define BOOL int
00292 #endif
00293 
00298 #ifndef FALSE
00299 #define FALSE 0
00300 #endif
00301 
00306 #ifndef TRUE
00307 #define TRUE !FALSE
00308 #endif
00309 
00310 
00311 
00317 typedef
00318 
00319 struct _sat_cpu {
00320     
00321     unsigned int     Read[257];
00322     unsigned int     Write[257];
00323     unsigned char    unknown_data[260];
00324     unsigned int    A;
00325     unsigned int    Ah;
00326     unsigned int    B;
00327     unsigned int    Bh;
00328     unsigned int    C;
00329     unsigned int    Ch;
00330     unsigned int    D;
00331     unsigned int    Dh;
00332     
00333     unsigned int    R0;
00334     unsigned int    R0h;
00335     unsigned int    R1;
00336     unsigned int    R1h;
00337     unsigned int    R2;
00338     unsigned int    R2h;
00339     unsigned int    R3;
00340     unsigned int    R3h;
00341     unsigned int    R4;
00342     unsigned int    R4h;
00343     
00344     unsigned int    D0;
00345     unsigned int    D1;
00346     unsigned int    P;
00347     unsigned int    ST;
00348     unsigned int    HST;
00349     unsigned int    CARRY;
00350     unsigned int    DECIMAL_MODE;
00351     
00352 } SAT_CPU, *SAT_PCPU;
00353 
00354 
00379 typedef unsigned int SAT_OBJECT;
00380 
00381 // **************************************************************
00382 //                          CONSTANTS
00383 // **************************************************************
00384 
00385 
00386 
00390 #define ALLOC_TEMPOB 0xffffffff
00391 
00394 #define ALLOC_HEAP   0xfffffffe
00395 
00399 #define BLOCK_UNREF   -1
00400 
00403 #define BLOCK_REF   1
00404 
00405 
00406 
00407 // ALL PROLOGUE CONSTANTS RENAMED BY CLAUDIO
00408 // TO MATCH THE SYSRPL NAMES 01/08/05
00409 
00413 #define SAT_DOINT 0x2614
00414 
00417 #define SAT_DOCSTR        0x2a2c
00418 
00421 #define SAT_DOREAL        0x2933
00422 
00426 #define SAT_DOEREL        0x2955
00427  
00431 #define SAT_DOHXS        0x2a4e
00432 
00435 #define SAT_DOBINT        0x2911
00436 
00439 #define SAT_DOCMP        0x2977
00440 
00443 #define SAT_DOECMP        0x299D
00444 
00447 #define SAT_DOCHAR        0x29BF
00448 
00451 #define SAT_DOARRY        0x29e8
00452 
00455 #define SAT_DOLNKARRY        0x29e8
00456 
00459 #define SAT_DOIDNT        0x2e48
00460 
00463 #define SAT_DOLAM        0x2e6D
00464 
00467 #define SAT_DOROMP        0x2e92
00468 
00471 #define SAT_DORRP        0x2a96
00472 
00475 #define SAT_DOSYMB        0x2AB8
00476 
00479 #define SAT_DOLIST        0x2A74
00480 
00483 #define SAT_DOCOL        0x2D9D
00484 
00487 #define SAT_DOGROB        0x2B1E
00488 
00491 #define SAT_SEMI        0x312b
00492 
00495 #define SAT_DOBAK        0x2B62
00496 
00499 #define SAT_DOCODE        0x2DCC
00500 
00503 #define SAT_DOEXT        0x2ADA
00504 
00507 #define SAT_DOFLASHP    0x26AC
00508 
00511 #define SAT_DOLIB        0x2B40
00512 
00515 #define SAT_DOMATRIX    0x2686
00516 
00519 #define SAT_DOTAG        0x2AFC
00520 
00523 #define SAT_DOAPLET        0x26D5
00524 
00527 #define SAT_DOEXT0        0x2B88
00528 
00531 #define SAT_DOACPTR        0x2BAA
00532 #define SAT_DOEXT1      SAT_DOACPTR
00533 
00536 #define SAT_DOEXT2        0x2BCC
00537 
00540 #define SAT_DOFONT        0x2BCC
00541 
00545 #define SAT_DOEXT3        0x2BEE
00546 
00549 #define SAT_DOARMC        0x2C10
00550 #define SAT_DOEXT4        0x2C10
00551 
00555 #define SAT_DOLNGREAL        0x263A
00556 
00559 #define SAT_DOLNGCOMP        0x2660
00560 
00561 
00565 #define SAT_TAGGED        0x20000000
00566 
00570 #define SAT_OPTIONAL_TAG  0x40000000
00571 
00575 #define SAT_ANY        0
00576 
00580 #define SAT_NUMERIC   0x10000000 
00581 
00582 
00583 
00584 
00585 // PREDEFINED REALS
00589 #define REAL_0        0x2f937
00590 
00593 #define REAL_1        0x2f94c
00594 
00597 #define REAL_2        0x2f961
00598 
00601 #define REAL_3        0x2f976
00602 
00605 #define REAL_4        0x2f98b
00606 
00609 #define REAL_5        0x2f9a0
00610 
00613 #define REAL_6        0x2f9b5
00614 
00617 #define REAL_7        0x2f9ca
00618 
00621 #define REAL_8        0x2f9df
00622 
00625 #define REAL_9        0x2f9f4
00626 
00627 // Saturn register save area
00628 
00633 #define SAT_INTRPPTR 0x8076B     /* D0 */
00634 
00639 #define SAT_DSKTOP   0x806F8    /* D1 */
00640 
00645 #define SAT_RSKTOP   0x806F3    /* B */
00646 
00651 #define SAT_AVMEM    0x80E9B    /* D */
00652 
00657 #define SAT_TEMPTOP  0x806EE
00658 
00663 #define SAT_TEMPOB  0x806E9
00664 
00669 #define SAT_EDITLINE  0x806FD
00670 
00675 #define SAT_ERROR 0x80EA5
00676 
00681 #define SAT_TEMPENV 0x80702
00682 
00687 #define SAT_TOUCHTAB 0x8070c
00688 
00693 #define SAT_FSTVGERPTR 0x8072f
00694 
00699 #define SAT_CONTEXT 0x8071b
00700 
00704 #define SAT_USEROB  0x80711
00705 
00706 
00707 // OTHER USEFUL SATURN OBJECTS
00708 
00712 #define SAT_TRUE 0x3a81
00713 
00717 #define SAT_FALSE 0x3ac0
00718 
00722 #define SATERR_TOOFEWARGS 0x201
00723 
00727 #define SATERR_BADARGTYPE 0x202
00728 
00732 #define SATERR_BADARGVALUE 0x203
00733 
00734 // TODO: ADD ALL CALCULATOR ERRORS HERE!
00735 #define SATERR_INSUFFMEMORY             0x001
00736 #define SATERR_UNDEFLOCALNAME           0x003
00737 #define SATERR_UNDEFXLIBNAME            0x004
00738 #define SATERR_MEMORYCLEAR                      0x005
00739 #define SATERR_INVALIDCARDDATA          0x008
00740 #define SATERR_OBJECTINUSE                      0x009
00741 #define SATERR_PORTNOTAVAILABLE         0x00A
00742 #define SATERR_NOROOMINPORT                     0x00B
00743 #define SATERR_NOROOMTOSAVESTACK        0x101
00744 #define SATERR_INVALIDUSERFUNCTION      0X103
00745 #define SATERR_INVALIDSYNTAX            0X106
00746 #define SATERR_WRONGARGUMENTCOUNT       0X128
00747 #define SATERR_NONEMPTYDIR                      0X12B
00748 #define SATERR_INVALIDDEFINITION        0X12C
00749 #define SATERR_MISSINGLIBRARY           0X12D
00750 #define SATERR_UNABLETOISOLATE          0X130
00751 #define SATERR_OUTOFMEMORY                      0X135
00752 
00755 #define SATERR_TOOFEWARGS                       0x201
00756 
00760 #define SATERR_BADARGTYPE                       0x202
00761 
00765 #define SATERR_BADARGVALUE                      0x203
00766 
00767 #define SATERR_UNDEFINEDNAME            0X204
00768 #define SATERR_POSITIVEUNDERFLOW        0X301
00769 #define SATERR_NEGATIVEUNDERFLOW        0X302
00770 #define SATERR_OVERFLOW                         0X303
00771 #define SATERR_UNDEFINEDRESULT          0X304
00772 #define SATERR_INFINITERESULT           0X305
00773 #define SATERR_INVALIDDIMENSION         0X501
00774 #define SATERR_INVALIDARRAYELEM         0X502
00775 
00776 
00782 // **************************************************************
00783 //               GENERAL PURPOSE LOW-LEVEL API
00784 // **************************************************************
00785 
00824 void sat3_poke(SAT_OBJECT sat_addr,unsigned int val,int nibbles);
00825 
00839 unsigned int sat3_peek(SAT_OBJECT sat_addr,int nibbles);
00840 
00855 void sat3_memmove(SAT_OBJECT dest,SAT_OBJECT source,int nibbles);
00856 
00870 void sat3_memset(SAT_OBJECT dest,int value,int nibvalue,int nibbles);
00871 
00888 SAT_OBJECT sat3_alloc(SAT_OBJECT where,int nibbles);
00889 
00903 int sat3_free(SAT_OBJECT block);
00904 
00905 
00925 SAT_OBJECT sat3_copyobject(SAT_OBJECT dest,SAT_OBJECT source);
00926 
00934 int sat3_sizeof(SAT_OBJECT obj);
00935 
00945 int sat3_getfreetempob();
00956 int sat3_getfreeuserob();
00968 SAT_OBJECT sat3_createtemp(int objsize);
00969 
00980 SAT_OBJECT sat3_skipob(SAT_OBJECT object);
00981 
00991 SAT_OBJECT sat3_sknameup(SAT_OBJECT name);
00992 
01002 SAT_OBJECT sat3_sknamedn(SAT_OBJECT name);
01003 
01016 LONGLONG sat3_bcd2llong(SAT_OBJECT data,int digits);
01017 
01029 void sat3_errorsto(int errno);
01030 
01042 void sat3_exiterror(int errno);
01043 
01044 
01045 
01057 void sat3_garbcol();
01058 
01059 
01072 unsigned int sat3_s2a(SAT_OBJECT sat_addr);
01073 
01086 int sat3_typesize(int prologtype);
01087 
01088 
01089 
01090 
01096 // **************************************************************
01097 //                      OBJECT CREATION API
01098 // **************************************************************
01099 
01100 // *******************************
01101 //         System BINT
01102 // *******************************
01103 
01104 
01134 SAT_OBJECT sat3_createbint_int(SAT_OBJECT where,int value);
01135 
01148 int sat3_convertbint_int(SAT_OBJECT bint);
01149 
01162 unsigned int sat3_convertbint_uint(SAT_OBJECT bint);
01163 
01170 // *******************************
01171 //              REAL
01172 // *******************************
01201 SAT_OBJECT sat3_createreal_xreal(SAT_OBJECT where,XREAL *value);
01202 
01216 BOOL sat3_convertreal_xreal(SAT_OBJECT real, XREAL *result);
01217 
01237 SAT_OBJECT sat3_createreal_decn(SAT_OBJECT where,decNumber *value);
01238 
01253 BOOL sat3_convertreal_decn(SAT_OBJECT real, decNumber *result);
01254 
01274 SAT_OBJECT sat3_createreal_dbl(SAT_OBJECT where,double value);
01275 
01288 double sat3_convertreal_dbl(SAT_OBJECT real);
01289 
01309 SAT_OBJECT sat3_createreal_int(SAT_OBJECT where,int value);
01310 
01323 int sat3_convertreal_int(SAT_OBJECT real);
01324 
01344 SAT_OBJECT sat3_createreal_llong(SAT_OBJECT where,LONGLONG value);
01345 
01358 LONGLONG sat3_convertreal_llong(SAT_OBJECT real);
01359 
01366 // *******************************
01367 //              COMPLEX
01368 // *******************************
01369 
01399 SAT_OBJECT sat3_createcplx_xreal(SAT_OBJECT where,XREAL *real,XREAL *imag);
01400 
01415 BOOL sat3_convertcplx_xreal(SAT_OBJECT cplx, XREAL *real,XREAL *imag);
01416 
01437 SAT_OBJECT sat3_createcplx_decn(SAT_OBJECT where,decNumber *real,decNumber *imag);
01438 
01455 BOOL sat3_convertcplx_decn(SAT_OBJECT cplx, decNumber *real,decNumber *imag);
01456 
01477 SAT_OBJECT sat3_createcplx_dbl(SAT_OBJECT where,double real,double imag);
01478 
01493 BOOL sat3_convertcplx_dbl(SAT_OBJECT cplx,double *real, double *imag);
01494 
01515 SAT_OBJECT sat3_createcplx_int(SAT_OBJECT where,int real,int imag);
01516 
01531 BOOL sat3_convertcplx_int(SAT_OBJECT cplx,int *real,int *imag);
01532 
01553 SAT_OBJECT sat3_createcplx_llong(SAT_OBJECT where,LONGLONG real,LONGLONG imag);
01554 
01569 BOOL sat3_convertcplx_llong(SAT_OBJECT cplx,LONGLONG *real,LONGLONG *imag);
01570 
01571 
01576 // *******************************
01577 //              ZINT
01578 // *******************************
01579 
01607 SAT_OBJECT sat3_createzint_xreal(SAT_OBJECT where,XREAL *value); 
01608 
01621 BOOL sat3_convertzint_xreal(SAT_OBJECT zint, XREAL *value);
01622 
01641 SAT_OBJECT sat3_createzint_decn(SAT_OBJECT where,decNumber *value);
01642 
01658 BOOL sat3_convertzint_decn(SAT_OBJECT zint,decNumber **result);
01659 
01679 SAT_OBJECT sat3_createzint_dbl(SAT_OBJECT where,double value);
01680 
01692 double sat3_convertzint_dbl(SAT_OBJECT zint);
01693 
01694 
01714 SAT_OBJECT sat3_createzint_int(SAT_OBJECT where,int value);
01715 
01729 int sat3_convertzint_int(SAT_OBJECT zint);
01730 
01750 SAT_OBJECT sat3_createzint_llong(SAT_OBJECT where,LONGLONG value);
01751 
01765 LONGLONG sat3_convertzint_llong(SAT_OBJECT zint);
01766 
01778 #define sat3_zintdigits(zint) (sat3_strsize(zint)-1)
01779 
01784 // *******************************
01785 //              CHAR
01786 // *******************************
01787 
01814 SAT_OBJECT sat3_createchar_char(SAT_OBJECT where,char value);
01815 
01826 char sat3_convertchar_char(SAT_OBJECT ochar);
01827 
01833 // *******************************
01834 //              CSTR
01835 // *******************************
01836 
01867 SAT_OBJECT sat3_createcstr_bytes(SAT_OBJECT where,char *data,int nbytes);
01868 
01885 BOOL sat3_convertcstr_bytes(SAT_OBJECT cstr,char *data, int maxbytes);
01886 
01906 SAT_OBJECT sat3_createcstr_str(SAT_OBJECT where,char *string);
01907 
01923 BOOL sat3_convertcstr_str(SAT_OBJECT cstr,char *string, int maxchars);
01924 
01947 SAT_OBJECT sat3_createcstr_substr(SAT_OBJECT where,char *string, int startpos,int nchars);
01948 
01967 BOOL sat3_convertcstr_substr(SAT_OBJECT cstr,char *string, int startpos,int nchars);
01968 
01969 
01978 int sat3_strsize(SAT_OBJECT obj);
01979 
01989 #define sat3_strlen(cstr)  (sat3_strsize(cstr)>>1)
01990 
01991 
01997 // *******************************
01998 //              HXS
01999 // *******************************
02000 
02029 SAT_OBJECT sat3_createhxs_int(SAT_OBJECT where,int value);
02030 
02044 int sat3_converthxs_int(SAT_OBJECT hxs);
02045 
02065 SAT_OBJECT sat3_createhxs_llong(SAT_OBJECT where,LONGLONG value);
02066 
02080 LONGLONG sat3_converthxs_llong(SAT_OBJECT hxs);
02081 
02101 SAT_OBJECT sat3_createhxs_bytes(SAT_OBJECT where,char *data,int nbytes);
02102 
02118 BOOL sat3_converthxs_bytes(SAT_OBJECT hxs,char *data, int maxbytes);
02119 
02128 #define sat3_hxssize(hxs) sat3_strsize(hxs)
02129 
02130 
02136 // *******************************
02137 //              IDNT
02138 // *******************************
02139 
02169 SAT_OBJECT sat3_createid_str(SAT_OBJECT where,char *string);
02170 
02171 
02187 BOOL sat3_convertid_str(SAT_OBJECT cstr,char *string, int maxchars);
02188 
02189 
02199 int sat3_idlen(SAT_OBJECT idnt);
02200 
02201 
02206 // *******************************
02207 //              TAG
02208 // *******************************
02209 
02241 SAT_OBJECT sat3_createtag_str(SAT_OBJECT where,char *tag,SAT_OBJECT obj);
02242 
02258 BOOL sat3_converttag_str(SAT_OBJECT tagged,char *string, int maxchars);
02259 
02268 #define sat3_taglen(tag) sat3_idlen(tag)
02269 
02270 
02286 SAT_OBJECT sat3_striptag(SAT_OBJECT obj);
02287 
02293 // *******************************
02294 //           REAL ARRAYS
02295 // *******************************
02296 
02327 SAT_OBJECT sat3_createrarray(SAT_OBJECT where,int rows,int cols);
02328 
02344 void sat3_rarrayput_dbl(SAT_OBJECT array,int row,int col,double value);
02361 void sat3_rarrayput_xreal(SAT_OBJECT array,int row,int col,XREAL *value);
02362 
02378 void sat3_rarrayput_int(SAT_OBJECT array,int row,int col,int value);
02394 void sat3_rarrayput_llong(SAT_OBJECT array,int row,int col,LONGLONG value);
02410 void sat3_rarrayput_decn(SAT_OBJECT array,int row,int col,decNumber *value);
02411 
02428 double sat3_rarrayget_dbl(SAT_OBJECT array,int row,int col);
02447 BOOL sat3_rarrayget_xreal(SAT_OBJECT array,int row,int col,XREAL *result);
02465 int sat3_rarrayget_int(SAT_OBJECT array,int row,int col);
02483 LONGLONG sat3_rarrayget_llong(SAT_OBJECT array,int row,int col);
02503 BOOL sat3_rarrayget_decn(SAT_OBJECT array,int row,int col,decNumber *result);
02504 
02521 BOOL sat3_rarraysize(SAT_OBJECT array,int *rowptr,int *colptr);
02522 
02523 
02529 // *******************************
02530 //          COMPLEX ARRAYS
02531 // *******************************
02532 
02563 SAT_OBJECT sat3_createcarray(SAT_OBJECT where,int rows,int cols);
02580 void sat3_carrayput_dbl(SAT_OBJECT array,int row,int col,double rpart,double ipart);
02597 void sat3_carrayput_xreal(SAT_OBJECT array,int row,int col,XREAL *rpart,XREAL *ipart);
02614 void sat3_carrayput_int(SAT_OBJECT array,int row,int col,int rpart,int ipart);
02631 void sat3_carrayput_llong(SAT_OBJECT array,int row,int col,LONGLONG rpart,LONGLONG ipart);
02648 void sat3_carrayput_decn(SAT_OBJECT array,int row,int col,decNumber *rpart,decNumber *ipart);
02669 BOOL sat3_carrayget_dbl(SAT_OBJECT array,int row,int col,double *rpart,double *ipart);
02690 BOOL sat3_carrayget_xreal(SAT_OBJECT array,int row,int col,XREAL *rpart,XREAL *ipart);
02710 BOOL sat3_carrayget_int(SAT_OBJECT array,int row,int col,int *rpart,int *ipart);
02730 BOOL sat3_carrayget_llong(SAT_OBJECT array,int row,int col,LONGLONG *rpart,LONGLONG *ipart);
02753 BOOL sat3_carrayget_decn(SAT_OBJECT array,int row,int col,decNumber *rpart,decNumber *ipart);
02754 
02771 BOOL sat3_carraysize(SAT_OBJECT array,int *rowptr,int *colptr);
02772 
02773 
02774 
02780 // *******************************
02781 //            MATRICES
02782 // *******************************
02783 
02821 SAT_OBJECT sat3_creatematrix(SAT_OBJECT where,int rows,int cols,SAT_OBJECT fillobj,int allocsize );
02822 
02838 SAT_OBJECT sat3_matrixgetrow(SAT_OBJECT matrix,int row);
02839 
02855 SAT_OBJECT sat3_matrixget(SAT_OBJECT matrix,int row, int col);
02856 
02872 SAT_OBJECT sat3_matrixfirst(SAT_OBJECT obj);
02873 
02890 SAT_OBJECT sat3_matrixnext(SAT_OBJECT obj);
02906 BOOL sat3_matrixsize(SAT_OBJECT matrix,int *rowptr,int *colptr);
02907 
02922 BOOL sat3_matrixrowinsert(SAT_OBJECT matrix,int rowpos,SAT_OBJECT fillobj);
02923 
02936 BOOL sat3_matrixrowremove(SAT_OBJECT matrix,int rowpos);
02951 BOOL sat3_matrixcolinsert(SAT_OBJECT matrix,int colpos,SAT_OBJECT fillobj);
02952 
02965 BOOL sat3_matrixcolremove(SAT_OBJECT matrix,int colpos);
02966 
02982 BOOL sat3_matrixput(SAT_OBJECT matrix,int row,int col,SAT_OBJECT obj);
02983 
02984 
02990 // *******************************
02991 //            SYMBOLICS
02992 // *******************************
02993 
03008 // *******************************
03009 //            GROBS
03010 // *******************************
03011 
03027 // *******************************
03028 //            LISTS
03029 // *******************************
03030 
03145 SAT_OBJECT sat3_createlist(SAT_OBJECT where,int allocsize );
03146 
03160 SAT_OBJECT sat3_listhead(SAT_OBJECT list);
03195 SAT_OBJECT sat3_listnext(SAT_OBJECT obj);
03209 SAT_OBJECT sat3_listtail(SAT_OBJECT list);
03210 
03246 SAT_OBJECT sat3_listget(SAT_OBJECT list, int position);
03258 int sat3_listcount(SAT_OBJECT list);
03276 BOOL sat3_listclose(SAT_OBJECT position);
03291 BOOL sat3_listinsert(SAT_OBJECT position,SAT_OBJECT object);
03305 BOOL sat3_listremove(SAT_OBJECT position);
03306 
03319 BOOL sat3_listappend(SAT_OBJECT list,SAT_OBJECT object);
03320 
03326 // *******************************
03327 //            DIRS
03328 // *******************************
03329 
03345 SAT_OBJECT sat3_home();
03346 
03351 SAT_OBJECT sat3_hiddendir();
03356 SAT_OBJECT sat3_getcwd();
03368 BOOL sat3_setcwd(SAT_OBJECT dir);
03378 SAT_OBJECT sat3_findfirst(SAT_OBJECT dir);
03391 SAT_OBJECT sat3_findnext(SAT_OBJECT dir, SAT_OBJECT diritem);
03406 BOOL sat3_getvarname(SAT_OBJECT obj,char *namebuffer, int max_chars);
03418 int sat3_getvarnamelen(SAT_OBJECT obj);
03419 
03431 SAT_OBJECT sat3_updir(SAT_OBJECT dir);
03451 SAT_OBJECT sat3_rclindir(SAT_OBJECT dir,char *name);
03452 
03471 SAT_OBJECT sat3_rclhere(char *name);
03472 
03492 SAT_OBJECT sat3_rcl(char *name);
03493 
03507 BOOL sat3_getpath(SAT_OBJECT obj,char *pathbuffer,int maxchars);
03508 
03524 BOOL sat3_purgeobj(SAT_OBJECT varobject);
03546 BOOL sat3_purge(char *varpath);
03569 BOOL sat3_purgeindir(SAT_OBJECT dir,char *varname);
03591 BOOL sat3_stoindir(SAT_OBJECT dir,SAT_OBJECT obj,char *name);
03612 BOOL sat3_sto(SAT_OBJECT obj,char *varname);
03613 
03633 BOOL sat3_crdir(char *name);
03646 BOOL sat3_pgdir(char *name);
03665 BOOL sat3_chdir(char *dir);
03666 
03667 
03668 
03674 // **************************************************************
03675 //                    STACK MANIPULATION API
03676 // **************************************************************
03692 int sat3_depth();
03693 
03698 void sat3_drop();
03699 
03704 void sat3_dropn(int n);
03705 
03710 void sat3_swap();
03711 
03722 BOOL sat3_push(SAT_OBJECT object);
03723 
03729 SAT_OBJECT sat3_pop();
03730 
03736 SAT_OBJECT sat3_pick(int level);
03737 
03743 void sat3_errorsto(int errno);
03744 
03750 BOOL sat3_pushtruefalse(BOOL arg);
03751 
03756 // **************************************************************
03757 //                    ARGUMENT AND TYPE CHECKING API
03758 // **************************************************************
03790 BOOL sat3_checktype(SAT_OBJECT obj,unsigned int prolog);
03791 
03817 BOOL sat3_checkargs(int n,... );
03818 
03845 void sat3_checkargserror(int n,... );
03846 
03864 BOOL sat3_ckn(int n);
03865 
03884 void sat3_cknerror(int n);
03885 
03886 
03887 
03895 #define sat3_isreal(obj) sat3_checktype(obj,SAT_DOREAL)
03896 
03904 #define sat3_iscplx(obj) sat3_checktype(obj,SAT_DOCMP)
03905 
03913 #define sat3_isbint(obj) sat3_checktype(obj,SAT_DOBINT)
03914 
03922 #define sat3_iszint(obj) sat3_checktype(obj,SAT_DOINT)
03923 
03931 #define sat3_ischar(obj) sat3_checktype(obj,SAT_DOCHAR)
03932 
03940 #define sat3_iscstr(obj) sat3_checktype(obj,SAT_DOCSTR)
03941 
03949 #define sat3_ishxs(obj) sat3_checktype(obj,SAT_DOHXS)
03950 
03958 #define sat3_islist(obj) sat3_checktype(obj,SAT_DOLIST)
03959 
03967 #define sat3_ismatrix(obj) sat3_checktype(obj,SAT_DOMATRIX)
03968 
03976 #define sat3_isid(obj) sat3_checktype(obj,SAT_DOIDNT)
03977 
03985 #define sat3_istag(obj) sat3_checktype(obj,SAT_DOTAG)
03986 
03994 #define sat3_issymb(obj) sat3_checktype(obj,SAT_DOSYMB)
03995 
04003 #define sat3_isdir(obj) sat3_checktype(obj,SAT_DORRP)
04004 
04005 
04013 BOOL sat3_israrray(SAT_OBJECT obj);
04014 
04015 
04024 BOOL sat3_iscarray(SAT_OBJECT obj);
04025 
04033 BOOL sat3_isptr(SAT_OBJECT obj);
04034 
04039 #include <sat3_common_idioms.h>
04040 
04041 #endif // __SAT3_H