wasCSharpSQLite – Blame information for rev 4
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* |
2 | * RenameCmd.java |
||
3 | * |
||
4 | * Copyright (c) 1999 Mo DeJong. |
||
5 | * Copyright (c) 1997 Cornell University. |
||
6 | * Copyright (c) 1997 Sun Microsystems, Inc. |
||
7 | * |
||
8 | * See the file "license.terms" for information on usage and |
||
9 | * redistribution of this file, and for a DISCLAIMER OF ALL |
||
10 | * WARRANTIES. |
||
11 | * |
||
12 | * Included in SQLite3 port to C# for use in testharness only; 2008 Noah B Hart |
||
13 | * |
||
14 | * RCS @(#) $Id: RenameCmd.java,v 1.2 1999/08/03 03:07:54 mo Exp $ |
||
15 | * |
||
16 | */ |
||
17 | using System; |
||
18 | namespace tcl.lang |
||
19 | { |
||
20 | |||
21 | /// <summary> This class implements the built-in "rename" command in Tcl.</summary> |
||
22 | |||
23 | class RenameCmd : Command |
||
24 | { |
||
25 | /// <summary>---------------------------------------------------------------------- |
||
26 | /// |
||
27 | /// Tcl_RenameObjCmd -> RenameCmd.cmdProc |
||
28 | /// |
||
29 | /// This procedure is invoked to process the "rename" Tcl command. |
||
30 | /// See the user documentation for details on what it does. |
||
31 | /// |
||
32 | /// Results: |
||
33 | /// A standard Tcl object result. |
||
34 | /// |
||
35 | /// Side effects: |
||
36 | /// See the user documentation. |
||
37 | /// |
||
38 | /// ---------------------------------------------------------------------- |
||
39 | /// </summary> |
||
40 | |||
41 | public TCL.CompletionCode cmdProc( Interp interp, TclObject[] objv ) |
||
42 | { |
||
43 | string oldName, newName; |
||
44 | |||
45 | if ( objv.Length != 3 ) |
||
46 | { |
||
47 | throw new TclNumArgsException( interp, 1, objv, "oldName newName" ); |
||
48 | } |
||
49 | |||
50 | |||
51 | oldName = objv[1].ToString(); |
||
52 | |||
53 | newName = objv[2].ToString(); |
||
54 | |||
55 | interp.renameCommand( oldName, newName ); |
||
56 | return TCL.CompletionCode.RETURN; |
||
57 | } |
||
58 | } |
||
59 | } |