Lines Matching refs:newtok
852 char *newtok = PyOS_Readline(stdin, stdout, tok->prompt); in tok_nextc() local
853 if (newtok != NULL) { in tok_nextc()
854 char *translated = translate_newlines(newtok, 0, tok); in tok_nextc()
855 PyMem_FREE(newtok); in tok_nextc()
858 newtok = translated; in tok_nextc()
860 if (tok->encoding && newtok && *newtok) { in tok_nextc()
864 PyObject *u = translate_into_utf8(newtok, tok->encoding); in tok_nextc()
865 PyMem_FREE(newtok); in tok_nextc()
872 newtok = PyMem_MALLOC(buflen+1); in tok_nextc()
873 if (newtok == NULL) { in tok_nextc()
878 strcpy(newtok, buf); in tok_nextc()
883 if (newtok == NULL) in tok_nextc()
885 else if (*newtok == '\0') { in tok_nextc()
886 PyMem_FREE(newtok); in tok_nextc()
892 size_t newlen = oldlen + strlen(newtok); in tok_nextc()
900 PyMem_FREE(newtok); in tok_nextc()
908 strcpy(tok->buf + oldlen, newtok); in tok_nextc()
909 PyMem_FREE(newtok); in tok_nextc()
918 tok->buf = newtok; in tok_nextc()