| 2275 | |
| 2276 | |
| 2277 | int |
| 2278 | printAlgorithm(ClientData clientData, Tcl_Interp *interp, int argc, |
| 2279 | TCL_Char **argv, OPS_Stream &output) |
| 2280 | { |
| 2281 | int eleArg = 0; |
| 2282 | if (theAlgorithm == 0) |
| 2283 | return TCL_OK; |
| 2284 | |
| 2285 | // if just 'print <filename> algorithm'- no flag |
| 2286 | if (argc == 0) { |
| 2287 | theAlgorithm->Print(output); |
| 2288 | return TCL_OK; |
| 2289 | } |
| 2290 | |
| 2291 | // if 'print <filename> Algorithm flag' get the flag |
| 2292 | int flag; |
| 2293 | if (Tcl_GetInt(interp, argv[eleArg], &flag) != TCL_OK) { |
| 2294 | opserr << "WARNING print algorithm failed to get integer flag: \n"; |
| 2295 | opserr << argv[eleArg] << endln; |
| 2296 | return TCL_ERROR; |
| 2297 | } |
| 2298 | theAlgorithm->Print(output,flag); |
| 2299 | return TCL_OK; |
| 2300 | } |
| 2301 | |
| 2302 | |
| 2303 | int |