[BACK]Return to extern.h CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Annotation of OpenXM/src/kan96xx/Kan/extern.h, Revision 1.4

1.4     ! takayama    1: /* $OpenXM: OpenXM/src/kan96xx/Kan/extern.h,v 1.3 2000/02/02 03:30:48 takayama Exp $ */
1.1       maekawa     2: /*********** global variables for module stackmachine***************/
                      3: extern int VerboseStack;
                      4: extern int DebugStack;
                      5: extern FILE *Fstack;
                      6: extern jmp_buf EnvOfStackMachine;
                      7: extern struct object NullObject;
                      8: extern struct object NoObject;
                      9: extern int Lookup[TYPES][TYPES];
                     10:
                     11:
                     12: /* scanner.c */
                     13: /*struct tokens getokenSM(actionType kind,char *str);
                     14: struct tokens *decomposeToTokens(char *str,int *size);*/
                     15: struct tokens getokenSM();
                     16: struct tokens *decomposeToTokens();
                     17: char *getLOAD_SM1_PATH();
                     18:
                     19:
                     20: /* stackmachine.c  object */
                     21: struct object *newObject(void);
                     22: struct object newObjectArray(int size);
                     23: int isNullObject(struct object obj);
                     24:
                     25: /* stackmachine.c  dictionary */
                     26: int putSystemDictionary(char *str,struct object ob);
                     27: int findSystemDictionary(char *str);
                     28: int putUserDictionary(char *str,int h0,int h1,struct object ob,
                     29:                      struct dictionary *dic);
                     30: struct object KputUserDictionary(char *str,struct object ob);
                     31: struct object findUserDictionary(char *str,int h0,int h1,
                     32:                                 struct context *cp);
                     33: struct object KfindUserDictionary(char *str);
                     34: int putPrimitiveFuction(char *str,int number);
                     35: int hash0(char *s);
                     36: int hash1(char *s);
                     37: void hashInitialize(struct dictionary *dic);
                     38: struct tokens lookupTokens(struct tokens t);
                     39: struct object lookupLiteralString(char *s);
                     40: int putUserDictionary2(char *str,int h0,int h1,int attr,
                     41:                       struct dictionary *dic);
                     42: void KdefinePrimitiveFunctions(void);
                     43: struct object showSystemDictionary(int f);
                     44: int showUserDictionary(void) ;
                     45:
                     46:
                     47: /* stackmachine.c  stack */
                     48: struct object Kpop(void); /* Kpush and Kpop may be used only in stackmachine.c
                     49:                             and primitive.c */
                     50: int Kpush(struct object ob);
                     51: struct object peek(int k);
                     52: void printOperandStack(void);
                     53: struct object newOperandStack(int size);
                     54: void setOperandStack(struct object ob);
                     55: void stdOperandStack(void);
                     56:
                     57: /* stackmachine.c  printing */
                     58: void printObject(struct object ob,int nl,FILE *fp) ;
                     59: void printObjectArray(struct object ob,int nl,FILE *fp);
                     60:
                     61: /* stackmachine.c  misc*/
                     62: void scanner(void);
                     63: void ctrlC(int sig);
                     64: int executeToken(struct tokens token);
                     65: int executePrimitive(struct object ob);
                     66: int isLiteral(char *str);
                     67: void lockCtrlCForOx();
                     68: void unlockCtrlCForOx();
                     69: void restoreCtrlCForOx();
                     70:
                     71: /* stackmachine.c  export */
                     72: int KSdefineMacros(void);
                     73: struct object KSpop(void);
                     74: void KSpush(struct object ob);
                     75: char * KSstringPop(void);
                     76: int KSstackPointer(void);
                     77: struct object KSdupErrors(void);
1.3       takayama   78: struct object KSpeek(int k);
1.1       maekawa    79:
                     80: /* stackmachine.c context */
                     81: struct context *newContext0(struct context *super,char *name);
                     82: struct object KnewContext(struct object superobj, char *name);
                     83: void fprintContext(FILE *fp,struct context *c);
                     84: void KsetContext(struct object contextobj);
                     85: void contextControl(actionOfContextControl ctl);
                     86: struct object getSuperContext(struct object contextObj) ;
                     87:
                     88: /* kclass.c */
                     89: int initClassDataBase();
                     90: void fprintClass(FILE *fp,struct object ob);
                     91: int KclassEqualQ(struct object ob1,struct object ob2);
                     92: struct object KcreateClassIncetance(struct object ob1,
                     93:                                    struct object ob2,
                     94:                                    struct object ob3);
                     95: struct object KclassDataConversion(struct object ob1,struct object ob2);
                     96: /* dataConversion is also used for creating new object. */
                     97: /* Arithmetic functions. */
                     98: struct object Kclass_ooAdd(struct object ob1,struct object ob2);
                     99:
                    100: /* ErrorStack */
                    101: int pushErrorStack(struct object obj);
                    102: struct object popErrorStack(void);
                    103: int KScheckErrorStack(void);
                    104: struct object KnewErrorPacket(int serial,int no,char *message);
                    105: struct object KnewErrorPacketObj(struct object obj);
                    106:
                    107: /** usage.c */
                    108: void Kusage(struct object ob);
                    109: void Kusage2(FILE *fp,char *s);
                    110:
                    111: /*  list.c */
                    112: struct object *newList(struct object *op);
                    113: int klength(struct object *op);
                    114: struct object *vJoin(struct object *list1,struct object *list2);
                    115: struct object car(struct object *list);
                    116: struct object *cdr(struct object *list);
                    117: void printObjectList(struct object *op);
                    118: int memberQ(struct object *list1,struct object list2);
                    119:
                    120: /* list:conversion */
                    121: struct object listToArray(struct object *op);
                    122: struct object *arrayToList(struct object ob);
                    123:
                    124: /* kanExport0.c */
                    125: /** arithmetic **/
                    126: struct object KooAdd(struct object ob1, struct object ob2);
                    127: struct object KooSub(struct object ob1, struct object ob2);
                    128: struct object KooMult(struct object ob1,struct object ob2);
                    129: struct object KooDiv(struct object ob1,struct object ob2);
                    130: struct object KaoMult(struct object aa,struct object bb);
                    131: struct object KooDiv2(struct object ob1,struct object ob2);
                    132: struct object KoNegate(struct object ob1);
                    133: struct object KreduceRationalFunction(struct object ob);
                    134:
                    135: /* for rational function object */
                    136: struct object KoInverse(struct object ob);
                    137: int KisInvalidRational(objectp ob);
                    138: objectp copyObjectp(objectp op);
                    139: struct object KnewRationalFunction0(objectp op1, objectp op2);
                    140: int KisZeroObject(objectp ob);
                    141: int KisOneObject(objectp ob);
                    142: int KisMinusOneObject(objectp ob);
                    143:
                    144:
                    145: /** relation */
                    146: struct object KoIsPositive(struct object ob);
                    147: int KooEqualQ(struct object o1,struct object o2);
                    148: struct object KooGreater(struct object o1,struct object o2);
                    149: struct object KooLess(struct object o1,struct object o2);
                    150:
                    151:
                    152: /** Conversion */
                    153: struct object KdataConversion(struct object ob1, char *key);
                    154: struct object KpoInteger(int i);
                    155: struct object KpoString(char *s);
                    156: struct object KpoPOLY(POLY f);
                    157: struct object KpoArrayOfPOLY(struct arrayOfPOLY *ap);
                    158: struct object KpoMatrixOfPOLY(struct matrixOfPOLY *mp);
                    159: struct object KpoRingp(struct ring *ringp);
                    160: struct object KpoDouble(double a);
                    161: #define KopInteger(o) ( (o).lc.ival )
                    162: #define KopString(o)  ( (o).lc.str )
                    163: #define KopPOLY(o)    ( (o).lc.poly )
                    164: #define KopArrayOfPOLY(o) ( *((o).lc.arrayp) )
                    165: #define KopMatrixOfPOLY(o) ( *((o).lc.matrixp))
                    166: #define KopArrayOfPOLYp(o) ( (o).lc.arrayp )
                    167: #define KopMatrixOfPOLYp(o) ( (o).lc.matrixp)
                    168: #define KopRingp(o)  ( (o).lc.ringp )
                    169: #define KopUniversalNumber(o)  ( (o).lc.universalNumber )
                    170: #define Knumerator(o)  ( (o).lc.op )
                    171: #define Kdenominator(o) ( (o).rc.op )
                    172: #define KopDouble(ob)  (*((ob).lc.dbl))
                    173: char *KPOLYToString(POLY f);
                    174: /** conversion 2 **/
                    175: struct object arrayOfPOLYToArray(struct arrayOfPOLY *aa);
                    176: struct object matrixOfPOLYToArray(struct matrixOfPOLY *pmat);
                    177: struct arrayOfPOLY *arrayToArrayOfPOLY(struct object oa);
                    178: struct matrixOfPOLY *arrayToMatrixOfPOLY(struct object oa);
                    179: double toDouble0(struct object ob);
                    180:
                    181: /** :ring :kan **/
                    182: int objArrayToOrderMatrix(struct object oA,int order[],int n,int oasize);
                    183: int KsetOrderByObjArray(struct object oA);
                    184: struct object oGetOrderMatrix(struct ring *ringp); /* order.c */
                    185: struct object KgetOrderMatrixOfCurrentRing();
                    186: int KsetUpRing(struct object ob1,struct object ob2, struct object ob3,struct object ob4,struct object ob5);
                    187: void KshowRing(struct ring *ringp);
                    188: struct object KdefaultPolyRing(struct object num);
                    189: struct object KswitchFunction(struct object ob1,struct object ob2);
                    190: void KprintSwitchStatus(void);
                    191: struct object  KoReplace(struct object ob,struct object rule);
                    192: struct object Kparts(struct object f,struct object v);
                    193: struct object Kparts2(struct object f,struct object v);
                    194: struct object parts2(POLY f,POLY g);
                    195: struct object Kdegree(struct object f,struct object v);
                    196: struct object KringMap(struct object ob);
                    197: struct object Ksp(struct object ob1,struct object ob2);
                    198: struct object Khead(struct object ob);
                    199: int KpolyLength(POLY f);
                    200: struct object KsetOutputOrder(struct object obj,struct ring *rp);
                    201: struct object KsetVariableNames(struct object obj,struct ring *rp);
                    202:
                    203:
                    204: /* :eval */
                    205: struct object Keval(struct object obj);
                    206:
                    207: /** misc **/
                    208: struct object KtoRecords(struct object ob1);
                    209: void Kclose(void);
                    210: int warningKan(char *s);
1.4     ! takayama  211: int warningKanNoStrictMode(char *s);
1.1       maekawa   212: int errorKan1(char *s,char *m);
                    213: struct object test(struct object ob);
                    214: struct object Kextension(struct object ob);
                    215: struct object KgbExtension(struct object ob);
                    216: struct object KmpzExtension(struct object ob);
                    217:
                    218: /** Utilities */
                    219: char *KremoveSpace(char *s);
                    220: int KtoArgvbyCurryBrace(char *str,char *argv[],int limit);
                    221:
                    222:
                    223: /** kanExport1.c */
                    224: /* :ring :kan */
                    225: struct object Kreduction(struct object f,struct object set);
                    226: struct object Kgroebner(struct object ob);
                    227:
                    228: /* :conversion */
                    229: struct object gradedPolySetToGradedArray(struct gradedPolySet *gps,
                    230:                                         int keepRedundant);
                    231: struct object polySetToArray(struct polySet *ps,int keepRedundant);
                    232: struct object gradedPolySetToArray(struct gradedPolySet *g,int keepRedundant);
                    233: struct gradedPolySet *arrayToGradedPolySet(struct object ob);
                    234: struct object syzPolyToArray(int size,POLY f,struct gradedPolySet *grG);
                    235: struct object getBackwardArray(struct gradedPolySet *grG);
                    236: POLY arrayToPOLY(struct object ob);
                    237: struct object POLYToArray(POLY f);
                    238: struct object oPrincipalPart(struct object ob);
                    239: struct object oInitW(struct object ob,struct object oWeight);
                    240:
                    241: /* :misc  */
                    242: struct object homogenizeObject(struct object ob,int *gradep);
                    243: struct object homogenizeObject_vec(struct object ob,int *gradep);
                    244: int oGrade(struct object ob);
                    245: struct ring *oRingp(struct object ob);
                    246: struct object KisOrdered(struct object of);
                    247: struct object KvectorToSchreyer_es(struct object obarray);
                    248:
                    249: /* hilbert.c */
                    250: struct object hilberto(struct object obgb,struct object obvlist);
                    251:
                    252: /* option.c */
                    253: struct object KsystemVariable(struct object ob);
                    254:
                    255: void KasirKanExecute0(char *s);
                    256:
                    257: struct object KbinaryToObject(int size, char *data);
                    258: char *KobjectToBinary(struct object ob,int *size);
                    259:
                    260: int mmLarger_tower3(POLY ff,POLY gg,struct object *gbList); /* order.c */
                    261: struct object KschreyerSkelton(struct object g);

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>