| 179 | } |
| 180 | |
| 181 | int |
| 182 | save(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv) |
| 183 | { |
| 184 | |
| 185 | if (theDatabase == 0) { |
| 186 | opserr << "WARNING: save - no database has been constructed\n"; |
| 187 | return TCL_OK; |
| 188 | } |
| 189 | |
| 190 | // make sure at least one other argument to contain type of system |
| 191 | if (argc < 2) { |
| 192 | opserr << "WARNING save no commit tag - want save commitTag?"; |
| 193 | return TCL_OK; |
| 194 | } |
| 195 | |
| 196 | // check argv[1] for commitTag |
| 197 | int commitTag; |
| 198 | if (Tcl_GetInt(interp, argv[1], &commitTag) != TCL_OK) { |
| 199 | opserr << "WARNING - save could not read commitTag " << argv[1] << endln; |
| 200 | return TCL_OK; |
| 201 | } |
| 202 | |
| 203 | if (theDatabase->commitState(commitTag) < 0) { |
| 204 | opserr << "WARNING - database failed to commitState \n"; |
| 205 | return TCL_ERROR; |
| 206 | } |
| 207 | |
| 208 | return TCL_OK; |
| 209 | } |
| 210 | |
| 211 | |
| 212 | int |
nothing calls this directly
no test coverage detected