35 static Tcl_DString dstr;
49 nput = Tcl_DStringLength(&dstr) - strpos;
52 memcpy(ubuf, strpos + Tcl_DStringValue(&dstr), (
size_t)n);
58 memcpy(ubuf, strpos + Tcl_DStringValue(&dstr), (
size_t)nput);
62 Tcl_DStringFree(&dstr);
63 Tcl_DStringInit(&dstr);
64 if (Tcl_Gets((Tcl_Channel)
channel, &dstr) < 0) {
71 Tcl_DStringAppend(&dstr,
"\n", 1);
72 if (Tcl_DStringLength(&dstr) > n) {
75 memcpy(ubuf, Tcl_DStringValue(&dstr), (
size_t)n);
79 nput = Tcl_DStringLength(&dstr);
80 memcpy(ubuf, Tcl_DStringValue(&dstr), (
size_t)nput);