This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| int C2F() | scirun (char *bu1, long int bu1_len) |
Run scilab parser with initial instruction
| bu1 | : character string which contains the initial instruction | |
| bu1_len | : length of bu1 |
Definition at line 19 of file scirun.c.
References allowptr(), Bot, bsiz, C2F, callinterf(), cha1_, cx0, cx1, Err, err1, error, Fin, fun, funs(), ir, isbyref(), iset(), krec, Lhs, Max, niv, parse(), paus, pt, ref2val(), Rhs, rstk, str_copy_buf(), and Top.
Referenced by Initialize(), realmain(), ScilabDoOneEvent(), SendScilabJob(), StartScilab(), TerminateCorePart1(), and VTRun().
00020 { 00021 static int iflagint = 0; 00022 static int k = 0; 00023 static int ir = 0; 00024 00025 /* set instruction to execute at start-up */ 00026 00027 str_copy_buf(cha1_.buf, bu1, bsiz, bu1_len); 00028 C2F(iop).rio = -1; 00029 C2F(iop).lpt[0] = 1; 00030 C2F(iop).lpt[5] = 0; 00031 C2F(recu).pt = 0; 00032 00033 C2F(recu).icall = 0; 00034 C2F(recu).krec = 99999; 00035 00036 /* call instructions parser */ 00037 00038 L60: 00039 C2F(parse)(); 00040 if (C2F(com).fun == 99) 00041 { 00042 C2F(com).fun = 0; 00043 return 0; 00044 } 00045 if (Err > 0) 00046 { 00047 if (C2F(recu).niv > 0 && C2F(recu).paus > 0) C2F(com).fun = 0; 00048 goto L60; 00049 } 00050 00051 if (C2F(recu).rstk[C2F(recu).pt - 1] / 100 == 9) 00052 { 00053 ir = C2F(recu).rstk[C2F(recu).pt - 1] - 900; 00054 00055 if (ir == 1) 00056 { 00057 /* back to gw_core */ 00058 k = 13; 00059 } 00060 else if (ir >= 2 && ir <= 9) 00061 { 00062 /* back to gw_io */ 00063 k = 5; 00064 } 00065 else if (ir == 10) 00066 { 00067 /* end of overloaded function */ 00068 --C2F(recu).pt; 00069 goto L90; 00070 } 00071 else if (ir > 40) 00072 { 00073 /* back to gw_user2 */ 00074 k = 24; 00075 } 00076 else if (ir > 20) 00077 { 00078 /* back to gw_user */ 00079 k = 14; 00080 } 00081 else 00082 { 00083 goto L89; 00084 } 00085 iflagint = 0; 00086 goto L95; 00087 } 00088 00089 L89: 00090 if (Top < Rhs) 00091 { 00092 int code_error=22; 00093 C2F(error)(&code_error); 00094 if (C2F(recu).niv > 0 && C2F(recu).paus > 0) C2F(com).fun = 0; 00095 goto L60; 00096 } 00097 if (Top - Rhs + Lhs + 1 >= Bot) 00098 { 00099 int code_error=18; 00100 C2F(error)(&code_error); 00101 if (C2F(recu).niv > 0 && C2F(recu).paus > 0) C2F(com).fun = 0; 00102 goto L60; 00103 } 00104 C2F(errgst).toperr = Top - Max(0,Rhs); 00105 goto L91; 00106 00107 L90: 00108 if (Err > 0) 00109 { 00110 if (C2F(recu).niv > 0 && C2F(recu).paus > 0) C2F(com).fun = 0; 00111 goto L60; 00112 } 00113 L91: 00114 k = C2F(com).fun; 00115 C2F(com).fun = 0; 00116 if (k == C2F(recu).krec) 00117 { 00118 int code_error=22; 00119 C2F(recu).krec = -1; 00120 C2F(error)(&code_error); 00121 if (C2F(recu).niv > 0 && C2F(recu).paus > 0) C2F(com).fun = 0; 00122 goto L60; 00123 } 00124 C2F(recu).krec = -1; 00125 if (k == 0) goto L60; 00126 00127 L95: 00128 if (! C2F(allowptr)(&k)) 00129 { 00130 C2F(ref2val)(); 00131 } 00132 C2F(recu).krec = k; 00133 C2F(callinterf)(&k, &iflagint); 00134 C2F(recu).krec = -1; 00135 if (C2F(com).fun >= 0) 00136 { 00137 if (Top - Lhs + 1 > 0) 00138 { 00139 int cx0=0; 00140 int cx1=0; 00141 C2F(iset)(&Rhs, &cx0, &C2F(vstk).infstk[Top - Lhs], &cx1); 00142 } 00143 if (C2F(recu).paus > 0) 00144 { 00145 goto L91; 00146 } 00147 if (C2F(errgst).err1 > 0) 00148 { 00149 Top = C2F(errgst).toperr; 00150 } 00151 goto L90; 00152 } 00153 00154 /* 00155 called interface ask for a scilab function to perform the function (fun=-1) 00156 the function name is given in ids(1,pt+1) 00157 call ref2val removed here because if forces overloading function to 00158 be called by value 00159 call ref2val 00160 */ 00161 C2F(com).fun = 0; 00162 C2F(funs)(&C2F(recu).ids[(C2F(recu).pt + 1) * 6 - 6]); 00163 if (C2F(iop).err > 0) 00164 { 00165 if (C2F(recu).niv > 0 && C2F(recu).paus > 0) C2F(com).fun = 0; 00166 goto L60; 00167 } 00168 if (C2F(com).fun > 0) 00169 { 00170 if (C2F(isbyref)(&C2F(com).fun) == 0) 00171 { 00172 C2F(ref2val)(); 00173 } 00174 goto L91; 00175 } 00176 00177 if (Fin == 0) 00178 { 00179 int code_error=246; 00180 C2F(error)(&code_error); 00181 if (Err > 0) 00182 { 00183 if (C2F(recu).niv > 0 && C2F(recu).paus > 0) C2F(com).fun = 0; 00184 goto L60; 00185 } 00186 goto L90; 00187 } 00188 ++C2F(recu).pt; 00189 Fin = C2F(vstk).lstk[Fin - 1]; 00190 C2F(recu).rstk[C2F(recu).pt - 1] = 910; 00191 C2F(recu).icall = 5; 00192 C2F(com).fun = 0; 00193 /* *call* macro */ 00194 goto L60; 00195 00196 return 0; 00197 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.5.1