diff --git a/src/conio/cterm.c b/src/conio/cterm.c
index 9cf97a1bc546b3b50578f5def9b80b27e73d63bb..6e04d2bfb50d7db31f7901e00d6d6f4c214121ed 100644
--- a/src/conio/cterm.c
+++ b/src/conio/cterm.c
@@ -188,8 +188,8 @@ struct note_params {
 	#define GOTOXY(x,y)				cterm->ciolib_gotoxy(x, y)
 	#define WHEREX()				cterm->ciolib_wherex()
 	#define WHEREY()				cterm->ciolib_wherey()
-	#define PGETTEXT(a,b,c,d,e,f,g)		cterm->ciolib_pgettext(a,b,c,d,e,f,g)
 	#define GETTEXT(a,b,c,d,e)		cterm->ciolib_gettext(a,b,c,d,e)
+	#define PGETTEXT(a,b,c,d,e,f,g)		cterm->ciolib_pgettext(a,b,c,d,e,f,g)
 	#define GETTEXTINFO(a)			cterm->ciolib_gettextinfo(a)
 	#define TEXTATTR(a)				cterm->ciolib_textattr(a)
 	#define SETCURSORTYPE(a)		cterm->ciolib_setcursortype(a)
@@ -983,7 +983,10 @@ void CIOLIBCALL cterm_clearscreen(struct cterminal *cterm, char attr)
 			if (cterm->scrollbackb)
 				memmove(cterm->scrollbackb,cterm->scrollbackb+cterm->width*(cterm->backpos-cterm->backlines),cterm->width*(cterm->backlines-(cterm->backpos-cterm->backlines)));
 		}
-		PGETTEXT(cterm->x,cterm->y,cterm->x+cterm->width-1,cterm->y+cterm->height-1,cterm->scrollback+(cterm->backpos-cterm->height)*cterm->width*2,cterm->scrollbackf?cterm->scrollbackf+(cterm->backpos-cterm->height)*cterm->width:NULL,cterm->scrollbackb?cterm->scrollbackb+(cterm->backpos-cterm->height)*cterm->width:NULL);
+		PGETTEXT(cterm->x,cterm->y,cterm->x+cterm->width-1,cterm->y+cterm->height-1,
+		    cterm->scrollback + (cterm->backpos - cterm->height) * cterm->width * 2,
+		    cterm->scrollbackf ? cterm->scrollbackf + (cterm->backpos - cterm->height) * cterm->width : NULL,
+		    cterm->scrollbackb ? cterm->scrollbackb + (cterm->backpos - cterm->height) * cterm->width : NULL);
 	}
 	CLRSCR();
 	if(cterm->origin_mode)
@@ -2460,6 +2463,7 @@ struct cterminal* CIOLIBCALL cterm_init(int height, int width, int xpos, int ypo
 	cterm->ciolib_gotoxy=ciolib_gotoxy;
 	cterm->ciolib_wherex=ciolib_wherex;
 	cterm->ciolib_wherey=ciolib_wherey;
+	cterm->ciolib_pgettext=ciolib_pgettext;
 	cterm->ciolib_gettext=ciolib_gettext;
 	cterm->ciolib_gettextinfo=ciolib_gettextinfo;
 	cterm->ciolib_textattr=ciolib_textattr;
@@ -2474,6 +2478,7 @@ struct cterminal* CIOLIBCALL cterm_init(int height, int width, int xpos, int ypo
 	cterm->ciolib_putch=ciolib_putch;
 	cterm->ciolib_cputch=ciolib_cputch;
 	cterm->ciolib_puttext=ciolib_puttext;
+	cterm->ciolib_pputtext=ciolib_pputtext;
 	cterm->ciolib_window=ciolib_window;
 	cterm->ciolib_cputs=ciolib_cputs;
 	cterm->ciolib_ccputs=ciolib_ccputs;
diff --git a/src/conio/cterm.h b/src/conio/cterm.h
index fdf76ea5512092dd80a8c373218aa660772ae572..da4ff58fbdea3f42b74fe9a3553acc428d42e2bf 100644
--- a/src/conio/cterm.h
+++ b/src/conio/cterm.h
@@ -171,6 +171,7 @@ struct cterminal {
 	int		(*ciolib_putch)			(struct cterminal *,int);
 	int		(*ciolib_cputch)		(struct cterminal *,uint32_t,uint32_t,int);
 	int		(*ciolib_puttext)		(struct cterminal *,int,int,int,int,void *);
+	int		(*ciolib_pputtext)		(struct cterminal *,int,int,int,int,void *,uint32_t *,uint32_t *);
 	void	(*ciolib_window)		(struct cterminal *,int,int,int,int);
 	int		(*ciolib_cputs)			(struct cterminal *,char *);
 	int		(*ciolib_ccputs)		(struct cterminal *,uint32_t,uint32_t,const char *);
@@ -194,6 +195,7 @@ struct cterminal {
 	int		CIOLIBCALL (*ciolib_putch)			(int);
 	int		CIOLIBCALL (*ciolib_cputch)			(uint32_t, uint32_t, int);
 	int		CIOLIBCALL (*ciolib_puttext)		(int,int,int,int,void *);
+	int		CIOLIBCALL (*ciolib_pputtext)		(int,int,int,int,void *,uint32_t *,uint32_t *);
 	void	CIOLIBCALL (*ciolib_window)		(int,int,int,int);
 	int		CIOLIBCALL (*ciolib_cputs)			(char *);
 	int		CIOLIBCALL (*ciolib_ccputs)			(uint32_t, uint32_t, const char *);