Changes To Documentation

Changes to "Documentation" between 2014-06-17 05:14:55 and 2014-06-17 16:40:42

    10     10   Synopsis:
    11     11   
    12     12     1.  `tcc4tcl::cproc <procName> <argList> <returnType> <code>`
    13     13       1. `<procName>` is the name of the Tcl procedure to create
    14     14       1. `<argList>` is a list of arguments and their types for the C function;
    15     15         1. The list is in the format of: type1 name1 type2 name2 ... typeN nameN
    16     16         1. The supported types are:
    17         -         1. Tcl_Interp*: Must be first argument, will be the interpreter
           17  +         1. Tcl_Interp*: Must be first argument, will be the interpreter and the user will not need to pass this parameter
    18     18            1. int
    19     19            1. long
    20     20            1. float
    21     21            1. double
    22     22            1. char*
    23     23            1. Tcl_Obj*: Passes the Tcl object in unchanged
    24     24            1. void*
................................................................................
    32     32            1. double
    33     33            1. char*: TCL_STATIC string (immutable from C)
    34     34            1. string, dstring: TCL_DYNAMIC string (mutable from C)
    35     35            1. vstring: TCL_VOLATILE string (mutable from C)
    36     36            1. default: Tcl_Obj*, a Tcl Object
    37     37       1. `<code>` is the C code that comprises the function
    38     38   
    39         -Example:
           39  +Examples:
    40     40   
    41     41     1.  Create a Tcl procedure called "add" which accepts 2 integers (a, b) and returns a long:
    42     42       1.  `tcc4tcl::cproc add {int a int b} long { return(a+b); }`
           43  +  2.  Create a Tcl procedure called "mkdir" which accepts a Tcl_Obj* and returns a return code:
           44  +    1.  `tcc4tcl::cproc mkdir {Tcl_Interp* interp char* dir} ok { int mkdir_ret; mkdir_ret = mkdir(dir); if (mkdir_ret != 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj("failed", -1)); return(TCL_ERROR); }; return(TCL_OK); }`
    43     45   
    44     46   
    45     47   tcc4tcl::ccode
    46     48   --------------
    47     49   
    48     50   tcc4tcl::cdata
    49     51   --------------